From 1cae4877cbadaee3c608da546741014c7061217b Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Fri, 26 Jan 2024 11:02:39 -0800 Subject: [PATCH 01/32] v7 pre-testnet fixes (#252) * axelarcork and v7 upgrade fixes * Community funds sent to GMP account correctly * properly handle cork migration, set default params * Fix cork validations and genesis * ledger-cosmos-go to v0.12.4 * used fixed-size keys in pubsub store for strings * axelarcork integration test prop fixes * Add miminum auction height parameter Also stub out usage of minimum USD value --- app/app.go | 1 + app/upgrades/v7/upgrades.go | 39 ++-- go.mod | 6 +- go.sum | 12 +- integration_tests/axelarcork_test.go | 2 + proto/auction/v1/genesis.proto | 1 + proto/axelarcork/v1/axelarcork.proto | 4 +- proto/axelarcork/v1/genesis.proto | 4 +- proto/axelarcork/v1/proposal.proto | 35 ++- x/auction/keeper/keeper.go | 13 +- x/auction/types/errors.go | 2 + x/auction/types/genesis.pb.go | 104 ++++++--- x/auction/types/params.go | 12 + x/axelarcork/client/cli/tx.go | 159 +++++++------ x/axelarcork/client/cli/tx_test.go | 147 ++++++++++-- x/axelarcork/client/proposal_handler.go | 6 +- x/axelarcork/keeper/genesis.go | 9 +- x/axelarcork/keeper/keeper_test.go | 3 +- x/axelarcork/keeper/proposal_handler.go | 14 +- x/axelarcork/keeper/query_server.go | 2 +- x/axelarcork/keeper/query_server_test.go | 4 +- x/axelarcork/types/axelarcork.go | 61 +++++ x/axelarcork/types/axelarcork.pb.go | 140 +++++------ x/axelarcork/types/genesis.go | 10 +- x/axelarcork/types/proposal.go | 65 ++++-- x/axelarcork/types/proposal.pb.go | 283 +++++++++-------------- x/axelarcork/types/proposal_test.go | 8 + x/cork/keeper/genesis.go | 2 +- x/cork/keeper/keeper.go | 2 +- x/cork/keeper/keeper_test.go | 4 +- x/cork/keeper/migrations.go | 21 ++ x/cork/keeper/query_server_test.go | 2 +- x/cork/keeper/test_common.go | 2 +- x/cork/migrations/v1/store.go | 2 - x/cork/module.go | 6 + x/cork/types/cork.go | 49 ++++ x/cork/types/genesis.go | 22 +- x/cork/types/keys.go | 2 +- x/pubsub/types/keys.go | 44 ++-- x/pubsub/types/pubsub.go | 11 +- 40 files changed, 819 insertions(+), 496 deletions(-) create mode 100644 x/cork/keeper/migrations.go diff --git a/app/app.go b/app/app.go index 0066a05da..54b12d1ae 100644 --- a/app/app.go +++ b/app/app.go @@ -1021,6 +1021,7 @@ func (app *SommelierApp) setupUpgradeHandlers() { app.AuctionKeeper, app.AxelarCorkKeeper, app.CellarFeesKeeper, + app.CorkKeeper, app.ICAHostKeeper, app.PubsubKeeper, ), diff --git a/app/upgrades/v7/upgrades.go b/app/upgrades/v7/upgrades.go index 237c33c61..53642b3e6 100644 --- a/app/upgrades/v7/upgrades.go +++ b/app/upgrades/v7/upgrades.go @@ -16,6 +16,8 @@ import ( axelarcorktypes "github.com/peggyjv/sommelier/v7/x/axelarcork/types" cellarfeeskeeper "github.com/peggyjv/sommelier/v7/x/cellarfees/keeper" cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + corkkeeper "github.com/peggyjv/sommelier/v7/x/cork/keeper" + corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" pubsubkeeper "github.com/peggyjv/sommelier/v7/x/pubsub/keeper" pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" ) @@ -26,6 +28,7 @@ func CreateUpgradeHandler( auctionKeeper auctionkeeper.Keeper, axelarcorkKeeper axelarcorkkeeper.Keeper, cellarfeesKeeper cellarfeeskeeper.Keeper, + corkKeeper corkkeeper.Keeper, icaHostKeeper icahostkeeper.Keeper, pubsubKeeper pubsubkeeper.Keeper, ) upgradetypes.UpgradeHandler { @@ -38,7 +41,12 @@ func CreateUpgradeHandler( icaParams := icahosttypes.DefaultParams() icaHostKeeper.SetParams(ctx, icaParams) - // We must manually run InitGenesis for pubsub and auctions so we can adjust their values + // Given that we've removed and added params in cork v2, we'll also set the cork v2 params to their defaults + ctx.Logger().Info("v7 upgrade: setting cork v2 params to defaults") + corkParams := corktypes.DefaultParams() + corkKeeper.SetParams(ctx, corkParams) + + // We must manually run InitGenesis for auction, axelarcork, and pubsub so we can adjust their values // during the upgrade process. RunMigrations will migrate to the new cork version. Setting the consensus // version to 1 prevents RunMigrations from running InitGenesis itself. fromVM[auctiontypes.ModuleName] = mm.Modules[auctiontypes.ModuleName].ConsensusVersion() @@ -69,12 +77,12 @@ func auctionInitGenesis(ctx sdk.Context, auctionKeeper auctionkeeper.Keeper) { genesisState := auctiontypes.DefaultGenesisState() usomm52WeekLow := sdk.MustNewDecFromStr("0.079151") - eth52WeekHigh := sdk.MustNewDecFromStr("2359.89") - btc52WeekHigh := sdk.MustNewDecFromStr("44202.18") + eth52WeekHigh := sdk.MustNewDecFromStr("2618.33") + btc52WeekHigh := sdk.MustNewDecFromStr("46936.19") oneDollar := sdk.MustNewDecFromStr("1.0") - // Setting this to a block on 12/14/23 -- just means token price will get stale 4 days faster post-upgrade - var lastUpdatedBlock uint64 = 12187266 + // Setting this to a block on 1/25/24 -- just means token price will get stale 6 days faster post-upgrade + var lastUpdatedBlock uint64 = 12817014 usommPrice := auctiontypes.TokenPrice{ Denom: "usomm", @@ -191,27 +199,30 @@ func axelarcorkInitGenesis(ctx sdk.Context, axelarcorkKeeper axelarcorkkeeper.Ke }, } - // InitGenesis reads through each chain configuration in order and sets the cellar ID set - // for it based on index, so this list must be of the same size and order as the respective - // chain configurations above genesisState.CellarIds = []*axelarcorktypes.CellarIDSet{ { - Ids: []string{"0x438087f7c226A89762a791F187d7c3D4a0e95ae6"}, // arbitrum test cellar + ChainId: 42161, // arbitrum with test cellar + Ids: []string{"0x438087f7c226A89762a791F187d7c3D4a0e95ae6"}, }, { - Ids: []string{}, + ChainId: 43114, // Avalanche + Ids: []string{}, }, { - Ids: []string{}, + ChainId: 8453, // base + Ids: []string{}, }, { - Ids: []string{}, + ChainId: 56, // binance + Ids: []string{}, }, { - Ids: []string{}, + ChainId: 10, // optimism + Ids: []string{}, }, { - Ids: []string{}, + ChainId: 137, // Polygon + Ids: []string{}, }, } diff --git a/go.mod b/go.mod index c440fe3a1..4b6ccf8ef 100644 --- a/go.mod +++ b/go.mod @@ -66,7 +66,7 @@ require ( github.com/cosmos/cosmos-proto v1.0.0-alpha8 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect github.com/cosmos/iavl v0.19.6 // indirect - github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect + github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect github.com/creachadair/taskgroup v0.3.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -170,8 +170,8 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.3.6 // indirect go.opencensus.io v0.24.0 // indirect golang.org/x/crypto v0.7.0 // indirect diff --git a/go.sum b/go.sum index df96781c5..e4b1340c3 100644 --- a/go.sum +++ b/go.sum @@ -255,8 +255,8 @@ github.com/cosmos/ibc-go/v6 v6.2.0 h1:HKS5WNxQrlmjowHb73J9LqlNJfvTnvkbhXZ9QzNTU7 github.com/cosmos/ibc-go/v6 v6.2.0/go.mod h1:+S3sxcNwOhgraYDJAhIFDg5ipXHaUnJrg7tOQqGyWlc= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76/go.mod h1:0mkLWIoZuQ7uBoospo5Q9zIpqq6rYCPJDSUdeCJvPM8= -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-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= +github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= 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= @@ -1070,10 +1070,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/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.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= diff --git a/integration_tests/axelarcork_test.go b/integration_tests/axelarcork_test.go index d81006414..4134a668b 100644 --- a/integration_tests/axelarcork_test.go +++ b/integration_tests/axelarcork_test.go @@ -98,6 +98,7 @@ func (s *IntegrationTestSuite) TestAxelarCork() { Description: "arbitrum counter contract", ChainId: arbitrumChainID, CellarIds: &types.CellarIDSet{ + ChainId: arbitrumChainID, Ids: []string{ counterContract.Hex(), }, @@ -380,6 +381,7 @@ func (s *IntegrationTestSuite) TestAxelarCork() { Description: "arbitrum counter contract", ChainId: arbitrumChainID, CellarIds: &types.CellarIDSet{ + ChainId: arbitrumChainID, Ids: []string{ counterContract.Hex(), }, diff --git a/proto/auction/v1/genesis.proto b/proto/auction/v1/genesis.proto index 8d1dcd4b0..4eae85c19 100644 --- a/proto/auction/v1/genesis.proto +++ b/proto/auction/v1/genesis.proto @@ -28,4 +28,5 @@ message Params { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; + uint64 minimum_auction_height = 6; } diff --git a/proto/axelarcork/v1/axelarcork.proto b/proto/axelarcork/v1/axelarcork.proto index 061f4b2b4..622700b3d 100644 --- a/proto/axelarcork/v1/axelarcork.proto +++ b/proto/axelarcork/v1/axelarcork.proto @@ -40,7 +40,7 @@ message AxelarCorkResults { } message CellarIDSet { - ChainConfiguration chain = 1; + uint64 chain_id = 1; repeated string ids = 2; } @@ -62,7 +62,7 @@ message AxelarContractCallNonce { } // Represents a proxy contract upgrade approved by governance with a delay in -// execution in case of an error. +// execution in case of an error. message AxelarUpgradeData { uint64 chain_id = 1; bytes payload = 2; diff --git a/proto/axelarcork/v1/genesis.proto b/proto/axelarcork/v1/genesis.proto index 8ebd7e386..c10a3ef33 100644 --- a/proto/axelarcork/v1/genesis.proto +++ b/proto/axelarcork/v1/genesis.proto @@ -11,8 +11,8 @@ message GenesisState { Params params = 1; ChainConfigurations chain_configurations = 2 [(gogoproto.nullable) = false]; repeated CellarIDSet cellar_ids = 3; - ScheduledAxelarCorks scheduled_corks = 4; - AxelarCorkResults cork_results = 5; + ScheduledAxelarCorks scheduled_corks = 4; + AxelarCorkResults cork_results = 5; repeated AxelarContractCallNonce axelar_contract_call_nonces = 6; repeated AxelarUpgradeData axelar_upgrade_data = 7; } diff --git a/proto/axelarcork/v1/proposal.proto b/proto/axelarcork/v1/proposal.proto index 5d8306d2a..a5116b977 100644 --- a/proto/axelarcork/v1/proposal.proto +++ b/proto/axelarcork/v1/proposal.proto @@ -7,8 +7,6 @@ import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/peggyjv/sommelier/v7/x/axelarcork/types"; -// note: current plan is to accept either chain name or chain ID. if both and they dont match, error. - message AddAxelarManagedCellarIDsProposal { string title = 1; string description = 2; @@ -16,13 +14,13 @@ message AddAxelarManagedCellarIDsProposal { CellarIDSet cellar_ids = 4; } -// AddManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands +// AddAxelarManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands message AddAxelarManagedCellarIDsProposalWithDeposit { - string title = 1; - string description = 2; - uint64 chain_id = 3; - CellarIDSet cellar_ids = 4; - string deposit = 5; + string title = 1; + string description = 2; + uint64 chain_id = 3; + repeated string cellar_ids = 4; + string deposit = 5; } message RemoveAxelarManagedCellarIDsProposal { @@ -32,13 +30,13 @@ message RemoveAxelarManagedCellarIDsProposal { CellarIDSet cellar_ids = 4; } -// RemoveManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands +// RemoveAxelarManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands message RemoveAxelarManagedCellarIDsProposalWithDeposit { - string title = 1; - string description = 2; - uint64 chain_id = 3; - CellarIDSet cellar_ids = 4; - string deposit = 5; + string title = 1; + string description = 2; + uint64 chain_id = 3; + repeated string cellar_ids = 4; + string deposit = 5; } message AxelarScheduledCorkProposal { @@ -72,7 +70,7 @@ message AxelarScheduledCorkProposal { uint64 deadline = 7; } -// ScheduledCorkProposalWithDeposit is a specific definition for CLI commands +// AxelarScheduledCorkProposalWithDeposit is a specific definition for CLI commands message AxelarScheduledCorkProposalWithDeposit { string title = 1; string description = 2; @@ -96,7 +94,7 @@ message AxelarCommunityPoolSpendProposal { cosmos.base.v1beta1.Coin amount = 5 [(gogoproto.nullable) = false]; } -// This format of the community spend Ethereum proposal is specifically for +// This format of the Axelar community spend Ethereum proposal is specifically for // the CLI to allow simple text serialization. message AxelarCommunityPoolSpendProposalForCLI { option (gogoproto.goproto_getters) = false; @@ -106,9 +104,8 @@ message AxelarCommunityPoolSpendProposalForCLI { string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; string recipient = 3 [(gogoproto.moretags) = "yaml:\"recipient\""]; uint64 chain_id = 4 [(gogoproto.moretags) = "yaml:\"chain_id\""]; - string chain_name = 5 [(gogoproto.moretags) = "yaml:\"chain_name\""]; - string amount = 6 [(gogoproto.moretags) = "yaml:\"amount\""]; - string deposit = 7 [(gogoproto.moretags) = "yaml:\"deposit\""]; + string amount = 5 [(gogoproto.moretags) = "yaml:\"amount\""]; + string deposit = 6 [(gogoproto.moretags) = "yaml:\"deposit\""]; } message AddChainConfigurationProposal { diff --git a/x/auction/keeper/keeper.go b/x/auction/keeper/keeper.go index b3390f784..c8d490a47 100644 --- a/x/auction/keeper/keeper.go +++ b/x/auction/keeper/keeper.go @@ -184,6 +184,13 @@ func (k Keeper) BeginAuction(ctx sdk.Context, priceDecreaseBlockInterval uint64, fundingModuleAccount string, proceedsModuleAccount string) error { + + paramSet := k.GetParamSet(ctx) + currentHeight := uint64(ctx.BlockHeight()) + if currentHeight <= paramSet.MinimumAuctionHeight { + return errorsmod.Wrapf(types.ErrAuctionBelowMinimumHeight, "Current height: %d, Minimum height: %d", currentHeight, paramSet.MinimumAuctionHeight) + } + // Validate starting token balance if !startingTokensForSale.IsPositive() { return errorsmod.Wrapf(types.ErrAuctionStartingAmountMustBePositve, "Starting tokens for sale: %s", startingTokensForSale.String()) @@ -224,7 +231,11 @@ func (k Keeper) BeginAuction(ctx sdk.Context, // determine how many usomm each sale token min unit costs saleTokenPriceInUsomm := saleTokenMinUnitValue.Quo(usommMinUnitValue) - // TODO(bolten): we are not inspecting the MinimumSaleTokensUsdValue param and using it -- implement later? + // TODO(bolten): we should consider uncommenting this, but it would require fixing a bunch of unit tests + // saleTokenValueInUSD := saleTokenMinUnitValue.Mul(sdk.NewDecFromInt(startingTokensForSale.Amount)) + // if saleTokenValueInUSD.LT(paramSet.MinimumSaleTokensUsdValue) { + // return errorsmod.Wrapf(types.ErrAuctionBelowMinimumUSDValue, "sale tokens USD value: %s, minimum USD value: %s", saleTokenValueInUSD, paramSet.MinimumSaleTokensUsdValue) + // } auctionID := k.GetLastAuctionID(ctx) + 1 auction := types.Auction{ diff --git a/x/auction/types/errors.go b/x/auction/types/errors.go index ef263d266..7fc6155bc 100644 --- a/x/auction/types/errors.go +++ b/x/auction/types/errors.go @@ -50,4 +50,6 @@ var ( ErrTokenPriceExponentTooHigh = errorsmod.Register(ModuleName, 43, "token price exponent too high, maximum precision of 18") ErrInvalidMinimumSaleTokensUSDValue = errorsmod.Register(ModuleName, 44, "invalid minimum sale tokens USD value") ErrAuctionBelowMinimumUSDValue = errorsmod.Register(ModuleName, 45, "auction USD value below minimum") + ErrInvalidMinimumAuctionHeightParam = errorsmod.Register(ModuleName, 46, "invalid minimum auction height param") + ErrAuctionBelowMinimumHeight = errorsmod.Register(ModuleName, 47, "auction block height below minimum") ) diff --git a/x/auction/types/genesis.pb.go b/x/auction/types/genesis.pb.go index f2f52270f..17d9f3a50 100644 --- a/x/auction/types/genesis.pb.go +++ b/x/auction/types/genesis.pb.go @@ -114,6 +114,7 @@ type Params struct { MinimumSaleTokensUsdValue github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=minimum_sale_tokens_usd_value,json=minimumSaleTokensUsdValue,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"minimum_sale_tokens_usd_value"` AuctionMaxBlockAge uint64 `protobuf:"varint,4,opt,name=auction_max_block_age,json=auctionMaxBlockAge,proto3" json:"auction_max_block_age,omitempty"` AuctionPriceDecreaseAccelerationRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=auction_price_decrease_acceleration_rate,json=auctionPriceDecreaseAccelerationRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"auction_price_decrease_acceleration_rate"` + MinimumAuctionHeight uint64 `protobuf:"varint,6,opt,name=minimum_auction_height,json=minimumAuctionHeight,proto3" json:"minimum_auction_height,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -170,6 +171,13 @@ func (m *Params) GetAuctionMaxBlockAge() uint64 { return 0 } +func (m *Params) GetMinimumAuctionHeight() uint64 { + if m != nil { + return m.MinimumAuctionHeight + } + return 0 +} + func init() { proto.RegisterType((*GenesisState)(nil), "auction.v1.GenesisState") proto.RegisterType((*Params)(nil), "auction.v1.Params") @@ -178,40 +186,41 @@ func init() { func init() { proto.RegisterFile("auction/v1/genesis.proto", fileDescriptor_a762e9d6ba7af420) } var fileDescriptor_a762e9d6ba7af420 = []byte{ - // 518 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x6b, 0xd4, 0x40, - 0x18, 0xc6, 0x37, 0xdd, 0xb8, 0xd8, 0xd9, 0x96, 0xea, 0xb4, 0x4a, 0x2c, 0x98, 0x2e, 0x55, 0x4a, - 0x2e, 0x4d, 0xdc, 0x7a, 0x10, 0x8f, 0x1b, 0x0a, 0xb2, 0x07, 0xa1, 0xa4, 0xd6, 0x83, 0x97, 0x61, - 0x36, 0xf3, 0x12, 0xc7, 0x4d, 0x32, 0x21, 0x33, 0x59, 0xb6, 0x5f, 0xc0, 0xb3, 0x27, 0xc1, 0x6f, - 0xd4, 0x63, 0x8f, 0xe2, 0xa1, 0xc8, 0xee, 0x17, 0x91, 0x99, 0xcc, 0xd6, 0x78, 0xf4, 0x94, 0x97, - 0xf7, 0xf9, 0xbd, 0xff, 0x9e, 0x30, 0xc8, 0xa3, 0x4d, 0xaa, 0xb8, 0x28, 0xa3, 0xc5, 0x38, 0xca, - 0xa0, 0x04, 0xc9, 0x65, 0x58, 0xd5, 0x42, 0x09, 0x8c, 0xac, 0x12, 0x2e, 0xc6, 0x87, 0xfb, 0x1d, - 0x4a, 0x2d, 0x5b, 0xe0, 0xb0, 0x5b, 0xba, 0x61, 0x5b, 0xe5, 0x20, 0x13, 0x99, 0x30, 0x61, 0xa4, - 0xa3, 0x36, 0x7b, 0xfc, 0x63, 0x0b, 0xed, 0xbc, 0x6b, 0x47, 0x5c, 0x2a, 0xaa, 0x00, 0xbf, 0x42, - 0x83, 0x8a, 0xd6, 0xb4, 0x90, 0x9e, 0x33, 0x72, 0x82, 0xe1, 0x19, 0x0e, 0xff, 0x8e, 0x0c, 0x2f, - 0x8c, 0x12, 0xbb, 0x37, 0x77, 0x47, 0xbd, 0xc4, 0x72, 0x38, 0x42, 0x0f, 0x2d, 0x22, 0xbd, 0xad, - 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 0x24, 0xe3, 0xea, 0x73, 0x33, 0x0b, 0x53, 0x51, 0x44, - 0xa9, 0x90, 0x85, 0x90, 0xf6, 0x73, 0x2a, 0xd9, 0x3c, 0x52, 0xd7, 0x15, 0xc8, 0xf0, 0x1c, 0xd2, - 0xe4, 0x99, 0x6d, 0x7a, 0x49, 0x73, 0x30, 0x6e, 0xc9, 0x2b, 0xc9, 0x3e, 0xea, 0x86, 0x78, 0x8c, - 0x9e, 0x6c, 0xfc, 0xf9, 0xf7, 0x26, 0xd7, 0xec, 0x88, 0xad, 0xd8, 0xbd, 0xea, 0xab, 0x83, 0x82, - 0x4d, 0x4d, 0xeb, 0x06, 0x83, 0xb4, 0x06, 0x2a, 0x81, 0xd0, 0x34, 0x85, 0x1c, 0x6a, 0x6a, 0xb4, - 0x9a, 0x2a, 0x30, 0x8e, 0xff, 0xff, 0xc2, 0x2f, 0x6d, 0x7f, 0xf3, 0x27, 0xcf, 0x6d, 0xf7, 0x49, - 0xa7, 0x79, 0x42, 0x15, 0xc4, 0xd3, 0x9b, 0x95, 0xef, 0xdc, 0xae, 0x7c, 0xe7, 0xf7, 0xca, 0x77, - 0xbe, 0xad, 0xfd, 0xde, 0xed, 0xda, 0xef, 0xfd, 0x5c, 0xfb, 0xbd, 0x4f, 0x51, 0x67, 0x4e, 0x05, - 0x59, 0x76, 0xfd, 0x65, 0x11, 0x69, 0x83, 0x21, 0xe7, 0x50, 0x47, 0x8b, 0x37, 0xd1, 0x72, 0xf3, - 0x2a, 0xda, 0xa1, 0xb3, 0x81, 0x79, 0x06, 0xaf, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x58, 0xd5, - 0x3b, 0x11, 0x73, 0x03, 0x00, 0x00, + // 541 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0x9b, 0x35, 0x54, 0xcc,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 0xf4, 0xd4, 0x14, 0xbd, 0x24, 0x19, 0x68, 0xb7, 0xc4, 0x95, 0xa0, 0x9f, 0x54, + 0x41, 0x7c, 0x8a, 0x9e, 0xb4, 0xfe, 0xfc, 0x3b, 0x93, 0xad, 0x7b, 0xc4, 0x46, 0xec, 0x4e, 0xf5, + 0xd5, 0x42, 0x5e, 0x9b, 0xd3, 0xb8, 0x41, 0x21, 0xa9, 0x80, 0x08, 0x88, 0x49, 0x92, 0x40, 0x06, + 0x15, 0xd1, 0x5a, 0x45, 0x24, 0x68, 0xc7, 0xff, 0xbf, 0xe1, 0x17, 0xa6, 0xbe, 0xde, 0xe4, 0xb9, + 0xa9, 0x3e, 0xee, 0x14, 0x8f, 0xd4, 0x3f, 0xfa, 0x1a, 0xed, 0xb7, 0x6e, 0xb5, 0xfd, 0xcc, 0x80, + 0xa5, 0x33, 0x69, 0x76, 0xd8, 0x9a, 0x6f, 0x56, 0xfd, 0x5e, 0x6b, 0xe1, 0xe4, 0x66, 0xe5, 0x5a, + 0xb7, 0x2b, 0xd7, 0xfa, 0xbd, 0x72, 0xad, 0x6f, 0x6b, 0xb7, 0x77, 0xbb, 0x76, 0x7b, 0x3f, 0xd7, + 0x6e, 0xef, 0x73, 0xd0, 0xe9, 0xae, 0x84, 0x34, 0xbd, 0xfe, 0xb2, 0x08, 0xd4, 0x5a, 0x20, 0x63, + 0x50, 0x05, 0x8b, 0x37, 0xc1, 0xb2, 0x7d, 0x4b, 0x4d, 0xab, 0xd3, 0x81, 0x7e, 0x3c, 0xaf, 0xfe, + 0x04, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x6a, 0xcf, 0xe9, 0xa9, 0x03, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -319,6 +328,11 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.MinimumAuctionHeight != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.MinimumAuctionHeight)) + i-- + dAtA[i] = 0x30 + } { size := m.AuctionPriceDecreaseAccelerationRate.Size() i -= size @@ -422,6 +436,9 @@ func (m *Params) Size() (n int) { } l = m.AuctionPriceDecreaseAccelerationRate.Size() n += 1 + l + sovGenesis(uint64(l)) + if m.MinimumAuctionHeight != 0 { + n += 1 + sovGenesis(uint64(m.MinimumAuctionHeight)) + } return n } @@ -808,6 +825,25 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinimumAuctionHeight", wireType) + } + m.MinimumAuctionHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinimumAuctionHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/auction/types/params.go b/x/auction/types/params.go index c6d355377..f3a64225a 100644 --- a/x/auction/types/params.go +++ b/x/auction/types/params.go @@ -13,6 +13,7 @@ var ( KeyMinimumSaleTokensUSDValue = []byte("MinimumSaleTokensUSDValue") KeyAuctionMaxBlockAge = []byte("AuctionMaxBlockAge") KeyAuctionPriceDecreaseAccelerationRate = []byte("AuctionPriceDecreaseAccelerationRate") + KeyMinimumAuctionHeight = []byte("MinimumAuctionHeight") ) var _ paramtypes.ParamSet = &Params{} @@ -30,6 +31,7 @@ func DefaultParams() Params { MinimumSaleTokensUsdValue: sdk.MustNewDecFromStr("1.0"), // minimum value of sale tokens to consider starting an auction AuctionMaxBlockAge: 864000, // roughly 60 days based on 6 second blocks AuctionPriceDecreaseAccelerationRate: sdk.MustNewDecFromStr("0.001"), // 0.1% + MinimumAuctionHeight: 0, // do not run auctions before this block height } } @@ -41,6 +43,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyMinimumSaleTokensUSDValue, &p.MinimumSaleTokensUsdValue, validateMinimumSaleTokensUSDValue), paramtypes.NewParamSetPair(KeyAuctionMaxBlockAge, &p.AuctionMaxBlockAge, validateAuctionMaxBlockAge), paramtypes.NewParamSetPair(KeyAuctionPriceDecreaseAccelerationRate, &p.AuctionPriceDecreaseAccelerationRate, validateAuctionPriceDecreaseAccelerationRate), + paramtypes.NewParamSetPair(KeyMinimumAuctionHeight, &p.MinimumAuctionHeight, validateMinimumAuctionHeight), } } @@ -127,3 +130,12 @@ func validateAuctionPriceDecreaseAccelerationRate(i interface{}) error { return nil } + +func validateMinimumAuctionHeight(i interface{}) error { + _, ok := i.(uint64) + if !ok { + return errorsmod.Wrapf(ErrInvalidMinimumAuctionHeightParam, "invalid minimum auction height parameter type: %T", i) + } + + return nil +} diff --git a/x/axelarcork/client/cli/tx.go b/x/axelarcork/client/cli/tx.go index b81fc20c9..13593d154 100644 --- a/x/axelarcork/client/cli/tx.go +++ b/x/axelarcork/client/cli/tx.go @@ -20,7 +20,7 @@ import ( // GetTxCmd returns the transaction commands for this module func GetTxCmd() *cobra.Command { corkTxCmd := &cobra.Command{ - Use: "axelar-cork", + Use: "axelarcork", Short: "AxelarCork transaction subcommands", DisableFlagParsing: true, SuggestionsMinimumDistance: 2, @@ -192,7 +192,7 @@ func CmdRelayAxelarProxyUpgrade() *cobra.Command { func CmdBumpAxelarCorkGas() *cobra.Command { cmd := &cobra.Command{ - Use: "bump-axelar-cork [token] [message-id]", + Use: "bump-axelar-cork-gas [token] [message-id]", Args: cobra.ExactArgs(2), Short: "Add gas for an Axelar cork that is stuck relaying", @@ -231,25 +231,25 @@ func CmdBumpAxelarCorkGas() *cobra.Command { // Proposals // /////////////// -// GetCmdSubmitAddCellarIDProposal implements the command to submit a cellar id addition proposal -func GetCmdSubmitAddCellarIDProposal() *cobra.Command { - +// GetCmdSubmitAddAxelarCellarIDProposal implements the command to submit a cellar id addition proposal +func GetCmdSubmitAddAxelarCellarIDProposal() *cobra.Command { cmd := &cobra.Command{ - Use: "add-cellar-id [proposal-file]", + Use: "add-axelar-cellar-id [proposal-file]", Args: cobra.ExactArgs(1), - Short: "Submit a cellar id addition proposal", + Short: "Submit an Axelar cellar ID addition proposal", Long: strings.TrimSpace( - fmt.Sprintf(`Submit a cellar addition proposal along with an initial deposit. + fmt.Sprintf(`Submit an Axelar cellar addition proposal along with an initial deposit. The proposal details must be supplied via a JSON file. Example: -$ %s tx gov submit-proposal add-cellar-id --from= +$ %s tx gov submit-proposal add-axelar-cellar-id --from= Where proposal.json contains: { - "title": "Dollary-doos LP Cellar Proposal", + "title": "Dollary-doos LP Arbitrum Cellar Proposal", "description": "I have a hunch", + "chain_id": 42161, "cellar_ids": ["0x123801a7D398351b8bE11C439e05C5B3259aeC9B", "0x456801a7D398351b8bE11C439e05C5B3259aeC9B"], "deposit": "10000usomm" } @@ -278,17 +278,21 @@ Where proposal.json contains: return err } - for _, id := range proposal.CellarIds.Ids { + if proposal.ChainId == 0 { + return fmt.Errorf("chain ID must be non-zero") + } + + for _, id := range proposal.CellarIds { if !common.IsHexAddress(id) { - return fmt.Errorf("%s is not a valid ethereum address", id) + return fmt.Errorf("%s is not a valid EVM address", id) } } - content := types.NewAddManagedCellarIDsProposal( + content := types.NewAddAxelarManagedCellarIDsProposal( proposal.Title, proposal.Description, proposal.ChainId, - &types.CellarIDSet{Ids: proposal.CellarIds.Ids}) + &types.CellarIDSet{ChainId: proposal.ChainId, Ids: proposal.CellarIds}) from := clientCtx.GetFromAddress() msg, err := govtypesv1beta1.NewMsgSubmitProposal(content, deposit, from) @@ -299,27 +303,29 @@ Where proposal.json contains: return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } + return cmd } -// GetCmdSubmitRemoveCellarIDProposal implements the command to submit a cellar id removal proposal -func GetCmdSubmitRemoveCellarIDProposal() *cobra.Command { +// GetCmdSubmitRemoveAxelarCellarIDProposal implements the command to submit a cellar id removal proposal +func GetCmdSubmitRemoveAxelarCellarIDProposal() *cobra.Command { cmd := &cobra.Command{ - Use: "remove-cellar-id [proposal-file]", + Use: "remove-axelar-cellar-id [proposal-file]", Args: cobra.ExactArgs(1), - Short: "Submit a cellar id removal proposal", + Short: "Submit an Axelar cellar ID removal proposal", Long: strings.TrimSpace( - fmt.Sprintf(`Submit a cellar removal proposal along with an initial deposit. + fmt.Sprintf(`Submit an Axelar cellar removal proposal along with an initial deposit. The proposal details must be supplied via a JSON file. Example: -$ %s tx gov submit-proposal remove-cellar-id --from= +$ %s tx gov submit-proposal remove-axelar-cellar-id --from= Where proposal.json contains: { - "title": "Dollary-doos LP Cellar Removal Proposal", + "title": "Dollary-doos LP Arbitrum Cellar Removal Proposal", "description": "I don't trust them", + "chain_id": 42161, "cellar_ids": ["0x123801a7D398351b8bE11C439e05C5B3259aeC9B", "0x456801a7D398351b8bE11C439e05C5B3259aeC9B"], "deposit": "10000usomm" } @@ -348,17 +354,21 @@ Where proposal.json contains: return err } - for _, id := range proposal.CellarIds.Ids { + if proposal.ChainId == 0 { + return fmt.Errorf("chain ID must be non-zero") + } + + for _, id := range proposal.CellarIds { if !common.IsHexAddress(id) { - return fmt.Errorf("%s is not a valid ethereum address", id) + return fmt.Errorf("%s is not a valid EVM address", id) } } - content := types.NewRemoveManagedCellarIDsProposal( + content := types.NewRemoveAxelarManagedCellarIDsProposal( proposal.Title, proposal.Description, proposal.ChainId, - &types.CellarIDSet{Ids: proposal.CellarIds.Ids}) + &types.CellarIDSet{ChainId: proposal.ChainId, Ids: proposal.CellarIds}) from := clientCtx.GetFromAddress() msg, err := govtypesv1beta1.NewMsgSubmitProposal(content, deposit, from) @@ -378,22 +388,24 @@ func GetCmdSubmitScheduledAxelarCorkProposal() *cobra.Command { cmd := &cobra.Command{ Use: "schedule-axelar-cork [proposal-file]", Args: cobra.ExactArgs(1), - Short: "Submit a scheduled cork proposal", + Short: "Submit a scheduled Axelar cork proposal", Long: strings.TrimSpace( - fmt.Sprintf(`Submit a scheduled cork proposal along with an initial deposit. + fmt.Sprintf(`Submit an Axelar scheduled cork proposal along with an initial deposit. The proposal details must be supplied via a JSON file. Example: -$ %s tx gov submit-proposal schedule-cork --from= +$ %s tx gov submit-proposal schedule-axelar-cork --from= Where proposal.json contains: { - "title": "Dollary-doos LP Scheduled AxelarCork Proposal", + "title": "Dollary-doos LP Arbitrum Scheduled AxelarCork Proposal", "description": "I trust them, approve cork", "block_height": 100000, + "chain_id": 42161, "target_contract_address": "0x123801a7D398351b8bE11C439e05C5B3259aeC9B", "contract_call_proto_json": "{\"cellar_id\":\"0x123801a7D398351b8bE11C439e05C5B3259aeC9B\",\"\":{\"some_fuction\":{\"function_args\":{}},\"block_height\":12345}}", + "deadline": 1706225320, "deposit": "10000usomm" } @@ -423,10 +435,6 @@ The contract_call_proto_json field must be the JSON representation of a Schedule return err } - if !common.IsHexAddress(proposal.TargetContractAddress) { - return fmt.Errorf("%s is not a valid contract address", proposal.TargetContractAddress) - } - content := types.NewAxelarScheduledCorkProposal( proposal.Title, proposal.Description, @@ -434,6 +442,7 @@ The contract_call_proto_json field must be the JSON representation of a Schedule proposal.ChainId, proposal.TargetContractAddress, proposal.ContractCallProtoJson, + proposal.Deadline, ) if err := content.ValidateBasic(); err != nil { return err @@ -452,29 +461,29 @@ The contract_call_proto_json field must be the JSON representation of a Schedule return cmd } -func CmdSubmitAxelarCommunityPoolEthereumSpendProposal() *cobra.Command { +func CmdSubmitAxelarCommunityPoolSpendProposal() *cobra.Command { cmd := &cobra.Command{ Use: "axelar-community-pool-spend [proposal-file]", Args: cobra.ExactArgs(2), - Short: "Submit a community pool spend proposal", + Short: "Submit an Axelar community pool spend proposal", Long: strings.TrimSpace( - fmt.Sprintf(`Submit a community pool spend proposal along with an initial deposit. + fmt.Sprintf(`Submit an Axelar community pool spend proposal along with an initial deposit. The proposal details must be supplied via a JSON file. The funds from the community pool will be bridged to the target EVM via Axelar to the supplied recipient address. Only one denomination of Cosmos token can be sent. Fees will be removed from the balance by Axelar automatically. Example: -$ %s tx gov submit-proposal community-pool-spend --from= +$ %s tx gov submit-proposal axelar-community-pool-spend --from= Where proposal.json contains: { - "title": "Community Pool Ethereum Spend", - "description": "Bridge me some tokens to Ethereum!", + "title": "Community Pool Axelar Spend", + "description": "Bridge me some tokens to Arbitrum!", "recipient": "0x0000000000000000000000000000000000000000", - "chain_name": "Avalanche", - "amount": "20000stake", - "deposit": "1000stake" + "chain_id": 42161, + "amount": "20000usomm", + "deposit": "10000usomm" } `, version.AppName, @@ -486,21 +495,22 @@ Where proposal.json contains: return err } - proposal, err := ParseCommunityPoolSpendProposal(clientCtx.Codec, args[0]) + proposal := types.AxelarCommunityPoolSpendProposalForCLI{} + contents, err := os.ReadFile(args[0]) if err != nil { return err } - if len(proposal.Title) == 0 { - return fmt.Errorf("title is empty") + if err = clientCtx.Codec.UnmarshalJSON(contents, &proposal); err != nil { + return err } - if len(proposal.Description) == 0 { - return fmt.Errorf("description is empty") + if proposal.ChainId == 0 { + return fmt.Errorf("chain ID must be non-zero") } if !common.IsHexAddress(proposal.Recipient) { - return fmt.Errorf("recipient is not a valid Ethereum address") + return fmt.Errorf("recipient is not a valid EVM address") } amount, err := sdk.ParseCoinNormalized(proposal.Amount) @@ -508,6 +518,10 @@ Where proposal.json contains: return err } + if !amount.IsPositive() { + return fmt.Errorf("amount must be positive") + } + deposit, err := sdk.ParseCoinsNormalized(proposal.Deposit) if err != nil { return err @@ -537,31 +551,31 @@ Where proposal.json contains: // GetCmdSubmitAddChainConfigurationProposal implements the command to submit a cellar id addition proposal func GetCmdSubmitAddChainConfigurationProposal() *cobra.Command { - cmd := &cobra.Command{ - Use: "add-chain-config [proposal-file]", + Use: "add-axelar-chain-config [proposal-file]", Args: cobra.ExactArgs(1), - Short: "Submit a chain configuration addition proposal", + Short: "Submit an Axelar chain configuration addition proposal", Long: strings.TrimSpace( - fmt.Sprintf(`Submit a chain configuration addition proposal along with an initial deposit. + fmt.Sprintf(`Submit an Axelar chain configuration addition proposal along with an initial deposit. The proposal details must be supplied via a JSON file. Example: -$ %s tx gov submit-proposal add-chain-config --from= +$ %s tx gov submit-proposal add-axelar-chain-config --from= Where proposal.json contains: { - "title": "Enable Fake EVM proposal", - "description": "Fake it 'til you make it'", - "chain_congifuration": { - "name": "FakeEVM", - "id": 1000, - "vote_threshold": "0.333", - "proxy_address": "0x1234..." + "title": "Enable Arbitrum proposal", + "description": "allow cellars to be used on Arbitrum", + "chain_configuration": { + "name": "arbitrum", + "id": 42161, + "proxy_address": "0x0000000000000000000000000000000000000000" }, "deposit": "10000usomm" } + +Note that the "name" parameter should map to a "Chain Identifier" as defined by Axelar: https://docs.axelar.dev/dev/reference/mainnet-chain-names `, version.AppName, ), @@ -613,22 +627,22 @@ Where proposal.json contains: // GetCmdSubmitRemoveChainConfigurationProposal implements the command to submit a chain configuration removal proposal func GetCmdSubmitRemoveChainConfigurationProposal() *cobra.Command { cmd := &cobra.Command{ - Use: "remove-chain-configuration [proposal-file]", + Use: "remove-axelar-chain-config [proposal-file]", Args: cobra.ExactArgs(1), - Short: "Submit a chain configuration removal proposal", + Short: "Submit an Axelear chain configuration removal proposal", Long: strings.TrimSpace( - fmt.Sprintf(`Submit a chain configuration removal proposal along with an initial deposit. + fmt.Sprintf(`Submit an Axelar chain configuration removal proposal along with an initial deposit. The proposal details must be supplied via a JSON file. Example: -$ %s tx gov submit-proposal remove-chain-configuration --from= +$ %s tx gov submit-proposal remove-axelar-chain-config --from= Where proposal.json contains: { - "title": "Dollary-doos LP Cellar Removal Proposal", - "description": "I don't trust them", - "chain_id": 1000, + "title": "Remove Arbitrum chain config", + "description": "not using Arbitrum any more", + "chain_id": 42161, "deposit": "10000usomm" } `, @@ -663,7 +677,8 @@ Where proposal.json contains: content := types.NewRemoveChainConfigurationProposal( proposal.Title, proposal.Description, - proposal.ChainId) + proposal.ChainId, + ) from := clientCtx.GetFromAddress() msg, err := govtypesv1beta1.NewMsgSubmitProposal(content, deposit, from) @@ -728,6 +743,10 @@ Where proposal.json contains: return fmt.Errorf("chain ID cannot be zero") } + if !common.IsHexAddress(proposal.NewProxyAddress) { + return fmt.Errorf("new proxy address is not a valid EVM address") + } + content := types.NewUpgradeAxelarProxyContractProposal( proposal.Title, proposal.Description, @@ -763,8 +782,8 @@ $ %s tx gov submit-proposal cancel-axelar-proxy-contract-upgrade 0 { for _, s := range m.Ids { @@ -1983,10 +1974,10 @@ func (m *CellarIDSet) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Chain", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) } - var msglen int + m.ChainId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAxelarcork @@ -1996,28 +1987,11 @@ func (m *CellarIDSet) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.ChainId |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthAxelarcork - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAxelarcork - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Chain == nil { - m.Chain = &ChainConfiguration{} - } - if err := m.Chain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) diff --git a/x/axelarcork/types/genesis.go b/x/axelarcork/types/genesis.go index 8c3b47496..7ac48fb2d 100644 --- a/x/axelarcork/types/genesis.go +++ b/x/axelarcork/types/genesis.go @@ -28,14 +28,20 @@ func (gs GenesisState) Validate() error { } } + for _, cids := range gs.CellarIds { + if err := cids.ValidateBasic(); err != nil { + return err + } + } + for _, sc := range gs.ScheduledCorks.ScheduledCorks { - if err := sc.Cork.ValidateBasic(); err != nil { + if err := sc.ValidateBasic(); err != nil { return err } } for _, cr := range gs.CorkResults.CorkResults { - if err := cr.Cork.ValidateBasic(); err != nil { + if err := cr.ValidateBasic(); err != nil { return err } } diff --git a/x/axelarcork/types/proposal.go b/x/axelarcork/types/proposal.go index 9deee2493..d72d6dd36 100644 --- a/x/axelarcork/types/proposal.go +++ b/x/axelarcork/types/proposal.go @@ -65,7 +65,7 @@ func init() { govtypesv1beta1.ModuleCdc.RegisterConcrete(&CancelAxelarProxyContractUpgradeProposal{}, "sommelier/CancelAxelarProxyContractUpgradeProposal", nil) } -func NewAddManagedCellarIDsProposal(title string, description string, chainID uint64, cellarIds *CellarIDSet) *AddAxelarManagedCellarIDsProposal { +func NewAddAxelarManagedCellarIDsProposal(title string, description string, chainID uint64, cellarIds *CellarIDSet) *AddAxelarManagedCellarIDsProposal { return &AddAxelarManagedCellarIDsProposal{ Title: title, Description: description, @@ -87,20 +87,18 @@ func (m *AddAxelarManagedCellarIDsProposal) ValidateBasic() error { return err } - if len(m.CellarIds.Ids) == 0 { - return fmt.Errorf("can't have an add prosoposal with no cellars") + if err := m.CellarIds.ValidateBasic(); err != nil { + return err } - for _, cellarID := range m.CellarIds.Ids { - if !common.IsHexAddress(cellarID) { - return errorsmod.Wrapf(ErrInvalidEVMAddress, "%s", cellarID) - } + if m.ChainId == 0 { + return fmt.Errorf("chain ID must be non-zero") } return nil } -func NewRemoveManagedCellarIDsProposal(title string, description string, chainID uint64, cellarIds *CellarIDSet) *RemoveAxelarManagedCellarIDsProposal { +func NewRemoveAxelarManagedCellarIDsProposal(title string, description string, chainID uint64, cellarIds *CellarIDSet) *RemoveAxelarManagedCellarIDsProposal { return &RemoveAxelarManagedCellarIDsProposal{ Title: title, Description: description, @@ -122,14 +120,18 @@ func (m *RemoveAxelarManagedCellarIDsProposal) ValidateBasic() error { return err } - if len(m.CellarIds.Ids) == 0 { - return fmt.Errorf("can't have a remove prosoposal with no cellars") + if err := m.CellarIds.ValidateBasic(); err != nil { + return err + } + + if m.ChainId == 0 { + return fmt.Errorf("chain ID must be non-zero") } return nil } -func NewAxelarScheduledCorkProposal(title string, description string, blockHeight uint64, chainID uint64, targetContractAddress string, contractCallProtoJSON string) *AxelarScheduledCorkProposal { +func NewAxelarScheduledCorkProposal(title string, description string, blockHeight uint64, chainID uint64, targetContractAddress string, contractCallProtoJSON string, deadline uint64) *AxelarScheduledCorkProposal { return &AxelarScheduledCorkProposal{ Title: title, Description: description, @@ -137,6 +139,7 @@ func NewAxelarScheduledCorkProposal(title string, description string, blockHeigh ChainId: chainID, TargetContractAddress: targetContractAddress, ContractCallProtoJson: contractCallProtoJSON, + Deadline: deadline, } } @@ -153,6 +156,18 @@ func (m *AxelarScheduledCorkProposal) ValidateBasic() error { return err } + if m.BlockHeight == 0 { + return fmt.Errorf("block height must be non-zero") + } + + if m.ChainId == 0 { + return fmt.Errorf("chain ID must be non-zero") + } + + if !common.IsHexAddress(m.TargetContractAddress) { + return errorsmod.Wrapf(ErrInvalidEVMAddress, "%s", m.TargetContractAddress) + } + if len(m.ContractCallProtoJson) == 0 { return errorsmod.Wrapf(ErrInvalidJSON, "cannot have empty contract call") } @@ -161,8 +176,8 @@ func (m *AxelarScheduledCorkProposal) ValidateBasic() error { return errorsmod.Wrapf(ErrInvalidJSON, "%s", m.ContractCallProtoJson) } - if !common.IsHexAddress(m.TargetContractAddress) { - return errorsmod.Wrapf(ErrInvalidEVMAddress, "%s", m.TargetContractAddress) + if m.Deadline == 0 { + return fmt.Errorf("deadline must be non-zero") } return nil @@ -191,14 +206,18 @@ func (m *AxelarCommunityPoolSpendProposal) ValidateBasic() error { return err } - if m.Amount.Amount.IsZero() { - return ErrValuelessSend - } - if !common.IsHexAddress(m.Recipient) { return errorsmod.Wrapf(ErrInvalidEVMAddress, "%s", m.Recipient) } + if m.ChainId == 0 { + return fmt.Errorf("chain ID must be non-zero") + } + + if !m.Amount.Amount.IsPositive() { + return ErrValuelessSend + } + return nil } @@ -251,6 +270,10 @@ func (m *RemoveChainConfigurationProposal) ValidateBasic() error { return err } + if m.ChainId == 0 { + return fmt.Errorf("chain ID must be non-zero") + } + return nil } @@ -276,6 +299,10 @@ func (m *UpgradeAxelarProxyContractProposal) ValidateBasic() error { return err } + if m.ChainId == 0 { + return fmt.Errorf("chain ID must be non-zero") + } + if !common.IsHexAddress(m.NewProxyAddress) { return errorsmod.Wrapf(ErrInvalidEVMAddress, "%s", m.NewProxyAddress) } @@ -304,5 +331,9 @@ func (m *CancelAxelarProxyContractUpgradeProposal) ValidateBasic() error { return err } + if m.ChainId == 0 { + return fmt.Errorf("chain ID must be non-zero") + } + return nil } diff --git a/x/axelarcork/types/proposal.pb.go b/x/axelarcork/types/proposal.pb.go index 08e78097b..11f98ca9e 100644 --- a/x/axelarcork/types/proposal.pb.go +++ b/x/axelarcork/types/proposal.pb.go @@ -92,13 +92,13 @@ func (m *AddAxelarManagedCellarIDsProposal) GetCellarIds() *CellarIDSet { return nil } -// AddManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands +// AddAxelarManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands type AddAxelarManagedCellarIDsProposalWithDeposit struct { - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - ChainId uint64 `protobuf:"varint,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - CellarIds *CellarIDSet `protobuf:"bytes,4,opt,name=cellar_ids,json=cellarIds,proto3" json:"cellar_ids,omitempty"` - Deposit string `protobuf:"bytes,5,opt,name=deposit,proto3" json:"deposit,omitempty"` + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + ChainId uint64 `protobuf:"varint,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + CellarIds []string `protobuf:"bytes,4,rep,name=cellar_ids,json=cellarIds,proto3" json:"cellar_ids,omitempty"` + Deposit string `protobuf:"bytes,5,opt,name=deposit,proto3" json:"deposit,omitempty"` } func (m *AddAxelarManagedCellarIDsProposalWithDeposit) Reset() { @@ -159,7 +159,7 @@ func (m *AddAxelarManagedCellarIDsProposalWithDeposit) GetChainId() uint64 { return 0 } -func (m *AddAxelarManagedCellarIDsProposalWithDeposit) GetCellarIds() *CellarIDSet { +func (m *AddAxelarManagedCellarIDsProposalWithDeposit) GetCellarIds() []string { if m != nil { return m.CellarIds } @@ -241,13 +241,13 @@ func (m *RemoveAxelarManagedCellarIDsProposal) GetCellarIds() *CellarIDSet { return nil } -// RemoveManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands +// RemoveAxelarManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands type RemoveAxelarManagedCellarIDsProposalWithDeposit struct { - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - ChainId uint64 `protobuf:"varint,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - CellarIds *CellarIDSet `protobuf:"bytes,4,opt,name=cellar_ids,json=cellarIds,proto3" json:"cellar_ids,omitempty"` - Deposit string `protobuf:"bytes,5,opt,name=deposit,proto3" json:"deposit,omitempty"` + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + ChainId uint64 `protobuf:"varint,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + CellarIds []string `protobuf:"bytes,4,rep,name=cellar_ids,json=cellarIds,proto3" json:"cellar_ids,omitempty"` + Deposit string `protobuf:"bytes,5,opt,name=deposit,proto3" json:"deposit,omitempty"` } func (m *RemoveAxelarManagedCellarIDsProposalWithDeposit) Reset() { @@ -308,7 +308,7 @@ func (m *RemoveAxelarManagedCellarIDsProposalWithDeposit) GetChainId() uint64 { return 0 } -func (m *RemoveAxelarManagedCellarIDsProposalWithDeposit) GetCellarIds() *CellarIDSet { +func (m *RemoveAxelarManagedCellarIDsProposalWithDeposit) GetCellarIds() []string { if m != nil { return m.CellarIds } @@ -434,7 +434,7 @@ func (m *AxelarScheduledCorkProposal) GetDeadline() uint64 { return 0 } -// ScheduledCorkProposalWithDeposit is a specific definition for CLI commands +// AxelarScheduledCorkProposalWithDeposit is a specific definition for CLI commands type AxelarScheduledCorkProposalWithDeposit struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` @@ -613,16 +613,15 @@ func (m *AxelarCommunityPoolSpendProposal) GetAmount() types.Coin { return types.Coin{} } -// This format of the community spend Ethereum proposal is specifically for +// This format of the Axelar community spend Ethereum proposal is specifically for // the CLI to allow simple text serialization. type AxelarCommunityPoolSpendProposalForCLI struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" yaml:"title"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty" yaml:"recipient"` ChainId uint64 `protobuf:"varint,4,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" yaml:"chain_id"` - ChainName string `protobuf:"bytes,5,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty" yaml:"chain_name"` - Amount string `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty" yaml:"amount"` - Deposit string `protobuf:"bytes,7,opt,name=deposit,proto3" json:"deposit,omitempty" yaml:"deposit"` + Amount string `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty" yaml:"amount"` + Deposit string `protobuf:"bytes,6,opt,name=deposit,proto3" json:"deposit,omitempty" yaml:"deposit"` } func (m *AxelarCommunityPoolSpendProposalForCLI) Reset() { @@ -1226,65 +1225,64 @@ func init() { func init() { proto.RegisterFile("axelarcork/v1/proposal.proto", fileDescriptor_5ffc5027adef0afd) } var fileDescriptor_5ffc5027adef0afd = []byte{ - // 928 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0xa4, 0x6e, 0x12, 0x8f, 0x53, 0xda, 0x6c, 0x53, 0xd8, 0x86, 0xe2, 0x75, 0x46, 0xa8, - 0x32, 0x50, 0x76, 0x15, 0x17, 0x11, 0xc8, 0x2d, 0xde, 0x0a, 0x11, 0x54, 0x50, 0xb4, 0x11, 0x42, - 0xe2, 0x62, 0x8d, 0x77, 0x86, 0xf5, 0x34, 0xbb, 0x33, 0xab, 0xdd, 0xb5, 0x1b, 0x1f, 0x38, 0xd3, - 0x23, 0x47, 0xc4, 0xc9, 0x82, 0x23, 0x27, 0x24, 0xfe, 0x02, 0x52, 0x8e, 0x39, 0x21, 0xe0, 0x60, - 0xa1, 0xe4, 0xc2, 0xd9, 0xbf, 0x00, 0x79, 0x66, 0xd7, 0x59, 0x37, 0x8d, 0x53, 0x94, 0x5a, 0x90, - 0xde, 0x3c, 0xef, 0x9b, 0xd9, 0xf9, 0xbe, 0xef, 0xbd, 0x99, 0x37, 0x86, 0x77, 0xf0, 0x3e, 0xf5, - 0x71, 0xe4, 0x8a, 0x68, 0xcf, 0xea, 0xae, 0x5b, 0x61, 0x24, 0x42, 0x11, 0x63, 0xdf, 0x0c, 0x23, - 0x91, 0x08, 0xed, 0xda, 0x09, 0x6a, 0x76, 0xd7, 0x57, 0x2b, 0x93, 0x93, 0x73, 0xa0, 0x9c, 0xbe, - 0xba, 0xe2, 0x09, 0x4f, 0xc8, 0x9f, 0xd6, 0xe8, 0x57, 0x1a, 0xad, 0xb8, 0x22, 0x0e, 0x44, 0x6c, - 0xb5, 0x70, 0x4c, 0xad, 0xee, 0x7a, 0x8b, 0x26, 0x78, 0xdd, 0x72, 0x05, 0xe3, 0x0a, 0x47, 0x3f, - 0x03, 0xb8, 0xb6, 0x45, 0xc8, 0x96, 0xfc, 0xda, 0xa7, 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x27, 0x00, 0x00, 0xff, 0xff, 0x9e, 0xe2, 0x07, 0xeb, 0xf5, 0x0d, 0x00, 0x00, + // 909 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0xa4, 0x6e, 0x12, 0x8f, 0x53, 0xda, 0x6e, 0x03, 0x6c, 0x43, 0xeb, 0x75, 0x56, 0xa8, + 0x32, 0x50, 0x76, 0x15, 0x57, 0x22, 0x90, 0x5b, 0xbc, 0x15, 0x22, 0xa8, 0x48, 0x91, 0x23, 0x84, + 0xc4, 0xc5, 0x1a, 0xef, 0x0c, 0xeb, 0x69, 0x76, 0x67, 0x56, 0xb3, 0x63, 0x37, 0x3e, 0x70, 0xef, + 0x91, 0x23, 0xe2, 0x64, 0xc1, 0x91, 0x13, 0x12, 0x27, 0x24, 0x8e, 0x48, 0x39, 0x86, 0x1b, 0xe2, + 0x60, 0xa1, 0xe4, 0xc2, 0xd9, 0x7f, 0x01, 0xf2, 0xcc, 0xda, 0xd9, 0x4d, 0x9a, 0xa4, 0x28, 0xb1, + 0xf8, 0x71, 0xf3, 0xbc, 0x6f, 0x66, 0xdf, 0xf7, 0x7d, 0xfb, 0xe6, 0xbd, 0x35, 0xbc, 0x87, 0xf6, + 0x48, 0x88, 0x84, 0xcf, 0xc5, 0xae, 0xdb, 0x5b, 0x73, 0x63, 0xc1, 0x63, 0x9e, 0xa0, 0xd0, 0x89, + 0x05, 0x97, 0xdc, 0xb8, 0x71, 0x8c, 0x3a, 0xbd, 0xb5, 0x95, 0x4a, 0x7e, 0x73, 0x06, 0x54, 0xdb, + 0x57, 0x96, 0x03, 0x1e, 0x70, 0xf5, 0xd3, 0x1d, 0xff, 0x4a, 0xa3, 0x15, 0x9f, 0x27, 0x11, 0x4f, + 0xdc, 0x36, 0x4a, 0x88, 0xdb, 0x5b, 0x6b, 0x13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af, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x42, 0x4e, 0xb9, 0x87, 0x0d, 0x00, 0x00, } func (m *AddAxelarManagedCellarIDsProposal) Marshal() (dAtA []byte, err error) { @@ -1368,17 +1366,14 @@ func (m *AddAxelarManagedCellarIDsProposalWithDeposit) MarshalToSizedBuffer(dAtA i-- dAtA[i] = 0x2a } - if m.CellarIds != nil { - { - size, err := m.CellarIds.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProposal(dAtA, i, uint64(size)) + if len(m.CellarIds) > 0 { + for iNdEx := len(m.CellarIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.CellarIds[iNdEx]) + copy(dAtA[i:], m.CellarIds[iNdEx]) + i = encodeVarintProposal(dAtA, i, uint64(len(m.CellarIds[iNdEx]))) + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x22 } if m.ChainId != 0 { i = encodeVarintProposal(dAtA, i, uint64(m.ChainId)) @@ -1483,17 +1478,14 @@ func (m *RemoveAxelarManagedCellarIDsProposalWithDeposit) MarshalToSizedBuffer(d i-- dAtA[i] = 0x2a } - if m.CellarIds != nil { - { - size, err := m.CellarIds.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProposal(dAtA, i, uint64(size)) + if len(m.CellarIds) > 0 { + for iNdEx := len(m.CellarIds) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.CellarIds[iNdEx]) + copy(dAtA[i:], m.CellarIds[iNdEx]) + i = encodeVarintProposal(dAtA, i, uint64(len(m.CellarIds[iNdEx]))) + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x22 } if m.ChainId != 0 { i = encodeVarintProposal(dAtA, i, uint64(m.ChainId)) @@ -1740,20 +1732,13 @@ func (m *AxelarCommunityPoolSpendProposalForCLI) MarshalToSizedBuffer(dAtA []byt copy(dAtA[i:], m.Deposit) i = encodeVarintProposal(dAtA, i, uint64(len(m.Deposit))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x32 } if len(m.Amount) > 0 { i -= len(m.Amount) copy(dAtA[i:], m.Amount) i = encodeVarintProposal(dAtA, i, uint64(len(m.Amount))) i-- - dAtA[i] = 0x32 - } - if len(m.ChainName) > 0 { - i -= len(m.ChainName) - copy(dAtA[i:], m.ChainName) - i = encodeVarintProposal(dAtA, i, uint64(len(m.ChainName))) - i-- dAtA[i] = 0x2a } if m.ChainId != 0 { @@ -2229,9 +2214,11 @@ func (m *AddAxelarManagedCellarIDsProposalWithDeposit) Size() (n int) { if m.ChainId != 0 { n += 1 + sovProposal(uint64(m.ChainId)) } - if m.CellarIds != nil { - l = m.CellarIds.Size() - n += 1 + l + sovProposal(uint64(l)) + if len(m.CellarIds) > 0 { + for _, s := range m.CellarIds { + l = len(s) + n += 1 + l + sovProposal(uint64(l)) + } } l = len(m.Deposit) if l > 0 { @@ -2281,9 +2268,11 @@ func (m *RemoveAxelarManagedCellarIDsProposalWithDeposit) Size() (n int) { if m.ChainId != 0 { n += 1 + sovProposal(uint64(m.ChainId)) } - if m.CellarIds != nil { - l = m.CellarIds.Size() - n += 1 + l + sovProposal(uint64(l)) + if len(m.CellarIds) > 0 { + for _, s := range m.CellarIds { + l = len(s) + n += 1 + l + sovProposal(uint64(l)) + } } l = len(m.Deposit) if l > 0 { @@ -2411,10 +2400,6 @@ func (m *AxelarCommunityPoolSpendProposalForCLI) Size() (n int) { if m.ChainId != 0 { n += 1 + sovProposal(uint64(m.ChainId)) } - l = len(m.ChainName) - if l > 0 { - n += 1 + l + sovProposal(uint64(l)) - } l = len(m.Amount) if l > 0 { n += 1 + l + sovProposal(uint64(l)) @@ -2903,7 +2888,7 @@ func (m *AddAxelarManagedCellarIDsProposalWithDeposit) Unmarshal(dAtA []byte) er if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CellarIds", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowProposal @@ -2913,27 +2898,23 @@ func (m *AddAxelarManagedCellarIDsProposalWithDeposit) Unmarshal(dAtA []byte) er } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthProposal } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthProposal } if postIndex > l { return io.ErrUnexpectedEOF } - if m.CellarIds == nil { - m.CellarIds = &CellarIDSet{} - } - if err := m.CellarIds.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.CellarIds = append(m.CellarIds, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 5: if wireType != 2 { @@ -3273,7 +3254,7 @@ func (m *RemoveAxelarManagedCellarIDsProposalWithDeposit) Unmarshal(dAtA []byte) if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CellarIds", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowProposal @@ -3283,27 +3264,23 @@ func (m *RemoveAxelarManagedCellarIDsProposalWithDeposit) Unmarshal(dAtA []byte) } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthProposal } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthProposal } if postIndex > l { return io.ErrUnexpectedEOF } - if m.CellarIds == nil { - m.CellarIds = &CellarIDSet{} - } - if err := m.CellarIds.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.CellarIds = append(m.CellarIds, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 5: if wireType != 2 { @@ -4203,38 +4180,6 @@ func (m *AxelarCommunityPoolSpendProposalForCLI) Unmarshal(dAtA []byte) error { } } case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProposal - } - 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 ErrInvalidLengthProposal - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProposal - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) } @@ -4266,7 +4211,7 @@ func (m *AxelarCommunityPoolSpendProposalForCLI) Unmarshal(dAtA []byte) error { } m.Amount = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) } diff --git a/x/axelarcork/types/proposal_test.go b/x/axelarcork/types/proposal_test.go index dd034ebc3..c2646188a 100644 --- a/x/axelarcork/types/proposal_test.go +++ b/x/axelarcork/types/proposal_test.go @@ -20,8 +20,10 @@ func TestScheduledCorkProposalValidation(t *testing.T) { Title: "Scheduled AxelarCork", Description: "Schedules a cork via governance", BlockHeight: 1, + ChainId: 42161, ContractCallProtoJson: "{\"thing\":1}", TargetContractAddress: "0x0000000000000000000000000000000000000000", + Deadline: 1706225320, }, expPass: true, err: nil, @@ -32,8 +34,10 @@ func TestScheduledCorkProposalValidation(t *testing.T) { Title: "Scheduled AxelarCork", Description: "Schedules a cork via governance", BlockHeight: 1, + ChainId: 42161, ContractCallProtoJson: "{\"thing\":1}", TargetContractAddress: "0x01", + Deadline: 1706225320, }, expPass: false, err: errorsmod.Wrapf(ErrInvalidEVMAddress, "0x01"), @@ -44,8 +48,10 @@ func TestScheduledCorkProposalValidation(t *testing.T) { Title: "Scheduled AxelarCork", Description: "Schedules a cork via governance", BlockHeight: 1, + ChainId: 42161, ContractCallProtoJson: "", TargetContractAddress: "0x0000000000000000000000000000000000000000", + Deadline: 1706225320, }, expPass: false, err: errorsmod.Wrap(ErrInvalidJSON, "cannot have empty contract call"), @@ -56,8 +62,10 @@ func TestScheduledCorkProposalValidation(t *testing.T) { Title: "Scheduled AxelarCork", Description: "Schedules a cork via governance", BlockHeight: 1, + ChainId: 42161, ContractCallProtoJson: "[}", TargetContractAddress: "0x0000000000000000000000000000000000000000", + Deadline: 1706225320, }, expPass: false, err: errorsmod.Wrapf(ErrInvalidJSON, "[}"), diff --git a/x/cork/keeper/genesis.go b/x/cork/keeper/genesis.go index a8d8584df..1adbeb5c3 100644 --- a/x/cork/keeper/genesis.go +++ b/x/cork/keeper/genesis.go @@ -8,7 +8,7 @@ import ( // InitGenesis initialize default parameters // and the keeper's address to pubkey map func InitGenesis(ctx sdk.Context, k Keeper, gs types.GenesisState) { - k.setParams(ctx, gs.Params) + k.SetParams(ctx, gs.Params) // Set the vote period at initialization k.SetCellarIDs(ctx, gs.CellarIds) k.SetLatestInvalidationNonce(ctx, gs.InvalidationNonce) diff --git a/x/cork/keeper/keeper.go b/x/cork/keeper/keeper.go index 9d65b19bf..6058bab02 100644 --- a/x/cork/keeper/keeper.go +++ b/x/cork/keeper/keeper.go @@ -190,7 +190,7 @@ func (k Keeper) GetParamSet(ctx sdk.Context) types.Params { } // setParams sets the parameters in the store -func (k Keeper) setParams(ctx sdk.Context, params types.Params) { +func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { k.paramSpace.SetParamSet(ctx, ¶ms) } diff --git a/x/cork/keeper/keeper_test.go b/x/cork/keeper/keeper_test.go index 3b879ceae..ec42e1208 100644 --- a/x/cork/keeper/keeper_test.go +++ b/x/cork/keeper/keeper_test.go @@ -147,7 +147,7 @@ func (suite *KeeperTestSuite) TestGetWinningVotes() { testHeight := uint64(ctx.BlockHeight()) params := types.DefaultParams() params.VoteThreshold = sdk.ZeroDec() - corkKeeper.setParams(ctx, params) + corkKeeper.SetParams(ctx, params) cork := types.Cork{ EncodedContractCall: []byte("testcall"), TargetContractAddress: sampleCellarHex, @@ -223,6 +223,6 @@ func (suite *KeeperTestSuite) TestParamSet() { require.Panics(func() { corkKeeper.GetParamSet(ctx) }) params := types.DefaultParams() - corkKeeper.setParams(ctx, params) + corkKeeper.SetParams(ctx, params) require.Equal(params, corkKeeper.GetParamSet(ctx)) } diff --git a/x/cork/keeper/migrations.go b/x/cork/keeper/migrations.go new file mode 100644 index 000000000..73ed92149 --- /dev/null +++ b/x/cork/keeper/migrations.go @@ -0,0 +1,21 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + v1 "github.com/peggyjv/sommelier/v7/x/cork/migrations/v1" +) + +// Migrator is a struct for handling in-place store migrations. +type Migrator struct { + keeper Keeper +} + +// NewMigrator returns a new Migrator. +func NewMigrator(keeper Keeper) Migrator { + return Migrator{keeper: keeper} +} + +// Migrate1to2 migrates from consensus version 1 to 2. +func (m Migrator) Migrate1to2(ctx sdk.Context) error { + return v1.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc) +} diff --git a/x/cork/keeper/query_server_test.go b/x/cork/keeper/query_server_test.go index e13b0536f..9b890cea5 100644 --- a/x/cork/keeper/query_server_test.go +++ b/x/cork/keeper/query_server_test.go @@ -12,7 +12,7 @@ func (suite *KeeperTestSuite) TestQueriesHappyPath() { require := suite.Require() params := types.DefaultParams() - corkKeeper.setParams(ctx, params) + corkKeeper.SetParams(ctx, params) testHeight := uint64(ctx.BlockHeight()) cork := types.Cork{ diff --git a/x/cork/keeper/test_common.go b/x/cork/keeper/test_common.go index d05a3edbf..3d27ba7fb 100644 --- a/x/cork/keeper/test_common.go +++ b/x/cork/keeper/test_common.go @@ -382,7 +382,7 @@ func CreateTestEnv(t *testing.T) TestInput { gravityKeeper, ) - k.setParams(ctx, TestingcorkParams) + k.SetParams(ctx, TestingcorkParams) return TestInput{ corkKeeper: k, diff --git a/x/cork/migrations/v1/store.go b/x/cork/migrations/v1/store.go index 39c5e5412..c4de88460 100644 --- a/x/cork/migrations/v1/store.go +++ b/x/cork/migrations/v1/store.go @@ -26,8 +26,6 @@ func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.Binar func removeCommitPeriod(store storetypes.KVStore) { store.Delete([]byte{types.CommitPeriodStartKey}) - - // TODO(bolten): remove commit period param from old state -- in upgrade handler? } // wipe away all existing cork state during upgrade -- there shouldn't be in-transit corks diff --git a/x/cork/module.go b/x/cork/module.go index 003a16c04..0b4c55524 100644 --- a/x/cork/module.go +++ b/x/cork/module.go @@ -3,6 +3,7 @@ package cork import ( "context" "encoding/json" + "fmt" "math/rand" "github.com/cosmos/cosmos-sdk/client" @@ -119,6 +120,11 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.We func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), am.keeper) types.RegisterQueryServer(cfg.QueryServer(), am.keeper) + + m := keeper.NewMigrator(am.keeper) + if err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2); err != nil { + panic(fmt.Sprintf("failed to migrate x/cork from version 1 to 2: %v", err)) + } } // InitGenesis performs genesis initialization for the cork module. diff --git a/x/cork/types/cork.go b/x/cork/types/cork.go index 24c9e3184..f3830dc0d 100644 --- a/x/cork/types/cork.go +++ b/x/cork/types/cork.go @@ -2,8 +2,11 @@ package types import ( "bytes" + "fmt" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" tmbytes "github.com/tendermint/tendermint/libs/bytes" @@ -56,3 +59,49 @@ func (c *Cork) ValidateBasic() error { return nil } + +func (s *ScheduledCork) ValidateBasic() error { + if err := s.Cork.ValidateBasic(); err != nil { + return err + } + + if s.BlockHeight == 0 { + return fmt.Errorf("block height must be non-zero") + } + + if _, err := sdk.ValAddressFromBech32(s.Validator); err != nil { + return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) + } + + if len(s.Id) != 64 { + return fmt.Errorf("invalid ID length, must be a keccak256 hash") + } + + return nil +} + +func (c *CorkResult) ValidateBasic() error { + if err := c.Cork.ValidateBasic(); err != nil { + return err + } + + if c.BlockHeight == 0 { + return fmt.Errorf("block height must be non-zero") + } + + if _, err := sdk.NewDecFromStr(c.ApprovalPercentage); err != nil { + return fmt.Errorf("approval percentage must be a valid Dec") + } + + return nil +} + +func (c *CellarIDSet) ValidateBasic() error { + for _, addr := range c.Ids { + if !common.IsHexAddress(addr) { + return fmt.Errorf("invalid EVM address: %s", addr) + } + } + + return nil +} diff --git a/x/cork/types/genesis.go b/x/cork/types/genesis.go index 67ed2d2e5..947238879 100644 --- a/x/cork/types/genesis.go +++ b/x/cork/types/genesis.go @@ -5,7 +5,11 @@ const DefaultParamspace = ModuleName // DefaultGenesisState get raw genesis raw message for testing func DefaultGenesisState() GenesisState { return GenesisState{ - Params: DefaultParams(), + Params: DefaultParams(), + CellarIds: CellarIDSet{}, + InvalidationNonce: 0, + ScheduledCorks: []*ScheduledCork{}, + CorkResults: []*CorkResult{}, } } @@ -15,5 +19,21 @@ func (gs GenesisState) Validate() error { return err } + if err := gs.CellarIds.ValidateBasic(); err != nil { + return err + } + + for _, scheduledCork := range gs.ScheduledCorks { + if err := scheduledCork.ValidateBasic(); err != nil { + return err + } + } + + for _, corkResult := range gs.CorkResults { + if err := corkResult.ValidateBasic(); err != nil { + return err + } + } + return nil } diff --git a/x/cork/types/keys.go b/x/cork/types/keys.go index af43ae5ec..fd891e714 100644 --- a/x/cork/types/keys.go +++ b/x/cork/types/keys.go @@ -29,7 +29,7 @@ const ( CorkForAddressKeyPrefix // key for corks // CommitPeriodStartKey - -> int64(height) - CommitPeriodStartKey // key for commit period height start + CommitPeriodStartKey // key for commit period height start -- removed as of cork v2, left to preserve ID values // LatestInvalidationNonceKey - -> uint64(latestNonce) LatestInvalidationNonceKey diff --git a/x/pubsub/types/keys.go b/x/pubsub/types/keys.go index fdc07b072..e7b93f67f 100644 --- a/x/pubsub/types/keys.go +++ b/x/pubsub/types/keys.go @@ -20,39 +20,37 @@ const ( QuerierRoute = ModuleName ) -// note that we are using "|" as a delimiter for variable length keys as it's not a valid character for either... -// it's not strictly necessary for e.g. the SubscriberKeyPrefix since all the fields are fixed, but keeping them all -// consistent makes it easier to read and reason about +// variable length string fields being stored under these keys are hashed to provide a fixed size key const ( _ = byte(iota) - // PublisherPrefix - | -> Publisher + // PublisherPrefix - | -> Publisher PublisherKeyPrefix - // SubscriberPrefix - | -> Subscriber + // SubscriberPrefix - | -> Subscriber SubscriberKeyPrefix - // PublisherIntentByPublisherDomainKeyPrefix - || -> PublisherIntent + // PublisherIntentByPublisherDomainKeyPrefix - || -> PublisherIntent PublisherIntentByPublisherDomainKeyPrefix - // PublisherIntentBySubscriptionIDKeyPrefix - || -> PublisherIntent + // PublisherIntentBySubscriptionIDKeyPrefix - || -> PublisherIntent PublisherIntentBySubscriptionIDKeyPrefix - // SubscriberIntentBySubscriberAddressKeyPrefix - || -> SubscriberIntent + // SubscriberIntentBySubscriberAddressKeyPrefix - || -> SubscriberIntent SubscriberIntentBySubscriberAddressKeyPrefix - // SubscriberIntentBySubscriptionIDKeyPrefix - || -> SubscriberIntent + // SubscriberIntentBySubscriptionIDKeyPrefix - || -> SubscriberIntent SubscriberIntentBySubscriptionIDKeyPrefix - // SubscriberIntentByPublisherDomainKeyPrefix - ||| -> SubscriberIntent + // SubscriberIntentByPublisherDomainKeyPrefix - ||| -> SubscriberIntent SubscriberIntentByPublisherDomainKeyPrefix - // DefaultSubscriptionKeyPrefix - | -> DefaultSubscription + // DefaultSubscriptionKeyPrefix - | -> DefaultSubscription DefaultSubscriptionKeyPrefix ) func delimiter() []byte { - return []byte("|") + return []byte{} } // GetPublishersPrefix returns a prefix for iterating all Publishers @@ -62,7 +60,7 @@ func GetPublishersPrefix() []byte { // GetPublisherKey returns the key for a Publisher func GetPublisherKey(publisherDomain string) []byte { - return bytes.Join([][]byte{{PublisherKeyPrefix}, []byte(publisherDomain)}, delimiter()) + return bytes.Join([][]byte{{PublisherKeyPrefix}, StringHash(publisherDomain)}, delimiter()) } // GetSubscribersPrefix returns a prefix for iterating all Subscribers @@ -83,24 +81,24 @@ func GetPublisherIntentsPrefix() []byte { // GetPublisherIntentsByPublisherDomainPrefix returns a prefix for all PublisherIntents indexed by publisher domain func GetPublisherIntentsByPublisherDomainPrefix(publisherDomain string) []byte { - key := bytes.Join([][]byte{{PublisherIntentByPublisherDomainKeyPrefix}, []byte(publisherDomain)}, delimiter()) + key := bytes.Join([][]byte{{PublisherIntentByPublisherDomainKeyPrefix}, StringHash(publisherDomain)}, delimiter()) return append(key, delimiter()...) } // GetPublisherIntentsBySubscriptionIDPrefix returns a prefix for all PublisherIntents indexed by subscription ID func GetPublisherIntentsBySubscriptionIDPrefix(subscriptionID string) []byte { - key := bytes.Join([][]byte{{PublisherIntentBySubscriptionIDKeyPrefix}, []byte(subscriptionID)}, delimiter()) + key := bytes.Join([][]byte{{PublisherIntentBySubscriptionIDKeyPrefix}, StringHash(subscriptionID)}, delimiter()) return append(key, delimiter()...) } // GetPublisherIntentByPublisherDomainKey returns the key for a PublisherIntent indexed by domain func GetPublisherIntentByPublisherDomainKey(publisherDomain string, subscriptionID string) []byte { - return bytes.Join([][]byte{{PublisherIntentByPublisherDomainKeyPrefix}, []byte(publisherDomain), []byte(subscriptionID)}, delimiter()) + return bytes.Join([][]byte{{PublisherIntentByPublisherDomainKeyPrefix}, StringHash(publisherDomain), StringHash(subscriptionID)}, delimiter()) } // GetPublisherIntentBySubscriptionIDKey returns the key for a PublisherIntent indexed by subscription ID func GetPublisherIntentBySubscriptionIDKey(subsciptionID string, publisherDomain string) []byte { - key := bytes.Join([][]byte{{PublisherIntentBySubscriptionIDKeyPrefix}, []byte(subsciptionID), []byte(publisherDomain)}, delimiter()) + key := bytes.Join([][]byte{{PublisherIntentBySubscriptionIDKeyPrefix}, StringHash(subsciptionID), StringHash(publisherDomain)}, delimiter()) return append(key, delimiter()...) } @@ -118,29 +116,29 @@ func GetSubscriberIntentsBySubscriberAddressPrefix(subscriberAddress sdk.AccAddr // GetSubscriberIntentsBySubscriptionIDPrefix returns a prefix for all SubscriberIntents indexed by subscription ID func GetSubscriberIntentsBySubscriptionIDPrefix(subscriptionID string) []byte { - key := bytes.Join([][]byte{{SubscriberIntentBySubscriptionIDKeyPrefix}, []byte(subscriptionID)}, delimiter()) + key := bytes.Join([][]byte{{SubscriberIntentBySubscriptionIDKeyPrefix}, StringHash(subscriptionID)}, delimiter()) return append(key, delimiter()...) } // GetSubscriberIntentsByPublisherDomainPrefix returns a prefix for all SubscriberIntents indexed by publisher domain func GetSubscriberIntentsByPublisherDomainPrefix(publisherDomain string) []byte { - key := bytes.Join([][]byte{{SubscriberIntentByPublisherDomainKeyPrefix}, []byte(publisherDomain)}, delimiter()) + key := bytes.Join([][]byte{{SubscriberIntentByPublisherDomainKeyPrefix}, StringHash(publisherDomain)}, delimiter()) return append(key, delimiter()...) } // GetSubscriberIntentBySubscriberAddressKey returns the key for a SubscriberIntent indexed by address func GetSubscriberIntentBySubscriberAddressKey(subscriberAddress sdk.AccAddress, subscriptionID string) []byte { - return bytes.Join([][]byte{{SubscriberIntentBySubscriberAddressKeyPrefix}, subscriberAddress.Bytes(), []byte(subscriptionID)}, delimiter()) + return bytes.Join([][]byte{{SubscriberIntentBySubscriberAddressKeyPrefix}, subscriberAddress.Bytes(), StringHash(subscriptionID)}, delimiter()) } // GetSubscriberIntentBySubscriptionIDKey returns the key for a SubscriberIntent indexed by subscription ID func GetSubscriberIntentBySubscriptionIDKey(subscriptionID string, subscriberAddress sdk.AccAddress) []byte { - return bytes.Join([][]byte{{SubscriberIntentBySubscriptionIDKeyPrefix}, []byte(subscriptionID), subscriberAddress.Bytes()}, delimiter()) + return bytes.Join([][]byte{{SubscriberIntentBySubscriptionIDKeyPrefix}, StringHash(subscriptionID), subscriberAddress.Bytes()}, delimiter()) } // GetSubscriberIntentByPublisherDomainKey returns the key for a SubscriberIntent indexed by publisher domain func GetSubscriberIntentByPublisherDomainKey(publisherDomain string, subscriberAddress sdk.AccAddress, subscriptionID string) []byte { - return bytes.Join([][]byte{{SubscriberIntentByPublisherDomainKeyPrefix}, []byte(publisherDomain), subscriberAddress.Bytes(), []byte(subscriptionID)}, delimiter()) + return bytes.Join([][]byte{{SubscriberIntentByPublisherDomainKeyPrefix}, StringHash(publisherDomain), subscriberAddress.Bytes(), StringHash(subscriptionID)}, delimiter()) } // GetDefaultSubscriptionPrefix returns a prefix for iterating all DefaultSubscripions @@ -150,5 +148,5 @@ func GetDefaultSubscriptionPrefix() []byte { // GetDefaultSubscriptionKey returns the key for a DefaultSubscription func GetDefaultSubscriptionKey(subsciptionID string) []byte { - return bytes.Join([][]byte{{DefaultSubscriptionKeyPrefix}, []byte(subsciptionID)}, delimiter()) + return bytes.Join([][]byte{{DefaultSubscriptionKeyPrefix}, StringHash(subsciptionID)}, delimiter()) } diff --git a/x/pubsub/types/pubsub.go b/x/pubsub/types/pubsub.go index 8b1ad4a59..bec90f87f 100644 --- a/x/pubsub/types/pubsub.go +++ b/x/pubsub/types/pubsub.go @@ -5,11 +5,11 @@ import ( "encoding/pem" "fmt" "net/url" - "strings" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/ethereum/go-ethereum/crypto" ) const ( @@ -20,6 +20,10 @@ const ( MaxAllowedSubscribers = 256 ) +func StringHash(inputString string) []byte { + return crypto.Keccak256Hash([]byte(inputString)).Bytes() +} + /////////////////// // ValidateBasic // /////////////////// @@ -221,10 +225,5 @@ func ValidateSubscriptionID(subscriptionID string) error { return fmt.Errorf("subscription ID over max length of %d: %d", MaxSubscriptionIDLength, len(subscriptionID)) } - // TODO(bolten): any other character limitations we should add here? - if strings.Contains(subscriptionID, "|") { - return fmt.Errorf("subscription IDs may not contain the pipe character '|'") - } - return nil } From 34bf4246db57270338479c80ba12c50949ca805b Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Sat, 27 Jan 2024 19:52:07 -0800 Subject: [PATCH 02/32] Chardonnay RC1 (#256) * Add Axelar fees for community pool token transfers * Fix up more validations * increase token price validity length by default * Update polkachu server CA * Add upcoming cellar publisher intents * Update cork migration and key types * Create/remove default subscriptions for cellars * Allow subscribers to update their CA/URL * Remove comment * regenerate rust protos * appease linter * Set min auction height, current block for prices * Appease linter * fix prost_build for Axelar props --- app/app.go | 13 +- app/upgrades/v7/constants.go | 30 ++- app/upgrades/v7/upgrades.go | 49 +--- integration_tests/axelarcork_test.go | 21 +- integration_tests/pubsub_test.go | 33 ++- integration_tests/scheduled_cork_test.go | 74 ++++++ integration_tests/setup_test.go | 33 ++- prost_build/src/main.rs | 1 + proto/axelarcork/v1/axelarcork.proto | 12 +- proto/axelarcork/v1/proposal.proto | 20 +- proto/cork/v2/proposal.proto | 4 +- somm_proto/src/prost/auction.v1.rs | 2 + somm_proto/src/prost/axelarcork.v1.rs | 37 +-- somm_proto/src/prost/cellarfees.v1.rs | 3 + somm_proto/src/prost/cork.v2.rs | 6 + x/auction/types/auction.go | 8 +- x/auction/types/msgs.go | 10 +- x/auction/types/params.go | 4 +- x/axelarcork/client/cli/tx.go | 19 +- x/axelarcork/client/cli/tx_test.go | 13 +- x/axelarcork/keeper/abci.go | 5 +- x/axelarcork/keeper/genesis.go | 2 +- x/axelarcork/keeper/keeper.go | 4 +- x/axelarcork/keeper/keeper_test.go | 4 + x/axelarcork/keeper/proposal_handler.go | 64 +++-- x/axelarcork/keeper/query_server.go | 6 +- x/axelarcork/keeper/setup_unit_test.go | 2 + .../tests/mocks/expected_keepers_mocks.go | 63 +++++ x/axelarcork/tests/setup.go | 5 +- x/axelarcork/types/axelarcork.pb.go | 158 ++++++++---- x/axelarcork/types/chain_config.go | 4 + x/axelarcork/types/expected_keepers.go | 7 + x/axelarcork/types/msgs.go | 10 +- x/axelarcork/types/proposal.go | 18 +- x/axelarcork/types/proposal.pb.go | 236 +++++++++++++----- x/cork/client/cli/tx.go | 10 +- x/cork/client/cli/tx_test.go | 2 + x/cork/keeper/genesis.go | 2 +- x/cork/keeper/keeper.go | 4 +- x/cork/keeper/keeper_test.go | 3 + x/cork/keeper/migrations.go | 4 + x/cork/keeper/proposal_handler.go | 37 ++- x/cork/keeper/query_server.go | 2 +- x/cork/keeper/setup_unit_test.go | 4 + x/cork/keeper/test_common.go | 12 + x/cork/migrations/v1/store.go | 37 ++- x/cork/mock/mocks.go | 71 +++++- x/cork/testutil/expected_keepers_mocks.go | 71 +++++- x/cork/types/expected_keepers.go | 15 +- x/cork/types/keys.go | 12 +- x/cork/types/msgs.go | 6 + x/cork/types/proposal.go | 18 +- x/cork/types/proposal.pb.go | 193 ++++++++++---- x/incentives/types/params.go | 4 +- x/pubsub/keeper/msg_server.go | 5 - 55 files changed, 1129 insertions(+), 363 deletions(-) diff --git a/app/app.go b/app/app.go index 54b12d1ae..69739aadc 100644 --- a/app/app.go +++ b/app/app.go @@ -446,6 +446,11 @@ func NewSommelierApp( app.ModuleAccountAddressesToNames([]string{distrtypes.ModuleName}), ) + app.PubsubKeeper = pubsubkeeper.NewKeeper( + appCodec, keys[pubsubtypes.StoreKey], app.GetSubspace(pubsubtypes.ModuleName), + app.StakingKeeper, app.GravityKeeper, + ) + // create axelar cork keeper app.AxelarCorkKeeper = axelarcorkkeeper.NewKeeper( appCodec, @@ -458,11 +463,12 @@ func NewSommelierApp( app.DistrKeeper, app.IBCKeeper.ChannelKeeper, app.GravityKeeper, + app.PubsubKeeper, ) app.CorkKeeper = corkkeeper.NewKeeper( appCodec, keys[corktypes.StoreKey], app.GetSubspace(corktypes.ModuleName), - app.StakingKeeper, app.GravityKeeper, + app.StakingKeeper, app.GravityKeeper, app.PubsubKeeper, ) app.AuctionKeeper = auctionkeeper.NewKeeper( @@ -480,11 +486,6 @@ func NewSommelierApp( appCodec, keys[incentivestypes.StoreKey], app.GetSubspace(incentivestypes.ModuleName), app.DistrKeeper, app.BankKeeper, app.MintKeeper, ) - app.PubsubKeeper = pubsubkeeper.NewKeeper( - appCodec, keys[pubsubtypes.StoreKey], app.GetSubspace(pubsubtypes.ModuleName), - app.StakingKeeper, app.GravityKeeper, - ) - app.IncentivesKeeper = incentiveskeeper.NewKeeper( appCodec, keys[incentivestypes.StoreKey], app.GetSubspace(incentivestypes.ModuleName), app.DistrKeeper, app.BankKeeper, app.MintKeeper, ) diff --git a/app/upgrades/v7/constants.go b/app/upgrades/v7/constants.go index 4ae9b740d..839e226f1 100644 --- a/app/upgrades/v7/constants.go +++ b/app/upgrades/v7/constants.go @@ -156,22 +156,20 @@ rPbOti9Ui2zE+3/p ` const PolkachuSubscriberCA = `-----BEGIN CERTIFICATE----- -MIIC4DCCAmagAwIBAgIUHcEDyHKLg7DxRlcJOGbExDRn99YwCgYIKoZIzj0EAwMw -gaYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJ -bnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxHTAbBgNVBAsMFHN0ZXdhcmQucG9sa2Fj -aHUuY29tMR0wGwYDVQQDDBRzdGV3YXJkLnBvbGthY2h1LmNvbTEhMB8GCSqGSIb3 -DQEJARYSaGVsbG9AcG9sa2FjaHUuY29tMB4XDTIyMDYyMDAyMjYzOFoXDTI0MDYx -OTAyMjYzOFowgaYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw -HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxHTAbBgNVBAsMFHN0ZXdh -cmQucG9sa2FjaHUuY29tMR0wGwYDVQQDDBRzdGV3YXJkLnBvbGthY2h1LmNvbTE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+sa0X8EEgr82Jo1MwUTAdBgNVHQ4EFgQUiuCVeV2AHe3f9sCDgGXST2JAfBUwHwYD +VR0jBBgwFoAUiuCVeV2AHe3f9sCDgGXST2JAfBUwDwYDVR0TAQH/BAUwAwEB/zAK +BggqhkjOPQQDAwNoADBlAjEA3YjIip0Luzdnc+A9S4JiBLakwNyPfmDC7oOFNxkl +EPENxqSAqOTeTe6Gvko8TjF1AjBeqmzxSIiVWB97/Egc8C+YqUBvR3nqjwwiqONH +UIAu+Y1qDZtBnFJ4SEIl69ttA5w= -----END CERTIFICATE----- ` diff --git a/app/upgrades/v7/upgrades.go b/app/upgrades/v7/upgrades.go index 53642b3e6..ed8f04087 100644 --- a/app/upgrades/v7/upgrades.go +++ b/app/upgrades/v7/upgrades.go @@ -76,13 +76,14 @@ func CreateUpgradeHandler( func auctionInitGenesis(ctx sdk.Context, auctionKeeper auctionkeeper.Keeper) { genesisState := auctiontypes.DefaultGenesisState() + genesisState.Params.MinimumAuctionHeight = 13020000 // roughly 2024-02-08 09:30 UTC + usomm52WeekLow := sdk.MustNewDecFromStr("0.079151") eth52WeekHigh := sdk.MustNewDecFromStr("2618.33") btc52WeekHigh := sdk.MustNewDecFromStr("46936.19") oneDollar := sdk.MustNewDecFromStr("1.0") - // Setting this to a block on 1/25/24 -- just means token price will get stale 6 days faster post-upgrade - var lastUpdatedBlock uint64 = 12817014 + lastUpdatedBlock := uint64(ctx.BlockHeight()) usommPrice := auctiontypes.TokenPrice{ Denom: "usomm", @@ -164,37 +165,22 @@ func axelarcorkInitGenesis(ctx sdk.Context, axelarcorkKeeper axelarcorkkeeper.Ke genesisState.Params.ExecutorAccount = "axelar1aythygn6z5thymj6tmzfwekzh05ewg3l7d6y89" genesisState.Params.CorkTimeoutBlocks = 5000 + // pure token transfers have a fixed fee deducted from the amount sent in the ICS-20 message depending + // on the asset and destination chain + // they can be calculated here: https://docs.axelar.dev/resources/mainnet#cross-chain-relayer-gas-fee genesisState.ChainConfigurations = axelarcorktypes.ChainConfigurations{ Configurations: []*axelarcorktypes.ChainConfiguration{ { Name: "arbitrum", Id: 42161, ProxyAddress: "0xEe75bA2C81C04DcA4b0ED6d1B7077c188FEde4d2", + BridgeFees: sdk.NewCoins(sdk.NewCoin("usomm", sdk.NewIntFromUint64(33670000))), }, { Name: "Avalanche", Id: 43114, ProxyAddress: "0xEe75bA2C81C04DcA4b0ED6d1B7077c188FEde4d2", - }, - { - Name: "base", - Id: 8453, - ProxyAddress: "0xEe75bA2C81C04DcA4b0ED6d1B7077c188FEde4d2", - }, - { - Name: "binance", - Id: 56, - ProxyAddress: "0xEe75bA2C81C04DcA4b0ED6d1B7077c188FEde4d2", - }, - { - Name: "optimism", - Id: 10, - ProxyAddress: "0xEe75bA2C81C04DcA4b0ED6d1B7077c188FEde4d2", - }, - { - Name: "Polygon", - Id: 137, - ProxyAddress: "0xEe75bA2C81C04DcA4b0ED6d1B7077c188FEde4d2", + BridgeFees: sdk.NewCoins(sdk.NewCoin("usomm", sdk.NewIntFromUint64(10670000))), }, }, } @@ -208,22 +194,6 @@ func axelarcorkInitGenesis(ctx sdk.Context, axelarcorkKeeper axelarcorkkeeper.Ke ChainId: 43114, // Avalanche Ids: []string{}, }, - { - ChainId: 8453, // base - Ids: []string{}, - }, - { - ChainId: 56, // binance - Ids: []string{}, - }, - { - ChainId: 10, // optimism - Ids: []string{}, - }, - { - ChainId: 137, // Polygon - Ids: []string{}, - }, } if err := genesisState.Validate(); err != nil { @@ -254,6 +224,7 @@ func pubsubInitGenesis(ctx sdk.Context, pubsubKeeper pubsubkeeper.Keeper) { "1:0x6b7f87279982d919Bbf85182DDeAB179B366D8f2", // ETH-BTC Trend "1:0x6E2dAc3b9E9ADc0CbbaE2D0B9Fd81952a8D33872", // ETH-BTC Momentum "1:0xDBe19d1c3F21b1bB250ca7BDaE0687A97B5f77e6", // Fraximal + "1:0xcf4B531b4Cde95BD35d71926e09B2b54c564F5b6", // Max Morpho ETH "1:0xC7b69E15D86C5c1581dacce3caCaF5b68cd6596F", // Real Yield 1INCH "1:0x0274a704a6D9129F90A62dDC6f6024b33EcDad36", // Real Yield BTC "1:0x18ea937aba6053bC232d9Ae2C42abE7a8a2Be440", // Real Yield ENS @@ -266,12 +237,14 @@ func pubsubInitGenesis(ctx sdk.Context, pubsubKeeper pubsubkeeper.Keeper) { "1:0x4986fD36b6b16f49b43282Ee2e24C5cF90ed166d", // Steady BTC "1:0x05641a27C82799AaF22b436F20A3110410f29652", // Steady MATIC "1:0x6F069F711281618467dAe7873541EcC082761B33", // Steady UNI + "1:0x6a6731f1754e3088ea35c8ddfd55cFF4d0FA5052", // Turbo CRVUSD "1:0x9a7b4980C6F0FCaa50CD5f288Ad7038f434c692e", // Turbo EETH "1:0x0C190DEd9Be5f512Bd72827bdaD4003e9Cc7975C", // Turbo GHO "1:0x5195222f69c5821f8095ec565E71e18aB6A2298f", // Turbo SOMM "1:0xc7372Ab5dd315606dB799246E8aA112405abAeFf", // Turbo stETH (stETH deposit) "1:0xfd6db5011b171B05E1Ea3b92f9EAcaEEb055e971", // Turbo stETH (WETH deposit) "1:0xd33dAd974b938744dAC81fE00ac67cb5AA13958E", // Turbo swETH + "1:0x991Fc0B9f027A80E2d642Eb260a41FfC14b2f450", // Yield Maxi USD "42161:0x438087f7c226A89762a791F187d7c3D4a0e95ae6", // Arbitrum test cellar } diff --git a/integration_tests/axelarcork_test.go b/integration_tests/axelarcork_test.go index 4134a668b..4cc681fa4 100644 --- a/integration_tests/axelarcork_test.go +++ b/integration_tests/axelarcork_test.go @@ -3,6 +3,7 @@ package integration_tests import ( "context" "encoding/hex" + "fmt" "sort" "time" @@ -13,6 +14,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/golang/protobuf/proto" //nolint:staticcheck "github.com/peggyjv/sommelier/v7/x/axelarcork/types" + pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" ) func (s *IntegrationTestSuite) TestAxelarCork() { @@ -43,6 +45,7 @@ func (s *IntegrationTestSuite) TestAxelarCork() { sort.Strings(sortedValidators) axelarcorkQueryClient := types.NewQueryClient(val0ClientCtx) + pubsubQueryClient := pubsubtypes.NewQueryClient(orch0ClientCtx) govQueryClient := govtypesv1beta1.NewQueryClient(orch0ClientCtx) ///////////////////////////// @@ -52,6 +55,7 @@ func (s *IntegrationTestSuite) TestAxelarCork() { arbitrumChainName := "arbitrum" arbitrumChainID := uint64(42161) proxyAddress := "0xEe75bA2C81C04DcA4b0ED6d1B7077c188FEde4d2" + bridgeFees := sdk.NewCoins(sdk.NewCoin("usomm", sdk.NewIntFromUint64(33670000))) s.T().Log("Creating AddChainConfigurationProposal") addChainConfigurationProp := types.AddChainConfigurationProposal{ @@ -61,6 +65,7 @@ func (s *IntegrationTestSuite) TestAxelarCork() { Name: arbitrumChainName, Id: arbitrumChainID, ProxyAddress: proxyAddress, + BridgeFees: bridgeFees, }, } @@ -87,6 +92,7 @@ func (s *IntegrationTestSuite) TestAxelarCork() { s.Require().Equal(chainConfig.Name, arbitrumChainName) s.Require().Equal(chainConfig.Id, arbitrumChainID) s.Require().Equal(chainConfig.ProxyAddress, proxyAddress) + s.Require().Equal(chainConfig.BridgeFees, bridgeFees) ////////////////// // Add a cellar // @@ -103,6 +109,7 @@ func (s *IntegrationTestSuite) TestAxelarCork() { counterContract.Hex(), }, }, + PublisherDomain: "example.com", } addAxelarManagedCellarIDsPropMsg, err := govtypesv1beta1.NewMsgSubmitProposal( @@ -126,6 +133,13 @@ func (s *IntegrationTestSuite) TestAxelarCork() { s.Require().Len(cellarIDsResponse.CellarIds, 1) s.Require().Equal(cellarIDsResponse.CellarIds[0], counterContract.Hex()) + s.T().Log("Verifying default subscription created") + subscriptionID := fmt.Sprintf("%d:%s", arbitrumChainID, counterContract.String()) + pubsubResponse, err := pubsubQueryClient.QueryDefaultSubscription(context.Background(), &pubsubtypes.QueryDefaultSubscriptionRequest{SubscriptionId: subscriptionID}) + s.Require().NoError(err) + s.Require().Equal(pubsubResponse.DefaultSubscription.SubscriptionId, subscriptionID) + s.Require().Equal(pubsubResponse.DefaultSubscription.PublisherDomain, "example.com") + ///////////////////////////// // Schedule an Axelar cork // ///////////////////////////// @@ -403,11 +417,16 @@ func (s *IntegrationTestSuite) TestAxelarCork() { s.submitAndVoteForAxelarProposal(proposerCtx, orch0ClientCtx, propID, removeAxelarManagedCellarIDsPropMsg) propID++ - s.T().Log("Verifying CellarID correctly added") + s.T().Log("Verifying CellarID correctly removed") cellarIDsResponse, err = axelarcorkQueryClient.QueryCellarIDsByChainID(context.Background(), &types.QueryCellarIDsByChainIDRequest{ChainId: arbitrumChainID}) s.Require().NoError(err) s.Require().Empty(cellarIDsResponse.CellarIds) + s.T().Log("Verifying default subscription removed") + subscriptionID = fmt.Sprintf("%d:%s", arbitrumChainID, counterContract.String()) + _, err = pubsubQueryClient.QueryDefaultSubscription(context.Background(), &pubsubtypes.QueryDefaultSubscriptionRequest{SubscriptionId: subscriptionID}) + s.Require().Error(err) + ////////////////////////////////// // Remove a chain configuration // ////////////////////////////////// diff --git a/integration_tests/pubsub_test.go b/integration_tests/pubsub_test.go index 902b30e79..49d0e2e95 100644 --- a/integration_tests/pubsub_test.go +++ b/integration_tests/pubsub_test.go @@ -35,6 +35,21 @@ func (s *IntegrationTestSuite) TestPubsub() { pubsubQueryClient := types.NewQueryClient(val0ClientCtx) + // Removing the default publisher from the genesis state because it's useful for other tests but annoying for this one + s.T().Log("Creating RemovePublisher message") + removePublisherMsg := types.MsgRemovePublisherRequest{ + PublisherDomain: "example.com", + Signer: proposer.address().String(), + } + + _, err = s.chain.sendMsgs(*proposerCtx, &removePublisherMsg) + s.Require().NoError(err) + s.T().Log("RemovePublisher submitted correctly") + + publishersResponse, err := pubsubQueryClient.QueryPublishers(context.Background(), &types.QueryPublishersRequest{}) + s.Require().NoError(err) + s.Require().Len(publishersResponse.Publishers, 0) + //////////////// // Happy path // //////////////// @@ -44,9 +59,9 @@ func (s *IntegrationTestSuite) TestPubsub() { addPublisherProp := types.AddPublisherProposal{ Title: "add a publisher", Description: "example publisher", - Domain: "example.com", + Domain: "new.example.com", Address: proposer.address().String(), - ProofUrl: fmt.Sprintf("https://example.com/%s/cacert.pem", proposer.address().String()), + ProofUrl: fmt.Sprintf("https://new.example.com/%s/cacert.pem", proposer.address().String()), CaCert: PublisherCACert, } @@ -66,13 +81,13 @@ func (s *IntegrationTestSuite) TestPubsub() { propID++ s.T().Log("Verifying Publisher correctly added") - publishersResponse, err := pubsubQueryClient.QueryPublishers(context.Background(), &types.QueryPublishersRequest{}) + publishersResponse, err = pubsubQueryClient.QueryPublishers(context.Background(), &types.QueryPublishersRequest{}) s.Require().NoError(err) s.Require().Len(publishersResponse.Publishers, 1) publisher := publishersResponse.Publishers[0] s.Require().Equal(publisher.Address, proposer.address().String()) s.Require().Equal(publisher.CaCert, PublisherCACert) - s.Require().Equal(publisher.Domain, "example.com") + s.Require().Equal(publisher.Domain, "new.example.com") // set publisher intent for cellar s.T().Log("Submitting AddPublisherIntent") @@ -135,7 +150,7 @@ func (s *IntegrationTestSuite) TestPubsub() { // create subscribers s.T().Log("Creating Subscriber for two orchestrators") - subscriber0PushURL := "https://steward.orch0.example.com:5734" + subscriber0PushURL := "https://steward.orch0.new.example.com:5734" addSubscriber0Msg := types.MsgAddSubscriberRequest{ Subscriber: &types.Subscriber{ Address: orch0.address().String(), @@ -145,7 +160,7 @@ func (s *IntegrationTestSuite) TestPubsub() { Signer: orch0.address().String(), } - subscriber1PushURL := "https://steward.orch1.example.com:5734" + subscriber1PushURL := "https://steward.orch1.new.example.com:5734" addSubscriber1Msg := types.MsgAddSubscriberRequest{ Subscriber: &types.Subscriber{ Address: orch1.address().String(), @@ -343,7 +358,7 @@ func (s *IntegrationTestSuite) TestPubsub() { removePublisherProp := types.RemovePublisherProposal{ Title: "remove a publisher", Description: "example publisher is being removed", - Domain: "example.com", + Domain: "new.example.com", } removePublisherPropMsg, err := govtypesv1beta1.NewMsgSubmitProposal( @@ -385,7 +400,7 @@ func (s *IntegrationTestSuite) TestPubsub() { publisher = publishersResponse.Publishers[0] s.Require().Equal(publisher.Address, proposer.address().String()) s.Require().Equal(publisher.CaCert, PublisherCACert) - s.Require().Equal(publisher.Domain, "example.com") + s.Require().Equal(publisher.Domain, "new.example.com") // set publisher intent for cellar _, err = s.chain.sendMsgs(*proposerCtx, &addPublisherIntentMsg) @@ -498,7 +513,7 @@ func (s *IntegrationTestSuite) TestPubsub() { // we will also use the self-deletion message here rather than a gov prop s.T().Log("Creating RemovePublisher message") - removePublisherMsg := types.MsgRemovePublisherRequest{ + removePublisherMsg = types.MsgRemovePublisherRequest{ PublisherDomain: publisher.Domain, Signer: proposer.address().String(), } diff --git a/integration_tests/scheduled_cork_test.go b/integration_tests/scheduled_cork_test.go index ed2d2fb15..452b79f0b 100644 --- a/integration_tests/scheduled_cork_test.go +++ b/integration_tests/scheduled_cork_test.go @@ -17,6 +17,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient" gbtypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" "github.com/peggyjv/sommelier/v7/x/cork/types" + pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" ) func (s *IntegrationTestSuite) TestScheduledCork() { @@ -28,6 +29,7 @@ func (s *IntegrationTestSuite) TestScheduledCork() { invalidProposal := types.ScheduledCorkProposal{ Title: "invalid proposal", Description: "proposal for cellar ID that doesn't exist", + BlockHeight: 100, TargetContractAddress: "0x0000000000000000000000000000000000000000", ContractCallProtoJson: "{\"thing\": 1}", } @@ -82,6 +84,7 @@ func (s *IntegrationTestSuite) TestScheduledCork() { CellarIds: &types.CellarIDSet{ Ids: []string{counterContract.Hex()}, }, + PublisherDomain: "example.com", } proposalMsg, err = govtypesv1beta1.NewMsgSubmitProposal( &proposal, @@ -153,6 +156,14 @@ func (s *IntegrationTestSuite) TestScheduledCork() { return found }, 10*time.Second, 2*time.Second, "did not find address in managed cellars") + s.T().Log("verify a default subscription was created") + pubsubQueryClient := pubsubtypes.NewQueryClient(proposerCtx) + subscriptionID := fmt.Sprintf("1:%s", counterContract.String()) + pubsubResponse, err := pubsubQueryClient.QueryDefaultSubscription(context.Background(), &pubsubtypes.QueryDefaultSubscriptionRequest{SubscriptionId: subscriptionID}) + s.Require().NoError(err) + s.Require().Equal(pubsubResponse.DefaultSubscription.SubscriptionId, subscriptionID) + s.Require().Equal(pubsubResponse.DefaultSubscription.PublisherDomain, "example.com") + s.T().Log("schedule a cork for the future") node, err := proposerCtx.GetNode() s.Require().NoError(err) @@ -314,6 +325,69 @@ func (s *IntegrationTestSuite) TestScheduledCork() { return govtypesv1beta1.StatusPassed == proposalQueryResponse.Proposal.Status }, time.Second*30, time.Second*5, "proposal was never accepted") s.T().Log("Proposal approved!") + + s.T().Logf("create governance proposal to remove counter contract") + removalProposal := types.RemoveManagedCellarIDsProposal{ + Title: "add counter contract in test", + Description: "test description", + CellarIds: &types.CellarIDSet{ + Ids: []string{counterContract.Hex()}, + }, + } + proposalMsg, err = govtypesv1beta1.NewMsgSubmitProposal( + &removalProposal, + sdk.Coins{ + { + Denom: testDenom, + Amount: stakeAmount.Quo(sdk.NewInt(2)), + }, + }, + proposer.address(), + ) + s.Require().NoError(err, "unable to create governance proposal") + + s.T().Log("submit proposal adding test cellar ID") + submitProposalResponse, err = s.chain.sendMsgs(*proposerCtx, proposalMsg) + s.Require().NoError(err) + s.Require().Zero(submitProposalResponse.Code, "raw log: %s", submitProposalResponse.RawLog) + + s.T().Log("check proposal was submitted correctly") + proposalsQueryResponse, err = govQueryClient.Proposals(context.Background(), &govtypesv1beta1.QueryProposalsRequest{}) + s.Require().NoError(err) + s.Require().NotEmpty(proposalsQueryResponse.Proposals) + s.Require().Equal(uint64(3), proposalsQueryResponse.Proposals[2].ProposalId, "not proposal id 3") + s.Require().Equal(govtypesv1beta1.StatusVotingPeriod, proposalsQueryResponse.Proposals[2].Status, "proposal not in voting period") + + s.T().Log("vote for proposal allowing contract") + for _, val := range s.chain.validators { + kr, err := val.keyring() + s.Require().NoError(err) + clientCtx, err := s.chain.clientContext("tcp://localhost:26657", &kr, "val", val.address()) + s.Require().NoError(err) + + voteMsg := govtypesv1beta1.NewMsgVote(val.address(), 3, govtypesv1beta1.OptionYes) + voteResponse, err := s.chain.sendMsgs(*clientCtx, voteMsg) + s.Require().NoError(err) + s.Require().Zero(voteResponse.Code, "vote error: %s", voteResponse.RawLog) + } + + s.T().Log("wait for proposal to be approved") + s.Require().Eventuallyf(func() bool { + proposalQueryResponse, err := govQueryClient.Proposal(context.Background(), &govtypesv1beta1.QueryProposalRequest{ProposalId: 3}) + s.Require().NoError(err) + return govtypesv1beta1.StatusPassed == proposalQueryResponse.Proposal.Status + }, time.Second*30, time.Second*5, "proposal was never accepted") + + s.T().Log("verify cellar ID was removed") + queryClient := types.NewQueryClient(proposerCtx) + cellarIDsResponse, err := queryClient.QueryCellarIDs(context.Background(), &types.QueryCellarIDsRequest{}) + s.Require().NoError(err) + s.Require().NotContains(cellarIDsResponse.CellarIds, counterContract.String()) + + s.T().Log("verify default subscription was removed") + subscriptionID = fmt.Sprintf("1:%s", counterContract.String()) + _, err = pubsubQueryClient.QueryDefaultSubscription(context.Background(), &pubsubtypes.QueryDefaultSubscriptionRequest{SubscriptionId: subscriptionID}) + s.Require().Error(err) }) } diff --git a/integration_tests/setup_test.go b/integration_tests/setup_test.go index 455b2a403..d1c41cd0c 100644 --- a/integration_tests/setup_test.go +++ b/integration_tests/setup_test.go @@ -17,13 +17,13 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" "github.com/peggyjv/sommelier/v7/app/params" auctiontypes "github.com/peggyjv/sommelier/v7/x/auction/types" axelarcorktypes "github.com/peggyjv/sommelier/v7/x/axelarcork/types" cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" - - gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" + pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" @@ -52,6 +52,21 @@ const ( initBalanceStr = "210000000000usomm" minGasPrice = "2" ethChainID uint = 15 + exampleCA = `-----BEGIN CERTIFICATE----- +MIICGzCCAaKgAwIBAgIUVYhZ4+pC7vQAf5FC6pssLk/eq5YwCgYIKoZIzj0EAwMw +RTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGElu +dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yMjAxMDUwNzIwMzFaFw0yNDAxMDUw +NzIwMzFaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYD +VQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwdjAQBgcqhkjOPQIBBgUrgQQA +IgNiAAQ3jwZd0Xe9w55UyAxRuc4F2u/LDdo7ykCZBO34neXpLR4GRRpx5VjFdHcX +WjvM9j3DnWjptb1fe7TIKSSJRmW1skWkpktOthIPhfga9jBhU4WRUDloKk1tRuiI +e8rRSlSjUzBRMB0GA1UdDgQWBBSTyTULHT9hNAA2Wg4dCtuTuIhiXTAfBgNVHSME +GDAWgBSTyTULHT9hNAA2Wg4dCtuTuIhiXTAPBgNVHRMBAf8EBTADAQH/MAoGCCqG +SM49BAMDA2cAMGQCMEd+Eg6lhStLkWEwmJJGN3Xdh9JmNsgsdff3mI3Y7UmHOB8K +HOqHGS8ApZcunRauDAIwRtgceZpkS92KuP3QOUotAH/nnCzp7X1lVzGOSTBRTVYJ +pohf4PJrfacqpi7PoXBk +-----END CERTIFICATE----- +` ) var ( @@ -442,6 +457,20 @@ func (s *IntegrationTestSuite) initGenesis() { s.Require().NoError(err) appGenState[cellarfeestypes.ModuleName] = bz + // set pubsub gen state + pubsubGenState := pubsubtypes.DefaultGenesisState() + s.Require().NoError(cdc.UnmarshalJSON(appGenState[pubsubtypes.ModuleName], &pubsubGenState)) + pubsubGenState.Publishers = []*pubsubtypes.Publisher{ + { + Address: s.chain.proposer.address().String(), + Domain: "example.com", + CaCert: exampleCA, + }, + } + bz, err = cdc.MarshalJSON(&pubsubGenState) + s.Require().NoError(err) + appGenState[pubsubtypes.ModuleName] = bz + // generate genesis txs genTxs := make([]json.RawMessage, len(s.chain.validators)) for i, val := range s.chain.validators { diff --git a/prost_build/src/main.rs b/prost_build/src/main.rs index dd7156cfb..b498088bb 100644 --- a/prost_build/src/main.rs +++ b/prost_build/src/main.rs @@ -101,6 +101,7 @@ fn compile_protos(out_dir: &Path, tmp_dir: &Path) { config.out_dir(tmp_dir); config .type_attribute("ScheduledCorkProposal", "#[derive(serde::Deserialize, serde::Serialize)]") + .type_attribute("AxelarScheduledCorkProposal", "#[derive(serde::Deserialize, serde::Serialize)]") .compile_protos(&protos, &proto_include_paths) .unwrap(); diff --git a/proto/axelarcork/v1/axelarcork.proto b/proto/axelarcork/v1/axelarcork.proto index 622700b3d..da9370280 100644 --- a/proto/axelarcork/v1/axelarcork.proto +++ b/proto/axelarcork/v1/axelarcork.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package axelarcork.v1; import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/peggyjv/sommelier/v7/x/axelarcork/types"; @@ -45,9 +46,14 @@ message CellarIDSet { } message ChainConfiguration { - string name = 1; - uint64 id = 2; - string proxy_address = 3; + string name = 1; + uint64 id = 2; + string proxy_address = 3; + // pure token transfers have a fixed fee deducted from the amount sent in the ICS-20 message depending + // on the asset and destination chain + // they can be calculated here: https://docs.axelar.dev/resources/mainnet#cross-chain-relayer-gas-fee + repeated cosmos.base.v1beta1.Coin bridge_fees = 4 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } message ChainConfigurations { diff --git a/proto/axelarcork/v1/proposal.proto b/proto/axelarcork/v1/proposal.proto index a5116b977..b131e5b4d 100644 --- a/proto/axelarcork/v1/proposal.proto +++ b/proto/axelarcork/v1/proposal.proto @@ -8,19 +8,21 @@ import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/peggyjv/sommelier/v7/x/axelarcork/types"; message AddAxelarManagedCellarIDsProposal { - string title = 1; - string description = 2; - uint64 chain_id = 3; - CellarIDSet cellar_ids = 4; + string title = 1; + string description = 2; + uint64 chain_id = 3; + CellarIDSet cellar_ids = 4; + string publisher_domain = 5; } // AddAxelarManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands message AddAxelarManagedCellarIDsProposalWithDeposit { - string title = 1; - string description = 2; - uint64 chain_id = 3; - repeated string cellar_ids = 4; - string deposit = 5; + string title = 1; + string description = 2; + uint64 chain_id = 3; + repeated string cellar_ids = 4; + string publisher_domain = 5; + string deposit = 6; } message RemoveAxelarManagedCellarIDsProposal { diff --git a/proto/cork/v2/proposal.proto b/proto/cork/v2/proposal.proto index d94840c0e..7cbee8515 100644 --- a/proto/cork/v2/proposal.proto +++ b/proto/cork/v2/proposal.proto @@ -9,6 +9,7 @@ message AddManagedCellarIDsProposal { string title = 1; string description = 2; CellarIDSet cellar_ids = 3; + string publisher_domain = 4; } // AddManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands @@ -16,7 +17,8 @@ message AddManagedCellarIDsProposalWithDeposit { string title = 1; string description = 2; repeated string cellar_ids = 3; - string deposit = 4; + string publisher_domain = 4; + string deposit = 5; } message RemoveManagedCellarIDsProposal { diff --git a/somm_proto/src/prost/auction.v1.rs b/somm_proto/src/prost/auction.v1.rs index d9d9c593a..10e2d317b 100644 --- a/somm_proto/src/prost/auction.v1.rs +++ b/somm_proto/src/prost/auction.v1.rs @@ -175,6 +175,8 @@ pub struct Params { pub auction_max_block_age: u64, #[prost(string, tag = "5")] pub auction_price_decrease_acceleration_rate: ::prost::alloc::string::String, + #[prost(uint64, tag = "6")] + pub minimum_auction_height: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} diff --git a/somm_proto/src/prost/axelarcork.v1.rs b/somm_proto/src/prost/axelarcork.v1.rs index 2d2370e1f..e1f62bb57 100644 --- a/somm_proto/src/prost/axelarcork.v1.rs +++ b/somm_proto/src/prost/axelarcork.v1.rs @@ -48,8 +48,8 @@ pub struct AxelarCorkResults { } #[derive(Clone, PartialEq, ::prost::Message)] pub struct CellarIdSet { - #[prost(message, optional, tag = "1")] - pub chain: ::core::option::Option, + #[prost(uint64, tag = "1")] + pub chain_id: u64, #[prost(string, repeated, tag = "2")] pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } @@ -61,6 +61,11 @@ pub struct ChainConfiguration { pub id: u64, #[prost(string, tag = "3")] pub proxy_address: ::prost::alloc::string::String, + /// pure token transfers have a fixed fee deducted from the amount sent in the ICS-20 message depending + /// on the asset and destination chain + /// they can be calculated here: https://docs.axelar.dev/resources/mainnet#cross-chain-relayer-gas-fee + #[prost(message, repeated, tag = "4")] + pub bridge_fees: ::prost::alloc::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct ChainConfigurations { @@ -685,8 +690,6 @@ pub struct ScheduleCorkEvent { #[prost(uint64, tag = "5")] pub chain_id: u64, } -// note: current plan is to accept either chain name or chain ID. if both and they dont match, error. - #[derive(Clone, PartialEq, ::prost::Message)] pub struct AddAxelarManagedCellarIDsProposal { #[prost(string, tag = "1")] @@ -697,8 +700,10 @@ pub struct AddAxelarManagedCellarIDsProposal { pub chain_id: u64, #[prost(message, optional, tag = "4")] pub cellar_ids: ::core::option::Option, + #[prost(string, tag = "5")] + pub publisher_domain: ::prost::alloc::string::String, } -/// AddManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands +/// AddAxelarManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands #[derive(Clone, PartialEq, ::prost::Message)] pub struct AddAxelarManagedCellarIDsProposalWithDeposit { #[prost(string, tag = "1")] @@ -707,9 +712,11 @@ pub struct AddAxelarManagedCellarIDsProposalWithDeposit { pub description: ::prost::alloc::string::String, #[prost(uint64, tag = "3")] pub chain_id: u64, - #[prost(message, optional, tag = "4")] - pub cellar_ids: ::core::option::Option, + #[prost(string, repeated, tag = "4")] + pub cellar_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, #[prost(string, tag = "5")] + pub publisher_domain: ::prost::alloc::string::String, + #[prost(string, tag = "6")] pub deposit: ::prost::alloc::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] @@ -723,7 +730,7 @@ pub struct RemoveAxelarManagedCellarIDsProposal { #[prost(message, optional, tag = "4")] pub cellar_ids: ::core::option::Option, } -/// RemoveManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands +/// RemoveAxelarManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands #[derive(Clone, PartialEq, ::prost::Message)] pub struct RemoveAxelarManagedCellarIDsProposalWithDeposit { #[prost(string, tag = "1")] @@ -732,12 +739,12 @@ pub struct RemoveAxelarManagedCellarIDsProposalWithDeposit { pub description: ::prost::alloc::string::String, #[prost(uint64, tag = "3")] pub chain_id: u64, - #[prost(message, optional, tag = "4")] - pub cellar_ids: ::core::option::Option, + #[prost(string, repeated, tag = "4")] + pub cellar_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, #[prost(string, tag = "5")] pub deposit: ::prost::alloc::string::String, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] pub struct AxelarScheduledCorkProposal { #[prost(string, tag = "1")] pub title: ::prost::alloc::string::String, @@ -774,7 +781,7 @@ pub struct AxelarScheduledCorkProposal { #[prost(uint64, tag = "7")] pub deadline: u64, } -/// ScheduledCorkProposalWithDeposit is a specific definition for CLI commands +/// AxelarScheduledCorkProposalWithDeposit is a specific definition for CLI commands #[derive(Clone, PartialEq, ::prost::Message)] pub struct AxelarScheduledCorkProposalWithDeposit { #[prost(string, tag = "1")] @@ -807,7 +814,7 @@ pub struct AxelarCommunityPoolSpendProposal { #[prost(message, optional, tag = "5")] pub amount: ::core::option::Option, } -/// This format of the community spend Ethereum proposal is specifically for +/// This format of the Axelar community spend Ethereum proposal is specifically for /// the CLI to allow simple text serialization. #[derive(Clone, PartialEq, ::prost::Message)] pub struct AxelarCommunityPoolSpendProposalForCli { @@ -820,10 +827,8 @@ pub struct AxelarCommunityPoolSpendProposalForCli { #[prost(uint64, tag = "4")] pub chain_id: u64, #[prost(string, tag = "5")] - pub chain_name: ::prost::alloc::string::String, - #[prost(string, tag = "6")] pub amount: ::prost::alloc::string::String, - #[prost(string, tag = "7")] + #[prost(string, tag = "6")] pub deposit: ::prost::alloc::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/somm_proto/src/prost/cellarfees.v1.rs b/somm_proto/src/prost/cellarfees.v1.rs index 857d5e543..7f023b9df 100644 --- a/somm_proto/src/prost/cellarfees.v1.rs +++ b/somm_proto/src/prost/cellarfees.v1.rs @@ -26,6 +26,9 @@ pub struct Params { /// Number of blocks between auction price decreases #[prost(uint64, tag = "4")] pub price_decrease_block_interval: u64, + /// The interval between starting auctions + #[prost(uint64, tag = "5")] + pub auction_interval: u64, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} diff --git a/somm_proto/src/prost/cork.v2.rs b/somm_proto/src/prost/cork.v2.rs index 1ff0dae5b..efce9d4a6 100644 --- a/somm_proto/src/prost/cork.v2.rs +++ b/somm_proto/src/prost/cork.v2.rs @@ -136,6 +136,8 @@ pub struct Params { /// VoteThreshold defines the percentage of bonded stake required to vote for a scheduled cork to be approved #[prost(string, tag = "1")] pub vote_threshold: ::prost::alloc::string::String, + #[prost(uint64, tag = "2")] + pub max_corks_per_validator: u64, } /// QueryParamsRequest is the request type for the Query/Params gRPC method. #[derive(Clone, PartialEq, ::prost::Message)] @@ -396,6 +398,8 @@ pub struct AddManagedCellarIDsProposal { pub description: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] pub cellar_ids: ::core::option::Option, + #[prost(string, tag = "4")] + pub publisher_domain: ::prost::alloc::string::String, } /// AddManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands #[derive(Clone, PartialEq, ::prost::Message)] @@ -407,6 +411,8 @@ pub struct AddManagedCellarIDsProposalWithDeposit { #[prost(string, repeated, tag = "3")] pub cellar_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, #[prost(string, tag = "4")] + pub publisher_domain: ::prost::alloc::string::String, + #[prost(string, tag = "5")] pub deposit: ::prost::alloc::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/x/auction/types/auction.go b/x/auction/types/auction.go index bf35ec71a..dac5c87f6 100644 --- a/x/auction/types/auction.go +++ b/x/auction/types/auction.go @@ -15,7 +15,7 @@ func (a *Auction) ValidateBasic() error { return errorsmod.Wrapf(ErrAuctionIDMustBeNonZero, "id: %d", a.Id) } - if !a.StartingTokensForSale.IsPositive() { + if !a.StartingTokensForSale.IsValid() || !a.StartingTokensForSale.IsPositive() { return errorsmod.Wrapf(ErrAuctionStartingAmountMustBePositve, "Starting tokens for sale: %s", a.StartingTokensForSale.String()) } @@ -75,7 +75,7 @@ func (b *Bid) ValidateBasic() error { return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) } - if !b.MaxBidInUsomm.IsPositive() { + if !b.MaxBidInUsomm.IsValid() || !b.MaxBidInUsomm.IsPositive() { return errorsmod.Wrapf(ErrBidAmountMustBePositive, "bid amount in usomm: %s", b.MaxBidInUsomm.String()) } @@ -87,11 +87,11 @@ func (b *Bid) ValidateBasic() error { return errorsmod.Wrapf(ErrInvalidTokenBeingBidOn, "sale token: %s", b.SaleTokenMinimumAmount.String()) } - if !b.SaleTokenMinimumAmount.IsPositive() { + if !b.SaleTokenMinimumAmount.IsValid() || !b.SaleTokenMinimumAmount.IsPositive() { return errorsmod.Wrapf(ErrMinimumAmountMustBePositive, "sale token amount: %s", b.SaleTokenMinimumAmount.String()) } - if b.TotalFulfilledSaleTokens.Amount.IsNegative() { + if !b.TotalFulfilledSaleTokens.IsValid() { return errorsmod.Wrapf(ErrBidFulfilledSaleTokenAmountMustBeNonNegative, "fulfilled sale token amount: %s", b.TotalFulfilledSaleTokens.String()) } diff --git a/x/auction/types/msgs.go b/x/auction/types/msgs.go index 94bbdb0b3..c9a8abfa0 100644 --- a/x/auction/types/msgs.go +++ b/x/auction/types/msgs.go @@ -47,16 +47,16 @@ func (m *MsgSubmitBidRequest) ValidateBasic() error { return errorsmod.Wrapf(ErrBidMustBeInUsomm, "bid: %s", m.MaxBidInUsomm.String()) } - if !m.MaxBidInUsomm.IsPositive() { + if !m.MaxBidInUsomm.IsValid() || !m.MaxBidInUsomm.IsPositive() { return errorsmod.Wrapf(ErrBidAmountMustBePositive, "bid amount in usomm: %s", m.MaxBidInUsomm.String()) } - if !strings.HasPrefix(m.SaleTokenMinimumAmount.Denom, "gravity0x") { - return errorsmod.Wrapf(ErrInvalidTokenBeingBidOn, "sale token: %s", m.SaleTokenMinimumAmount.String()) + if !m.SaleTokenMinimumAmount.IsValid() || !m.SaleTokenMinimumAmount.IsPositive() { + return errorsmod.Wrapf(ErrMinimumAmountMustBePositive, "sale token amount: %s", m.SaleTokenMinimumAmount.String()) } - if !m.SaleTokenMinimumAmount.IsPositive() { - return errorsmod.Wrapf(ErrMinimumAmountMustBePositive, "sale token amount: %s", m.SaleTokenMinimumAmount.String()) + if !strings.HasPrefix(m.SaleTokenMinimumAmount.Denom, "gravity0x") { + return errorsmod.Wrapf(ErrInvalidTokenBeingBidOn, "sale token: %s", m.SaleTokenMinimumAmount.String()) } if _, err := sdk.AccAddressFromBech32(m.Signer); err != nil { diff --git a/x/auction/types/params.go b/x/auction/types/params.go index f3a64225a..5d06e4159 100644 --- a/x/auction/types/params.go +++ b/x/auction/types/params.go @@ -26,9 +26,9 @@ func ParamKeyTable() paramtypes.KeyTable { // DefaultParams returns default auction parameters func DefaultParams() Params { return Params{ - PriceMaxBlockAge: 403200, // roughly four weeks based on 6 second blocks + PriceMaxBlockAge: 806400, // roughly eight weeks based on 6 second blocks MinimumBidInUsomm: 1000000, // 1 somm - MinimumSaleTokensUsdValue: sdk.MustNewDecFromStr("1.0"), // minimum value of sale tokens to consider starting an auction + MinimumSaleTokensUsdValue: sdk.MustNewDecFromStr("1.0"), // unimplemented currently -- minimum value of sale tokens to consider starting an auction AuctionMaxBlockAge: 864000, // roughly 60 days based on 6 second blocks AuctionPriceDecreaseAccelerationRate: sdk.MustNewDecFromStr("0.001"), // 0.1% MinimumAuctionHeight: 0, // do not run auctions before this block height diff --git a/x/axelarcork/client/cli/tx.go b/x/axelarcork/client/cli/tx.go index 13593d154..43d54575f 100644 --- a/x/axelarcork/client/cli/tx.go +++ b/x/axelarcork/client/cli/tx.go @@ -14,6 +14,7 @@ import ( govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/ethereum/go-ethereum/common" types "github.com/peggyjv/sommelier/v7/x/axelarcork/types" + pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" "github.com/spf13/cobra" ) @@ -251,6 +252,7 @@ Where proposal.json contains: "description": "I have a hunch", "chain_id": 42161, "cellar_ids": ["0x123801a7D398351b8bE11C439e05C5B3259aeC9B", "0x456801a7D398351b8bE11C439e05C5B3259aeC9B"], + "publisher_domain": "example.com", "deposit": "10000usomm" } `, @@ -288,11 +290,17 @@ Where proposal.json contains: } } + if err := pubsubtypes.ValidateDomain(proposal.PublisherDomain); err != nil { + return err + } + content := types.NewAddAxelarManagedCellarIDsProposal( proposal.Title, proposal.Description, proposal.ChainId, - &types.CellarIDSet{ChainId: proposal.ChainId, Ids: proposal.CellarIds}) + &types.CellarIDSet{ChainId: proposal.ChainId, Ids: proposal.CellarIds}, + proposal.PublisherDomain, + ) from := clientCtx.GetFromAddress() msg, err := govtypesv1beta1.NewMsgSubmitProposal(content, deposit, from) @@ -570,12 +578,19 @@ Where proposal.json contains: "chain_configuration": { "name": "arbitrum", "id": 42161, - "proxy_address": "0x0000000000000000000000000000000000000000" + "proxy_address": "0x0000000000000000000000000000000000000000", + "bridge_fees": [ + { + "denom": "usomm", + "amount": "100000" + } + ] }, "deposit": "10000usomm" } Note that the "name" parameter should map to a "Chain Identifier" as defined by Axelar: https://docs.axelar.dev/dev/reference/mainnet-chain-names +Bridge fees for a given source denom and destination chain can be calculated here: https://docs.axelar.dev/resources/mainnet#cross-chain-relayer-gas-fee `, version.AppName, ), diff --git a/x/axelarcork/client/cli/tx_test.go b/x/axelarcork/client/cli/tx_test.go index c398c47b6..723aa9f5e 100644 --- a/x/axelarcork/client/cli/tx_test.go +++ b/x/axelarcork/client/cli/tx_test.go @@ -5,6 +5,7 @@ import ( "testing" "github.com/cosmos/cosmos-sdk/simapp/params" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/peggyjv/sommelier/v7/x/axelarcork/types" "github.com/cosmos/cosmos-sdk/testutil" @@ -20,6 +21,7 @@ func TestParseAddManagedCellarsProposal(t *testing.T) { "description": "I have a hunch", "chain_id": 42161, "cellar_ids": ["0x123801a7D398351b8bE11C439e05C5B3259aeC9B", "0x456801a7D398351b8bE11C439e05C5B3259aeC9B"], + "publisher_domain": "example.com", "deposit": "10000usomm" } `) @@ -36,6 +38,7 @@ func TestParseAddManagedCellarsProposal(t *testing.T) { require.Equal(t, uint64(42161), proposal.ChainId) require.Equal(t, "0x123801a7D398351b8bE11C439e05C5B3259aeC9B", proposal.CellarIds[0]) require.Equal(t, "0x456801a7D398351b8bE11C439e05C5B3259aeC9B", proposal.CellarIds[1]) + require.Equal(t, "example.com", proposal.PublisherDomain) require.Equal(t, "10000usomm", proposal.Deposit) } @@ -139,7 +142,13 @@ func TestParseAddChainConfigurationProposal(t *testing.T) { "chain_configuration": { "name": "arbitrum", "id": 42161, - "proxy_address": "0x0000000000000000000000000000000000000000" + "proxy_address": "0x0000000000000000000000000000000000000000", + "bridge_fees": [ + { + "denom": "usomm", + "amount": "100000" + } + ] }, "deposit": "10000usomm" } @@ -157,6 +166,8 @@ func TestParseAddChainConfigurationProposal(t *testing.T) { require.Equal(t, "arbitrum", proposal.ChainConfiguration.Name) require.Equal(t, uint64(42161), proposal.ChainConfiguration.Id) require.Equal(t, "0x0000000000000000000000000000000000000000", proposal.ChainConfiguration.ProxyAddress) + require.Equal(t, "usomm", proposal.ChainConfiguration.BridgeFees[0].Denom) + require.Equal(t, sdk.NewInt(100000), proposal.ChainConfiguration.BridgeFees[0].Amount) require.Equal(t, "10000usomm", proposal.Deposit) } diff --git a/x/axelarcork/keeper/abci.go b/x/axelarcork/keeper/abci.go index c12dad075..049bdda8f 100644 --- a/x/axelarcork/keeper/abci.go +++ b/x/axelarcork/keeper/abci.go @@ -24,10 +24,7 @@ func (k Keeper) EndBlocker(ctx sdk.Context) { k.Logger(ctx).Info("tallying scheduled cork votes", "height", fmt.Sprintf("%d", ctx.BlockHeight()), "chain id", config.Id) - // TODO(bolten): might not be a necessary fix, but GetApprovedScheduledAxelarCorks is kind of - // unexpectedly destructive -- it deletes all of the validator submitted entries for scheduled - // corks and returns a list of the winning ones, which are then set using SetWinningAxelarCork - // here, but it seems like an odd side effect of a Get function to delete stuff + winningScheduledVotes := k.GetApprovedScheduledAxelarCorks(ctx, config.Id) if len(winningScheduledVotes) > 0 { k.Logger(ctx).Info("marking all winning scheduled cork votes as relayable", diff --git a/x/axelarcork/keeper/genesis.go b/x/axelarcork/keeper/genesis.go index d2eb06a85..dca15c842 100644 --- a/x/axelarcork/keeper/genesis.go +++ b/x/axelarcork/keeper/genesis.go @@ -96,7 +96,7 @@ func ExportGenesis(ctx sdk.Context, k Keeper) types.GenesisState { k.IterateAxelarContractCallNonces(ctx, func(chainID uint64, contractAddress common.Address, nonce uint64) (stop bool) { accn := &types.AxelarContractCallNonce{ ChainId: chainID, - ContractAddress: contractAddress.Hex(), + ContractAddress: contractAddress.String(), Nonce: nonce, } diff --git a/x/axelarcork/keeper/keeper.go b/x/axelarcork/keeper/keeper.go index 7641e3acf..29370f075 100644 --- a/x/axelarcork/keeper/keeper.go +++ b/x/axelarcork/keeper/keeper.go @@ -27,6 +27,7 @@ type Keeper struct { transferKeeper types.TransferKeeper distributionKeeper types.DistributionKeeper gravityKeeper types.GravityKeeper + pubsubKeeper types.PubsubKeeper Ics4Wrapper types.ICS4Wrapper } @@ -36,7 +37,7 @@ func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, stakingKeeper types.StakingKeeper, transferKeeper types.TransferKeeper, distributionKeeper types.DistributionKeeper, - wrapper types.ICS4Wrapper, gravityKeeper types.GravityKeeper, + wrapper types.ICS4Wrapper, gravityKeeper types.GravityKeeper, pubsubKeeper types.PubsubKeeper, ) Keeper { // set KeyTable if it has not already been set if !paramSpace.HasKeyTable() { @@ -53,6 +54,7 @@ func NewKeeper( transferKeeper: transferKeeper, distributionKeeper: distributionKeeper, gravityKeeper: gravityKeeper, + pubsubKeeper: pubsubKeeper, Ics4Wrapper: wrapper, } diff --git a/x/axelarcork/keeper/keeper_test.go b/x/axelarcork/keeper/keeper_test.go index 6575c9184..3e9fe4670 100644 --- a/x/axelarcork/keeper/keeper_test.go +++ b/x/axelarcork/keeper/keeper_test.go @@ -44,6 +44,7 @@ type KeeperTestSuite struct { distributionKeeper *mocks.MockDistributionKeeper ics4wrapper *mocks.MockICS4Wrapper gravityKeeper *mocks.MockGravityKeeper + pubsubKeeper *mocks.MockPubsubKeeper validator *mocks.MockValidatorI @@ -69,6 +70,8 @@ func (suite *KeeperTestSuite) SetupTest() { suite.transferKeeper = mocks.NewMockTransferKeeper(ctrl) suite.distributionKeeper = mocks.NewMockDistributionKeeper(ctrl) suite.ics4wrapper = mocks.NewMockICS4Wrapper(ctrl) + suite.gravityKeeper = mocks.NewMockGravityKeeper(ctrl) + suite.pubsubKeeper = mocks.NewMockPubsubKeeper(ctrl) suite.validator = mocks.NewMockValidatorI(ctrl) suite.ctx = ctx @@ -94,6 +97,7 @@ func (suite *KeeperTestSuite) SetupTest() { suite.distributionKeeper, suite.ics4wrapper, suite.gravityKeeper, + suite.pubsubKeeper, ) //types.RegisterInterfaces(encCfg.InterfaceRegistry) diff --git a/x/axelarcork/keeper/proposal_handler.go b/x/axelarcork/keeper/proposal_handler.go index 7a7365a18..5a0744ad4 100644 --- a/x/axelarcork/keeper/proposal_handler.go +++ b/x/axelarcork/keeper/proposal_handler.go @@ -15,8 +15,13 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" "github.com/peggyjv/sommelier/v7/x/axelarcork/types" + pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" ) +func NewAxelarSubscriptionID(chainID uint64, address common.Address) string { + return fmt.Sprintf("%d:%s", chainID, address.String()) +} + // HandleAddManagedCellarsProposal is a handler for executing a passed community cellar addition proposal func HandleAddManagedCellarsProposal(ctx sdk.Context, k Keeper, p types.AddAxelarManagedCellarIDsProposal) error { config, ok := k.GetChainConfigurationByID(ctx, p.ChainId) @@ -24,31 +29,43 @@ func HandleAddManagedCellarsProposal(ctx sdk.Context, k Keeper, p types.AddAxela return fmt.Errorf("chain by id %d not found", p.ChainId) } + _, publisherFound := k.pubsubKeeper.GetPublisher(ctx, p.PublisherDomain) + if !publisherFound { + return fmt.Errorf("not an approved publisher: %s", p.PublisherDomain) + } + if err := p.CellarIds.ValidateBasic(); err != nil { return err } - cellarIDs := k.GetCellarIDs(ctx, config.Id) + cellarAddresses := k.GetCellarIDs(ctx, config.Id) for _, proposedCellarID := range p.CellarIds.Ids { + proposedCellarAddress := common.HexToAddress(proposedCellarID) found := false - for _, id := range cellarIDs { - if id == common.HexToAddress(proposedCellarID) { + for _, id := range cellarAddresses { + if id == proposedCellarAddress { found = true } } if !found { - cellarIDs = append(cellarIDs, common.HexToAddress(proposedCellarID)) + cellarAddresses = append(cellarAddresses, proposedCellarAddress) + subscriptionID := NewAxelarSubscriptionID(p.ChainId, proposedCellarAddress) + defaultSubscription := pubsubtypes.DefaultSubscription{ + SubscriptionId: subscriptionID, + PublisherDomain: p.PublisherDomain, + } + k.pubsubKeeper.SetDefaultSubscription(ctx, defaultSubscription) } } - idStrings := make([]string, len(cellarIDs)) - for i, cid := range cellarIDs { + idStrings := make([]string, len(cellarAddresses)) + for i, cid := range cellarAddresses { idStrings[i] = cid.String() } sort.Strings(idStrings) - k.SetCellarIDs(ctx, config.Id, types.CellarIDSet{Ids: idStrings}) + k.SetCellarIDs(ctx, config.Id, types.CellarIDSet{ChainId: config.Id, Ids: idStrings}) return nil } @@ -75,7 +92,7 @@ func HandleRemoveManagedCellarsProposal(ctx sdk.Context, k Keeper, p types.Remov } if !found { - outputCellarIDs.Ids = append(outputCellarIDs.Ids, existingID.Hex()) + outputCellarIDs.Ids = append(outputCellarIDs.Ids, existingID.String()) } } outputCellarIDs.ChainId = config.Id @@ -83,6 +100,11 @@ func HandleRemoveManagedCellarsProposal(ctx sdk.Context, k Keeper, p types.Remov // unlike for adding an ID, we don't need to re-sort because we're removing elements from an already sorted list k.SetCellarIDs(ctx, config.Id, outputCellarIDs) + for _, cellarToDelete := range p.CellarIds.Ids { + subscriptionID := NewAxelarSubscriptionID(p.ChainId, common.HexToAddress(cellarToDelete)) + k.pubsubKeeper.DeleteDefaultSubscription(ctx, subscriptionID) + } + return nil } @@ -101,12 +123,24 @@ func HandleScheduledCorkProposal(ctx sdk.Context, k Keeper, p types.AxelarSchedu } func HandleCommunityPoolSpendProposal(ctx sdk.Context, k Keeper, p types.AxelarCommunityPoolSpendProposal) error { + params := k.GetParamSet(ctx) + config, ok := k.GetChainConfigurationByID(ctx, p.ChainId) + if !ok { + return fmt.Errorf("chain by id %d not found", p.ChainId) + } + + feeFound, feeCoin := config.BridgeFees.Find(p.Amount.Denom) + if !feeFound { + return fmt.Errorf("no matching bridge fee for denom %s", p.Amount.Denom) + } + + coinWithBridgeFee := p.Amount.Add(feeCoin) feePool := k.distributionKeeper.GetFeePool(ctx) // NOTE the community pool isn't a module account, however its coins // are held in the distribution module account. Thus, the community pool // must be reduced separately from the Axelar IBC calls - newPool, negative := feePool.CommunityPool.SafeSub(sdk.NewDecCoinsFromCoins(p.Amount)) + newPool, negative := feePool.CommunityPool.SafeSub(sdk.NewDecCoinsFromCoins(coinWithBridgeFee)) if negative { return distributiontypes.ErrBadDistribution } @@ -114,12 +148,6 @@ func HandleCommunityPoolSpendProposal(ctx sdk.Context, k Keeper, p types.AxelarC feePool.CommunityPool = newPool sender := authtypes.NewModuleAddress(distributiontypes.ModuleName) - params := k.GetParamSet(ctx) - config, ok := k.GetChainConfigurationByID(ctx, p.ChainId) - if !ok { - return fmt.Errorf("chain by id %d not found", p.ChainId) - } - // TODO(bolten: is there really no fee necessary or executor to target? axelarMemo := types.AxelarBody{ DestinationChain: config.Name, @@ -136,7 +164,7 @@ func HandleCommunityPoolSpendProposal(ctx sdk.Context, k Keeper, p types.AxelarC transferMsg := transfertypes.NewMsgTransfer( params.IbcPort, params.IbcChannel, - p.Amount, + coinWithBridgeFee, sender.String(), params.GmpAccount, clienttypes.ZeroHeight(), @@ -151,7 +179,7 @@ func HandleCommunityPoolSpendProposal(ctx sdk.Context, k Keeper, p types.AxelarC k.distributionKeeper.SetFeePool(ctx, feePool) k.Logger(ctx).Info("transfer from the community pool issued to the axelar bridge", "ibc sequence", resp, - "amount", p.Amount.String(), + "amount", coinWithBridgeFee.Amount.String(), "recipient", p.Recipient, "chain", config.Name, "sender", sender.String(), @@ -184,7 +212,7 @@ func HandleUpgradeAxelarProxyContractProposal(ctx sdk.Context, k Keeper, p types cellars := []string{} for _, c := range k.GetCellarIDs(ctx, p.ChainId) { - cellars = append(cellars, c.Hex()) + cellars = append(cellars, c.String()) } payload, err := types.EncodeUpgradeArgs(p.NewProxyAddress, cellars) diff --git a/x/axelarcork/keeper/query_server.go b/x/axelarcork/keeper/query_server.go index af6fd4beb..b5883687f 100644 --- a/x/axelarcork/keeper/query_server.go +++ b/x/axelarcork/keeper/query_server.go @@ -38,7 +38,7 @@ func (k Keeper) QueryCellarIDs(c context.Context, req *types.QueryCellarIDsReque k.IterateChainConfigurations(ctx, func(config types.ChainConfiguration) (stop bool) { set := types.CellarIDSet{ChainId: config.Id, Ids: []string{}} for _, id := range k.GetCellarIDs(ctx, config.Id) { - set.Ids = append(set.Ids, id.Hex()) + set.Ids = append(set.Ids, id.String()) } response.CellarIds = append(response.CellarIds, &set) @@ -62,7 +62,7 @@ func (k Keeper) QueryCellarIDsByChainID(c context.Context, req *types.QueryCella response := &types.QueryCellarIDsByChainIDResponse{} for _, id := range k.GetCellarIDs(ctx, config.Id) { - response.CellarIds = append(response.CellarIds, id.Hex()) + response.CellarIds = append(response.CellarIds, id.String()) } return response, nil @@ -217,7 +217,7 @@ func (k Keeper) QueryAxelarContractCallNonces(c context.Context, req *types.Quer k.IterateAxelarContractCallNonces(ctx, func(chainID uint64, address common.Address, nonce uint64) (stop bool) { nonces = append(nonces, &types.AxelarContractCallNonce{ ChainId: chainID, - ContractAddress: address.Hex(), + ContractAddress: address.String(), Nonce: nonce, }) diff --git a/x/axelarcork/keeper/setup_unit_test.go b/x/axelarcork/keeper/setup_unit_test.go index ce79cc7de..009779e0d 100644 --- a/x/axelarcork/keeper/setup_unit_test.go +++ b/x/axelarcork/keeper/setup_unit_test.go @@ -62,6 +62,7 @@ func setupCorkKeeper(t *testing.T) ( mockDistributionKeeper := mocks.NewMockDistributionKeeper(ctrl) mockICS4wrapper := mocks.NewMockICS4Wrapper(ctrl) mockGravityKeeper := mocks.NewMockGravityKeeper(ctrl) + mockPubsubKeeper := mocks.NewMockPubsubKeeper(ctrl) k := NewKeeper( protoCodec, @@ -74,6 +75,7 @@ func setupCorkKeeper(t *testing.T) ( mockDistributionKeeper, mockICS4wrapper, mockGravityKeeper, + mockPubsubKeeper, ) ctx := sdk.NewContext(commitMultiStore, tmproto.Header{}, false, log.NewNopLogger()) diff --git a/x/axelarcork/tests/mocks/expected_keepers_mocks.go b/x/axelarcork/tests/mocks/expected_keepers_mocks.go index 50b8b9198..bb3f1a0cb 100644 --- a/x/axelarcork/tests/mocks/expected_keepers_mocks.go +++ b/x/axelarcork/tests/mocks/expected_keepers_mocks.go @@ -20,6 +20,7 @@ import ( types7 "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" exported "github.com/cosmos/ibc-go/v6/modules/core/exported" gomock "github.com/golang/mock/gomock" + types8 "github.com/peggyjv/sommelier/v7/x/pubsub/types" ) // MockAccountKeeper is a mock of AccountKeeper interface. @@ -620,3 +621,65 @@ func (mr *MockGravityKeeperMockRecorder) GetOrchestratorValidatorAddress(ctx, or mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOrchestratorValidatorAddress", reflect.TypeOf((*MockGravityKeeper)(nil).GetOrchestratorValidatorAddress), ctx, orchAddr) } + +// MockPubsubKeeper is a mock of PubsubKeeper interface. +type MockPubsubKeeper struct { + ctrl *gomock.Controller + recorder *MockPubsubKeeperMockRecorder +} + +// MockPubsubKeeperMockRecorder is the mock recorder for MockPubsubKeeper. +type MockPubsubKeeperMockRecorder struct { + mock *MockPubsubKeeper +} + +// NewMockPubsubKeeper creates a new mock instance. +func NewMockPubsubKeeper(ctrl *gomock.Controller) *MockPubsubKeeper { + mock := &MockPubsubKeeper{ctrl: ctrl} + mock.recorder = &MockPubsubKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockPubsubKeeper) EXPECT() *MockPubsubKeeperMockRecorder { + return m.recorder +} + +// DeleteDefaultSubscription mocks base method. +func (m *MockPubsubKeeper) DeleteDefaultSubscription(ctx types.Context, subscriptionID string) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "DeleteDefaultSubscription", ctx, subscriptionID) +} + +// DeleteDefaultSubscription indicates an expected call of DeleteDefaultSubscription. +func (mr *MockPubsubKeeperMockRecorder) DeleteDefaultSubscription(ctx, subscriptionID interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDefaultSubscription", reflect.TypeOf((*MockPubsubKeeper)(nil).DeleteDefaultSubscription), ctx, subscriptionID) +} + +// GetPublisher mocks base method. +func (m *MockPubsubKeeper) GetPublisher(ctx types.Context, publisherDomain string) (types8.Publisher, bool) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPublisher", ctx, publisherDomain) + ret0, _ := ret[0].(types8.Publisher) + ret1, _ := ret[1].(bool) + return ret0, ret1 +} + +// GetPublisher indicates an expected call of GetPublisher. +func (mr *MockPubsubKeeperMockRecorder) GetPublisher(ctx, publisherDomain interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPublisher", reflect.TypeOf((*MockPubsubKeeper)(nil).GetPublisher), ctx, publisherDomain) +} + +// SetDefaultSubscription mocks base method. +func (m *MockPubsubKeeper) SetDefaultSubscription(ctx types.Context, defaultSubscription types8.DefaultSubscription) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetDefaultSubscription", ctx, defaultSubscription) +} + +// SetDefaultSubscription indicates an expected call of SetDefaultSubscription. +func (mr *MockPubsubKeeperMockRecorder) SetDefaultSubscription(ctx, defaultSubscription interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDefaultSubscription", reflect.TypeOf((*MockPubsubKeeper)(nil).SetDefaultSubscription), ctx, defaultSubscription) +} diff --git a/x/axelarcork/tests/setup.go b/x/axelarcork/tests/setup.go index 36b05e540..2a5aab5d5 100644 --- a/x/axelarcork/tests/setup.go +++ b/x/axelarcork/tests/setup.go @@ -49,11 +49,12 @@ func NewTestSetup(t *testing.T, ctl *gomock.Controller) *Setup { ibcModuleMock := mocks.NewMockIBCModule(ctl) ics4WrapperMock := mocks.NewMockICS4Wrapper(ctl) gravityKeeper := mocks.NewMockGravityKeeper(ctl) + pubsubKeeper := mocks.NewMockPubsubKeeper(ctl) paramsKeeper := initializer.paramsKeeper() acKeeper := initializer.axelarcorkKeeper( paramsKeeper, accountKeeperMock, bankKeeperMock, stakingKeeper, transferKeeperMock, distributionKeeperMock, - ics4WrapperMock, gravityKeeper) + ics4WrapperMock, gravityKeeper, pubsubKeeper) require.NoError(t, initializer.StateStore.LoadLatestVersion()) @@ -154,6 +155,7 @@ func (i initializer) axelarcorkKeeper( distributionKeeper types.DistributionKeeper, ics4Wrapper porttypes.ICS4Wrapper, gravityKeeper types.GravityKeeper, + pubsubKeeper types.PubsubKeeper, ) *keeper.Keeper { storeKey := sdk.NewKVStoreKey(types.StoreKey) i.StateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, i.DB) @@ -170,6 +172,7 @@ func (i initializer) axelarcorkKeeper( distributionKeeper, ics4Wrapper, gravityKeeper, + pubsubKeeper, ) return &routerKeeper diff --git a/x/axelarcork/types/axelarcork.pb.go b/x/axelarcork/types/axelarcork.pb.go index b04275284..55240db6e 100644 --- a/x/axelarcork/types/axelarcork.pb.go +++ b/x/axelarcork/types/axelarcork.pb.go @@ -5,6 +5,8 @@ package types 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" io "io" @@ -376,6 +378,10 @@ type ChainConfiguration struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` ProxyAddress string `protobuf:"bytes,3,opt,name=proxy_address,json=proxyAddress,proto3" json:"proxy_address,omitempty"` + // pure token transfers have a fixed fee deducted from the amount sent in the ICS-20 message depending + // on the asset and destination chain + // they can be calculated here: https://docs.axelar.dev/resources/mainnet#cross-chain-relayer-gas-fee + BridgeFees github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=bridge_fees,json=bridgeFees,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"bridge_fees"` } func (m *ChainConfiguration) Reset() { *m = ChainConfiguration{} } @@ -432,6 +438,13 @@ func (m *ChainConfiguration) GetProxyAddress() string { return "" } +func (m *ChainConfiguration) GetBridgeFees() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.BridgeFees + } + return nil +} + type ChainConfigurations struct { Configurations []*ChainConfiguration `protobuf:"bytes,1,rep,name=configurations,proto3" json:"configurations,omitempty"` } @@ -615,49 +628,54 @@ func init() { func init() { proto.RegisterFile("axelarcork/v1/axelarcork.proto", fileDescriptor_f8790c2a041a4f43) } var fileDescriptor_f8790c2a041a4f43 = []byte{ - // 662 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xae, 0x93, 0x40, 0x93, 0x49, 0xfa, 0xc3, 0xa6, 0x55, 0xd3, 0x82, 0x42, 0x6a, 0x2e, 0xe1, - 0x40, 0xac, 0x06, 0x09, 0x24, 0x0e, 0x48, 0x6d, 0x7a, 0xa0, 0x02, 0x21, 0xe4, 0x82, 0x90, 0x90, - 0x90, 0xd9, 0xec, 0x0e, 0x8e, 0xe9, 0xc6, 0x6b, 0xad, 0x37, 0x51, 0xf2, 0x06, 0x1c, 0xb9, 0xf0, - 0x1c, 0x88, 0xb7, 0xe0, 0xd8, 0x23, 0x47, 0xd4, 0xbe, 0x08, 0xca, 0xda, 0x89, 0x93, 0xb4, 0xf4, - 0xc6, 0x6d, 0x66, 0xbe, 0x99, 0xd9, 0x6f, 0x66, 0xbf, 0x5d, 0xa8, 0xd3, 0x11, 0x0a, 0xaa, 0x98, - 0x54, 0x67, 0xce, 0xf0, 0xc0, 0xc9, 0xbc, 0x56, 0xa4, 0xa4, 0x96,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 0xdc, 0x66, 0xb0, 0x75, 0x0d, 0xad, 0x98, 0xbc, 0x84, 0x8d, 0x78, 0x1a, 0xf7, 0x26, - 0x47, 0xc7, 0x35, 0xab, 0x91, 0x6f, 0x96, 0xdb, 0xf6, 0x12, 0xc5, 0x6b, 0xaa, 0xdd, 0xf5, 0x59, - 0xa9, 0x69, 0x66, 0xff, 0xb4, 0x60, 0x73, 0x0e, 0xc6, 0x78, 0x20, 0xf4, 0x7f, 0x98, 0x7c, 0x0f, - 0x8a, 0x34, 0x8a, 0x94, 0x1c, 0x22, 0x37, 0x83, 0x17, 0xdd, 0x99, 0x4f, 0x1c, 0xa8, 0x26, 0x36, - 0x15, 0x5e, 0x84, 0x8a, 0x61, 0xa8, 0xa9, 0x8f, 0xe9, 0x22, 0xc8, 0x14, 0x7a, 0x33, 0x43, 0xec, - 0xf7, 0x70, 0x67, 0x99, 0x72, 0x4c, 0x8e, 0xa0, 0x32, 0x21, 0xe3, 0xa9, 0xc4, 0x4f, 0x57, 0x72, - 0xff, 0xdf, 0xdc, 0x4d, 0x9e, 0x5b, 0x66, 0x59, 0x0f, 0xfb, 0x19, 0x94, 0x3b, 0x28, 0x04, 0x55, - 0x27, 0xc7, 0xa7, 0xa8, 0x17, 0x74, 0x68, 0x2d, 0xea, 0x70, 0x13, 0xf2, 0x01, 0x8f, 0x6b, 0xb9, - 0x46, 0xbe, 0x59, 0x72, 0x27, 0xa6, 0xfd, 0x11, 0x48, 0x67, 0x02, 0x76, 0x64, 0xf8, 0x39, 0xf0, - 0x07, 0x8a, 0xea, 0x40, 0x86, 0x84, 0x40, 0x21, 0xa4, 0x7d, 0x34, 0xe5, 0x25, 0xd7, 0xd8, 0xe9, - 0x3d, 0x27, 0x4b, 0xca, 0x05, 0x9c, 0x3c, 0x80, 0xb5, 0x48, 0xc9, 0xd1, 0x78, 0x49, 0xc9, 0x15, - 0x13, 0x4c, 0x05, 0x6c, 0x7f, 0x82, 0xea, 0xd5, 0xf6, 0x31, 0x39,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c8, 0x9b, - 0xc6, 0x20, 0x56, 0x05, 0x00, 0x00, + // 752 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcd, 0x6e, 0xe4, 0x44, + 0x10, 0x8e, 0x67, 0x06, 0x36, 0x53, 0x33, 0x9b, 0x0d, 0x9d, 0xac, 0xd6, 0x09, 0xc8, 0x99, 0x35, + 0x97, 0xe1, 0xb0, 0x36, 0x09, 0x12, 0x48, 0x1c, 0x90, 0x36, 0xb3, 0x42, 0x44, 0x20, 0x84, 0xbc, + 0x20, 0x24, 0x2e, 0xa6, 0xa7, 0xbb, 0xd6, 0xd3, 0xa4, 0xc7, 0x6d, 0x75, 0xf7, 0x8c, 0x32, 0x6f, + 0xc0, 0x91, 0x0b, 0x2f, 0xc1, 0x05, 0xf1, 0x16, 0x2b, 0x71, 0xd9, 0x23, 0x27, 0x40, 0xc9, 0x8b, + 0x20, 0xb7, 0xed, 0xf9, 0xcb, 0x92, 0xdb, 0x9e, 0xdc, 0x55, 0x5f, 0x55, 0xf9, 0xeb, 0xaf, 0xaa, + 0x1a, 0x02, 0x7a, 0x85, 0x92, 0x6a, 0xa6, 0xf4, 0x65, 0x3c, 0x3f, 0x8d, 0x57, 0x56, 0x54, 0x68, + 0x65, 0x15, 0xb9, 0xbf, 0xe6, 0x99, 0x9f, 0x1e, 0x1f, 0x66, 0x2a, 0x53, 0x0e, 0x89, 0xcb, 0x53, + 0x15, 0x74, 0x1c, 0x30, 0x65, 0xa6, 0xca, 0xc4, 0x63, 0x6a, 0x30, 0x9e, 0x9f, 0x8e, 0xd1, 0xd2, + 0xd3, 0x98, 0x29, 0x91, 0x57, 0x78, 0xf8, 0xbb, 0x07, 0xf0, 0xd4, 0xd5, 0x19, 0x29, 0x7d, 0x49, + 0xce, 0xe0, 0x21, 0xe6, 0x4c, 0x71, 0xe4, 0x29, 0x53, 0xb9, 0xd5, 0x94, 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a7, 0x79, 0x6c, 0xd4, 0x74, 0x8a, + 0x52, 0xa0, 0x8e, 0xe7, 0x9f, 0xc4, 0x57, 0x6b, 0x8f, 0x77, 0xd5, 0xc3, 0xf1, 0xdb, 0xee, 0xf9, + 0xfd, 0xe8, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x18, 0x87, 0x4c, 0x2b, 0xe5, 0x05, 0x00, 0x00, } func (m *AxelarCork) Marshal() (dAtA []byte, err error) { @@ -949,6 +967,20 @@ func (m *ChainConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.BridgeFees) > 0 { + for iNdEx := len(m.BridgeFees) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.BridgeFees[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAxelarcork(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } if len(m.ProxyAddress) > 0 { i -= len(m.ProxyAddress) copy(dAtA[i:], m.ProxyAddress) @@ -1234,6 +1266,12 @@ func (m *ChainConfiguration) Size() (n int) { if l > 0 { n += 1 + l + sovAxelarcork(uint64(l)) } + if len(m.BridgeFees) > 0 { + for _, e := range m.BridgeFees { + l = e.Size() + n += 1 + l + sovAxelarcork(uint64(l)) + } + } return n } @@ -2157,6 +2195,40 @@ func (m *ChainConfiguration) Unmarshal(dAtA []byte) error { } m.ProxyAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BridgeFees", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAxelarcork + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAxelarcork + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAxelarcork + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BridgeFees = append(m.BridgeFees, types.Coin{}) + if err := m.BridgeFees[len(m.BridgeFees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipAxelarcork(dAtA[iNdEx:]) diff --git a/x/axelarcork/types/chain_config.go b/x/axelarcork/types/chain_config.go index dbbdf6450..c809fc5da 100644 --- a/x/axelarcork/types/chain_config.go +++ b/x/axelarcork/types/chain_config.go @@ -24,5 +24,9 @@ func (cc ChainConfiguration) ValidateBasic() error { return fmt.Errorf("chain name cannot be empty") } + if !cc.BridgeFees.IsValid() { + return fmt.Errorf("bridge fee coins must be valid") + } + return nil } diff --git a/x/axelarcork/types/expected_keepers.go b/x/axelarcork/types/expected_keepers.go index 7384b1737..d7bc1025e 100644 --- a/x/axelarcork/types/expected_keepers.go +++ b/x/axelarcork/types/expected_keepers.go @@ -17,6 +17,7 @@ import ( clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" ibcexported "github.com/cosmos/ibc-go/v6/modules/core/exported" + pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" ) // AccountKeeper defines the expected account keeper. @@ -80,3 +81,9 @@ type DistributionKeeper interface { type GravityKeeper interface { GetOrchestratorValidatorAddress(ctx sdk.Context, orchAddr sdk.AccAddress) sdk.ValAddress } + +type PubsubKeeper interface { + GetPublisher(ctx sdk.Context, publisherDomain string) (publisher pubsubtypes.Publisher, found bool) + SetDefaultSubscription(ctx sdk.Context, defaultSubscription pubsubtypes.DefaultSubscription) + DeleteDefaultSubscription(ctx sdk.Context, subscriptionID string) +} diff --git a/x/axelarcork/types/msgs.go b/x/axelarcork/types/msgs.go index 03fc27024..0492627d0 100644 --- a/x/axelarcork/types/msgs.go +++ b/x/axelarcork/types/msgs.go @@ -56,6 +56,10 @@ func (m *MsgScheduleAxelarCorkRequest) ValidateBasic() error { return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) } + if m.ChainId == 0 { + return fmt.Errorf("chain ID must be non-zero") + } + if m.BlockHeight == 0 { return fmt.Errorf("block height must be greater than zero") } @@ -109,7 +113,7 @@ func (m *MsgRelayAxelarCorkRequest) ValidateBasic() error { return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) } - if !m.Token.IsPositive() { + if !m.Token.IsValid() || !m.Token.IsPositive() { return fmt.Errorf("token amount must be positive") } @@ -179,7 +183,7 @@ func (m *MsgRelayAxelarProxyUpgradeRequest) ValidateBasic() error { return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) } - if !m.Token.IsPositive() { + if !m.Token.IsValid() || !m.Token.IsPositive() { return fmt.Errorf("token amount must be positive") } @@ -238,7 +242,7 @@ func (m *MsgBumpAxelarCorkGasRequest) ValidateBasic() error { return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) } - if !m.Token.IsPositive() { + if !m.Token.IsValid() || !m.Token.IsPositive() { return fmt.Errorf("token amount must be positive") } diff --git a/x/axelarcork/types/proposal.go b/x/axelarcork/types/proposal.go index d72d6dd36..bddd0c3b4 100644 --- a/x/axelarcork/types/proposal.go +++ b/x/axelarcork/types/proposal.go @@ -9,6 +9,7 @@ import ( errorsmod "cosmossdk.io/errors" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/ethereum/go-ethereum/common" + pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" ) const ( @@ -65,12 +66,13 @@ func init() { govtypesv1beta1.ModuleCdc.RegisterConcrete(&CancelAxelarProxyContractUpgradeProposal{}, "sommelier/CancelAxelarProxyContractUpgradeProposal", nil) } -func NewAddAxelarManagedCellarIDsProposal(title string, description string, chainID uint64, cellarIds *CellarIDSet) *AddAxelarManagedCellarIDsProposal { +func NewAddAxelarManagedCellarIDsProposal(title string, description string, chainID uint64, cellarIds *CellarIDSet, publisherDomain string) *AddAxelarManagedCellarIDsProposal { return &AddAxelarManagedCellarIDsProposal{ - Title: title, - Description: description, - CellarIds: cellarIds, - ChainId: chainID, + Title: title, + Description: description, + CellarIds: cellarIds, + ChainId: chainID, + PublisherDomain: publisherDomain, } } @@ -95,6 +97,10 @@ func (m *AddAxelarManagedCellarIDsProposal) ValidateBasic() error { return fmt.Errorf("chain ID must be non-zero") } + if err := pubsubtypes.ValidateDomain(m.PublisherDomain); err != nil { + return err + } + return nil } @@ -214,7 +220,7 @@ func (m *AxelarCommunityPoolSpendProposal) ValidateBasic() error { return fmt.Errorf("chain ID must be non-zero") } - if !m.Amount.Amount.IsPositive() { + if !m.Amount.IsValid() || !m.Amount.IsPositive() { return ErrValuelessSend } diff --git a/x/axelarcork/types/proposal.pb.go b/x/axelarcork/types/proposal.pb.go index 11f98ca9e..2df397228 100644 --- a/x/axelarcork/types/proposal.pb.go +++ b/x/axelarcork/types/proposal.pb.go @@ -25,10 +25,11 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type AddAxelarManagedCellarIDsProposal struct { - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - ChainId uint64 `protobuf:"varint,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - CellarIds *CellarIDSet `protobuf:"bytes,4,opt,name=cellar_ids,json=cellarIds,proto3" json:"cellar_ids,omitempty"` + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + ChainId uint64 `protobuf:"varint,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + CellarIds *CellarIDSet `protobuf:"bytes,4,opt,name=cellar_ids,json=cellarIds,proto3" json:"cellar_ids,omitempty"` + PublisherDomain string `protobuf:"bytes,5,opt,name=publisher_domain,json=publisherDomain,proto3" json:"publisher_domain,omitempty"` } func (m *AddAxelarManagedCellarIDsProposal) Reset() { *m = AddAxelarManagedCellarIDsProposal{} } @@ -92,13 +93,21 @@ func (m *AddAxelarManagedCellarIDsProposal) GetCellarIds() *CellarIDSet { return nil } +func (m *AddAxelarManagedCellarIDsProposal) GetPublisherDomain() string { + if m != nil { + return m.PublisherDomain + } + return "" +} + // AddAxelarManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands type AddAxelarManagedCellarIDsProposalWithDeposit struct { - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - ChainId uint64 `protobuf:"varint,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - CellarIds []string `protobuf:"bytes,4,rep,name=cellar_ids,json=cellarIds,proto3" json:"cellar_ids,omitempty"` - Deposit string `protobuf:"bytes,5,opt,name=deposit,proto3" json:"deposit,omitempty"` + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + ChainId uint64 `protobuf:"varint,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + CellarIds []string `protobuf:"bytes,4,rep,name=cellar_ids,json=cellarIds,proto3" json:"cellar_ids,omitempty"` + PublisherDomain string `protobuf:"bytes,5,opt,name=publisher_domain,json=publisherDomain,proto3" json:"publisher_domain,omitempty"` + Deposit string `protobuf:"bytes,6,opt,name=deposit,proto3" json:"deposit,omitempty"` } func (m *AddAxelarManagedCellarIDsProposalWithDeposit) Reset() { @@ -166,6 +175,13 @@ func (m *AddAxelarManagedCellarIDsProposalWithDeposit) GetCellarIds() []string { return nil } +func (m *AddAxelarManagedCellarIDsProposalWithDeposit) GetPublisherDomain() string { + if m != nil { + return m.PublisherDomain + } + return "" +} + func (m *AddAxelarManagedCellarIDsProposalWithDeposit) GetDeposit() string { if m != nil { return m.Deposit @@ -1225,64 +1241,66 @@ func init() { func init() { proto.RegisterFile("axelarcork/v1/proposal.proto", fileDescriptor_5ffc5027adef0afd) } var fileDescriptor_5ffc5027adef0afd = []byte{ - // 909 bytes of a gzipped FileDescriptorProto + // 936 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x57, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0xa4, 0x6e, 0x12, 0x8f, 0x53, 0xda, 0x6e, 0x03, 0x6c, 0x43, 0xeb, 0x75, 0x56, 0xa8, - 0x32, 0x50, 0x76, 0x15, 0x57, 0x22, 0x90, 0x5b, 0xbc, 0x15, 0x22, 0xa8, 0x48, 0x91, 0x23, 0x84, - 0xc4, 0xc5, 0x1a, 0xef, 0x0c, 0xeb, 0x69, 0x76, 0x67, 0x56, 0xb3, 0x63, 0x37, 0x3e, 0x70, 0xef, - 0x91, 0x23, 0xe2, 0x64, 0xc1, 0x91, 0x13, 0x12, 0x27, 0x24, 0x8e, 0x48, 0x39, 0x86, 0x1b, 0xe2, - 0x60, 0xa1, 0xe4, 0xc2, 0xd9, 0x7f, 0x01, 0xf2, 0xcc, 0xda, 0xd9, 0x4d, 0x9a, 0xa4, 0x28, 0xb1, - 0xf8, 0x71, 0xf3, 0xbc, 0x6f, 0x66, 0xdf, 0xf7, 0x7d, 0xfb, 0xe6, 0xbd, 0x35, 0xbc, 0x87, 0xf6, - 0x48, 0x88, 0x84, 0xcf, 0xc5, 0xae, 0xdb, 0x5b, 0x73, 0x63, 0xc1, 0x63, 0x9e, 0xa0, 0xd0, 0x89, - 0x05, 0x97, 0xdc, 0xb8, 0x71, 0x8c, 0x3a, 0xbd, 0xb5, 0x95, 0x4a, 0x7e, 0x73, 0x06, 0x54, 0xdb, - 0x57, 0x96, 0x03, 0x1e, 0x70, 0xf5, 0xd3, 0x1d, 0xff, 0x4a, 0xa3, 0x15, 0x9f, 0x27, 0x11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0xfd, 0x98, 0x24, 0xed, 0x79, 0xf5, 0x1d, 0xf0, 0xe8, 0xaf, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x42, 0x4e, 0xb9, 0x87, 0x0d, 0x00, 0x00, + 0x14, 0xf6, 0xa4, 0xce, 0x0f, 0x8f, 0x53, 0x92, 0x6e, 0x53, 0xd8, 0x86, 0xd6, 0xeb, 0xac, 0x50, + 0xe5, 0x42, 0xd9, 0x55, 0x5c, 0x89, 0x40, 0x6e, 0xf1, 0x46, 0x88, 0xa0, 0x22, 0x45, 0x8e, 0x10, + 0x12, 0x17, 0x6b, 0xbc, 0x33, 0xac, 0xa7, 0xd9, 0x9d, 0x59, 0xcd, 0xae, 0xdd, 0xf8, 0xc0, 0xbd, + 0x47, 0x8e, 0x88, 0x93, 0x05, 0x47, 0xae, 0x5c, 0x39, 0x22, 0xe5, 0x18, 0x6e, 0x08, 0x21, 0x0b, + 0x25, 0x42, 0xe2, 0xec, 0xbf, 0x00, 0x79, 0x66, 0xed, 0xec, 0x26, 0x8d, 0x53, 0x48, 0xad, 0x88, + 0xde, 0x3c, 0xef, 0x7b, 0xbb, 0xf3, 0x7d, 0xdf, 0xbc, 0x7d, 0x6f, 0x0c, 0xef, 0xa1, 0x03, 0xe2, + 0x23, 0xe1, 0x72, 0xb1, 0x6f, 0x77, 0xd6, 0xed, 0x50, 0xf0, 0x90, 0x47, 0xc8, 0xb7, 0x42, 0xc1, + 0x63, 0xae, 0xdd, 0x3c, 0x45, 0xad, 0xce, 0xfa, 0x6a, 0x29, 0x9b, 0x9c, 0x02, 0x65, 0xfa, 0xea, + 0x8a, 0xc7, 0x3d, 0x2e, 0x7f, 0xda, 0xc3, 0x5f, 0x49, 0xb4, 0xe4, 0xf2, 0x28, 0xe0, 0x91, 0xdd, + 0x44, 0x11, 0xb1, 0x3b, 0xeb, 0x4d, 0x12, 0xa3, 0x75, 0xdb, 0xe5, 0x94, 0x29, 0xdc, 0xfc, 0x03, + 0xc0, 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, 0x77, 0x36, 0xec, 0x83, 0xd4, 0xff, 0x30, + 0x3b, 0xee, 0x86, 0x24, 0x6a, 0xce, 0xc9, 0x7b, 0xc0, 0xe3, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, + 0x3a, 0x37, 0xd0, 0x38, 0xdd, 0x0d, 0x00, 0x00, } func (m *AddAxelarManagedCellarIDsProposal) Marshal() (dAtA []byte, err error) { @@ -1305,6 +1323,13 @@ func (m *AddAxelarManagedCellarIDsProposal) MarshalToSizedBuffer(dAtA []byte) (i _ = i var l int _ = l + if len(m.PublisherDomain) > 0 { + i -= len(m.PublisherDomain) + copy(dAtA[i:], m.PublisherDomain) + i = encodeVarintProposal(dAtA, i, uint64(len(m.PublisherDomain))) + i-- + dAtA[i] = 0x2a + } if m.CellarIds != nil { { size, err := m.CellarIds.MarshalToSizedBuffer(dAtA[:i]) @@ -1364,6 +1389,13 @@ func (m *AddAxelarManagedCellarIDsProposalWithDeposit) MarshalToSizedBuffer(dAtA copy(dAtA[i:], m.Deposit) i = encodeVarintProposal(dAtA, i, uint64(len(m.Deposit))) i-- + dAtA[i] = 0x32 + } + if len(m.PublisherDomain) > 0 { + i -= len(m.PublisherDomain) + copy(dAtA[i:], m.PublisherDomain) + i = encodeVarintProposal(dAtA, i, uint64(len(m.PublisherDomain))) + i-- dAtA[i] = 0x2a } if len(m.CellarIds) > 0 { @@ -2194,6 +2226,10 @@ func (m *AddAxelarManagedCellarIDsProposal) Size() (n int) { l = m.CellarIds.Size() n += 1 + l + sovProposal(uint64(l)) } + l = len(m.PublisherDomain) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } return n } @@ -2220,6 +2256,10 @@ func (m *AddAxelarManagedCellarIDsProposalWithDeposit) Size() (n int) { n += 1 + l + sovProposal(uint64(l)) } } + l = len(m.PublisherDomain) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } l = len(m.Deposit) if l > 0 { n += 1 + l + sovProposal(uint64(l)) @@ -2751,6 +2791,38 @@ func (m *AddAxelarManagedCellarIDsProposal) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublisherDomain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + 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 ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PublisherDomain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipProposal(dAtA[iNdEx:]) @@ -2917,6 +2989,38 @@ func (m *AddAxelarManagedCellarIDsProposalWithDeposit) Unmarshal(dAtA []byte) er m.CellarIds = append(m.CellarIds, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublisherDomain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + 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 ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PublisherDomain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) } diff --git a/x/cork/client/cli/tx.go b/x/cork/client/cli/tx.go index 91415244b..0a21c09b2 100644 --- a/x/cork/client/cli/tx.go +++ b/x/cork/client/cli/tx.go @@ -12,6 +12,7 @@ import ( govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/ethereum/go-ethereum/common" types "github.com/peggyjv/sommelier/v7/x/cork/types" + pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" "github.com/spf13/cobra" ) @@ -49,6 +50,7 @@ Where proposal.json contains: "title": "Dollary-doos LP Cellar Proposal", "description": "I have a hunch", "cellar_ids": ["0x123801a7D398351b8bE11C439e05C5B3259aeC9B", "0x456801a7D398351b8bE11C439e05C5B3259aeC9B"], + "publisher_domain": "example.com", "deposit": "10000usomm" } `, @@ -82,10 +84,16 @@ Where proposal.json contains: } } + if err := pubsubtypes.ValidateDomain(proposal.PublisherDomain); err != nil { + return err + } + content := types.NewAddManagedCellarIDsProposal( proposal.Title, proposal.Description, - &types.CellarIDSet{Ids: proposal.CellarIds}) + &types.CellarIDSet{Ids: proposal.CellarIds}, + proposal.PublisherDomain, + ) from := clientCtx.GetFromAddress() msg, err := govtypesv1beta1.NewMsgSubmitProposal(content, deposit, from) diff --git a/x/cork/client/cli/tx_test.go b/x/cork/client/cli/tx_test.go index baf7dbc7d..fea558c6a 100644 --- a/x/cork/client/cli/tx_test.go +++ b/x/cork/client/cli/tx_test.go @@ -19,6 +19,7 @@ func TestParseAddManagedCellarsProposal(t *testing.T) { "title": "Dollary-doos LP Cellar Proposal", "description": "I have a hunch", "cellar_ids": ["0x123801a7D398351b8bE11C439e05C5B3259aeC9B", "0x456801a7D398351b8bE11C439e05C5B3259aeC9B"], + "publisher_domain": "example.com", "deposit": "1000stake" } `) @@ -34,6 +35,7 @@ func TestParseAddManagedCellarsProposal(t *testing.T) { require.Equal(t, "I have a hunch", proposal.Description) require.Equal(t, "0x123801a7D398351b8bE11C439e05C5B3259aeC9B", proposal.CellarIds[0]) require.Equal(t, "0x456801a7D398351b8bE11C439e05C5B3259aeC9B", proposal.CellarIds[1]) + require.Equal(t, "example.com", proposal.PublisherDomain) require.Equal(t, "1000stake", proposal.Deposit) } diff --git a/x/cork/keeper/genesis.go b/x/cork/keeper/genesis.go index 1adbeb5c3..5513cb0ab 100644 --- a/x/cork/keeper/genesis.go +++ b/x/cork/keeper/genesis.go @@ -33,7 +33,7 @@ func InitGenesis(ctx sdk.Context, k Keeper, gs types.GenesisState) { func ExportGenesis(ctx sdk.Context, k Keeper) types.GenesisState { var ids types.CellarIDSet for _, id := range k.GetCellarIDs(ctx) { - ids.Ids = append(ids.Ids, id.Hex()) + ids.Ids = append(ids.Ids, id.String()) } return types.GenesisState{ diff --git a/x/cork/keeper/keeper.go b/x/cork/keeper/keeper.go index 6058bab02..6fd3cf53c 100644 --- a/x/cork/keeper/keeper.go +++ b/x/cork/keeper/keeper.go @@ -22,12 +22,13 @@ type Keeper struct { paramSpace paramtypes.Subspace stakingKeeper types.StakingKeeper gravityKeeper types.GravityKeeper + pubsubKeeper types.PubsubKeeper } // NewKeeper creates a new x/cork Keeper instance func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, - stakingKeeper types.StakingKeeper, gravityKeeper types.GravityKeeper, + stakingKeeper types.StakingKeeper, gravityKeeper types.GravityKeeper, pubsubKeeper types.PubsubKeeper, ) Keeper { // set KeyTable if it has not already been set if !paramSpace.HasKeyTable() { @@ -40,6 +41,7 @@ func NewKeeper( paramSpace: paramSpace, stakingKeeper: stakingKeeper, gravityKeeper: gravityKeeper, + pubsubKeeper: pubsubKeeper, } } diff --git a/x/cork/keeper/keeper_test.go b/x/cork/keeper/keeper_test.go index ec42e1208..abb2800ef 100644 --- a/x/cork/keeper/keeper_test.go +++ b/x/cork/keeper/keeper_test.go @@ -30,6 +30,7 @@ type KeeperTestSuite struct { ctx sdk.Context corkKeeper Keeper gravityKeeper *corktestutil.MockGravityKeeper + pubsubKeeper *corktestutil.MockPubsubKeeper stakingKeeper *corktestutil.MockStakingKeeper validator *corktestutil.MockValidatorI @@ -50,6 +51,7 @@ func (suite *KeeperTestSuite) SetupTest() { defer ctrl.Finish() suite.gravityKeeper = corktestutil.NewMockGravityKeeper(ctrl) + suite.pubsubKeeper = corktestutil.NewMockPubsubKeeper(ctrl) suite.stakingKeeper = corktestutil.NewMockStakingKeeper(ctrl) suite.validator = corktestutil.NewMockValidatorI(ctrl) suite.ctx = ctx @@ -71,6 +73,7 @@ func (suite *KeeperTestSuite) SetupTest() { subSpace, suite.stakingKeeper, suite.gravityKeeper, + suite.pubsubKeeper, ) types.RegisterInterfaces(encCfg.InterfaceRegistry) diff --git a/x/cork/keeper/migrations.go b/x/cork/keeper/migrations.go index 73ed92149..a22ae6fd3 100644 --- a/x/cork/keeper/migrations.go +++ b/x/cork/keeper/migrations.go @@ -17,5 +17,9 @@ func NewMigrator(keeper Keeper) Migrator { // Migrate1to2 migrates from consensus version 1 to 2. func (m Migrator) Migrate1to2(ctx sdk.Context) error { + if err := v1.MigrateParamStore(ctx, m.keeper.paramSpace); err != nil { + return err + } + return v1.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc) } diff --git a/x/cork/keeper/proposal_handler.go b/x/cork/keeper/proposal_handler.go index 5627a4a61..b19fbf746 100644 --- a/x/cork/keeper/proposal_handler.go +++ b/x/cork/keeper/proposal_handler.go @@ -1,32 +1,50 @@ package keeper import ( + "fmt" "sort" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" "github.com/peggyjv/sommelier/v7/x/cork/types" + pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" ) +func NewEthereumSubscriptionID(address common.Address) string { + return fmt.Sprintf("1:%s", address.String()) +} + // HandleAddManagedCellarsProposal is a handler for executing a passed community cellar addition proposal func HandleAddManagedCellarsProposal(ctx sdk.Context, k Keeper, p types.AddManagedCellarIDsProposal) error { - cellarIDs := k.GetCellarIDs(ctx) + _, publisherFound := k.pubsubKeeper.GetPublisher(ctx, p.PublisherDomain) + if !publisherFound { + return fmt.Errorf("not an approved publisher: %s", p.PublisherDomain) + } + + cellarAddresses := k.GetCellarIDs(ctx) for _, proposedCellarID := range p.CellarIds.Ids { + proposedCellarAddress := common.HexToAddress(proposedCellarID) found := false - for _, id := range cellarIDs { - if id == common.HexToAddress(proposedCellarID) { + for _, id := range cellarAddresses { + if id == proposedCellarAddress { found = true } } if !found { - cellarIDs = append(cellarIDs, common.HexToAddress(proposedCellarID)) + cellarAddresses = append(cellarAddresses, proposedCellarAddress) + subscriptionID := NewEthereumSubscriptionID(proposedCellarAddress) + defaultSubscription := pubsubtypes.DefaultSubscription{ + SubscriptionId: subscriptionID, + PublisherDomain: p.PublisherDomain, + } + k.pubsubKeeper.SetDefaultSubscription(ctx, defaultSubscription) } } - idStrings := make([]string, len(cellarIDs)) - for i, cid := range cellarIDs { + idStrings := make([]string, len(cellarAddresses)) + for i, cid := range cellarAddresses { idStrings[i] = cid.String() } @@ -49,11 +67,16 @@ func HandleRemoveManagedCellarsProposal(ctx sdk.Context, k Keeper, p types.Remov } if !found { - outputCellarIDs.Ids = append(outputCellarIDs.Ids, existingID.Hex()) + outputCellarIDs.Ids = append(outputCellarIDs.Ids, existingID.String()) } } k.SetCellarIDs(ctx, outputCellarIDs) + for _, cellarToDelete := range p.CellarIds.Ids { + subscriptionID := NewEthereumSubscriptionID(common.HexToAddress(cellarToDelete)) + k.pubsubKeeper.DeleteDefaultSubscription(ctx, subscriptionID) + } + return nil } diff --git a/x/cork/keeper/query_server.go b/x/cork/keeper/query_server.go index b923e2fd0..13869c7c8 100644 --- a/x/cork/keeper/query_server.go +++ b/x/cork/keeper/query_server.go @@ -34,7 +34,7 @@ func (k Keeper) QueryCellarIDs(c context.Context, req *types.QueryCellarIDsReque response := &types.QueryCellarIDsResponse{} for _, id := range k.GetCellarIDs(ctx) { - response.CellarIds = append(response.CellarIds, id.Hex()) + response.CellarIds = append(response.CellarIds, id.String()) } return response, nil diff --git a/x/cork/keeper/setup_unit_test.go b/x/cork/keeper/setup_unit_test.go index 78da566e0..f97e5bb9f 100644 --- a/x/cork/keeper/setup_unit_test.go +++ b/x/cork/keeper/setup_unit_test.go @@ -27,6 +27,7 @@ import ( type mocksForCork struct { mockStakingKeeper *mock.MockStakingKeeper mockGravityKeeper *mock.MockGravityKeeper + mockPubsubKeeper *mock.MockPubsubKeeper mockValidator *mock.MockValidatorI } @@ -59,6 +60,7 @@ func setupCorkKeeper(t *testing.T) ( ctrl := gomock.NewController(t) mockStakingKeeper := mock.NewMockStakingKeeper(ctrl) mockGravityKeeper := mock.NewMockGravityKeeper(ctrl) + mockPubsubKeeper := mock.NewMockPubsubKeeper(ctrl) k := NewKeeper( protoCodec, @@ -66,6 +68,7 @@ func setupCorkKeeper(t *testing.T) ( subSpace, mockStakingKeeper, mockGravityKeeper, + mockPubsubKeeper, ) ctx := sdk.NewContext(commitMultiStore, tmproto.Header{}, false, log.NewNopLogger()) @@ -73,6 +76,7 @@ func setupCorkKeeper(t *testing.T) ( return k, ctx, mocksForCork{ mockStakingKeeper: mockStakingKeeper, mockGravityKeeper: mockGravityKeeper, + mockPubsubKeeper: mockPubsubKeeper, mockValidator: mock.NewMockValidatorI(ctrl), }, ctrl } diff --git a/x/cork/keeper/test_common.go b/x/cork/keeper/test_common.go index 3d27ba7fb..e073c38c5 100644 --- a/x/cork/keeper/test_common.go +++ b/x/cork/keeper/test_common.go @@ -59,6 +59,8 @@ import ( gravitykeeper "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/keeper" gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" "github.com/peggyjv/sommelier/v7/x/cork/types" + pubsubkeeper "github.com/peggyjv/sommelier/v7/x/pubsub/keeper" + pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -216,6 +218,7 @@ func CreateTestEnv(t *testing.T) TestInput { // Initialize store keys keyGravity := sdk.NewKVStoreKey(gravitytypes.StoreKey) + keyPubsub := sdk.NewKVStoreKey(pubsubtypes.StoreKey) keyAcc := sdk.NewKVStoreKey(authtypes.StoreKey) keyStaking := sdk.NewKVStoreKey(stakingtypes.StoreKey) keyBank := sdk.NewKVStoreKey(banktypes.StoreKey) @@ -366,6 +369,14 @@ func CreateTestEnv(t *testing.T) TestInput { senderModuleAccounts, ) + pubsubKeeper := pubsubkeeper.NewKeeper( + marshaler, + keyPubsub, + getSubspace(paramsKeeper, pubsubtypes.DefaultParamspace), + stakingKeeper, + gravityKeeper, + ) + stakingKeeper = *stakingKeeper.SetHooks( stakingtypes.NewMultiStakingHooks( distKeeper.Hooks(), @@ -380,6 +391,7 @@ func CreateTestEnv(t *testing.T) TestInput { getSubspace(paramsKeeper, types.DefaultParamspace), stakingKeeper, gravityKeeper, + pubsubKeeper, ) k.SetParams(ctx, TestingcorkParams) diff --git a/x/cork/migrations/v1/store.go b/x/cork/migrations/v1/store.go index c4de88460..f196c7ee2 100644 --- a/x/cork/migrations/v1/store.go +++ b/x/cork/migrations/v1/store.go @@ -8,7 +8,9 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/cork/migrations/v1/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + v1types "github.com/peggyjv/sommelier/v7/x/cork/migrations/v1/types" + "github.com/peggyjv/sommelier/v7/x/cork/types" ) func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error { @@ -24,47 +26,56 @@ func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.Binar return nil } +func MigrateParamStore(ctx sdk.Context, subspace paramstypes.Subspace) error { + // Don't want to overwrite values if they were set in an upgrade handler + if !subspace.Has(ctx, types.KeyMaxCorksPerValidator) { + subspace.Set(ctx, types.KeyMaxCorksPerValidator, types.DefaultParams().MaxCorksPerValidator) + } + + return nil +} + func removeCommitPeriod(store storetypes.KVStore) { - store.Delete([]byte{types.CommitPeriodStartKey}) + store.Delete([]byte{v1types.CommitPeriodStartKey}) } // wipe away all existing cork state during upgrade -- there shouldn't be in-transit corks // during the upgrade func removeOldCorks(store storetypes.KVStore, cdc codec.BinaryCodec) { - var validatorCorks []*types.ValidatorCork - iter := sdk.KVStorePrefixIterator(store, []byte{types.CorkForAddressKeyPrefix}) + var validatorCorks []*v1types.ValidatorCork + iter := sdk.KVStorePrefixIterator(store, []byte{v1types.CorkForAddressKeyPrefix}) defer iter.Close() for ; iter.Valid(); iter.Next() { - keyBytes := bytes.NewBuffer(bytes.TrimPrefix(iter.Key(), []byte{types.CorkForAddressKeyPrefix})) + keyBytes := bytes.NewBuffer(bytes.TrimPrefix(iter.Key(), []byte{v1types.CorkForAddressKeyPrefix})) val := sdk.ValAddress(keyBytes.Next(20)) - var cork types.Cork + var cork v1types.Cork cdc.MustUnmarshal(iter.Value(), &cork) - validatorCorks = append(validatorCorks, &types.ValidatorCork{ + validatorCorks = append(validatorCorks, &v1types.ValidatorCork{ Cork: &cork, Validator: val.String(), }) } for _, validatorCork := range validatorCorks { - store.Delete(types.GetCorkForValidatorAddressKey( + store.Delete(v1types.GetCorkForValidatorAddressKey( sdk.ValAddress(validatorCork.Validator), common.HexToAddress(validatorCork.Cork.TargetContractAddress), )) } - var scheduledCorks []*types.ScheduledCork - iter = sdk.KVStorePrefixIterator(store, []byte{types.ScheduledCorkKeyPrefix}) + var scheduledCorks []*v1types.ScheduledCork + iter = sdk.KVStorePrefixIterator(store, []byte{v1types.ScheduledCorkKeyPrefix}) defer iter.Close() for ; iter.Valid(); iter.Next() { - var cork types.Cork + var cork v1types.Cork keyPair := bytes.NewBuffer(iter.Key()) keyPair.Next(1) // trim prefix byte blockHeight := sdk.BigEndianToUint64(keyPair.Next(8)) val := sdk.ValAddress(keyPair.Next(20)) cdc.MustUnmarshal(iter.Value(), &cork) - scheduledCorks = append(scheduledCorks, &types.ScheduledCork{ + scheduledCorks = append(scheduledCorks, &v1types.ScheduledCork{ Cork: &cork, BlockHeight: blockHeight, Validator: val.String(), @@ -72,7 +83,7 @@ func removeOldCorks(store storetypes.KVStore, cdc codec.BinaryCodec) { } for _, scheduledCork := range scheduledCorks { - store.Delete(types.GetScheduledCorkKey( + store.Delete(v1types.GetScheduledCorkKey( scheduledCork.BlockHeight, sdk.ValAddress(scheduledCork.Validator), common.HexToAddress(scheduledCork.Cork.TargetContractAddress), diff --git a/x/cork/mock/mocks.go b/x/cork/mock/mocks.go index f51a24476..b0e2f8a87 100644 --- a/x/cork/mock/mocks.go +++ b/x/cork/mock/mocks.go @@ -13,6 +13,7 @@ import ( common "github.com/ethereum/go-ethereum/common" gomock "github.com/golang/mock/gomock" types1 "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" + types2 "github.com/peggyjv/sommelier/v7/x/pubsub/types" bytes "github.com/tendermint/tendermint/libs/bytes" ) @@ -54,10 +55,10 @@ func (mr *MockStakingKeeperMockRecorder) GetBondedValidatorsByPower(ctx interfac } // GetLastTotalPower mocks base method. -func (m *MockStakingKeeper) GetLastTotalPower(ctx types.Context) types.Int { +func (m *MockStakingKeeper) GetLastTotalPower(ctx types.Context) math.Int { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetLastTotalPower", ctx) - ret0, _ := ret[0].(types.Int) + ret0, _ := ret[0].(math.Int) return ret0 } @@ -130,10 +131,10 @@ func (mr *MockStakingKeeperMockRecorder) Jail(arg0, arg1 interface{}) *gomock.Ca } // PowerReduction mocks base method. -func (m *MockStakingKeeper) PowerReduction(ctx types.Context) types.Int { +func (m *MockStakingKeeper) PowerReduction(ctx types.Context) math.Int { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "PowerReduction", ctx) - ret0, _ := ret[0].(types.Int) + ret0, _ := ret[0].(math.Int) return ret0 } @@ -287,3 +288,65 @@ func (mr *MockGravityKeeperMockRecorder) SetOutgoingTx(ctx, outgoing interface{} mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOutgoingTx", reflect.TypeOf((*MockGravityKeeper)(nil).SetOutgoingTx), ctx, outgoing) } + +// MockPubsubKeeper is a mock of PubsubKeeper interface. +type MockPubsubKeeper struct { + ctrl *gomock.Controller + recorder *MockPubsubKeeperMockRecorder +} + +// MockPubsubKeeperMockRecorder is the mock recorder for MockPubsubKeeper. +type MockPubsubKeeperMockRecorder struct { + mock *MockPubsubKeeper +} + +// NewMockPubsubKeeper creates a new mock instance. +func NewMockPubsubKeeper(ctrl *gomock.Controller) *MockPubsubKeeper { + mock := &MockPubsubKeeper{ctrl: ctrl} + mock.recorder = &MockPubsubKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockPubsubKeeper) EXPECT() *MockPubsubKeeperMockRecorder { + return m.recorder +} + +// DeleteDefaultSubscription mocks base method. +func (m *MockPubsubKeeper) DeleteDefaultSubscription(ctx types.Context, subscriptionID string) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "DeleteDefaultSubscription", ctx, subscriptionID) +} + +// DeleteDefaultSubscription indicates an expected call of DeleteDefaultSubscription. +func (mr *MockPubsubKeeperMockRecorder) DeleteDefaultSubscription(ctx, subscriptionID interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDefaultSubscription", reflect.TypeOf((*MockPubsubKeeper)(nil).DeleteDefaultSubscription), ctx, subscriptionID) +} + +// GetPublisher mocks base method. +func (m *MockPubsubKeeper) GetPublisher(ctx types.Context, publisherDomain string) (types2.Publisher, bool) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPublisher", ctx, publisherDomain) + ret0, _ := ret[0].(types2.Publisher) + ret1, _ := ret[1].(bool) + return ret0, ret1 +} + +// GetPublisher indicates an expected call of GetPublisher. +func (mr *MockPubsubKeeperMockRecorder) GetPublisher(ctx, publisherDomain interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPublisher", reflect.TypeOf((*MockPubsubKeeper)(nil).GetPublisher), ctx, publisherDomain) +} + +// SetDefaultSubscription mocks base method. +func (m *MockPubsubKeeper) SetDefaultSubscription(ctx types.Context, defaultSubscription types2.DefaultSubscription) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetDefaultSubscription", ctx, defaultSubscription) +} + +// SetDefaultSubscription indicates an expected call of SetDefaultSubscription. +func (mr *MockPubsubKeeperMockRecorder) SetDefaultSubscription(ctx, defaultSubscription interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDefaultSubscription", reflect.TypeOf((*MockPubsubKeeper)(nil).SetDefaultSubscription), ctx, defaultSubscription) +} diff --git a/x/cork/testutil/expected_keepers_mocks.go b/x/cork/testutil/expected_keepers_mocks.go index e1db9975c..97fd6d846 100644 --- a/x/cork/testutil/expected_keepers_mocks.go +++ b/x/cork/testutil/expected_keepers_mocks.go @@ -13,6 +13,7 @@ import ( common "github.com/ethereum/go-ethereum/common" gomock "github.com/golang/mock/gomock" types1 "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" + types2 "github.com/peggyjv/sommelier/v7/x/pubsub/types" bytes "github.com/tendermint/tendermint/libs/bytes" ) @@ -54,10 +55,10 @@ func (mr *MockStakingKeeperMockRecorder) GetBondedValidatorsByPower(ctx interfac } // GetLastTotalPower mocks base method. -func (m *MockStakingKeeper) GetLastTotalPower(ctx types.Context) types.Int { +func (m *MockStakingKeeper) GetLastTotalPower(ctx types.Context) math.Int { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetLastTotalPower", ctx) - ret0, _ := ret[0].(types.Int) + ret0, _ := ret[0].(math.Int) return ret0 } @@ -130,10 +131,10 @@ func (mr *MockStakingKeeperMockRecorder) Jail(arg0, arg1 interface{}) *gomock.Ca } // PowerReduction mocks base method. -func (m *MockStakingKeeper) PowerReduction(ctx types.Context) types.Int { +func (m *MockStakingKeeper) PowerReduction(ctx types.Context) math.Int { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "PowerReduction", ctx) - ret0, _ := ret[0].(types.Int) + ret0, _ := ret[0].(math.Int) return ret0 } @@ -287,3 +288,65 @@ func (mr *MockGravityKeeperMockRecorder) SetOutgoingTx(ctx, outgoing interface{} mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOutgoingTx", reflect.TypeOf((*MockGravityKeeper)(nil).SetOutgoingTx), ctx, outgoing) } + +// MockPubsubKeeper is a mock of PubsubKeeper interface. +type MockPubsubKeeper struct { + ctrl *gomock.Controller + recorder *MockPubsubKeeperMockRecorder +} + +// MockPubsubKeeperMockRecorder is the mock recorder for MockPubsubKeeper. +type MockPubsubKeeperMockRecorder struct { + mock *MockPubsubKeeper +} + +// NewMockPubsubKeeper creates a new mock instance. +func NewMockPubsubKeeper(ctrl *gomock.Controller) *MockPubsubKeeper { + mock := &MockPubsubKeeper{ctrl: ctrl} + mock.recorder = &MockPubsubKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockPubsubKeeper) EXPECT() *MockPubsubKeeperMockRecorder { + return m.recorder +} + +// DeleteDefaultSubscription mocks base method. +func (m *MockPubsubKeeper) DeleteDefaultSubscription(ctx types.Context, subscriptionID string) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "DeleteDefaultSubscription", ctx, subscriptionID) +} + +// DeleteDefaultSubscription indicates an expected call of DeleteDefaultSubscription. +func (mr *MockPubsubKeeperMockRecorder) DeleteDefaultSubscription(ctx, subscriptionID interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDefaultSubscription", reflect.TypeOf((*MockPubsubKeeper)(nil).DeleteDefaultSubscription), ctx, subscriptionID) +} + +// GetPublisher mocks base method. +func (m *MockPubsubKeeper) GetPublisher(ctx types.Context, publisherDomain string) (types2.Publisher, bool) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPublisher", ctx, publisherDomain) + ret0, _ := ret[0].(types2.Publisher) + ret1, _ := ret[1].(bool) + return ret0, ret1 +} + +// GetPublisher indicates an expected call of GetPublisher. +func (mr *MockPubsubKeeperMockRecorder) GetPublisher(ctx, publisherDomain interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPublisher", reflect.TypeOf((*MockPubsubKeeper)(nil).GetPublisher), ctx, publisherDomain) +} + +// SetDefaultSubscription mocks base method. +func (m *MockPubsubKeeper) SetDefaultSubscription(ctx types.Context, defaultSubscription types2.DefaultSubscription) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetDefaultSubscription", ctx, defaultSubscription) +} + +// SetDefaultSubscription indicates an expected call of SetDefaultSubscription. +func (mr *MockPubsubKeeperMockRecorder) SetDefaultSubscription(ctx, defaultSubscription interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDefaultSubscription", reflect.TypeOf((*MockPubsubKeeper)(nil).SetDefaultSubscription), ctx, defaultSubscription) +} diff --git a/x/cork/types/expected_keepers.go b/x/cork/types/expected_keepers.go index 6ac5fea44..b0312d245 100644 --- a/x/cork/types/expected_keepers.go +++ b/x/cork/types/expected_keepers.go @@ -8,7 +8,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/common" - "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" + gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" + pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" tmbytes "github.com/tendermint/tendermint/libs/bytes" ) @@ -29,17 +30,23 @@ type StakingKeeper interface { // GravityKeeper defines the expected gravity keeper methods type GravityKeeper interface { - SetOutgoingTx(ctx sdk.Context, outgoing types.OutgoingTx) + SetOutgoingTx(ctx sdk.Context, outgoing gravitytypes.OutgoingTx) CreateContractCallTx( ctx sdk.Context, invalidationNonce uint64, invalidationScope tmbytes.HexBytes, address common.Address, payload []byte, - tokens []types.ERC20Token, - fees []types.ERC20Token) *types.ContractCallTx + tokens []gravitytypes.ERC20Token, + fees []gravitytypes.ERC20Token) *gravitytypes.ContractCallTx GetOrchestratorValidatorAddress(ctx sdk.Context, orchAddr sdk.AccAddress) sdk.ValAddress GetValidatorEthereumAddress(ctx sdk.Context, valAddr sdk.ValAddress) common.Address GetEthereumOrchestratorAddress(ctx sdk.Context, ethAddr common.Address) sdk.AccAddress SetOrchestratorValidatorAddress(ctx sdk.Context, val sdk.ValAddress, orchAddr sdk.AccAddress) } + +type PubsubKeeper interface { + GetPublisher(ctx sdk.Context, publisherDomain string) (publisher pubsubtypes.Publisher, found bool) + SetDefaultSubscription(ctx sdk.Context, defaultSubscription pubsubtypes.DefaultSubscription) + DeleteDefaultSubscription(ctx sdk.Context, subscriptionID string) +} diff --git a/x/cork/types/keys.go b/x/cork/types/keys.go index fd891e714..77ed26362 100644 --- a/x/cork/types/keys.go +++ b/x/cork/types/keys.go @@ -26,7 +26,7 @@ const ( _ = byte(iota) // CorkForAddressKeyPrefix -
-> - CorkForAddressKeyPrefix // key for corks + CorkForAddressKeyPrefix // key for corks -- removed as of cork v2, left to preserve ID values // CommitPeriodStartKey - -> int64(height) CommitPeriodStartKey // key for commit period height start -- removed as of cork v2, left to preserve ID values @@ -50,16 +50,6 @@ const ( ValidatorCorkCountKey ) -// GetCorkForValidatorAddressKey returns the key for a validators vote for a given address -func GetCorkForValidatorAddressKey(val sdk.ValAddress, contract common.Address) []byte { - return append(GetCorkValidatorKeyPrefix(val), contract.Bytes()...) -} - -// GetCorkValidatorKeyPrefix returns the key prefix for cork commits for a validator -func GetCorkValidatorKeyPrefix(val sdk.ValAddress) []byte { - return append([]byte{CorkForAddressKeyPrefix}, val.Bytes()...) -} - func MakeCellarIDsKey() []byte { return []byte{CellarIDsKey} } diff --git a/x/cork/types/msgs.go b/x/cork/types/msgs.go index 2bb8e5d2e..e9f455165 100644 --- a/x/cork/types/msgs.go +++ b/x/cork/types/msgs.go @@ -1,6 +1,8 @@ package types import ( + "fmt" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -44,6 +46,10 @@ func (m *MsgScheduleCorkRequest) ValidateBasic() error { return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) } + if m.BlockHeight == 0 { + return fmt.Errorf("block height must be non-zero") + } + return m.Cork.ValidateBasic() } diff --git a/x/cork/types/proposal.go b/x/cork/types/proposal.go index 6eca07fa5..662055470 100644 --- a/x/cork/types/proposal.go +++ b/x/cork/types/proposal.go @@ -7,6 +7,7 @@ import ( errorsmod "cosmossdk.io/errors" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/ethereum/go-ethereum/common" + pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" ) const ( @@ -37,11 +38,12 @@ func init() { govtypesv1beta1.ModuleCdc.RegisterConcrete(&ScheduledCorkProposal{}, "sommelier/ScheduledCorkProposal", nil) } -func NewAddManagedCellarIDsProposal(title string, description string, cellarIds *CellarIDSet) *AddManagedCellarIDsProposal { +func NewAddManagedCellarIDsProposal(title string, description string, cellarIds *CellarIDSet, publisherDomain string) *AddManagedCellarIDsProposal { return &AddManagedCellarIDsProposal{ - Title: title, - Description: description, - CellarIds: cellarIds, + Title: title, + Description: description, + CellarIds: cellarIds, + PublisherDomain: publisherDomain, } } @@ -62,6 +64,10 @@ func (m *AddManagedCellarIDsProposal) ValidateBasic() error { return fmt.Errorf("can't have an add prosoposal with no cellars") } + if err := pubsubtypes.ValidateDomain(m.PublisherDomain); err != nil { + return err + } + return nil } @@ -116,6 +122,10 @@ func (m *ScheduledCorkProposal) ValidateBasic() error { return err } + if m.BlockHeight == 0 { + return fmt.Errorf("block height must be non-zero") + } + if len(m.ContractCallProtoJson) == 0 { return errorsmod.Wrapf(ErrInvalidJSON, "cannot have empty contract call") } diff --git a/x/cork/types/proposal.pb.go b/x/cork/types/proposal.pb.go index 7dc05f66b..1f6876d94 100644 --- a/x/cork/types/proposal.pb.go +++ b/x/cork/types/proposal.pb.go @@ -23,9 +23,10 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type AddManagedCellarIDsProposal struct { - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - CellarIds *CellarIDSet `protobuf:"bytes,3,opt,name=cellar_ids,json=cellarIds,proto3" json:"cellar_ids,omitempty"` + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + CellarIds *CellarIDSet `protobuf:"bytes,3,opt,name=cellar_ids,json=cellarIds,proto3" json:"cellar_ids,omitempty"` + PublisherDomain string `protobuf:"bytes,4,opt,name=publisher_domain,json=publisherDomain,proto3" json:"publisher_domain,omitempty"` } func (m *AddManagedCellarIDsProposal) Reset() { *m = AddManagedCellarIDsProposal{} } @@ -82,12 +83,20 @@ func (m *AddManagedCellarIDsProposal) GetCellarIds() *CellarIDSet { return nil } +func (m *AddManagedCellarIDsProposal) GetPublisherDomain() string { + if m != nil { + return m.PublisherDomain + } + return "" +} + // AddManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands type AddManagedCellarIDsProposalWithDeposit struct { - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - CellarIds []string `protobuf:"bytes,3,rep,name=cellar_ids,json=cellarIds,proto3" json:"cellar_ids,omitempty"` - Deposit string `protobuf:"bytes,4,opt,name=deposit,proto3" json:"deposit,omitempty"` + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + CellarIds []string `protobuf:"bytes,3,rep,name=cellar_ids,json=cellarIds,proto3" json:"cellar_ids,omitempty"` + PublisherDomain string `protobuf:"bytes,4,opt,name=publisher_domain,json=publisherDomain,proto3" json:"publisher_domain,omitempty"` + Deposit string `protobuf:"bytes,5,opt,name=deposit,proto3" json:"deposit,omitempty"` } func (m *AddManagedCellarIDsProposalWithDeposit) Reset() { @@ -146,6 +155,13 @@ func (m *AddManagedCellarIDsProposalWithDeposit) GetCellarIds() []string { return nil } +func (m *AddManagedCellarIDsProposalWithDeposit) GetPublisherDomain() string { + if m != nil { + return m.PublisherDomain + } + return "" +} + func (m *AddManagedCellarIDsProposalWithDeposit) GetDeposit() string { if m != nil { return m.Deposit @@ -291,20 +307,21 @@ type ScheduledCorkProposal struct { Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` BlockHeight uint64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` TargetContractAddress string `protobuf:"bytes,4,opt,name=target_contract_address,json=targetContractAddress,proto3" json:"target_contract_address,omitempty"` + // // The JSON representation of a ScheduleRequest defined in the Steward protos // // Example: The following is the JSON form of a ScheduleRequest containing a steward.v2.cellar_v1.TrustPosition // message, which maps to the `trustPosition(address)` function of the the V1 Cellar contract. // - // { - // "cellar_id": "0x1234567890000000000000000000000000000000", - // "cellar_v1": { - // "trust_position": { - // "erc20_address": "0x1234567890000000000000000000000000000000" - // } - // }, - // "block_height": 1000000 - // } + // { + // "cellar_id": "0x1234567890000000000000000000000000000000", + // "cellar_v1": { + // "trust_position": { + // "erc20_address": "0x1234567890000000000000000000000000000000" + // } + // }, + // "block_height": 1000000 + // } // // You can use the Steward CLI to generate the required JSON rather than constructing it by hand https://github.com/peggyjv/steward ContractCallProtoJson string `protobuf:"bytes,5,opt,name=contract_call_proto_json,json=contractCallProtoJson,proto3" json:"contract_call_proto_json,omitempty"` @@ -475,34 +492,36 @@ func init() { func init() { proto.RegisterFile("cork/v2/proposal.proto", fileDescriptor_e01dea5e2496e85f) } var fileDescriptor_e01dea5e2496e85f = []byte{ - // 430 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x94, 0x4f, 0x6b, 0xd4, 0x40, - 0x18, 0xc6, 0x77, 0xfa, 0x97, 0x9d, 0xf5, 0x34, 0xb4, 0x1a, 0x14, 0x43, 0xcc, 0x41, 0x56, 0x90, - 0x04, 0xb6, 0x60, 0xcf, 0x35, 0x45, 0xac, 0x20, 0x94, 0xf4, 0x20, 0x78, 0x09, 0xb3, 0x33, 0x2f, - 0xc9, 0x74, 0x27, 0x99, 0x30, 0x33, 0x0d, 0xf6, 0x1b, 0x88, 0x20, 0x78, 0x15, 0xfc, 0x40, 0x1e, - 0x7b, 0xf4, 0x28, 0x9b, 0x2f, 0x22, 0x9d, 0x24, 0xb2, 0x8a, 0xf4, 0xa0, 0x42, 0xf7, 0x38, 0xcf, - 0x33, 0xef, 0xbc, 0xbf, 0xf7, 0x79, 0x49, 0xf0, 0x5d, 0xa6, 0xf4, 0x22, 0x6e, 0x66, 0x71, 0xad, - 0x55, 0xad, 0x0c, 0x95, 0x51, 0xad, 0x95, 0x55, 0x64, 0xf7, 0x5a, 0x8f, 0x9a, 0xd9, 0x7d, 0x32, - 0x5c, 0x70, 0x82, 0x33, 0xc3, 0x0f, 0x08, 0x3f, 0x38, 0xe2, 0xfc, 0x35, 0xad, 0x68, 0x0e, 0x3c, - 0x01, 0x29, 0xa9, 0x3e, 0x39, 0x36, 0xa7, 0xfd, 0x13, 0x64, 0x0f, 0x6f, 0x5b, 0x61, 0x25, 0x78, - 0x28, 0x40, 0xd3, 0x71, 0xda, 0x1d, 0x48, 0x80, 0x27, 0x1c, 0x0c, 0xd3, 0xa2, 0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e, 0x03, 0x07, 0x7f, 0x9c, 0xf2, 0x7f, 0x64, 0xbf, 0x86, 0x03, 0xaf, 0x2e, 0x7c, - 0xe7, 0x97, 0x85, 0x3f, 0x7f, 0xf1, 0x75, 0xe9, 0xa3, 0xab, 0xa5, 0x8f, 0xbe, 0x2f, 0x7d, 0xf4, - 0xa9, 0xf5, 0x47, 0x57, 0xad, 0x3f, 0xfa, 0xd6, 0xfa, 0xa3, 0xb7, 0x4f, 0x73, 0x61, 0x8b, 0x8b, - 0x79, 0xc4, 0x54, 0x19, 0xd7, 0x90, 0xe7, 0x97, 0xe7, 0x4d, 0x6c, 0x54, 0x59, 0x82, 0x14, 0xa0, - 0xe3, 0xe6, 0x30, 0x7e, 0xe7, 0x7e, 0x48, 0xb1, 0xbd, 0xac, 0xc1, 0xcc, 0x77, 0x1c, 0xca, 0xc1, - 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x3a, 0x2c, 0x28, 0xce, 0x04, 0x00, 0x00, + // 464 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xc1, 0x6a, 0x13, 0x41, + 0x18, 0xce, 0xb4, 0x69, 0x4b, 0x26, 0x82, 0x32, 0x34, 0xba, 0x28, 0x2e, 0x71, 0x0f, 0x92, 0x82, + 0xec, 0x42, 0x0a, 0xf6, 0x5c, 0x13, 0xc4, 0x0a, 0x42, 0x49, 0x0f, 0x82, 0x97, 0x65, 0x32, 0xf3, + 0xb3, 0x3b, 0xcd, 0xec, 0xce, 0x30, 0x33, 0x59, 0xec, 0x1b, 0x78, 0x11, 0x7c, 0x00, 0x5f, 0xc3, + 0x37, 0xf0, 0xe0, 0xb1, 0x47, 0x8f, 0x92, 0xbc, 0x88, 0x74, 0x76, 0x53, 0x52, 0x91, 0x1e, 0xaa, + 0x94, 0x1e, 0xff, 0xef, 0xfb, 0xf7, 0xdf, 0xef, 0xfb,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 0x00, 0xff, 0xff, 0x7a, 0xd4, 0xbf, 0x65, 0x24, 0x05, 0x00, 0x00, } func (m *AddManagedCellarIDsProposal) Marshal() (dAtA []byte, err error) { @@ -525,6 +544,13 @@ func (m *AddManagedCellarIDsProposal) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l + if len(m.PublisherDomain) > 0 { + i -= len(m.PublisherDomain) + copy(dAtA[i:], m.PublisherDomain) + i = encodeVarintProposal(dAtA, i, uint64(len(m.PublisherDomain))) + i-- + dAtA[i] = 0x22 + } if m.CellarIds != nil { { size, err := m.CellarIds.MarshalToSizedBuffer(dAtA[:i]) @@ -579,6 +605,13 @@ func (m *AddManagedCellarIDsProposalWithDeposit) MarshalToSizedBuffer(dAtA []byt copy(dAtA[i:], m.Deposit) i = encodeVarintProposal(dAtA, i, uint64(len(m.Deposit))) i-- + dAtA[i] = 0x2a + } + if len(m.PublisherDomain) > 0 { + i -= len(m.PublisherDomain) + copy(dAtA[i:], m.PublisherDomain) + i = encodeVarintProposal(dAtA, i, uint64(len(m.PublisherDomain))) + i-- dAtA[i] = 0x22 } if len(m.CellarIds) > 0 { @@ -857,6 +890,10 @@ func (m *AddManagedCellarIDsProposal) Size() (n int) { l = m.CellarIds.Size() n += 1 + l + sovProposal(uint64(l)) } + l = len(m.PublisherDomain) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } return n } @@ -880,6 +917,10 @@ func (m *AddManagedCellarIDsProposalWithDeposit) Size() (n int) { n += 1 + l + sovProposal(uint64(l)) } } + l = len(m.PublisherDomain) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } l = len(m.Deposit) if l > 0 { n += 1 + l + sovProposal(uint64(l)) @@ -1130,6 +1171,38 @@ func (m *AddManagedCellarIDsProposal) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublisherDomain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + 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 ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PublisherDomain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipProposal(dAtA[iNdEx:]) @@ -1277,6 +1350,38 @@ func (m *AddManagedCellarIDsProposalWithDeposit) Unmarshal(dAtA []byte) error { m.CellarIds = append(m.CellarIds, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PublisherDomain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + 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 ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PublisherDomain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) } diff --git a/x/incentives/types/params.go b/x/incentives/types/params.go index 6c60cf896..f434d5744 100644 --- a/x/incentives/types/params.go +++ b/x/incentives/types/params.go @@ -54,8 +54,8 @@ func validateDistributionPerBlock(i interface{}) error { if coinsPerBlock.IsNil() { return errorsmod.Wrapf(ErrInvalidDistributionPerBlock, "distribution per block cannot be nil") } - if coinsPerBlock.Amount.IsNegative() { - return errorsmod.Wrapf(ErrInvalidDistributionPerBlock, "distribution per block cannot be negative") + if !coinsPerBlock.IsValid() { + return errorsmod.Wrapf(ErrInvalidDistributionPerBlock, "distribution per block must be valid") } if coinsPerBlock.Denom != params.BaseCoinUnit { return errorsmod.Wrapf(ErrInvalidDistributionPerBlock, "distribution per block denom must be %s, got %s", params.BaseCoinUnit, coinsPerBlock.Denom) diff --git a/x/pubsub/keeper/msg_server.go b/x/pubsub/keeper/msg_server.go index e10f5bc2d..295c7a777 100644 --- a/x/pubsub/keeper/msg_server.go +++ b/x/pubsub/keeper/msg_server.go @@ -160,11 +160,6 @@ func (k Keeper) AddSubscriber(c context.Context, msg *types.MsgAddSubscriberRequ // ValidateBasic will confirm this is already correctly formatted subscriberAccAddress, _ := sdk.AccAddressFromBech32(subscriber.Address) - _, found := k.GetSubscriber(ctx, subscriberAccAddress) - if found { - return nil, errorsmod.Wrapf(types.ErrAlreadyExists, "subscriber already exists, must be removed first") - } - k.SetSubscriber(ctx, subscriberAccAddress, *subscriber) ctx.EventManager().EmitEvents( From 4133e1a24f0bd6406ce450eda066de5bdc1af3dd Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Sat, 27 Jan 2024 20:02:37 -0800 Subject: [PATCH 03/32] Fix pubsub slice counts in v7 upgrade (#257) --- app/upgrades/v7/upgrades.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/upgrades/v7/upgrades.go b/app/upgrades/v7/upgrades.go index ed8f04087..6666a895a 100644 --- a/app/upgrades/v7/upgrades.go +++ b/app/upgrades/v7/upgrades.go @@ -249,7 +249,7 @@ func pubsubInitGenesis(ctx sdk.Context, pubsubKeeper pubsubkeeper.Keeper) { } // Set 7seas publisher intents for existing cellars - publisherIntents := make([]*pubsubtypes.PublisherIntent, 0, 25) + publisherIntents := make([]*pubsubtypes.PublisherIntent, 0, 28) for _, cellar := range cellars { publisherIntents = append(publisherIntents, &pubsubtypes.PublisherIntent{ SubscriptionId: cellar, @@ -260,7 +260,7 @@ func pubsubInitGenesis(ctx sdk.Context, pubsubKeeper pubsubkeeper.Keeper) { } // Set default subscriptions for 7seas as the publisher for existing cellars - defaultSubscriptions := make([]*pubsubtypes.DefaultSubscription, 0, 25) + defaultSubscriptions := make([]*pubsubtypes.DefaultSubscription, 0, 28) for _, cellar := range cellars { defaultSubscriptions = append(defaultSubscriptions, &pubsubtypes.DefaultSubscription{ SubscriptionId: cellar, @@ -270,7 +270,7 @@ func pubsubInitGenesis(ctx sdk.Context, pubsubKeeper pubsubkeeper.Keeper) { // Create subscribers and intents for existing validators subscribers := createSubscribers() - subscriberIntents := make([]*pubsubtypes.SubscriberIntent, 0, 875) + subscriberIntents := make([]*pubsubtypes.SubscriberIntent, 0, 980) for _, subscriber := range subscribers { for _, cellar := range cellars { subscriberIntents = append(subscriberIntents, &pubsubtypes.SubscriberIntent{ From 36b692d5b15088d83983769882758a8382ff11e3 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Sat, 27 Jan 2024 20:18:11 -0800 Subject: [PATCH 04/32] fix the axelar gmp account (#258) --- app/upgrades/v7/upgrades.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/upgrades/v7/upgrades.go b/app/upgrades/v7/upgrades.go index 6666a895a..5f33487d1 100644 --- a/app/upgrades/v7/upgrades.go +++ b/app/upgrades/v7/upgrades.go @@ -161,7 +161,7 @@ func axelarcorkInitGenesis(ctx sdk.Context, axelarcorkKeeper axelarcorkkeeper.Ke genesisState.Params.TimeoutDuration = uint64(6 * time.Hour) genesisState.Params.IbcChannel = "channel-5" genesisState.Params.IbcPort = ibctransfertypes.PortID - genesisState.Params.GmpAccount = "axelar1dv4u5k73pzqrxlzujxg3qp8kvc3pje7jtdvu72npnt5zhq05ejcsn5qme5s" + genesisState.Params.GmpAccount = "axelar1dv4u5k73pzqrxlzujxg3qp8kvc3pje7jtdvu72npnt5zhq05ejcsn5qme5" genesisState.Params.ExecutorAccount = "axelar1aythygn6z5thymj6tmzfwekzh05ewg3l7d6y89" genesisState.Params.CorkTimeoutBlocks = 5000 From 901e737a00903ce00dd317229b5500df3d978feb Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Sun, 28 Jan 2024 12:54:41 -0800 Subject: [PATCH 05/32] Fix some upgrade errors for v7 (#260) * Treat cellarfees as a new module * properly validate axelar bech32 addresses * Remove unnnecessary protos * v1 and v2 cork types * actually fix cork v1 types * Try to register v1 interfaces * cork v1 migration uses legacy types * appease linter --- app/app.go | 2 +- app/upgrades/v7/upgrades.go | 22 +++- integration_tests/cellarfees_test.go | 2 +- integration_tests/chain.go | 2 +- integration_tests/scheduled_cork_test.go | 2 +- integration_tests/setup_test.go | 7 +- x/axelarcork/types/params.go | 7 +- x/cork/client/cli/query.go | 2 +- x/cork/client/cli/tx.go | 2 +- x/cork/client/cli/tx_test.go | 2 +- x/cork/handler.go | 2 +- x/cork/keeper/abci.go | 2 +- x/cork/keeper/genesis.go | 2 +- x/cork/keeper/keeper.go | 43 +++---- x/cork/keeper/keeper_test.go | 9 +- x/cork/keeper/msg_server.go | 20 +-- x/cork/keeper/proposal_handler.go | 5 +- x/cork/keeper/query_server.go | 2 +- x/cork/keeper/query_server_test.go | 2 +- x/cork/keeper/test_common.go | 13 +- x/cork/migrations/v1/store.go | 17 +-- x/cork/migrations/v1/types/keys.go | 63 ---------- x/cork/module.go | 17 ++- x/cork/types/keys.go | 17 +++ x/cork/types/v1/codec.go | 23 ++++ x/cork/types/v1/cork.go | 46 +++++++ .../v1/types => types/v1}/cork.pb.go | 40 +++--- x/cork/types/v1/genesis.go | 21 ++++ .../v1/types => types/v1}/genesis.pb.go | 48 +++---- x/cork/types/v1/msgs.go | 118 ++++++++++++++++++ .../v1/types => types/v1}/params.go | 2 +- x/cork/types/v1/params_test.go | 60 +++++++++ x/cork/types/v1/proposal.go | 81 ++++++++++++ .../v1/types => types/v1}/proposal.pb.go | 42 +++---- .../v1/types => types/v1}/query.pb.go | 46 +++---- .../v1/types => types/v1}/query.pb.gw.go | 27 +++- .../v1/types => types/v1}/tx.pb.go | 43 +++---- x/cork/types/{ => v2}/codec.go | 4 +- x/cork/types/{ => v2}/cork.go | 7 +- x/cork/types/{ => v2}/cork.pb.go | 2 +- x/cork/types/{ => v2}/genesis.go | 6 +- x/cork/types/{ => v2}/genesis.pb.go | 2 +- x/cork/types/{ => v2}/msgs.go | 5 +- x/cork/types/{ => v2}/params.go | 2 +- x/cork/types/{ => v2}/params_test.go | 2 +- x/cork/types/{ => v2}/proposal.go | 27 ++-- x/cork/types/{ => v2}/proposal.pb.go | 2 +- x/cork/types/{ => v2}/proposal_test.go | 9 +- x/cork/types/{ => v2}/query.pb.go | 2 +- x/cork/types/{ => v2}/query.pb.gw.go | 2 +- x/cork/types/{ => v2}/tx.pb.go | 2 +- 51 files changed, 644 insertions(+), 291 deletions(-) delete mode 100644 x/cork/migrations/v1/types/keys.go create mode 100644 x/cork/types/v1/codec.go create mode 100644 x/cork/types/v1/cork.go rename x/cork/{migrations/v1/types => types/v1}/cork.pb.go (92%) create mode 100644 x/cork/types/v1/genesis.go rename x/cork/{migrations/v1/types => types/v1}/genesis.pb.go (91%) create mode 100644 x/cork/types/v1/msgs.go rename x/cork/{migrations/v1/types => types/v1}/params.go (99%) create mode 100644 x/cork/types/v1/params_test.go create mode 100644 x/cork/types/v1/proposal.go rename x/cork/{migrations/v1/types => types/v1}/proposal.pb.go (94%) rename x/cork/{migrations/v1/types => types/v1}/query.pb.go (97%) rename x/cork/{migrations/v1/types => types/v1}/query.pb.gw.go (92%) rename x/cork/{migrations/v1/types => types/v1}/tx.pb.go (92%) rename x/cork/types/{ => v2}/codec.go (93%) rename x/cork/types/{ => v2}/cork.go (93%) rename x/cork/types/{ => v2}/cork.pb.go (99%) rename x/cork/types/{ => v2}/genesis.go (87%) rename x/cork/types/{ => v2}/genesis.pb.go (99%) rename x/cork/types/{ => v2}/msgs.go (92%) rename x/cork/types/{ => v2}/params.go (99%) rename x/cork/types/{ => v2}/params_test.go (98%) rename x/cork/types/{ => v2}/proposal.go (83%) rename x/cork/types/{ => v2}/proposal.pb.go (99%) rename x/cork/types/{ => v2}/proposal_test.go (87%) rename x/cork/types/{ => v2}/query.pb.go (99%) rename x/cork/types/{ => v2}/query.pb.gw.go (99%) rename x/cork/types/{ => v2}/tx.pb.go (99%) diff --git a/app/app.go b/app/app.go index 69739aadc..a220e6520 100644 --- a/app/app.go +++ b/app/app.go @@ -977,7 +977,7 @@ func (app *SommelierApp) setupUpgradeStoreLoaders() { if upgradeInfo.Name == v7.UpgradeName { storeUpgrades = &storetypes.StoreUpgrades{ - Added: []string{auctiontypes.ModuleName, axelarcorktypes.ModuleName, pubsubtypes.ModuleName}, + Added: []string{auctiontypes.ModuleName, axelarcorktypes.ModuleName, cellarfeestypes.ModuleName, pubsubtypes.ModuleName}, } } diff --git a/app/upgrades/v7/upgrades.go b/app/upgrades/v7/upgrades.go index 5f33487d1..f9a8cf614 100644 --- a/app/upgrades/v7/upgrades.go +++ b/app/upgrades/v7/upgrades.go @@ -17,7 +17,7 @@ import ( cellarfeeskeeper "github.com/peggyjv/sommelier/v7/x/cellarfees/keeper" cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" corkkeeper "github.com/peggyjv/sommelier/v7/x/cork/keeper" - corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" + corktypes "github.com/peggyjv/sommelier/v7/x/cork/types/v2" pubsubkeeper "github.com/peggyjv/sommelier/v7/x/pubsub/keeper" pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" ) @@ -46,17 +46,16 @@ func CreateUpgradeHandler( corkParams := corktypes.DefaultParams() corkKeeper.SetParams(ctx, corkParams) - // We must manually run InitGenesis for auction, axelarcork, and pubsub so we can adjust their values + // We must manually run InitGenesis for auction, axelarcork, cellarfees, and pubsub so we can adjust their values // during the upgrade process. RunMigrations will migrate to the new cork version. Setting the consensus // version to 1 prevents RunMigrations from running InitGenesis itself. + fromVM[cellarfeestypes.ModuleName] = mm.Modules[cellarfeestypes.ModuleName].ConsensusVersion() fromVM[auctiontypes.ModuleName] = mm.Modules[auctiontypes.ModuleName].ConsensusVersion() fromVM[axelarcorktypes.ModuleName] = mm.Modules[axelarcorktypes.ModuleName].ConsensusVersion() fromVM[pubsubtypes.ModuleName] = mm.Modules[pubsubtypes.ModuleName].ConsensusVersion() - // Params values were introduced in this upgrade but no migration was necessary, so we initialize the - // new values to their defaults - ctx.Logger().Info("v7 upgrading: setting cellarfees default params") - cellarfeesKeeper.SetParams(ctx, cellarfeestypes.DefaultParams()) + ctx.Logger().Info("v7 upgrading: initializing cellarfees genesis state") + cellarfeesInitGenesis(ctx, cellarfeesKeeper) ctx.Logger().Info("v7 upgrade: initializing auction genesis state") auctionInitGenesis(ctx, auctionKeeper) @@ -72,6 +71,17 @@ func CreateUpgradeHandler( } } +// Initialize the cellarfees module with defaults +func cellarfeesInitGenesis(ctx sdk.Context, cellarfeesKeeper cellarfeeskeeper.Keeper) { + genesisState := cellarfeestypes.DefaultGenesisState() + + if err := genesisState.Validate(); err != nil { + panic(fmt.Errorf("cellarfees genesis state invalid: %s", err)) + } + + cellarfeesKeeper.InitGenesis(ctx, genesisState) +} + // Initialize the auction module with prices for some stablecoins and SOMM. func auctionInitGenesis(ctx sdk.Context, auctionKeeper auctionkeeper.Keeper) { genesisState := auctiontypes.DefaultGenesisState() diff --git a/integration_tests/cellarfees_test.go b/integration_tests/cellarfees_test.go index 3c4406034..308d921cd 100644 --- a/integration_tests/cellarfees_test.go +++ b/integration_tests/cellarfees_test.go @@ -13,7 +13,7 @@ import ( "github.com/ethereum/go-ethereum/ethclient" auctiontypes "github.com/peggyjv/sommelier/v7/x/auction/types" cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" - corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" + corktypes "github.com/peggyjv/sommelier/v7/x/cork/types/v2" ) func (s *IntegrationTestSuite) TestCellarFees() { diff --git a/integration_tests/chain.go b/integration_tests/chain.go index 54677cb4c..f1328495f 100644 --- a/integration_tests/chain.go +++ b/integration_tests/chain.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" + corktypes "github.com/peggyjv/sommelier/v7/x/cork/types/v2" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/integration_tests/scheduled_cork_test.go b/integration_tests/scheduled_cork_test.go index 452b79f0b..bc45a9753 100644 --- a/integration_tests/scheduled_cork_test.go +++ b/integration_tests/scheduled_cork_test.go @@ -16,7 +16,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" gbtypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" - "github.com/peggyjv/sommelier/v7/x/cork/types" + types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" ) diff --git a/integration_tests/setup_test.go b/integration_tests/setup_test.go index d1c41cd0c..e0b6e852e 100644 --- a/integration_tests/setup_test.go +++ b/integration_tests/setup_test.go @@ -22,7 +22,8 @@ import ( auctiontypes "github.com/peggyjv/sommelier/v7/x/auction/types" axelarcorktypes "github.com/peggyjv/sommelier/v7/x/axelarcork/types" cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" - corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" + corktypesunversioned "github.com/peggyjv/sommelier/v7/x/cork/types" + corktypes "github.com/peggyjv/sommelier/v7/x/cork/types/v2" pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" "github.com/ethereum/go-ethereum/common" @@ -496,7 +497,7 @@ func (s *IntegrationTestSuite) initGenesis() { appGenState[genutiltypes.ModuleName] = bz var corkGenState corktypes.GenesisState - s.Require().NoError(cdc.UnmarshalJSON(appGenState[corktypes.ModuleName], &corkGenState)) + s.Require().NoError(cdc.UnmarshalJSON(appGenState[corktypesunversioned.ModuleName], &corkGenState)) // we add the first validator address as a cellar so that it will trigger the cellarfees hook // when we send test fees @@ -505,7 +506,7 @@ func (s *IntegrationTestSuite) initGenesis() { corkGenState.Params.VoteThreshold = corkVoteThreshold bz, err = cdc.MarshalJSON(&corkGenState) s.Require().NoError(err) - appGenState[corktypes.ModuleName] = bz + appGenState[corktypesunversioned.ModuleName] = bz // set contract addr var gravityGenState gravitytypes.GenesisState diff --git a/x/axelarcork/types/params.go b/x/axelarcork/types/params.go index c39f3c8f7..9b555adad 100644 --- a/x/axelarcork/types/params.go +++ b/x/axelarcork/types/params.go @@ -6,7 +6,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" host "github.com/cosmos/ibc-go/v6/modules/core/24-host" - "github.com/ethereum/go-ethereum/common" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) @@ -130,7 +129,7 @@ func validateGMPAccount(i interface{}) error { return errors.New("gmp account cannot be empty") } - if _, err := sdk.AccAddressFromBech32(gmpAcc); err != nil { + if _, err := sdk.GetFromBech32(gmpAcc, "axelar"); err != nil { return err } @@ -147,8 +146,8 @@ func validateExecutorAccount(i interface{}) error { return errors.New("executor account cannot be empty") } - if !common.IsHexAddress(execAcc) { - return errors.New("invalid executor account address") + if _, err := sdk.GetFromBech32(execAcc, "axelar"); err != nil { + return err } return nil diff --git a/x/cork/client/cli/query.go b/x/cork/client/cli/query.go index b116f8ddd..34b8bdaed 100644 --- a/x/cork/client/cli/query.go +++ b/x/cork/client/cli/query.go @@ -6,7 +6,7 @@ import ( "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/peggyjv/sommelier/v7/x/cork/types" + types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" "github.com/spf13/cobra" ) diff --git a/x/cork/client/cli/tx.go b/x/cork/client/cli/tx.go index 0a21c09b2..0c229ab24 100644 --- a/x/cork/client/cli/tx.go +++ b/x/cork/client/cli/tx.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/version" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/ethereum/go-ethereum/common" - types "github.com/peggyjv/sommelier/v7/x/cork/types" + types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" "github.com/spf13/cobra" ) diff --git a/x/cork/client/cli/tx_test.go b/x/cork/client/cli/tx_test.go index fea558c6a..4e8a4b008 100644 --- a/x/cork/client/cli/tx_test.go +++ b/x/cork/client/cli/tx_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/cosmos/cosmos-sdk/simapp/params" - "github.com/peggyjv/sommelier/v7/x/cork/types" + types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" "github.com/cosmos/cosmos-sdk/testutil" "github.com/stretchr/testify/require" diff --git a/x/cork/handler.go b/x/cork/handler.go index 38dc983d4..cabe49972 100644 --- a/x/cork/handler.go +++ b/x/cork/handler.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/peggyjv/sommelier/v7/x/cork/keeper" - "github.com/peggyjv/sommelier/v7/x/cork/types" + types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" ) // NewHandler returns a handler for "cork" type messages. diff --git a/x/cork/keeper/abci.go b/x/cork/keeper/abci.go index b70a58278..8c7c3d28e 100644 --- a/x/cork/keeper/abci.go +++ b/x/cork/keeper/abci.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" - "github.com/peggyjv/sommelier/v7/x/cork/types" + types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" ) // BeginBlocker is called at the beginning of every block diff --git a/x/cork/keeper/genesis.go b/x/cork/keeper/genesis.go index 5513cb0ab..7b99867ae 100644 --- a/x/cork/keeper/genesis.go +++ b/x/cork/keeper/genesis.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/cork/types" + types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" ) // InitGenesis initialize default parameters diff --git a/x/cork/keeper/keeper.go b/x/cork/keeper/keeper.go index 6fd3cf53c..883152504 100644 --- a/x/cork/keeper/keeper.go +++ b/x/cork/keeper/keeper.go @@ -9,7 +9,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/ethereum/go-ethereum/common" - "github.com/peggyjv/sommelier/v7/x/cork/types" + corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" + types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" "github.com/tendermint/tendermint/libs/log" ) @@ -20,15 +21,15 @@ type Keeper struct { storeKey storetypes.StoreKey cdc codec.BinaryCodec paramSpace paramtypes.Subspace - stakingKeeper types.StakingKeeper - gravityKeeper types.GravityKeeper - pubsubKeeper types.PubsubKeeper + stakingKeeper corktypes.StakingKeeper + gravityKeeper corktypes.GravityKeeper + pubsubKeeper corktypes.PubsubKeeper } // NewKeeper creates a new x/cork Keeper instance func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, paramSpace paramtypes.Subspace, - stakingKeeper types.StakingKeeper, gravityKeeper types.GravityKeeper, pubsubKeeper types.PubsubKeeper, + stakingKeeper corktypes.StakingKeeper, gravityKeeper corktypes.GravityKeeper, pubsubKeeper corktypes.PubsubKeeper, ) Keeper { // set KeyTable if it has not already been set if !paramSpace.HasKeyTable() { @@ -47,7 +48,7 @@ func NewKeeper( // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", "x/"+types.ModuleName) + return ctx.Logger().With("module", "x/"+corktypes.ModuleName) } ///////////////////// @@ -57,7 +58,7 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { func (k Keeper) SetScheduledCork(ctx sdk.Context, blockHeight uint64, val sdk.ValAddress, cork types.Cork) []byte { id := cork.IDHash(blockHeight) bz := k.cdc.MustMarshal(&cork) - ctx.KVStore(k.storeKey).Set(types.GetScheduledCorkKey(blockHeight, id, val, common.HexToAddress(cork.TargetContractAddress)), bz) + ctx.KVStore(k.storeKey).Set(corktypes.GetScheduledCorkKey(blockHeight, id, val, common.HexToAddress(cork.TargetContractAddress)), bz) return id } @@ -66,7 +67,7 @@ func (k Keeper) SetScheduledCork(ctx sdk.Context, blockHeight uint64, val sdk.Va func (k Keeper) GetScheduledCork(ctx sdk.Context, blockHeight uint64, id []byte, val sdk.ValAddress, contract common.Address) (types.Cork, bool) { store := ctx.KVStore(k.storeKey) - bz := store.Get(types.GetScheduledCorkKey(blockHeight, id, val, contract)) + bz := store.Get(corktypes.GetScheduledCorkKey(blockHeight, id, val, contract)) if len(bz) == 0 { return types.Cork{}, false } @@ -79,16 +80,16 @@ func (k Keeper) GetScheduledCork(ctx sdk.Context, blockHeight uint64, id []byte, // DeleteScheduledCork deletes the scheduled cork for a given validator // CONTRACT: must provide the validator address here not the delegate address func (k Keeper) DeleteScheduledCork(ctx sdk.Context, blockHeight uint64, id []byte, val sdk.ValAddress, contract common.Address) { - ctx.KVStore(k.storeKey).Delete(types.GetScheduledCorkKey(blockHeight, id, val, contract)) + ctx.KVStore(k.storeKey).Delete(corktypes.GetScheduledCorkKey(blockHeight, id, val, contract)) } // IterateScheduledCorks iterates over all scheduled corks in the store func (k Keeper) IterateScheduledCorks(ctx sdk.Context, cb func(val sdk.ValAddress, blockHeight uint64, id []byte, cel common.Address, cork types.Cork) (stop bool)) { - k.IterateScheduledCorksByPrefix(ctx, types.GetScheduledCorkKeyPrefix(), cb) + k.IterateScheduledCorksByPrefix(ctx, corktypes.GetScheduledCorkKeyPrefix(), cb) } func (k Keeper) IterateScheduledCorksByBlockHeight(ctx sdk.Context, blockHeight uint64, cb func(val sdk.ValAddress, blockHeight uint64, id []byte, cel common.Address, cork types.Cork) (stop bool)) { - k.IterateScheduledCorksByPrefix(ctx, types.GetScheduledCorkKeyByBlockHeightPrefix(blockHeight), cb) + k.IterateScheduledCorksByPrefix(ctx, corktypes.GetScheduledCorkKeyByBlockHeightPrefix(blockHeight), cb) } func (k Keeper) IterateScheduledCorksByPrefix(ctx sdk.Context, prefix []byte, cb func(val sdk.ValAddress, blockHeight uint64, id []byte, cel common.Address, cork types.Cork) (stop bool)) { @@ -202,13 +203,13 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { func (k Keeper) GetLatestInvalidationNonce(ctx sdk.Context) uint64 { store := ctx.KVStore(k.storeKey) - bz := store.Get([]byte{types.LatestInvalidationNonceKey}) + bz := store.Get([]byte{corktypes.LatestInvalidationNonceKey}) return sdk.BigEndianToUint64(bz) } func (k Keeper) SetLatestInvalidationNonce(ctx sdk.Context, invalidationNonce uint64) { store := ctx.KVStore(k.storeKey) - store.Set([]byte{types.LatestInvalidationNonceKey}, sdk.Uint64ToBigEndian(invalidationNonce)) + store.Set([]byte{corktypes.LatestInvalidationNonceKey}, sdk.Uint64ToBigEndian(invalidationNonce)) } func (k Keeper) IncrementInvalidationNonce(ctx sdk.Context) uint64 { @@ -223,12 +224,12 @@ func (k Keeper) IncrementInvalidationNonce(ctx sdk.Context) uint64 { func (k Keeper) SetCorkResult(ctx sdk.Context, id []byte, corkResult types.CorkResult) { bz := k.cdc.MustMarshal(&corkResult) - ctx.KVStore(k.storeKey).Set(types.GetCorkResultKey(id), bz) + ctx.KVStore(k.storeKey).Set(corktypes.GetCorkResultKey(id), bz) } func (k Keeper) GetCorkResult(ctx sdk.Context, id []byte) (types.CorkResult, bool) { store := ctx.KVStore(k.storeKey) - bz := store.Get(types.GetCorkResultKey(id)) + bz := store.Get(corktypes.GetCorkResultKey(id)) if len(bz) == 0 { return types.CorkResult{}, false } @@ -239,13 +240,13 @@ func (k Keeper) GetCorkResult(ctx sdk.Context, id []byte) (types.CorkResult, boo } func (k Keeper) DeleteCorkResult(ctx sdk.Context, id []byte) { - ctx.KVStore(k.storeKey).Delete(types.GetCorkResultKey(id)) + ctx.KVStore(k.storeKey).Delete(corktypes.GetCorkResultKey(id)) } // IterateCorksResult iterates over all cork results in the store func (k Keeper) IterateCorkResults(ctx sdk.Context, cb func(id []byte, blockHeight uint64, approved bool, approvalPercentage string, corkResult types.CorkResult) (stop bool)) { store := ctx.KVStore(k.storeKey) - iter := sdk.KVStorePrefixIterator(store, types.GetCorkResultPrefix()) + iter := sdk.KVStorePrefixIterator(store, corktypes.GetCorkResultPrefix()) defer iter.Close() for ; iter.Valid(); iter.Next() { @@ -334,12 +335,12 @@ func (k Keeper) GetApprovedScheduledCorks(ctx sdk.Context) (approvedCorks []type func (k Keeper) SetCellarIDs(ctx sdk.Context, c types.CellarIDSet) { bz := k.cdc.MustMarshal(&c) - ctx.KVStore(k.storeKey).Set(types.MakeCellarIDsKey(), bz) + ctx.KVStore(k.storeKey).Set(corktypes.MakeCellarIDsKey(), bz) } func (k Keeper) GetCellarIDs(ctx sdk.Context) (cellars []common.Address) { store := ctx.KVStore(k.storeKey) - bz := store.Get(types.MakeCellarIDsKey()) + bz := store.Get(corktypes.MakeCellarIDsKey()) var cids types.CellarIDSet k.cdc.MustUnmarshal(bz, &cids) @@ -369,7 +370,7 @@ func (k Keeper) HasCellarID(ctx sdk.Context, address common.Address) (found bool func (k Keeper) GetValidatorCorkCount(ctx sdk.Context, val sdk.ValAddress) (count uint64) { store := ctx.KVStore(k.storeKey) - bz := store.Get(types.GetValidatorCorkCountKey(val)) + bz := store.Get(corktypes.GetValidatorCorkCountKey(val)) if len(bz) == 0 { return 0 } @@ -380,7 +381,7 @@ func (k Keeper) GetValidatorCorkCount(ctx sdk.Context, val sdk.ValAddress) (coun func (k Keeper) SetValidatorCorkCount(ctx sdk.Context, val sdk.ValAddress, count uint64) { bz := make([]byte, 8) binary.BigEndian.PutUint64(bz, count) - ctx.KVStore(k.storeKey).Set(types.GetValidatorCorkCountKey(val), bz) + ctx.KVStore(k.storeKey).Set(corktypes.GetValidatorCorkCountKey(val), bz) } func (k Keeper) IncrementValidatorCorkCount(ctx sdk.Context, val sdk.ValAddress) { diff --git a/x/cork/keeper/keeper_test.go b/x/cork/keeper/keeper_test.go index abb2800ef..c7d4e2139 100644 --- a/x/cork/keeper/keeper_test.go +++ b/x/cork/keeper/keeper_test.go @@ -13,7 +13,8 @@ import ( "github.com/golang/mock/gomock" moduletestutil "github.com/peggyjv/sommelier/v7/testutil" corktestutil "github.com/peggyjv/sommelier/v7/x/cork/testutil" - "github.com/peggyjv/sommelier/v7/x/cork/types" + corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" + types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" "github.com/stretchr/testify/suite" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" @@ -40,7 +41,7 @@ type KeeperTestSuite struct { } func (suite *KeeperTestSuite) SetupTest() { - key := sdk.NewKVStoreKey(types.StoreKey) + key := sdk.NewKVStoreKey(corktypes.StoreKey) tkey := sdk.NewTransientStoreKey("transient_test") testCtx := testutil.DefaultContext(key, tkey) ctx := testCtx.WithBlockHeader(tmproto.Header{Height: 5, Time: tmtime.Now()}) @@ -63,8 +64,8 @@ func (suite *KeeperTestSuite) SetupTest() { tkey, ) - params.Subspace(types.ModuleName) - subSpace, found := params.GetSubspace(types.ModuleName) + params.Subspace(corktypes.ModuleName) + subSpace, found := params.GetSubspace(corktypes.ModuleName) suite.Assertions.True(found) suite.corkKeeper = NewKeeper( diff --git a/x/cork/keeper/msg_server.go b/x/cork/keeper/msg_server.go index c738ae11e..2f15bb214 100644 --- a/x/cork/keeper/msg_server.go +++ b/x/cork/keeper/msg_server.go @@ -9,8 +9,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" - - "github.com/peggyjv/sommelier/v7/x/cork/types" + corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" + types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" ) var _ types.MsgServer = Keeper{} @@ -26,11 +26,11 @@ func (k Keeper) ScheduleCork(c context.Context, msg *types.MsgScheduleCorkReques } if !k.HasCellarID(ctx, common.HexToAddress(msg.Cork.TargetContractAddress)) { - return nil, types.ErrUnmanagedCellarAddress + return nil, corktypes.ErrUnmanagedCellarAddress } if msg.BlockHeight <= uint64(ctx.BlockHeight()) { - return nil, types.ErrSchedulingInThePast + return nil, corktypes.ErrSchedulingInThePast } corkID := k.SetScheduledCork(ctx, msg.BlockHeight, validatorAddr, *msg.Cork) @@ -40,14 +40,14 @@ func (k Keeper) ScheduleCork(c context.Context, msg *types.MsgScheduleCorkReques sdk.Events{ sdk.NewEvent( sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + sdk.NewAttribute(sdk.AttributeKeyModule, corktypes.AttributeValueCategory), ), sdk.NewEvent( - types.EventTypeCork, - sdk.NewAttribute(types.AttributeKeySigner, signer.String()), - sdk.NewAttribute(types.AttributeKeyValidator, validatorAddr.String()), - sdk.NewAttribute(types.AttributeKeyCork, msg.Cork.String()), - sdk.NewAttribute(types.AttributeKeyBlockHeight, fmt.Sprintf("%d", msg.BlockHeight)), + corktypes.EventTypeCork, + sdk.NewAttribute(corktypes.AttributeKeySigner, signer.String()), + sdk.NewAttribute(corktypes.AttributeKeyValidator, validatorAddr.String()), + sdk.NewAttribute(corktypes.AttributeKeyCork, msg.Cork.String()), + sdk.NewAttribute(corktypes.AttributeKeyBlockHeight, fmt.Sprintf("%d", msg.BlockHeight)), ), }, ) diff --git a/x/cork/keeper/proposal_handler.go b/x/cork/keeper/proposal_handler.go index b19fbf746..b0b42a406 100644 --- a/x/cork/keeper/proposal_handler.go +++ b/x/cork/keeper/proposal_handler.go @@ -7,7 +7,8 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/peggyjv/sommelier/v7/x/cork/types" + corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" + types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" ) @@ -83,7 +84,7 @@ func HandleRemoveManagedCellarsProposal(ctx sdk.Context, k Keeper, p types.Remov // HandleScheduledCorkProposal is a handler for executing a passed scheduled cork proposal func HandleScheduledCorkProposal(ctx sdk.Context, k Keeper, p types.ScheduledCorkProposal) error { if !k.HasCellarID(ctx, common.HexToAddress(p.TargetContractAddress)) { - return errorsmod.Wrapf(types.ErrUnmanagedCellarAddress, "id: %s", p.TargetContractAddress) + return errorsmod.Wrapf(corktypes.ErrUnmanagedCellarAddress, "id: %s", p.TargetContractAddress) } return nil diff --git a/x/cork/keeper/query_server.go b/x/cork/keeper/query_server.go index 13869c7c8..bfcee58f7 100644 --- a/x/cork/keeper/query_server.go +++ b/x/cork/keeper/query_server.go @@ -7,7 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/cork/types" + types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/x/cork/keeper/query_server_test.go b/x/cork/keeper/query_server_test.go index 9b890cea5..c6ad085dd 100644 --- a/x/cork/keeper/query_server_test.go +++ b/x/cork/keeper/query_server_test.go @@ -4,7 +4,7 @@ import ( "encoding/hex" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/cork/types" + types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" ) func (suite *KeeperTestSuite) TestQueriesHappyPath() { diff --git a/x/cork/keeper/test_common.go b/x/cork/keeper/test_common.go index e073c38c5..98bde4a97 100644 --- a/x/cork/keeper/test_common.go +++ b/x/cork/keeper/test_common.go @@ -58,7 +58,8 @@ import ( "github.com/peggyjv/gravity-bridge/module/v4/x/gravity" gravitykeeper "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/keeper" gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" - "github.com/peggyjv/sommelier/v7/x/cork/types" + corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" + types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" pubsubkeeper "github.com/peggyjv/sommelier/v7/x/pubsub/keeper" pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" "github.com/stretchr/testify/require" @@ -90,7 +91,7 @@ var ( ) // Ensure that StakingKeeperMock implements required interface - _ types.StakingKeeper = &StakingKeeperMock{} + _ corktypes.StakingKeeper = &StakingKeeperMock{} ) var ( @@ -227,7 +228,7 @@ func CreateTestEnv(t *testing.T) TestInput { tkeyParams := sdk.NewTransientStoreKey(paramstypes.TStoreKey) keyGov := sdk.NewKVStoreKey(govtypes.StoreKey) keySlashing := sdk.NewKVStoreKey(slashingtypes.StoreKey) - keycork := sdk.NewKVStoreKey(types.StoreKey) + keycork := sdk.NewKVStoreKey(corktypes.StoreKey) // Initialize memory database and mount stores on it db := dbm.NewMemDB() @@ -271,7 +272,7 @@ func CreateTestEnv(t *testing.T) TestInput { stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, govtypes.ModuleName: {authtypes.Burner}, - types.ModuleName: {authtypes.Minter, authtypes.Burner}, + corktypes.ModuleName: {authtypes.Minter, authtypes.Burner}, } accountKeeper := authkeeper.NewAccountKeeper( @@ -637,9 +638,9 @@ func (s AlwaysPanicStakingMock) PowerReduction(sdk.Context) math.Int { } func fundModAccount(ctx sdk.Context, bankKeeper gravitytypes.BankKeeper, recipientMod string, amounts sdk.Coins) error { - if err := bankKeeper.MintCoins(ctx, types.ModuleName, amounts); err != nil { + if err := bankKeeper.MintCoins(ctx, corktypes.ModuleName, amounts); err != nil { return err } - return bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, recipientMod, amounts) + return bankKeeper.SendCoinsFromModuleToModule(ctx, corktypes.ModuleName, recipientMod, amounts) } diff --git a/x/cork/migrations/v1/store.go b/x/cork/migrations/v1/store.go index f196c7ee2..afb19937d 100644 --- a/x/cork/migrations/v1/store.go +++ b/x/cork/migrations/v1/store.go @@ -9,8 +9,9 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - v1types "github.com/peggyjv/sommelier/v7/x/cork/migrations/v1/types" - "github.com/peggyjv/sommelier/v7/x/cork/types" + corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" + v1types "github.com/peggyjv/sommelier/v7/x/cork/types/v1" + types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" ) func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error { @@ -36,17 +37,17 @@ func MigrateParamStore(ctx sdk.Context, subspace paramstypes.Subspace) error { } func removeCommitPeriod(store storetypes.KVStore) { - store.Delete([]byte{v1types.CommitPeriodStartKey}) + store.Delete([]byte{corktypes.CommitPeriodStartKey}) } // wipe away all existing cork state during upgrade -- there shouldn't be in-transit corks // during the upgrade func removeOldCorks(store storetypes.KVStore, cdc codec.BinaryCodec) { var validatorCorks []*v1types.ValidatorCork - iter := sdk.KVStorePrefixIterator(store, []byte{v1types.CorkForAddressKeyPrefix}) + iter := sdk.KVStorePrefixIterator(store, []byte{corktypes.CorkForAddressKeyPrefix}) defer iter.Close() for ; iter.Valid(); iter.Next() { - keyBytes := bytes.NewBuffer(bytes.TrimPrefix(iter.Key(), []byte{v1types.CorkForAddressKeyPrefix})) + keyBytes := bytes.NewBuffer(bytes.TrimPrefix(iter.Key(), []byte{corktypes.CorkForAddressKeyPrefix})) val := sdk.ValAddress(keyBytes.Next(20)) var cork v1types.Cork @@ -58,14 +59,14 @@ func removeOldCorks(store storetypes.KVStore, cdc codec.BinaryCodec) { } for _, validatorCork := range validatorCorks { - store.Delete(v1types.GetCorkForValidatorAddressKey( + store.Delete(corktypes.GetCorkForValidatorAddressKeyV1( sdk.ValAddress(validatorCork.Validator), common.HexToAddress(validatorCork.Cork.TargetContractAddress), )) } var scheduledCorks []*v1types.ScheduledCork - iter = sdk.KVStorePrefixIterator(store, []byte{v1types.ScheduledCorkKeyPrefix}) + iter = sdk.KVStorePrefixIterator(store, []byte{corktypes.ScheduledCorkKeyPrefix}) defer iter.Close() for ; iter.Valid(); iter.Next() { var cork v1types.Cork @@ -83,7 +84,7 @@ func removeOldCorks(store storetypes.KVStore, cdc codec.BinaryCodec) { } for _, scheduledCork := range scheduledCorks { - store.Delete(v1types.GetScheduledCorkKey( + store.Delete(corktypes.GetScheduledCorkKeyV1( scheduledCork.BlockHeight, sdk.ValAddress(scheduledCork.Validator), common.HexToAddress(scheduledCork.Cork.TargetContractAddress), diff --git a/x/cork/migrations/v1/types/keys.go b/x/cork/migrations/v1/types/keys.go deleted file mode 100644 index ffd603c52..000000000 --- a/x/cork/migrations/v1/types/keys.go +++ /dev/null @@ -1,63 +0,0 @@ -package types - -import ( - "bytes" - "encoding/binary" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/common" -) - -const ( - // ModuleName is the module name constant used in many places - ModuleName = "cork" - - // StoreKey is the store key string for oracle - StoreKey = ModuleName - - // RouterKey is the message route for oracle - RouterKey = ModuleName - - // QuerierRoute is the querier route for oracle - QuerierRoute = ModuleName -) - -// Keys for cork store, with -> -const ( - _ = byte(iota) - - // CorkForAddressKeyPrefix -
-> - CorkForAddressKeyPrefix // key for corks - - // CommitPeriodStartKey - -> int64(height) - CommitPeriodStartKey // key for commit period height start - - // LatestInvalidationNonceKey - -> uint64(latestNonce) - LatestInvalidationNonceKey - - // CellarIDsKey - -> []string - CellarIDsKey - - // ScheduledCorkKeyPrefix -
-> - ScheduledCorkKeyPrefix -) - -// GetCorkForValidatorAddressKey returns the key for a validators vote for a given address -func GetCorkForValidatorAddressKey(val sdk.ValAddress, contract common.Address) []byte { - return append(GetCorkValidatorKeyPrefix(val), contract.Bytes()...) -} - -// GetCorkValidatorKeyPrefix returns the key prefix for cork commits for a validator -func GetCorkValidatorKeyPrefix(val sdk.ValAddress) []byte { - return append([]byte{CorkForAddressKeyPrefix}, val.Bytes()...) -} - -func MakeCellarIDsKey() []byte { - return []byte{CellarIDsKey} -} - -func GetScheduledCorkKey(blockHeight uint64, val sdk.ValAddress, contract common.Address) []byte { - b := make([]byte, 8) - binary.BigEndian.PutUint64(b, blockHeight) - return bytes.Join([][]byte{{ScheduledCorkKeyPrefix}, b, val.Bytes(), contract.Bytes()}, []byte{}) -} diff --git a/x/cork/module.go b/x/cork/module.go index 0b4c55524..246fbe799 100644 --- a/x/cork/module.go +++ b/x/cork/module.go @@ -15,7 +15,9 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/peggyjv/sommelier/v7/x/cork/client/cli" "github.com/peggyjv/sommelier/v7/x/cork/keeper" - "github.com/peggyjv/sommelier/v7/x/cork/types" + corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" + v1types "github.com/peggyjv/sommelier/v7/x/cork/types/v1" + types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" ) @@ -31,7 +33,7 @@ type AppModuleBasic struct{} // Name returns the cork module's name func (AppModuleBasic) Name() string { - return types.ModuleName + return corktypes.ModuleName } // RegisterLegacyAminoCodec doesn't support amino @@ -72,6 +74,7 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r // RegisterInterfaces implements app module basic func (b AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { types.RegisterInterfaces(registry) + v1types.RegisterInterfaces(registry) } // AppModule implements an application module for the cork module. @@ -91,16 +94,18 @@ func NewAppModule(keeper keeper.Keeper, cdc codec.Codec) AppModule { } // Name returns the cork module's name. -func (AppModule) Name() string { return types.ModuleName } +func (AppModule) Name() string { return corktypes.ModuleName } // RegisterInvariants performs a no-op. func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} // Route returns the message routing key for the cork module. -func (am AppModule) Route() sdk.Route { return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) } +func (am AppModule) Route() sdk.Route { + return sdk.NewRoute(corktypes.RouterKey, NewHandler(am.keeper)) +} // QuerierRoute returns the cork module's querier route name. -func (AppModule) QuerierRoute() string { return types.QuerierRoute } +func (AppModule) QuerierRoute() string { return corktypes.QuerierRoute } // LegacyQuerierHandler returns a nil Querier. func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { @@ -122,7 +127,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), am.keeper) m := keeper.NewMigrator(am.keeper) - if err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2); err != nil { + if err := cfg.RegisterMigration(corktypes.ModuleName, 1, m.Migrate1to2); err != nil { panic(fmt.Sprintf("failed to migrate x/cork from version 1 to 2: %v", err)) } } diff --git a/x/cork/types/keys.go b/x/cork/types/keys.go index 77ed26362..4ad61b938 100644 --- a/x/cork/types/keys.go +++ b/x/cork/types/keys.go @@ -2,6 +2,7 @@ package types import ( "bytes" + "encoding/binary" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" @@ -78,3 +79,19 @@ func GetCorkResultKey(id []byte) []byte { func GetValidatorCorkCountKey(val sdk.ValAddress) []byte { return append([]byte{ValidatorCorkCountKey}, val.Bytes()...) } + +// Legacy V1 keys + +func GetCorkForValidatorAddressKeyV1(val sdk.ValAddress, contract common.Address) []byte { + return append(GetCorkValidatorKeyPrefixV1(val), contract.Bytes()...) +} + +func GetCorkValidatorKeyPrefixV1(val sdk.ValAddress) []byte { + return append([]byte{CorkForAddressKeyPrefix}, val.Bytes()...) +} + +func GetScheduledCorkKeyV1(blockHeight uint64, val sdk.ValAddress, contract common.Address) []byte { + b := make([]byte, 8) + binary.BigEndian.PutUint64(b, blockHeight) + return bytes.Join([][]byte{{ScheduledCorkKeyPrefix}, b, val.Bytes(), contract.Bytes()}, []byte{}) +} diff --git a/x/cork/types/v1/codec.go b/x/cork/types/v1/codec.go new file mode 100644 index 000000000..0b5336570 --- /dev/null +++ b/x/cork/types/v1/codec.go @@ -0,0 +1,23 @@ +package v1 + +import ( + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" +) + +// RegisterInterfaces registers the oracle proto files +func RegisterInterfaces(registry codectypes.InterfaceRegistry) { + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgSubmitCorkRequest{}, + ) + + registry.RegisterImplementations((*govtypes.Content)(nil), + &AddManagedCellarIDsProposal{}, + &RemoveManagedCellarIDsProposal{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/x/cork/types/v1/cork.go b/x/cork/types/v1/cork.go new file mode 100644 index 000000000..650d88f27 --- /dev/null +++ b/x/cork/types/v1/cork.go @@ -0,0 +1,46 @@ +package v1 + +import ( + "bytes" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" + tmbytes "github.com/tendermint/tendermint/libs/bytes" +) + +func (c *Cork) InvalidationScope() tmbytes.HexBytes { + addr := common.HexToAddress(c.TargetContractAddress) + return crypto.Keccak256Hash( + bytes.Join( + [][]byte{addr.Bytes(), c.EncodedContractCall}, + []byte{}, + )).Bytes() +} + +func (c *Cork) Equals(other Cork) bool { + firstAddr := common.HexToAddress(c.TargetContractAddress) + secondAddr := common.HexToAddress(other.TargetContractAddress) + + if firstAddr != secondAddr { + return false + } + + if !bytes.Equal(c.EncodedContractCall, other.EncodedContractCall) { + return false + } + + return true +} + +func (c *Cork) ValidateBasic() error { + if len(c.EncodedContractCall) == 0 { + return corktypes.ErrEmptyContractCall + } + + if !common.IsHexAddress(c.TargetContractAddress) { + return corktypes.ErrInvalidEthereumAddress + } + + return nil +} diff --git a/x/cork/migrations/v1/types/cork.pb.go b/x/cork/types/v1/cork.pb.go similarity index 92% rename from x/cork/migrations/v1/types/cork.pb.go rename to x/cork/types/v1/cork.pb.go index 4f21f586d..90bed45dc 100644 --- a/x/cork/migrations/v1/types/cork.pb.go +++ b/x/cork/types/v1/cork.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: cork/v1/cork.proto -package types +package v1 import ( fmt "fmt" @@ -246,25 +246,25 @@ var fileDescriptor_79882ab39b78d896 = []byte{ // 334 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xc1, 0x4a, 0xf3, 0x40, 0x14, 0x85, 0x3b, 0x7f, 0xcb, 0x2f, 0x9d, 0xb6, 0x20, 0x91, 0x62, 0x15, 0x89, 0x6d, 0x57, 0x5d, - 0x48, 0x86, 0xb6, 0xe0, 0x5e, 0x23, 0xa2, 0x3b, 0x49, 0xc1, 0x85, 0x9b, 0x30, 0x9d, 0x19, 0x92, - 0xd8, 0x49, 0x6f, 0x99, 0x99, 0x06, 0xfb, 0x16, 0x3e, 0x96, 0xcb, 0x2e, 0x5d, 0x4a, 0xf3, 0x22, - 0x92, 0x49, 0x4a, 0xd1, 0x95, 0xab, 0xdc, 0x9c, 0x6f, 0xee, 0x39, 0x07, 0x2e, 0x76, 0x18, 0xa8, - 0x05, 0xc9, 0xc6, 0xa4, 0xf8, 0x7a, 0x2b, 0x05, 0x06, 0x9c, 0x23, 0x3b, 0x67, 0xe3, 0xf3, 0x33, - 0x06, 0x3a, 0x05, 0x1d, 0x5a, 0x99, 0x94, 0x3f, 0xe5, 0x9b, 0xa1, 0xc2, 0x0d, 0x1f, 0xd4, 0xc2, - 0x99, 0xe0, 0xae, 0x58, 0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, 0xd1, 0x90, 0xa6, 0x42, 0x26, - 0x42, 0x91, 0x6c, 0x4a, 0xde, 0xec, 0x1d, 0x89, 0xd9, 0xac, 0x84, 0x9e, 0xff, 0xb7, 0xa7, 0x9a, - 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x53, 0xd2, 0xb5, 0x67, 0xe4, 0x01, 0x00, 0x00, + 0x48, 0x86, 0x56, 0x74, 0xaf, 0x11, 0xd1, 0x9d, 0xa4, 0xe0, 0xc2, 0x4d, 0x98, 0xce, 0x0c, 0x49, + 0xec, 0xa4, 0xb7, 0xcc, 0x4c, 0x83, 0x7d, 0x0b, 0x1f, 0xcb, 0x65, 0x97, 0x2e, 0xa5, 0x79, 0x11, + 0xc9, 0x24, 0xa5, 0xe8, 0xca, 0x55, 0x6e, 0xce, 0x37, 0xf7, 0x9c, 0x03, 0x17, 0x3b, 0x0c, 0xd4, + 0x9c, 0x64, 0x63, 0x52, 0x7c, 0xbd, 0xa5, 0x02, 0x03, 0xce, 0x81, 0x9d, 0xb3, 0xf1, 0xe9, 0x09, + 0x03, 0x9d, 0x82, 0x0e, 0xad, 0x4c, 0xca, 0x9f, 0xf2, 0xcd, 0x50, 0xe1, 0x86, 0x0f, 0x6a, 0xee, + 0x4c, 0x70, 0x57, 0x2c, 0x18, 0x70, 0xc1, 0x43, 0x06, 0x0b, 0xa3, 0x28, 0x33, 0x21, 0xa3, 0x52, + 0xf6, 0x50, 0x1f, 0x8d, 0xda, 0xc1, 0x51, 0x05, 0xfd, 0x8a, 0xf9, 0x54, 0x4a, 0xe7, 0x1a, 0x1f, + 0x1b, 0xaa, 0x22, 0x61, 0xf6, 0x2b, 0x94, 0x73, 0x25, 0xb4, 0xee, 0xfd, 0xeb, 0xa3, 0x51, 0x33, + 0xe8, 0x96, 0x78, 0xb7, 0x74, 0x53, 0xc2, 0xe1, 0x13, 0xee, 0x3c, 0x53, 0x99, 0x70, 0x6a, 0x40, + 0xd9, 0xf0, 0x01, 0x6e, 0x14, 0x55, 0x6d, 0x56, 0x6b, 0xd2, 0xf1, 0xaa, 0xde, 0x5e, 0x01, 0x03, + 0x8b, 0x9c, 0x33, 0xdc, 0xcc, 0x76, 0x3b, 0x95, 0xfb, 0x5e, 0x18, 0x6a, 0xdc, 0x99, 0xb2, 0x58, + 0xf0, 0x95, 0x2c, 0x2a, 0xfe, 0xcd, 0x71, 0x80, 0xdb, 0x33, 0x09, 0x6c, 0x1e, 0xc6, 0x22, 0x89, + 0x62, 0x63, 0x4d, 0x1b, 0x41, 0xcb, 0x6a, 0x0f, 0x56, 0xfa, 0x19, 0x5a, 0xff, 0x1d, 0x7a, 0x8e, + 0x5b, 0xbe, 0x90, 0x92, 0xaa, 0xc7, 0xbb, 0xa9, 0x30, 0xce, 0x21, 0xae, 0x27, 0x5c, 0xf7, 0x50, + 0xbf, 0x3e, 0x6a, 0x06, 0xc5, 0x78, 0x7b, 0xff, 0xb1, 0x75, 0xd1, 0x66, 0xeb, 0xa2, 0xaf, 0xad, + 0x8b, 0xde, 0x73, 0xb7, 0xb6, 0xc9, 0xdd, 0xda, 0x67, 0xee, 0xd6, 0x5e, 0x2e, 0xa2, 0xc4, 0xc4, + 0xab, 0x99, 0xc7, 0x20, 0x25, 0x4b, 0x11, 0x45, 0xeb, 0xd7, 0x8c, 0x68, 0x48, 0x53, 0x21, 0x13, + 0xa1, 0x48, 0x76, 0x45, 0xde, 0xec, 0x1d, 0x89, 0x59, 0x2f, 0x85, 0x9e, 0xfd, 0xb7, 0xa7, 0xba, + 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xd3, 0x88, 0x44, 0x15, 0xe4, 0x01, 0x00, 0x00, } func (m *Cork) Marshal() (dAtA []byte, err error) { diff --git a/x/cork/types/v1/genesis.go b/x/cork/types/v1/genesis.go new file mode 100644 index 000000000..400badbe6 --- /dev/null +++ b/x/cork/types/v1/genesis.go @@ -0,0 +1,21 @@ +package v1 + +import corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" + +const DefaultParamspace = corktypes.ModuleName + +// DefaultGenesisState get raw genesis raw message for testing +func DefaultGenesisState() GenesisState { + return GenesisState{ + Params: DefaultParams(), + } +} + +// Validate performs a basic stateless validation of the genesis fields. +func (gs GenesisState) Validate() error { + if err := gs.Params.ValidateBasic(); err != nil { + return err + } + + return nil +} diff --git a/x/cork/migrations/v1/types/genesis.pb.go b/x/cork/types/v1/genesis.pb.go similarity index 91% rename from x/cork/migrations/v1/types/genesis.pb.go rename to x/cork/types/v1/genesis.pb.go index 79f6b05b8..68534c39b 100644 --- a/x/cork/migrations/v1/types/genesis.pb.go +++ b/x/cork/types/v1/genesis.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: cork/v1/genesis.proto -package types +package v1 import ( fmt "fmt" @@ -158,33 +158,33 @@ func init() { proto.RegisterFile("cork/v1/genesis.proto", fileDescriptor_ec09bf5 var fileDescriptor_ec09bf5ff5694398 = []byte{ // 430 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x52, 0xbf, 0x6a, 0xdb, 0x40, - 0x18, 0xb7, 0x62, 0xc7, 0x25, 0xe7, 0x36, 0x69, 0x8f, 0x24, 0x98, 0x0c, 0xb2, 0xd1, 0x50, 0x3c, - 0xc4, 0x3a, 0x92, 0x0c, 0xa5, 0x5d, 0x0a, 0x4e, 0x68, 0xc8, 0x52, 0x82, 0x5c, 0x3a, 0x74, 0x31, - 0x8a, 0xee, 0x43, 0xbe, 0x5a, 0xd2, 0x27, 0xee, 0x2e, 0x22, 0x7e, 0x8b, 0x4e, 0x7d, 0x8f, 0xbe, - 0x45, 0xc6, 0x8c, 0xa5, 0x83, 0x29, 0xf6, 0x1b, 0xe4, 0x09, 0x8a, 0xee, 0x24, 0x23, 0x3a, 0xe9, - 0x7e, 0xff, 0xbe, 0x1f, 0xfa, 0xf8, 0xc8, 0x51, 0x84, 0x72, 0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90, 0x12, 0xdd, + 0x18, 0x40, 0x33, 0xb2, 0x6f, 0x34, 0x3d, 0x97, 0xa0, 0xe6, 0x98, 0x70, 0xb3, 0xa0, 0xbd, 0xc9, + 0x55, 0xb9, 0x8a, 0x3f, 0xab, 0xc1, 0xeb, 0x58, 0xe8, 0xf9, 0xdd, 0xad, 0x1f, 0x61, 0xca, 0x22, + 0x54, 0x29, 0xaa, 0xea, 0x33, 0x56, 0x7c, 0xc1, 0xf4, 0x32, 0x07, 0xe5, 0x5f, 0x42, 0xf4, 0xb4, + 0x1a, 0x1c, 0x35, 0x9a, 0xb6, 0xd3, 0xbc, 0xe0, 0x45, 0x49, 0x7c, 0xa9, 0xf1, 0xe4, 0xd3, 0xc3, + 0xda, 0x75, 0x1e, 0xd7, 0xae, 0xf3, 0x77, 0xed, 0x3a, 0x3f, 0x36, 0x6e, 0xeb, 0x71, 0xe3, 0xb6, 0x7e, 0x6f, 0xdc, 0xd6, 0xb7, 0xd3, 0x46, 0x53, 0x0e, 0x71, 0xbc, 0xfc, 0x5e, 0x30, 0x85, 0x69, - 0x0a, 0x89, 0x00, 0xc9, 0x8a, 0x0b, 0xf6, 0x60, 0x4e, 0xc5, 0x76, 0xde, 0x75, 0xcd, 0x6d, 0x5c, - 0xfc, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x5e, 0xf1, 0x78, 0xce, 0x79, 0x02, 0x00, 0x00, + 0x0a, 0x89, 0x00, 0xc9, 0x8a, 0xb7, 0xec, 0xde, 0x9c, 0x8a, 0xed, 0xbc, 0xed, 0x9a, 0xdb, 0x78, + 0xf3, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xde, 0xab, 0x89, 0xbc, 0x79, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/cork/types/v1/msgs.go b/x/cork/types/v1/msgs.go new file mode 100644 index 000000000..435d9f5a9 --- /dev/null +++ b/x/cork/types/v1/msgs.go @@ -0,0 +1,118 @@ +package v1 + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/ethereum/go-ethereum/common" + corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" +) + +var ( + _ sdk.Msg = &MsgSubmitCorkRequest{} + _ sdk.Msg = &MsgScheduleCorkRequest{} +) + +const ( + TypeMsgSubmitCorkRequest = "cork_submit" + TypeMsgScheduleCorkRequest = "cork_schedule" +) + +////////////////////////// +// MsgSubmitCorkRequest // +////////////////////////// + +// NewMsgSubmitCorkRequest return a new MsgSubmitCorkRequest +func NewMsgSubmitCorkRequest(body []byte, address common.Address, signer sdk.AccAddress) (*MsgSubmitCorkRequest, error) { + return &MsgSubmitCorkRequest{ + Cork: &Cork{ + EncodedContractCall: body, + TargetContractAddress: address.String(), + }, + Signer: signer.String(), + }, nil +} + +// Route implements sdk.Msg +func (m *MsgSubmitCorkRequest) Route() string { return corktypes.ModuleName } + +// Type implements sdk.Msg +func (m *MsgSubmitCorkRequest) Type() string { return TypeMsgSubmitCorkRequest } + +// ValidateBasic implements sdk.Msg +func (m *MsgSubmitCorkRequest) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Signer); err != nil { + return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) + } + + return nil +} + +// GetSignBytes implements sdk.Msg +func (m *MsgSubmitCorkRequest) GetSignBytes() []byte { + panic("amino support disabled") +} + +// GetSigners implements sdk.Msg +func (m *MsgSubmitCorkRequest) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{m.MustGetSigner()} +} + +// MustGetSigner returns the signer address +func (m *MsgSubmitCorkRequest) MustGetSigner() sdk.AccAddress { + addr, err := sdk.AccAddressFromBech32(m.Signer) + if err != nil { + panic(err) + } + return addr +} + +////////////////////////// +// MsgScheduleCorkRequest // +////////////////////////// + +// NewMsgScheduleCorkRequest return a new MsgScheduleCorkRequest +func NewMsgScheduleCorkRequest(body []byte, address common.Address, blockHeight uint64, signer sdk.AccAddress) (*MsgScheduleCorkRequest, error) { + return &MsgScheduleCorkRequest{ + Cork: &Cork{ + EncodedContractCall: body, + TargetContractAddress: address.String(), + }, + BlockHeight: blockHeight, + Signer: signer.String(), + }, nil +} + +// Route implements sdk.Msg +func (m *MsgScheduleCorkRequest) Route() string { return corktypes.ModuleName } + +// Type implements sdk.Msg +func (m *MsgScheduleCorkRequest) Type() string { return TypeMsgScheduleCorkRequest } + +// ValidateBasic implements sdk.Msg +func (m *MsgScheduleCorkRequest) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Signer); err != nil { + return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) + } + + return m.Cork.ValidateBasic() +} + +// GetSignBytes implements sdk.Msg +func (m *MsgScheduleCorkRequest) GetSignBytes() []byte { + panic("amino support disabled") +} + +// GetSigners implements sdk.Msg +func (m *MsgScheduleCorkRequest) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{m.MustGetSigner()} +} + +// MustGetSigner returns the signer address +func (m *MsgScheduleCorkRequest) MustGetSigner() sdk.AccAddress { + addr, err := sdk.AccAddressFromBech32(m.Signer) + if err != nil { + panic(err) + } + return addr +} diff --git a/x/cork/migrations/v1/types/params.go b/x/cork/types/v1/params.go similarity index 99% rename from x/cork/migrations/v1/types/params.go rename to x/cork/types/v1/params.go index c5445a795..5b315907a 100644 --- a/x/cork/migrations/v1/types/params.go +++ b/x/cork/types/v1/params.go @@ -1,4 +1,4 @@ -package types +package v1 import ( "errors" diff --git a/x/cork/types/v1/params_test.go b/x/cork/types/v1/params_test.go new file mode 100644 index 000000000..2a644a594 --- /dev/null +++ b/x/cork/types/v1/params_test.go @@ -0,0 +1,60 @@ +package v1 + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" +) + +func TestParamsValidate(t *testing.T) { + testCases := []struct { + name string + params Params + expPass bool + }{ + { + name: "default", + params: DefaultParams(), + expPass: true, + }, + { + name: "empty", + params: Params{}, + expPass: false, + }, + { + name: "invalid vote period", + params: Params{ + VotePeriod: 0, + }, + expPass: false, + }, + { + name: "invalid vote threshold", + params: Params{ + VotePeriod: 5, + VoteThreshold: sdk.ZeroDec(), + }, + expPass: false, + }, + { + name: "nil vote threshold", + params: Params{ + VotePeriod: 5, + VoteThreshold: sdk.Dec{}, + }, + expPass: false, + }, + } + + for _, tc := range testCases { + + err := tc.params.ValidateBasic() + if tc.expPass { + require.NoError(t, err, tc.name) + } else { + require.Error(t, err, tc.name) + } + } +} diff --git a/x/cork/types/v1/proposal.go b/x/cork/types/v1/proposal.go new file mode 100644 index 000000000..705559d11 --- /dev/null +++ b/x/cork/types/v1/proposal.go @@ -0,0 +1,81 @@ +package v1 + +import ( + "fmt" + + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" +) + +const ( + ProposalTypeAddManagedCellarIDs = "AddManagedCellarIDs" + ProposalTypeRemoveManagedCellarIDs = "RemoveManagedCellarIDs" +) + +var _ govtypes.Content = &AddManagedCellarIDsProposal{} +var _ govtypes.Content = &RemoveManagedCellarIDsProposal{} + +func init() { + govtypes.RegisterProposalType(ProposalTypeAddManagedCellarIDs) + govtypes.ModuleCdc.RegisterConcrete(&AddManagedCellarIDsProposal{}, "sommelier/AddManagedCellarIDsProposal", nil) + + govtypes.RegisterProposalType(ProposalTypeRemoveManagedCellarIDs) + govtypes.ModuleCdc.RegisterConcrete(&RemoveManagedCellarIDsProposal{}, "sommelier/RemoveManagedCellarIDsProposal", nil) + +} + +func NewAddManagedCellarIDsProposal(title string, description string, cellarIds *CellarIDSet) *AddManagedCellarIDsProposal { + return &AddManagedCellarIDsProposal{ + Title: title, + Description: description, + CellarIds: cellarIds, + } +} + +func (m *AddManagedCellarIDsProposal) ProposalRoute() string { + return corktypes.RouterKey +} + +func (m *AddManagedCellarIDsProposal) ProposalType() string { + return ProposalTypeAddManagedCellarIDs +} + +func (m *AddManagedCellarIDsProposal) ValidateBasic() error { + if err := govtypes.ValidateAbstract(m); err != nil { + return err + } + + if len(m.CellarIds.Ids) == 0 { + return fmt.Errorf("can't have an add prosoposal with no cellars") + } + + return nil +} + +func NewRemoveManagedCellarIDsProposal(title string, description string, cellarIds *CellarIDSet) *RemoveManagedCellarIDsProposal { + return &RemoveManagedCellarIDsProposal{ + Title: title, + Description: description, + CellarIds: cellarIds, + } +} + +func (m *RemoveManagedCellarIDsProposal) ProposalRoute() string { + return corktypes.RouterKey +} + +func (m *RemoveManagedCellarIDsProposal) ProposalType() string { + return ProposalTypeRemoveManagedCellarIDs +} + +func (m *RemoveManagedCellarIDsProposal) ValidateBasic() error { + if err := govtypes.ValidateAbstract(m); err != nil { + return err + } + + if len(m.CellarIds.Ids) == 0 { + return fmt.Errorf("can't have a remove prosoposal with no cellars") + } + + return nil +} diff --git a/x/cork/migrations/v1/types/proposal.pb.go b/x/cork/types/v1/proposal.pb.go similarity index 94% rename from x/cork/migrations/v1/types/proposal.pb.go rename to x/cork/types/v1/proposal.pb.go index 37fd70ff5..cb4ea6156 100644 --- a/x/cork/migrations/v1/types/proposal.pb.go +++ b/x/cork/types/v1/proposal.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: cork/v1/proposal.proto -package types +package v1 import ( fmt "fmt" @@ -298,26 +298,26 @@ func init() { proto.RegisterFile("cork/v1/proposal.proto", fileDescriptor_55632a var fileDescriptor_55632a565c114c4a = []byte{ // 323 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4b, 0xce, 0x2f, 0xca, - 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0x28, 0xca, 0x2f, 0xc8, 0x2f, 0x4e, 0xcc, 0xd1, 0x2b, 0x28, 0xca, - 0x2f, 0xc9, 0x17, 0x62, 0x07, 0x89, 0xeb, 0x95, 0x19, 0x4a, 0x49, 0x26, 0xe7, 0x17, 0xe7, 0xe6, - 0x17, 0xc7, 0x83, 0x85, 0xf5, 0x21, 0x1c, 0x88, 0x1a, 0x29, 0x21, 0x98, 0x5e, 0xb0, 0x5a, 0xb0, - 0x98, 0x52, 0x17, 0x23, 0x97, 0xb4, 0x63, 0x4a, 0x8a, 0x6f, 0x62, 0x5e, 0x62, 0x7a, 0x6a, 0x8a, - 0x73, 0x6a, 0x4e, 0x4e, 0x62, 0x91, 0xa7, 0x4b, 0x71, 0x00, 0xd4, 0x74, 0x21, 0x11, 0x2e, 0xd6, - 0x92, 0xcc, 0x92, 0x9c, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x08, 0x47, 0x48, 0x81, - 0x8b, 0x3b, 0x25, 0xb5, 0x38, 0xb9, 0x28, 0xb3, 0xa0, 0x24, 0x33, 0x3f, 0x4f, 0x82, 0x09, 0x2c, - 0x87, 0x2c, 0x24, 0x64, 0xcc, 0xc5, 0x95, 0x0c, 0x36, 0x2c, 0x3e, 0x33, 0xa5, 0x58, 0x82, 0x59, - 0x81, 0x51, 0x83, 0xdb, 0x48, 0x44, 0x0f, 0xea, 0x48, 0x3d, 0x98, 0x3d, 0xc1, 0xa9, 0x25, 0x41, - 0x9c, 0x10, 0x75, 0x9e, 0x29, 0xc5, 0x4a, 0x33, 0x19, 0xb9, 0xd4, 0xf0, 0x38, 0x26, 0x3c, 0xb3, - 0x24, 0xc3, 0x25, 0xb5, 0x20, 0xbf, 0x38, 0xb3, 0x84, 0x6c, 0x77, 0xc9, 0xa2, 0xb9, 0x8b, 0x59, - 0x83, 0x13, 0xc9, 0x05, 0x42, 0x12, 0x5c, 0xec, 0x29, 0x10, 0x1b, 0x24, 0x58, 0xc0, 0x9a, 0x61, - 0x5c, 0xa5, 0x5e, 0x46, 0x2e, 0xb9, 0xa0, 0xd4, 0xdc, 0xfc, 0xb2, 0xd4, 0xc1, 0x11, 0x56, 0x73, - 0x18, 0x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0x34, 0x2a, 0x34, 0x61, 0x12, 0x28, 0x8d, + 0x16, 0xbd, 0xca, 0xb7, 0x1f, 0x64, 0x9d, 0xc6, 0x6e, 0x84, 0x26, 0x45, 0x33, 0x74, 0x36, 0xcf, + 0x45, 0x9e, 0x69, 0x78, 0x45, 0xaf, 0xcb, 0x3a, 0xaf, 0xf5, 0x44, 0xe8, 0xde, 0xa9, 0x10, 0x97, + 0xe1, 0x24, 0x8c, 0x41, 0x9c, 0x43, 0x92, 0x84, 0xba, 0xdf, 0x33, 0x57, 0xcb, 0xe9, 0x5e, 0x9d, + 0x6e, 0x59, 0x69, 0x13, 0xf0, 0x49, 0x93, 0xb4, 0xab, 0x83, 0x5c, 0x78, 0x4d, 0x5a, 0x13, 0x60, + 0x22, 0x2d, 0x95, 0x95, 0x38, 0xf1, 0x37, 0x5c, 0x6d, 0xd5, 0xf2, 0xba, 0x94, 0x46, 0x6e, 0xd8, + 0x50, 0x0a, 0xe3, 0x97, 0x9b, 0xa4, 0x5d, 0x3b, 0xae, 0x07, 0x4b, 0xc8, 0xa0, 0xd8, 0x73, 0x0d, + 0x76, 0x50, 0xcd, 0x73, 0x7d, 0x61, 0x5a, 0xaf, 0x84, 0x1e, 0xac, 0x81, 0xb9, 0x91, 0x76, 0xdc, + 0x03, 0x85, 0x46, 0xda, 0x5f, 0x73, 0xed, 0xff, 0xe0, 0x2a, 0xb7, 0xab, 0x2b, 0x04, 0x9e, 0x4f, + 0x2b, 0x22, 0xdf, 0xe0, 0x6f, 0xba, 0xe6, 0x42, 0xb6, 0x9e, 0x09, 0x65, 0x03, 0x48, 0x31, 0x83, + 0xff, 0x71, 0xab, 0x37, 0x42, 0x0f, 0xd7, 0xf3, 0xfc, 0xe5, 0xb9, 0xce, 0x2e, 0xde, 0xe7, 0x8c, + 0xcc, 0xe6, 0x8c, 0x7c, 0xce, 0x19, 0x79, 0x59, 0xb0, 0xd2, 0x6c, 0xc1, 0x4a, 0x1f, 0x0b, 0x56, + 0xba, 0x3d, 0x8a, 0xa5, 0x1d, 0x3f, 0x8c, 0x82, 0x08, 0x53, 0xae, 0x20, 0x8e, 0xa7, 0x77, 0x19, + 0x37, 0x98, 0xa6, 0x90, 0x48, 0xd0, 0x3c, 0x3b, 0xe1, 0x8f, 0xee, 0x3f, 0xb9, 0x9d, 0x2a, 0x30, + 0xa3, 0x6d, 0xf7, 0xa6, 0xdd, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0x15, 0x23, 0x61, 0xf8, 0x02, 0x00, 0x00, } diff --git a/x/cork/migrations/v1/types/query.pb.go b/x/cork/types/v1/query.pb.go similarity index 97% rename from x/cork/migrations/v1/types/query.pb.go rename to x/cork/types/v1/query.pb.go index 48a845fed..d146b94a1 100644 --- a/x/cork/migrations/v1/types/query.pb.go +++ b/x/cork/types/v1/query.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: cork/v1/query.proto -package types +package v1 import ( context "context" @@ -661,53 +661,53 @@ var fileDescriptor_4ee46790c91f0468 = []byte{ // 784 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4d, 0x6f, 0xd3, 0x4a, 0x14, 0x8d, 0xfb, 0xf5, 0x5e, 0x27, 0xfd, 0x50, 0xa7, 0x1f, 0x2f, 0x75, 0x53, 0xb7, 0x71, 0xdb, - 0xf7, 0xa2, 0xbc, 0x12, 0x93, 0x74, 0xc1, 0x9a, 0xb4, 0x20, 0x22, 0x58, 0x94, 0x74, 0x83, 0xd8, + 0xf7, 0xa2, 0xbc, 0x12, 0x93, 0x20, 0xc4, 0x9a, 0xb4, 0x20, 0x22, 0x58, 0x94, 0x74, 0x83, 0xd8, 0x44, 0xb6, 0x33, 0x72, 0x4c, 0x62, 0x8f, 0x6b, 0x4f, 0xa2, 0x46, 0x88, 0x0d, 0x42, 0xac, 0x10, 0x42, 0x42, 0xe2, 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, 0xeb, 0x62, 0x09, 0x6f, 0x8e, 0x1b, 0x91, + 0xe8, 0x3e, 0x90, 0x2b, 0xbf, 0x71, 0x82, 0xbb, 0xaf, 0x53, 0xf7, 0x07, 0xf0, 0xee, 0xf5, 0x13, + 0x6e, 0x1a, 0x83, 0xd4, 0x6b, 0x68, 0xcf, 0x93, 0x4f, 0x2f, 0x6a, 0xf7, 0xcf, 0x2e, 0x14, 0xe9, + 0xfc, 0x42, 0x91, 0xbe, 0x5d, 0x28, 0xd2, 0xbb, 0x4b, 0x25, 0x73, 0x7e, 0xa9, 0x64, 0xbe, 0x5c, + 0x2a, 0x99, 0xa7, 0xfb, 0x96, 0x4d, 0xda, 0x3d, 0xa3, 0x6c, 0x62, 0x47, 0xf3, 0x90, 0x65, 0x0d, + 0x9e, 0xf5, 0x13, 0x72, 0xfd, 0xdb, 0xda, 0x29, 0xd3, 0x24, 0x03, 0x0f, 0x05, 0xc6, 0x0c, 0xfd, + 0x9f, 0xbe, 0xf5, 0x23, 0x00, 0x00, 0xff, 0xff, 0x02, 0xa4, 0x07, 0xac, 0x6d, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -726,7 +726,7 @@ type QueryClient interface { QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // QuerySubmittedCorks queries the submitted corks awaiting vote QuerySubmittedCorks(ctx context.Context, in *QuerySubmittedCorksRequest, opts ...grpc.CallOption) (*QuerySubmittedCorksResponse, error) - // QueryVotePeriod queries the heights for the current voting period (current, start and end) + // QueryCommitPeriod queries the heights for the current voting period (current, start and end) QueryCommitPeriod(ctx context.Context, in *QueryCommitPeriodRequest, opts ...grpc.CallOption) (*QueryCommitPeriodResponse, error) // QueryCellarIDs returns all cellars and current tick ranges QueryCellarIDs(ctx context.Context, in *QueryCellarIDsRequest, opts ...grpc.CallOption) (*QueryCellarIDsResponse, error) @@ -815,7 +815,7 @@ type QueryServer interface { QueryParams(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // QuerySubmittedCorks queries the submitted corks awaiting vote QuerySubmittedCorks(context.Context, *QuerySubmittedCorksRequest) (*QuerySubmittedCorksResponse, error) - // QueryVotePeriod queries the heights for the current voting period (current, start and end) + // QueryCommitPeriod queries the heights for the current voting period (current, start and end) QueryCommitPeriod(context.Context, *QueryCommitPeriodRequest) (*QueryCommitPeriodResponse, error) // QueryCellarIDs returns all cellars and current tick ranges QueryCellarIDs(context.Context, *QueryCellarIDsRequest) (*QueryCellarIDsResponse, error) diff --git a/x/cork/migrations/v1/types/query.pb.gw.go b/x/cork/types/v1/query.pb.gw.go similarity index 92% rename from x/cork/migrations/v1/types/query.pb.gw.go rename to x/cork/types/v1/query.pb.gw.go index e0c2e6381..1591af020 100644 --- a/x/cork/migrations/v1/types/query.pb.gw.go +++ b/x/cork/types/v1/query.pb.gw.go @@ -6,7 +6,7 @@ Package types is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package types +package v1 import ( "context" @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -30,6 +31,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Query_QueryParams_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest @@ -196,12 +198,14 @@ func local_request_Query_QueryScheduledCorksByBlockHeight_0(ctx context.Context, // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_QueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -209,6 +213,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_QueryParams_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -222,6 +227,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_QuerySubmittedCorks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -229,6 +236,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_QuerySubmittedCorks_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -242,6 +250,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_QueryCommitPeriod_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -249,6 +259,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_QueryCommitPeriod_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -262,6 +273,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_QueryCellarIDs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -269,6 +282,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_QueryCellarIDs_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -282,6 +296,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_QueryScheduledCorks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -289,6 +305,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_QueryScheduledCorks_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -302,6 +319,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_QueryScheduledBlockHeights_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -309,6 +328,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_QueryScheduledBlockHeights_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -322,6 +342,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_QueryScheduledCorksByBlockHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -329,6 +351,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_QueryScheduledCorksByBlockHeight_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/cork/migrations/v1/types/tx.pb.go b/x/cork/types/v1/tx.pb.go similarity index 92% rename from x/cork/migrations/v1/types/tx.pb.go rename to x/cork/types/v1/tx.pb.go index e1f2aa4a3..ba3238a62 100644 --- a/x/cork/migrations/v1/types/tx.pb.go +++ b/x/cork/types/v1/tx.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: cork/v1/tx.proto -package types +package v1 import ( context "context" @@ -230,28 +230,29 @@ func init() { func init() { proto.RegisterFile("cork/v1/tx.proto", fileDescriptor_cfad1a5454058218) } var fileDescriptor_cfad1a5454058218 = []byte{ - // 336 bytes of a gzipped FileDescriptorProto + // 337 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x51, 0x4d, 0x4e, 0xc2, 0x40, 0x18, 0x65, 0x84, 0x60, 0x1c, 0x30, 0x31, 0x13, 0xe5, 0xa7, 0x89, 0x23, 0xb0, 0x62, 0x61, 0x3a, - 0x01, 0x6e, 0xa0, 0x89, 0x31, 0x31, 0x2c, 0xc0, 0x9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, 0xe2, 0xfa, 0x56, - 0x6f, 0x36, 0xa9, 0xff, 0x8a, 0x70, 0x71, 0x28, 0x05, 0xb9, 0xc1, 0xf8, 0x67, 0x30, 0x39, 0xfd, - 0x1e, 0xf0, 0xd7, 0xdf, 0x18, 0x74, 0x97, 0x9c, 0x85, 0x92, 0x11, 0xae, 0xae, 0x97, 0x91, 0xb3, - 0x0d, 0xff, 0xf6, 0xf3, 0x8d, 0xd6, 0x6e, 0x43, 0x16, 0x79, 0x71, 0xf5, 0xb6, 0xa2, 0x68, 0xb9, - 0xa2, 0xe8, 0x63, 0x45, 0xd1, 0x4b, 0x42, 0x0b, 0xcb, 0x84, 0x16, 0xde, 0x13, 0x5a, 0xb8, 0x3b, - 0x17, 0xae, 0x72, 0x22, 0xcb, 0xb4, 0xc1, 0x67, 0x01, 0x17, 0x62, 0xf1, 0x14, 0x33, 0x09, 0xbe, - 0xcf, 0x3d, 0x97, 0x87, 0x2c, 0x1e, 0xb0, 0xb9, 0x3e, 0x37, 0x53, 0x8b, 0x80, 0x4b, 0xab, 0xac, - 0xaf, 0x3e, 0xf8, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x44, 0xcf, 0x37, 0x9e, 0x5c, 0x02, 0x00, 0x00, + 0x01, 0xe3, 0x05, 0x34, 0x31, 0x26, 0x86, 0x05, 0xb8, 0x73, 0x43, 0x6c, 0x1d, 0xa7, 0x95, 0x96, + 0xaf, 0x76, 0xa6, 0x0d, 0xdc, 0xc2, 0x4b, 0x78, 0x17, 0x97, 0x2c, 0x5d, 0x1a, 0x7a, 0x11, 0xd3, + 0x69, 0x55, 0x10, 0x59, 0xb8, 0x7c, 0x3f, 0x79, 0xef, 0xcd, 0x7c, 0xf8, 0xc0, 0x86, 0x70, 0xc2, + 0xe2, 0x1e, 0x53, 0x33, 0x33, 0x08, 0x41, 0x01, 0xd9, 0x4d, 0x19, 0x33, 0xee, 0x19, 0x4d, 0x1b, + 0xa4, 0x0f, 0x72, 0xac, 0x69, 0x96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2, 0x7b, 0x42, 0x0b, 0x77, + 0xa7, 0xc2, 0x55, 0x4e, 0x64, 0x99, 0x36, 0xf8, 0x2c, 0xe0, 0x42, 0xcc, 0x9f, 0x62, 0x26, 0xc1, + 0xf7, 0xb9, 0xe7, 0xf2, 0x90, 0xc5, 0xe7, 0x6c, 0xa6, 0xcf, 0xcd, 0xd4, 0x3c, 0xe0, 0xd2, 0x2a, + 0xeb, 0xab, 0x9f, 0x7d, 0x06, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x95, 0xc6, 0xec, 0x5c, 0x02, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/cork/types/codec.go b/x/cork/types/v2/codec.go similarity index 93% rename from x/cork/types/codec.go rename to x/cork/types/v2/codec.go index 37661eeb1..71d23254d 100644 --- a/x/cork/types/codec.go +++ b/x/cork/types/v2/codec.go @@ -1,4 +1,4 @@ -package types +package v2 import ( "github.com/cosmos/cosmos-sdk/codec" @@ -12,7 +12,7 @@ import ( // RegisterLegacyAminoCodec registers the vesting interfaces and concrete types on the // provided LegacyAmino codec. These types are used for Amino JSON serialization func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&MsgScheduleCorkRequest{}, "cork/MsgScheduleCorkRequest", nil) + cdc.RegisterConcrete(&MsgScheduleCorkRequest{}, "cork/v2/MsgScheduleCorkRequest", nil) } var ( diff --git a/x/cork/types/cork.go b/x/cork/types/v2/cork.go similarity index 93% rename from x/cork/types/cork.go rename to x/cork/types/v2/cork.go index f3830dc0d..42ed2329f 100644 --- a/x/cork/types/cork.go +++ b/x/cork/types/v2/cork.go @@ -1,4 +1,4 @@ -package types +package v2 import ( "bytes" @@ -9,6 +9,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" tmbytes "github.com/tendermint/tendermint/libs/bytes" ) @@ -50,11 +51,11 @@ func (c *Cork) Equals(other Cork) bool { func (c *Cork) ValidateBasic() error { if len(c.EncodedContractCall) == 0 { - return ErrEmptyContractCall + return corktypes.ErrEmptyContractCall } if !common.IsHexAddress(c.TargetContractAddress) { - return ErrInvalidEthereumAddress + return corktypes.ErrInvalidEthereumAddress } return nil diff --git a/x/cork/types/cork.pb.go b/x/cork/types/v2/cork.pb.go similarity index 99% rename from x/cork/types/cork.pb.go rename to x/cork/types/v2/cork.pb.go index 37d4f65ab..9a2442c47 100644 --- a/x/cork/types/cork.pb.go +++ b/x/cork/types/v2/cork.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: cork/v2/cork.proto -package types +package v2 import ( fmt "fmt" diff --git a/x/cork/types/genesis.go b/x/cork/types/v2/genesis.go similarity index 87% rename from x/cork/types/genesis.go rename to x/cork/types/v2/genesis.go index 947238879..b6d51675e 100644 --- a/x/cork/types/genesis.go +++ b/x/cork/types/v2/genesis.go @@ -1,6 +1,8 @@ -package types +package v2 -const DefaultParamspace = ModuleName +import types "github.com/peggyjv/sommelier/v7/x/cork/types" + +const DefaultParamspace = types.ModuleName // DefaultGenesisState get raw genesis raw message for testing func DefaultGenesisState() GenesisState { diff --git a/x/cork/types/genesis.pb.go b/x/cork/types/v2/genesis.pb.go similarity index 99% rename from x/cork/types/genesis.pb.go rename to x/cork/types/v2/genesis.pb.go index 7bec9f760..19095dab2 100644 --- a/x/cork/types/genesis.pb.go +++ b/x/cork/types/v2/genesis.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: cork/v2/genesis.proto -package types +package v2 import ( fmt "fmt" diff --git a/x/cork/types/msgs.go b/x/cork/types/v2/msgs.go similarity index 92% rename from x/cork/types/msgs.go rename to x/cork/types/v2/msgs.go index e9f455165..09cb67800 100644 --- a/x/cork/types/msgs.go +++ b/x/cork/types/v2/msgs.go @@ -1,4 +1,4 @@ -package types +package v2 import ( "fmt" @@ -7,6 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" + types "github.com/peggyjv/sommelier/v7/x/cork/types" ) var ( @@ -35,7 +36,7 @@ func NewMsgScheduleCorkRequest(body []byte, address common.Address, blockHeight } // Route implements sdk.Msg -func (m *MsgScheduleCorkRequest) Route() string { return ModuleName } +func (m *MsgScheduleCorkRequest) Route() string { return types.ModuleName } // Type implements sdk.Msg func (m *MsgScheduleCorkRequest) Type() string { return TypeMsgScheduleCorkRequest } diff --git a/x/cork/types/params.go b/x/cork/types/v2/params.go similarity index 99% rename from x/cork/types/params.go rename to x/cork/types/v2/params.go index 678ef0eca..37dc882f4 100644 --- a/x/cork/types/params.go +++ b/x/cork/types/v2/params.go @@ -1,4 +1,4 @@ -package types +package v2 import ( "errors" diff --git a/x/cork/types/params_test.go b/x/cork/types/v2/params_test.go similarity index 98% rename from x/cork/types/params_test.go rename to x/cork/types/v2/params_test.go index 31d59362b..8c24d80c8 100644 --- a/x/cork/types/params_test.go +++ b/x/cork/types/v2/params_test.go @@ -1,4 +1,4 @@ -package types +package v2 import ( "testing" diff --git a/x/cork/types/proposal.go b/x/cork/types/v2/proposal.go similarity index 83% rename from x/cork/types/proposal.go rename to x/cork/types/v2/proposal.go index 662055470..53ca8ab99 100644 --- a/x/cork/types/proposal.go +++ b/x/cork/types/v2/proposal.go @@ -1,4 +1,4 @@ -package types +package v2 import ( "encoding/json" @@ -7,13 +7,14 @@ import ( errorsmod "cosmossdk.io/errors" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/ethereum/go-ethereum/common" + types "github.com/peggyjv/sommelier/v7/x/cork/types" pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" ) const ( - ProposalTypeAddManagedCellarIDs = "AddManagedCellarIDs" - ProposalTypeRemoveManagedCellarIDs = "RemoveManagedCellarIDs" - ProposalTypeScheduledCork = "ScheduledCork" + ProposalTypeAddManagedCellarIDs = "v2/AddManagedCellarIDs" + ProposalTypeRemoveManagedCellarIDs = "v2/RemoveManagedCellarIDs" + ProposalTypeScheduledCork = "v2/ScheduledCork" ) var _ govtypesv1beta1.Content = &AddManagedCellarIDsProposal{} @@ -29,13 +30,13 @@ func init() { // This PR was later reverted, but RegisterProposalTypeCodec was still left out. Not sure if // this was intentional or not. govtypesv1beta1.RegisterProposalType(ProposalTypeAddManagedCellarIDs) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&AddManagedCellarIDsProposal{}, "sommelier/AddManagedCellarIDsProposal", nil) + govtypesv1beta1.ModuleCdc.RegisterConcrete(&AddManagedCellarIDsProposal{}, "sommelier/v2/AddManagedCellarIDsProposal", nil) govtypesv1beta1.RegisterProposalType(ProposalTypeRemoveManagedCellarIDs) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&RemoveManagedCellarIDsProposal{}, "sommelier/RemoveManagedCellarIDsProposal", nil) + govtypesv1beta1.ModuleCdc.RegisterConcrete(&RemoveManagedCellarIDsProposal{}, "sommelier/v2/RemoveManagedCellarIDsProposal", nil) govtypesv1beta1.RegisterProposalType(ProposalTypeScheduledCork) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&ScheduledCorkProposal{}, "sommelier/ScheduledCorkProposal", nil) + govtypesv1beta1.ModuleCdc.RegisterConcrete(&ScheduledCorkProposal{}, "sommelier/v2/ScheduledCorkProposal", nil) } func NewAddManagedCellarIDsProposal(title string, description string, cellarIds *CellarIDSet, publisherDomain string) *AddManagedCellarIDsProposal { @@ -48,7 +49,7 @@ func NewAddManagedCellarIDsProposal(title string, description string, cellarIds } func (m *AddManagedCellarIDsProposal) ProposalRoute() string { - return RouterKey + return types.RouterKey } func (m *AddManagedCellarIDsProposal) ProposalType() string { @@ -80,7 +81,7 @@ func NewRemoveManagedCellarIDsProposal(title string, description string, cellarI } func (m *RemoveManagedCellarIDsProposal) ProposalRoute() string { - return RouterKey + return types.RouterKey } func (m *RemoveManagedCellarIDsProposal) ProposalType() string { @@ -110,7 +111,7 @@ func NewScheduledCorkProposal(title string, description string, blockHeight uint } func (m *ScheduledCorkProposal) ProposalRoute() string { - return RouterKey + return types.RouterKey } func (m *ScheduledCorkProposal) ProposalType() string { @@ -127,15 +128,15 @@ func (m *ScheduledCorkProposal) ValidateBasic() error { } if len(m.ContractCallProtoJson) == 0 { - return errorsmod.Wrapf(ErrInvalidJSON, "cannot have empty contract call") + return errorsmod.Wrapf(types.ErrInvalidJSON, "cannot have empty contract call") } if !json.Valid([]byte(m.ContractCallProtoJson)) { - return errorsmod.Wrapf(ErrInvalidJSON, "%s", m.ContractCallProtoJson) + return errorsmod.Wrapf(types.ErrInvalidJSON, "%s", m.ContractCallProtoJson) } if !common.IsHexAddress(m.TargetContractAddress) { - return errorsmod.Wrapf(ErrInvalidEthereumAddress, "%s", m.TargetContractAddress) + return errorsmod.Wrapf(types.ErrInvalidEthereumAddress, "%s", m.TargetContractAddress) } return nil diff --git a/x/cork/types/proposal.pb.go b/x/cork/types/v2/proposal.pb.go similarity index 99% rename from x/cork/types/proposal.pb.go rename to x/cork/types/v2/proposal.pb.go index 1f6876d94..8863520b4 100644 --- a/x/cork/types/proposal.pb.go +++ b/x/cork/types/v2/proposal.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: cork/v2/proposal.proto -package types +package v2 import ( fmt "fmt" diff --git a/x/cork/types/proposal_test.go b/x/cork/types/v2/proposal_test.go similarity index 87% rename from x/cork/types/proposal_test.go rename to x/cork/types/v2/proposal_test.go index 71792c40a..5862f0723 100644 --- a/x/cork/types/proposal_test.go +++ b/x/cork/types/v2/proposal_test.go @@ -1,9 +1,10 @@ -package types +package v2 import ( "testing" errorsmod "cosmossdk.io/errors" + types "github.com/peggyjv/sommelier/v7/x/cork/types" "github.com/stretchr/testify/require" ) @@ -36,7 +37,7 @@ func TestScheduledCorkProposalValidation(t *testing.T) { TargetContractAddress: "0x01", }, expPass: false, - err: errorsmod.Wrapf(ErrInvalidEthereumAddress, "0x01"), + err: errorsmod.Wrapf(types.ErrInvalidEthereumAddress, "0x01"), }, { name: "Empty proto JSON", @@ -48,7 +49,7 @@ func TestScheduledCorkProposalValidation(t *testing.T) { TargetContractAddress: "0x0000000000000000000000000000000000000000", }, expPass: false, - err: errorsmod.Wrap(ErrInvalidJSON, "cannot have empty contract call"), + err: errorsmod.Wrap(types.ErrInvalidJSON, "cannot have empty contract call"), }, { name: "Invalid JSON", @@ -60,7 +61,7 @@ func TestScheduledCorkProposalValidation(t *testing.T) { TargetContractAddress: "0x0000000000000000000000000000000000000000", }, expPass: false, - err: errorsmod.Wrapf(ErrInvalidJSON, "[}"), + err: errorsmod.Wrapf(types.ErrInvalidJSON, "[}"), }, } diff --git a/x/cork/types/query.pb.go b/x/cork/types/v2/query.pb.go similarity index 99% rename from x/cork/types/query.pb.go rename to x/cork/types/v2/query.pb.go index 72b9b729e..aa3960fd2 100644 --- a/x/cork/types/query.pb.go +++ b/x/cork/types/v2/query.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: cork/v2/query.proto -package types +package v2 import ( context "context" diff --git a/x/cork/types/query.pb.gw.go b/x/cork/types/v2/query.pb.gw.go similarity index 99% rename from x/cork/types/query.pb.gw.go rename to x/cork/types/v2/query.pb.gw.go index ea71362f8..1458cdc9c 100644 --- a/x/cork/types/query.pb.gw.go +++ b/x/cork/types/v2/query.pb.gw.go @@ -6,7 +6,7 @@ Package types is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package types +package v2 import ( "context" diff --git a/x/cork/types/tx.pb.go b/x/cork/types/v2/tx.pb.go similarity index 99% rename from x/cork/types/tx.pb.go rename to x/cork/types/v2/tx.pb.go index 6708f7bb6..c959b2813 100644 --- a/x/cork/types/tx.pb.go +++ b/x/cork/types/v2/tx.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: cork/v2/tx.proto -package types +package v2 import ( context "context" From b4b9e495254378a60fc9b2ad440aabab9643a358 Mon Sep 17 00:00:00 2001 From: Collin Date: Sun, 28 Jan 2024 23:41:01 -0600 Subject: [PATCH 06/32] feat:auction token price queries (#261) * Update proto docs * Token price queries * gofmt * Add exponent field to token price prop handler * Fix cli test to inclue exponent field for token price prop * gofmt --- docs/core/proto-docs.md | 3296 ++++++++++++++++++++----- proto/auction/v1/query.proto | 25 +- x/auction/client/cli/query.go | 64 + x/auction/client/cli/query_test.go | 54 + x/auction/client/cli/tx_test.go | 4 +- x/auction/keeper/proposal_handler.go | 1 + x/auction/keeper/query_server.go | 22 + x/auction/keeper/query_server_test.go | 38 + x/auction/types/query.pb.go | 832 ++++++- x/auction/types/query.pb.gw.go | 166 ++ 10 files changed, 3771 insertions(+), 731 deletions(-) diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 8ea88bd23..953342c71 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -4,6 +4,48 @@ ## Table of Contents +- [auction/v1/auction.proto](#auction/v1/auction.proto) + - [Auction](#auction.v1.Auction) + - [Bid](#auction.v1.Bid) + - [ProposedTokenPrice](#auction.v1.ProposedTokenPrice) + - [TokenPrice](#auction.v1.TokenPrice) + +- [auction/v1/tx.proto](#auction/v1/tx.proto) + - [MsgSubmitBidRequest](#auction.v1.MsgSubmitBidRequest) + - [MsgSubmitBidResponse](#auction.v1.MsgSubmitBidResponse) + + - [Msg](#auction.v1.Msg) + +- [auction/v1/genesis.proto](#auction/v1/genesis.proto) + - [GenesisState](#auction.v1.GenesisState) + - [Params](#auction.v1.Params) + +- [auction/v1/proposal.proto](#auction/v1/proposal.proto) + - [SetTokenPricesProposal](#auction.v1.SetTokenPricesProposal) + - [SetTokenPricesProposalWithDeposit](#auction.v1.SetTokenPricesProposalWithDeposit) + +- [auction/v1/query.proto](#auction/v1/query.proto) + - [QueryActiveAuctionRequest](#auction.v1.QueryActiveAuctionRequest) + - [QueryActiveAuctionResponse](#auction.v1.QueryActiveAuctionResponse) + - [QueryActiveAuctionsRequest](#auction.v1.QueryActiveAuctionsRequest) + - [QueryActiveAuctionsResponse](#auction.v1.QueryActiveAuctionsResponse) + - [QueryBidRequest](#auction.v1.QueryBidRequest) + - [QueryBidResponse](#auction.v1.QueryBidResponse) + - [QueryBidsByAuctionRequest](#auction.v1.QueryBidsByAuctionRequest) + - [QueryBidsByAuctionResponse](#auction.v1.QueryBidsByAuctionResponse) + - [QueryEndedAuctionRequest](#auction.v1.QueryEndedAuctionRequest) + - [QueryEndedAuctionResponse](#auction.v1.QueryEndedAuctionResponse) + - [QueryEndedAuctionsRequest](#auction.v1.QueryEndedAuctionsRequest) + - [QueryEndedAuctionsResponse](#auction.v1.QueryEndedAuctionsResponse) + - [QueryParamsRequest](#auction.v1.QueryParamsRequest) + - [QueryParamsResponse](#auction.v1.QueryParamsResponse) + - [QueryTokenPriceRequest](#auction.v1.QueryTokenPriceRequest) + - [QueryTokenPriceResponse](#auction.v1.QueryTokenPriceResponse) + - [QueryTokenPricesRequest](#auction.v1.QueryTokenPricesRequest) + - [QueryTokenPricesResponse](#auction.v1.QueryTokenPricesResponse) + + - [Query](#auction.v1.Query) + - [axelarcork/v1/axelarcork.proto](#axelarcork/v1/axelarcork.proto) - [AxelarContractCallNonce](#axelarcork.v1.AxelarContractCallNonce) - [AxelarCork](#axelarcork.v1.AxelarCork) @@ -83,6 +125,10 @@ - [Msg](#axelarcork.v1.Msg) +- [cellarfees/v1/cellarfees.proto](#cellarfees/v1/cellarfees.proto) + - [FeeAccrualCounter](#cellarfees.v1.FeeAccrualCounter) + - [FeeAccrualCounters](#cellarfees.v1.FeeAccrualCounters) + - [cellarfees/v1/params.proto](#cellarfees/v1/params.proto) - [Params](#cellarfees.v1.Params) @@ -90,6 +136,12 @@ - [GenesisState](#cellarfees.v1.GenesisState) - [cellarfees/v1/query.proto](#cellarfees/v1/query.proto) + - [QueryAPYRequest](#cellarfees.v1.QueryAPYRequest) + - [QueryAPYResponse](#cellarfees.v1.QueryAPYResponse) + - [QueryFeeAccrualCountersRequest](#cellarfees.v1.QueryFeeAccrualCountersRequest) + - [QueryFeeAccrualCountersResponse](#cellarfees.v1.QueryFeeAccrualCountersResponse) + - [QueryLastRewardSupplyPeakRequest](#cellarfees.v1.QueryLastRewardSupplyPeakRequest) + - [QueryLastRewardSupplyPeakResponse](#cellarfees.v1.QueryLastRewardSupplyPeakResponse) - [QueryModuleAccountsRequest](#cellarfees.v1.QueryModuleAccountsRequest) - [QueryModuleAccountsResponse](#cellarfees.v1.QueryModuleAccountsResponse) - [QueryParamsRequest](#cellarfees.v1.QueryParamsRequest) @@ -97,47 +149,49 @@ - [Query](#cellarfees.v1.Query) -- [cork/v1/cork.proto](#cork/v1/cork.proto) - - [CellarIDSet](#cork.v1.CellarIDSet) - - [Cork](#cork.v1.Cork) - - [ScheduledCork](#cork.v1.ScheduledCork) - - [ValidatorCork](#cork.v1.ValidatorCork) +- [cork/v2/cork.proto](#cork/v2/cork.proto) + - [CellarIDSet](#cork.v2.CellarIDSet) + - [Cork](#cork.v2.Cork) + - [CorkResult](#cork.v2.CorkResult) + - [ScheduledCork](#cork.v2.ScheduledCork) -- [cork/v1/tx.proto](#cork/v1/tx.proto) - - [MsgScheduleCorkRequest](#cork.v1.MsgScheduleCorkRequest) - - [MsgScheduleCorkResponse](#cork.v1.MsgScheduleCorkResponse) - - [MsgSubmitCorkRequest](#cork.v1.MsgSubmitCorkRequest) - - [MsgSubmitCorkResponse](#cork.v1.MsgSubmitCorkResponse) +- [cork/v2/genesis.proto](#cork/v2/genesis.proto) + - [GenesisState](#cork.v2.GenesisState) + - [Params](#cork.v2.Params) - - [Msg](#cork.v1.Msg) +- [cork/v2/proposal.proto](#cork/v2/proposal.proto) + - [AddManagedCellarIDsProposal](#cork.v2.AddManagedCellarIDsProposal) + - [AddManagedCellarIDsProposalWithDeposit](#cork.v2.AddManagedCellarIDsProposalWithDeposit) + - [RemoveManagedCellarIDsProposal](#cork.v2.RemoveManagedCellarIDsProposal) + - [RemoveManagedCellarIDsProposalWithDeposit](#cork.v2.RemoveManagedCellarIDsProposalWithDeposit) + - [ScheduledCorkProposal](#cork.v2.ScheduledCorkProposal) + - [ScheduledCorkProposalWithDeposit](#cork.v2.ScheduledCorkProposalWithDeposit) -- [cork/v1/genesis.proto](#cork/v1/genesis.proto) - - [GenesisState](#cork.v1.GenesisState) - - [Params](#cork.v1.Params) +- [cork/v2/query.proto](#cork/v2/query.proto) + - [QueryCellarIDsRequest](#cork.v2.QueryCellarIDsRequest) + - [QueryCellarIDsResponse](#cork.v2.QueryCellarIDsResponse) + - [QueryCorkResultRequest](#cork.v2.QueryCorkResultRequest) + - [QueryCorkResultResponse](#cork.v2.QueryCorkResultResponse) + - [QueryCorkResultsRequest](#cork.v2.QueryCorkResultsRequest) + - [QueryCorkResultsResponse](#cork.v2.QueryCorkResultsResponse) + - [QueryParamsRequest](#cork.v2.QueryParamsRequest) + - [QueryParamsResponse](#cork.v2.QueryParamsResponse) + - [QueryScheduledBlockHeightsRequest](#cork.v2.QueryScheduledBlockHeightsRequest) + - [QueryScheduledBlockHeightsResponse](#cork.v2.QueryScheduledBlockHeightsResponse) + - [QueryScheduledCorksByBlockHeightRequest](#cork.v2.QueryScheduledCorksByBlockHeightRequest) + - [QueryScheduledCorksByBlockHeightResponse](#cork.v2.QueryScheduledCorksByBlockHeightResponse) + - [QueryScheduledCorksByIDRequest](#cork.v2.QueryScheduledCorksByIDRequest) + - [QueryScheduledCorksByIDResponse](#cork.v2.QueryScheduledCorksByIDResponse) + - [QueryScheduledCorksRequest](#cork.v2.QueryScheduledCorksRequest) + - [QueryScheduledCorksResponse](#cork.v2.QueryScheduledCorksResponse) -- [cork/v1/proposal.proto](#cork/v1/proposal.proto) - - [AddManagedCellarIDsProposal](#cork.v1.AddManagedCellarIDsProposal) - - [AddManagedCellarIDsProposalWithDeposit](#cork.v1.AddManagedCellarIDsProposalWithDeposit) - - [RemoveManagedCellarIDsProposal](#cork.v1.RemoveManagedCellarIDsProposal) - - [RemoveManagedCellarIDsProposalWithDeposit](#cork.v1.RemoveManagedCellarIDsProposalWithDeposit) + - [Query](#cork.v2.Query) -- [cork/v1/query.proto](#cork/v1/query.proto) - - [QueryCellarIDsRequest](#cork.v1.QueryCellarIDsRequest) - - [QueryCellarIDsResponse](#cork.v1.QueryCellarIDsResponse) - - [QueryCommitPeriodRequest](#cork.v1.QueryCommitPeriodRequest) - - [QueryCommitPeriodResponse](#cork.v1.QueryCommitPeriodResponse) - - [QueryParamsRequest](#cork.v1.QueryParamsRequest) - - [QueryParamsResponse](#cork.v1.QueryParamsResponse) - - [QueryScheduledBlockHeightsRequest](#cork.v1.QueryScheduledBlockHeightsRequest) - - [QueryScheduledBlockHeightsResponse](#cork.v1.QueryScheduledBlockHeightsResponse) - - [QueryScheduledCorksByBlockHeightRequest](#cork.v1.QueryScheduledCorksByBlockHeightRequest) - - [QueryScheduledCorksByBlockHeightResponse](#cork.v1.QueryScheduledCorksByBlockHeightResponse) - - [QueryScheduledCorksRequest](#cork.v1.QueryScheduledCorksRequest) - - [QueryScheduledCorksResponse](#cork.v1.QueryScheduledCorksResponse) - - [QuerySubmittedCorksRequest](#cork.v1.QuerySubmittedCorksRequest) - - [QuerySubmittedCorksResponse](#cork.v1.QuerySubmittedCorksResponse) +- [cork/v2/tx.proto](#cork/v2/tx.proto) + - [MsgScheduleCorkRequest](#cork.v2.MsgScheduleCorkRequest) + - [MsgScheduleCorkResponse](#cork.v2.MsgScheduleCorkResponse) - - [Query](#cork.v1.Query) + - [Msg](#cork.v2.Msg) - [incentives/v1/genesis.proto](#incentives/v1/genesis.proto) - [GenesisState](#incentives.v1.GenesisState) @@ -151,178 +205,288 @@ - [Query](#incentives.v1.Query) +- [pubsub/v1/params.proto](#pubsub/v1/params.proto) + - [Params](#pubsub.v1.Params) + +- [pubsub/v1/pubsub.proto](#pubsub/v1/pubsub.proto) + - [AddDefaultSubscriptionProposal](#pubsub.v1.AddDefaultSubscriptionProposal) + - [AddDefaultSubscriptionProposalWithDeposit](#pubsub.v1.AddDefaultSubscriptionProposalWithDeposit) + - [AddPublisherProposal](#pubsub.v1.AddPublisherProposal) + - [AddPublisherProposalWithDeposit](#pubsub.v1.AddPublisherProposalWithDeposit) + - [DefaultSubscription](#pubsub.v1.DefaultSubscription) + - [Publisher](#pubsub.v1.Publisher) + - [PublisherIntent](#pubsub.v1.PublisherIntent) + - [RemoveDefaultSubscriptionProposal](#pubsub.v1.RemoveDefaultSubscriptionProposal) + - [RemoveDefaultSubscriptionProposalWithDeposit](#pubsub.v1.RemoveDefaultSubscriptionProposalWithDeposit) + - [RemovePublisherProposal](#pubsub.v1.RemovePublisherProposal) + - [RemovePublisherProposalWithDeposit](#pubsub.v1.RemovePublisherProposalWithDeposit) + - [Subscriber](#pubsub.v1.Subscriber) + - [SubscriberIntent](#pubsub.v1.SubscriberIntent) + + - [AllowedSubscribers](#pubsub.v1.AllowedSubscribers) + - [PublishMethod](#pubsub.v1.PublishMethod) + +- [pubsub/v1/genesis.proto](#pubsub/v1/genesis.proto) + - [GenesisState](#pubsub.v1.GenesisState) + +- [pubsub/v1/query.proto](#pubsub/v1/query.proto) + - [QueryDefaultSubscriptionRequest](#pubsub.v1.QueryDefaultSubscriptionRequest) + - [QueryDefaultSubscriptionResponse](#pubsub.v1.QueryDefaultSubscriptionResponse) + - [QueryDefaultSubscriptionsRequest](#pubsub.v1.QueryDefaultSubscriptionsRequest) + - [QueryDefaultSubscriptionsResponse](#pubsub.v1.QueryDefaultSubscriptionsResponse) + - [QueryParamsRequest](#pubsub.v1.QueryParamsRequest) + - [QueryParamsResponse](#pubsub.v1.QueryParamsResponse) + - [QueryPublisherIntentRequest](#pubsub.v1.QueryPublisherIntentRequest) + - [QueryPublisherIntentResponse](#pubsub.v1.QueryPublisherIntentResponse) + - [QueryPublisherIntentsByPublisherDomainRequest](#pubsub.v1.QueryPublisherIntentsByPublisherDomainRequest) + - [QueryPublisherIntentsByPublisherDomainResponse](#pubsub.v1.QueryPublisherIntentsByPublisherDomainResponse) + - [QueryPublisherIntentsBySubscriptionIDRequest](#pubsub.v1.QueryPublisherIntentsBySubscriptionIDRequest) + - [QueryPublisherIntentsBySubscriptionIDResponse](#pubsub.v1.QueryPublisherIntentsBySubscriptionIDResponse) + - [QueryPublisherIntentsRequest](#pubsub.v1.QueryPublisherIntentsRequest) + - [QueryPublisherIntentsResponse](#pubsub.v1.QueryPublisherIntentsResponse) + - [QueryPublisherRequest](#pubsub.v1.QueryPublisherRequest) + - [QueryPublisherResponse](#pubsub.v1.QueryPublisherResponse) + - [QueryPublishersRequest](#pubsub.v1.QueryPublishersRequest) + - [QueryPublishersResponse](#pubsub.v1.QueryPublishersResponse) + - [QuerySubscriberIntentRequest](#pubsub.v1.QuerySubscriberIntentRequest) + - [QuerySubscriberIntentResponse](#pubsub.v1.QuerySubscriberIntentResponse) + - [QuerySubscriberIntentsByPublisherDomainRequest](#pubsub.v1.QuerySubscriberIntentsByPublisherDomainRequest) + - [QuerySubscriberIntentsByPublisherDomainResponse](#pubsub.v1.QuerySubscriberIntentsByPublisherDomainResponse) + - [QuerySubscriberIntentsBySubscriberAddressRequest](#pubsub.v1.QuerySubscriberIntentsBySubscriberAddressRequest) + - [QuerySubscriberIntentsBySubscriberAddressResponse](#pubsub.v1.QuerySubscriberIntentsBySubscriberAddressResponse) + - [QuerySubscriberIntentsBySubscriptionIDRequest](#pubsub.v1.QuerySubscriberIntentsBySubscriptionIDRequest) + - [QuerySubscriberIntentsBySubscriptionIDResponse](#pubsub.v1.QuerySubscriberIntentsBySubscriptionIDResponse) + - [QuerySubscriberIntentsRequest](#pubsub.v1.QuerySubscriberIntentsRequest) + - [QuerySubscriberIntentsResponse](#pubsub.v1.QuerySubscriberIntentsResponse) + - [QuerySubscriberRequest](#pubsub.v1.QuerySubscriberRequest) + - [QuerySubscriberResponse](#pubsub.v1.QuerySubscriberResponse) + - [QuerySubscribersRequest](#pubsub.v1.QuerySubscribersRequest) + - [QuerySubscribersResponse](#pubsub.v1.QuerySubscribersResponse) + + - [Query](#pubsub.v1.Query) + +- [pubsub/v1/tx.proto](#pubsub/v1/tx.proto) + - [MsgAddPublisherIntentRequest](#pubsub.v1.MsgAddPublisherIntentRequest) + - [MsgAddPublisherIntentResponse](#pubsub.v1.MsgAddPublisherIntentResponse) + - [MsgAddSubscriberIntentRequest](#pubsub.v1.MsgAddSubscriberIntentRequest) + - [MsgAddSubscriberIntentResponse](#pubsub.v1.MsgAddSubscriberIntentResponse) + - [MsgAddSubscriberRequest](#pubsub.v1.MsgAddSubscriberRequest) + - [MsgAddSubscriberResponse](#pubsub.v1.MsgAddSubscriberResponse) + - [MsgRemovePublisherIntentRequest](#pubsub.v1.MsgRemovePublisherIntentRequest) + - [MsgRemovePublisherIntentResponse](#pubsub.v1.MsgRemovePublisherIntentResponse) + - [MsgRemovePublisherRequest](#pubsub.v1.MsgRemovePublisherRequest) + - [MsgRemovePublisherResponse](#pubsub.v1.MsgRemovePublisherResponse) + - [MsgRemoveSubscriberIntentRequest](#pubsub.v1.MsgRemoveSubscriberIntentRequest) + - [MsgRemoveSubscriberIntentResponse](#pubsub.v1.MsgRemoveSubscriberIntentResponse) + - [MsgRemoveSubscriberRequest](#pubsub.v1.MsgRemoveSubscriberRequest) + - [MsgRemoveSubscriberResponse](#pubsub.v1.MsgRemoveSubscriberResponse) + + - [Msg](#pubsub.v1.Msg) + - [Scalar Value Types](#scalar-value-types) - +

Top

-## axelarcork/v1/axelarcork.proto +## auction/v1/auction.proto - + + +### Auction -### AxelarContractCallNonce -Used to enforce strictly newer call ordering per contract | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `chain_id` | [uint64](#uint64) | | | -| `contract_address` | [string](#string) | | | -| `nonce` | [uint64](#uint64) | | | +| `id` | [uint32](#uint32) | | | +| `starting_tokens_for_sale` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `start_block` | [uint64](#uint64) | | | +| `end_block` | [uint64](#uint64) | | | +| `initial_price_decrease_rate` | [string](#string) | | | +| `current_price_decrease_rate` | [string](#string) | | | +| `price_decrease_block_interval` | [uint64](#uint64) | | | +| `initial_unit_price_in_usomm` | [string](#string) | | | +| `current_unit_price_in_usomm` | [string](#string) | | | +| `remaining_tokens_for_sale` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `funding_module_account` | [string](#string) | | | +| `proceeds_module_account` | [string](#string) | | | - + -### AxelarCork +### Bid | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `encoded_contract_call` | [bytes](#bytes) | | call body containing the ABI encoded bytes to send to the contract | -| `chain_id` | [uint64](#uint64) | | the chain ID of the evm target chain | -| `target_contract_address` | [string](#string) | | address of the contract to send the call | -| `deadline` | [uint64](#uint64) | | unix timestamp before which the contract call must be executed. enforced by the proxy contract. | +| `id` | [uint64](#uint64) | | | +| `auction_id` | [uint32](#uint32) | | | +| `bidder` | [string](#string) | | | +| `max_bid_in_usomm` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `sale_token_minimum_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `total_fulfilled_sale_tokens` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `sale_token_unit_price_in_usomm` | [string](#string) | | | +| `total_usomm_paid` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `block_height` | [uint64](#uint64) | | | - + -### AxelarCorkResult +### ProposedTokenPrice | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `cork` | [AxelarCork](#axelarcork.v1.AxelarCork) | | | -| `block_height` | [uint64](#uint64) | | | -| `approved` | [bool](#bool) | | | -| `approval_percentage` | [string](#string) | | | - +| `denom` | [string](#string) | | | +| `exponent` | [uint64](#uint64) | | | +| `usd_price` | [string](#string) | | | - -### AxelarCorkResults + +### TokenPrice +USD price is the value for one non-fractional token (smallest unit of the token * 10^exponent) | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `cork_results` | [AxelarCorkResult](#axelarcork.v1.AxelarCorkResult) | repeated | | +| `denom` | [string](#string) | | | +| `exponent` | [uint64](#uint64) | | | +| `usd_price` | [string](#string) | | | +| `last_updated_block` | [uint64](#uint64) | | | + - + -### AxelarUpgradeData -Represents a proxy contract upgrade approved by governance with a delay in -execution in case of an error. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `chain_id` | [uint64](#uint64) | | | -| `payload` | [bytes](#bytes) | | | -| `executable_height_threshold` | [int64](#int64) | | | + +

Top

+## auction/v1/tx.proto - + -### CellarIDSet +### MsgSubmitBidRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `chain` | [ChainConfiguration](#axelarcork.v1.ChainConfiguration) | | | -| `ids` | [string](#string) | repeated | | +| `auction_id` | [uint32](#uint32) | | | +| `signer` | [string](#string) | | | +| `max_bid_in_usomm` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `sale_token_minimum_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - + -### ChainConfiguration +### MsgSubmitBidResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `name` | [string](#string) | | | -| `id` | [uint64](#uint64) | | | -| `proxy_address` | [string](#string) | | | +| `bid` | [Bid](#auction.v1.Bid) | | | + - + -### ChainConfigurations + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `configurations` | [ChainConfiguration](#axelarcork.v1.ChainConfiguration) | repeated | | +### Msg +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `SubmitBid` | [MsgSubmitBidRequest](#auction.v1.MsgSubmitBidRequest) | [MsgSubmitBidResponse](#auction.v1.MsgSubmitBidResponse) | | | + - + +

Top

-### ScheduledAxelarCork +## auction/v1/genesis.proto + + + + + +### GenesisState | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `cork` | [AxelarCork](#axelarcork.v1.AxelarCork) | | | -| `block_height` | [uint64](#uint64) | | | -| `validator` | [string](#string) | | | -| `id` | [string](#string) | | | +| `params` | [Params](#auction.v1.Params) | | | +| `auctions` | [Auction](#auction.v1.Auction) | repeated | | +| `bids` | [Bid](#auction.v1.Bid) | repeated | | +| `token_prices` | [TokenPrice](#auction.v1.TokenPrice) | repeated | | +| `last_auction_id` | [uint32](#uint32) | | | +| `last_bid_id` | [uint64](#uint64) | | | - + -### ScheduledAxelarCorks +### Params | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `scheduled_corks` | [ScheduledAxelarCork](#axelarcork.v1.ScheduledAxelarCork) | repeated | | +| `price_max_block_age` | [uint64](#uint64) | | | +| `minimum_bid_in_usomm` | [uint64](#uint64) | | | +| `minimum_sale_tokens_usd_value` | [string](#string) | | | +| `auction_max_block_age` | [uint64](#uint64) | | | +| `auction_price_decrease_acceleration_rate` | [string](#string) | | | +| `minimum_auction_height` | [uint64](#uint64) | | | @@ -338,26 +502,42 @@ execution in case of an error. - +

Top

-## axelarcork/v1/event.proto +## auction/v1/proposal.proto - + -### ScheduleCorkEvent +### SetTokenPricesProposal | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `signer` | [string](#string) | | | -| `validator` | [string](#string) | | | -| `cork` | [string](#string) | | | -| `block_height` | [uint64](#uint64) | | | -| `chain_id` | [uint64](#uint64) | | | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `token_prices` | [ProposedTokenPrice](#auction.v1.ProposedTokenPrice) | repeated | | + + + + + + + + +### SetTokenPricesProposalWithDeposit + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `token_prices` | [ProposedTokenPrice](#auction.v1.ProposedTokenPrice) | repeated | | +| `deposit` | [string](#string) | | | @@ -373,323 +553,836 @@ execution in case of an error. - +

Top

-## axelarcork/v1/genesis.proto +## auction/v1/query.proto - + + +### QueryActiveAuctionRequest -### GenesisState -GenesisState - all cork state that must be provided at genesis | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#axelarcork.v1.Params) | | | -| `chain_configurations` | [ChainConfigurations](#axelarcork.v1.ChainConfigurations) | | | -| `cellar_ids` | [CellarIDSet](#axelarcork.v1.CellarIDSet) | repeated | | -| `scheduled_corks` | [ScheduledAxelarCorks](#axelarcork.v1.ScheduledAxelarCorks) | | | -| `cork_results` | [AxelarCorkResults](#axelarcork.v1.AxelarCorkResults) | | | -| `axelar_contract_call_nonces` | [AxelarContractCallNonce](#axelarcork.v1.AxelarContractCallNonce) | repeated | | -| `axelar_upgrade_data` | [AxelarUpgradeData](#axelarcork.v1.AxelarUpgradeData) | repeated | | +| `auction_id` | [uint32](#uint32) | | | - + -### Params +### QueryActiveAuctionResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `enabled` | [bool](#bool) | | | -| `ibc_channel` | [string](#string) | | | -| `ibc_port` | [string](#string) | | | -| `gmp_account` | [string](#string) | | | -| `executor_account` | [string](#string) | | | -| `timeout_duration` | [uint64](#uint64) | | | -| `cork_timeout_blocks` | [uint64](#uint64) | | | +| `auction` | [Auction](#auction.v1.Auction) | | | - - - - + - +### QueryActiveAuctionsRequest - -

Top

-## axelarcork/v1/proposal.proto - + -### AddAxelarManagedCellarIDsProposal +### QueryActiveAuctionsResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `cellar_ids` | [CellarIDSet](#axelarcork.v1.CellarIDSet) | | | +| `auctions` | [Auction](#auction.v1.Auction) | repeated | | - + + +### QueryBidRequest -### AddAxelarManagedCellarIDsProposalWithDeposit -AddManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `cellar_ids` | [CellarIDSet](#axelarcork.v1.CellarIDSet) | | | -| `deposit` | [string](#string) | | | +| `bid_id` | [uint64](#uint64) | | | +| `auction_id` | [uint32](#uint32) | | | - + -### AddChainConfigurationProposal +### QueryBidResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_configuration` | [ChainConfiguration](#axelarcork.v1.ChainConfiguration) | | | +| `bid` | [Bid](#auction.v1.Bid) | | | - + -### AddChainConfigurationProposalWithDeposit +### QueryBidsByAuctionRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_configuration` | [ChainConfiguration](#axelarcork.v1.ChainConfiguration) | | | -| `deposit` | [string](#string) | | | +| `auction_id` | [uint32](#uint32) | | | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - + -### AxelarCommunityPoolSpendProposal +### QueryBidsByAuctionResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `recipient` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `bids` | [Bid](#auction.v1.Bid) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - + + +### QueryEndedAuctionRequest -### AxelarCommunityPoolSpendProposalForCLI -This format of the community spend Ethereum proposal is specifically for -the CLI to allow simple text serialization. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `recipient` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `chain_name` | [string](#string) | | | -| `amount` | [string](#string) | | | -| `deposit` | [string](#string) | | | +| `auction_id` | [uint32](#uint32) | | | - + -### AxelarScheduledCorkProposal +### QueryEndedAuctionResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `block_height` | [uint64](#uint64) | | | -| `chain_id` | [uint64](#uint64) | | | -| `target_contract_address` | [string](#string) | | | -| `contract_call_proto_json` | [string](#string) | | The JSON representation of a ScheduleRequest defined in the Steward protos - -Example: The following is the JSON form of a ScheduleRequest containing a steward.v2.cellar_v1.TrustPosition message, which maps to the `trustPosition(address)` function of the the V1 Cellar contract. - -{ "cellar_id": "0x1234567890000000000000000000000000000000", "cellar_v1": { "trust_position": { "erc20_address": "0x1234567890000000000000000000000000000000" } }, "block_height": 1000000 } +| `auction` | [Auction](#auction.v1.Auction) | | | -You can use the Steward CLI to generate the required JSON rather than constructing it by hand https://github.com/peggyjv/steward | -| `deadline` | [uint64](#uint64) | | unix timestamp before which the contract call must be executed. enforced by the Axelar proxy contract | + - +### QueryEndedAuctionsRequest -### AxelarScheduledCorkProposalWithDeposit -ScheduledCorkProposalWithDeposit is a specific definition for CLI commands | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `block_height` | [uint64](#uint64) | | | -| `chain_id` | [uint64](#uint64) | | | -| `target_contract_address` | [string](#string) | | | -| `contract_call_proto_json` | [string](#string) | | | -| `deadline` | [uint64](#uint64) | | | -| `deposit` | [string](#string) | | | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - + -### CancelAxelarProxyContractUpgradeProposal +### QueryEndedAuctionsResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | - +| `auctions` | [Auction](#auction.v1.Auction) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - -### CancelAxelarProxyContractUpgradeProposalWithDeposit + +### QueryParamsRequest -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `deposit` | [string](#string) | | | - + -### RemoveAxelarManagedCellarIDsProposal +### QueryParamsResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `cellar_ids` | [CellarIDSet](#axelarcork.v1.CellarIDSet) | | | +| `params` | [Params](#auction.v1.Params) | | | - + + +### QueryTokenPriceRequest -### RemoveAxelarManagedCellarIDsProposalWithDeposit -RemoveManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `cellar_ids` | [CellarIDSet](#axelarcork.v1.CellarIDSet) | | | -| `deposit` | [string](#string) | | | +| `denom` | [string](#string) | | | - + -### RemoveChainConfigurationProposal +### QueryTokenPriceResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | +| `token_price` | [TokenPrice](#auction.v1.TokenPrice) | | | - + + +### QueryTokenPricesRequest + + + + + + + + + +### QueryTokenPricesResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `token_prices` | [TokenPrice](#auction.v1.TokenPrice) | repeated | | + + + + + + + + + + + + + + +### Query + + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `QueryParams` | [QueryParamsRequest](#auction.v1.QueryParamsRequest) | [QueryParamsResponse](#auction.v1.QueryParamsResponse) | | GET|/sommelier/auction/v1/params| +| `QueryActiveAuction` | [QueryActiveAuctionRequest](#auction.v1.QueryActiveAuctionRequest) | [QueryActiveAuctionResponse](#auction.v1.QueryActiveAuctionResponse) | | GET|/sommelier/auction/v1/active_auctions/{auction_id}| +| `QueryEndedAuction` | [QueryEndedAuctionRequest](#auction.v1.QueryEndedAuctionRequest) | [QueryEndedAuctionResponse](#auction.v1.QueryEndedAuctionResponse) | | GET|/sommelier/auction/v1/ended_auctions/{auction_id}| +| `QueryActiveAuctions` | [QueryActiveAuctionsRequest](#auction.v1.QueryActiveAuctionsRequest) | [QueryActiveAuctionsResponse](#auction.v1.QueryActiveAuctionsResponse) | | GET|/sommelier/auction/v1/active_auctions| +| `QueryEndedAuctions` | [QueryEndedAuctionsRequest](#auction.v1.QueryEndedAuctionsRequest) | [QueryEndedAuctionsResponse](#auction.v1.QueryEndedAuctionsResponse) | | GET|/sommelier/auction/v1/ended_auctions| +| `QueryBid` | [QueryBidRequest](#auction.v1.QueryBidRequest) | [QueryBidResponse](#auction.v1.QueryBidResponse) | | GET|/sommelier/auction/v1/auctions/{auction_id}/bids/{bid_id}| +| `QueryBidsByAuction` | [QueryBidsByAuctionRequest](#auction.v1.QueryBidsByAuctionRequest) | [QueryBidsByAuctionResponse](#auction.v1.QueryBidsByAuctionResponse) | | GET|/sommelier/auction/v1/auctions/{auction_id}/bids| +| `QueryTokenPrice` | [QueryTokenPriceRequest](#auction.v1.QueryTokenPriceRequest) | [QueryTokenPriceResponse](#auction.v1.QueryTokenPriceResponse) | | GET|/sommelier/auction/v1/token_prices/{denom}| +| `QueryTokenPrices` | [QueryTokenPricesRequest](#auction.v1.QueryTokenPricesRequest) | [QueryTokenPricesResponse](#auction.v1.QueryTokenPricesResponse) | | GET|/sommelier/auction/v1/token_prices| + + + + + + +

Top

+ +## axelarcork/v1/axelarcork.proto + + + + + +### AxelarContractCallNonce +Used to enforce strictly newer call ordering per contract + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `chain_id` | [uint64](#uint64) | | | +| `contract_address` | [string](#string) | | | +| `nonce` | [uint64](#uint64) | | | + + + + + + + + +### AxelarCork + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `encoded_contract_call` | [bytes](#bytes) | | call body containing the ABI encoded bytes to send to the contract | +| `chain_id` | [uint64](#uint64) | | the chain ID of the evm target chain | +| `target_contract_address` | [string](#string) | | address of the contract to send the call | +| `deadline` | [uint64](#uint64) | | unix timestamp before which the contract call must be executed. enforced by the proxy contract. | + + + + + + + + +### AxelarCorkResult + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `cork` | [AxelarCork](#axelarcork.v1.AxelarCork) | | | +| `block_height` | [uint64](#uint64) | | | +| `approved` | [bool](#bool) | | | +| `approval_percentage` | [string](#string) | | | + + + + + + + + +### AxelarCorkResults + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `cork_results` | [AxelarCorkResult](#axelarcork.v1.AxelarCorkResult) | repeated | | + + + + + + + + +### AxelarUpgradeData +Represents a proxy contract upgrade approved by governance with a delay in +execution in case of an error. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `chain_id` | [uint64](#uint64) | | | +| `payload` | [bytes](#bytes) | | | +| `executable_height_threshold` | [int64](#int64) | | | + + + + + + + + +### CellarIDSet + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `chain_id` | [uint64](#uint64) | | | +| `ids` | [string](#string) | repeated | | + + + + + + + + +### ChainConfiguration + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `name` | [string](#string) | | | +| `id` | [uint64](#uint64) | | | +| `proxy_address` | [string](#string) | | | +| `bridge_fees` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | pure token transfers have a fixed fee deducted from the amount sent in the ICS-20 message depending on the asset and destination chain they can be calculated here: https://docs.axelar.dev/resources/mainnet#cross-chain-relayer-gas-fee | + + + + + + + + +### ChainConfigurations + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `configurations` | [ChainConfiguration](#axelarcork.v1.ChainConfiguration) | repeated | | + + + + + + + + +### ScheduledAxelarCork + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `cork` | [AxelarCork](#axelarcork.v1.AxelarCork) | | | +| `block_height` | [uint64](#uint64) | | | +| `validator` | [string](#string) | | | +| `id` | [string](#string) | | | + + + + + + + + +### ScheduledAxelarCorks + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `scheduled_corks` | [ScheduledAxelarCork](#axelarcork.v1.ScheduledAxelarCork) | repeated | | + + + + + + + + + + + + + + + + +

Top

+ +## axelarcork/v1/event.proto + + + + + +### ScheduleCorkEvent + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `signer` | [string](#string) | | | +| `validator` | [string](#string) | | | +| `cork` | [string](#string) | | | +| `block_height` | [uint64](#uint64) | | | +| `chain_id` | [uint64](#uint64) | | | + + + + + + + + + + + + + + + + +

Top

+ +## axelarcork/v1/genesis.proto + + + + + +### GenesisState +GenesisState - all cork state that must be provided at genesis + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#axelarcork.v1.Params) | | | +| `chain_configurations` | [ChainConfigurations](#axelarcork.v1.ChainConfigurations) | | | +| `cellar_ids` | [CellarIDSet](#axelarcork.v1.CellarIDSet) | repeated | | +| `scheduled_corks` | [ScheduledAxelarCorks](#axelarcork.v1.ScheduledAxelarCorks) | | | +| `cork_results` | [AxelarCorkResults](#axelarcork.v1.AxelarCorkResults) | | | +| `axelar_contract_call_nonces` | [AxelarContractCallNonce](#axelarcork.v1.AxelarContractCallNonce) | repeated | | +| `axelar_upgrade_data` | [AxelarUpgradeData](#axelarcork.v1.AxelarUpgradeData) | repeated | | + + + + + + + + +### Params + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `enabled` | [bool](#bool) | | | +| `ibc_channel` | [string](#string) | | | +| `ibc_port` | [string](#string) | | | +| `gmp_account` | [string](#string) | | | +| `executor_account` | [string](#string) | | | +| `timeout_duration` | [uint64](#uint64) | | | +| `cork_timeout_blocks` | [uint64](#uint64) | | | + + + + + + + + + + + + + + + + +

Top

+ +## axelarcork/v1/proposal.proto + + + + + +### AddAxelarManagedCellarIDsProposal + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `chain_id` | [uint64](#uint64) | | | +| `cellar_ids` | [CellarIDSet](#axelarcork.v1.CellarIDSet) | | | +| `publisher_domain` | [string](#string) | | | + + + + + + + + +### AddAxelarManagedCellarIDsProposalWithDeposit +AddAxelarManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `chain_id` | [uint64](#uint64) | | | +| `cellar_ids` | [string](#string) | repeated | | +| `publisher_domain` | [string](#string) | | | +| `deposit` | [string](#string) | | | + + + + + + + + +### AddChainConfigurationProposal + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `chain_configuration` | [ChainConfiguration](#axelarcork.v1.ChainConfiguration) | | | + + + + + + + + +### AddChainConfigurationProposalWithDeposit + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `chain_configuration` | [ChainConfiguration](#axelarcork.v1.ChainConfiguration) | | | +| `deposit` | [string](#string) | | | + + + + + + + + +### AxelarCommunityPoolSpendProposal + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `recipient` | [string](#string) | | | +| `chain_id` | [uint64](#uint64) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + + + + + + + + +### AxelarCommunityPoolSpendProposalForCLI +This format of the Axelar community spend Ethereum proposal is specifically for +the CLI to allow simple text serialization. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `recipient` | [string](#string) | | | +| `chain_id` | [uint64](#uint64) | | | +| `amount` | [string](#string) | | | +| `deposit` | [string](#string) | | | + + + + + + + + +### AxelarScheduledCorkProposal + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `block_height` | [uint64](#uint64) | | | +| `chain_id` | [uint64](#uint64) | | | +| `target_contract_address` | [string](#string) | | | +| `contract_call_proto_json` | [string](#string) | | The JSON representation of a ScheduleRequest defined in the Steward protos + +Example: The following is the JSON form of a ScheduleRequest containing a steward.v2.cellar_v1.TrustPosition message, which maps to the `trustPosition(address)` function of the the V1 Cellar contract. + +{ "cellar_id": "0x1234567890000000000000000000000000000000", "cellar_v1": { "trust_position": { "erc20_address": "0x1234567890000000000000000000000000000000" } }, "block_height": 1000000 } + +You can use the Steward CLI to generate the required JSON rather than constructing it by hand https://github.com/peggyjv/steward | +| `deadline` | [uint64](#uint64) | | unix timestamp before which the contract call must be executed. enforced by the Axelar proxy contract | + + + + + + + + +### AxelarScheduledCorkProposalWithDeposit +AxelarScheduledCorkProposalWithDeposit is a specific definition for CLI commands + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `block_height` | [uint64](#uint64) | | | +| `chain_id` | [uint64](#uint64) | | | +| `target_contract_address` | [string](#string) | | | +| `contract_call_proto_json` | [string](#string) | | | +| `deadline` | [uint64](#uint64) | | | +| `deposit` | [string](#string) | | | + + + + + + + + +### CancelAxelarProxyContractUpgradeProposal + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `chain_id` | [uint64](#uint64) | | | + + + + + + + + +### CancelAxelarProxyContractUpgradeProposalWithDeposit + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `chain_id` | [uint64](#uint64) | | | +| `deposit` | [string](#string) | | | + + + + + + + + +### RemoveAxelarManagedCellarIDsProposal + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `chain_id` | [uint64](#uint64) | | | +| `cellar_ids` | [CellarIDSet](#axelarcork.v1.CellarIDSet) | | | + + + + + + + + +### RemoveAxelarManagedCellarIDsProposalWithDeposit +RemoveAxelarManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `chain_id` | [uint64](#uint64) | | | +| `cellar_ids` | [string](#string) | repeated | | +| `deposit` | [string](#string) | | | + + + + + + + + +### RemoveChainConfigurationProposal + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `chain_id` | [uint64](#uint64) | | | + + + + + + + ### RemoveChainConfigurationProposalWithDeposit @@ -699,7 +1392,1049 @@ RemoveManagedCellarIDsProposalWithDeposit is a specific definition for CLI comma | ----- | ---- | ----- | ----------- | | `title` | [string](#string) | | | | `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | +| `chain_id` | [uint64](#uint64) | | | +| `deposit` | [string](#string) | | | + + + + + + + + +### UpgradeAxelarProxyContractProposal + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `chain_id` | [uint64](#uint64) | | | +| `new_proxy_address` | [string](#string) | | | + + + + + + + + +### UpgradeAxelarProxyContractProposalWithDeposit + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `chain_id` | [uint64](#uint64) | | | +| `new_proxy_address` | [string](#string) | | | +| `deposit` | [string](#string) | | | + + + + + + + + + + + + + + + + +

Top

+ +## axelarcork/v1/query.proto + + + + + +### QueryAxelarContractCallNoncesRequest + + + + + + + + + +### QueryAxelarContractCallNoncesResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `contract_call_nonces` | [AxelarContractCallNonce](#axelarcork.v1.AxelarContractCallNonce) | repeated | | + + + + + + + + +### QueryAxelarProxyUpgradeDataRequest + + + + + + + + + +### QueryAxelarProxyUpgradeDataResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proxy_upgrade_data` | [AxelarUpgradeData](#axelarcork.v1.AxelarUpgradeData) | repeated | | + + + + + + + + +### QueryCellarIDsByChainIDRequest +QueryCellarIDsByChainIDRequest is the request type for Query/QueryCellarIDsByChainID gRPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `chain_id` | [uint64](#uint64) | | | + + + + + + + + +### QueryCellarIDsByChainIDResponse +QueryCellarIDsByChainIDResponse is the response type for Query/QueryCellarIDsByChainID gRPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `cellar_ids` | [string](#string) | repeated | | + + + + + + + + +### QueryCellarIDsRequest +QueryCellarIDs is the request type for Query/QueryCellarIDs gRPC method. + + + + + + + + +### QueryCellarIDsResponse +QueryCellarIDsResponse is the response type for Query/QueryCellarIDs gRPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `cellar_ids` | [CellarIDSet](#axelarcork.v1.CellarIDSet) | repeated | | + + + + + + + + +### QueryChainConfigurationsRequest + + + + + + + + + +### QueryChainConfigurationsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `configurations` | [ChainConfiguration](#axelarcork.v1.ChainConfiguration) | repeated | | + + + + + + + + +### QueryCorkResultRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `id` | [string](#string) | | | +| `chain_id` | [uint64](#uint64) | | | + + + + + + + + +### QueryCorkResultResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `corkResult` | [AxelarCorkResult](#axelarcork.v1.AxelarCorkResult) | | | + + + + + + + + +### QueryCorkResultsRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `chain_id` | [uint64](#uint64) | | | + + + + + + + + +### QueryCorkResultsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `corkResults` | [AxelarCorkResult](#axelarcork.v1.AxelarCorkResult) | repeated | | + + + + + + + + +### QueryParamsRequest +QueryParamsRequest is the request type for the Query/Params gRPC method. + + + + + + + + +### QueryParamsResponse +QueryParamsRequest is the response type for the Query/Params gRPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#axelarcork.v1.Params) | | allocation parameters | + + + + + + + + +### QueryScheduledBlockHeightsRequest +QueryScheduledBlockHeightsRequest + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `chain_id` | [uint64](#uint64) | | | + + + + + + + + +### QueryScheduledBlockHeightsResponse +QueryScheduledBlockHeightsResponse + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `block_heights` | [uint64](#uint64) | repeated | | + + + + + + + + +### QueryScheduledCorksByBlockHeightRequest +QueryScheduledCorksByBlockHeightRequest + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `block_height` | [uint64](#uint64) | | | +| `chain_id` | [uint64](#uint64) | | | + + + + + + + + +### QueryScheduledCorksByBlockHeightResponse +QueryScheduledCorksByBlockHeightResponse + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `corks` | [ScheduledAxelarCork](#axelarcork.v1.ScheduledAxelarCork) | repeated | | + + + + + + + + +### QueryScheduledCorksByIDRequest +QueryScheduledCorksByIDRequest + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `id` | [string](#string) | | | +| `chain_id` | [uint64](#uint64) | | | + + + + + + + + +### QueryScheduledCorksByIDResponse +QueryScheduledCorksByIDResponse + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `corks` | [ScheduledAxelarCork](#axelarcork.v1.ScheduledAxelarCork) | repeated | | + + + + + + + + +### QueryScheduledCorksRequest +QueryScheduledCorksRequest + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `chain_id` | [uint64](#uint64) | | | + + + + + + + + +### QueryScheduledCorksResponse +QueryScheduledCorksResponse + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `corks` | [ScheduledAxelarCork](#axelarcork.v1.ScheduledAxelarCork) | repeated | | + + + + + + + + + + + + + + +### Query +Query defines the gRPC query service for the cork module. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `QueryParams` | [QueryParamsRequest](#axelarcork.v1.QueryParamsRequest) | [QueryParamsResponse](#axelarcork.v1.QueryParamsResponse) | QueryParams queries the axelar cork module parameters. | GET|/sommelier/cork/v1/params| +| `QueryCellarIDs` | [QueryCellarIDsRequest](#axelarcork.v1.QueryCellarIDsRequest) | [QueryCellarIDsResponse](#axelarcork.v1.QueryCellarIDsResponse) | QueryCellarIDs queries approved cellar ids of all supported chains | GET|/sommelier/axelarcork/v1/cellar_ids| +| `QueryCellarIDsByChainID` | [QueryCellarIDsByChainIDRequest](#axelarcork.v1.QueryCellarIDsByChainIDRequest) | [QueryCellarIDsByChainIDResponse](#axelarcork.v1.QueryCellarIDsByChainIDResponse) | QueryCellarIDsByChainID returns all cellars and current tick ranges | GET|/sommelier/axelarcork/v1/cellar_ids_by_chain_id| +| `QueryScheduledCorks` | [QueryScheduledCorksRequest](#axelarcork.v1.QueryScheduledCorksRequest) | [QueryScheduledCorksResponse](#axelarcork.v1.QueryScheduledCorksResponse) | QueryScheduledCorks returns all scheduled corks | GET|/sommelier/axelarcork/v1/scheduled_corks| +| `QueryScheduledBlockHeights` | [QueryScheduledBlockHeightsRequest](#axelarcork.v1.QueryScheduledBlockHeightsRequest) | [QueryScheduledBlockHeightsResponse](#axelarcork.v1.QueryScheduledBlockHeightsResponse) | QueryScheduledBlockHeights returns all scheduled block heights | GET|/sommelier/axelarcork/v1/scheduled_block_heights| +| `QueryScheduledCorksByBlockHeight` | [QueryScheduledCorksByBlockHeightRequest](#axelarcork.v1.QueryScheduledCorksByBlockHeightRequest) | [QueryScheduledCorksByBlockHeightResponse](#axelarcork.v1.QueryScheduledCorksByBlockHeightResponse) | QueryScheduledCorks returns all scheduled corks at a block height | GET|/sommelier/axelarcork/v1/scheduled_corks_by_block_height/{block_height}| +| `QueryScheduledCorksByID` | [QueryScheduledCorksByIDRequest](#axelarcork.v1.QueryScheduledCorksByIDRequest) | [QueryScheduledCorksByIDResponse](#axelarcork.v1.QueryScheduledCorksByIDResponse) | QueryScheduledCorks returns all scheduled corks with the specified ID | GET|/sommelier/axelarcork/v1/scheduled_corks_by_id/{id}| +| `QueryCorkResult` | [QueryCorkResultRequest](#axelarcork.v1.QueryCorkResultRequest) | [QueryCorkResultResponse](#axelarcork.v1.QueryCorkResultResponse) | | GET|/sommelier/axelarcork/v1/cork_results/{id}| +| `QueryCorkResults` | [QueryCorkResultsRequest](#axelarcork.v1.QueryCorkResultsRequest) | [QueryCorkResultsResponse](#axelarcork.v1.QueryCorkResultsResponse) | | GET|/sommelier/axelarcork/v1/cork_results| +| `QueryChainConfigurations` | [QueryChainConfigurationsRequest](#axelarcork.v1.QueryChainConfigurationsRequest) | [QueryChainConfigurationsResponse](#axelarcork.v1.QueryChainConfigurationsResponse) | | GET|/sommelier/axelarcork/v1/chain_configurations| +| `QueryAxelarContractCallNonces` | [QueryAxelarContractCallNoncesRequest](#axelarcork.v1.QueryAxelarContractCallNoncesRequest) | [QueryAxelarContractCallNoncesResponse](#axelarcork.v1.QueryAxelarContractCallNoncesResponse) | | GET|/sommelier/axelarcork/v1/contract_call_nonces| +| `QueryAxelarProxyUpgradeData` | [QueryAxelarProxyUpgradeDataRequest](#axelarcork.v1.QueryAxelarProxyUpgradeDataRequest) | [QueryAxelarProxyUpgradeDataResponse](#axelarcork.v1.QueryAxelarProxyUpgradeDataResponse) | | GET|/sommelier/axelarcork/v1/proxy_upgrade_data| + + + + + + +

Top

+ +## axelarcork/v1/tx.proto + + + + + +### MsgBumpAxelarCorkGasRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `signer` | [string](#string) | | | +| `token` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `message_id` | [string](#string) | | | + + + + + + + + +### MsgBumpAxelarCorkGasResponse + + + + + + + + + +### MsgCancelAxelarCorkRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `signer` | [string](#string) | | | +| `chain_id` | [uint64](#uint64) | | | +| `target_contract_address` | [string](#string) | | | + + + + + + + + +### MsgCancelAxelarCorkResponse + + + + + + + + + +### MsgRelayAxelarCorkRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `signer` | [string](#string) | | | +| `token` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `fee` | [uint64](#uint64) | | | +| `chain_id` | [uint64](#uint64) | | | +| `target_contract_address` | [string](#string) | | | + + + + + + + + +### MsgRelayAxelarCorkResponse + + + + + + + + + +### MsgRelayAxelarProxyUpgradeRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `signer` | [string](#string) | | | +| `token` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `fee` | [uint64](#uint64) | | | +| `chain_id` | [uint64](#uint64) | | | + + + + + + + + +### MsgRelayAxelarProxyUpgradeResponse + + + + + + + + + +### MsgScheduleAxelarCorkRequest +MsgScheduleCorkRequest - sdk.Msg for scheduling a cork request for on or after a specific block height + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `cork` | [AxelarCork](#axelarcork.v1.AxelarCork) | | the scheduled cork | +| `chain_id` | [uint64](#uint64) | | the chain id | +| `block_height` | [uint64](#uint64) | | the block height that must be reached | +| `signer` | [string](#string) | | signer account address | + + + + + + + + +### MsgScheduleAxelarCorkResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `id` | [string](#string) | | cork ID | + + + + + + + + + + + + + + +### Msg +MsgService defines the msgs that the cork module handles + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `ScheduleCork` | [MsgScheduleAxelarCorkRequest](#axelarcork.v1.MsgScheduleAxelarCorkRequest) | [MsgScheduleAxelarCorkResponse](#axelarcork.v1.MsgScheduleAxelarCorkResponse) | | | +| `RelayCork` | [MsgRelayAxelarCorkRequest](#axelarcork.v1.MsgRelayAxelarCorkRequest) | [MsgRelayAxelarCorkResponse](#axelarcork.v1.MsgRelayAxelarCorkResponse) | | | +| `BumpCorkGas` | [MsgBumpAxelarCorkGasRequest](#axelarcork.v1.MsgBumpAxelarCorkGasRequest) | [MsgBumpAxelarCorkGasResponse](#axelarcork.v1.MsgBumpAxelarCorkGasResponse) | | | +| `CancelScheduledCork` | [MsgCancelAxelarCorkRequest](#axelarcork.v1.MsgCancelAxelarCorkRequest) | [MsgCancelAxelarCorkResponse](#axelarcork.v1.MsgCancelAxelarCorkResponse) | | | + + + + + + +

Top

+ +## cellarfees/v1/cellarfees.proto + + + + + +### FeeAccrualCounter + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `denom` | [string](#string) | | | +| `count` | [uint64](#uint64) | | | + + + + + + + + +### FeeAccrualCounters + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `counters` | [FeeAccrualCounter](#cellarfees.v1.FeeAccrualCounter) | repeated | | + + + + + + + + + + + + + + + + +

Top

+ +## cellarfees/v1/params.proto + + + + + +### Params +Params defines the parameters for the module. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `fee_accrual_auction_threshold` | [uint64](#uint64) | | The number of fee accruals after which an auction should be started | +| `reward_emission_period` | [uint64](#uint64) | | Emission rate factor. Specifically, the number of blocks over which to distribute some amount of staking rewards. | +| `initial_price_decrease_rate` | [string](#string) | | The initial rate at which auctions should decrease their denom's price in SOMM | +| `price_decrease_block_interval` | [uint64](#uint64) | | Number of blocks between auction price decreases | +| `auction_interval` | [uint64](#uint64) | | The interval between starting auctions | + + + + + + + + + + + + + + + + +

Top

+ +## cellarfees/v1/genesis.proto + + + + + +### GenesisState +GenesisState defines the cellarfees module's genesis state. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#cellarfees.v1.Params) | | | +| `fee_accrual_counters` | [FeeAccrualCounters](#cellarfees.v1.FeeAccrualCounters) | | | +| `last_reward_supply_peak` | [string](#string) | | | + + + + + + + + + + + + + + + + +

Top

+ +## cellarfees/v1/query.proto + + + + + +### QueryAPYRequest + + + + + + + + + +### QueryAPYResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `apy` | [string](#string) | | | + + + + + + + + +### QueryFeeAccrualCountersRequest + + + + + + + + + +### QueryFeeAccrualCountersResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `fee_accrual_counters` | [FeeAccrualCounters](#cellarfees.v1.FeeAccrualCounters) | | | + + + + + + + + +### QueryLastRewardSupplyPeakRequest + + + + + + + + + +### QueryLastRewardSupplyPeakResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `last_reward_supply_peak` | [string](#string) | | | + + + + + + + + +### QueryModuleAccountsRequest + + + + + + + + + +### QueryModuleAccountsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `fees_address` | [string](#string) | | | + + + + + + + + +### QueryParamsRequest + + + + + + + + + +### QueryParamsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#cellarfees.v1.Params) | | | + + + + + + + + + + + + + + +### Query + + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `QueryParams` | [QueryParamsRequest](#cellarfees.v1.QueryParamsRequest) | [QueryParamsResponse](#cellarfees.v1.QueryParamsResponse) | | GET|/sommelier/cellarfees/v1/params| +| `QueryModuleAccounts` | [QueryModuleAccountsRequest](#cellarfees.v1.QueryModuleAccountsRequest) | [QueryModuleAccountsResponse](#cellarfees.v1.QueryModuleAccountsResponse) | | GET|/sommelier/cellarfees/v1/module_accounts| +| `QueryLastRewardSupplyPeak` | [QueryLastRewardSupplyPeakRequest](#cellarfees.v1.QueryLastRewardSupplyPeakRequest) | [QueryLastRewardSupplyPeakResponse](#cellarfees.v1.QueryLastRewardSupplyPeakResponse) | | GET|/sommelier/cellarfees/v1/last_reward_supply_peak| +| `QueryFeeAccrualCounters` | [QueryFeeAccrualCountersRequest](#cellarfees.v1.QueryFeeAccrualCountersRequest) | [QueryFeeAccrualCountersResponse](#cellarfees.v1.QueryFeeAccrualCountersResponse) | | GET|/sommelier/cellarfees/v1/fee_accrual_counters| +| `QueryAPY` | [QueryAPYRequest](#cellarfees.v1.QueryAPYRequest) | [QueryAPYResponse](#cellarfees.v1.QueryAPYResponse) | | GET|/sommelier/cellarfees/v1/apy| + + + + + + +

Top

+ +## cork/v2/cork.proto + + + + + +### CellarIDSet + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `ids` | [string](#string) | repeated | | + + + + + + + + +### Cork + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `encoded_contract_call` | [bytes](#bytes) | | call body containing the ABI encoded bytes to send to the contract | +| `target_contract_address` | [string](#string) | | address of the contract to send the call | + + + + + + + + +### CorkResult + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `cork` | [Cork](#cork.v2.Cork) | | | +| `block_height` | [uint64](#uint64) | | | +| `approved` | [bool](#bool) | | | +| `approval_percentage` | [string](#string) | | | + + + + + + + + +### ScheduledCork + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `cork` | [Cork](#cork.v2.Cork) | | | +| `block_height` | [uint64](#uint64) | | | +| `validator` | [string](#string) | | | +| `id` | [bytes](#bytes) | | | + + + + + + + + + + + + + + + + +

Top

+ +## cork/v2/genesis.proto + + + + + +### GenesisState +GenesisState - all cork state that must be provided at genesis + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#cork.v2.Params) | | | +| `cellar_ids` | [CellarIDSet](#cork.v2.CellarIDSet) | | | +| `invalidation_nonce` | [uint64](#uint64) | | | +| `scheduled_corks` | [ScheduledCork](#cork.v2.ScheduledCork) | repeated | | +| `cork_results` | [CorkResult](#cork.v2.CorkResult) | repeated | | + + + + + + + + +### Params +Params cork parameters + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `vote_threshold` | [string](#string) | | Deprecated VoteThreshold defines the percentage of bonded stake required to vote for a scheduled cork to be approved | +| `max_corks_per_validator` | [uint64](#uint64) | | | + + + + + + + + + + + + + + + + +

Top

+ +## cork/v2/proposal.proto + + + + + +### AddManagedCellarIDsProposal + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `cellar_ids` | [CellarIDSet](#cork.v2.CellarIDSet) | | | +| `publisher_domain` | [string](#string) | | | + + + + + + + + +### AddManagedCellarIDsProposalWithDeposit +AddManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `cellar_ids` | [string](#string) | repeated | | +| `publisher_domain` | [string](#string) | | | | `deposit` | [string](#string) | | | @@ -707,9 +2442,9 @@ RemoveManagedCellarIDsProposalWithDeposit is a specific definition for CLI comma - + -### UpgradeAxelarProxyContractProposal +### RemoveManagedCellarIDsProposal @@ -717,17 +2452,34 @@ RemoveManagedCellarIDsProposalWithDeposit is a specific definition for CLI comma | ----- | ---- | ----- | ----------- | | `title` | [string](#string) | | | | `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `new_proxy_address` | [string](#string) | | | +| `cellar_ids` | [CellarIDSet](#cork.v2.CellarIDSet) | | | - + + +### RemoveManagedCellarIDsProposalWithDeposit +RemoveManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `cellar_ids` | [string](#string) | repeated | | +| `deposit` | [string](#string) | | | + + -### UpgradeAxelarProxyContractProposalWithDeposit + + + + + +### ScheduledCorkProposal @@ -735,8 +2487,34 @@ RemoveManagedCellarIDsProposalWithDeposit is a specific definition for CLI comma | ----- | ---- | ----- | ----------- | | `title` | [string](#string) | | | | `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `new_proxy_address` | [string](#string) | | | +| `block_height` | [uint64](#uint64) | | | +| `target_contract_address` | [string](#string) | | | +| `contract_call_proto_json` | [string](#string) | | The JSON representation of a ScheduleRequest defined in the Steward protos + +Example: The following is the JSON form of a ScheduleRequest containing a steward.v2.cellar_v1.TrustPosition message, which maps to the `trustPosition(address)` function of the the V1 Cellar contract. + +{ "cellar_id": "0x1234567890000000000000000000000000000000", "cellar_v1": { "trust_position": { "erc20_address": "0x1234567890000000000000000000000000000000" } }, "block_height": 1000000 } + +You can use the Steward CLI to generate the required JSON rather than constructing it by hand https://github.com/peggyjv/steward | + + + + + + + + +### ScheduledCorkProposalWithDeposit +ScheduledCorkProposalWithDeposit is a specific definition for CLI commands + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `block_height` | [uint64](#uint64) | | | +| `target_contract_address` | [string](#string) | | | +| `contract_call_proto_json` | [string](#string) | | | | `deposit` | [string](#string) | | | @@ -753,345 +2531,447 @@ RemoveManagedCellarIDsProposalWithDeposit is a specific definition for CLI comma - +

Top

-## axelarcork/v1/query.proto +## cork/v2/query.proto - + -### QueryAxelarContractCallNoncesRequest +### QueryCellarIDsRequest +QueryCellarIDsRequest is the request type for Query/QueryCellarIDs gRPC method. + + +### QueryCellarIDsResponse +QueryCellarIDsResponse is the response type for Query/QueryCellars gRPC method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `cellar_ids` | [string](#string) | repeated | | - -### QueryAxelarContractCallNoncesResponse + + + + + + +### QueryCorkResultRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `contract_call_nonces` | [AxelarContractCallNonce](#axelarcork.v1.AxelarContractCallNonce) | repeated | | +| `id` | [string](#string) | | | - + + +### QueryCorkResultResponse -### QueryAxelarProxyUpgradeDataRequest +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `corkResult` | [CorkResult](#cork.v2.CorkResult) | | | - -### QueryAxelarProxyUpgradeDataResponse + + +### QueryCorkResultsRequest + + + + + + + + + +### QueryCorkResultsResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `proxy_upgrade_data` | [AxelarUpgradeData](#axelarcork.v1.AxelarUpgradeData) | repeated | | +| `corkResults` | [CorkResult](#cork.v2.CorkResult) | repeated | | - + -### QueryCellarIDsByChainIDRequest -QueryCellarIDsByChainIDRequest is the request type for Query/QueryCellarIDsByChainID gRPC method. +### QueryParamsRequest +QueryParamsRequest is the request type for the Query/Params gRPC method. + + + + + + + + +### QueryParamsResponse +QueryParamsRequest is the response type for the Query/Params gRPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `chain_id` | [uint64](#uint64) | | | +| `params` | [Params](#cork.v2.Params) | | allocation parameters | - + -### QueryCellarIDsByChainIDResponse -QueryCellarIDsByChainIDResponse is the response type for Query/QueryCellarIDsByChainID gRPC method. +### QueryScheduledBlockHeightsRequest +QueryScheduledBlockHeightsRequest + + + + + + + + +### QueryScheduledBlockHeightsResponse +QueryScheduledBlockHeightsResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `cellar_ids` | [string](#string) | repeated | | +| `block_heights` | [uint64](#uint64) | repeated | | - + -### QueryCellarIDsRequest -QueryCellarIDs is the request type for Query/QueryCellarIDs gRPC method. +### QueryScheduledCorksByBlockHeightRequest +QueryScheduledCorksByBlockHeightRequest +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `block_height` | [uint64](#uint64) | | | - -### QueryCellarIDsResponse -QueryCellarIDsResponse is the response type for Query/QueryCellarIDs gRPC method. + + + +### QueryScheduledCorksByBlockHeightResponse +QueryScheduledCorksByBlockHeightResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `cellar_ids` | [CellarIDSet](#axelarcork.v1.CellarIDSet) | repeated | | +| `corks` | [ScheduledCork](#cork.v2.ScheduledCork) | repeated | | - + -### QueryChainConfigurationsRequest +### QueryScheduledCorksByIDRequest +QueryScheduledCorksByIDRequest +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `id` | [string](#string) | | | - -### QueryChainConfigurationsResponse + +### QueryScheduledCorksByIDResponse +QueryScheduledCorksByIDResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `configurations` | [ChainConfiguration](#axelarcork.v1.ChainConfiguration) | repeated | | +| `corks` | [ScheduledCork](#cork.v2.ScheduledCork) | repeated | | - + + +### QueryScheduledCorksRequest +QueryScheduledCorksRequest + + + + -### QueryCorkResultRequest + + +### QueryScheduledCorksResponse +QueryScheduledCorksResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | +| `corks` | [ScheduledCork](#cork.v2.ScheduledCork) | repeated | | + - + -### QueryCorkResultResponse + + + + + +### Query +Query defines the gRPC query service for the cork module. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `QueryParams` | [QueryParamsRequest](#cork.v2.QueryParamsRequest) | [QueryParamsResponse](#cork.v2.QueryParamsResponse) | QueryParams queries the allocation module parameters. | GET|/sommelier/cork/v2/params| +| `QueryCellarIDs` | [QueryCellarIDsRequest](#cork.v2.QueryCellarIDsRequest) | [QueryCellarIDsResponse](#cork.v2.QueryCellarIDsResponse) | QueryCellarIDs returns all cellars and current tick ranges | GET|/sommelier/cork/v2/cellar_ids| +| `QueryScheduledCorks` | [QueryScheduledCorksRequest](#cork.v2.QueryScheduledCorksRequest) | [QueryScheduledCorksResponse](#cork.v2.QueryScheduledCorksResponse) | QueryScheduledCorks returns all scheduled corks | GET|/sommelier/cork/v2/scheduled_corks| +| `QueryScheduledBlockHeights` | [QueryScheduledBlockHeightsRequest](#cork.v2.QueryScheduledBlockHeightsRequest) | [QueryScheduledBlockHeightsResponse](#cork.v2.QueryScheduledBlockHeightsResponse) | QueryScheduledBlockHeights returns all scheduled block heights | GET|/sommelier/cork/v2/scheduled_block_heights| +| `QueryScheduledCorksByBlockHeight` | [QueryScheduledCorksByBlockHeightRequest](#cork.v2.QueryScheduledCorksByBlockHeightRequest) | [QueryScheduledCorksByBlockHeightResponse](#cork.v2.QueryScheduledCorksByBlockHeightResponse) | QueryScheduledCorks returns all scheduled corks at a block height | GET|/sommelier/cork/v2/scheduled_corks_by_block_height/{block_height}| +| `QueryScheduledCorksByID` | [QueryScheduledCorksByIDRequest](#cork.v2.QueryScheduledCorksByIDRequest) | [QueryScheduledCorksByIDResponse](#cork.v2.QueryScheduledCorksByIDResponse) | QueryScheduledCorks returns all scheduled corks with the specified ID | GET|/sommelier/cork/v2/scheduled_corks_by_id/{id}| +| `QueryCorkResult` | [QueryCorkResultRequest](#cork.v2.QueryCorkResultRequest) | [QueryCorkResultResponse](#cork.v2.QueryCorkResultResponse) | | GET|/sommelier/cork/v2/cork_results/{id}| +| `QueryCorkResults` | [QueryCorkResultsRequest](#cork.v2.QueryCorkResultsRequest) | [QueryCorkResultsResponse](#cork.v2.QueryCorkResultsResponse) | | GET|/sommelier/cork/v2/cork_results| + + + + + + +

Top

+## cork/v2/tx.proto + + + + + +### MsgScheduleCorkRequest +MsgScheduleCorkRequest - sdk.Msg for scheduling a cork request for on or after a specific block height | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `corkResult` | [AxelarCorkResult](#axelarcork.v1.AxelarCorkResult) | | | +| `cork` | [Cork](#cork.v2.Cork) | | the scheduled cork | +| `block_height` | [uint64](#uint64) | | the block height that must be reached | +| `signer` | [string](#string) | | signer account address | - + -### QueryCorkResultsRequest +### MsgScheduleCorkResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `chain_id` | [uint64](#uint64) | | | - - - +| `id` | [string](#string) | | cork ID | - -### QueryCorkResultsResponse + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `corkResults` | [AxelarCorkResult](#axelarcork.v1.AxelarCorkResult) | repeated | | + + +### Msg +MsgService defines the msgs that the cork module handles +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `ScheduleCork` | [MsgScheduleCorkRequest](#cork.v2.MsgScheduleCorkRequest) | [MsgScheduleCorkResponse](#cork.v2.MsgScheduleCorkResponse) | | | + - -### QueryParamsRequest -QueryParamsRequest is the request type for the Query/Params gRPC method. + +

Top

+## incentives/v1/genesis.proto + - +### GenesisState -### QueryParamsResponse -QueryParamsRequest is the response type for the Query/Params gRPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#axelarcork.v1.Params) | | allocation parameters | +| `params` | [Params](#incentives.v1.Params) | | | - + -### QueryScheduledBlockHeightsRequest -QueryScheduledBlockHeightsRequest +### Params +Params incentives parameters | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `chain_id` | [uint64](#uint64) | | | - - +| `distribution_per_block` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | DistributionPerBlock defines the coin to be sent to the distribution module from the community pool every block | +| `incentives_cutoff_height` | [uint64](#uint64) | | IncentivesCutoffHeight defines the block height after which the incentives module will stop sending coins to the distribution module from the community pool | - -### QueryScheduledBlockHeightsResponse -QueryScheduledBlockHeightsResponse + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `block_heights` | [uint64](#uint64) | repeated | | + + + +

Top

+## incentives/v1/query.proto - -### QueryScheduledCorksByBlockHeightRequest -QueryScheduledCorksByBlockHeightRequest + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `block_height` | [uint64](#uint64) | | | -| `chain_id` | [uint64](#uint64) | | | +### QueryAPYRequest +QueryAPYRequest is the request type for the QueryAPY gRPC method. - + -### QueryScheduledCorksByBlockHeightResponse -QueryScheduledCorksByBlockHeightResponse +### QueryAPYResponse +QueryAPYRequest is the response type for the QueryAPY gRPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `corks` | [ScheduledAxelarCork](#axelarcork.v1.ScheduledAxelarCork) | repeated | | - - +| `apy` | [string](#string) | | | - -### QueryScheduledCorksByIDRequest -QueryScheduledCorksByIDRequest + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | +### QueryParamsRequest +QueryParamsRequest is the request type for the QueryParams gRPC method. - + -### QueryScheduledCorksByIDResponse -QueryScheduledCorksByIDResponse +### QueryParamsResponse +QueryParamsRequest is the response type for the QueryParams gRPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `corks` | [ScheduledAxelarCork](#axelarcork.v1.ScheduledAxelarCork) | repeated | | +| `params` | [Params](#incentives.v1.Params) | | allocation parameters | + - + -### QueryScheduledCorksRequest -QueryScheduledCorksRequest + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `chain_id` | [uint64](#uint64) | | | + + +### Query +Query defines the gRPC query service for the cork module. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `QueryParams` | [QueryParamsRequest](#incentives.v1.QueryParamsRequest) | [QueryParamsResponse](#incentives.v1.QueryParamsResponse) | QueryParams queries the allocation module parameters. | GET|/sommelier/incentives/v1/params| +| `QueryAPY` | [QueryAPYRequest](#incentives.v1.QueryAPYRequest) | [QueryAPYResponse](#incentives.v1.QueryAPYResponse) | QueryAPY queries the APY returned from the incentives module. | GET|/sommelier/incentives/v1/apy| + + +

Top

+## pubsub/v1/params.proto - -### QueryScheduledCorksResponse -QueryScheduledCorksResponse + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `corks` | [ScheduledAxelarCork](#axelarcork.v1.ScheduledAxelarCork) | repeated | | +### Params +Params defines the parameters for the module. @@ -1103,221 +2983,281 @@ QueryScheduledCorksResponse + - -### Query -Query defines the gRPC query service for the cork module. -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `QueryParams` | [QueryParamsRequest](#axelarcork.v1.QueryParamsRequest) | [QueryParamsResponse](#axelarcork.v1.QueryParamsResponse) | QueryParams queries the axelar cork module parameters. | GET|/sommelier/cork/v1/params| -| `QueryCellarIDs` | [QueryCellarIDsRequest](#axelarcork.v1.QueryCellarIDsRequest) | [QueryCellarIDsResponse](#axelarcork.v1.QueryCellarIDsResponse) | QueryCellarIDs queries approved cellar ids of all supported chains | GET|/sommelier/axelarcork/v1/cellar_ids| -| `QueryCellarIDsByChainID` | [QueryCellarIDsByChainIDRequest](#axelarcork.v1.QueryCellarIDsByChainIDRequest) | [QueryCellarIDsByChainIDResponse](#axelarcork.v1.QueryCellarIDsByChainIDResponse) | QueryCellarIDsByChainID returns all cellars and current tick ranges | GET|/sommelier/axelarcork/v1/cellar_ids_by_chain_id| -| `QueryScheduledCorks` | [QueryScheduledCorksRequest](#axelarcork.v1.QueryScheduledCorksRequest) | [QueryScheduledCorksResponse](#axelarcork.v1.QueryScheduledCorksResponse) | QueryScheduledCorks returns all scheduled corks | GET|/sommelier/axelarcork/v1/scheduled_corks| -| `QueryScheduledBlockHeights` | [QueryScheduledBlockHeightsRequest](#axelarcork.v1.QueryScheduledBlockHeightsRequest) | [QueryScheduledBlockHeightsResponse](#axelarcork.v1.QueryScheduledBlockHeightsResponse) | QueryScheduledBlockHeights returns all scheduled block heights | GET|/sommelier/axelarcork/v1/scheduled_block_heights| -| `QueryScheduledCorksByBlockHeight` | [QueryScheduledCorksByBlockHeightRequest](#axelarcork.v1.QueryScheduledCorksByBlockHeightRequest) | [QueryScheduledCorksByBlockHeightResponse](#axelarcork.v1.QueryScheduledCorksByBlockHeightResponse) | QueryScheduledCorks returns all scheduled corks at a block height | GET|/sommelier/axelarcork/v1/scheduled_corks_by_block_height/{block_height}| -| `QueryScheduledCorksByID` | [QueryScheduledCorksByIDRequest](#axelarcork.v1.QueryScheduledCorksByIDRequest) | [QueryScheduledCorksByIDResponse](#axelarcork.v1.QueryScheduledCorksByIDResponse) | QueryScheduledCorks returns all scheduled corks with the specified ID | GET|/sommelier/axelarcork/v1/scheduled_corks_by_id/{id}| -| `QueryCorkResult` | [QueryCorkResultRequest](#axelarcork.v1.QueryCorkResultRequest) | [QueryCorkResultResponse](#axelarcork.v1.QueryCorkResultResponse) | | GET|/sommelier/axelarcork/v1/cork_results/{id}| -| `QueryCorkResults` | [QueryCorkResultsRequest](#axelarcork.v1.QueryCorkResultsRequest) | [QueryCorkResultsResponse](#axelarcork.v1.QueryCorkResultsResponse) | | GET|/sommelier/axelarcork/v1/cork_results| -| `QueryChainConfigurations` | [QueryChainConfigurationsRequest](#axelarcork.v1.QueryChainConfigurationsRequest) | [QueryChainConfigurationsResponse](#axelarcork.v1.QueryChainConfigurationsResponse) | | GET|/sommelier/axelarcork/v1/chain_configurations| -| `QueryAxelarContractCallNonces` | [QueryAxelarContractCallNoncesRequest](#axelarcork.v1.QueryAxelarContractCallNoncesRequest) | [QueryAxelarContractCallNoncesResponse](#axelarcork.v1.QueryAxelarContractCallNoncesResponse) | | GET|/sommelier/axelarcork/v1/contract_call_nonces| -| `QueryAxelarProxyUpgradeData` | [QueryAxelarProxyUpgradeDataRequest](#axelarcork.v1.QueryAxelarProxyUpgradeDataRequest) | [QueryAxelarProxyUpgradeDataResponse](#axelarcork.v1.QueryAxelarProxyUpgradeDataResponse) | | GET|/sommelier/axelarcork/v1/proxy_upgrade_data| + +

Top

- +## pubsub/v1/pubsub.proto - -

Top

+ -## axelarcork/v1/tx.proto +### AddDefaultSubscriptionProposal +set the default publisher for a given subscription ID +these can be overridden by the client + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `subscription_id` | [string](#string) | | | +| `publisher_domain` | [string](#string) | | | - -### MsgBumpAxelarCorkGasRequest + + + + +### AddDefaultSubscriptionProposalWithDeposit | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `signer` | [string](#string) | | | -| `token` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `message_id` | [string](#string) | | | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `subscription_id` | [string](#string) | | | +| `publisher_domain` | [string](#string) | | | +| `deposit` | [string](#string) | | | - + + +### AddPublisherProposal +governance proposal to add a publisher, with domain, adress, and ca_cert the same as the Publisher type +proof URL expected in the format: https:///
/cacert.pem and serving cacert.pem matching ca_cert -### MsgBumpAxelarCorkGasResponse +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `domain` | [string](#string) | | | +| `address` | [string](#string) | | | +| `proof_url` | [string](#string) | | | +| `ca_cert` | [string](#string) | | | - + -### MsgCancelAxelarCorkRequest +### AddPublisherProposalWithDeposit | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `signer` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `target_contract_address` | [string](#string) | | | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `domain` | [string](#string) | | | +| `address` | [string](#string) | | | +| `proof_url` | [string](#string) | | | +| `ca_cert` | [string](#string) | | | +| `deposit` | [string](#string) | | | - + -### MsgCancelAxelarCorkResponse +### DefaultSubscription +represents a default subscription voted in by governance that can be overridden by a subscriber +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `subscription_id` | [string](#string) | | arbitary string representing a subscription, max length of 128 | +| `publisher_domain` | [string](#string) | | FQDN of the publisher, max length of 256 | - -### MsgRelayAxelarCorkRequest + +### Publisher +represents a publisher, which are added via governance | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `signer` | [string](#string) | | | -| `token` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `fee` | [uint64](#uint64) | | | -| `chain_id` | [uint64](#uint64) | | | -| `target_contract_address` | [string](#string) | | | +| `address` | [string](#string) | | account address of the publisher | +| `domain` | [string](#string) | | unique key, FQDN of the publisher, max length of 256 | +| `ca_cert` | [string](#string) | | the publisher's self-signed CA cert PEM file, expecting TLS 1.3 compatible ECDSA certificates, max length 4096 | - + -### MsgRelayAxelarCorkResponse +### PublisherIntent +represents a publisher committing to sending messages for a specific subscription ID +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `subscription_id` | [string](#string) | | arbitary string representing a subscription, max length of 128 | +| `publisher_domain` | [string](#string) | | FQDN of the publisher, max length of 256 | +| `method` | [PublishMethod](#pubsub.v1.PublishMethod) | | either PULL or PUSH (see enum above for details) | +| `pull_url` | [string](#string) | | optional, only needs to be set if using the PULL method, max length of 512 | +| `allowed_subscribers` | [AllowedSubscribers](#pubsub.v1.AllowedSubscribers) | | either ANY, VALIDATORS, or LIST (see enum above for details) | +| `allowed_addresses` | [string](#string) | repeated | optional, must be provided if allowed_subscribers is LIST, list of account addresses, max length 256 | - -### MsgRelayAxelarProxyUpgradeRequest + +### RemoveDefaultSubscriptionProposal +remove a default subscription | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `signer` | [string](#string) | | | -| `token` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `fee` | [uint64](#uint64) | | | -| `chain_id` | [uint64](#uint64) | | | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `subscription_id` | [string](#string) | | | - + + +### RemoveDefaultSubscriptionProposalWithDeposit -### MsgRelayAxelarProxyUpgradeResponse +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `subscription_id` | [string](#string) | | | +| `deposit` | [string](#string) | | | + - + -### MsgScheduleAxelarCorkRequest -MsgScheduleCorkRequest - sdk.Msg for scheduling a cork request for on or after a specific block height +### RemovePublisherProposal +governance proposal to remove a publisher (publishers can remove themselves, but this might be necessary in the +event of a malicious publisher or a key compromise), since Publishers are unique by domain, it's the only +necessary information to remove one | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `cork` | [AxelarCork](#axelarcork.v1.AxelarCork) | | the scheduled cork | -| `chain_id` | [uint64](#uint64) | | the chain id | -| `block_height` | [uint64](#uint64) | | the block height that must be reached | -| `signer` | [string](#string) | | signer account address | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `domain` | [string](#string) | | | - + -### MsgScheduleAxelarCorkResponse +### RemovePublisherProposalWithDeposit | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | cork ID | +| `title` | [string](#string) | | | +| `description` | [string](#string) | | | +| `domain` | [string](#string) | | | +| `deposit` | [string](#string) | | | - - + - +### Subscriber +represents a subscriber, can be set or modified by the owner of the subscriber address - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | unique key, account address representation of either an account or a validator | +| `ca_cert` | [string](#string) | | the subscriber's self-signed CA cert PEM file, expecting TLS 1.3 compatible ECDSA certificates, max length 4096 | +| `push_url` | [string](#string) | | max length of 512 | -### Msg -MsgService defines the msgs that the cork module handles -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `ScheduleCork` | [MsgScheduleAxelarCorkRequest](#axelarcork.v1.MsgScheduleAxelarCorkRequest) | [MsgScheduleAxelarCorkResponse](#axelarcork.v1.MsgScheduleAxelarCorkResponse) | | | -| `RelayCork` | [MsgRelayAxelarCorkRequest](#axelarcork.v1.MsgRelayAxelarCorkRequest) | [MsgRelayAxelarCorkResponse](#axelarcork.v1.MsgRelayAxelarCorkResponse) | | | -| `BumpCorkGas` | [MsgBumpAxelarCorkGasRequest](#axelarcork.v1.MsgBumpAxelarCorkGasRequest) | [MsgBumpAxelarCorkGasResponse](#axelarcork.v1.MsgBumpAxelarCorkGasResponse) | | | -| `CancelScheduledCork` | [MsgCancelAxelarCorkRequest](#axelarcork.v1.MsgCancelAxelarCorkRequest) | [MsgCancelAxelarCorkResponse](#axelarcork.v1.MsgCancelAxelarCorkResponse) | | | - - -

Top

+ + +### SubscriberIntent +represents a subscriber requesting messages for a specific subscription ID and publisher + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `subscription_id` | [string](#string) | | arbitary string representing a subscription, max length of 128 | +| `subscriber_address` | [string](#string) | | account address of the subscriber | +| `publisher_domain` | [string](#string) | | FQDN of the publisher, max length of 256 | + + + + + + -## cellarfees/v1/params.proto + +### AllowedSubscribers +for a given PublisherIntent, determines what types of subscribers may subscribe - +| Name | Number | Description | +| ---- | ------ | ----------- | +| ANY | 0 | any valid account address | +| VALIDATORS | 1 | account address must map to a validator in the active validator set | +| LIST | 2 | a specific list of account addresses | -### Params -Params defines the parameters for the module. + +### PublishMethod +for a given PublisherIntent, whether or not it is pulled or pushed +| Name | Number | Description | +| ---- | ------ | ----------- | +| PULL | 0 | subscribers should pull from the provided URL | +| PUSH | 1 | subscribers must provide a URL to receive push messages | - @@ -1327,22 +3267,27 @@ Params defines the parameters for the module. - +

Top

-## cellarfees/v1/genesis.proto +## pubsub/v1/genesis.proto - + ### GenesisState -GenesisState defines the cellarfees module's genesis state. +GenesisState defines the pubsub module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cellarfees.v1.Params) | | | +| `params` | [Params](#pubsub.v1.Params) | | | +| `publishers` | [Publisher](#pubsub.v1.Publisher) | repeated | | +| `subscribers` | [Subscriber](#pubsub.v1.Subscriber) | repeated | | +| `publisher_intents` | [PublisherIntent](#pubsub.v1.PublisherIntent) | repeated | | +| `subscriber_intents` | [SubscriberIntent](#pubsub.v1.SubscriberIntent) | repeated | | +| `default_subscriptions` | [DefaultSubscription](#pubsub.v1.DefaultSubscription) | repeated | | @@ -1358,41 +3303,46 @@ GenesisState defines the cellarfees module's genesis state. - +

Top

-## cellarfees/v1/query.proto +## pubsub/v1/query.proto - + -### QueryModuleAccountsRequest +### QueryDefaultSubscriptionRequest +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `subscription_id` | [string](#string) | | | - -### QueryModuleAccountsResponse + + + +### QueryDefaultSubscriptionResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `fees_address` | [string](#string) | | | +| `default_subscription` | [DefaultSubscription](#pubsub.v1.DefaultSubscription) | | | - + -### QueryParamsRequest +### QueryDefaultSubscriptionsRequest @@ -1400,650 +3350,637 @@ GenesisState defines the cellarfees module's genesis state. - + -### QueryParamsResponse +### QueryDefaultSubscriptionsResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cellarfees.v1.Params) | | | +| `default_subscriptions` | [DefaultSubscription](#pubsub.v1.DefaultSubscription) | repeated | | - - + - +### QueryParamsRequest - -### Query -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#cellarfees.v1.QueryParamsRequest) | [QueryParamsResponse](#cellarfees.v1.QueryParamsResponse) | | GET|/sommelier/cellarfees/v1/params| -| `ModuleAccounts` | [QueryModuleAccountsRequest](#cellarfees.v1.QueryModuleAccountsRequest) | [QueryModuleAccountsResponse](#cellarfees.v1.QueryModuleAccountsResponse) | | GET|/sommeliers/cellarfees/v1/module_accounts| - + +### QueryParamsResponse - -

Top

-## cork/v1/cork.proto + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#pubsub.v1.Params) | | | - -### CellarIDSet + + + + +### QueryPublisherIntentRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `ids` | [string](#string) | repeated | | +| `publisher_domain` | [string](#string) | | | +| `subscription_id` | [string](#string) | | | - + -### Cork +### QueryPublisherIntentResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `encoded_contract_call` | [bytes](#bytes) | | call body containing the ABI encoded bytes to send to the contract | -| `target_contract_address` | [string](#string) | | address of the contract to send the call | +| `publisher_intent` | [PublisherIntent](#pubsub.v1.PublisherIntent) | | | - + -### ScheduledCork +### QueryPublisherIntentsByPublisherDomainRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `cork` | [Cork](#cork.v1.Cork) | | | -| `block_height` | [uint64](#uint64) | | | -| `validator` | [string](#string) | | | +| `publisher_domain` | [string](#string) | | | - + -### ValidatorCork +### QueryPublisherIntentsByPublisherDomainResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `cork` | [Cork](#cork.v1.Cork) | | | -| `validator` | [string](#string) | | | +| `publisher_intents` | [PublisherIntent](#pubsub.v1.PublisherIntent) | repeated | | - - + + +### QueryPublisherIntentsBySubscriptionIDRequest - - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `subscription_id` | [string](#string) | | | - -

Top

-## cork/v1/tx.proto - + + +### QueryPublisherIntentsBySubscriptionIDResponse -### MsgScheduleCorkRequest -MsgScheduleCorkRequest - sdk.Msg for scheduling a cork request for on or after a specific block height | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `cork` | [Cork](#cork.v1.Cork) | | the scheduled cork | -| `block_height` | [uint64](#uint64) | | the block height that must be reached | -| `signer` | [string](#string) | | signer account address | +| `publisher_intents` | [PublisherIntent](#pubsub.v1.PublisherIntent) | repeated | | - + + +### QueryPublisherIntentsRequest -### MsgScheduleCorkResponse + - +### QueryPublisherIntentsResponse -### MsgSubmitCorkRequest -MsgSubmitCorkRequest - sdk.Msg for submitting calls to Ethereum through the gravity bridge contract | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `cork` | [Cork](#cork.v1.Cork) | | the cork to send across the bridge | -| `signer` | [string](#string) | | signer account address | - +| `publisher_intents` | [PublisherIntent](#pubsub.v1.PublisherIntent) | repeated | | - -### MsgSubmitCorkResponse + +### QueryPublisherRequest +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `publisher_domain` | [string](#string) | | | - - - - + -### Msg -MsgService defines the msgs that the cork module handles +### QueryPublisherResponse -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `SubmitCork` | [MsgSubmitCorkRequest](#cork.v1.MsgSubmitCorkRequest) | [MsgSubmitCorkResponse](#cork.v1.MsgSubmitCorkResponse) | | | -| `ScheduleCork` | [MsgScheduleCorkRequest](#cork.v1.MsgScheduleCorkRequest) | [MsgScheduleCorkResponse](#cork.v1.MsgScheduleCorkResponse) | | | - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `publisher` | [Publisher](#pubsub.v1.Publisher) | | | - -

Top

-## cork/v1/genesis.proto - + -### GenesisState -GenesisState - all cork state that must be provided at genesis +### QueryPublishersRequest -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#cork.v1.Params) | | | -| `cellar_ids` | [CellarIDSet](#cork.v1.CellarIDSet) | | | -| `invalidation_nonce` | [uint64](#uint64) | | | -| `corks` | [ValidatorCork](#cork.v1.ValidatorCork) | repeated | | -| `scheduled_corks` | [ScheduledCork](#cork.v1.ScheduledCork) | repeated | | + - +### QueryPublishersResponse -### Params -Params cork parameters | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `vote_period` | [int64](#int64) | | VotePeriod defines the number of blocks to wait for votes before attempting to tally | -| `vote_threshold` | [string](#string) | | VoteThreshold defines the percentage of bonded stake required to vote each period | +| `publishers` | [Publisher](#pubsub.v1.Publisher) | repeated | | - - + - +### QuerySubscriberIntentRequest - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `subscriber_address` | [string](#string) | | | +| `subscription_id` | [string](#string) | | | - -

Top

-## cork/v1/proposal.proto - -### AddManagedCellarIDsProposal + + +### QuerySubscriberIntentResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `cellar_ids` | [CellarIDSet](#cork.v1.CellarIDSet) | | | +| `subscriber_intent` | [SubscriberIntent](#pubsub.v1.SubscriberIntent) | | | - + + +### QuerySubscriberIntentsByPublisherDomainRequest -### AddManagedCellarIDsProposalWithDeposit -AddManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `cellar_ids` | [string](#string) | repeated | | -| `deposit` | [string](#string) | | | +| `publisher_domain` | [string](#string) | | | - + -### RemoveManagedCellarIDsProposal +### QuerySubscriberIntentsByPublisherDomainResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `cellar_ids` | [CellarIDSet](#cork.v1.CellarIDSet) | | | +| `subscriber_intents` | [SubscriberIntent](#pubsub.v1.SubscriberIntent) | repeated | | - + + +### QuerySubscriberIntentsBySubscriberAddressRequest -### RemoveManagedCellarIDsProposalWithDeposit -RemoveManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `cellar_ids` | [string](#string) | repeated | | -| `deposit` | [string](#string) | | | +| `subscriber_address` | [string](#string) | | | - - + - +### QuerySubscriberIntentsBySubscriberAddressResponse - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `subscriber_intents` | [SubscriberIntent](#pubsub.v1.SubscriberIntent) | repeated | | - -

Top

-## cork/v1/query.proto - -### QueryCellarIDsRequest -QueryCellarIDsRequest is the request type for Query/QueryCellarIDs gRPC method. + +### QuerySubscriberIntentsBySubscriptionIDRequest +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `subscription_id` | [string](#string) | | | - -### QueryCellarIDsResponse -QueryCellarIDsResponse is the response type for Query/QueryCellars gRPC method. + + + + + +### QuerySubscriberIntentsBySubscriptionIDResponse + | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `cellar_ids` | [string](#string) | repeated | | +| `subscriber_intents` | [SubscriberIntent](#pubsub.v1.SubscriberIntent) | repeated | | + + - +### QuerySubscriberIntentsRequest -### QueryCommitPeriodRequest -QueryCommitPeriodRequest is the request type for the Query/QueryCommitPeriod gRPC method. - + + +### QuerySubscriberIntentsResponse -### QueryCommitPeriodResponse -QueryCommitPeriodResponse is the response type for the Query/QueryCommitPeriod gRPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `current_height` | [int64](#int64) | | block height at which the query was processed | -| `vote_period_start` | [int64](#int64) | | latest vote period start block height | -| `vote_period_end` | [int64](#int64) | | block height at which the current voting period ends | +| `subscriber_intents` | [SubscriberIntent](#pubsub.v1.SubscriberIntent) | repeated | | - + + +### QuerySubscriberRequest -### QueryParamsRequest -QueryParamsRequest is the request type for the Query/Params gRPC method. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `subscriber_address` | [string](#string) | | | - -### QueryParamsResponse -QueryParamsRequest is the response type for the Query/Params gRPC method. + + + +### QuerySubscriberResponse + | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cork.v1.Params) | | allocation parameters | +| `subscriber` | [Subscriber](#pubsub.v1.Subscriber) | | | - + -### QueryScheduledBlockHeightsRequest -QueryScheduledBlockHeightsRequest +### QuerySubscribersRequest - -### QueryScheduledBlockHeightsResponse -QueryScheduledBlockHeightsResponse + + +### QuerySubscribersResponse + | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `block_heights` | [uint64](#uint64) | repeated | | +| `subscribers` | [Subscriber](#pubsub.v1.Subscriber) | repeated | | + - + -### QueryScheduledCorksByBlockHeightRequest -QueryScheduledCorksByBlockHeightRequest + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `block_height` | [uint64](#uint64) | | | + +### Query +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Params` | [QueryParamsRequest](#pubsub.v1.QueryParamsRequest) | [QueryParamsResponse](#pubsub.v1.QueryParamsResponse) | | GET|/sommelier/pubsub/v1/params| +| `QueryPublisher` | [QueryPublisherRequest](#pubsub.v1.QueryPublisherRequest) | [QueryPublisherResponse](#pubsub.v1.QueryPublisherResponse) | | GET|/sommelier/pubsub/v1/publishers/{publisher_domain}| +| `QueryPublishers` | [QueryPublishersRequest](#pubsub.v1.QueryPublishersRequest) | [QueryPublishersResponse](#pubsub.v1.QueryPublishersResponse) | | GET|/sommelier/pubsub/v1/publishers| +| `QuerySubscriber` | [QuerySubscriberRequest](#pubsub.v1.QuerySubscriberRequest) | [QuerySubscriberResponse](#pubsub.v1.QuerySubscriberResponse) | | GET|/sommelier/pubsub/v1/subscribers/{subscriber_address}| +| `QuerySubscribers` | [QuerySubscribersRequest](#pubsub.v1.QuerySubscribersRequest) | [QuerySubscribersResponse](#pubsub.v1.QuerySubscribersResponse) | | GET|/sommelier/pubsub/v1/subscribers| +| `QueryPublisherIntent` | [QueryPublisherIntentRequest](#pubsub.v1.QueryPublisherIntentRequest) | [QueryPublisherIntentResponse](#pubsub.v1.QueryPublisherIntentResponse) | | GET|/sommelier/pubsub/v1/publisher_intents/{publisher_domain}/{subscription_id}| +| `QueryPublisherIntents` | [QueryPublisherIntentsRequest](#pubsub.v1.QueryPublisherIntentsRequest) | [QueryPublisherIntentsResponse](#pubsub.v1.QueryPublisherIntentsResponse) | | GET|/sommelier/pubsub/v1/publisher_intents| +| `QueryPublisherIntentsByPublisherDomain` | [QueryPublisherIntentsByPublisherDomainRequest](#pubsub.v1.QueryPublisherIntentsByPublisherDomainRequest) | [QueryPublisherIntentsByPublisherDomainResponse](#pubsub.v1.QueryPublisherIntentsByPublisherDomainResponse) | | GET|/sommelier/pubsub/v1/publisher_intents/{publisher_domain}| +| `QueryPublisherIntentsBySubscriptionID` | [QueryPublisherIntentsBySubscriptionIDRequest](#pubsub.v1.QueryPublisherIntentsBySubscriptionIDRequest) | [QueryPublisherIntentsBySubscriptionIDResponse](#pubsub.v1.QueryPublisherIntentsBySubscriptionIDResponse) | | GET|/sommelier/pubsub/v1/publisher_intents_by_subscription_id/{subscription_id}| +| `QuerySubscriberIntent` | [QuerySubscriberIntentRequest](#pubsub.v1.QuerySubscriberIntentRequest) | [QuerySubscriberIntentResponse](#pubsub.v1.QuerySubscriberIntentResponse) | | GET|/sommelier/pubsub/v1/subscriber_intents/{subscriber_address}/{subscription_id}| +| `QuerySubscriberIntents` | [QuerySubscriberIntentsRequest](#pubsub.v1.QuerySubscriberIntentsRequest) | [QuerySubscriberIntentsResponse](#pubsub.v1.QuerySubscriberIntentsResponse) | | GET|/sommelier/pubsub/v1/subscriber_intents| +| `QuerySubscriberIntentsBySubscriberAddress` | [QuerySubscriberIntentsBySubscriberAddressRequest](#pubsub.v1.QuerySubscriberIntentsBySubscriberAddressRequest) | [QuerySubscriberIntentsBySubscriberAddressResponse](#pubsub.v1.QuerySubscriberIntentsBySubscriberAddressResponse) | | GET|/sommelier/pubsub/v1/subscriber_intents/{subscriber_address}| +| `QuerySubscriberIntentsBySubscriptionID` | [QuerySubscriberIntentsBySubscriptionIDRequest](#pubsub.v1.QuerySubscriberIntentsBySubscriptionIDRequest) | [QuerySubscriberIntentsBySubscriptionIDResponse](#pubsub.v1.QuerySubscriberIntentsBySubscriptionIDResponse) | | GET|/sommelier/pubsub/v1/subscriber_intents_by_subscription_id/{subscription_id}| +| `QuerySubscriberIntentsByPublisherDomain` | [QuerySubscriberIntentsByPublisherDomainRequest](#pubsub.v1.QuerySubscriberIntentsByPublisherDomainRequest) | [QuerySubscriberIntentsByPublisherDomainResponse](#pubsub.v1.QuerySubscriberIntentsByPublisherDomainResponse) | | GET|/sommelier/pubsub/v1/subscriber_intents_by_publisher_domain/{publisher_domain}| +| `QueryDefaultSubscription` | [QueryDefaultSubscriptionRequest](#pubsub.v1.QueryDefaultSubscriptionRequest) | [QueryDefaultSubscriptionResponse](#pubsub.v1.QueryDefaultSubscriptionResponse) | | GET|/sommelier/pubsub/v1/default_subscriptions/{subscription_id}| +| `QueryDefaultSubscriptions` | [QueryDefaultSubscriptionsRequest](#pubsub.v1.QueryDefaultSubscriptionsRequest) | [QueryDefaultSubscriptionsResponse](#pubsub.v1.QueryDefaultSubscriptionsResponse) | | GET|/sommelier/pubsub/v1/default_subscriptions| + - -### QueryScheduledCorksByBlockHeightResponse -QueryScheduledCorksByBlockHeightResponse + +

Top

+ +## pubsub/v1/tx.proto + + + + + +### MsgAddPublisherIntentRequest + | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `corks` | [ScheduledCork](#cork.v1.ScheduledCork) | repeated | | +| `publisher_intent` | [PublisherIntent](#pubsub.v1.PublisherIntent) | | | +| `signer` | [string](#string) | | | - + -### QueryScheduledCorksRequest -QueryScheduledCorksRequest +### MsgAddPublisherIntentResponse - -### QueryScheduledCorksResponse -QueryScheduledCorksResponse + + +### MsgAddSubscriberIntentRequest + | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `corks` | [ScheduledCork](#cork.v1.ScheduledCork) | repeated | | +| `subscriber_intent` | [SubscriberIntent](#pubsub.v1.SubscriberIntent) | | | +| `signer` | [string](#string) | | | + + - +### MsgAddSubscriberIntentResponse -### QuerySubmittedCorksRequest -QuerySubmittedCorksRequest is the request type for the Query/QuerySubmittedCorks gRPC query method. - + + +### MsgAddSubscriberRequest -### QuerySubmittedCorksResponse -QuerySubmittedCorksResponse is the response type for the Query/QuerySubmittedCorks gRPC query method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `corks` | [Cork](#cork.v1.Cork) | repeated | corks in keeper awaiting vote | +| `subscriber` | [Subscriber](#pubsub.v1.Subscriber) | | | +| `signer` | [string](#string) | | | - - + - +### MsgAddSubscriberResponse - -### Query -Query defines the gRPC query service for the cork module. -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `QueryParams` | [QueryParamsRequest](#cork.v1.QueryParamsRequest) | [QueryParamsResponse](#cork.v1.QueryParamsResponse) | QueryParams queries the allocation module parameters. | GET|/sommelier/cork/v1/params| -| `QuerySubmittedCorks` | [QuerySubmittedCorksRequest](#cork.v1.QuerySubmittedCorksRequest) | [QuerySubmittedCorksResponse](#cork.v1.QuerySubmittedCorksResponse) | QuerySubmittedCorks queries the submitted corks awaiting vote | GET|/sommelier/cork/v1/submitted| -| `QueryCommitPeriod` | [QueryCommitPeriodRequest](#cork.v1.QueryCommitPeriodRequest) | [QueryCommitPeriodResponse](#cork.v1.QueryCommitPeriodResponse) | QueryCommitPeriod queries the heights for the current voting period (current, start and end) | GET|/sommelier/cork/v1/commit_period| -| `QueryCellarIDs` | [QueryCellarIDsRequest](#cork.v1.QueryCellarIDsRequest) | [QueryCellarIDsResponse](#cork.v1.QueryCellarIDsResponse) | QueryCellarIDs returns all cellars and current tick ranges | GET|/sommelier/cork/v1/cellar_ids| -| `QueryScheduledCorks` | [QueryScheduledCorksRequest](#cork.v1.QueryScheduledCorksRequest) | [QueryScheduledCorksResponse](#cork.v1.QueryScheduledCorksResponse) | QueryScheduledCorks returns all scheduled corks | GET|/sommelier/cork/v1/scheduled_corks| -| `QueryScheduledBlockHeights` | [QueryScheduledBlockHeightsRequest](#cork.v1.QueryScheduledBlockHeightsRequest) | [QueryScheduledBlockHeightsResponse](#cork.v1.QueryScheduledBlockHeightsResponse) | QueryScheduledBlockHeights returns all scheduled block heights | GET|/sommelier/cork/v1/scheduled_block_heights| -| `QueryScheduledCorksByBlockHeight` | [QueryScheduledCorksByBlockHeightRequest](#cork.v1.QueryScheduledCorksByBlockHeightRequest) | [QueryScheduledCorksByBlockHeightResponse](#cork.v1.QueryScheduledCorksByBlockHeightResponse) | QueryScheduledCorks returns all scheduled corks at a block height | GET|/sommelier/cork/v1/scheduled_corks_by_block_height/{block_height}| - + - -

Top

+### MsgRemovePublisherIntentRequest -## incentives/v1/genesis.proto +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `subscription_id` | [string](#string) | | | +| `publisher_domain` | [string](#string) | | | +| `signer` | [string](#string) | | | - -### GenesisState -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#incentives.v1.Params) | | | + +### MsgRemovePublisherIntentResponse - -### Params -Params incentives parameters + + + + +### MsgRemovePublisherRequest + | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `distribution_per_block` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | DistributionPerBlock defines the coin to be sent to the distribution module from the community pool every block | -| `incentives_cutoff_height` | [uint64](#uint64) | | IncentivesCutoffHeight defines the block height after which the incentives module will stop sending coins to the distribution module from the community pool | +| `publisher_domain` | [string](#string) | | | +| `signer` | [string](#string) | | | - - + - +### MsgRemovePublisherResponse - - -

Top

-## incentives/v1/query.proto + - +### MsgRemoveSubscriberIntentRequest -### QueryAPYRequest -QueryAPYRequest is the request type for the QueryAPY gRPC method. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `subscription_id` | [string](#string) | | | +| `subscriber_address` | [string](#string) | | | +| `signer` | [string](#string) | | | - -### QueryAPYResponse -QueryAPYRequest is the response type for the QueryAPY gRPC method. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `apy` | [string](#string) | | | +### MsgRemoveSubscriberIntentResponse - -### QueryParamsRequest -QueryParamsRequest is the request type for the QueryParams gRPC method. + + +### MsgRemoveSubscriberRequest + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `subscriber_address` | [string](#string) | | | +| `signer` | [string](#string) | | | - -### QueryParamsResponse -QueryParamsRequest is the response type for the QueryParams gRPC method. + +### MsgRemoveSubscriberResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#incentives.v1.Params) | | allocation parameters | @@ -2056,15 +3993,20 @@ QueryParamsRequest is the response type for the QueryParams gRPC method. - + + +### Msg -### Query -Query defines the gRPC query service for the cork module. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `QueryParams` | [QueryParamsRequest](#incentives.v1.QueryParamsRequest) | [QueryParamsResponse](#incentives.v1.QueryParamsResponse) | QueryParams queries the allocation module parameters. | GET|/sommelier/incentives/v1/params| -| `QueryAPY` | [QueryAPYRequest](#incentives.v1.QueryAPYRequest) | [QueryAPYResponse](#incentives.v1.QueryAPYResponse) | QueryAPY queries the APY returned from the incentives module. | GET|/sommelier/incentives/v1/apy| +| `RemovePublisher` | [MsgRemovePublisherRequest](#pubsub.v1.MsgRemovePublisherRequest) | [MsgRemovePublisherResponse](#pubsub.v1.MsgRemovePublisherResponse) | | | +| `AddSubscriber` | [MsgAddSubscriberRequest](#pubsub.v1.MsgAddSubscriberRequest) | [MsgAddSubscriberResponse](#pubsub.v1.MsgAddSubscriberResponse) | | | +| `RemoveSubscriber` | [MsgRemoveSubscriberRequest](#pubsub.v1.MsgRemoveSubscriberRequest) | [MsgRemoveSubscriberResponse](#pubsub.v1.MsgRemoveSubscriberResponse) | | | +| `AddPublisherIntent` | [MsgAddPublisherIntentRequest](#pubsub.v1.MsgAddPublisherIntentRequest) | [MsgAddPublisherIntentResponse](#pubsub.v1.MsgAddPublisherIntentResponse) | | | +| `RemovePublisherIntent` | [MsgRemovePublisherIntentRequest](#pubsub.v1.MsgRemovePublisherIntentRequest) | [MsgRemovePublisherIntentResponse](#pubsub.v1.MsgRemovePublisherIntentResponse) | | | +| `AddSubscriberIntent` | [MsgAddSubscriberIntentRequest](#pubsub.v1.MsgAddSubscriberIntentRequest) | [MsgAddSubscriberIntentResponse](#pubsub.v1.MsgAddSubscriberIntentResponse) | | | +| `RemoveSubscriberIntent` | [MsgRemoveSubscriberIntentRequest](#pubsub.v1.MsgRemoveSubscriberIntentRequest) | [MsgRemoveSubscriberIntentResponse](#pubsub.v1.MsgRemoveSubscriberIntentResponse) | | | diff --git a/proto/auction/v1/query.proto b/proto/auction/v1/query.proto index c4b4c84a4..5adb3e758 100644 --- a/proto/auction/v1/query.proto +++ b/proto/auction/v1/query.proto @@ -38,6 +38,14 @@ service Query { rpc QueryBidsByAuction(QueryBidsByAuctionRequest) returns (QueryBidsByAuctionResponse) { option (google.api.http).get = "/sommelier/auction/v1/auctions/{auction_id}/bids"; } + + rpc QueryTokenPrice(QueryTokenPriceRequest) returns (QueryTokenPriceResponse) { + option (google.api.http).get = "/sommelier/auction/v1/token_prices/{denom}"; + } + + rpc QueryTokenPrices(QueryTokenPricesRequest) returns (QueryTokenPricesResponse) { + option (google.api.http).get = "/sommelier/auction/v1/token_prices"; + } } message QueryParamsRequest {} @@ -94,4 +102,19 @@ message QueryBidsByAuctionRequest { message QueryBidsByAuctionResponse { repeated Bid bids = 1; cosmos.base.query.v1beta1.PageResponse pagination = 2 [ (gogoproto.nullable) = false ]; -} \ No newline at end of file +} + +message QueryTokenPriceRequest { + string denom = 1; +} + +message QueryTokenPriceResponse { + TokenPrice token_price = 1; +} + +message QueryTokenPricesRequest {} + +message QueryTokenPricesResponse { + repeated TokenPrice token_prices = 1; +} + diff --git a/x/auction/client/cli/query.go b/x/auction/client/cli/query.go index a5296f540..a2a4f0fcc 100644 --- a/x/auction/client/cli/query.go +++ b/x/auction/client/cli/query.go @@ -31,6 +31,8 @@ func GetQueryCmd() *cobra.Command { queryEndedAuctionsByDenom(), queryBid(), queryBidsByAuction(), + queryTokenPrice(), + queryTokenPrices(), }...) return auctionQueryCmd @@ -351,3 +353,65 @@ func queryBidsByAuction() *cobra.Command { return cmd } + +func queryTokenPrice() *cobra.Command { + cmd := &cobra.Command{ + Use: "token-price", + Aliases: []string{"tp"}, + Args: cobra.ExactArgs(1), + Short: "query the price of a denom", + RunE: func(cmd *cobra.Command, args []string) error { + ctx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + denom := args[0] + + queryClient := types.NewQueryClient(ctx) + req := &types.QueryTokenPriceRequest{ + Denom: denom, + } + + res, err := queryClient.QueryTokenPrice(cmd.Context(), req) + if err != nil { + return err + } + + return ctx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func queryTokenPrices() *cobra.Command { + cmd := &cobra.Command{ + Use: "token-prices", + Aliases: []string{"tps"}, + Args: cobra.NoArgs, + Short: "query all token prices", + RunE: func(cmd *cobra.Command, args []string) error { + ctx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(ctx) + req := &types.QueryTokenPricesRequest{} + + res, err := queryClient.QueryTokenPrices(cmd.Context(), req) + if err != nil { + return err + } + + return ctx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/auction/client/cli/query_test.go b/x/auction/client/cli/query_test.go index 19adaa16e..7beb33d2c 100644 --- a/x/auction/client/cli/query_test.go +++ b/x/auction/client/cli/query_test.go @@ -261,3 +261,57 @@ func TestQueryBidByAuction(t *testing.T) { require.Equal(t, tc.err.Error(), err.Error()) } } + +func TestQueryTokenPrice(t *testing.T) { + testCases := []struct { + name string + args []string + err error + }{ + { + name: "Insufficient args", + args: []string{}, + err: fmt.Errorf("accepts 1 arg(s), received 0"), + }, + { + name: "Too many args", + args: []string{ + "1", + "2", + }, + err: fmt.Errorf("accepts 1 arg(s), received 2"), + }, + } + + for _, tc := range testCases { + cmd := *queryTokenPrice() + cmd.SetArgs(tc.args) + err := cmd.Execute() + + require.Equal(t, tc.err.Error(), err.Error()) + } +} + +func TestQueryTokenPrices(t *testing.T) { + testCases := []struct { + name string + args []string + err error + }{ + { + name: "Too many args", + args: []string{ + "1", + }, + err: fmt.Errorf("unknown command \"1\" for \"token-prices\""), + }, + } + + for _, tc := range testCases { + cmd := *queryTokenPrices() + cmd.SetArgs(tc.args) + err := cmd.Execute() + + require.Equal(t, tc.err.Error(), err.Error()) + } +} diff --git a/x/auction/client/cli/tx_test.go b/x/auction/client/cli/tx_test.go index 890c24993..57cd298c2 100644 --- a/x/auction/client/cli/tx_test.go +++ b/x/auction/client/cli/tx_test.go @@ -19,7 +19,7 @@ func TestParseSetTokenPricesProposal(t *testing.T) { { "title": "My token proposal", "description": "Contains a usomm price update", - "token_prices": [ { "denom" : "usomm", "usd_price" : "4.200000000000000000"} ], + "token_prices": [ { "denom" : "usomm", "exponent": "6", "usd_price" : "4.200000000000000000"} ], "deposit": "10000usomm" } `) @@ -33,7 +33,7 @@ func TestParseSetTokenPricesProposal(t *testing.T) { require.Equal(t, "My token proposal", proposal.Title) require.Equal(t, "Contains a usomm price update", proposal.Description) - require.Equal(t, "denom:\"usomm\" usd_price:\"4200000000000000000\" ", proposal.TokenPrices[0].String()) + require.Equal(t, "denom:\"usomm\" exponent:6 usd_price:\"4200000000000000000\" ", proposal.TokenPrices[0].String()) require.Equal(t, "10000usomm", proposal.Deposit) } diff --git a/x/auction/keeper/proposal_handler.go b/x/auction/keeper/proposal_handler.go index 521cf5074..03dda6cda 100644 --- a/x/auction/keeper/proposal_handler.go +++ b/x/auction/keeper/proposal_handler.go @@ -17,6 +17,7 @@ func HandleSetTokenPricesProposal(ctx sdk.Context, k Keeper, p types.SetTokenPri k.setTokenPrice(ctx, types.TokenPrice{ Denom: tokenPrice.Denom, UsdPrice: tokenPrice.UsdPrice, + Exponent: tokenPrice.Exponent, LastUpdatedBlock: uint64(ctx.BlockHeight()), }) } diff --git a/x/auction/keeper/query_server.go b/x/auction/keeper/query_server.go index 0954533d3..2d8d20e71 100644 --- a/x/auction/keeper/query_server.go +++ b/x/auction/keeper/query_server.go @@ -132,3 +132,25 @@ func (k Keeper) QueryBidsByAuction(c context.Context, request *types.QueryBidsBy return &types.QueryBidsByAuctionResponse{Bids: bids, Pagination: *pageRes}, nil } + +// QueryTokenPrice implements QueryServer +func (k Keeper) QueryTokenPrice(c context.Context, request *types.QueryTokenPriceRequest) (*types.QueryTokenPriceResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + tokenPrice, found := k.GetTokenPrice(ctx, request.GetDenom()) + + if found { + return &types.QueryTokenPriceResponse{TokenPrice: &tokenPrice}, nil + } + + return &types.QueryTokenPriceResponse{}, status.Errorf(codes.NotFound, "No token price found for denom: %s", request.GetDenom()) +} + +// QueryTokenPrices implements QueryServer +func (k Keeper) QueryTokenPrices(c context.Context, _ *types.QueryTokenPricesRequest) (*types.QueryTokenPricesResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + tokenPrices := k.GetTokenPrices(ctx) + + return &types.QueryTokenPricesResponse{TokenPrices: tokenPrices}, nil +} diff --git a/x/auction/keeper/query_server_test.go b/x/auction/keeper/query_server_test.go index a6f57744d..2700d15f9 100644 --- a/x/auction/keeper/query_server_test.go +++ b/x/auction/keeper/query_server_test.go @@ -119,6 +119,24 @@ func (suite *KeeperTestSuite) TestHappyPathsForQueryServer() { auctionKeeper.setLastAuctionID(ctx, uint32(3)) auctionKeeper.setLastBidID(ctx, uint64(4)) + // Create some token prices + tokenPrice1 := &auctionTypes.TokenPrice{ + Denom: "Shmoo", + Exponent: uint64(6), + UsdPrice: sdk.MustNewDecFromStr("0.5"), + LastUpdatedBlock: uint64(1), + } + tokenPrice2 := &auctionTypes.TokenPrice{ + Denom: "Weth", + Exponent: uint64(18), + UsdPrice: sdk.MustNewDecFromStr("2000"), + LastUpdatedBlock: uint64(1), + } + tokenPrices := []*auctionTypes.TokenPrice{tokenPrice1, tokenPrice2} + + auctionKeeper.setTokenPrice(ctx, *tokenPrice1) + auctionKeeper.setTokenPrice(ctx, *tokenPrice2) + // -- Actually begin testing // QueryParams @@ -165,6 +183,16 @@ func (suite *KeeperTestSuite) TestHappyPathsForQueryServer() { endedBidsResponse, err := auctionKeeper.QueryBidsByAuction(sdk.WrapSDKContext(ctx), &auctionTypes.QueryBidsByAuctionRequest{AuctionId: uint32(1)}) require.Nil(err) require.Equal(&auctionTypes.QueryBidsByAuctionResponse{Bids: []*auctionTypes.Bid{bid0}, Pagination: query.PageResponse{Total: 1}}, endedBidsResponse) + + // QueryTokenPrice + tokenPriceResponse, err := auctionKeeper.QueryTokenPrice(sdk.WrapSDKContext(ctx), &auctionTypes.QueryTokenPriceRequest{Denom: "Shmoo"}) + require.Nil(err) + require.Equal(&auctionTypes.QueryTokenPriceResponse{TokenPrice: tokenPrice1}, tokenPriceResponse) + + // QueryTokenPrices + tokenPricesResponse, err := auctionKeeper.QueryTokenPrices(sdk.WrapSDKContext(ctx), &auctionTypes.QueryTokenPricesRequest{}) + require.Nil(err) + require.Equal(&auctionTypes.QueryTokenPricesResponse{TokenPrices: tokenPrices}, tokenPricesResponse) } // Unhappy path test for query server functions @@ -203,4 +231,14 @@ func (suite *KeeperTestSuite) TestUnhappyPathsForQueryServer() { bidsResponse, err := auctionKeeper.QueryBidsByAuction(sdk.WrapSDKContext(ctx), &auctionTypes.QueryBidsByAuctionRequest{AuctionId: uint32(1)}) require.NoError(err) require.Zero(len(bidsResponse.Bids)) + + // QueryTokenPrice + tokenPriceResponse, err := auctionKeeper.QueryTokenPrice(sdk.WrapSDKContext(ctx), &auctionTypes.QueryTokenPriceRequest{Denom: "Shmoo"}) + require.Equal(status.Errorf(codes.NotFound, "No token price found for denom: Shmoo"), err) + require.Equal(&auctionTypes.QueryTokenPriceResponse{}, tokenPriceResponse) + + // QueryTokenPrices + tokenPricesResponse, err := auctionKeeper.QueryTokenPrices(sdk.WrapSDKContext(ctx), &auctionTypes.QueryTokenPricesRequest{}) + require.NoError(err) + require.Equal(&auctionTypes.QueryTokenPricesResponse{}, tokenPricesResponse) } diff --git a/x/auction/types/query.pb.go b/x/auction/types/query.pb.go index 333e7ceb3..8ed85fbfe 100644 --- a/x/auction/types/query.pb.go +++ b/x/auction/types/query.pb.go @@ -663,6 +663,174 @@ func (m *QueryBidsByAuctionResponse) GetPagination() query.PageResponse { return query.PageResponse{} } +type QueryTokenPriceRequest struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QueryTokenPriceRequest) Reset() { *m = QueryTokenPriceRequest{} } +func (m *QueryTokenPriceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTokenPriceRequest) ProtoMessage() {} +func (*QueryTokenPriceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_73c48d70714d6628, []int{14} +} +func (m *QueryTokenPriceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenPriceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenPriceRequest.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 *QueryTokenPriceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenPriceRequest.Merge(m, src) +} +func (m *QueryTokenPriceRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenPriceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenPriceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenPriceRequest proto.InternalMessageInfo + +func (m *QueryTokenPriceRequest) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +type QueryTokenPriceResponse struct { + TokenPrice *TokenPrice `protobuf:"bytes,1,opt,name=token_price,json=tokenPrice,proto3" json:"token_price,omitempty"` +} + +func (m *QueryTokenPriceResponse) Reset() { *m = QueryTokenPriceResponse{} } +func (m *QueryTokenPriceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTokenPriceResponse) ProtoMessage() {} +func (*QueryTokenPriceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_73c48d70714d6628, []int{15} +} +func (m *QueryTokenPriceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenPriceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenPriceResponse.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 *QueryTokenPriceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenPriceResponse.Merge(m, src) +} +func (m *QueryTokenPriceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenPriceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenPriceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenPriceResponse proto.InternalMessageInfo + +func (m *QueryTokenPriceResponse) GetTokenPrice() *TokenPrice { + if m != nil { + return m.TokenPrice + } + return nil +} + +type QueryTokenPricesRequest struct { +} + +func (m *QueryTokenPricesRequest) Reset() { *m = QueryTokenPricesRequest{} } +func (m *QueryTokenPricesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTokenPricesRequest) ProtoMessage() {} +func (*QueryTokenPricesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_73c48d70714d6628, []int{16} +} +func (m *QueryTokenPricesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenPricesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenPricesRequest.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 *QueryTokenPricesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenPricesRequest.Merge(m, src) +} +func (m *QueryTokenPricesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenPricesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenPricesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenPricesRequest proto.InternalMessageInfo + +type QueryTokenPricesResponse struct { + TokenPrices []*TokenPrice `protobuf:"bytes,1,rep,name=token_prices,json=tokenPrices,proto3" json:"token_prices,omitempty"` +} + +func (m *QueryTokenPricesResponse) Reset() { *m = QueryTokenPricesResponse{} } +func (m *QueryTokenPricesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTokenPricesResponse) ProtoMessage() {} +func (*QueryTokenPricesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_73c48d70714d6628, []int{17} +} +func (m *QueryTokenPricesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenPricesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenPricesResponse.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 *QueryTokenPricesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenPricesResponse.Merge(m, src) +} +func (m *QueryTokenPricesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenPricesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenPricesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenPricesResponse proto.InternalMessageInfo + +func (m *QueryTokenPricesResponse) GetTokenPrices() []*TokenPrice { + if m != nil { + return m.TokenPrices + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "auction.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "auction.v1.QueryParamsResponse") @@ -678,60 +846,73 @@ func init() { proto.RegisterType((*QueryBidResponse)(nil), "auction.v1.QueryBidResponse") proto.RegisterType((*QueryBidsByAuctionRequest)(nil), "auction.v1.QueryBidsByAuctionRequest") proto.RegisterType((*QueryBidsByAuctionResponse)(nil), "auction.v1.QueryBidsByAuctionResponse") + proto.RegisterType((*QueryTokenPriceRequest)(nil), "auction.v1.QueryTokenPriceRequest") + proto.RegisterType((*QueryTokenPriceResponse)(nil), "auction.v1.QueryTokenPriceResponse") + proto.RegisterType((*QueryTokenPricesRequest)(nil), "auction.v1.QueryTokenPricesRequest") + proto.RegisterType((*QueryTokenPricesResponse)(nil), "auction.v1.QueryTokenPricesResponse") } func init() { proto.RegisterFile("auction/v1/query.proto", fileDescriptor_73c48d70714d6628) } var fileDescriptor_73c48d70714d6628 = []byte{ - // 762 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x4f, 0x13, 0x41, - 0x18, 0xee, 0x96, 0x0f, 0x71, 0x88, 0x41, 0x5f, 0xd0, 0x40, 0xa9, 0x8b, 0xae, 0x7c, 0x18, 0x23, - 0x3b, 0xb4, 0x68, 0x14, 0x3c, 0xd1, 0xc4, 0x10, 0xfc, 0x0a, 0xf6, 0xe8, 0x85, 0xec, 0x76, 0x27, - 0xeb, 0x18, 0xba, 0xbb, 0x74, 0xb7, 0x8d, 0x0d, 0xe1, 0xe2, 0x89, 0x23, 0x46, 0x3d, 0xa9, 0xf1, - 0xef, 0x70, 0x24, 0xf1, 0xe2, 0xc9, 0x18, 0xf0, 0x87, 0x98, 0x9d, 0x7d, 0xb7, 0xdd, 0x6d, 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0xcd, 0xc3, 0xec, 0x69, 0x1a, 0x07, 0xfb, 0x0a, 0x19, 0x89, 0x9f, 0x1f, 0x4c, - 0x77, 0x51, 0xb4, 0x0d, 0x2a, 0x97, 0x97, 0x07, 0x91, 0x75, 0x4d, 0xb0, 0x3e, 0x82, 0x95, 0x1e, - 0xad, 0x90, 0x0d, 0x8a, 0x86, 0x8f, 0x97, 0xee, 0x46, 0xb6, 0xb7, 0x07, 0x5f, 0xe3, 0xf6, 0xa4, - 0x9c, 0x40, 0xd2, 0x1e, 0x99, 0x69, 0x49, 0xda, 0x23, 0x35, 0x14, 0xed, 0xa1, 0x10, 0x5a, 0x84, - 0xa5, 0xb3, 0x0a, 0x2d, 0x6d, 0x1c, 0x1e, 0xab, 0xca, 0xd1, 0xb1, 0xaa, 0xfc, 0x3a, 0x56, 0x95, - 0x83, 0x13, 0x35, 0x73, 0x74, 0xa2, 0x66, 0x7e, 0x9c, 0xa8, 0x99, 0x57, 0xd4, 0xe6, 0xc1, 0xeb, - 0xba, 0xa9, 0x57, 0xdc, 0x2a, 0xf5, 0x98, 0x6d, 0x37, 0xdf, 0x34, 0x12, 0xd9, 0x1b, 0x0f, 0xe8, - 0xdb, 0x16, 0x45, 0xd0, 0xf4, 0x98, 0x6f, 0x0e, 0x8b, 0x5f, 0x3b, 0xcb, 0x7f, 0x02, 0x00, 0x00, - 0xff, 0xff, 0x9d, 0xc5, 0x15, 0x0e, 0xc2, 0x09, 0x00, 0x00, + // 905 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xdf, 0x4f, 0xf3, 0x54, + 0x18, 0xc7, 0xd7, 0xbd, 0x80, 0xef, 0x7b, 0xa6, 0x79, 0xf5, 0x01, 0x11, 0xca, 0x2c, 0x5a, 0x06, + 0x18, 0x02, 0x3d, 0x6c, 0x68, 0x70, 0x78, 0xc5, 0x12, 0x43, 0xf0, 0x57, 0x70, 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a1, + 0x8c, 0xaa, 0xef, 0x72, 0xd0, 0x1a, 0xec, 0x3e, 0x14, 0x14, 0xbe, 0x97, 0xf0, 0x5b, 0x95, 0xe8, + 0x06, 0xa8, 0xb9, 0xac, 0x39, 0xa9, 0x94, 0xd7, 0x26, 0xfa, 0x20, 0x56, 0x8d, 0x63, 0x6d, 0xc3, + 0x96, 0x18, 0x2b, 0x2d, 0x65, 0xf4, 0x9c, 0x8b, 0xed, 0x05, 0x7c, 0x27, 0xe1, 0x37, 0x2f, 0xa5, + 0x7f, 0x30, 0x29, 0xdb, 0x70, 0x97, 0x2a, 0x93, 0x9d, 0x90, 0x69, 0x8b, 0x33, 0x55, 0x40, 0x9d, + 0xce, 0xd4, 0x38, 0xbe, 0xbe, 0x55, 0xa4, 0x9b, 0x5b, 0x45, 0xfa, 0xfb, 0x56, 0x91, 0xae, 0xee, + 0x94, 0xc2, 0xcd, 0x9d, 0x52, 0xf8, 0xf3, 0x4e, 0x29, 0x7c, 0x41, 0x2d, 0x3b, 0xf8, 0xb2, 0x67, + 0x68, 0x6d, 0xb7, 0x43, 0x3d, 0x66, 0x59, 0x83, 0xaf, 0xfa, 0xa9, 0x78, 0xfd, 0x7d, 0xfa, 0xcd, + 0x30, 0x68, 0x30, 0xf0, 0x98, 0x6f, 0xcc, 0xf1, 0x3f, 0xc0, 0x7b, 0xff, 0x06, 0x00, 0x00, 0xff, + 0xff, 0x25, 0x5a, 0xbc, 0x81, 0xd5, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -753,6 +934,8 @@ type QueryClient interface { QueryEndedAuctions(ctx context.Context, in *QueryEndedAuctionsRequest, opts ...grpc.CallOption) (*QueryEndedAuctionsResponse, error) QueryBid(ctx context.Context, in *QueryBidRequest, opts ...grpc.CallOption) (*QueryBidResponse, error) QueryBidsByAuction(ctx context.Context, in *QueryBidsByAuctionRequest, opts ...grpc.CallOption) (*QueryBidsByAuctionResponse, error) + QueryTokenPrice(ctx context.Context, in *QueryTokenPriceRequest, opts ...grpc.CallOption) (*QueryTokenPriceResponse, error) + QueryTokenPrices(ctx context.Context, in *QueryTokenPricesRequest, opts ...grpc.CallOption) (*QueryTokenPricesResponse, error) } type queryClient struct { @@ -826,6 +1009,24 @@ func (c *queryClient) QueryBidsByAuction(ctx context.Context, in *QueryBidsByAuc return out, nil } +func (c *queryClient) QueryTokenPrice(ctx context.Context, in *QueryTokenPriceRequest, opts ...grpc.CallOption) (*QueryTokenPriceResponse, error) { + out := new(QueryTokenPriceResponse) + err := c.cc.Invoke(ctx, "/auction.v1.Query/QueryTokenPrice", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) QueryTokenPrices(ctx context.Context, in *QueryTokenPricesRequest, opts ...grpc.CallOption) (*QueryTokenPricesResponse, error) { + out := new(QueryTokenPricesResponse) + err := c.cc.Invoke(ctx, "/auction.v1.Query/QueryTokenPrices", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { QueryParams(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) @@ -835,6 +1036,8 @@ type QueryServer interface { QueryEndedAuctions(context.Context, *QueryEndedAuctionsRequest) (*QueryEndedAuctionsResponse, error) QueryBid(context.Context, *QueryBidRequest) (*QueryBidResponse, error) QueryBidsByAuction(context.Context, *QueryBidsByAuctionRequest) (*QueryBidsByAuctionResponse, error) + QueryTokenPrice(context.Context, *QueryTokenPriceRequest) (*QueryTokenPriceResponse, error) + QueryTokenPrices(context.Context, *QueryTokenPricesRequest) (*QueryTokenPricesResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -862,6 +1065,12 @@ func (*UnimplementedQueryServer) QueryBid(ctx context.Context, req *QueryBidRequ func (*UnimplementedQueryServer) QueryBidsByAuction(ctx context.Context, req *QueryBidsByAuctionRequest) (*QueryBidsByAuctionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryBidsByAuction not implemented") } +func (*UnimplementedQueryServer) QueryTokenPrice(ctx context.Context, req *QueryTokenPriceRequest) (*QueryTokenPriceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryTokenPrice not implemented") +} +func (*UnimplementedQueryServer) QueryTokenPrices(ctx context.Context, req *QueryTokenPricesRequest) (*QueryTokenPricesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryTokenPrices not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -993,6 +1202,42 @@ func _Query_QueryBidsByAuction_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Query_QueryTokenPrice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTokenPriceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryTokenPrice(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/auction.v1.Query/QueryTokenPrice", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryTokenPrice(ctx, req.(*QueryTokenPriceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_QueryTokenPrices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTokenPricesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryTokenPrices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/auction.v1.Query/QueryTokenPrices", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryTokenPrices(ctx, req.(*QueryTokenPricesRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "auction.v1.Query", HandlerType: (*QueryServer)(nil), @@ -1025,6 +1270,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "QueryBidsByAuction", Handler: _Query_QueryBidsByAuction_Handler, }, + { + MethodName: "QueryTokenPrice", + Handler: _Query_QueryTokenPrice_Handler, + }, + { + MethodName: "QueryTokenPrices", + Handler: _Query_QueryTokenPrices_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "auction/v1/query.proto", @@ -1505,6 +1758,131 @@ func (m *QueryBidsByAuctionResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *QueryTokenPriceRequest) 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 *QueryTokenPriceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenPriceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTokenPriceResponse) 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 *QueryTokenPriceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenPriceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TokenPrice != nil { + { + size, err := m.TokenPrice.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTokenPricesRequest) 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 *QueryTokenPricesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenPricesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryTokenPricesResponse) 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 *QueryTokenPricesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenPricesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TokenPrices) > 0 { + for iNdEx := len(m.TokenPrices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokenPrices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -1697,8 +2075,58 @@ func (m *QueryBidsByAuctionResponse) Size() (n int) { return n } -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 +func (m *QueryTokenPriceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTokenPriceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TokenPrice != nil { + l = m.TokenPrice.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTokenPricesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryTokenPricesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TokenPrices) > 0 { + for _, e := range m.TokenPrices { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 } func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) @@ -2873,6 +3301,308 @@ func (m *QueryBidsByAuctionResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryTokenPriceRequest) 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 ErrIntOverflowQuery + } + 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: QueryTokenPriceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenPriceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTokenPriceResponse) 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 ErrIntOverflowQuery + } + 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: QueryTokenPriceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenPriceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenPrice", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TokenPrice == nil { + m.TokenPrice = &TokenPrice{} + } + if err := m.TokenPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTokenPricesRequest) 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 ErrIntOverflowQuery + } + 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: QueryTokenPricesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenPricesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTokenPricesResponse) 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 ErrIntOverflowQuery + } + 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: QueryTokenPricesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenPricesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenPrices", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TokenPrices = append(m.TokenPrices, &TokenPrice{}) + if err := m.TokenPrices[len(m.TokenPrices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/auction/types/query.pb.gw.go b/x/auction/types/query.pb.gw.go index 4ba1ec508..b530e653d 100644 --- a/x/auction/types/query.pb.gw.go +++ b/x/auction/types/query.pb.gw.go @@ -361,6 +361,78 @@ func local_request_Query_QueryBidsByAuction_0(ctx context.Context, marshaler run } +func request_Query_QueryTokenPrice_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenPriceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + } + + protoReq.Denom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + } + + msg, err := client.QueryTokenPrice(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QueryTokenPrice_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenPriceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + } + + protoReq.Denom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + } + + msg, err := server.QueryTokenPrice(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_QueryTokenPrices_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenPricesRequest + var metadata runtime.ServerMetadata + + msg, err := client.QueryTokenPrices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QueryTokenPrices_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenPricesRequest + var metadata runtime.ServerMetadata + + msg, err := server.QueryTokenPrices(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -528,6 +600,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_QueryTokenPrice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_QueryTokenPrice_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryTokenPrice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_QueryTokenPrices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_QueryTokenPrices_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryTokenPrices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -709,6 +827,46 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_QueryTokenPrice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_QueryTokenPrice_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryTokenPrice_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_QueryTokenPrices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_QueryTokenPrices_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryTokenPrices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -726,6 +884,10 @@ var ( pattern_Query_QueryBid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"sommelier", "auction", "v1", "auctions", "auction_id", "bids", "bid_id"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_QueryBidsByAuction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"sommelier", "auction", "v1", "auctions", "auction_id", "bids"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_QueryTokenPrice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sommelier", "auction", "v1", "token_prices", "denom"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_QueryTokenPrices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "auction", "v1", "token_prices"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -742,4 +904,8 @@ var ( forward_Query_QueryBid_0 = runtime.ForwardResponseMessage forward_Query_QueryBidsByAuction_0 = runtime.ForwardResponseMessage + + forward_Query_QueryTokenPrice_0 = runtime.ForwardResponseMessage + + forward_Query_QueryTokenPrices_0 = runtime.ForwardResponseMessage ) From 0759b9dcea3bba418d949f3d7fbc7ec8e6deea73 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Sun, 28 Jan 2024 22:54:38 -0800 Subject: [PATCH 07/32] Fix GMP encoding (#262) * axelar payload using JSON int arrays, not base64 * check axelar addresses correctly, validate deadline --- x/axelarcork/keeper/msg_server.go | 12 ++++++++++-- x/axelarcork/keeper/packet.go | 29 ++++++++++++++++++++--------- x/axelarcork/types/axelar.go | 2 +- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/x/axelarcork/keeper/msg_server.go b/x/axelarcork/keeper/msg_server.go index a256a8fa2..ceecedc56 100644 --- a/x/axelarcork/keeper/msg_server.go +++ b/x/axelarcork/keeper/msg_server.go @@ -97,7 +97,7 @@ func (k Keeper) RelayCork(c context.Context, msg *types.MsgRelayAxelarCorkReques axelarMemo := types.AxelarBody{ DestinationChain: config.Name, DestinationAddress: config.ProxyAddress, - Payload: payload, + Payload: bytesToInts(payload), Type: types.PureMessage, Fee: &types.Fee{ Amount: strconv.FormatUint(msg.Fee, 10), @@ -161,7 +161,7 @@ func (k Keeper) RelayProxyUpgrade(c context.Context, msg *types.MsgRelayAxelarPr axelarMemo := types.AxelarBody{ DestinationChain: config.Name, DestinationAddress: config.ProxyAddress, - Payload: upgradeData.Payload, + Payload: bytesToInts(upgradeData.Payload), Type: types.PureMessage, Fee: &types.Fee{ Amount: strconv.FormatUint(msg.Fee, 10), @@ -226,3 +226,11 @@ func (k Keeper) CancelScheduledCork(c context.Context, msg *types.MsgCancelAxela return &types.MsgCancelAxelarCorkResponse{}, nil } + +func bytesToInts(payload []byte) []int { + intPayload := make([]int, len(payload)) + for i, b := range payload { + intPayload[i] = int(b) + } + return intPayload +} diff --git a/x/axelarcork/keeper/packet.go b/x/axelarcork/keeper/packet.go index 99c8c4fe6..8a88062f2 100644 --- a/x/axelarcork/keeper/packet.go +++ b/x/axelarcork/keeper/packet.go @@ -29,12 +29,12 @@ func (k Keeper) ValidateAxelarPacket(ctx sdk.Context, sourceChannel string, data } // decoding some bech32 strings so our comparisons are guaranteed to be accurate - gmpAccountAddr, err := sdk.AccAddressFromBech32(params.GmpAccount) + gmpAccountAddr, err := sdk.GetFromBech32(params.GmpAccount, "axelar") if err != nil { return fmt.Errorf("GmpAccount parameter is an invalid address: %s", params.GmpAccount) } - receiverAddr, err := sdk.AccAddressFromBech32(packetData.Receiver) + receiverAddr, err := sdk.GetFromBech32(packetData.Receiver, "axelar") if err != nil { return fmt.Errorf("receiver in IBC packet data is an invalid address: %s", packetData.Receiver) } @@ -45,7 +45,7 @@ func (k Keeper) ValidateAxelarPacket(ctx sdk.Context, sourceChannel string, data } // if we are not sending to the axelar gmp management account, we can skip - if !receiverAddr.Equals(gmpAccountAddr) { + if !bytes.Equal(receiverAddr, gmpAccountAddr) { return nil } @@ -63,6 +63,7 @@ func (k Keeper) ValidateAxelarPacket(ctx sdk.Context, sourceChannel string, data if err := json.Unmarshal([]byte(packetData.Memo), &axelarBody); err != nil { return err } + payloadBytes := intsToBytes(axelarBody.Payload) // get the destination chain configuration chainConfig, ok := k.GetChainConfigurationByName(ctx, axelarBody.DestinationChain) @@ -86,12 +87,14 @@ func (k Keeper) ValidateAxelarPacket(ctx sdk.Context, sourceChannel string, data } // Validate logic call - if targetContract, nonce, _, callData, err := types.DecodeLogicCallArgs(axelarBody.Payload); err == nil { + if targetContract, nonce, deadline, callData, err := types.DecodeLogicCallArgs(payloadBytes); err == nil { if nonce == 0 { return fmt.Errorf("nonce cannot be zero") } - // TODO(bolten): is there any validation on the deadline worth doing? + if deadline == 0 { + return fmt.Errorf("deadline cannot be zero") + } blockHeight, winningCork, ok := k.GetWinningAxelarCork(ctx, chainConfig.Id, common.HexToAddress(targetContract)) if !ok { @@ -109,7 +112,7 @@ func (k Keeper) ValidateAxelarPacket(ctx sdk.Context, sourceChannel string, data } // Validate upgrade - if newProxyContract, targets, err := types.DecodeUpgradeArgs(axelarBody.Payload); err == nil { + if newProxyContract, targets, err := types.DecodeUpgradeArgs(payloadBytes); err == nil { if !common.IsHexAddress(newProxyContract) { return fmt.Errorf("invalid proxy address %s", newProxyContract) } @@ -129,8 +132,8 @@ func (k Keeper) ValidateAxelarPacket(ctx sdk.Context, sourceChannel string, data return fmt.Errorf("no upgrade data expected for chain %s:%d", chainConfig.Name, chainConfig.Id) } - if !bytes.Equal(upgradeData.Payload, axelarBody.Payload) { - return fmt.Errorf("upgrade data did not match expected data. received: %s, expected: %s", axelarBody.Payload, upgradeData.Payload) + if !bytes.Equal(upgradeData.Payload, payloadBytes) { + return fmt.Errorf("upgrade data did not match expected data. received: %s, expected: %s", payloadBytes, upgradeData.Payload) } // all checks have passed, delete the upgrade data from state @@ -139,5 +142,13 @@ func (k Keeper) ValidateAxelarPacket(ctx sdk.Context, sourceChannel string, data return nil } - return fmt.Errorf("invalid payload: %s", axelarBody.Payload) + return fmt.Errorf("invalid payload: %s", payloadBytes) +} + +func intsToBytes(payload []int) []byte { + bytePayload := make([]byte, len(payload)) + for i, b := range payload { + bytePayload[i] = byte(b) + } + return bytePayload } diff --git a/x/axelarcork/types/axelar.go b/x/axelarcork/types/axelar.go index 45e08b57c..b2df87bbc 100644 --- a/x/axelarcork/types/axelar.go +++ b/x/axelarcork/types/axelar.go @@ -10,7 +10,7 @@ const ( type AxelarBody struct { DestinationChain string `json:"destination_chain"` DestinationAddress string `json:"destination_address"` - Payload []byte `json:"payload"` + Payload []int `json:"payload"` Type int64 `json:"type"` Fee *Fee `json:"fee"` } From a9abbd53ce8a15a850524452fab9ed34d4a07dad Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Sun, 28 Jan 2024 23:52:35 -0800 Subject: [PATCH 08/32] fix releaser permissions (#263) * fix releaser permissions * fix axelar tx flags --- .github/workflows/release.yml | 3 +++ x/axelarcork/client/cli/tx.go | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 392cadbb1..a74a3c00e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,9 @@ on: tags: - "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10 +permissions: + contents: write + jobs: goreleaser: runs-on: ubuntu-20.04 diff --git a/x/axelarcork/client/cli/tx.go b/x/axelarcork/client/cli/tx.go index 43d54575f..0e60657ff 100644 --- a/x/axelarcork/client/cli/tx.go +++ b/x/axelarcork/client/cli/tx.go @@ -8,6 +8,7 @@ import ( "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" @@ -90,6 +91,7 @@ func CmdScheduleAxelarCork() *cobra.Command { }, } + flags.AddTxFlagsToCmd(cmd) return cmd } @@ -142,6 +144,7 @@ func CmdRelayAxelarCork() *cobra.Command { }, } + flags.AddTxFlagsToCmd(cmd) return cmd } @@ -188,6 +191,7 @@ func CmdRelayAxelarProxyUpgrade() *cobra.Command { }, } + flags.AddTxFlagsToCmd(cmd) return cmd } @@ -225,6 +229,7 @@ func CmdBumpAxelarCorkGas() *cobra.Command { }, } + flags.AddTxFlagsToCmd(cmd) return cmd } From 445b69ae20645875e9556e8ff46e1e03561fcaef Mon Sep 17 00:00:00 2001 From: Collin Date: Mon, 29 Jan 2024 02:27:00 -0600 Subject: [PATCH 09/32] Add query for winning axelar cork (#264) --- docs/core/proto-docs.md | 35 ++ proto/axelarcork/v1/query.proto | 14 + x/axelarcork/client/cli/query.go | 41 ++ x/axelarcork/keeper/query_server.go | 20 + x/axelarcork/types/proposal.pb.go | 19 +- x/axelarcork/types/query.pb.go | 602 ++++++++++++++++++++++++---- x/axelarcork/types/query.pb.gw.go | 83 ++++ 7 files changed, 733 insertions(+), 81 deletions(-) diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 953342c71..7c992b655 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -108,6 +108,8 @@ - [QueryScheduledCorksByIDResponse](#axelarcork.v1.QueryScheduledCorksByIDResponse) - [QueryScheduledCorksRequest](#axelarcork.v1.QueryScheduledCorksRequest) - [QueryScheduledCorksResponse](#axelarcork.v1.QueryScheduledCorksResponse) + - [QueryWinningAxelarCorkRequest](#axelarcork.v1.QueryWinningAxelarCorkRequest) + - [QueryWinningAxelarCorkResponse](#axelarcork.v1.QueryWinningAxelarCorkResponse) - [Query](#axelarcork.v1.Query) @@ -1790,6 +1792,38 @@ QueryScheduledCorksResponse + + + +### QueryWinningAxelarCorkRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `chain_id` | [uint64](#uint64) | | | +| `contract_address` | [string](#string) | | | + + + + + + + + +### QueryWinningAxelarCorkResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `cork` | [AxelarCork](#axelarcork.v1.AxelarCork) | | | +| `block_height` | [uint64](#uint64) | | | + + + + + @@ -1816,6 +1850,7 @@ Query defines the gRPC query service for the cork module. | `QueryChainConfigurations` | [QueryChainConfigurationsRequest](#axelarcork.v1.QueryChainConfigurationsRequest) | [QueryChainConfigurationsResponse](#axelarcork.v1.QueryChainConfigurationsResponse) | | GET|/sommelier/axelarcork/v1/chain_configurations| | `QueryAxelarContractCallNonces` | [QueryAxelarContractCallNoncesRequest](#axelarcork.v1.QueryAxelarContractCallNoncesRequest) | [QueryAxelarContractCallNoncesResponse](#axelarcork.v1.QueryAxelarContractCallNoncesResponse) | | GET|/sommelier/axelarcork/v1/contract_call_nonces| | `QueryAxelarProxyUpgradeData` | [QueryAxelarProxyUpgradeDataRequest](#axelarcork.v1.QueryAxelarProxyUpgradeDataRequest) | [QueryAxelarProxyUpgradeDataResponse](#axelarcork.v1.QueryAxelarProxyUpgradeDataResponse) | | GET|/sommelier/axelarcork/v1/proxy_upgrade_data| +| `QueryWinningAxelarCork` | [QueryWinningAxelarCorkRequest](#axelarcork.v1.QueryWinningAxelarCorkRequest) | [QueryWinningAxelarCorkResponse](#axelarcork.v1.QueryWinningAxelarCorkResponse) | | GET|/sommelier/axelarcork/v1/winning_cork| diff --git a/proto/axelarcork/v1/query.proto b/proto/axelarcork/v1/query.proto index 2cb37f1ba..e48039f9d 100644 --- a/proto/axelarcork/v1/query.proto +++ b/proto/axelarcork/v1/query.proto @@ -61,6 +61,10 @@ service Query { rpc QueryAxelarProxyUpgradeData(QueryAxelarProxyUpgradeDataRequest) returns (QueryAxelarProxyUpgradeDataResponse) { option (google.api.http).get = "/sommelier/axelarcork/v1/proxy_upgrade_data"; } + + rpc QueryWinningAxelarCork(QueryWinningAxelarCorkRequest) returns (QueryWinningAxelarCorkResponse) { + option (google.api.http).get = "/sommelier/axelarcork/v1/winning_cork"; + } } // QueryParamsRequest is the request type for the Query/Params gRPC method. @@ -167,3 +171,13 @@ message QueryAxelarProxyUpgradeDataResponse { repeated AxelarUpgradeData proxy_upgrade_data = 1; } +message QueryWinningAxelarCorkRequest { + uint64 chain_id = 1; + string contract_address = 2; +} + +message QueryWinningAxelarCorkResponse { + AxelarCork cork = 1; + uint64 block_height = 2; +} + diff --git a/x/axelarcork/client/cli/query.go b/x/axelarcork/client/cli/query.go index 9963d308c..01e6165ba 100644 --- a/x/axelarcork/client/cli/query.go +++ b/x/axelarcork/client/cli/query.go @@ -34,6 +34,7 @@ func GetQueryCmd() *cobra.Command { queryChainConfigurations(), queryAxelarContractCallNonces(), queryAxelayProxyUpgradeData(), + queryWinningAxelarCork(), }...) return corkQueryCmd @@ -460,3 +461,43 @@ func queryAxelayProxyUpgradeData() *cobra.Command { return cmd } + +func queryWinningAxelarCork() *cobra.Command { + cmd := &cobra.Command{ + Use: "winning-axelar-cork [chain-id] [contract-address]", + Aliases: []string{"wac"}, + Args: cobra.ExactArgs(2), + Short: "query the winning cork for a given chain and contract", + RunE: func(cmd *cobra.Command, args []string) error { + ctx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(ctx) + + chainID, err := math.ParseUint(args[0]) + if err != nil { + return err + } + + contract := args[1] + + req := &types.QueryWinningAxelarCorkRequest{ + ChainId: chainID.Uint64(), + ContractAddress: contract, + } + + res, err := queryClient.QueryWinningAxelarCork(cmd.Context(), req) + if err != nil { + return err + } + + return ctx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/axelarcork/keeper/query_server.go b/x/axelarcork/keeper/query_server.go index b5883687f..7687235d6 100644 --- a/x/axelarcork/keeper/query_server.go +++ b/x/axelarcork/keeper/query_server.go @@ -248,3 +248,23 @@ func (k Keeper) QueryAxelarProxyUpgradeData(c context.Context, req *types.QueryA return &response, nil } + +func (k Keeper) QueryWinningAxelarCork(c context.Context, req *types.QueryWinningAxelarCorkRequest) (*types.QueryWinningAxelarCorkResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(c) + + response := types.QueryWinningAxelarCorkResponse{} + + height, cork, found := k.GetWinningAxelarCork(ctx, req.ChainId, common.HexToAddress(req.ContractAddress)) + if !found { + return &types.QueryWinningAxelarCorkResponse{}, status.Errorf(codes.NotFound, "No winning cork found for chain id: %d", req.GetChainId()) + } + + response.Cork = &cork + response.BlockHeight = height + + return &response, nil +} diff --git a/x/axelarcork/types/proposal.pb.go b/x/axelarcork/types/proposal.pb.go index 2df397228..992d2010e 100644 --- a/x/axelarcork/types/proposal.pb.go +++ b/x/axelarcork/types/proposal.pb.go @@ -344,21 +344,20 @@ type AxelarScheduledCorkProposal struct { BlockHeight uint64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` ChainId uint64 `protobuf:"varint,4,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` TargetContractAddress string `protobuf:"bytes,5,opt,name=target_contract_address,json=targetContractAddress,proto3" json:"target_contract_address,omitempty"` - // // The JSON representation of a ScheduleRequest defined in the Steward protos // // Example: The following is the JSON form of a ScheduleRequest containing a steward.v2.cellar_v1.TrustPosition // message, which maps to the `trustPosition(address)` function of the the V1 Cellar contract. // - // { - // "cellar_id": "0x1234567890000000000000000000000000000000", - // "cellar_v1": { - // "trust_position": { - // "erc20_address": "0x1234567890000000000000000000000000000000" - // } - // }, - // "block_height": 1000000 - // } + // { + // "cellar_id": "0x1234567890000000000000000000000000000000", + // "cellar_v1": { + // "trust_position": { + // "erc20_address": "0x1234567890000000000000000000000000000000" + // } + // }, + // "block_height": 1000000 + // } // // You can use the Steward CLI to generate the required JSON rather than constructing it by hand // https://github.com/peggyjv/steward diff --git a/x/axelarcork/types/query.pb.go b/x/axelarcork/types/query.pb.go index 2f6dcc11a..251ffb146 100644 --- a/x/axelarcork/types/query.pb.go +++ b/x/axelarcork/types/query.pb.go @@ -1088,6 +1088,110 @@ func (m *QueryAxelarProxyUpgradeDataResponse) GetProxyUpgradeData() []*AxelarUpg return nil } +type QueryWinningAxelarCorkRequest struct { + ChainId uint64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` +} + +func (m *QueryWinningAxelarCorkRequest) Reset() { *m = QueryWinningAxelarCorkRequest{} } +func (m *QueryWinningAxelarCorkRequest) String() string { return proto.CompactTextString(m) } +func (*QueryWinningAxelarCorkRequest) ProtoMessage() {} +func (*QueryWinningAxelarCorkRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7d10e4f1065c484f, []int{24} +} +func (m *QueryWinningAxelarCorkRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryWinningAxelarCorkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryWinningAxelarCorkRequest.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 *QueryWinningAxelarCorkRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryWinningAxelarCorkRequest.Merge(m, src) +} +func (m *QueryWinningAxelarCorkRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryWinningAxelarCorkRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryWinningAxelarCorkRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryWinningAxelarCorkRequest proto.InternalMessageInfo + +func (m *QueryWinningAxelarCorkRequest) GetChainId() uint64 { + if m != nil { + return m.ChainId + } + return 0 +} + +func (m *QueryWinningAxelarCorkRequest) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + +type QueryWinningAxelarCorkResponse struct { + Cork *AxelarCork `protobuf:"bytes,1,opt,name=cork,proto3" json:"cork,omitempty"` + BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` +} + +func (m *QueryWinningAxelarCorkResponse) Reset() { *m = QueryWinningAxelarCorkResponse{} } +func (m *QueryWinningAxelarCorkResponse) String() string { return proto.CompactTextString(m) } +func (*QueryWinningAxelarCorkResponse) ProtoMessage() {} +func (*QueryWinningAxelarCorkResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7d10e4f1065c484f, []int{25} +} +func (m *QueryWinningAxelarCorkResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryWinningAxelarCorkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryWinningAxelarCorkResponse.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 *QueryWinningAxelarCorkResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryWinningAxelarCorkResponse.Merge(m, src) +} +func (m *QueryWinningAxelarCorkResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryWinningAxelarCorkResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryWinningAxelarCorkResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryWinningAxelarCorkResponse proto.InternalMessageInfo + +func (m *QueryWinningAxelarCorkResponse) GetCork() *AxelarCork { + if m != nil { + return m.Cork + } + return nil +} + +func (m *QueryWinningAxelarCorkResponse) GetBlockHeight() uint64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "axelarcork.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "axelarcork.v1.QueryParamsResponse") @@ -1113,82 +1217,89 @@ func init() { proto.RegisterType((*QueryAxelarContractCallNoncesResponse)(nil), "axelarcork.v1.QueryAxelarContractCallNoncesResponse") proto.RegisterType((*QueryAxelarProxyUpgradeDataRequest)(nil), "axelarcork.v1.QueryAxelarProxyUpgradeDataRequest") proto.RegisterType((*QueryAxelarProxyUpgradeDataResponse)(nil), "axelarcork.v1.QueryAxelarProxyUpgradeDataResponse") + proto.RegisterType((*QueryWinningAxelarCorkRequest)(nil), "axelarcork.v1.QueryWinningAxelarCorkRequest") + proto.RegisterType((*QueryWinningAxelarCorkResponse)(nil), "axelarcork.v1.QueryWinningAxelarCorkResponse") } func init() { proto.RegisterFile("axelarcork/v1/query.proto", fileDescriptor_7d10e4f1065c484f) } var fileDescriptor_7d10e4f1065c484f = []byte{ - // 1107 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x97, 0xdf, 0x6f, 0xdb, 0x54, - 0x14, 0xc7, 0xeb, 0xd2, 0x0d, 0x7a, 0xb2, 0x95, 0xea, 0xd0, 0xb1, 0xd5, 0x65, 0x69, 0xe3, 0xfe, - 0xa4, 0xa3, 0x71, 0x93, 0x6c, 0x74, 0x68, 0x12, 0xb0, 0xa4, 0x12, 0x04, 0xd0, 0x18, 0xa9, 0x10, - 0x68, 0x08, 0x59, 0x8e, 0x7d, 0x71, 0x4c, 0x1d, 0x3b, 0xb3, 0x9d, 0xd2, 0x68, 0xda, 0x03, 0x3c, - 0xf2, 0x84, 0x80, 0x67, 0xc4, 0xbf, 0x00, 0x12, 0x0f, 0x88, 0x27, 0xde, 0xf6, 0x38, 0x89, 0x17, - 0x9e, 0x10, 0x6a, 0xf7, 0x87, 0x20, 0x5f, 0x5f, 0xa7, 0xfe, 0x99, 0x38, 0xf4, 0xad, 0xbd, 0xe7, - 0x9c, 0xef, 0xf9, 0xdc, 0x9b, 0x9b, 0xf3, 0xbd, 0x81, 0x45, 0xf9, 0x98, 0x18, 0xb2, 0xad, 0x58, - 0xf6, 0xa1, 0x78, 0x54, 0x11, 0x1f, 0xf6, 0x89, 0x3d, 0x28, 0xf7, 0x6c, 0xcb, 0xb5, 0xf0, 0xf2, - 0x59, 0xa8, 0x7c, 0x54, 0xe1, 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7, 0xef, 0x49, 0x91, 0xfb, 0xee, 0xb4, 0x38, 0xf5, 0xf4, 0xb4, 0x38, 0xf5, 0xf7, - 0x69, 0x71, 0xea, 0x41, 0x55, 0xd3, 0xdd, 0x4e, 0xbf, 0x5d, 0x56, 0xac, 0xae, 0xd8, 0x23, 0x9a, - 0x36, 0xf8, 0xf2, 0x28, 0x24, 0x7c, 0xb4, 0x27, 0x1e, 0x87, 0xd5, 0xdd, 0x41, 0x8f, 0x38, 0xed, - 0x8b, 0xf4, 0xd7, 0x76, 0xed, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb9, 0xf1, 0xab, 0x27, 0x0a, - 0x10, 0x00, 0x00, + // 1197 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x98, 0xcf, 0x6f, 0xdc, 0x44, + 0x14, 0xc7, 0xe3, 0x90, 0x16, 0xf2, 0xd2, 0xa6, 0xe1, 0x91, 0xd2, 0xc6, 0xa1, 0x9b, 0xc4, 0xf9, + 0xd9, 0xb4, 0xbb, 0x4e, 0x36, 0x2d, 0x29, 0xaa, 0x04, 0x24, 0x1b, 0x09, 0x16, 0x50, 0x29, 0x8e, + 0x50, 0x51, 0x11, 0xb2, 0x1c, 0x7b, 0x70, 0x4c, 0xbc, 0xf6, 0xd6, 0xf6, 0xa6, 0x59, 0x55, 0x3d, + 0xc0, 0x91, 0x13, 0x02, 0xce, 0x9c, 0xf8, 0x07, 0x40, 0xe2, 0x80, 0x38, 0x71, 0xa2, 0xc7, 0x4a, + 0x5c, 0x38, 0x21, 0x94, 0xf4, 0x0f, 0x41, 0x1e, 0x8f, 0x37, 0xfe, 0xb9, 0xf6, 0xb6, 0xb7, 0xec, + 0xbc, 0x5f, 0x9f, 0x99, 0xbc, 0x79, 0xf3, 0xdd, 0x85, 0x29, 0xe5, 0x88, 0x98, 0x8a, 0xa3, 0xda, + 0xce, 0x81, 0x78,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52, 0x49, 0x18, + 0xd9, 0x3b, 0x00, 0x6a, 0x6f, 0x95, 0xcd, 0x86, 0x99, 0x04, 0x5e, 0x84, 0x2a, 0x08, 0x8e, 0x84, + 0x08, 0x37, 0x52, 0xb9, 0xcb, 0xb4, 0xe6, 0x17, 0x70, 0x39, 0x1d, 0xc5, 0x90, 0xb6, 0x60, 0xec, + 0x34, 0x7f, 0x78, 0x64, 0x85, 0x4c, 0xd1, 0x18, 0x61, 0x2e, 0x9c, 0x06, 0x7e, 0xb9, 0x86, 0x6d, + 0x7d, 0x69, 0xe8, 0x1d, 0x27, 0x98, 0xbc, 0xe1, 0x08, 0x6b, 0xc1, 0x6c, 0xbe, 0x0b, 0x23, 0x69, + 0xc2, 0xb8, 0x1a, 0xb3, 0x30, 0x98, 0xb9, 0xe4, 0x40, 0x4b, 0xe5, 0x90, 0x12, 0x81, 0xc2, 0x12, + 0x2c, 0xd0, 0x72, 0x21, 0xb7, 0xe5, 0x39, 0x8a, 0xea, 0x35, 0x14, 0xd3, 0xbc, 0x63, 0x5b, 0x2a, + 0xe9, 0x61, 0x7d, 0xcd, 0xc1, 0x62, 0x81, 0x23, 0x83, 0xfb, 0x0c, 0x26, 0x55, 0x66, 0x95, 0x55, + 0xc5, 0x34, 0x65, 0x8b, 0xda, 0x19, 0xe2, 0x52, 0xce, 0x79, 0x25, 0xd2, 0x49, 0xa8, 0xa6, 0x2a, + 0x08, 0x0b, 0x6c, 0x6e, 0x04, 0x31, 0x77, 0x1d, 0xfb, 0xa8, 0xfb, 0x69, 0x5b, 0x77, 0x14, 0x8d, + 0xec, 0x28, 0x9e, 0x12, 0x92, 0x76, 0x60, 0xbe, 0xaf, 0x17, 0xc3, 0xbc, 0x03, 0xd8, 0xf6, 0x6d, + 0x72, 0x27, 0x30, 0xca, 0x9a, 0xe2, 0x29, 0x0c, 0x72, 0x36, 0x13, 0x32, 0x9a, 0x65, 0xa2, 0x9d, + 0xc8, 0x2b, 0x10, 0xb8, 0x42, 0xcb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0x57, 0xcd, 0xf0, 0x62, 0x69, 0x7f, 0x06, 0x7b, 0x93, 0xc2, 0x8a, 0x58, 0xcd, 0x87, + 0xa5, 0x23, 0x2d, 0x2e, 0x63, 0xf0, 0x4f, 0x8e, 0x3d, 0xbf, 0x79, 0xf2, 0x04, 0x37, 0xb2, 0x48, + 0x0a, 0x54, 0x0f, 0x7f, 0x63, 0xb0, 0xa0, 0xf2, 0x7b, 0xc8, 0x10, 0x48, 0xf8, 0x3b, 0xc7, 0xbe, + 0xb0, 0x65, 0x2b, 0x17, 0x5c, 0xcf, 0x87, 0xc9, 0xd1, 0x42, 0x7c, 0x7d, 0x90, 0x10, 0x46, 0xbf, + 0x41, 0xe9, 0xab, 0x78, 0x2d, 0x97, 0x3e, 0xad, 0x9b, 0xf0, 0x67, 0x8e, 0x7d, 0x1f, 0x48, 0xe9, + 0x12, 0xbc, 0x9e, 0xc5, 0x90, 0xa7, 0x92, 0xf8, 0x6a, 0x49, 0xef, 0xd2, 0xbd, 0xfd, 0x30, 0x88, + 0xa5, 0x33, 0x61, 0xfb, 0xa3, 0x27, 0xc7, 0x15, 0xee, 0xe9, 0x71, 0x85, 0xfb, 0xef, 0xb8, 0xc2, + 0x7d, 0x77, 0x52, 0x19, 0x7a, 0x7a, 0x52, 0x19, 0xfa, 0xe7, 0xa4, 0x32, 0x74, 0xbf, 0xae, 0x1b, + 0xde, 0x7e, 0x67, 0xaf, 0xa6, 0xda, 0x2d, 0xb1, 0x4d, 0x74, 0xbd, 0xfb, 0xd5, 0x61, 0x24, 0xe5, + 0xe1, 0xa6, 0x78, 0x14, 0xcd, 0xeb, 0x75, 0xdb, 0xc4, 0xdd, 0x3b, 0x4b, 0x7f, 0xef, 0xd8, 0xf8, + 0x3f, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x13, 0x15, 0xa7, 0x8c, 0x11, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1222,6 +1333,7 @@ type QueryClient interface { QueryChainConfigurations(ctx context.Context, in *QueryChainConfigurationsRequest, opts ...grpc.CallOption) (*QueryChainConfigurationsResponse, error) QueryAxelarContractCallNonces(ctx context.Context, in *QueryAxelarContractCallNoncesRequest, opts ...grpc.CallOption) (*QueryAxelarContractCallNoncesResponse, error) QueryAxelarProxyUpgradeData(ctx context.Context, in *QueryAxelarProxyUpgradeDataRequest, opts ...grpc.CallOption) (*QueryAxelarProxyUpgradeDataResponse, error) + QueryWinningAxelarCork(ctx context.Context, in *QueryWinningAxelarCorkRequest, opts ...grpc.CallOption) (*QueryWinningAxelarCorkResponse, error) } type queryClient struct { @@ -1340,6 +1452,15 @@ func (c *queryClient) QueryAxelarProxyUpgradeData(ctx context.Context, in *Query return out, nil } +func (c *queryClient) QueryWinningAxelarCork(ctx context.Context, in *QueryWinningAxelarCorkRequest, opts ...grpc.CallOption) (*QueryWinningAxelarCorkResponse, error) { + out := new(QueryWinningAxelarCorkResponse) + err := c.cc.Invoke(ctx, "/axelarcork.v1.Query/QueryWinningAxelarCork", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // QueryParams queries the axelar cork module parameters. @@ -1361,6 +1482,7 @@ type QueryServer interface { QueryChainConfigurations(context.Context, *QueryChainConfigurationsRequest) (*QueryChainConfigurationsResponse, error) QueryAxelarContractCallNonces(context.Context, *QueryAxelarContractCallNoncesRequest) (*QueryAxelarContractCallNoncesResponse, error) QueryAxelarProxyUpgradeData(context.Context, *QueryAxelarProxyUpgradeDataRequest) (*QueryAxelarProxyUpgradeDataResponse, error) + QueryWinningAxelarCork(context.Context, *QueryWinningAxelarCorkRequest) (*QueryWinningAxelarCorkResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1403,6 +1525,9 @@ func (*UnimplementedQueryServer) QueryAxelarContractCallNonces(ctx context.Conte func (*UnimplementedQueryServer) QueryAxelarProxyUpgradeData(ctx context.Context, req *QueryAxelarProxyUpgradeDataRequest) (*QueryAxelarProxyUpgradeDataResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryAxelarProxyUpgradeData not implemented") } +func (*UnimplementedQueryServer) QueryWinningAxelarCork(ctx context.Context, req *QueryWinningAxelarCorkRequest) (*QueryWinningAxelarCorkResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryWinningAxelarCork not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1624,6 +1749,24 @@ func _Query_QueryAxelarProxyUpgradeData_Handler(srv interface{}, ctx context.Con return interceptor(ctx, in, info, handler) } +func _Query_QueryWinningAxelarCork_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryWinningAxelarCorkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryWinningAxelarCork(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/axelarcork.v1.Query/QueryWinningAxelarCork", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryWinningAxelarCork(ctx, req.(*QueryWinningAxelarCorkRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "axelarcork.v1.Query", HandlerType: (*QueryServer)(nil), @@ -1676,6 +1819,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "QueryAxelarProxyUpgradeData", Handler: _Query_QueryAxelarProxyUpgradeData_Handler, }, + { + MethodName: "QueryWinningAxelarCork", + Handler: _Query_QueryWinningAxelarCork_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "axelarcork/v1/query.proto", @@ -2448,6 +2595,81 @@ func (m *QueryAxelarProxyUpgradeDataResponse) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } +func (m *QueryWinningAxelarCorkRequest) 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 *QueryWinningAxelarCorkRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryWinningAxelarCorkRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x12 + } + if m.ChainId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ChainId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryWinningAxelarCorkResponse) 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 *QueryWinningAxelarCorkResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryWinningAxelarCorkResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x10 + } + if m.Cork != nil { + { + size, err := m.Cork.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -2774,6 +2996,38 @@ func (m *QueryAxelarProxyUpgradeDataResponse) Size() (n int) { return n } +func (m *QueryWinningAxelarCorkRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ChainId != 0 { + n += 1 + sovQuery(uint64(m.ChainId)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryWinningAxelarCorkResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Cork != nil { + l = m.Cork.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.BlockHeight != 0 { + n += 1 + sovQuery(uint64(m.BlockHeight)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -4645,6 +4899,212 @@ func (m *QueryAxelarProxyUpgradeDataResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryWinningAxelarCorkRequest) 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 ErrIntOverflowQuery + } + 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: QueryWinningAxelarCorkRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryWinningAxelarCorkRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + m.ChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryWinningAxelarCorkResponse) 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 ErrIntOverflowQuery + } + 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: QueryWinningAxelarCorkResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryWinningAxelarCorkResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cork", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Cork == nil { + m.Cork = &AxelarCork{} + } + if err := m.Cork.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/axelarcork/types/query.pb.gw.go b/x/axelarcork/types/query.pb.gw.go index bf20b023c..86228cbd1 100644 --- a/x/axelarcork/types/query.pb.gw.go +++ b/x/axelarcork/types/query.pb.gw.go @@ -483,6 +483,42 @@ func local_request_Query_QueryAxelarProxyUpgradeData_0(ctx context.Context, mars } +var ( + filter_Query_QueryWinningAxelarCork_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_QueryWinningAxelarCork_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryWinningAxelarCorkRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_QueryWinningAxelarCork_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QueryWinningAxelarCork(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QueryWinningAxelarCork_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryWinningAxelarCorkRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_QueryWinningAxelarCork_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QueryWinningAxelarCork(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -765,6 +801,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_QueryWinningAxelarCork_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_QueryWinningAxelarCork_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryWinningAxelarCork_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1046,6 +1105,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_QueryWinningAxelarCork_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_QueryWinningAxelarCork_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryWinningAxelarCork_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1073,6 +1152,8 @@ var ( pattern_Query_QueryAxelarContractCallNonces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "axelarcork", "v1", "contract_call_nonces"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_QueryAxelarProxyUpgradeData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "axelarcork", "v1", "proxy_upgrade_data"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_QueryWinningAxelarCork_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "axelarcork", "v1", "winning_cork"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1099,4 +1180,6 @@ var ( forward_Query_QueryAxelarContractCallNonces_0 = runtime.ForwardResponseMessage forward_Query_QueryAxelarProxyUpgradeData_0 = runtime.ForwardResponseMessage + + forward_Query_QueryWinningAxelarCork_0 = runtime.ForwardResponseMessage ) From 443a305533bfb22c30e8fcaf60d13d65fda3bbeb Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Mon, 29 Jan 2024 00:30:42 -0800 Subject: [PATCH 10/32] check addr bytes rather than using == (#265) --- x/axelarcork/keeper/keeper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/axelarcork/keeper/keeper.go b/x/axelarcork/keeper/keeper.go index 29370f075..e39861f8e 100644 --- a/x/axelarcork/keeper/keeper.go +++ b/x/axelarcork/keeper/keeper.go @@ -236,7 +236,7 @@ func (k Keeper) GetWinningAxelarCork(ctx sdk.Context, chainID uint64, contractAd var c types.AxelarCork found := false k.IterateWinningAxelarCorks(ctx, chainID, func(contract common.Address, blockHeight uint64, cork types.AxelarCork) (stop bool) { - if contractAddr == contract { + if bytes.Equal(contractAddr.Bytes(), contract.Bytes()) { bh = blockHeight c = cork found = true From b97ec49ef725dccee56728e3a896f4395d0532d2 Mon Sep 17 00:00:00 2001 From: Collin Date: Mon, 29 Jan 2024 02:55:12 -0600 Subject: [PATCH 11/32] add query for all winningc orks (#266) --- docs/core/proto-docs.md | 52 ++- proto/axelarcork/v1/axelarcork.proto | 6 + proto/axelarcork/v1/query.proto | 14 +- x/axelarcork/keeper/query_server.go | 23 ++ x/axelarcork/types/axelarcork.pb.go | 312 +++++++++++++--- x/axelarcork/types/query.pb.go | 528 +++++++++++++++++++++++---- x/axelarcork/types/query.pb.gw.go | 167 ++++++++- 7 files changed, 963 insertions(+), 139 deletions(-) diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 7c992b655..156c31346 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -57,6 +57,7 @@ - [ChainConfigurations](#axelarcork.v1.ChainConfigurations) - [ScheduledAxelarCork](#axelarcork.v1.ScheduledAxelarCork) - [ScheduledAxelarCorks](#axelarcork.v1.ScheduledAxelarCorks) + - [WinningAxelarCork](#axelarcork.v1.WinningAxelarCork) - [axelarcork/v1/event.proto](#axelarcork/v1/event.proto) - [ScheduleCorkEvent](#axelarcork.v1.ScheduleCorkEvent) @@ -110,6 +111,8 @@ - [QueryScheduledCorksResponse](#axelarcork.v1.QueryScheduledCorksResponse) - [QueryWinningAxelarCorkRequest](#axelarcork.v1.QueryWinningAxelarCorkRequest) - [QueryWinningAxelarCorkResponse](#axelarcork.v1.QueryWinningAxelarCorkResponse) + - [QueryWinningAxelarCorksRequest](#axelarcork.v1.QueryWinningAxelarCorksRequest) + - [QueryWinningAxelarCorksResponse](#axelarcork.v1.QueryWinningAxelarCorksResponse) - [Query](#axelarcork.v1.Query) @@ -1022,6 +1025,22 @@ execution in case of an error. + + + +### WinningAxelarCork +Represents a cork that has received enough votes to be executed + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `cork` | [AxelarCork](#axelarcork.v1.AxelarCork) | | | +| `block_height` | [uint64](#uint64) | | | + + + + + @@ -1824,6 +1843,36 @@ QueryScheduledCorksResponse + + + +### QueryWinningAxelarCorksRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `chain_id` | [uint64](#uint64) | | | + + + + + + + + +### QueryWinningAxelarCorksResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `winning_axelar_corks` | [WinningAxelarCork](#axelarcork.v1.WinningAxelarCork) | repeated | | + + + + + @@ -1850,7 +1899,8 @@ Query defines the gRPC query service for the cork module. | `QueryChainConfigurations` | [QueryChainConfigurationsRequest](#axelarcork.v1.QueryChainConfigurationsRequest) | [QueryChainConfigurationsResponse](#axelarcork.v1.QueryChainConfigurationsResponse) | | GET|/sommelier/axelarcork/v1/chain_configurations| | `QueryAxelarContractCallNonces` | [QueryAxelarContractCallNoncesRequest](#axelarcork.v1.QueryAxelarContractCallNoncesRequest) | [QueryAxelarContractCallNoncesResponse](#axelarcork.v1.QueryAxelarContractCallNoncesResponse) | | GET|/sommelier/axelarcork/v1/contract_call_nonces| | `QueryAxelarProxyUpgradeData` | [QueryAxelarProxyUpgradeDataRequest](#axelarcork.v1.QueryAxelarProxyUpgradeDataRequest) | [QueryAxelarProxyUpgradeDataResponse](#axelarcork.v1.QueryAxelarProxyUpgradeDataResponse) | | GET|/sommelier/axelarcork/v1/proxy_upgrade_data| -| `QueryWinningAxelarCork` | [QueryWinningAxelarCorkRequest](#axelarcork.v1.QueryWinningAxelarCorkRequest) | [QueryWinningAxelarCorkResponse](#axelarcork.v1.QueryWinningAxelarCorkResponse) | | GET|/sommelier/axelarcork/v1/winning_cork| +| `QueryWinningAxelarCork` | [QueryWinningAxelarCorkRequest](#axelarcork.v1.QueryWinningAxelarCorkRequest) | [QueryWinningAxelarCorkResponse](#axelarcork.v1.QueryWinningAxelarCorkResponse) | | GET|/sommelier/axelarcork/v1/winning_axelar_corks/{chain_id}/{contract_address}| +| `QueryWinningAxelarCorks` | [QueryWinningAxelarCorksRequest](#axelarcork.v1.QueryWinningAxelarCorksRequest) | [QueryWinningAxelarCorksResponse](#axelarcork.v1.QueryWinningAxelarCorksResponse) | | GET|/sommelier/axelarcork/v1/winning_axelar_corks/{chain_id}| diff --git a/proto/axelarcork/v1/axelarcork.proto b/proto/axelarcork/v1/axelarcork.proto index da9370280..25892bf71 100644 --- a/proto/axelarcork/v1/axelarcork.proto +++ b/proto/axelarcork/v1/axelarcork.proto @@ -75,3 +75,9 @@ message AxelarUpgradeData { int64 executable_height_threshold = 3; } +// Represents a cork that has received enough votes to be executed +message WinningAxelarCork { + AxelarCork cork = 1; + uint64 block_height = 2; +} + diff --git a/proto/axelarcork/v1/query.proto b/proto/axelarcork/v1/query.proto index e48039f9d..1bb5fe36e 100644 --- a/proto/axelarcork/v1/query.proto +++ b/proto/axelarcork/v1/query.proto @@ -63,7 +63,11 @@ service Query { } rpc QueryWinningAxelarCork(QueryWinningAxelarCorkRequest) returns (QueryWinningAxelarCorkResponse) { - option (google.api.http).get = "/sommelier/axelarcork/v1/winning_cork"; + option (google.api.http).get = "/sommelier/axelarcork/v1/winning_axelar_corks/{chain_id}/{contract_address}"; + } + + rpc QueryWinningAxelarCorks(QueryWinningAxelarCorksRequest) returns (QueryWinningAxelarCorksResponse) { + option (google.api.http).get = "/sommelier/axelarcork/v1/winning_axelar_corks/{chain_id}"; } } @@ -181,3 +185,11 @@ message QueryWinningAxelarCorkResponse { uint64 block_height = 2; } +message QueryWinningAxelarCorksRequest { + uint64 chain_id = 1; +} + +message QueryWinningAxelarCorksResponse { + repeated WinningAxelarCork winning_axelar_corks = 1; +} + diff --git a/x/axelarcork/keeper/query_server.go b/x/axelarcork/keeper/query_server.go index 7687235d6..469d4dac2 100644 --- a/x/axelarcork/keeper/query_server.go +++ b/x/axelarcork/keeper/query_server.go @@ -268,3 +268,26 @@ func (k Keeper) QueryWinningAxelarCork(c context.Context, req *types.QueryWinnin return &response, nil } + +func (k Keeper) QueryWinningAxelarCorks(c context.Context, req *types.QueryWinningAxelarCorksRequest) (*types.QueryWinningAxelarCorksResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(c) + + response := types.QueryWinningAxelarCorksResponse{} + + winning := []*types.WinningAxelarCork{} + k.IterateWinningAxelarCorks(ctx, req.ChainId, func(contract common.Address, blockHeight uint64, cork types.AxelarCork) (stop bool) { + winning = append(winning, &types.WinningAxelarCork{ + Cork: &cork, + BlockHeight: blockHeight, + }) + return false + }) + + response.WinningAxelarCorks = winning + + return &response, nil +} diff --git a/x/axelarcork/types/axelarcork.pb.go b/x/axelarcork/types/axelarcork.pb.go index 55240db6e..ef506c3d1 100644 --- a/x/axelarcork/types/axelarcork.pb.go +++ b/x/axelarcork/types/axelarcork.pb.go @@ -612,6 +612,59 @@ func (m *AxelarUpgradeData) GetExecutableHeightThreshold() int64 { return 0 } +// Represents a cork that has received enough votes to be executed +type WinningAxelarCork struct { + Cork *AxelarCork `protobuf:"bytes,1,opt,name=cork,proto3" json:"cork,omitempty"` + BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` +} + +func (m *WinningAxelarCork) Reset() { *m = WinningAxelarCork{} } +func (m *WinningAxelarCork) String() string { return proto.CompactTextString(m) } +func (*WinningAxelarCork) ProtoMessage() {} +func (*WinningAxelarCork) Descriptor() ([]byte, []int) { + return fileDescriptor_f8790c2a041a4f43, []int{10} +} +func (m *WinningAxelarCork) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WinningAxelarCork) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WinningAxelarCork.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 *WinningAxelarCork) XXX_Merge(src proto.Message) { + xxx_messageInfo_WinningAxelarCork.Merge(m, src) +} +func (m *WinningAxelarCork) XXX_Size() int { + return m.Size() +} +func (m *WinningAxelarCork) XXX_DiscardUnknown() { + xxx_messageInfo_WinningAxelarCork.DiscardUnknown(m) +} + +var xxx_messageInfo_WinningAxelarCork proto.InternalMessageInfo + +func (m *WinningAxelarCork) GetCork() *AxelarCork { + if m != nil { + return m.Cork + } + return nil +} + +func (m *WinningAxelarCork) GetBlockHeight() uint64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + func init() { proto.RegisterType((*AxelarCork)(nil), "axelarcork.v1.AxelarCork") proto.RegisterType((*ScheduledAxelarCork)(nil), "axelarcork.v1.ScheduledAxelarCork") @@ -623,59 +676,61 @@ func init() { proto.RegisterType((*ChainConfigurations)(nil), "axelarcork.v1.ChainConfigurations") proto.RegisterType((*AxelarContractCallNonce)(nil), "axelarcork.v1.AxelarContractCallNonce") proto.RegisterType((*AxelarUpgradeData)(nil), "axelarcork.v1.AxelarUpgradeData") + proto.RegisterType((*WinningAxelarCork)(nil), "axelarcork.v1.WinningAxelarCork") } func init() { proto.RegisterFile("axelarcork/v1/axelarcork.proto", fileDescriptor_f8790c2a041a4f43) } var fileDescriptor_f8790c2a041a4f43 = []byte{ - // 752 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcd, 0x6e, 0xe4, 0x44, - 0x10, 0x8e, 0x67, 0x06, 0x36, 0x53, 0x33, 0x9b, 0x0d, 0x9d, 0xac, 0xd6, 0x09, 0xc8, 0x99, 0x35, - 0x97, 0xe1, 0xb0, 0x36, 0x09, 0x12, 0x48, 0x1c, 0x90, 0x36, 0xb3, 0x42, 0x44, 0x20, 0x84, 0xbc, - 0x20, 0x24, 0x2e, 0xa6, 0xa7, 0xbb, 0xd6, 0xd3, 0xa4, 0xc7, 0x6d, 0x75, 0xf7, 0x8c, 0x32, 0x6f, - 0xc0, 0x91, 0x0b, 0x2f, 0xc1, 0x05, 0xf1, 0x16, 0x2b, 0x71, 0xd9, 0x23, 0x27, 0x40, 0xc9, 0x8b, - 0x20, 0xb7, 0xed, 0xf9, 0xcb, 0x92, 0xdb, 0x9e, 0xdc, 0x55, 0x5f, 0x55, 0xf9, 0xeb, 0xaf, 0xaa, - 0x1a, 0x02, 0x7a, 0x85, 0x92, 0x6a, 0xa6, 0xf4, 0x65, 0x3c, 0x3f, 0x8d, 0x57, 0x56, 0x54, 0x68, - 0x65, 0x15, 0xb9, 0xbf, 0xe6, 0x99, 0x9f, 0x1e, 0x1f, 0x66, 0x2a, 0x53, 0x0e, 0x89, 0xcb, 0x53, - 0x15, 0x74, 0x1c, 0x30, 0x65, 0xa6, 0xca, 0xc4, 0x63, 0x6a, 0x30, 0x9e, 0x9f, 0x8e, 0xd1, 0xd2, - 0xd3, 0x98, 0x29, 0x91, 0x57, 0x78, 0xf8, 0xbb, 0x07, 0xf0, 0xd4, 0xd5, 0x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x26, 0xd8, 0xf9, 0xeb, 0x26, - 0xd8, 0xf9, 0xe1, 0x6c, 0xad, 0x67, 0x05, 0x66, 0xd9, 0xe2, 0xa7, 0x79, 0x6c, 0xd4, 0x74, 0x8a, - 0x52, 0xa0, 0x8e, 0xe7, 0x9f, 0xc4, 0x57, 0x6b, 0x8f, 0x77, 0xd5, 0xc3, 0xf1, 0xdb, 0xee, 0xf9, - 0xfd, 0xe8, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x18, 0x87, 0x4c, 0x2b, 0xe5, 0x05, 0x00, 0x00, + // 765 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xda, 0x86, 0xc6, 0xcf, 0x6e, 0x9a, 0x4e, 0x52, 0x75, 0x13, 0xd0, 0xc6, 0x5d, 0x2e, + 0xe6, 0xd0, 0x5d, 0x12, 0x24, 0x90, 0x38, 0x20, 0x35, 0xae, 0x10, 0x11, 0x08, 0xa1, 0x2d, 0xa8, + 0x12, 0x97, 0x65, 0x3c, 0xf3, 0xba, 0x1e, 0x32, 0xde, 0x59, 0xcd, 0x8c, 0xad, 0xf8, 0x1b, 0x70, + 0xe4, 0xc2, 0x97, 0xe0, 0x82, 0xf8, 0x16, 0x95, 0xb8, 0xf4, 0xc8, 0x09, 0x50, 0xf2, 0x45, 0xd0, + 0xce, 0xee, 0xfa, 0x5f, 0x4a, 0x6f, 0x3d, 0x79, 0xde, 0xfb, 0xbd, 0xf7, 0xf6, 0x37, 0xbf, 0xfd, + 0xbd, 0x35, 0x04, 0xf4, 0x0a, 0x25, 0xd5, 0x4c, 0xe9, 0xcb, 0x78, 0x7e, 0x1a, 0xaf, 0xa2, 0xa8, + 0xd0, 0xca, 0x2a, 0x72, 0x77, 0x2d, 0x33, 0x3f, 0x3d, 0x3e, 0xcc, 0x54, 0xa6, 0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28, 0x59, 0xd9, 0xbc, + 0x9d, 0x1c, 0xad, 0x4a, 0xaa, 0x55, 0xf8, 0xae, 0x29, 0x08, 0x11, 0xee, 0x3f, 0x17, 0x79, 0x2e, + 0xf2, 0xec, 0x6d, 0x7e, 0x74, 0xce, 0xbf, 0x7e, 0x79, 0x1d, 0x78, 0xaf, 0xae, 0x03, 0xef, 0xdf, + 0xeb, 0xc0, 0xfb, 0xe5, 0x26, 0xd8, 0x79, 0x75, 0x13, 0xec, 0xfc, 0x75, 0x13, 0xec, 0xfc, 0x70, + 0xb6, 0x66, 0x8d, 0x02, 0xb3, 0x6c, 0xf1, 0xd3, 0x3c, 0x36, 0x6a, 0x3a, 0x45, 0x29, 0x50, 0xc7, + 0xf3, 0x4f, 0xe3, 0xab, 0xb5, 0xff, 0x88, 0xca, 0x2a, 0xe3, 0x77, 0xdd, 0x57, 0xfe, 0xe3, 0xff, + 0x02, 0x00, 0x00, 0xff, 0xff, 0xd0, 0x69, 0xa9, 0x35, 0x4c, 0x06, 0x00, 0x00, } func (m *AxelarCork) Marshal() (dAtA []byte, err error) { @@ -1120,6 +1175,46 @@ func (m *AxelarUpgradeData) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *WinningAxelarCork) 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 *WinningAxelarCork) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WinningAxelarCork) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockHeight != 0 { + i = encodeVarintAxelarcork(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x10 + } + if m.Cork != nil { + { + size, err := m.Cork.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAxelarcork(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintAxelarcork(dAtA []byte, offset int, v uint64) int { offset -= sovAxelarcork(v) base := offset @@ -1328,6 +1423,22 @@ func (m *AxelarUpgradeData) Size() (n int) { return n } +func (m *WinningAxelarCork) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Cork != nil { + l = m.Cork.Size() + n += 1 + l + sovAxelarcork(uint64(l)) + } + if m.BlockHeight != 0 { + n += 1 + sovAxelarcork(uint64(m.BlockHeight)) + } + return n +} + func sovAxelarcork(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2576,6 +2687,111 @@ func (m *AxelarUpgradeData) Unmarshal(dAtA []byte) error { } return nil } +func (m *WinningAxelarCork) 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 ErrIntOverflowAxelarcork + } + 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: WinningAxelarCork: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WinningAxelarCork: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cork", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAxelarcork + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAxelarcork + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAxelarcork + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Cork == nil { + m.Cork = &AxelarCork{} + } + if err := m.Cork.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAxelarcork + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipAxelarcork(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAxelarcork + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipAxelarcork(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/axelarcork/types/query.pb.go b/x/axelarcork/types/query.pb.go index 251ffb146..d1791eada 100644 --- a/x/axelarcork/types/query.pb.go +++ b/x/axelarcork/types/query.pb.go @@ -1192,6 +1192,94 @@ func (m *QueryWinningAxelarCorkResponse) GetBlockHeight() uint64 { return 0 } +type QueryWinningAxelarCorksRequest struct { + ChainId uint64 `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` +} + +func (m *QueryWinningAxelarCorksRequest) Reset() { *m = QueryWinningAxelarCorksRequest{} } +func (m *QueryWinningAxelarCorksRequest) String() string { return proto.CompactTextString(m) } +func (*QueryWinningAxelarCorksRequest) ProtoMessage() {} +func (*QueryWinningAxelarCorksRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7d10e4f1065c484f, []int{26} +} +func (m *QueryWinningAxelarCorksRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryWinningAxelarCorksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryWinningAxelarCorksRequest.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 *QueryWinningAxelarCorksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryWinningAxelarCorksRequest.Merge(m, src) +} +func (m *QueryWinningAxelarCorksRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryWinningAxelarCorksRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryWinningAxelarCorksRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryWinningAxelarCorksRequest proto.InternalMessageInfo + +func (m *QueryWinningAxelarCorksRequest) GetChainId() uint64 { + if m != nil { + return m.ChainId + } + return 0 +} + +type QueryWinningAxelarCorksResponse struct { + WinningAxelarCorks []*WinningAxelarCork `protobuf:"bytes,1,rep,name=winning_axelar_corks,json=winningAxelarCorks,proto3" json:"winning_axelar_corks,omitempty"` +} + +func (m *QueryWinningAxelarCorksResponse) Reset() { *m = QueryWinningAxelarCorksResponse{} } +func (m *QueryWinningAxelarCorksResponse) String() string { return proto.CompactTextString(m) } +func (*QueryWinningAxelarCorksResponse) ProtoMessage() {} +func (*QueryWinningAxelarCorksResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7d10e4f1065c484f, []int{27} +} +func (m *QueryWinningAxelarCorksResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryWinningAxelarCorksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryWinningAxelarCorksResponse.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 *QueryWinningAxelarCorksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryWinningAxelarCorksResponse.Merge(m, src) +} +func (m *QueryWinningAxelarCorksResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryWinningAxelarCorksResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryWinningAxelarCorksResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryWinningAxelarCorksResponse proto.InternalMessageInfo + +func (m *QueryWinningAxelarCorksResponse) GetWinningAxelarCorks() []*WinningAxelarCork { + if m != nil { + return m.WinningAxelarCorks + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "axelarcork.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "axelarcork.v1.QueryParamsResponse") @@ -1219,87 +1307,94 @@ func init() { proto.RegisterType((*QueryAxelarProxyUpgradeDataResponse)(nil), "axelarcork.v1.QueryAxelarProxyUpgradeDataResponse") proto.RegisterType((*QueryWinningAxelarCorkRequest)(nil), "axelarcork.v1.QueryWinningAxelarCorkRequest") proto.RegisterType((*QueryWinningAxelarCorkResponse)(nil), "axelarcork.v1.QueryWinningAxelarCorkResponse") + proto.RegisterType((*QueryWinningAxelarCorksRequest)(nil), "axelarcork.v1.QueryWinningAxelarCorksRequest") + proto.RegisterType((*QueryWinningAxelarCorksResponse)(nil), "axelarcork.v1.QueryWinningAxelarCorksResponse") } func init() { proto.RegisterFile("axelarcork/v1/query.proto", fileDescriptor_7d10e4f1065c484f) } var fileDescriptor_7d10e4f1065c484f = []byte{ - // 1197 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x98, 0xcf, 0x6f, 0xdc, 0x44, - 0x14, 0xc7, 0xe3, 0x90, 0x16, 0xf2, 0xd2, 0xa6, 0xe1, 0x91, 0xd2, 0xc6, 0xa1, 0x9b, 0xc4, 0xf9, - 0xd9, 0xb4, 0xbb, 0x4e, 0x36, 0x2d, 0x29,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b, 0xef, 0xb8, 0xc2, - 0x7d, 0x77, 0x52, 0x19, 0x7a, 0x7a, 0x52, 0x19, 0xfa, 0xe7, 0xa4, 0x32, 0x74, 0xbf, 0xae, 0x1b, - 0xde, 0x7e, 0x67, 0xaf, 0xa6, 0xda, 0x2d, 0xb1, 0x4d, 0x74, 0xbd, 0xfb, 0xd5, 0x61, 0x24, 0xe5, - 0xe1, 0xa6, 0x78, 0x14, 0xcd, 0xeb, 0x75, 0xdb, 0xc4, 0xdd, 0x3b, 0x4b, 0x7f, 0xef, 0xd8, 0xf8, - 0x3f, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x13, 0x15, 0xa7, 0x8c, 0x11, 0x00, 0x00, + // 1270 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x98, 0x4d, 0x6f, 0xdc, 0x54, + 0x17, 0xc7, 0xe3, 0x3c, 0x69, 0x1f, 0x72, 0xd3, 0xa6, 0xd1, 0x69, 0x4a, 0x1b, 0x87, 0x4e, 0x12, + 0xe7, 0xb5, 0x69, 0x67, 0x9c, 0x4c, 0x5a, 0x12, 0xa8, 0x04, 0x4d, 0x26, 0x12, 0x0c, 0x85, 0x52, + 0x1c, 0xa1, 0xa2, 0x22, 0x64, 0x39, 0xf6, 0xc5, 0x31, 0x71, 0xec, 0xa9, 0xed, 0x49, 0x32, 0x8a, + 0xb2, 0x80, 0x25, 0x2b, 0x04, 0xac, 0xf9, 0x00, 0xec, 0x40, 0x62, 0x01, 0xac, 0xd8, 0x55, 0xac, + 0x2a, 0xb1, 0x61, 0x85, 0x50, 0xd2, 0x0f, 0x82, 0x7c, 0x7d, 0x3c, 0xf1, 0xeb, 0x8c, 0xa7, 0xdd, + 0x65, 0xee, 0x79, 0xfb, 0x9d, 0x3b, 0xc7, 0xc7, 0xff, 0x09, 0x19, 0x53, 0x0e, 0xa9, 0xa9, 0x38, + 0xaa, 0xed, 0xec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x7f, 0x4f, 0x4a, 0xdc, 0x37, 0xa7, 0xa5, 0xbe, 0x67, 0xa7, 0xa5, + 0xbe, 0xbf, 0x4f, 0x4b, 0x7d, 0x8f, 0xab, 0xba, 0xe1, 0xed, 0x34, 0xb7, 0x2b, 0xaa, 0xbd, 0x27, + 0x36, 0xa8, 0xae, 0xb7, 0xbe, 0xd8, 0x8f, 0x54, 0xd9, 0x5f, 0x15, 0x0f, 0xa3, 0xa5, 0xbc, 0x56, + 0x83, 0xba, 0xdb, 0xe7, 0xd9, 0xbf, 0xa1, 0x56, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xdc, 0xe2, + 0x5d, 0x80, 0x23, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1334,6 +1429,7 @@ type QueryClient interface { QueryAxelarContractCallNonces(ctx context.Context, in *QueryAxelarContractCallNoncesRequest, opts ...grpc.CallOption) (*QueryAxelarContractCallNoncesResponse, error) QueryAxelarProxyUpgradeData(ctx context.Context, in *QueryAxelarProxyUpgradeDataRequest, opts ...grpc.CallOption) (*QueryAxelarProxyUpgradeDataResponse, error) QueryWinningAxelarCork(ctx context.Context, in *QueryWinningAxelarCorkRequest, opts ...grpc.CallOption) (*QueryWinningAxelarCorkResponse, error) + QueryWinningAxelarCorks(ctx context.Context, in *QueryWinningAxelarCorksRequest, opts ...grpc.CallOption) (*QueryWinningAxelarCorksResponse, error) } type queryClient struct { @@ -1461,6 +1557,15 @@ func (c *queryClient) QueryWinningAxelarCork(ctx context.Context, in *QueryWinni return out, nil } +func (c *queryClient) QueryWinningAxelarCorks(ctx context.Context, in *QueryWinningAxelarCorksRequest, opts ...grpc.CallOption) (*QueryWinningAxelarCorksResponse, error) { + out := new(QueryWinningAxelarCorksResponse) + err := c.cc.Invoke(ctx, "/axelarcork.v1.Query/QueryWinningAxelarCorks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // QueryParams queries the axelar cork module parameters. @@ -1483,6 +1588,7 @@ type QueryServer interface { QueryAxelarContractCallNonces(context.Context, *QueryAxelarContractCallNoncesRequest) (*QueryAxelarContractCallNoncesResponse, error) QueryAxelarProxyUpgradeData(context.Context, *QueryAxelarProxyUpgradeDataRequest) (*QueryAxelarProxyUpgradeDataResponse, error) QueryWinningAxelarCork(context.Context, *QueryWinningAxelarCorkRequest) (*QueryWinningAxelarCorkResponse, error) + QueryWinningAxelarCorks(context.Context, *QueryWinningAxelarCorksRequest) (*QueryWinningAxelarCorksResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1528,6 +1634,9 @@ func (*UnimplementedQueryServer) QueryAxelarProxyUpgradeData(ctx context.Context func (*UnimplementedQueryServer) QueryWinningAxelarCork(ctx context.Context, req *QueryWinningAxelarCorkRequest) (*QueryWinningAxelarCorkResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryWinningAxelarCork not implemented") } +func (*UnimplementedQueryServer) QueryWinningAxelarCorks(ctx context.Context, req *QueryWinningAxelarCorksRequest) (*QueryWinningAxelarCorksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryWinningAxelarCorks not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1767,6 +1876,24 @@ func _Query_QueryWinningAxelarCork_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Query_QueryWinningAxelarCorks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryWinningAxelarCorksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryWinningAxelarCorks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/axelarcork.v1.Query/QueryWinningAxelarCorks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryWinningAxelarCorks(ctx, req.(*QueryWinningAxelarCorksRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "axelarcork.v1.Query", HandlerType: (*QueryServer)(nil), @@ -1823,6 +1950,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "QueryWinningAxelarCork", Handler: _Query_QueryWinningAxelarCork_Handler, }, + { + MethodName: "QueryWinningAxelarCorks", + Handler: _Query_QueryWinningAxelarCorks_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "axelarcork/v1/query.proto", @@ -2670,6 +2801,71 @@ func (m *QueryWinningAxelarCorkResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } +func (m *QueryWinningAxelarCorksRequest) 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 *QueryWinningAxelarCorksRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryWinningAxelarCorksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ChainId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ChainId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryWinningAxelarCorksResponse) 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 *QueryWinningAxelarCorksResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryWinningAxelarCorksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.WinningAxelarCorks) > 0 { + for iNdEx := len(m.WinningAxelarCorks) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.WinningAxelarCorks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -3028,6 +3224,33 @@ func (m *QueryWinningAxelarCorkResponse) Size() (n int) { return n } +func (m *QueryWinningAxelarCorksRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ChainId != 0 { + n += 1 + sovQuery(uint64(m.ChainId)) + } + return n +} + +func (m *QueryWinningAxelarCorksResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.WinningAxelarCorks) > 0 { + for _, e := range m.WinningAxelarCorks { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -5105,6 +5328,159 @@ func (m *QueryWinningAxelarCorkResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryWinningAxelarCorksRequest) 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 ErrIntOverflowQuery + } + 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: QueryWinningAxelarCorksRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryWinningAxelarCorksRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + m.ChainId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ChainId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryWinningAxelarCorksResponse) 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 ErrIntOverflowQuery + } + 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: QueryWinningAxelarCorksResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryWinningAxelarCorksResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WinningAxelarCorks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WinningAxelarCorks = append(m.WinningAxelarCorks, &WinningAxelarCork{}) + if err := m.WinningAxelarCorks[len(m.WinningAxelarCorks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/axelarcork/types/query.pb.gw.go b/x/axelarcork/types/query.pb.gw.go index 86228cbd1..018cce7d9 100644 --- a/x/axelarcork/types/query.pb.gw.go +++ b/x/axelarcork/types/query.pb.gw.go @@ -483,19 +483,37 @@ func local_request_Query_QueryAxelarProxyUpgradeData_0(ctx context.Context, mars } -var ( - filter_Query_QueryWinningAxelarCork_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - func request_Query_QueryWinningAxelarCork_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryWinningAxelarCorkRequest var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["chain_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_QueryWinningAxelarCork_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + + protoReq.ChainId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) + } + + val, ok = pathParams["contract_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "contract_address") + } + + protoReq.ContractAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "contract_address", err) } msg, err := client.QueryWinningAxelarCork(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -507,11 +525,33 @@ func local_request_Query_QueryWinningAxelarCork_0(ctx context.Context, marshaler var protoReq QueryWinningAxelarCorkRequest var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["chain_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_QueryWinningAxelarCork_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + + protoReq.ChainId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) + } + + val, ok = pathParams["contract_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "contract_address") + } + + protoReq.ContractAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "contract_address", err) } msg, err := server.QueryWinningAxelarCork(ctx, &protoReq) @@ -519,6 +559,60 @@ func local_request_Query_QueryWinningAxelarCork_0(ctx context.Context, marshaler } +func request_Query_QueryWinningAxelarCorks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryWinningAxelarCorksRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["chain_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") + } + + protoReq.ChainId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) + } + + msg, err := client.QueryWinningAxelarCorks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QueryWinningAxelarCorks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryWinningAxelarCorksRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["chain_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") + } + + protoReq.ChainId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) + } + + msg, err := server.QueryWinningAxelarCorks(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -824,6 +918,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_QueryWinningAxelarCorks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_QueryWinningAxelarCorks_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryWinningAxelarCorks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1125,6 +1242,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_QueryWinningAxelarCorks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_QueryWinningAxelarCorks_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryWinningAxelarCorks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1153,7 +1290,9 @@ var ( pattern_Query_QueryAxelarProxyUpgradeData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "axelarcork", "v1", "proxy_upgrade_data"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_QueryWinningAxelarCork_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "axelarcork", "v1", "winning_cork"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_QueryWinningAxelarCork_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"sommelier", "axelarcork", "v1", "winning_axelar_corks", "chain_id", "contract_address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_QueryWinningAxelarCorks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sommelier", "axelarcork", "v1", "winning_axelar_corks", "chain_id"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1182,4 +1321,6 @@ var ( forward_Query_QueryAxelarProxyUpgradeData_0 = runtime.ForwardResponseMessage forward_Query_QueryWinningAxelarCork_0 = runtime.ForwardResponseMessage + + forward_Query_QueryWinningAxelarCorks_0 = runtime.ForwardResponseMessage ) From ec89ddcb878dd65e13748a2b78a8746ad11f8336 Mon Sep 17 00:00:00 2001 From: Collin Date: Mon, 29 Jan 2024 03:01:28 -0600 Subject: [PATCH 12/32] add cli command for winning corks (#268) * add cli command for winning corks * exact args * a word --- x/axelarcork/client/cli/query.go | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/x/axelarcork/client/cli/query.go b/x/axelarcork/client/cli/query.go index 01e6165ba..94e8781f9 100644 --- a/x/axelarcork/client/cli/query.go +++ b/x/axelarcork/client/cli/query.go @@ -35,6 +35,7 @@ func GetQueryCmd() *cobra.Command { queryAxelarContractCallNonces(), queryAxelayProxyUpgradeData(), queryWinningAxelarCork(), + queryWinningAxelarCorks(), }...) return corkQueryCmd @@ -501,3 +502,40 @@ func queryWinningAxelarCork() *cobra.Command { return cmd } + +func queryWinningAxelarCorks() *cobra.Command { + cmd := &cobra.Command{ + Use: "winning-axelar-corks [chain-id]", + Aliases: []string{"wacs"}, + Args: cobra.ExactArgs(1), + Short: "query the winning corks for a given chain id", + RunE: func(cmd *cobra.Command, args []string) error { + ctx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(ctx) + + chainID, err := math.ParseUint(args[0]) + if err != nil { + return err + } + + req := &types.QueryWinningAxelarCorksRequest{ + ChainId: chainID.Uint64(), + } + + res, err := queryClient.QueryWinningAxelarCorks(cmd.Context(), req) + if err != nil { + return err + } + + return ctx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} From 0e316cc0ec2f11c45c38346f57774f321caa08b8 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Mon, 29 Jan 2024 01:09:25 -0800 Subject: [PATCH 13/32] Update somm_proto with new updates from testing (#267) --- somm_proto/src/prost/auction.v1.rs | 45 +++++++++++++++++++ somm_proto/src/prost/axelarcork.v1.rs | 64 +++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) diff --git a/somm_proto/src/prost/auction.v1.rs b/somm_proto/src/prost/auction.v1.rs index 10e2d317b..d41ec1296 100644 --- a/somm_proto/src/prost/auction.v1.rs +++ b/somm_proto/src/prost/auction.v1.rs @@ -252,6 +252,23 @@ pub struct QueryBidsByAuctionResponse { pub pagination: ::core::option::Option, } +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTokenPriceRequest { + #[prost(string, tag = "1")] + pub denom: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTokenPriceResponse { + #[prost(message, optional, tag = "1")] + pub token_price: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTokenPricesRequest {} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryTokenPricesResponse { + #[prost(message, repeated, tag = "1")] + pub token_prices: ::prost::alloc::vec::Vec, +} #[doc = r" Generated client implementations."] pub mod query_client { #![allow(unused_variables, dead_code, missing_docs)] @@ -384,6 +401,34 @@ pub mod query_client { let path = http::uri::PathAndQuery::from_static("/auction.v1.Query/QueryBidsByAuction"); self.inner.unary(request.into_request(), path, codec).await } + pub async fn query_token_price( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/auction.v1.Query/QueryTokenPrice"); + self.inner.unary(request.into_request(), path, codec).await + } + pub async fn query_token_prices( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/auction.v1.Query/QueryTokenPrices"); + self.inner.unary(request.into_request(), path, codec).await + } } impl Clone for QueryClient { fn clone(&self) -> Self { diff --git a/somm_proto/src/prost/axelarcork.v1.rs b/somm_proto/src/prost/axelarcork.v1.rs index e1f62bb57..99cb3b45e 100644 --- a/somm_proto/src/prost/axelarcork.v1.rs +++ b/somm_proto/src/prost/axelarcork.v1.rs @@ -93,6 +93,14 @@ pub struct AxelarUpgradeData { #[prost(int64, tag = "3")] pub executable_height_threshold: i64, } +/// Represents a cork that has received enough votes to be executed +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct WinningAxelarCork { + #[prost(message, optional, tag = "1")] + pub cork: ::core::option::Option, + #[prost(uint64, tag = "2")] + pub block_height: u64, +} /// MsgScheduleCorkRequest - sdk.Msg for scheduling a cork request for on or after a specific block height #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgScheduleAxelarCorkRequest { @@ -431,6 +439,30 @@ pub struct QueryAxelarProxyUpgradeDataResponse { #[prost(message, repeated, tag = "1")] pub proxy_upgrade_data: ::prost::alloc::vec::Vec, } +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryWinningAxelarCorkRequest { + #[prost(uint64, tag = "1")] + pub chain_id: u64, + #[prost(string, tag = "2")] + pub contract_address: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryWinningAxelarCorkResponse { + #[prost(message, optional, tag = "1")] + pub cork: ::core::option::Option, + #[prost(uint64, tag = "2")] + pub block_height: u64, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryWinningAxelarCorksRequest { + #[prost(uint64, tag = "1")] + pub chain_id: u64, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryWinningAxelarCorksResponse { + #[prost(message, repeated, tag = "1")] + pub winning_axelar_corks: ::prost::alloc::vec::Vec, +} #[doc = r" Generated client implementations."] pub mod query_client { #![allow(unused_variables, dead_code, missing_docs)] @@ -663,6 +695,38 @@ pub mod query_client { ); self.inner.unary(request.into_request(), path, codec).await } + pub async fn query_winning_axelar_cork( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/axelarcork.v1.Query/QueryWinningAxelarCork"); + self.inner.unary(request.into_request(), path, codec).await + } + pub async fn query_winning_axelar_corks( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/axelarcork.v1.Query/QueryWinningAxelarCorks", + ); + self.inner.unary(request.into_request(), path, codec).await + } } impl Clone for QueryClient { fn clone(&self) -> Self { From bab9a48f2553dddb4f1c0856b8e8fd6ed9d9d599 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Mon, 29 Jan 2024 12:45:53 -0600 Subject: [PATCH 14/32] properly calculate timeout height for axelarcorks (#269) --- x/axelarcork/keeper/abci.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/x/axelarcork/keeper/abci.go b/x/axelarcork/keeper/abci.go index 049bdda8f..97f92d1bb 100644 --- a/x/axelarcork/keeper/abci.go +++ b/x/axelarcork/keeper/abci.go @@ -39,9 +39,10 @@ func (k Keeper) EndBlocker(ctx sdk.Context) { "height", fmt.Sprintf("%d", ctx.BlockHeight()), "chain id", config.Id) - timeoutHeight := uint64(ctx.BlockHeight()) - k.GetParamSet(ctx).CorkTimeoutBlocks + currentHeight := uint64(ctx.BlockHeight()) k.IterateWinningAxelarCorks(ctx, config.Id, func(_ common.Address, blockHeight uint64, cork types.AxelarCork) (stop bool) { - if blockHeight >= timeoutHeight { + timeoutHeight := blockHeight + k.GetParamSet(ctx).CorkTimeoutBlocks + if currentHeight >= timeoutHeight { k.Logger(ctx).Info("deleting expired approved scheduled axelar cork", "scheduled height", fmt.Sprintf("%d", blockHeight), "target contract address", cork.TargetContractAddress) From 32d2ecd63087b289a6939a78f1a64fb2abd01627 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Mon, 29 Jan 2024 17:25:15 -0600 Subject: [PATCH 15/32] Enable Axelar module account sends, fix community spend sender (#271) * Enable mod acc sends, fix community spend sender * handle module send error in axelar community spend --- app/app.go | 5 ++++- x/axelarcork/keeper/proposal_handler.go | 9 ++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/app.go b/app/app.go index a220e6520..2083410c5 100644 --- a/app/app.go +++ b/app/app.go @@ -220,7 +220,10 @@ var ( } // module accounts that are allowed to receive tokens - allowedReceivingModAcc = map[string]bool{} + // incidentally this permission is also required to be able to send tokens from module accounts + allowedReceivingModAcc = map[string]bool{ + axelarcorktypes.ModuleName: true, + } _ simapp.App = (*SommelierApp)(nil) _ servertypes.Application = (*SommelierApp)(nil) diff --git a/x/axelarcork/keeper/proposal_handler.go b/x/axelarcork/keeper/proposal_handler.go index 5a0744ad4..6d6072286 100644 --- a/x/axelarcork/keeper/proposal_handler.go +++ b/x/axelarcork/keeper/proposal_handler.go @@ -6,7 +6,6 @@ import ( "sort" "time" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" @@ -146,9 +145,13 @@ func HandleCommunityPoolSpendProposal(ctx sdk.Context, k Keeper, p types.AxelarC } feePool.CommunityPool = newPool - sender := authtypes.NewModuleAddress(distributiontypes.ModuleName) - // TODO(bolten: is there really no fee necessary or executor to target? + // since distribution is not an authorized sender, put them in the axelarcork module account + if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, distributiontypes.ModuleName, types.ModuleName, sdk.NewCoins(coinWithBridgeFee)); err != nil { + panic(err) + } + sender := k.GetSenderAccount(ctx) + axelarMemo := types.AxelarBody{ DestinationChain: config.Name, DestinationAddress: p.Recipient, From 73e0166ba03877406b1f2db175a167f421c3b646 Mon Sep 17 00:00:00 2001 From: Collin Date: Tue, 30 Jan 2024 12:00:58 -0600 Subject: [PATCH 16/32] feat:sweep axelarcork module acct balances in end blocker (#270) * Sweep balances in axelarcork EndBlocker * Fmt * Comment * Use GetSenderAccount method * Fix syntax errors in abci.go * Enable mod acc sends, fix community spend sender * handle module send error in axelar community spend * Working integration test for sweeping * Make linter happy * Improvements to ABCI logic * Add test delay --------- Co-authored-by: Eric Bolten --- integration_tests/axelarcork_test.go | 50 ++++++++++++++++++++++++++++ integration_tests/setup_test.go | 20 ++++++++++- x/axelarcork/keeper/abci.go | 27 +++++++++++++++ 3 files changed, 96 insertions(+), 1 deletion(-) diff --git a/integration_tests/axelarcork_test.go b/integration_tests/axelarcork_test.go index 4cc681fa4..8cb5f00ea 100644 --- a/integration_tests/axelarcork_test.go +++ b/integration_tests/axelarcork_test.go @@ -10,6 +10,9 @@ import ( "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client" 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" + distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/ethereum/go-ethereum/common" "github.com/golang/protobuf/proto" //nolint:staticcheck @@ -456,6 +459,53 @@ func (s *IntegrationTestSuite) TestAxelarCork() { chainConfigurationsResponse, err = axelarcorkQueryClient.QueryChainConfigurations(context.Background(), &types.QueryChainConfigurationsRequest{}) s.Require().NoError(err) s.Require().Empty(chainConfigurationsResponse.Configurations) + + ////////////////////////////////////////// + // Test module account balance sweeping // + ////////////////////////////////////////// + + // Get the baseline balance of the distribution community pool, send funds to the axelarcork module account, + // verify they are received, and that the balance is zero on the next block. + s.T().Log("Querying distribution community pool balance") + distributionQueryClient := distributiontypes.NewQueryClient(orch0ClientCtx) + distributionCommunityPoolResponse, err := distributionQueryClient.CommunityPool(context.Background(), &distributiontypes.QueryCommunityPoolRequest{}) + s.Require().NoError(err) + initialPool := distributionCommunityPoolResponse.Pool + + // Send all of orchestrator's sweep denom and some usomm + s.T().Log("Querying orchestrator account balances") + bankQueryClient := banktypes.NewQueryClient(orch0ClientCtx) + orch0AccountResponse, err := bankQueryClient.AllBalances(context.Background(), &banktypes.QueryAllBalancesRequest{Address: orch0.address().String()}) + s.Require().NoError(err) + orch0Balances := orch0AccountResponse.Balances + usommToSend := sdk.NewCoin(testDenom, math.NewInt(1000)) + found, sweepDenomToSend := orch0Balances.Find(axelarSweepDenom) + s.Require().True(found, "orch0 doesn't have any sweep test denom funds") + orch0SweepFunds := sdk.Coins{ + sweepDenomToSend, + usommToSend, + } + + s.T().Log("Sending funds to axelarcork module account") + axelarcorkModuleAddress := authtypes.NewModuleAddress(types.ModuleName) + sendFundsToAxelarcorkMsg := banktypes.NewMsgSend( + orch0.address(), + axelarcorkModuleAddress, + orch0SweepFunds, + ) + sendResponse, err := s.chain.sendMsgs(*orch0ClientCtx, sendFundsToAxelarcorkMsg) + s.Require().NoError(err) + s.Require().Zero(sendResponse.Code, "raw log: %s", sendResponse.RawLog) + s.T().Log("Verifying distribution community pool balances includes the swept funds") + + // Short delay to ensure a new block is queried + time.Sleep(10 * time.Second) + + // Verify fund appear in the community pool + distributionCommunityPoolResponse, err = distributionQueryClient.CommunityPool(context.Background(), &distributiontypes.QueryCommunityPoolRequest{}) + s.Require().NoError(err) + poolAfterSweep := initialPool.Add(sdk.NewDecCoinsFromCoins(usommToSend)...).Add(sdk.NewDecCoinsFromCoins(sweepDenomToSend)...) + s.Require().Equal(poolAfterSweep, distributionCommunityPoolResponse.Pool) }) } diff --git a/integration_tests/setup_test.go b/integration_tests/setup_test.go index e0b6e852e..47dac1a0d 100644 --- a/integration_tests/setup_test.go +++ b/integration_tests/setup_test.go @@ -68,6 +68,7 @@ HOqHGS8ApZcunRauDAIwRtgceZpkS92KuP3QOUotAH/nnCzp7X1lVzGOSTBRTVYJ pohf4PJrfacqpi7PoXBk -----END CERTIFICATE----- ` + axelarSweepDenom = "sweep" ) var ( @@ -319,7 +320,19 @@ func (s *IntegrationTestSuite) initGenesis() { Exponent: 0, }, }, - }) + }, + banktypes.Metadata{ + Description: "Test token for sweeping", + Display: axelarSweepDenom, + Base: axelarSweepDenom, + Name: axelarSweepDenom, + DenomUnits: []*banktypes.DenomUnit{ + { + Denom: axelarSweepDenom, + Exponent: 0, + }, + }, + }) // Set up auction module with some coins to auction off balance := banktypes.Balance{ @@ -330,8 +343,13 @@ func (s *IntegrationTestSuite) initGenesis() { Address: authtypes.NewModuleAddress(disttypes.ModuleName).String(), Coins: sdk.NewCoins(sdk.NewCoin(params.BaseCoinUnit, sdk.NewInt(1000000000))), } + orchSweepBalance := banktypes.Balance{ + Address: s.chain.orchestrators[0].address().String(), + Coins: sdk.NewCoins(sdk.NewCoin(axelarSweepDenom, sdk.NewInt(2000000000))), + } bankGenState.Balances = append(bankGenState.Balances, balance) bankGenState.Balances = append(bankGenState.Balances, distBalance) + bankGenState.Balances = append(bankGenState.Balances, orchSweepBalance) bz, err := cdc.MarshalJSON(&bankGenState) s.Require().NoError(err) diff --git a/x/axelarcork/keeper/abci.go b/x/axelarcork/keeper/abci.go index 97f92d1bb..f9fa4a3bd 100644 --- a/x/axelarcork/keeper/abci.go +++ b/x/axelarcork/keeper/abci.go @@ -5,6 +5,7 @@ import ( "github.com/ethereum/go-ethereum/common" + distributionTypes "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/peggyjv/sommelier/v7/x/axelarcork/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -54,4 +55,30 @@ func (k Keeper) EndBlocker(ctx sdk.Context) { return false }) + + // Sweep all axelarcork sender module account balances to the community pool. Because this account is the + // sender for transfers created by RelayCork calls, funds will not be returned to the caller if the IBC + // transfer fails or gas is refunded. + moduleAcct := k.GetSenderAccount(ctx) + balances := k.bankKeeper.GetAllBalances(ctx, moduleAcct.GetAddress()) + balancesForPool := sdk.Coins{} + + for _, b := range balances { + if b.Amount.IsPositive() { + balancesForPool.Add(b) + } + } + + if balancesForPool.Len() == 0 { + return + } + + if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, distributionTypes.ModuleName, balancesForPool); err != nil { + panic(err) + } + + feePool := k.distributionKeeper.GetFeePool(ctx) + feePool.CommunityPool = feePool.CommunityPool.Add(sdk.NewDecCoinsFromCoins(balancesForPool...)...) + + k.distributionKeeper.SetFeePool(ctx, feePool) } From d7023e56947230308b1771d6532910e1070330ce Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Wed, 31 Jan 2024 20:36:00 -0600 Subject: [PATCH 17/32] More fixes for Chardonnay testnet (#273) * move AxelarBody back to []byte * axelarcork validator cap, check cork count * fix axelarcork module account sweep * Make sure cellar IDs are always sorted * sort cellar IDs when written to state * Always store fee accrual counters sorted * always sort allowed addresses for publisher intents * update v7 upgrade with new cellars * appease linter --- app/upgrades/v7/upgrades.go | 9 ++++-- integration_tests/axelarcork_test.go | 14 ++++----- x/axelarcork/keeper/abci.go | 14 +++------ x/axelarcork/keeper/genesis.go | 6 +++- x/axelarcork/keeper/keeper.go | 39 +++++++++++++++++++++++++ x/axelarcork/keeper/msg_server.go | 21 +++++++------ x/axelarcork/keeper/packet.go | 10 +------ x/axelarcork/keeper/proposal_handler.go | 2 -- x/axelarcork/types/axelar.go | 2 +- x/axelarcork/types/axelar_proxy_test.go | 21 +++++++++++++ x/axelarcork/types/axelarcork.go | 2 ++ x/axelarcork/types/errors.go | 15 +++++----- x/axelarcork/types/keys.go | 7 +++++ x/cellarfees/keeper/keeper.go | 8 +++++ x/cork/keeper/genesis.go | 15 ++++++---- x/cork/keeper/keeper.go | 6 ++++ x/cork/keeper/msg_server.go | 6 ++++ x/cork/keeper/proposal_handler.go | 2 -- x/pubsub/keeper/keeper.go | 5 ++++ 19 files changed, 145 insertions(+), 59 deletions(-) diff --git a/app/upgrades/v7/upgrades.go b/app/upgrades/v7/upgrades.go index f9a8cf614..5a03f2f38 100644 --- a/app/upgrades/v7/upgrades.go +++ b/app/upgrades/v7/upgrades.go @@ -248,7 +248,10 @@ func pubsubInitGenesis(ctx sdk.Context, pubsubKeeper pubsubkeeper.Keeper) { "1:0x05641a27C82799AaF22b436F20A3110410f29652", // Steady MATIC "1:0x6F069F711281618467dAe7873541EcC082761B33", // Steady UNI "1:0x6a6731f1754e3088ea35c8ddfd55cFF4d0FA5052", // Turbo CRVUSD + "1:0x6c1edce139291Af5b84fB1e496c9747F83E876c9", // Turbo DIVETH "1:0x9a7b4980C6F0FCaa50CD5f288Ad7038f434c692e", // Turbo EETH + "1:0xdAdC82e26b3739750E036dFd9dEfd3eD459b877A", // Turbo EETH V2 + "1:0x19B8D8FC682fC56FbB42653F68c7d48Dd3fe597E", // Turbo ETHX "1:0x0C190DEd9Be5f512Bd72827bdaD4003e9Cc7975C", // Turbo GHO "1:0x5195222f69c5821f8095ec565E71e18aB6A2298f", // Turbo SOMM "1:0xc7372Ab5dd315606dB799246E8aA112405abAeFf", // Turbo stETH (stETH deposit) @@ -259,7 +262,7 @@ func pubsubInitGenesis(ctx sdk.Context, pubsubKeeper pubsubkeeper.Keeper) { } // Set 7seas publisher intents for existing cellars - publisherIntents := make([]*pubsubtypes.PublisherIntent, 0, 28) + publisherIntents := make([]*pubsubtypes.PublisherIntent, 0, 31) for _, cellar := range cellars { publisherIntents = append(publisherIntents, &pubsubtypes.PublisherIntent{ SubscriptionId: cellar, @@ -270,7 +273,7 @@ func pubsubInitGenesis(ctx sdk.Context, pubsubKeeper pubsubkeeper.Keeper) { } // Set default subscriptions for 7seas as the publisher for existing cellars - defaultSubscriptions := make([]*pubsubtypes.DefaultSubscription, 0, 28) + defaultSubscriptions := make([]*pubsubtypes.DefaultSubscription, 0, 31) for _, cellar := range cellars { defaultSubscriptions = append(defaultSubscriptions, &pubsubtypes.DefaultSubscription{ SubscriptionId: cellar, @@ -280,7 +283,7 @@ func pubsubInitGenesis(ctx sdk.Context, pubsubKeeper pubsubkeeper.Keeper) { // Create subscribers and intents for existing validators subscribers := createSubscribers() - subscriberIntents := make([]*pubsubtypes.SubscriberIntent, 0, 980) + subscriberIntents := make([]*pubsubtypes.SubscriberIntent, 0, 1085) for _, subscriber := range subscribers { for _, cellar := range cellars { subscriberIntents = append(subscriberIntents, &pubsubtypes.SubscriberIntent{ diff --git a/integration_tests/axelarcork_test.go b/integration_tests/axelarcork_test.go index 8cb5f00ea..b0562c649 100644 --- a/integration_tests/axelarcork_test.go +++ b/integration_tests/axelarcork_test.go @@ -496,16 +496,14 @@ func (s *IntegrationTestSuite) TestAxelarCork() { sendResponse, err := s.chain.sendMsgs(*orch0ClientCtx, sendFundsToAxelarcorkMsg) s.Require().NoError(err) s.Require().Zero(sendResponse.Code, "raw log: %s", sendResponse.RawLog) - s.T().Log("Verifying distribution community pool balances includes the swept funds") - - // Short delay to ensure a new block is queried - time.Sleep(10 * time.Second) - // Verify fund appear in the community pool - distributionCommunityPoolResponse, err = distributionQueryClient.CommunityPool(context.Background(), &distributiontypes.QueryCommunityPoolRequest{}) - s.Require().NoError(err) + s.T().Log("Verifying distribution community pool balances includes the swept funds") poolAfterSweep := initialPool.Add(sdk.NewDecCoinsFromCoins(usommToSend)...).Add(sdk.NewDecCoinsFromCoins(sweepDenomToSend)...) - s.Require().Equal(poolAfterSweep, distributionCommunityPoolResponse.Pool) + s.Require().Eventually(func() bool { + distributionCommunityPoolResponse, err := distributionQueryClient.CommunityPool(context.Background(), &distributiontypes.QueryCommunityPoolRequest{}) + s.Require().NoError(err) + return poolAfterSweep.IsEqual(distributionCommunityPoolResponse.Pool) + }, time.Second*60, time.Second*5, "swept funds never reached community pool") }) } diff --git a/x/axelarcork/keeper/abci.go b/x/axelarcork/keeper/abci.go index f9fa4a3bd..3382cb05d 100644 --- a/x/axelarcork/keeper/abci.go +++ b/x/axelarcork/keeper/abci.go @@ -61,24 +61,18 @@ func (k Keeper) EndBlocker(ctx sdk.Context) { // transfer fails or gas is refunded. moduleAcct := k.GetSenderAccount(ctx) balances := k.bankKeeper.GetAllBalances(ctx, moduleAcct.GetAddress()) - balancesForPool := sdk.Coins{} - for _, b := range balances { - if b.Amount.IsPositive() { - balancesForPool.Add(b) - } - } - - if balancesForPool.Len() == 0 { + if balances.IsZero() { return } - if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, distributionTypes.ModuleName, balancesForPool); err != nil { + k.Logger(ctx).Info("sweeping funds from axelarcork module account to community pool", "coins", balances.String()) + if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, distributionTypes.ModuleName, balances); err != nil { panic(err) } feePool := k.distributionKeeper.GetFeePool(ctx) - feePool.CommunityPool = feePool.CommunityPool.Add(sdk.NewDecCoinsFromCoins(balancesForPool...)...) + feePool.CommunityPool = feePool.CommunityPool.Add(sdk.NewDecCoinsFromCoins(balances...)...) k.distributionKeeper.SetFeePool(ctx, feePool) } diff --git a/x/axelarcork/keeper/genesis.go b/x/axelarcork/keeper/genesis.go index dca15c842..141e584ab 100644 --- a/x/axelarcork/keeper/genesis.go +++ b/x/axelarcork/keeper/genesis.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + "sort" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" @@ -82,9 +83,12 @@ func ExportGenesis(ctx sdk.Context, k Keeper) types.GenesisState { cellarIDs := k.GetCellarIDs(ctx, config.Id) var cellarIDSet types.CellarIDSet cellarIDSet.ChainId = config.Id + cellarIDSetIDs := make([]string, 0, len(cellarIDs)) for _, id := range cellarIDs { - cellarIDSet.Ids = append(cellarIDSet.Ids, id.String()) + cellarIDSetIDs = append(cellarIDSetIDs, id.String()) } + sort.Strings(cellarIDSetIDs) + cellarIDSet.Ids = cellarIDSetIDs gs.CellarIds = append(gs.CellarIds, &cellarIDSet) gs.ScheduledCorks.ScheduledCorks = append(gs.ScheduledCorks.ScheduledCorks, k.GetScheduledAxelarCorks(ctx, config.Id)...) diff --git a/x/axelarcork/keeper/keeper.go b/x/axelarcork/keeper/keeper.go index e39861f8e..f86c29244 100644 --- a/x/axelarcork/keeper/keeper.go +++ b/x/axelarcork/keeper/keeper.go @@ -5,6 +5,7 @@ import ( "encoding/binary" "encoding/hex" "reflect" + "sort" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -369,6 +370,7 @@ func (k Keeper) GetApprovedScheduledAxelarCorks(ctx sdk.Context, chainID uint64) } k.DeleteScheduledAxelarCork(ctx, chainID, currentBlockHeight, id, val, addr) + k.DecrementValidatorAxelarCorkCount(ctx, val) return false }) @@ -402,6 +404,11 @@ func (k Keeper) GetApprovedScheduledAxelarCorks(ctx sdk.Context, chainID uint64) func (k Keeper) SetCellarIDs(ctx sdk.Context, chainID uint64, c types.CellarIDSet) { bz := k.cdc.MustMarshal(&c) + // always sort before writing to the store + cellarIDs := make([]string, 0, len(c.Ids)) + cellarIDs = append(cellarIDs, c.Ids...) + sort.Strings(cellarIDs) + c.Ids = cellarIDs ctx.KVStore(k.storeKey).Set(types.MakeCellarIDsKey(chainID), bz) } @@ -524,6 +531,38 @@ func (k Keeper) IterateAxelarProxyUpgradeData(ctx sdk.Context, cb func(chainID u } } +/////////////////////////// +// Validator Cork counts // +/////////////////////////// + +func (k Keeper) GetValidatorAxelarCorkCount(ctx sdk.Context, val sdk.ValAddress) (count uint64) { + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.GetValidatorAxelarCorkCountKey(val)) + if len(bz) == 0 { + return 0 + } + + return binary.BigEndian.Uint64(bz) +} + +func (k Keeper) SetValidatorAxelarCorkCount(ctx sdk.Context, val sdk.ValAddress, count uint64) { + bz := make([]byte, 8) + binary.BigEndian.PutUint64(bz, count) + ctx.KVStore(k.storeKey).Set(types.GetValidatorAxelarCorkCountKey(val), bz) +} + +func (k Keeper) IncrementValidatorAxelarCorkCount(ctx sdk.Context, val sdk.ValAddress) { + count := k.GetValidatorAxelarCorkCount(ctx, val) + k.SetValidatorAxelarCorkCount(ctx, val, count+1) +} + +func (k Keeper) DecrementValidatorAxelarCorkCount(ctx sdk.Context, val sdk.ValAddress) { + count := k.GetValidatorAxelarCorkCount(ctx, val) + if count > 0 { + k.SetValidatorAxelarCorkCount(ctx, val, count-1) + } +} + ///////////////////// // Module Accounts // ///////////////////// diff --git a/x/axelarcork/keeper/msg_server.go b/x/axelarcork/keeper/msg_server.go index ceecedc56..1cd7c8bc7 100644 --- a/x/axelarcork/keeper/msg_server.go +++ b/x/axelarcork/keeper/msg_server.go @@ -24,7 +24,8 @@ var _ types.MsgServer = Keeper{} // ScheduleCork implements types.MsgServer func (k Keeper) ScheduleCork(c context.Context, msg *types.MsgScheduleAxelarCorkRequest) (*types.MsgScheduleAxelarCorkResponse, error) { ctx := sdk.UnwrapSDKContext(c) - if !k.GetParamSet(ctx).Enabled { + params := k.GetParamSet(ctx) + if !params.Enabled { return nil, types.ErrDisabled } @@ -34,6 +35,11 @@ func (k Keeper) ScheduleCork(c context.Context, msg *types.MsgScheduleAxelarCork return nil, errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "signer %s is not a delegate", signer.String()) } + validatorAxelarCorkCount := k.GetValidatorAxelarCorkCount(ctx, validatorAddr) + if validatorAxelarCorkCount >= types.MaxAxelarCorksPerValidator { + return nil, types.ErrValidatorAxelarCorkCapacityReached + } + config, ok := k.GetChainConfigurationByID(ctx, msg.ChainId) if !ok { return nil, fmt.Errorf("chain by id %d not found", msg.ChainId) @@ -48,6 +54,7 @@ func (k Keeper) ScheduleCork(c context.Context, msg *types.MsgScheduleAxelarCork } corkID := k.SetScheduledAxelarCork(ctx, config.Id, msg.BlockHeight, validatorAddr, *msg.Cork) + k.IncrementValidatorAxelarCorkCount(ctx, validatorAddr) if err := ctx.EventManager().EmitTypedEvent(&types.ScheduleCorkEvent{ Signer: signer.String(), @@ -97,7 +104,7 @@ func (k Keeper) RelayCork(c context.Context, msg *types.MsgRelayAxelarCorkReques axelarMemo := types.AxelarBody{ DestinationChain: config.Name, DestinationAddress: config.ProxyAddress, - Payload: bytesToInts(payload), + Payload: payload, Type: types.PureMessage, Fee: &types.Fee{ Amount: strconv.FormatUint(msg.Fee, 10), @@ -161,7 +168,7 @@ func (k Keeper) RelayProxyUpgrade(c context.Context, msg *types.MsgRelayAxelarPr axelarMemo := types.AxelarBody{ DestinationChain: config.Name, DestinationAddress: config.ProxyAddress, - Payload: bytesToInts(upgradeData.Payload), + Payload: upgradeData.Payload, Type: types.PureMessage, Fee: &types.Fee{ Amount: strconv.FormatUint(msg.Fee, 10), @@ -226,11 +233,3 @@ func (k Keeper) CancelScheduledCork(c context.Context, msg *types.MsgCancelAxela return &types.MsgCancelAxelarCorkResponse{}, nil } - -func bytesToInts(payload []byte) []int { - intPayload := make([]int, len(payload)) - for i, b := range payload { - intPayload[i] = int(b) - } - return intPayload -} diff --git a/x/axelarcork/keeper/packet.go b/x/axelarcork/keeper/packet.go index 8a88062f2..cf5ce5691 100644 --- a/x/axelarcork/keeper/packet.go +++ b/x/axelarcork/keeper/packet.go @@ -63,7 +63,7 @@ func (k Keeper) ValidateAxelarPacket(ctx sdk.Context, sourceChannel string, data if err := json.Unmarshal([]byte(packetData.Memo), &axelarBody); err != nil { return err } - payloadBytes := intsToBytes(axelarBody.Payload) + payloadBytes := axelarBody.Payload // get the destination chain configuration chainConfig, ok := k.GetChainConfigurationByName(ctx, axelarBody.DestinationChain) @@ -144,11 +144,3 @@ func (k Keeper) ValidateAxelarPacket(ctx sdk.Context, sourceChannel string, data return fmt.Errorf("invalid payload: %s", payloadBytes) } - -func intsToBytes(payload []int) []byte { - bytePayload := make([]byte, len(payload)) - for i, b := range payload { - bytePayload[i] = byte(b) - } - return bytePayload -} diff --git a/x/axelarcork/keeper/proposal_handler.go b/x/axelarcork/keeper/proposal_handler.go index 6d6072286..4bffd56e4 100644 --- a/x/axelarcork/keeper/proposal_handler.go +++ b/x/axelarcork/keeper/proposal_handler.go @@ -3,7 +3,6 @@ package keeper import ( "encoding/json" "fmt" - "sort" "time" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" @@ -63,7 +62,6 @@ func HandleAddManagedCellarsProposal(ctx sdk.Context, k Keeper, p types.AddAxela idStrings[i] = cid.String() } - sort.Strings(idStrings) k.SetCellarIDs(ctx, config.Id, types.CellarIDSet{ChainId: config.Id, Ids: idStrings}) return nil diff --git a/x/axelarcork/types/axelar.go b/x/axelarcork/types/axelar.go index b2df87bbc..45e08b57c 100644 --- a/x/axelarcork/types/axelar.go +++ b/x/axelarcork/types/axelar.go @@ -10,7 +10,7 @@ const ( type AxelarBody struct { DestinationChain string `json:"destination_chain"` DestinationAddress string `json:"destination_address"` - Payload []int `json:"payload"` + Payload []byte `json:"payload"` Type int64 `json:"type"` Fee *Fee `json:"fee"` } diff --git a/x/axelarcork/types/axelar_proxy_test.go b/x/axelarcork/types/axelar_proxy_test.go index 1f07b00d4..713742b02 100644 --- a/x/axelarcork/types/axelar_proxy_test.go +++ b/x/axelarcork/types/axelar_proxy_test.go @@ -2,12 +2,33 @@ package types import ( "bytes" + "encoding/json" "testing" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/stretchr/testify/require" ) +func TestEncodingMetadata(t *testing.T) { + axelarMemo := AxelarBody{ + DestinationChain: "arbitrum", + DestinationAddress: "0xEe75bA2C81C04DcA4b0ED6d1B7077c188FEde4d2", + Payload: []byte("1234"), + Type: PureMessage, + Fee: &Fee{ + Amount: "100", + Recipient: "axelar1aythygn6z5thymj6tmzfwekzh05ewg3l7d6y89", + }, + } + + memoBz, err := json.Marshal(axelarMemo) + require.NoError(t, err) + + var body AxelarBody + err = json.Unmarshal(memoBz, &body) + require.NoError(t, err) +} + func TestEncodingDecodingLogicCalls(t *testing.T) { targetContract := "0x1111111111111111111111111111111111111111" nonce := uint64(1) diff --git a/x/axelarcork/types/axelarcork.go b/x/axelarcork/types/axelarcork.go index 389eaa828..c8c21ce86 100644 --- a/x/axelarcork/types/axelarcork.go +++ b/x/axelarcork/types/axelarcork.go @@ -11,6 +11,8 @@ import ( "github.com/ethereum/go-ethereum/crypto" ) +const MaxAxelarCorksPerValidator uint64 = 1000 + func (c *AxelarCork) IDHash(blockHeight uint64) []byte { blockHeightBytes := sdk.Uint64ToBigEndian(blockHeight) chainIDBytes := sdk.Uint64ToBigEndian(c.ChainId) diff --git a/x/axelarcork/types/errors.go b/x/axelarcork/types/errors.go index c18d902ff..c134f6dda 100644 --- a/x/axelarcork/types/errors.go +++ b/x/axelarcork/types/errors.go @@ -6,11 +6,12 @@ import ( // x/cork module sentinel errors var ( - ErrInvalidEVMAddress = errorsmod.Register(ModuleName, 2, "invalid evm address") - ErrUnmanagedCellarAddress = errorsmod.Register(ModuleName, 3, "cork sent to address that has not passed governance") - ErrEmptyContractCall = errorsmod.Register(ModuleName, 4, "cork has an empty contract call body") - ErrSchedulingInThePast = errorsmod.Register(ModuleName, 5, "cork is trying to be scheduled for a block that has already passed") - ErrInvalidJSON = errorsmod.Register(ModuleName, 6, "invalid json") - ErrValuelessSend = errorsmod.Register(ModuleName, 7, "transferring an empty token amount") - ErrDisabled = errorsmod.Register(ModuleName, 8, "axelar disabled") + ErrInvalidEVMAddress = errorsmod.Register(ModuleName, 2, "invalid evm address") + ErrUnmanagedCellarAddress = errorsmod.Register(ModuleName, 3, "cork sent to address that has not passed governance") + ErrEmptyContractCall = errorsmod.Register(ModuleName, 4, "cork has an empty contract call body") + ErrSchedulingInThePast = errorsmod.Register(ModuleName, 5, "cork is trying to be scheduled for a block that has already passed") + ErrInvalidJSON = errorsmod.Register(ModuleName, 6, "invalid json") + ErrValuelessSend = errorsmod.Register(ModuleName, 7, "transferring an empty token amount") + ErrDisabled = errorsmod.Register(ModuleName, 8, "axelar disabled") + ErrValidatorAxelarCorkCapacityReached = errorsmod.Register(ModuleName, 9, "validator Axelar cork capacity reached") ) diff --git a/x/axelarcork/types/keys.go b/x/axelarcork/types/keys.go index dacf52bcb..6c77fcbc1 100644 --- a/x/axelarcork/types/keys.go +++ b/x/axelarcork/types/keys.go @@ -49,6 +49,9 @@ const ( // AxelarProxyUpgradeDataPrefix - -> AxelarProxyUpgradeDataPrefix + + // ValidatorAxelarCorkCountKey - -> uint64(count) + ValidatorAxelarCorkCountKey ) // GetCorkValidatorKeyPrefix returns the key prefix for cork commits for a validator @@ -118,3 +121,7 @@ func GetAxelarProxyUpgradeDataKey(chainID uint64) []byte { binary.BigEndian.PutUint64(cid, chainID) return bytes.Join([][]byte{{AxelarProxyUpgradeDataPrefix}, cid}, []byte{}) } + +func GetValidatorAxelarCorkCountKey(val sdk.ValAddress) []byte { + return append([]byte{ValidatorAxelarCorkCountKey}, val.Bytes()...) +} diff --git a/x/cellarfees/keeper/keeper.go b/x/cellarfees/keeper/keeper.go index f336cde1e..66682e899 100644 --- a/x/cellarfees/keeper/keeper.go +++ b/x/cellarfees/keeper/keeper.go @@ -3,6 +3,8 @@ package keeper import ( "fmt" "math/big" + "sort" + "strings" "cosmossdk.io/math" "github.com/tendermint/tendermint/libs/log" @@ -113,6 +115,12 @@ func (k Keeper) GetFeeAccrualCounters(ctx sdk.Context) (counters types.FeeAccrua func (k Keeper) SetFeeAccrualCounters(ctx sdk.Context, counters types.FeeAccrualCounters) { store := ctx.KVStore(k.storeKey) + counterSlice := make([]types.FeeAccrualCounter, 0, len(counters.Counters)) + counterSlice = append(counterSlice, counters.Counters...) + sort.Slice(counterSlice, func(i, j int) bool { + return strings.Compare(counterSlice[i].Denom, counterSlice[j].Denom) == -1 + }) + counters.Counters = counterSlice b := k.cdc.MustMarshal(&counters) store.Set(types.GetFeeAccrualCountersKey(), b) } diff --git a/x/cork/keeper/genesis.go b/x/cork/keeper/genesis.go index 7b99867ae..4d1e67e1a 100644 --- a/x/cork/keeper/genesis.go +++ b/x/cork/keeper/genesis.go @@ -1,6 +1,8 @@ package keeper import ( + "sort" + sdk "github.com/cosmos/cosmos-sdk/types" types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" ) @@ -9,7 +11,6 @@ import ( // and the keeper's address to pubkey map func InitGenesis(ctx sdk.Context, k Keeper, gs types.GenesisState) { k.SetParams(ctx, gs.Params) - // Set the vote period at initialization k.SetCellarIDs(ctx, gs.CellarIds) k.SetLatestInvalidationNonce(ctx, gs.InvalidationNonce) @@ -31,14 +32,18 @@ func InitGenesis(ctx sdk.Context, k Keeper, gs types.GenesisState) { // to a genesis file, which can be imported again // with InitGenesis func ExportGenesis(ctx sdk.Context, k Keeper) types.GenesisState { - var ids types.CellarIDSet - for _, id := range k.GetCellarIDs(ctx) { - ids.Ids = append(ids.Ids, id.String()) + var cellarIDSet types.CellarIDSet + existingCellarIDs := k.GetCellarIDs(ctx) + cellarIDs := make([]string, 0) + for _, id := range existingCellarIDs { + cellarIDs = append(cellarIDs, id.String()) } + sort.Strings(cellarIDs) + cellarIDSet.Ids = cellarIDs return types.GenesisState{ Params: k.GetParamSet(ctx), - CellarIds: ids, + CellarIds: cellarIDSet, InvalidationNonce: k.GetLatestInvalidationNonce(ctx), ScheduledCorks: k.GetScheduledCorks(ctx), CorkResults: k.GetCorkResults(ctx), diff --git a/x/cork/keeper/keeper.go b/x/cork/keeper/keeper.go index 883152504..80a932be6 100644 --- a/x/cork/keeper/keeper.go +++ b/x/cork/keeper/keeper.go @@ -3,6 +3,7 @@ package keeper import ( "bytes" "encoding/binary" + "sort" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -335,6 +336,11 @@ func (k Keeper) GetApprovedScheduledCorks(ctx sdk.Context) (approvedCorks []type func (k Keeper) SetCellarIDs(ctx sdk.Context, c types.CellarIDSet) { bz := k.cdc.MustMarshal(&c) + // always sort before writing to the store + cellarIDs := make([]string, 0, len(c.Ids)) + cellarIDs = append(cellarIDs, c.Ids...) + sort.Strings(cellarIDs) + c.Ids = cellarIDs ctx.KVStore(k.storeKey).Set(corktypes.MakeCellarIDsKey(), bz) } diff --git a/x/cork/keeper/msg_server.go b/x/cork/keeper/msg_server.go index 2f15bb214..0fe1493c8 100644 --- a/x/cork/keeper/msg_server.go +++ b/x/cork/keeper/msg_server.go @@ -25,6 +25,12 @@ func (k Keeper) ScheduleCork(c context.Context, msg *types.MsgScheduleCorkReques return nil, errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "signer %s is not a delegate", signer.String()) } + params := k.GetParamSet(ctx) + validatorCorkCount := k.GetValidatorCorkCount(ctx, validatorAddr) + if validatorCorkCount >= params.MaxCorksPerValidator { + return nil, corktypes.ErrValidatorCorkCapacityReached + } + if !k.HasCellarID(ctx, common.HexToAddress(msg.Cork.TargetContractAddress)) { return nil, corktypes.ErrUnmanagedCellarAddress } diff --git a/x/cork/keeper/proposal_handler.go b/x/cork/keeper/proposal_handler.go index b0b42a406..ba392dae7 100644 --- a/x/cork/keeper/proposal_handler.go +++ b/x/cork/keeper/proposal_handler.go @@ -2,7 +2,6 @@ package keeper import ( "fmt" - "sort" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -49,7 +48,6 @@ func HandleAddManagedCellarsProposal(ctx sdk.Context, k Keeper, p types.AddManag idStrings[i] = cid.String() } - sort.Strings(idStrings) k.SetCellarIDs(ctx, types.CellarIDSet{Ids: idStrings}) return nil diff --git a/x/pubsub/keeper/keeper.go b/x/pubsub/keeper/keeper.go index becf97399..5215552fc 100644 --- a/x/pubsub/keeper/keeper.go +++ b/x/pubsub/keeper/keeper.go @@ -3,6 +3,7 @@ package keeper import ( "bytes" "fmt" + "sort" "github.com/tendermint/tendermint/libs/log" @@ -176,6 +177,10 @@ func (k Keeper) DeleteSubscriber(ctx sdk.Context, subscriberAddress sdk.AccAddre ///////////////////// func (k Keeper) SetPublisherIntent(ctx sdk.Context, publisherIntent types.PublisherIntent) { + allowedAddressesSlice := make([]string, 0, len(publisherIntent.AllowedAddresses)) + allowedAddressesSlice = append(allowedAddressesSlice, publisherIntent.AllowedAddresses...) + sort.Strings(allowedAddressesSlice) + publisherIntent.AllowedAddresses = allowedAddressesSlice bz := k.cdc.MustMarshal(&publisherIntent) ctx.KVStore(k.storeKey).Set(types.GetPublisherIntentByPublisherDomainKey(publisherIntent.PublisherDomain, publisherIntent.SubscriptionId), bz) ctx.KVStore(k.storeKey).Set(types.GetPublisherIntentBySubscriptionIDKey(publisherIntent.SubscriptionId, publisherIntent.PublisherDomain), bz) From 7be2c1c4f598c836cd379c80fb30325fde3c1376 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Thu, 1 Feb 2024 19:17:35 -0600 Subject: [PATCH 18/32] Further updates to Axelar for Chardonnay testnet (#274) * more verbose logging in Axelar validation * Construct transfer stack after axelarcork keeper * Temporarily change middleware logs to errors for debugging * correctly wire up axelarcork ICS4 wrapper * fix up packet.go logging * comment on nil transfer keeper in app.go * only keep the latest winning axelar corks * simplify deleted check for winning axelar corks * Revert "simplify deleted check for winning axelar corks" This reverts commit 3cceba94a3fbc4b8556ebe91e5f7d11a7570ed94. * Revert "only keep the latest winning axelar corks" This reverts commit 8869b94e3c6d6303c39d6820610a657849e8bad9. --------- Co-authored-by: Collin Brittain --- app/app.go | 64 ++++++++++++++++++++-------------- x/axelarcork/ibc_middleware.go | 17 +++------ x/axelarcork/keeper/keeper.go | 33 ++++++++++++++++++ x/axelarcork/keeper/packet.go | 10 ++++-- x/axelarcork/tests/setup.go | 2 +- 5 files changed, 83 insertions(+), 43 deletions(-) diff --git a/app/app.go b/app/app.go index 2083410c5..b2d478e42 100644 --- a/app/app.go +++ b/app/app.go @@ -414,32 +414,6 @@ func NewSommelierApp( scopedIBCKeeper, ) - // Create Transfer Keepers - app.TransferKeeper = ibctransferkeeper.NewKeeper( - appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName), - app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, - app.AccountKeeper, app.BankKeeper, scopedTransferKeeper, - ) - - transferModule := ibctransfer.NewAppModule(app.TransferKeeper) - transferIBCModule := ibctransfer.NewIBCModule(app.TransferKeeper) - var transferStack ibcporttypes.IBCModule = transferIBCModule - transferStack = axelarcork.NewIBCMiddleware(app.AxelarCorkKeeper, transferStack) - - // Create the ICAHost Keeper - app.ICAHostKeeper = icahostkeeper.NewKeeper( - appCodec, - app.keys[icahosttypes.StoreKey], - app.GetSubspace(icahosttypes.SubModuleName), - app.IBCKeeper.ChannelKeeper, - app.IBCKeeper.ChannelKeeper, - &app.IBCKeeper.PortKeeper, - app.AccountKeeper, - scopedICAHostKeeper, - bApp.MsgServiceRouter(), - ) - icaHostIBCModule := icahost.NewIBCModule(app.ICAHostKeeper) - // todo: check if default power reduction is appropriate app.GravityKeeper = gravitykeeper.NewKeeper( appCodec, keys[gravitytypes.StoreKey], app.GetSubspace(gravitytypes.ModuleName), @@ -462,13 +436,49 @@ func NewSommelierApp( app.AccountKeeper, app.BankKeeper, app.StakingKeeper, - app.TransferKeeper, + app.TransferKeeper, // will be nil, circular dependency avoided by calling SetTransferKeeper later app.DistrKeeper, app.IBCKeeper.ChannelKeeper, app.GravityKeeper, app.PubsubKeeper, ) + // Create Transfer Keepers + app.TransferKeeper = ibctransferkeeper.NewKeeper( + appCodec, + keys[ibctransfertypes.StoreKey], + app.GetSubspace(ibctransfertypes.ModuleName), + // replacing channelkeeper as ICS4 Middleware for Axelar packet validation + app.AxelarCorkKeeper, + app.IBCKeeper.ChannelKeeper, + &app.IBCKeeper.PortKeeper, + app.AccountKeeper, + app.BankKeeper, + scopedTransferKeeper, + ) + + app.AxelarCorkKeeper.SetTransferKeeper(app.TransferKeeper) + + transferModule := ibctransfer.NewAppModule(app.TransferKeeper) + transferIBCModule := ibctransfer.NewIBCModule(app.TransferKeeper) + + // Create the ICAHost Keeper + app.ICAHostKeeper = icahostkeeper.NewKeeper( + appCodec, + app.keys[icahosttypes.StoreKey], + app.GetSubspace(icahosttypes.SubModuleName), + app.IBCKeeper.ChannelKeeper, + app.IBCKeeper.ChannelKeeper, + &app.IBCKeeper.PortKeeper, + app.AccountKeeper, + scopedICAHostKeeper, + bApp.MsgServiceRouter(), + ) + icaHostIBCModule := icahost.NewIBCModule(app.ICAHostKeeper) + + var transferStack ibcporttypes.IBCModule = transferIBCModule + transferStack = axelarcork.NewIBCMiddleware(&app.AxelarCorkKeeper, transferStack) + app.CorkKeeper = corkkeeper.NewKeeper( appCodec, keys[corktypes.StoreKey], app.GetSubspace(corktypes.ModuleName), app.StakingKeeper, app.GravityKeeper, app.PubsubKeeper, diff --git a/x/axelarcork/ibc_middleware.go b/x/axelarcork/ibc_middleware.go index 7b39d4ae7..5c4a1adea 100644 --- a/x/axelarcork/ibc_middleware.go +++ b/x/axelarcork/ibc_middleware.go @@ -1,8 +1,6 @@ package axelarcork import ( - "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" @@ -16,10 +14,10 @@ var _ porttypes.Middleware = &IBCMiddleware{} type IBCMiddleware struct { app porttypes.IBCModule - keeper keeper.Keeper + keeper *keeper.Keeper } -func NewIBCMiddleware(k keeper.Keeper, app porttypes.IBCModule) IBCMiddleware { +func NewIBCMiddleware(k *keeper.Keeper, app porttypes.IBCModule) IBCMiddleware { return IBCMiddleware{ app: app, keeper: k, @@ -63,18 +61,13 @@ func (im IBCMiddleware) OnTimeoutPacket(ctx sdk.Context, packet types.Packet, re } func (im IBCMiddleware) SendPacket(ctx sdk.Context, chanCap *capabilitytypes.Capability, sourcePort string, sourceChannel string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, data []byte) (sequence uint64, err error) { - if err := im.keeper.ValidateAxelarPacket(ctx, sourceChannel, data); err != nil { - im.keeper.Logger(ctx).Error(fmt.Sprintf("ICS20 packet send was denied: %s", err.Error())) - // based on the default implementation of SendPacket in ibc-go, we return 0 for the sequence on error conditions - return 0, err - } - return im.keeper.Ics4Wrapper.SendPacket(ctx, chanCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data) + return im.keeper.SendPacket(ctx, chanCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data) } func (im IBCMiddleware) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet exported.PacketI, ack exported.Acknowledgement) error { - return im.keeper.Ics4Wrapper.WriteAcknowledgement(ctx, chanCap, packet, ack) + return im.keeper.WriteAcknowledgement(ctx, chanCap, packet, ack) } func (im IBCMiddleware) GetAppVersion(ctx sdk.Context, portID string, channelID string) (string, bool) { - return im.keeper.Ics4Wrapper.GetAppVersion(ctx, portID, channelID) + return im.keeper.GetAppVersion(ctx, portID, channelID) } diff --git a/x/axelarcork/keeper/keeper.go b/x/axelarcork/keeper/keeper.go index f86c29244..5f328d669 100644 --- a/x/axelarcork/keeper/keeper.go +++ b/x/axelarcork/keeper/keeper.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/binary" "encoding/hex" + "fmt" "reflect" "sort" @@ -11,12 +12,18 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + porttypes "github.com/cosmos/ibc-go/v6/modules/core/05-port/types" + "github.com/cosmos/ibc-go/v6/modules/core/exported" "github.com/ethereum/go-ethereum/common" "github.com/peggyjv/sommelier/v7/x/axelarcork/types" "github.com/tendermint/tendermint/libs/log" ) +var _ porttypes.ICS4Wrapper = &Keeper{} + // Keeper of the oracle store type Keeper struct { storeKey storetypes.StoreKey @@ -66,6 +73,11 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", "x/"+types.ModuleName) } +// SetTransferKeeper sets the transferKeeper +func (k *Keeper) SetTransferKeeper(transferKeeper types.TransferKeeper) { + k.transferKeeper = transferKeeper +} + //////////// // Params // //////////// @@ -570,3 +582,24 @@ func (k Keeper) DecrementValidatorAxelarCorkCount(ctx sdk.Context, val sdk.ValAd func (k Keeper) GetSenderAccount(ctx sdk.Context) authtypes.ModuleAccountI { return k.accountKeeper.GetModuleAccount(ctx, types.ModuleName) } + +/////////////////////////// +// ICS4Wrapper functions // +/////////////////////////// + +func (k Keeper) SendPacket(ctx sdk.Context, chanCap *capabilitytypes.Capability, sourcePort string, sourceChannel string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, data []byte) (sequence uint64, err error) { + if err := k.ValidateAxelarPacket(ctx, sourceChannel, data); err != nil { + k.Logger(ctx).Error(fmt.Sprintf("ICS20 packet send was denied: %s", err.Error())) + // based on the default implementation of SendPacket in ibc-go, we return 0 for the sequence on error conditions + return 0, err + } + return k.Ics4Wrapper.SendPacket(ctx, chanCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data) +} + +func (k Keeper) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet exported.PacketI, ack exported.Acknowledgement) error { + return k.Ics4Wrapper.WriteAcknowledgement(ctx, chanCap, packet, ack) +} + +func (k Keeper) GetAppVersion(ctx sdk.Context, portID string, channelID string) (string, bool) { + return k.Ics4Wrapper.GetAppVersion(ctx, portID, channelID) +} diff --git a/x/axelarcork/keeper/packet.go b/x/axelarcork/keeper/packet.go index cf5ce5691..ea27cb2f9 100644 --- a/x/axelarcork/keeper/packet.go +++ b/x/axelarcork/keeper/packet.go @@ -2,6 +2,7 @@ package keeper import ( "bytes" + "encoding/hex" "encoding/json" "fmt" @@ -13,15 +14,14 @@ import ( func (k Keeper) ValidateAxelarPacket(ctx sdk.Context, sourceChannel string, data []byte) error { params := k.GetParamSet(ctx) - if !params.Enabled { - return nil - } // check if this is a call to axelar, exit early if this isn't axelar if sourceChannel != params.IbcChannel { return nil } + k.Logger(ctx).Info("checking IBC packet against Axelar middleware validations") + // Parse the data from the packet var packetData transfertypes.FungibleTokenPacketData if err := json.Unmarshal(data, &packetData); err != nil { @@ -46,6 +46,7 @@ func (k Keeper) ValidateAxelarPacket(ctx sdk.Context, sourceChannel string, data // if we are not sending to the axelar gmp management account, we can skip if !bytes.Equal(receiverAddr, gmpAccountAddr) { + k.Logger(ctx).Info("Axelar receiver is not the GMP account, allowing packet", "receiver", hex.EncodeToString(receiverAddr), "gmp account", hex.EncodeToString(gmpAccountAddr)) return nil } @@ -56,6 +57,7 @@ func (k Keeper) ValidateAxelarPacket(ctx sdk.Context, sourceChannel string, data // if the memo field is empty, we can pass the message along if packetData.Memo == "" { + k.Logger(ctx).Error("Axelar GMP packet memo is empty") return nil } @@ -106,6 +108,7 @@ func (k Keeper) ValidateAxelarPacket(ctx sdk.Context, sourceChannel string, data } // all checks have passed, delete the cork from state + k.Logger(ctx).Info("Axelar GMP message validated, deleting from state", "chain ID", chainConfig.Id, "block height", blockHeight, "contract", winningCork.TargetContractAddress) k.DeleteWinningAxelarCorkByBlockheight(ctx, chainConfig.Id, blockHeight, winningCork) return nil @@ -137,6 +140,7 @@ func (k Keeper) ValidateAxelarPacket(ctx sdk.Context, sourceChannel string, data } // all checks have passed, delete the upgrade data from state + k.Logger(ctx).Info("Axelar GMP upgrade message validated, deleting from state", "chain ID", chainConfig.Id) k.DeleteAxelarProxyUpgradeData(ctx, chainConfig.Id) return nil diff --git a/x/axelarcork/tests/setup.go b/x/axelarcork/tests/setup.go index 2a5aab5d5..7816534b3 100644 --- a/x/axelarcork/tests/setup.go +++ b/x/axelarcork/tests/setup.go @@ -179,5 +179,5 @@ func (i initializer) axelarcorkKeeper( } func (i initializer) axelarMiddleware(app porttypes.IBCModule, k *keeper.Keeper) axelarcork.IBCMiddleware { - return axelarcork.NewIBCMiddleware(*k, app) + return axelarcork.NewIBCMiddleware(k, app) } From 3e08f511a59750ae70c847091c860d0014ab5139 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Thu, 1 Feb 2024 23:01:24 -0600 Subject: [PATCH 19/32] More axelar debugging fixes (#275) * Fix arg count for relaying proxy upgrade * proposal examples have correct deposits * fix command parsing for relaying proxy upgrade * fix args list for axelar community spend CLI * Community spend bug: tweaking context argument * Use WrapSDKContext() in Transfer called * Properly format sender address for community spend * Pass along pure token transfers * better pure token transfer handling * Move pure token transfer check * Don't require destintation of community spend to proxy * Add validation to chain confuration add/remove handlers --------- Co-authored-by: Collin Brittain --- x/axelarcork/client/cli/tx.go | 24 ++++++++++++------------ x/axelarcork/keeper/packet.go | 8 ++++++++ x/axelarcork/keeper/proposal_handler.go | 19 +++++++++++++++---- x/cork/client/cli/tx.go | 6 +++--- 4 files changed, 38 insertions(+), 19 deletions(-) diff --git a/x/axelarcork/client/cli/tx.go b/x/axelarcork/client/cli/tx.go index 0e60657ff..df7fd59cc 100644 --- a/x/axelarcork/client/cli/tx.go +++ b/x/axelarcork/client/cli/tx.go @@ -151,7 +151,7 @@ func CmdRelayAxelarCork() *cobra.Command { func CmdRelayAxelarProxyUpgrade() *cobra.Command { cmd := &cobra.Command{ Use: "relay-axelar-proxy-upgrade [chain-id] [token] [fee]", - Args: cobra.ExactArgs(4), + Args: cobra.ExactArgs(3), Short: "Relay a proxy contract upgrade call", RunE: func(cmd *cobra.Command, args []string) error { @@ -167,12 +167,12 @@ func CmdRelayAxelarProxyUpgrade() *cobra.Command { return err } - token, err := sdk.ParseCoinNormalized(args[2]) + token, err := sdk.ParseCoinNormalized(args[1]) if err != nil { return err } - fee, err := math.ParseUint(args[3]) + fee, err := math.ParseUint(args[2]) if err != nil { return err } @@ -258,7 +258,7 @@ Where proposal.json contains: "chain_id": 42161, "cellar_ids": ["0x123801a7D398351b8bE11C439e05C5B3259aeC9B", "0x456801a7D398351b8bE11C439e05C5B3259aeC9B"], "publisher_domain": "example.com", - "deposit": "10000usomm" + "deposit": "10000000usomm" } `, version.AppName, @@ -340,7 +340,7 @@ Where proposal.json contains: "description": "I don't trust them", "chain_id": 42161, "cellar_ids": ["0x123801a7D398351b8bE11C439e05C5B3259aeC9B", "0x456801a7D398351b8bE11C439e05C5B3259aeC9B"], - "deposit": "10000usomm" + "deposit": "10000000usomm" } `, version.AppName, @@ -419,7 +419,7 @@ Where proposal.json contains: "target_contract_address": "0x123801a7D398351b8bE11C439e05C5B3259aeC9B", "contract_call_proto_json": "{\"cellar_id\":\"0x123801a7D398351b8bE11C439e05C5B3259aeC9B\",\"\":{\"some_fuction\":{\"function_args\":{}},\"block_height\":12345}}", "deadline": 1706225320, - "deposit": "10000usomm" + "deposit": "10000000usomm" } The contract_call_proto_json field must be the JSON representation of a ScheduleRequest, which is defined in Steward's protos. For more information, see the Steward API docs at https://github.com/peggyjv/steward. @@ -477,7 +477,7 @@ The contract_call_proto_json field must be the JSON representation of a Schedule func CmdSubmitAxelarCommunityPoolSpendProposal() *cobra.Command { cmd := &cobra.Command{ Use: "axelar-community-pool-spend [proposal-file]", - Args: cobra.ExactArgs(2), + Args: cobra.ExactArgs(1), Short: "Submit an Axelar community pool spend proposal", Long: strings.TrimSpace( fmt.Sprintf(`Submit an Axelar community pool spend proposal along with an initial deposit. @@ -496,7 +496,7 @@ Where proposal.json contains: "recipient": "0x0000000000000000000000000000000000000000", "chain_id": 42161, "amount": "20000usomm", - "deposit": "10000usomm" + "deposit": "10000000usomm" } `, version.AppName, @@ -591,7 +591,7 @@ Where proposal.json contains: } ] }, - "deposit": "10000usomm" + "deposit": "10000000usomm" } Note that the "name" parameter should map to a "Chain Identifier" as defined by Axelar: https://docs.axelar.dev/dev/reference/mainnet-chain-names @@ -663,7 +663,7 @@ Where proposal.json contains: "title": "Remove Arbitrum chain config", "description": "not using Arbitrum any more", "chain_id": 42161, - "deposit": "10000usomm" + "deposit": "10000000usomm" } `, version.AppName, @@ -732,7 +732,7 @@ Where proposal.json contains: "description": "New features", "chain_id": 1000, "new_proxy_address": "0x1234567890123456789012345678901234567890", - "deposit": "10000usomm" + "deposit": "10000000usomm" } `, version.AppName, @@ -805,7 +805,7 @@ Where proposal.json contains: "title": "Cancel Upgrade Axelar Proxy Contract Proposal", "description": "Cancel the new features", "chain_id": 1000, - "deposit": "10000usomm" + "deposit": "10000000usomm" } `, version.AppName, diff --git a/x/axelarcork/keeper/packet.go b/x/axelarcork/keeper/packet.go index ea27cb2f9..de971a218 100644 --- a/x/axelarcork/keeper/packet.go +++ b/x/axelarcork/keeper/packet.go @@ -84,6 +84,14 @@ func (k Keeper) ValidateAxelarPacket(ctx sdk.Context, sourceChannel string, data } axelarDestinationAddr := common.HexToAddress(axelarBody.DestinationAddress) + if axelarBody.Type == types.PureTokenTransfer { + if len(payloadBytes) != 0 { + return fmt.Errorf("payload must be empty for pure token transfer") + } + + return nil + } + if !bytes.Equal(axelarDestinationAddr.Bytes(), proxyAddr.Bytes()) { return fmt.Errorf("msg cannot bypass the proxy. expected addr %s, received %s", chainConfig.ProxyAddress, axelarBody.DestinationAddress) } diff --git a/x/axelarcork/keeper/proposal_handler.go b/x/axelarcork/keeper/proposal_handler.go index 4bffd56e4..1805e0fbd 100644 --- a/x/axelarcork/keeper/proposal_handler.go +++ b/x/axelarcork/keeper/proposal_handler.go @@ -148,7 +148,8 @@ func HandleCommunityPoolSpendProposal(ctx sdk.Context, k Keeper, p types.AxelarC if err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, distributiontypes.ModuleName, types.ModuleName, sdk.NewCoins(coinWithBridgeFee)); err != nil { panic(err) } - sender := k.GetSenderAccount(ctx) + + sender := k.GetSenderAccount(ctx).GetAddress().String() axelarMemo := types.AxelarBody{ DestinationChain: config.Name, @@ -166,13 +167,13 @@ func HandleCommunityPoolSpendProposal(ctx sdk.Context, k Keeper, p types.AxelarC params.IbcPort, params.IbcChannel, coinWithBridgeFee, - sender.String(), + sender, params.GmpAccount, clienttypes.ZeroHeight(), uint64(ctx.BlockTime().Add(time.Duration(params.TimeoutDuration)).UnixNano()), memo, ) - resp, err := k.transferKeeper.Transfer(ctx.Context(), transferMsg) + resp, err := k.transferKeeper.Transfer(sdk.WrapSDKContext(ctx), transferMsg) if err != nil { return err } @@ -183,7 +184,7 @@ func HandleCommunityPoolSpendProposal(ctx sdk.Context, k Keeper, p types.AxelarC "amount", coinWithBridgeFee.Amount.String(), "recipient", p.Recipient, "chain", config.Name, - "sender", sender.String(), + "sender", sender, "timeout duration", params.TimeoutDuration, ) @@ -192,6 +193,11 @@ func HandleCommunityPoolSpendProposal(ctx sdk.Context, k Keeper, p types.AxelarC // HandleAddChainConfigurationProposal is a handler for executing a passed chain configuration addition proposal func HandleAddChainConfigurationProposal(ctx sdk.Context, k Keeper, p types.AddChainConfigurationProposal) error { + err := p.ChainConfiguration.ValidateBasic() + if err != nil { + return err + } + k.SetChainConfiguration(ctx, p.ChainConfiguration.Id, *p.ChainConfiguration) return nil @@ -199,6 +205,11 @@ func HandleAddChainConfigurationProposal(ctx sdk.Context, k Keeper, p types.AddC // HandleRemoveChainConfigurationProposal is a handler for executing a passed chain configuration removal proposal func HandleRemoveChainConfigurationProposal(ctx sdk.Context, k Keeper, p types.RemoveChainConfigurationProposal) error { + _, ok := k.GetChainConfigurationByID(ctx, p.ChainId) + if !ok { + return fmt.Errorf("chain by id %d not found", p.ChainId) + } + k.DeleteChainConfigurationByID(ctx, p.ChainId) return nil diff --git a/x/cork/client/cli/tx.go b/x/cork/client/cli/tx.go index 0c229ab24..4ed2660f0 100644 --- a/x/cork/client/cli/tx.go +++ b/x/cork/client/cli/tx.go @@ -51,7 +51,7 @@ Where proposal.json contains: "description": "I have a hunch", "cellar_ids": ["0x123801a7D398351b8bE11C439e05C5B3259aeC9B", "0x456801a7D398351b8bE11C439e05C5B3259aeC9B"], "publisher_domain": "example.com", - "deposit": "10000usomm" + "deposit": "10000000usomm" } `, version.AppName, @@ -127,7 +127,7 @@ Where proposal.json contains: "title": "Dollary-doos LP Cellar Removal Proposal", "description": "I don't trust them", "cellar_ids": ["0x123801a7D398351b8bE11C439e05C5B3259aeC9B", "0x456801a7D398351b8bE11C439e05C5B3259aeC9B"], - "deposit": "10000usomm" + "deposit": "10000000usomm" } `, version.AppName, @@ -199,7 +199,7 @@ Where proposal.json contains: "block_height": 100000, "target_contract_address": "0x123801a7D398351b8bE11C439e05C5B3259aeC9B", "contract_call_proto_json": "{\"cellar_id\":\"0x123801a7D398351b8bE11C439e05C5B3259aeC9B\",\"\":{\"some_fuction\":{\"function_args\":{}},\"block_height\":12345}}", - "deposit": "10000usomm" + "deposit": "10000000usomm" } The contract_call_proto_json field must be the JSON representation of a ScheduleRequest, which is defined in Steward's protos. For more information, see the Steward API docs at https://github.com/peggyjv/steward. From d94620728ecab1da5a3bf6bb4fd404310ef4ccd6 Mon Sep 17 00:00:00 2001 From: Collin Date: Fri, 2 Feb 2024 10:17:55 -0600 Subject: [PATCH 20/32] Minimum auction height update and fee counter initialization (#276) * Bump minimum auction height to Feb 14th * Update auction height comment to accurately reflect time * Fix comment again * Add fee accrual counter initialization to upgrade for auctionable denoms * Make minimum auction height multiple of auction interval --- app/upgrades/v7/constants.go | 8 ++++++++ app/upgrades/v7/upgrades.go | 33 ++++++++++++++++++++++++++++----- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/app/upgrades/v7/constants.go b/app/upgrades/v7/constants.go index 839e226f1..43b8ba413 100644 --- a/app/upgrades/v7/constants.go +++ b/app/upgrades/v7/constants.go @@ -3,6 +3,14 @@ package v7 // UpgradeName defines the on-chain upgrade name for the Sommelier v7 upgrade const UpgradeName = "v7" +// Fee denominations +const ( + usdcDenom = "gravity0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + fraxDenom = "gravity0x853d955aCEf822Db058eb8505911ED77F175b99e" + wethDenom = "gravity0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" + wbtcDenom = "gravity0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599" +) + // 7seas domain const SevenSeasDomain = "sevenseas.capital" diff --git a/app/upgrades/v7/upgrades.go b/app/upgrades/v7/upgrades.go index 5a03f2f38..e88e75638 100644 --- a/app/upgrades/v7/upgrades.go +++ b/app/upgrades/v7/upgrades.go @@ -75,6 +75,29 @@ func CreateUpgradeHandler( func cellarfeesInitGenesis(ctx sdk.Context, cellarfeesKeeper cellarfeeskeeper.Keeper) { genesisState := cellarfeestypes.DefaultGenesisState() + counters := cellarfeestypes.FeeAccrualCounters{ + Counters: []cellarfeestypes.FeeAccrualCounter{ + { + Denom: fraxDenom, + Count: 2, + }, + { + Denom: usdcDenom, + Count: 2, + }, + { + Denom: wbtcDenom, + Count: 2, + }, + { + Denom: wethDenom, + Count: 2, + }, + }, + } + + genesisState.FeeAccrualCounters = counters + if err := genesisState.Validate(); err != nil { panic(fmt.Errorf("cellarfees genesis state invalid: %s", err)) } @@ -86,7 +109,7 @@ func cellarfeesInitGenesis(ctx sdk.Context, cellarfeesKeeper cellarfeeskeeper.Ke func auctionInitGenesis(ctx sdk.Context, auctionKeeper auctionkeeper.Keeper) { genesisState := auctiontypes.DefaultGenesisState() - genesisState.Params.MinimumAuctionHeight = 13020000 // roughly 2024-02-08 09:30 UTC + genesisState.Params.MinimumAuctionHeight = 13110000 // roughly 2024-02-14 01:00 UTC usomm52WeekLow := sdk.MustNewDecFromStr("0.079151") eth52WeekHigh := sdk.MustNewDecFromStr("2618.33") @@ -104,7 +127,7 @@ func auctionInitGenesis(ctx sdk.Context, auctionKeeper auctionkeeper.Keeper) { // setting stables to 1 dollar usdcPrice := auctiontypes.TokenPrice{ - Denom: "gravity0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + Denom: usdcDenom, UsdPrice: oneDollar, Exponent: 6, LastUpdatedBlock: lastUpdatedBlock, @@ -125,7 +148,7 @@ func auctionInitGenesis(ctx sdk.Context, auctionKeeper auctionkeeper.Keeper) { } fraxPrice := auctiontypes.TokenPrice{ - Denom: "gravity0x853d955aCEf822Db058eb8505911ED77F175b99e", + Denom: fraxDenom, UsdPrice: oneDollar, Exponent: 18, LastUpdatedBlock: lastUpdatedBlock, @@ -133,14 +156,14 @@ func auctionInitGenesis(ctx sdk.Context, auctionKeeper auctionkeeper.Keeper) { // setting non-stables wethPrice := auctiontypes.TokenPrice{ - Denom: "gravity0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", + Denom: wethDenom, UsdPrice: eth52WeekHigh, Exponent: 18, LastUpdatedBlock: lastUpdatedBlock, } wbtcPrice := auctiontypes.TokenPrice{ - Denom: "gravity0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599", + Denom: wbtcDenom, UsdPrice: btc52WeekHigh, Exponent: 8, LastUpdatedBlock: lastUpdatedBlock, From 7061880c7bf3bc2eea3ad92220445c1fe26debd6 Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Sat, 3 Feb 2024 19:21:12 -0600 Subject: [PATCH 21/32] Add query endpoint for subcribers who are validators, simplify AddPublisher proposal (#277) * add query endpoint for subcribers who are validators * update somm_proto * log error rather than panic on invalid subscriber * allow updates to publishers via governance --- proto/pubsub/v1/query.proto | 10 + somm_proto/src/prost/pubsub.v1.rs | 23 ++ x/pubsub/client/cli/query.go | 29 ++ x/pubsub/keeper/keeper.go | 24 ++ x/pubsub/keeper/proposal_handler.go | 5 - x/pubsub/keeper/query_server.go | 6 + x/pubsub/types/query.pb.go | 541 ++++++++++++++++++++++------ x/pubsub/types/query.pb.gw.go | 65 ++++ 8 files changed, 597 insertions(+), 106 deletions(-) diff --git a/proto/pubsub/v1/query.proto b/proto/pubsub/v1/query.proto index ab0c97a77..02ebfd8f4 100644 --- a/proto/pubsub/v1/query.proto +++ b/proto/pubsub/v1/query.proto @@ -30,6 +30,10 @@ service Query { option (google.api.http).get = "/sommelier/pubsub/v1/subscribers"; } + rpc QueryValidatorSubscribers(QueryValidatorSubscribersRequest) returns (QueryValidatorSubscribersResponse) { + option (google.api.http).get = "/sommelier/pubsub/v1/validator_subscribers"; + } + rpc QueryPublisherIntent(QueryPublisherIntentRequest) returns (QueryPublisherIntentResponse) { option (google.api.http).get = "/sommelier/pubsub/v1/publisher_intents/{publisher_domain}/{subscription_id}"; } @@ -109,6 +113,12 @@ message QuerySubscribersResponse { repeated Subscriber subscribers = 1; } +message QueryValidatorSubscribersRequest {} + +message QueryValidatorSubscribersResponse { + repeated Subscriber subscribers = 1; +} + message QueryPublisherIntentRequest { string publisher_domain = 1; string subscription_id = 2; diff --git a/somm_proto/src/prost/pubsub.v1.rs b/somm_proto/src/prost/pubsub.v1.rs index 5c7e97714..c002d481b 100644 --- a/somm_proto/src/prost/pubsub.v1.rs +++ b/somm_proto/src/prost/pubsub.v1.rs @@ -459,6 +459,13 @@ pub struct QuerySubscribersResponse { pub subscribers: ::prost::alloc::vec::Vec, } #[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryValidatorSubscribersRequest {} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryValidatorSubscribersResponse { + #[prost(message, repeated, tag = "1")] + pub subscribers: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryPublisherIntentRequest { #[prost(string, tag = "1")] pub publisher_domain: ::prost::alloc::string::String, @@ -666,6 +673,22 @@ pub mod query_client { let path = http::uri::PathAndQuery::from_static("/pubsub.v1.Query/QuerySubscribers"); self.inner.unary(request.into_request(), path, codec).await } + pub async fn query_validator_subscribers( + &mut self, + request: impl tonic::IntoRequest, + ) -> Result, tonic::Status> + { + self.inner.ready().await.map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = + http::uri::PathAndQuery::from_static("/pubsub.v1.Query/QueryValidatorSubscribers"); + self.inner.unary(request.into_request(), path, codec).await + } pub async fn query_publisher_intent( &mut self, request: impl tonic::IntoRequest, diff --git a/x/pubsub/client/cli/query.go b/x/pubsub/client/cli/query.go index 38f467c02..d178501d4 100644 --- a/x/pubsub/client/cli/query.go +++ b/x/pubsub/client/cli/query.go @@ -26,6 +26,7 @@ func GetQueryCmd(queryRoute string) *cobra.Command { CmdQueryPublishers(), CmdQuerySubscriber(), CmdQuerySubscribers(), + CmdQueryValidatorSubscribers(), CmdQueryPublisherIntent(), CmdQueryPublisherIntents(), CmdQueryPublisherIntentsByPublisherDomain(), @@ -186,6 +187,34 @@ func CmdQuerySubscribers() *cobra.Command { return cmd } +func CmdQueryValidatorSubscribers() *cobra.Command { + cmd := &cobra.Command{ + Use: "validator-subscribers", + Args: cobra.NoArgs, + Short: "Query subscribers who are validators", + RunE: func(cmd *cobra.Command, args []string) error { + ctx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(ctx) + req := &types.QueryValidatorSubscribersRequest{} + + res, err := queryClient.QueryValidatorSubscribers(cmd.Context(), req) + if err != nil { + return err + } + + return ctx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + func CmdQueryPublisherIntent() *cobra.Command { cmd := &cobra.Command{ Use: "publisher-intent", diff --git a/x/pubsub/keeper/keeper.go b/x/pubsub/keeper/keeper.go index 5215552fc..c3a0a4883 100644 --- a/x/pubsub/keeper/keeper.go +++ b/x/pubsub/keeper/keeper.go @@ -11,6 +11,7 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/peggyjv/sommelier/v7/x/pubsub/types" ) @@ -164,6 +165,29 @@ func (k Keeper) GetSubscribers(ctx sdk.Context) (subscribers []*types.Subscriber return } +func (k Keeper) GetValidatorSubscribers(ctx sdk.Context) (subscribers []*types.Subscriber) { + allSubscribers := k.GetSubscribers(ctx) + for _, subscriber := range allSubscribers { + subscriberAddress, err := sdk.AccAddressFromBech32(subscriber.Address) + if err != nil { + ctx.Logger().Error("subscriber address %s not valid bech32 but in state", subscriber.Address) + continue + } + var validatorI stakingtypes.ValidatorI + if validator := k.gravityKeeper.GetOrchestratorValidatorAddress(ctx, subscriberAddress); validator == nil { + validatorI = k.stakingKeeper.Validator(ctx, sdk.ValAddress(subscriberAddress)) + } else { + validatorI = k.stakingKeeper.Validator(ctx, validator) + } + + if validatorI != nil { + subscribers = append(subscribers, subscriber) + } + } + + return +} + func (k Keeper) DeleteSubscriber(ctx sdk.Context, subscriberAddress sdk.AccAddress) { ctx.KVStore(k.storeKey).Delete(types.GetSubscriberKey(subscriberAddress)) diff --git a/x/pubsub/keeper/proposal_handler.go b/x/pubsub/keeper/proposal_handler.go index 42382b853..fc70e6a52 100644 --- a/x/pubsub/keeper/proposal_handler.go +++ b/x/pubsub/keeper/proposal_handler.go @@ -9,11 +9,6 @@ import ( // HandleAddPublisherProposal is a handler for executing a passed community publisher addition proposal func HandleAddPublisherProposal(ctx sdk.Context, k Keeper, p types.AddPublisherProposal) error { - _, found := k.GetPublisher(ctx, p.Domain) - if found { - return errorsmod.Wrapf(types.ErrAlreadyExists, "publisher already exists with domain: %s", p.Domain) - } - publisher := types.Publisher{ Domain: p.Domain, Address: p.Address, diff --git a/x/pubsub/keeper/query_server.go b/x/pubsub/keeper/query_server.go index 33c6d9682..21dbcbadc 100644 --- a/x/pubsub/keeper/query_server.go +++ b/x/pubsub/keeper/query_server.go @@ -73,6 +73,12 @@ func (k Keeper) QuerySubscribers(c context.Context, _ *types.QuerySubscribersReq }, nil } +func (k Keeper) QueryValidatorSubscribers(c context.Context, _ *types.QueryValidatorSubscribersRequest) (*types.QueryValidatorSubscribersResponse, error) { + return &types.QueryValidatorSubscribersResponse{ + Subscribers: k.GetValidatorSubscribers(sdk.UnwrapSDKContext(c)), + }, nil +} + func (k Keeper) QueryPublisherIntent(c context.Context, req *types.QueryPublisherIntentRequest) (*types.QueryPublisherIntentResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") diff --git a/x/pubsub/types/query.pb.go b/x/pubsub/types/query.pb.go index 0d7200026..d3d519412 100644 --- a/x/pubsub/types/query.pb.go +++ b/x/pubsub/types/query.pb.go @@ -446,6 +446,86 @@ func (m *QuerySubscribersResponse) GetSubscribers() []*Subscriber { return nil } +type QueryValidatorSubscribersRequest struct { +} + +func (m *QueryValidatorSubscribersRequest) Reset() { *m = QueryValidatorSubscribersRequest{} } +func (m *QueryValidatorSubscribersRequest) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorSubscribersRequest) ProtoMessage() {} +func (*QueryValidatorSubscribersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_1eae429cdae9f3b6, []int{10} +} +func (m *QueryValidatorSubscribersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryValidatorSubscribersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorSubscribersRequest.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 *QueryValidatorSubscribersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorSubscribersRequest.Merge(m, src) +} +func (m *QueryValidatorSubscribersRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryValidatorSubscribersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorSubscribersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorSubscribersRequest proto.InternalMessageInfo + +type QueryValidatorSubscribersResponse struct { + Subscribers []*Subscriber `protobuf:"bytes,1,rep,name=subscribers,proto3" json:"subscribers,omitempty"` +} + +func (m *QueryValidatorSubscribersResponse) Reset() { *m = QueryValidatorSubscribersResponse{} } +func (m *QueryValidatorSubscribersResponse) String() string { return proto.CompactTextString(m) } +func (*QueryValidatorSubscribersResponse) ProtoMessage() {} +func (*QueryValidatorSubscribersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1eae429cdae9f3b6, []int{11} +} +func (m *QueryValidatorSubscribersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryValidatorSubscribersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryValidatorSubscribersResponse.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 *QueryValidatorSubscribersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryValidatorSubscribersResponse.Merge(m, src) +} +func (m *QueryValidatorSubscribersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryValidatorSubscribersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryValidatorSubscribersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryValidatorSubscribersResponse proto.InternalMessageInfo + +func (m *QueryValidatorSubscribersResponse) GetSubscribers() []*Subscriber { + if m != nil { + return m.Subscribers + } + return nil +} + type QueryPublisherIntentRequest struct { PublisherDomain string `protobuf:"bytes,1,opt,name=publisher_domain,json=publisherDomain,proto3" json:"publisher_domain,omitempty"` SubscriptionId string `protobuf:"bytes,2,opt,name=subscription_id,json=subscriptionId,proto3" json:"subscription_id,omitempty"` @@ -455,7 +535,7 @@ func (m *QueryPublisherIntentRequest) Reset() { *m = QueryPublisherInten func (m *QueryPublisherIntentRequest) String() string { return proto.CompactTextString(m) } func (*QueryPublisherIntentRequest) ProtoMessage() {} func (*QueryPublisherIntentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{10} + return fileDescriptor_1eae429cdae9f3b6, []int{12} } func (m *QueryPublisherIntentRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -506,7 +586,7 @@ func (m *QueryPublisherIntentResponse) Reset() { *m = QueryPublisherInte func (m *QueryPublisherIntentResponse) String() string { return proto.CompactTextString(m) } func (*QueryPublisherIntentResponse) ProtoMessage() {} func (*QueryPublisherIntentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{11} + return fileDescriptor_1eae429cdae9f3b6, []int{13} } func (m *QueryPublisherIntentResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -549,7 +629,7 @@ func (m *QueryPublisherIntentsRequest) Reset() { *m = QueryPublisherInte func (m *QueryPublisherIntentsRequest) String() string { return proto.CompactTextString(m) } func (*QueryPublisherIntentsRequest) ProtoMessage() {} func (*QueryPublisherIntentsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{12} + return fileDescriptor_1eae429cdae9f3b6, []int{14} } func (m *QueryPublisherIntentsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -586,7 +666,7 @@ func (m *QueryPublisherIntentsResponse) Reset() { *m = QueryPublisherInt func (m *QueryPublisherIntentsResponse) String() string { return proto.CompactTextString(m) } func (*QueryPublisherIntentsResponse) ProtoMessage() {} func (*QueryPublisherIntentsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{13} + return fileDescriptor_1eae429cdae9f3b6, []int{15} } func (m *QueryPublisherIntentsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -634,7 +714,7 @@ func (m *QueryPublisherIntentsByPublisherDomainRequest) String() string { } func (*QueryPublisherIntentsByPublisherDomainRequest) ProtoMessage() {} func (*QueryPublisherIntentsByPublisherDomainRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{14} + return fileDescriptor_1eae429cdae9f3b6, []int{16} } func (m *QueryPublisherIntentsByPublisherDomainRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -682,7 +762,7 @@ func (m *QueryPublisherIntentsByPublisherDomainResponse) String() string { } func (*QueryPublisherIntentsByPublisherDomainResponse) ProtoMessage() {} func (*QueryPublisherIntentsByPublisherDomainResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{15} + return fileDescriptor_1eae429cdae9f3b6, []int{17} } func (m *QueryPublisherIntentsByPublisherDomainResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -730,7 +810,7 @@ func (m *QueryPublisherIntentsBySubscriptionIDRequest) String() string { } func (*QueryPublisherIntentsBySubscriptionIDRequest) ProtoMessage() {} func (*QueryPublisherIntentsBySubscriptionIDRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{16} + return fileDescriptor_1eae429cdae9f3b6, []int{18} } func (m *QueryPublisherIntentsBySubscriptionIDRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -778,7 +858,7 @@ func (m *QueryPublisherIntentsBySubscriptionIDResponse) String() string { } func (*QueryPublisherIntentsBySubscriptionIDResponse) ProtoMessage() {} func (*QueryPublisherIntentsBySubscriptionIDResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{17} + return fileDescriptor_1eae429cdae9f3b6, []int{19} } func (m *QueryPublisherIntentsBySubscriptionIDResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -823,7 +903,7 @@ func (m *QuerySubscriberIntentRequest) Reset() { *m = QuerySubscriberInt func (m *QuerySubscriberIntentRequest) String() string { return proto.CompactTextString(m) } func (*QuerySubscriberIntentRequest) ProtoMessage() {} func (*QuerySubscriberIntentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{18} + return fileDescriptor_1eae429cdae9f3b6, []int{20} } func (m *QuerySubscriberIntentRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -874,7 +954,7 @@ func (m *QuerySubscriberIntentResponse) Reset() { *m = QuerySubscriberIn func (m *QuerySubscriberIntentResponse) String() string { return proto.CompactTextString(m) } func (*QuerySubscriberIntentResponse) ProtoMessage() {} func (*QuerySubscriberIntentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{19} + return fileDescriptor_1eae429cdae9f3b6, []int{21} } func (m *QuerySubscriberIntentResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -917,7 +997,7 @@ func (m *QuerySubscriberIntentsRequest) Reset() { *m = QuerySubscriberIn func (m *QuerySubscriberIntentsRequest) String() string { return proto.CompactTextString(m) } func (*QuerySubscriberIntentsRequest) ProtoMessage() {} func (*QuerySubscriberIntentsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{20} + return fileDescriptor_1eae429cdae9f3b6, []int{22} } func (m *QuerySubscriberIntentsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -954,7 +1034,7 @@ func (m *QuerySubscriberIntentsResponse) Reset() { *m = QuerySubscriberI func (m *QuerySubscriberIntentsResponse) String() string { return proto.CompactTextString(m) } func (*QuerySubscriberIntentsResponse) ProtoMessage() {} func (*QuerySubscriberIntentsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{21} + return fileDescriptor_1eae429cdae9f3b6, []int{23} } func (m *QuerySubscriberIntentsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1002,7 +1082,7 @@ func (m *QuerySubscriberIntentsBySubscriberAddressRequest) String() string { } func (*QuerySubscriberIntentsBySubscriberAddressRequest) ProtoMessage() {} func (*QuerySubscriberIntentsBySubscriberAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{22} + return fileDescriptor_1eae429cdae9f3b6, []int{24} } func (m *QuerySubscriberIntentsBySubscriberAddressRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1050,7 +1130,7 @@ func (m *QuerySubscriberIntentsBySubscriberAddressResponse) String() string { } func (*QuerySubscriberIntentsBySubscriberAddressResponse) ProtoMessage() {} func (*QuerySubscriberIntentsBySubscriberAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{23} + return fileDescriptor_1eae429cdae9f3b6, []int{25} } func (m *QuerySubscriberIntentsBySubscriberAddressResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1098,7 +1178,7 @@ func (m *QuerySubscriberIntentsBySubscriptionIDRequest) String() string { } func (*QuerySubscriberIntentsBySubscriptionIDRequest) ProtoMessage() {} func (*QuerySubscriberIntentsBySubscriptionIDRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{24} + return fileDescriptor_1eae429cdae9f3b6, []int{26} } func (m *QuerySubscriberIntentsBySubscriptionIDRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1146,7 +1226,7 @@ func (m *QuerySubscriberIntentsBySubscriptionIDResponse) String() string { } func (*QuerySubscriberIntentsBySubscriptionIDResponse) ProtoMessage() {} func (*QuerySubscriberIntentsBySubscriptionIDResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{25} + return fileDescriptor_1eae429cdae9f3b6, []int{27} } func (m *QuerySubscriberIntentsBySubscriptionIDResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1194,7 +1274,7 @@ func (m *QuerySubscriberIntentsByPublisherDomainRequest) String() string { } func (*QuerySubscriberIntentsByPublisherDomainRequest) ProtoMessage() {} func (*QuerySubscriberIntentsByPublisherDomainRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{26} + return fileDescriptor_1eae429cdae9f3b6, []int{28} } func (m *QuerySubscriberIntentsByPublisherDomainRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1242,7 +1322,7 @@ func (m *QuerySubscriberIntentsByPublisherDomainResponse) String() string { } func (*QuerySubscriberIntentsByPublisherDomainResponse) ProtoMessage() {} func (*QuerySubscriberIntentsByPublisherDomainResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{27} + return fileDescriptor_1eae429cdae9f3b6, []int{29} } func (m *QuerySubscriberIntentsByPublisherDomainResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1286,7 +1366,7 @@ func (m *QueryDefaultSubscriptionRequest) Reset() { *m = QueryDefaultSub func (m *QueryDefaultSubscriptionRequest) String() string { return proto.CompactTextString(m) } func (*QueryDefaultSubscriptionRequest) ProtoMessage() {} func (*QueryDefaultSubscriptionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{28} + return fileDescriptor_1eae429cdae9f3b6, []int{30} } func (m *QueryDefaultSubscriptionRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1330,7 +1410,7 @@ func (m *QueryDefaultSubscriptionResponse) Reset() { *m = QueryDefaultSu func (m *QueryDefaultSubscriptionResponse) String() string { return proto.CompactTextString(m) } func (*QueryDefaultSubscriptionResponse) ProtoMessage() {} func (*QueryDefaultSubscriptionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{29} + return fileDescriptor_1eae429cdae9f3b6, []int{31} } func (m *QueryDefaultSubscriptionResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1373,7 +1453,7 @@ func (m *QueryDefaultSubscriptionsRequest) Reset() { *m = QueryDefaultSu func (m *QueryDefaultSubscriptionsRequest) String() string { return proto.CompactTextString(m) } func (*QueryDefaultSubscriptionsRequest) ProtoMessage() {} func (*QueryDefaultSubscriptionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{30} + return fileDescriptor_1eae429cdae9f3b6, []int{32} } func (m *QueryDefaultSubscriptionsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1410,7 +1490,7 @@ func (m *QueryDefaultSubscriptionsResponse) Reset() { *m = QueryDefaultS func (m *QueryDefaultSubscriptionsResponse) String() string { return proto.CompactTextString(m) } func (*QueryDefaultSubscriptionsResponse) ProtoMessage() {} func (*QueryDefaultSubscriptionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1eae429cdae9f3b6, []int{31} + return fileDescriptor_1eae429cdae9f3b6, []int{33} } func (m *QueryDefaultSubscriptionsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1457,6 +1537,8 @@ func init() { proto.RegisterType((*QuerySubscriberResponse)(nil), "pubsub.v1.QuerySubscriberResponse") proto.RegisterType((*QuerySubscribersRequest)(nil), "pubsub.v1.QuerySubscribersRequest") proto.RegisterType((*QuerySubscribersResponse)(nil), "pubsub.v1.QuerySubscribersResponse") + proto.RegisterType((*QueryValidatorSubscribersRequest)(nil), "pubsub.v1.QueryValidatorSubscribersRequest") + proto.RegisterType((*QueryValidatorSubscribersResponse)(nil), "pubsub.v1.QueryValidatorSubscribersResponse") proto.RegisterType((*QueryPublisherIntentRequest)(nil), "pubsub.v1.QueryPublisherIntentRequest") proto.RegisterType((*QueryPublisherIntentResponse)(nil), "pubsub.v1.QueryPublisherIntentResponse") proto.RegisterType((*QueryPublisherIntentsRequest)(nil), "pubsub.v1.QueryPublisherIntentsRequest") @@ -1484,85 +1566,88 @@ func init() { func init() { proto.RegisterFile("pubsub/v1/query.proto", fileDescriptor_1eae429cdae9f3b6) } var fileDescriptor_1eae429cdae9f3b6 = []byte{ - // 1233 bytes of a gzipped FileDescriptorProto -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x75, 0x8e, 0x2c, 0x19, - 0x88, 0x23, 0xbb, 0x02, 0x10, 0xfb, 0xf3, 0x1a, 0x8c, 0x26, 0x90, 0x25, 0xae, 0x24, 0x1c, 0xc9, - 0xf9, 0x4c, 0xc4, 0xa8, 0x0c, 0x9b, 0x30, 0x96, 0x3d, 0xe2, 0xd9, 0x56, 0xe0, 0x54, 0x1c, 0x24, - 0x2c, 0x84, 0x24, 0x5d, 0xd2, 0x93, 0xec, 0xc0, 0x78, 0x67, 0x6d, 0xef, 0x36, 0x7c, 0xbb, 0xe1, - 0xf7, 0xde, 0x0d, 0x38, 0x0b, 0x43, 0x3c, 0xb0, 0x77, 0xd4, 0xf5, 0x65, 0xa7, 0x32, 0x76, 0x82, - 0x79, 0x9e, 0x4e, 0x9a, 0xef, 0x56, 0x88, 0x0d, 0x17, 0xc4, 0x29, 0x39, 0x97, 0xb7, 0x93, 0x39, - 0x1d, 0x76, 0xc6, 0xeb, 0x57, 0x14, 0xbd, 0x2c, 0xbf, 0x1d, 0xe3, 0x09, 0x0c, 0x44, 0x17, 0xa7, - 0x89, 0xca, 0xb9, 0x0d, 0x13, 0x92, 0x73, 0x8e, 0xe3, 0x36, 0x8c, 0xa4, 0x71, 0x84, 0x95, 0xed, - 0x06, 0x64, 0x38, 0x05, 0x84, 0x92, 0x47, 0x70, 0x49, 0x98, 0x69, 0x35, 0xb6, 0x04, 0x35, 0xec, - 0x63, 0x06, 0xf7, 0xa0, 0xa4, 0x1a, 0xfb, 0x45, 0xd3, 0xfa, 0x08, 0x16, 0x25, 0xa9, 0x37, 0x93, - 0x0f, 0xbe, 0x16, 0xb2, 0x12, 0x34, 0x88, 0x26, 0x6c, 0x90, 0x5d, 0x69, 0xbd, 0xd2, 0x81, 0x5f, - 0x34, 0xa5, 0x36, 0xef, 0x99, 0x78, 0x5a, 0x3a, 0xc7, 0xa1, 0xb7, 0xf5, 0xa0, 0x3e, 0x12, 0x0e, - 0xef, 0xc5, 0x6c, 0x5e, 0xce, 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0x25, 0x1b, 0xf2, 0x7a, 0x3f, 0x57, 0xfb, 0x1c, 0xc0, - 0x23, 0xe2, 0xe9, 0x2d, 0x29, 0xda, 0x9b, 0xbf, 0x68, 0xfc, 0xbb, 0x97, 0x40, 0x5b, 0xe2, 0x42, - 0x1a, 0xb0, 0x5c, 0xaf, 0x17, 0x5f, 0x53, 0xf2, 0x55, 0x6a, 0x56, 0xa1, 0x1c, 0x16, 0x3c, 0xdb, - 0xcf, 0x1a, 0x9c, 0x97, 0xea, 0x6b, 0x54, 0x01, 0x14, 0xcd, 0xde, 0xa2, 0x9a, 0x33, 0x87, 0xbf, - 0xcc, 0xe0, 0x2f, 0xe2, 0x82, 0x3a, 0xfc, 0xd5, 0x3b, 0x4f, 0x0e, 0x74, 0xed, 0xe9, 0x81, 0xae, - 0x3d, 0x3b, 0xd0, 0xb5, 0x6f, 0x0f, 0xf5, 0x81, 0xa7, 0x87, 0xfa, 0xc0, 0x1f, 0x87, 0xfa, 0xc0, - 0xa3, 0x52, 0xd5, 0xf1, 0xb7, 0x5b, 0x56, 0x69, 0xcb, 0xad, 0x1b, 0x9e, 0x5d, 0xad, 0xee, 0x7d, - 0xd6, 0x4e, 0xc4, 0x6d, 0xaf, 0x18, 0xbb, 0x61, 0x70, 0x7f, 0xcf, 0xb3, 0xa9, 0x75, 0x92, 0x7d, - 0xc1, 0x7e, 0xe3, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3a, 0xe8, 0x70, 0xa7, 0x75, 0x17, 0x00, - 0x00, + // 1285 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0x16, 0xa8, 0x94, 0x57, 0xa9, 0x49, 0x5e, 0x9d, 0x92, 0x6e, 0x1a, 0x27, 0x99, 0x8a, + 0x7c, 0x35, 0xf5, 0x92, 0xd0, 0x2a, 0xfd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2, 0x92, 0x2f, 0x64, 0x1a, 0xcc, 0x98, + 0x85, 0x2b, 0xcc, 0xf1, 0x4c, 0xb6, 0x21, 0x31, 0x28, 0x70, 0x06, 0x33, 0x38, 0xa5, 0xc6, 0x00, + 0x5f, 0x68, 0x30, 0xa5, 0x26, 0xba, 0xf1, 0x6a, 0x16, 0x08, 0xd9, 0xa7, 0x52, 0xbf, 0xd6, 0xc3, + 0x49, 0xe2, 0x73, 0x8b, 0xf3, 0xb9, 0x81, 0xd7, 0x7a, 0xbe, 0x11, 0xfc, 0x47, 0x83, 0x37, 0x94, + 0x34, 0x38, 0x2e, 0x65, 0xe3, 0x14, 0x8a, 0x1c, 0xfd, 0xea, 0xe1, 0x0f, 0xf6, 0x56, 0x71, 0xc5, + 0xd2, 0x4e, 0x31, 0x51, 0x60, 0x82, 0x8a, 0xfb, 0x2d, 0xa8, 0xb8, 0xa4, 0x3a, 0x48, 0x57, 0x9c, + 0xe4, 0x75, 0x90, 0xae, 0x38, 0x99, 0x9c, 0x67, 0x8f, 0x38, 0x83, 0x55, 0x7c, 0x90, 0x31, 0x74, + 0xa2, 0x2b, 0x12, 0x0c, 0x46, 0x01, 0x89, 0x9f, 0xb5, 0xd4, 0x7f, 0x2b, 0x41, 0xdf, 0x64, 0x82, + 0x0b, 0x1b, 0x67, 0x56, 0xc1, 0x92, 0x78, 0x18, 0x9c, 0xc7, 0x2c, 0x4e, 0x2b, 0xf2, 0xc0, 0xbf, + 0x35, 0x98, 0x55, 0x16, 0xe3, 0x78, 0x23, 0x13, 0x89, 0xfc, 0x95, 0xa0, 0xdf, 0xec, 0xed, 0x30, + 0x31, 0x5b, 0xe1, 0xcc, 0xde, 0xc1, 0x9b, 0x47, 0xb9, 0x21, 0xfc, 0x37, 0x98, 0x14, 0x99, 0x02, + 0x3d, 0x3d, 0x29, 0x54, 0x5f, 0x0b, 0xe9, 0x49, 0xa1, 0xfc, 0x1a, 0x60, 0x1f, 0x71, 0x96, 0x0f, + 0xf0, 0xbe, 0x22, 0x4b, 0xb5, 0x56, 0xfa, 0x4f, 0x83, 0x69, 0x45, 0xed, 0x8e, 0x2a, 0xe0, 0x25, + 0x13, 0xf2, 0x7a, 0x2f, 0x47, 0x7b, 0x6c, 0xc0, 0x03, 0xe2, 0xc9, 0x29, 0x29, 0x9a, 0x9b, 0xbf, + 0x6a, 0xf4, 0x37, 0xa1, 0x40, 0x08, 0xe3, 0x5c, 0x12, 0xb0, 0xfc, 0x71, 0xa1, 0x5f, 0x54, 0xb2, + 0x55, 0x2a, 0x56, 0xa1, 0x76, 0x17, 0x5c, 0x5b, 0xa8, 0x6f, 0x44, 0x8f, 0x01, 0x54, 0x01, 0x24, + 0xd7, 0x37, 0xdd, 0xde, 0x17, 0x19, 0xfa, 0x46, 0x08, 0x7f, 0xf9, 0xce, 0xb3, 0xbd, 0xbc, 0xf6, + 0x7c, 0x2f, 0xaf, 0xbd, 0xd8, 0xcb, 0x6b, 0xdf, 0xed, 0xe7, 0xfb, 0x9e, 0xef, 0xe7, 0xfb, 0xfe, + 0xd8, 0xcf, 0xf7, 0x3d, 0x2e, 0x54, 0x6c, 0x6f, 0xb3, 0x55, 0x2a, 0x6c, 0x38, 0x35, 0xa3, 0x61, + 0x55, 0x2a, 0x3b, 0x5f, 0xb4, 0x63, 0x7e, 0xdb, 0x4b, 0xc6, 0x76, 0xe0, 0xdc, 0xdb, 0x69, 0x58, + 0x6e, 0xe9, 0x24, 0xff, 0xc3, 0xff, 0xad, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x86, 0x16, 0x16, + 0x32, 0xa4, 0x18, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1582,6 +1667,7 @@ type QueryClient interface { QueryPublishers(ctx context.Context, in *QueryPublishersRequest, opts ...grpc.CallOption) (*QueryPublishersResponse, error) QuerySubscriber(ctx context.Context, in *QuerySubscriberRequest, opts ...grpc.CallOption) (*QuerySubscriberResponse, error) QuerySubscribers(ctx context.Context, in *QuerySubscribersRequest, opts ...grpc.CallOption) (*QuerySubscribersResponse, error) + QueryValidatorSubscribers(ctx context.Context, in *QueryValidatorSubscribersRequest, opts ...grpc.CallOption) (*QueryValidatorSubscribersResponse, error) QueryPublisherIntent(ctx context.Context, in *QueryPublisherIntentRequest, opts ...grpc.CallOption) (*QueryPublisherIntentResponse, error) QueryPublisherIntents(ctx context.Context, in *QueryPublisherIntentsRequest, opts ...grpc.CallOption) (*QueryPublisherIntentsResponse, error) QueryPublisherIntentsByPublisherDomain(ctx context.Context, in *QueryPublisherIntentsByPublisherDomainRequest, opts ...grpc.CallOption) (*QueryPublisherIntentsByPublisherDomainResponse, error) @@ -1648,6 +1734,15 @@ func (c *queryClient) QuerySubscribers(ctx context.Context, in *QuerySubscribers return out, nil } +func (c *queryClient) QueryValidatorSubscribers(ctx context.Context, in *QueryValidatorSubscribersRequest, opts ...grpc.CallOption) (*QueryValidatorSubscribersResponse, error) { + out := new(QueryValidatorSubscribersResponse) + err := c.cc.Invoke(ctx, "/pubsub.v1.Query/QueryValidatorSubscribers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) QueryPublisherIntent(ctx context.Context, in *QueryPublisherIntentRequest, opts ...grpc.CallOption) (*QueryPublisherIntentResponse, error) { out := new(QueryPublisherIntentResponse) err := c.cc.Invoke(ctx, "/pubsub.v1.Query/QueryPublisherIntent", in, out, opts...) @@ -1754,6 +1849,7 @@ type QueryServer interface { QueryPublishers(context.Context, *QueryPublishersRequest) (*QueryPublishersResponse, error) QuerySubscriber(context.Context, *QuerySubscriberRequest) (*QuerySubscriberResponse, error) QuerySubscribers(context.Context, *QuerySubscribersRequest) (*QuerySubscribersResponse, error) + QueryValidatorSubscribers(context.Context, *QueryValidatorSubscribersRequest) (*QueryValidatorSubscribersResponse, error) QueryPublisherIntent(context.Context, *QueryPublisherIntentRequest) (*QueryPublisherIntentResponse, error) QueryPublisherIntents(context.Context, *QueryPublisherIntentsRequest) (*QueryPublisherIntentsResponse, error) QueryPublisherIntentsByPublisherDomain(context.Context, *QueryPublisherIntentsByPublisherDomainRequest) (*QueryPublisherIntentsByPublisherDomainResponse, error) @@ -1786,6 +1882,9 @@ func (*UnimplementedQueryServer) QuerySubscriber(ctx context.Context, req *Query func (*UnimplementedQueryServer) QuerySubscribers(ctx context.Context, req *QuerySubscribersRequest) (*QuerySubscribersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QuerySubscribers not implemented") } +func (*UnimplementedQueryServer) QueryValidatorSubscribers(ctx context.Context, req *QueryValidatorSubscribersRequest) (*QueryValidatorSubscribersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryValidatorSubscribers not implemented") +} func (*UnimplementedQueryServer) QueryPublisherIntent(ctx context.Context, req *QueryPublisherIntentRequest) (*QueryPublisherIntentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryPublisherIntent not implemented") } @@ -1914,6 +2013,24 @@ func _Query_QuerySubscribers_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Query_QueryValidatorSubscribers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryValidatorSubscribersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryValidatorSubscribers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pubsub.v1.Query/QueryValidatorSubscribers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryValidatorSubscribers(ctx, req.(*QueryValidatorSubscribersRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_QueryPublisherIntent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryPublisherIntentRequest) if err := dec(in); err != nil { @@ -2136,6 +2253,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "QuerySubscribers", Handler: _Query_QuerySubscribers_Handler, }, + { + MethodName: "QueryValidatorSubscribers", + Handler: _Query_QueryValidatorSubscribers_Handler, + }, { MethodName: "QueryPublisherIntent", Handler: _Query_QueryPublisherIntent_Handler, @@ -2491,6 +2612,66 @@ func (m *QuerySubscribersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } +func (m *QueryValidatorSubscribersRequest) 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 *QueryValidatorSubscribersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorSubscribersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryValidatorSubscribersResponse) 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 *QueryValidatorSubscribersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryValidatorSubscribersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Subscribers) > 0 { + for iNdEx := len(m.Subscribers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Subscribers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *QueryPublisherIntentRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3346,6 +3527,30 @@ func (m *QuerySubscribersResponse) Size() (n int) { return n } +func (m *QueryValidatorSubscribersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryValidatorSubscribersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Subscribers) > 0 { + for _, e := range m.Subscribers { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func (m *QueryPublisherIntentRequest) Size() (n int) { if m == nil { return 0 @@ -4387,6 +4592,140 @@ func (m *QuerySubscribersResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryValidatorSubscribersRequest) 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 ErrIntOverflowQuery + } + 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: QueryValidatorSubscribersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorSubscribersRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryValidatorSubscribersResponse) 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 ErrIntOverflowQuery + } + 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: QueryValidatorSubscribersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryValidatorSubscribersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subscribers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subscribers = append(m.Subscribers, &Subscriber{}) + if err := m.Subscribers[len(m.Subscribers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryPublisherIntentRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/pubsub/types/query.pb.gw.go b/x/pubsub/types/query.pb.gw.go index 133e021de..f44fb92b7 100644 --- a/x/pubsub/types/query.pb.gw.go +++ b/x/pubsub/types/query.pb.gw.go @@ -195,6 +195,24 @@ func local_request_Query_QuerySubscribers_0(ctx context.Context, marshaler runti } +func request_Query_QueryValidatorSubscribers_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValidatorSubscribersRequest + var metadata runtime.ServerMetadata + + msg, err := client.QueryValidatorSubscribers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QueryValidatorSubscribers_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryValidatorSubscribersRequest + var metadata runtime.ServerMetadata + + msg, err := server.QueryValidatorSubscribers(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_QueryPublisherIntent_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryPublisherIntentRequest var metadata runtime.ServerMetadata @@ -846,6 +864,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_QueryValidatorSubscribers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_QueryValidatorSubscribers_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryValidatorSubscribers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_QueryPublisherIntent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1240,6 +1281,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_QueryValidatorSubscribers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_QueryValidatorSubscribers_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryValidatorSubscribers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_QueryPublisherIntent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1474,6 +1535,8 @@ var ( pattern_Query_QuerySubscribers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "pubsub", "v1", "subscribers"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_QueryValidatorSubscribers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "pubsub", "v1", "validator_subscribers"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_QueryPublisherIntent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"sommelier", "pubsub", "v1", "publisher_intents", "publisher_domain", "subscription_id"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_QueryPublisherIntents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "pubsub", "v1", "publisher_intents"}, "", runtime.AssumeColonVerbOpt(false))) @@ -1508,6 +1571,8 @@ var ( forward_Query_QuerySubscribers_0 = runtime.ForwardResponseMessage + forward_Query_QueryValidatorSubscribers_0 = runtime.ForwardResponseMessage + forward_Query_QueryPublisherIntent_0 = runtime.ForwardResponseMessage forward_Query_QueryPublisherIntents_0 = runtime.ForwardResponseMessage From edbad9df7421e21a020106b3e35e3ac6a949a48a Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Sat, 3 Feb 2024 20:27:36 -0600 Subject: [PATCH 22/32] sort fee counters in v7 upgrade (#278) --- app/upgrades/v7/upgrades.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/upgrades/v7/upgrades.go b/app/upgrades/v7/upgrades.go index e88e75638..e5dca5cf9 100644 --- a/app/upgrades/v7/upgrades.go +++ b/app/upgrades/v7/upgrades.go @@ -78,15 +78,15 @@ func cellarfeesInitGenesis(ctx sdk.Context, cellarfeesKeeper cellarfeeskeeper.Ke counters := cellarfeestypes.FeeAccrualCounters{ Counters: []cellarfeestypes.FeeAccrualCounter{ { - Denom: fraxDenom, + Denom: wbtcDenom, Count: 2, }, { - Denom: usdcDenom, + Denom: fraxDenom, Count: 2, }, { - Denom: wbtcDenom, + Denom: usdcDenom, Count: 2, }, { From 25bf250b9f9b2819f81f78bd856f60871d5139bd Mon Sep 17 00:00:00 2001 From: Eric Bolten Date: Fri, 9 Feb 2024 09:10:20 -0600 Subject: [PATCH 23/32] gravity v4.0.1 (#279) --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 4b6ccf8ef..c3acd521d 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/miguelmota/go-ethereum-hdwallet v0.1.1 github.com/ory/dockertest/v3 v3.10.0 - github.com/peggyjv/gravity-bridge/module/v4 v4.0.0 + github.com/peggyjv/gravity-bridge/module/v4 v4.0.1 github.com/rakyll/statik v0.1.7 github.com/regen-network/cosmos-proto v0.3.1 github.com/spf13/cast v1.5.0 diff --git a/go.sum b/go.sum index e4b1340c3..9f3f7624a 100644 --- a/go.sum +++ b/go.sum @@ -842,8 +842,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw 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/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/peggyjv/gravity-bridge/module/v4 v4.0.0 h1:jH10FodlMxzGdbxAxeNpsql9qhYDlmwqciwOuwuU0LQ= -github.com/peggyjv/gravity-bridge/module/v4 v4.0.0/go.mod h1:n8Jj3X+w6q0Xz19w8feRRl2sfIGV+3FGU4anzXBQGbA= +github.com/peggyjv/gravity-bridge/module/v4 v4.0.1 h1:HO6d8rYdG3GseYVpiVjLu0Nwzbh1wXeF8bET/jXhRbk= +github.com/peggyjv/gravity-bridge/module/v4 v4.0.1/go.mod h1:n8Jj3X+w6q0Xz19w8feRRl2sfIGV+3FGU4anzXBQGbA= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= From 3157d97e1576da7e31adbf5a792aeac6a23a1894 Mon Sep 17 00:00:00 2001 From: Collin Date: Fri, 1 Mar 2024 16:03:38 -0600 Subject: [PATCH 24/32] chore: Update proto build to use buf and the BSR (#285) * Update proto build to use buf and BSR * Build cork protos to v2 package to match go file path * Switch cosmos/gogoproto dependency * Delete vendored google/gogo proto depedencies in favor of BSR * Switch from vendored regen cosmos_proto dep to BSR --- Makefile | 10 +- buf.work.yaml | 4 + docs/core/proto-docs.md | 4119 ----------------- docs/protodoc-markdown.tmpl | 105 - go.mod | 3 +- go.sum | 2 + proto/buf.gen.doc.yaml | 5 + proto/buf.gen.gogo.yaml | 8 + proto/buf.lock | 18 + proto/buf.yaml | 10 + proto/cork/v2/cork.proto | 2 +- proto/cork/v2/genesis.proto | 3 +- proto/cork/v2/proposal.proto | 2 +- proto/cork/v2/query.proto | 2 +- proto/cork/v2/tx.proto | 2 +- scripts/README.md | 7 - scripts/protocgen.sh | 42 +- third_party/proto/buf.lock | 18 + buf.yaml => third_party/proto/buf.yaml | 19 +- third_party/proto/cosmos_proto/cosmos.proto | 16 - third_party/proto/gogoproto/gogo.proto | 145 - .../proto/google/api/annotations.proto | 31 - third_party/proto/google/api/http.proto | 375 -- third_party/proto/google/api/httpbody.proto | 77 - third_party/proto/google/protobuf/any.proto | 158 - x/auction/types/auction.pb.go | 4 +- x/auction/types/genesis.pb.go | 2 +- x/auction/types/proposal.pb.go | 2 +- x/auction/types/query.pb.go | 4 +- x/auction/types/tx.pb.go | 4 +- x/axelarcork/types/axelarcork.pb.go | 2 +- x/axelarcork/types/event.pb.go | 2 +- x/axelarcork/types/genesis.pb.go | 2 +- x/axelarcork/types/proposal.pb.go | 2 +- x/axelarcork/types/query.pb.go | 2 +- x/axelarcork/types/tx.pb.go | 2 +- x/cellarfees/types/cellarfees.pb.go | 2 +- x/cellarfees/types/genesis.pb.go | 2 +- x/cellarfees/types/params.pb.go | 2 +- x/cellarfees/types/query.pb.go | 2 +- x/cork/types/v2/cork.pb.go | 48 +- x/cork/types/v2/genesis.pb.go | 56 +- x/cork/types/v2/proposal.pb.go | 76 +- x/cork/types/v2/query.pb.go | 100 +- x/cork/types/v2/query.pb.gw.go | 2 +- x/cork/types/v2/tx.pb.go | 36 +- x/incentives/types/genesis.pb.go | 2 +- x/incentives/types/query.pb.go | 2 +- x/pubsub/types/genesis.pb.go | 2 +- x/pubsub/types/params.pb.go | 2 +- x/pubsub/types/query.pb.go | 2 +- 51 files changed, 275 insertions(+), 5272 deletions(-) create mode 100644 buf.work.yaml delete mode 100644 docs/core/proto-docs.md delete mode 100644 docs/protodoc-markdown.tmpl create mode 100644 proto/buf.gen.doc.yaml create mode 100644 proto/buf.gen.gogo.yaml create mode 100644 proto/buf.lock create mode 100644 proto/buf.yaml delete mode 100644 scripts/README.md create mode 100644 third_party/proto/buf.lock rename buf.yaml => third_party/proto/buf.yaml (58%) delete mode 100644 third_party/proto/cosmos_proto/cosmos.proto delete mode 100644 third_party/proto/gogoproto/gogo.proto delete mode 100644 third_party/proto/google/api/annotations.proto delete mode 100644 third_party/proto/google/api/http.proto delete mode 100644 third_party/proto/google/api/httpbody.proto delete mode 100644 third_party/proto/google/protobuf/any.proto diff --git a/Makefile b/Makefile index ac37a1d0b..45eb7906d 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ BUILDDIR ?= $(CURDIR)/build TEST_DOCKER_REPO=jackzampolin/sommtest HTTPS_GIT := https://github.com/peggyjv/sommelier.git DOCKER := $(shell which docker) -DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf +DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf:1.29.0 export GO111MODULE = on @@ -212,23 +212,25 @@ test-docker-push: test-docker ### Protobuf ### ############################################################################### +PROTO_BUILD_IMAGE=ghcr.io/cosmos/proto-builder:0.8 + proto-all: proto-format proto-lint proto-gen proto-gen: @echo "Generating Protobuf files" - $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh + $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(PROTO_BUILD_IMAGE) sh ./scripts/protocgen.sh proto-format: @echo "Formatting Protobuf files" $(DOCKER) run --rm -v $(CURDIR):/workspace \ - --workdir /workspace tendermintdev/docker-build-proto \ + --workdir /workspace $PROTO_BUILD_IMAGE \ find ./ -not -path "./third_party/*" -name *.proto -exec .clang-format -i {} \; proto-swagger-gen: @./scripts/protoc-swagger-gen.sh proto-lint: - @$(DOCKER_BUF) check lint --error-format=json + @$(DOCKER_BUF) lint --error-format=json proto-check-breaking: @$(DOCKER_BUF) check breaking --against-input $(HTTPS_GIT)#branch=main diff --git a/buf.work.yaml b/buf.work.yaml new file mode 100644 index 000000000..494296bfa --- /dev/null +++ b/buf.work.yaml @@ -0,0 +1,4 @@ +version: v1 +directories: + - proto + - third_party/proto diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md deleted file mode 100644 index 156c31346..000000000 --- a/docs/core/proto-docs.md +++ /dev/null @@ -1,4119 +0,0 @@ - -# Protobuf Documentation - - -## Table of Contents - -- [auction/v1/auction.proto](#auction/v1/auction.proto) - - [Auction](#auction.v1.Auction) - - [Bid](#auction.v1.Bid) - - [ProposedTokenPrice](#auction.v1.ProposedTokenPrice) - - [TokenPrice](#auction.v1.TokenPrice) - -- [auction/v1/tx.proto](#auction/v1/tx.proto) - - [MsgSubmitBidRequest](#auction.v1.MsgSubmitBidRequest) - - [MsgSubmitBidResponse](#auction.v1.MsgSubmitBidResponse) - - - [Msg](#auction.v1.Msg) - -- [auction/v1/genesis.proto](#auction/v1/genesis.proto) - - [GenesisState](#auction.v1.GenesisState) - - [Params](#auction.v1.Params) - -- [auction/v1/proposal.proto](#auction/v1/proposal.proto) - - [SetTokenPricesProposal](#auction.v1.SetTokenPricesProposal) - - [SetTokenPricesProposalWithDeposit](#auction.v1.SetTokenPricesProposalWithDeposit) - -- [auction/v1/query.proto](#auction/v1/query.proto) - - [QueryActiveAuctionRequest](#auction.v1.QueryActiveAuctionRequest) - - [QueryActiveAuctionResponse](#auction.v1.QueryActiveAuctionResponse) - - [QueryActiveAuctionsRequest](#auction.v1.QueryActiveAuctionsRequest) - - [QueryActiveAuctionsResponse](#auction.v1.QueryActiveAuctionsResponse) - - [QueryBidRequest](#auction.v1.QueryBidRequest) - - [QueryBidResponse](#auction.v1.QueryBidResponse) - - [QueryBidsByAuctionRequest](#auction.v1.QueryBidsByAuctionRequest) - - [QueryBidsByAuctionResponse](#auction.v1.QueryBidsByAuctionResponse) - - [QueryEndedAuctionRequest](#auction.v1.QueryEndedAuctionRequest) - - [QueryEndedAuctionResponse](#auction.v1.QueryEndedAuctionResponse) - - [QueryEndedAuctionsRequest](#auction.v1.QueryEndedAuctionsRequest) - - [QueryEndedAuctionsResponse](#auction.v1.QueryEndedAuctionsResponse) - - [QueryParamsRequest](#auction.v1.QueryParamsRequest) - - [QueryParamsResponse](#auction.v1.QueryParamsResponse) - - [QueryTokenPriceRequest](#auction.v1.QueryTokenPriceRequest) - - [QueryTokenPriceResponse](#auction.v1.QueryTokenPriceResponse) - - [QueryTokenPricesRequest](#auction.v1.QueryTokenPricesRequest) - - [QueryTokenPricesResponse](#auction.v1.QueryTokenPricesResponse) - - - [Query](#auction.v1.Query) - -- [axelarcork/v1/axelarcork.proto](#axelarcork/v1/axelarcork.proto) - - [AxelarContractCallNonce](#axelarcork.v1.AxelarContractCallNonce) - - [AxelarCork](#axelarcork.v1.AxelarCork) - - [AxelarCorkResult](#axelarcork.v1.AxelarCorkResult) - - [AxelarCorkResults](#axelarcork.v1.AxelarCorkResults) - - [AxelarUpgradeData](#axelarcork.v1.AxelarUpgradeData) - - [CellarIDSet](#axelarcork.v1.CellarIDSet) - - [ChainConfiguration](#axelarcork.v1.ChainConfiguration) - - [ChainConfigurations](#axelarcork.v1.ChainConfigurations) - - [ScheduledAxelarCork](#axelarcork.v1.ScheduledAxelarCork) - - [ScheduledAxelarCorks](#axelarcork.v1.ScheduledAxelarCorks) - - [WinningAxelarCork](#axelarcork.v1.WinningAxelarCork) - -- [axelarcork/v1/event.proto](#axelarcork/v1/event.proto) - - [ScheduleCorkEvent](#axelarcork.v1.ScheduleCorkEvent) - -- [axelarcork/v1/genesis.proto](#axelarcork/v1/genesis.proto) - - [GenesisState](#axelarcork.v1.GenesisState) - - [Params](#axelarcork.v1.Params) - -- [axelarcork/v1/proposal.proto](#axelarcork/v1/proposal.proto) - - [AddAxelarManagedCellarIDsProposal](#axelarcork.v1.AddAxelarManagedCellarIDsProposal) - - [AddAxelarManagedCellarIDsProposalWithDeposit](#axelarcork.v1.AddAxelarManagedCellarIDsProposalWithDeposit) - - [AddChainConfigurationProposal](#axelarcork.v1.AddChainConfigurationProposal) - - [AddChainConfigurationProposalWithDeposit](#axelarcork.v1.AddChainConfigurationProposalWithDeposit) - - [AxelarCommunityPoolSpendProposal](#axelarcork.v1.AxelarCommunityPoolSpendProposal) - - [AxelarCommunityPoolSpendProposalForCLI](#axelarcork.v1.AxelarCommunityPoolSpendProposalForCLI) - - [AxelarScheduledCorkProposal](#axelarcork.v1.AxelarScheduledCorkProposal) - - [AxelarScheduledCorkProposalWithDeposit](#axelarcork.v1.AxelarScheduledCorkProposalWithDeposit) - - [CancelAxelarProxyContractUpgradeProposal](#axelarcork.v1.CancelAxelarProxyContractUpgradeProposal) - - [CancelAxelarProxyContractUpgradeProposalWithDeposit](#axelarcork.v1.CancelAxelarProxyContractUpgradeProposalWithDeposit) - - [RemoveAxelarManagedCellarIDsProposal](#axelarcork.v1.RemoveAxelarManagedCellarIDsProposal) - - [RemoveAxelarManagedCellarIDsProposalWithDeposit](#axelarcork.v1.RemoveAxelarManagedCellarIDsProposalWithDeposit) - - [RemoveChainConfigurationProposal](#axelarcork.v1.RemoveChainConfigurationProposal) - - [RemoveChainConfigurationProposalWithDeposit](#axelarcork.v1.RemoveChainConfigurationProposalWithDeposit) - - [UpgradeAxelarProxyContractProposal](#axelarcork.v1.UpgradeAxelarProxyContractProposal) - - [UpgradeAxelarProxyContractProposalWithDeposit](#axelarcork.v1.UpgradeAxelarProxyContractProposalWithDeposit) - -- [axelarcork/v1/query.proto](#axelarcork/v1/query.proto) - - [QueryAxelarContractCallNoncesRequest](#axelarcork.v1.QueryAxelarContractCallNoncesRequest) - - [QueryAxelarContractCallNoncesResponse](#axelarcork.v1.QueryAxelarContractCallNoncesResponse) - - [QueryAxelarProxyUpgradeDataRequest](#axelarcork.v1.QueryAxelarProxyUpgradeDataRequest) - - [QueryAxelarProxyUpgradeDataResponse](#axelarcork.v1.QueryAxelarProxyUpgradeDataResponse) - - [QueryCellarIDsByChainIDRequest](#axelarcork.v1.QueryCellarIDsByChainIDRequest) - - [QueryCellarIDsByChainIDResponse](#axelarcork.v1.QueryCellarIDsByChainIDResponse) - - [QueryCellarIDsRequest](#axelarcork.v1.QueryCellarIDsRequest) - - [QueryCellarIDsResponse](#axelarcork.v1.QueryCellarIDsResponse) - - [QueryChainConfigurationsRequest](#axelarcork.v1.QueryChainConfigurationsRequest) - - [QueryChainConfigurationsResponse](#axelarcork.v1.QueryChainConfigurationsResponse) - - [QueryCorkResultRequest](#axelarcork.v1.QueryCorkResultRequest) - - [QueryCorkResultResponse](#axelarcork.v1.QueryCorkResultResponse) - - [QueryCorkResultsRequest](#axelarcork.v1.QueryCorkResultsRequest) - - [QueryCorkResultsResponse](#axelarcork.v1.QueryCorkResultsResponse) - - [QueryParamsRequest](#axelarcork.v1.QueryParamsRequest) - - [QueryParamsResponse](#axelarcork.v1.QueryParamsResponse) - - [QueryScheduledBlockHeightsRequest](#axelarcork.v1.QueryScheduledBlockHeightsRequest) - - [QueryScheduledBlockHeightsResponse](#axelarcork.v1.QueryScheduledBlockHeightsResponse) - - [QueryScheduledCorksByBlockHeightRequest](#axelarcork.v1.QueryScheduledCorksByBlockHeightRequest) - - [QueryScheduledCorksByBlockHeightResponse](#axelarcork.v1.QueryScheduledCorksByBlockHeightResponse) - - [QueryScheduledCorksByIDRequest](#axelarcork.v1.QueryScheduledCorksByIDRequest) - - [QueryScheduledCorksByIDResponse](#axelarcork.v1.QueryScheduledCorksByIDResponse) - - [QueryScheduledCorksRequest](#axelarcork.v1.QueryScheduledCorksRequest) - - [QueryScheduledCorksResponse](#axelarcork.v1.QueryScheduledCorksResponse) - - [QueryWinningAxelarCorkRequest](#axelarcork.v1.QueryWinningAxelarCorkRequest) - - [QueryWinningAxelarCorkResponse](#axelarcork.v1.QueryWinningAxelarCorkResponse) - - [QueryWinningAxelarCorksRequest](#axelarcork.v1.QueryWinningAxelarCorksRequest) - - [QueryWinningAxelarCorksResponse](#axelarcork.v1.QueryWinningAxelarCorksResponse) - - - [Query](#axelarcork.v1.Query) - -- [axelarcork/v1/tx.proto](#axelarcork/v1/tx.proto) - - [MsgBumpAxelarCorkGasRequest](#axelarcork.v1.MsgBumpAxelarCorkGasRequest) - - [MsgBumpAxelarCorkGasResponse](#axelarcork.v1.MsgBumpAxelarCorkGasResponse) - - [MsgCancelAxelarCorkRequest](#axelarcork.v1.MsgCancelAxelarCorkRequest) - - [MsgCancelAxelarCorkResponse](#axelarcork.v1.MsgCancelAxelarCorkResponse) - - [MsgRelayAxelarCorkRequest](#axelarcork.v1.MsgRelayAxelarCorkRequest) - - [MsgRelayAxelarCorkResponse](#axelarcork.v1.MsgRelayAxelarCorkResponse) - - [MsgRelayAxelarProxyUpgradeRequest](#axelarcork.v1.MsgRelayAxelarProxyUpgradeRequest) - - [MsgRelayAxelarProxyUpgradeResponse](#axelarcork.v1.MsgRelayAxelarProxyUpgradeResponse) - - [MsgScheduleAxelarCorkRequest](#axelarcork.v1.MsgScheduleAxelarCorkRequest) - - [MsgScheduleAxelarCorkResponse](#axelarcork.v1.MsgScheduleAxelarCorkResponse) - - - [Msg](#axelarcork.v1.Msg) - -- [cellarfees/v1/cellarfees.proto](#cellarfees/v1/cellarfees.proto) - - [FeeAccrualCounter](#cellarfees.v1.FeeAccrualCounter) - - [FeeAccrualCounters](#cellarfees.v1.FeeAccrualCounters) - -- [cellarfees/v1/params.proto](#cellarfees/v1/params.proto) - - [Params](#cellarfees.v1.Params) - -- [cellarfees/v1/genesis.proto](#cellarfees/v1/genesis.proto) - - [GenesisState](#cellarfees.v1.GenesisState) - -- [cellarfees/v1/query.proto](#cellarfees/v1/query.proto) - - [QueryAPYRequest](#cellarfees.v1.QueryAPYRequest) - - [QueryAPYResponse](#cellarfees.v1.QueryAPYResponse) - - [QueryFeeAccrualCountersRequest](#cellarfees.v1.QueryFeeAccrualCountersRequest) - - [QueryFeeAccrualCountersResponse](#cellarfees.v1.QueryFeeAccrualCountersResponse) - - [QueryLastRewardSupplyPeakRequest](#cellarfees.v1.QueryLastRewardSupplyPeakRequest) - - [QueryLastRewardSupplyPeakResponse](#cellarfees.v1.QueryLastRewardSupplyPeakResponse) - - [QueryModuleAccountsRequest](#cellarfees.v1.QueryModuleAccountsRequest) - - [QueryModuleAccountsResponse](#cellarfees.v1.QueryModuleAccountsResponse) - - [QueryParamsRequest](#cellarfees.v1.QueryParamsRequest) - - [QueryParamsResponse](#cellarfees.v1.QueryParamsResponse) - - - [Query](#cellarfees.v1.Query) - -- [cork/v2/cork.proto](#cork/v2/cork.proto) - - [CellarIDSet](#cork.v2.CellarIDSet) - - [Cork](#cork.v2.Cork) - - [CorkResult](#cork.v2.CorkResult) - - [ScheduledCork](#cork.v2.ScheduledCork) - -- [cork/v2/genesis.proto](#cork/v2/genesis.proto) - - [GenesisState](#cork.v2.GenesisState) - - [Params](#cork.v2.Params) - -- [cork/v2/proposal.proto](#cork/v2/proposal.proto) - - [AddManagedCellarIDsProposal](#cork.v2.AddManagedCellarIDsProposal) - - [AddManagedCellarIDsProposalWithDeposit](#cork.v2.AddManagedCellarIDsProposalWithDeposit) - - [RemoveManagedCellarIDsProposal](#cork.v2.RemoveManagedCellarIDsProposal) - - [RemoveManagedCellarIDsProposalWithDeposit](#cork.v2.RemoveManagedCellarIDsProposalWithDeposit) - - [ScheduledCorkProposal](#cork.v2.ScheduledCorkProposal) - - [ScheduledCorkProposalWithDeposit](#cork.v2.ScheduledCorkProposalWithDeposit) - -- [cork/v2/query.proto](#cork/v2/query.proto) - - [QueryCellarIDsRequest](#cork.v2.QueryCellarIDsRequest) - - [QueryCellarIDsResponse](#cork.v2.QueryCellarIDsResponse) - - [QueryCorkResultRequest](#cork.v2.QueryCorkResultRequest) - - [QueryCorkResultResponse](#cork.v2.QueryCorkResultResponse) - - [QueryCorkResultsRequest](#cork.v2.QueryCorkResultsRequest) - - [QueryCorkResultsResponse](#cork.v2.QueryCorkResultsResponse) - - [QueryParamsRequest](#cork.v2.QueryParamsRequest) - - [QueryParamsResponse](#cork.v2.QueryParamsResponse) - - [QueryScheduledBlockHeightsRequest](#cork.v2.QueryScheduledBlockHeightsRequest) - - [QueryScheduledBlockHeightsResponse](#cork.v2.QueryScheduledBlockHeightsResponse) - - [QueryScheduledCorksByBlockHeightRequest](#cork.v2.QueryScheduledCorksByBlockHeightRequest) - - [QueryScheduledCorksByBlockHeightResponse](#cork.v2.QueryScheduledCorksByBlockHeightResponse) - - [QueryScheduledCorksByIDRequest](#cork.v2.QueryScheduledCorksByIDRequest) - - [QueryScheduledCorksByIDResponse](#cork.v2.QueryScheduledCorksByIDResponse) - - [QueryScheduledCorksRequest](#cork.v2.QueryScheduledCorksRequest) - - [QueryScheduledCorksResponse](#cork.v2.QueryScheduledCorksResponse) - - - [Query](#cork.v2.Query) - -- [cork/v2/tx.proto](#cork/v2/tx.proto) - - [MsgScheduleCorkRequest](#cork.v2.MsgScheduleCorkRequest) - - [MsgScheduleCorkResponse](#cork.v2.MsgScheduleCorkResponse) - - - [Msg](#cork.v2.Msg) - -- [incentives/v1/genesis.proto](#incentives/v1/genesis.proto) - - [GenesisState](#incentives.v1.GenesisState) - - [Params](#incentives.v1.Params) - -- [incentives/v1/query.proto](#incentives/v1/query.proto) - - [QueryAPYRequest](#incentives.v1.QueryAPYRequest) - - [QueryAPYResponse](#incentives.v1.QueryAPYResponse) - - [QueryParamsRequest](#incentives.v1.QueryParamsRequest) - - [QueryParamsResponse](#incentives.v1.QueryParamsResponse) - - - [Query](#incentives.v1.Query) - -- [pubsub/v1/params.proto](#pubsub/v1/params.proto) - - [Params](#pubsub.v1.Params) - -- [pubsub/v1/pubsub.proto](#pubsub/v1/pubsub.proto) - - [AddDefaultSubscriptionProposal](#pubsub.v1.AddDefaultSubscriptionProposal) - - [AddDefaultSubscriptionProposalWithDeposit](#pubsub.v1.AddDefaultSubscriptionProposalWithDeposit) - - [AddPublisherProposal](#pubsub.v1.AddPublisherProposal) - - [AddPublisherProposalWithDeposit](#pubsub.v1.AddPublisherProposalWithDeposit) - - [DefaultSubscription](#pubsub.v1.DefaultSubscription) - - [Publisher](#pubsub.v1.Publisher) - - [PublisherIntent](#pubsub.v1.PublisherIntent) - - [RemoveDefaultSubscriptionProposal](#pubsub.v1.RemoveDefaultSubscriptionProposal) - - [RemoveDefaultSubscriptionProposalWithDeposit](#pubsub.v1.RemoveDefaultSubscriptionProposalWithDeposit) - - [RemovePublisherProposal](#pubsub.v1.RemovePublisherProposal) - - [RemovePublisherProposalWithDeposit](#pubsub.v1.RemovePublisherProposalWithDeposit) - - [Subscriber](#pubsub.v1.Subscriber) - - [SubscriberIntent](#pubsub.v1.SubscriberIntent) - - - [AllowedSubscribers](#pubsub.v1.AllowedSubscribers) - - [PublishMethod](#pubsub.v1.PublishMethod) - -- [pubsub/v1/genesis.proto](#pubsub/v1/genesis.proto) - - [GenesisState](#pubsub.v1.GenesisState) - -- [pubsub/v1/query.proto](#pubsub/v1/query.proto) - - [QueryDefaultSubscriptionRequest](#pubsub.v1.QueryDefaultSubscriptionRequest) - - [QueryDefaultSubscriptionResponse](#pubsub.v1.QueryDefaultSubscriptionResponse) - - [QueryDefaultSubscriptionsRequest](#pubsub.v1.QueryDefaultSubscriptionsRequest) - - [QueryDefaultSubscriptionsResponse](#pubsub.v1.QueryDefaultSubscriptionsResponse) - - [QueryParamsRequest](#pubsub.v1.QueryParamsRequest) - - [QueryParamsResponse](#pubsub.v1.QueryParamsResponse) - - [QueryPublisherIntentRequest](#pubsub.v1.QueryPublisherIntentRequest) - - [QueryPublisherIntentResponse](#pubsub.v1.QueryPublisherIntentResponse) - - [QueryPublisherIntentsByPublisherDomainRequest](#pubsub.v1.QueryPublisherIntentsByPublisherDomainRequest) - - [QueryPublisherIntentsByPublisherDomainResponse](#pubsub.v1.QueryPublisherIntentsByPublisherDomainResponse) - - [QueryPublisherIntentsBySubscriptionIDRequest](#pubsub.v1.QueryPublisherIntentsBySubscriptionIDRequest) - - [QueryPublisherIntentsBySubscriptionIDResponse](#pubsub.v1.QueryPublisherIntentsBySubscriptionIDResponse) - - [QueryPublisherIntentsRequest](#pubsub.v1.QueryPublisherIntentsRequest) - - [QueryPublisherIntentsResponse](#pubsub.v1.QueryPublisherIntentsResponse) - - [QueryPublisherRequest](#pubsub.v1.QueryPublisherRequest) - - [QueryPublisherResponse](#pubsub.v1.QueryPublisherResponse) - - [QueryPublishersRequest](#pubsub.v1.QueryPublishersRequest) - - [QueryPublishersResponse](#pubsub.v1.QueryPublishersResponse) - - [QuerySubscriberIntentRequest](#pubsub.v1.QuerySubscriberIntentRequest) - - [QuerySubscriberIntentResponse](#pubsub.v1.QuerySubscriberIntentResponse) - - [QuerySubscriberIntentsByPublisherDomainRequest](#pubsub.v1.QuerySubscriberIntentsByPublisherDomainRequest) - - [QuerySubscriberIntentsByPublisherDomainResponse](#pubsub.v1.QuerySubscriberIntentsByPublisherDomainResponse) - - [QuerySubscriberIntentsBySubscriberAddressRequest](#pubsub.v1.QuerySubscriberIntentsBySubscriberAddressRequest) - - [QuerySubscriberIntentsBySubscriberAddressResponse](#pubsub.v1.QuerySubscriberIntentsBySubscriberAddressResponse) - - [QuerySubscriberIntentsBySubscriptionIDRequest](#pubsub.v1.QuerySubscriberIntentsBySubscriptionIDRequest) - - [QuerySubscriberIntentsBySubscriptionIDResponse](#pubsub.v1.QuerySubscriberIntentsBySubscriptionIDResponse) - - [QuerySubscriberIntentsRequest](#pubsub.v1.QuerySubscriberIntentsRequest) - - [QuerySubscriberIntentsResponse](#pubsub.v1.QuerySubscriberIntentsResponse) - - [QuerySubscriberRequest](#pubsub.v1.QuerySubscriberRequest) - - [QuerySubscriberResponse](#pubsub.v1.QuerySubscriberResponse) - - [QuerySubscribersRequest](#pubsub.v1.QuerySubscribersRequest) - - [QuerySubscribersResponse](#pubsub.v1.QuerySubscribersResponse) - - - [Query](#pubsub.v1.Query) - -- [pubsub/v1/tx.proto](#pubsub/v1/tx.proto) - - [MsgAddPublisherIntentRequest](#pubsub.v1.MsgAddPublisherIntentRequest) - - [MsgAddPublisherIntentResponse](#pubsub.v1.MsgAddPublisherIntentResponse) - - [MsgAddSubscriberIntentRequest](#pubsub.v1.MsgAddSubscriberIntentRequest) - - [MsgAddSubscriberIntentResponse](#pubsub.v1.MsgAddSubscriberIntentResponse) - - [MsgAddSubscriberRequest](#pubsub.v1.MsgAddSubscriberRequest) - - [MsgAddSubscriberResponse](#pubsub.v1.MsgAddSubscriberResponse) - - [MsgRemovePublisherIntentRequest](#pubsub.v1.MsgRemovePublisherIntentRequest) - - [MsgRemovePublisherIntentResponse](#pubsub.v1.MsgRemovePublisherIntentResponse) - - [MsgRemovePublisherRequest](#pubsub.v1.MsgRemovePublisherRequest) - - [MsgRemovePublisherResponse](#pubsub.v1.MsgRemovePublisherResponse) - - [MsgRemoveSubscriberIntentRequest](#pubsub.v1.MsgRemoveSubscriberIntentRequest) - - [MsgRemoveSubscriberIntentResponse](#pubsub.v1.MsgRemoveSubscriberIntentResponse) - - [MsgRemoveSubscriberRequest](#pubsub.v1.MsgRemoveSubscriberRequest) - - [MsgRemoveSubscriberResponse](#pubsub.v1.MsgRemoveSubscriberResponse) - - - [Msg](#pubsub.v1.Msg) - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## auction/v1/auction.proto - - - - - -### Auction - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [uint32](#uint32) | | | -| `starting_tokens_for_sale` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `start_block` | [uint64](#uint64) | | | -| `end_block` | [uint64](#uint64) | | | -| `initial_price_decrease_rate` | [string](#string) | | | -| `current_price_decrease_rate` | [string](#string) | | | -| `price_decrease_block_interval` | [uint64](#uint64) | | | -| `initial_unit_price_in_usomm` | [string](#string) | | | -| `current_unit_price_in_usomm` | [string](#string) | | | -| `remaining_tokens_for_sale` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `funding_module_account` | [string](#string) | | | -| `proceeds_module_account` | [string](#string) | | | - - - - - - - - -### Bid - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [uint64](#uint64) | | | -| `auction_id` | [uint32](#uint32) | | | -| `bidder` | [string](#string) | | | -| `max_bid_in_usomm` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `sale_token_minimum_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `total_fulfilled_sale_tokens` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `sale_token_unit_price_in_usomm` | [string](#string) | | | -| `total_usomm_paid` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `block_height` | [uint64](#uint64) | | | - - - - - - - - -### ProposedTokenPrice - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `exponent` | [uint64](#uint64) | | | -| `usd_price` | [string](#string) | | | - - - - - - - - -### TokenPrice -USD price is the value for one non-fractional token (smallest unit of the token * 10^exponent) - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `exponent` | [uint64](#uint64) | | | -| `usd_price` | [string](#string) | | | -| `last_updated_block` | [uint64](#uint64) | | | - - - - - - - - - - - - - - - - -

Top

- -## auction/v1/tx.proto - - - - - -### MsgSubmitBidRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `auction_id` | [uint32](#uint32) | | | -| `signer` | [string](#string) | | | -| `max_bid_in_usomm` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `sale_token_minimum_amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### MsgSubmitBidResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `bid` | [Bid](#auction.v1.Bid) | | | - - - - - - - - - - - - - - -### Msg - - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `SubmitBid` | [MsgSubmitBidRequest](#auction.v1.MsgSubmitBidRequest) | [MsgSubmitBidResponse](#auction.v1.MsgSubmitBidResponse) | | | - - - - - - -

Top

- -## auction/v1/genesis.proto - - - - - -### GenesisState - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#auction.v1.Params) | | | -| `auctions` | [Auction](#auction.v1.Auction) | repeated | | -| `bids` | [Bid](#auction.v1.Bid) | repeated | | -| `token_prices` | [TokenPrice](#auction.v1.TokenPrice) | repeated | | -| `last_auction_id` | [uint32](#uint32) | | | -| `last_bid_id` | [uint64](#uint64) | | | - - - - - - - - -### Params - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `price_max_block_age` | [uint64](#uint64) | | | -| `minimum_bid_in_usomm` | [uint64](#uint64) | | | -| `minimum_sale_tokens_usd_value` | [string](#string) | | | -| `auction_max_block_age` | [uint64](#uint64) | | | -| `auction_price_decrease_acceleration_rate` | [string](#string) | | | -| `minimum_auction_height` | [uint64](#uint64) | | | - - - - - - - - - - - - - - - - -

Top

- -## auction/v1/proposal.proto - - - - - -### SetTokenPricesProposal - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `token_prices` | [ProposedTokenPrice](#auction.v1.ProposedTokenPrice) | repeated | | - - - - - - - - -### SetTokenPricesProposalWithDeposit - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `token_prices` | [ProposedTokenPrice](#auction.v1.ProposedTokenPrice) | repeated | | -| `deposit` | [string](#string) | | | - - - - - - - - - - - - - - - - -

Top

- -## auction/v1/query.proto - - - - - -### QueryActiveAuctionRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `auction_id` | [uint32](#uint32) | | | - - - - - - - - -### QueryActiveAuctionResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `auction` | [Auction](#auction.v1.Auction) | | | - - - - - - - - -### QueryActiveAuctionsRequest - - - - - - - - - -### QueryActiveAuctionsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `auctions` | [Auction](#auction.v1.Auction) | repeated | | - - - - - - - - -### QueryBidRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `bid_id` | [uint64](#uint64) | | | -| `auction_id` | [uint32](#uint32) | | | - - - - - - - - -### QueryBidResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `bid` | [Bid](#auction.v1.Bid) | | | - - - - - - - - -### QueryBidsByAuctionRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `auction_id` | [uint32](#uint32) | | | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - -### QueryBidsByAuctionResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `bids` | [Bid](#auction.v1.Bid) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - -### QueryEndedAuctionRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `auction_id` | [uint32](#uint32) | | | - - - - - - - - -### QueryEndedAuctionResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `auction` | [Auction](#auction.v1.Auction) | | | - - - - - - - - -### QueryEndedAuctionsRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - - - - - - - - -### QueryEndedAuctionsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `auctions` | [Auction](#auction.v1.Auction) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - - - - - - - - -### QueryParamsRequest - - - - - - - - - -### QueryParamsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#auction.v1.Params) | | | - - - - - - - - -### QueryTokenPriceRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | - - - - - - - - -### QueryTokenPriceResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `token_price` | [TokenPrice](#auction.v1.TokenPrice) | | | - - - - - - - - -### QueryTokenPricesRequest - - - - - - - - - -### QueryTokenPricesResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `token_prices` | [TokenPrice](#auction.v1.TokenPrice) | repeated | | - - - - - - - - - - - - - - -### Query - - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `QueryParams` | [QueryParamsRequest](#auction.v1.QueryParamsRequest) | [QueryParamsResponse](#auction.v1.QueryParamsResponse) | | GET|/sommelier/auction/v1/params| -| `QueryActiveAuction` | [QueryActiveAuctionRequest](#auction.v1.QueryActiveAuctionRequest) | [QueryActiveAuctionResponse](#auction.v1.QueryActiveAuctionResponse) | | GET|/sommelier/auction/v1/active_auctions/{auction_id}| -| `QueryEndedAuction` | [QueryEndedAuctionRequest](#auction.v1.QueryEndedAuctionRequest) | [QueryEndedAuctionResponse](#auction.v1.QueryEndedAuctionResponse) | | GET|/sommelier/auction/v1/ended_auctions/{auction_id}| -| `QueryActiveAuctions` | [QueryActiveAuctionsRequest](#auction.v1.QueryActiveAuctionsRequest) | [QueryActiveAuctionsResponse](#auction.v1.QueryActiveAuctionsResponse) | | GET|/sommelier/auction/v1/active_auctions| -| `QueryEndedAuctions` | [QueryEndedAuctionsRequest](#auction.v1.QueryEndedAuctionsRequest) | [QueryEndedAuctionsResponse](#auction.v1.QueryEndedAuctionsResponse) | | GET|/sommelier/auction/v1/ended_auctions| -| `QueryBid` | [QueryBidRequest](#auction.v1.QueryBidRequest) | [QueryBidResponse](#auction.v1.QueryBidResponse) | | GET|/sommelier/auction/v1/auctions/{auction_id}/bids/{bid_id}| -| `QueryBidsByAuction` | [QueryBidsByAuctionRequest](#auction.v1.QueryBidsByAuctionRequest) | [QueryBidsByAuctionResponse](#auction.v1.QueryBidsByAuctionResponse) | | GET|/sommelier/auction/v1/auctions/{auction_id}/bids| -| `QueryTokenPrice` | [QueryTokenPriceRequest](#auction.v1.QueryTokenPriceRequest) | [QueryTokenPriceResponse](#auction.v1.QueryTokenPriceResponse) | | GET|/sommelier/auction/v1/token_prices/{denom}| -| `QueryTokenPrices` | [QueryTokenPricesRequest](#auction.v1.QueryTokenPricesRequest) | [QueryTokenPricesResponse](#auction.v1.QueryTokenPricesResponse) | | GET|/sommelier/auction/v1/token_prices| - - - - - - -

Top

- -## axelarcork/v1/axelarcork.proto - - - - - -### AxelarContractCallNonce -Used to enforce strictly newer call ordering per contract - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `chain_id` | [uint64](#uint64) | | | -| `contract_address` | [string](#string) | | | -| `nonce` | [uint64](#uint64) | | | - - - - - - - - -### AxelarCork - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `encoded_contract_call` | [bytes](#bytes) | | call body containing the ABI encoded bytes to send to the contract | -| `chain_id` | [uint64](#uint64) | | the chain ID of the evm target chain | -| `target_contract_address` | [string](#string) | | address of the contract to send the call | -| `deadline` | [uint64](#uint64) | | unix timestamp before which the contract call must be executed. enforced by the proxy contract. | - - - - - - - - -### AxelarCorkResult - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cork` | [AxelarCork](#axelarcork.v1.AxelarCork) | | | -| `block_height` | [uint64](#uint64) | | | -| `approved` | [bool](#bool) | | | -| `approval_percentage` | [string](#string) | | | - - - - - - - - -### AxelarCorkResults - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cork_results` | [AxelarCorkResult](#axelarcork.v1.AxelarCorkResult) | repeated | | - - - - - - - - -### AxelarUpgradeData -Represents a proxy contract upgrade approved by governance with a delay in -execution in case of an error. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `chain_id` | [uint64](#uint64) | | | -| `payload` | [bytes](#bytes) | | | -| `executable_height_threshold` | [int64](#int64) | | | - - - - - - - - -### CellarIDSet - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `chain_id` | [uint64](#uint64) | | | -| `ids` | [string](#string) | repeated | | - - - - - - - - -### ChainConfiguration - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `name` | [string](#string) | | | -| `id` | [uint64](#uint64) | | | -| `proxy_address` | [string](#string) | | | -| `bridge_fees` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | pure token transfers have a fixed fee deducted from the amount sent in the ICS-20 message depending on the asset and destination chain they can be calculated here: https://docs.axelar.dev/resources/mainnet#cross-chain-relayer-gas-fee | - - - - - - - - -### ChainConfigurations - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `configurations` | [ChainConfiguration](#axelarcork.v1.ChainConfiguration) | repeated | | - - - - - - - - -### ScheduledAxelarCork - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cork` | [AxelarCork](#axelarcork.v1.AxelarCork) | | | -| `block_height` | [uint64](#uint64) | | | -| `validator` | [string](#string) | | | -| `id` | [string](#string) | | | - - - - - - - - -### ScheduledAxelarCorks - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `scheduled_corks` | [ScheduledAxelarCork](#axelarcork.v1.ScheduledAxelarCork) | repeated | | - - - - - - - - -### WinningAxelarCork -Represents a cork that has received enough votes to be executed - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cork` | [AxelarCork](#axelarcork.v1.AxelarCork) | | | -| `block_height` | [uint64](#uint64) | | | - - - - - - - - - - - - - - - - -

Top

- -## axelarcork/v1/event.proto - - - - - -### ScheduleCorkEvent - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `signer` | [string](#string) | | | -| `validator` | [string](#string) | | | -| `cork` | [string](#string) | | | -| `block_height` | [uint64](#uint64) | | | -| `chain_id` | [uint64](#uint64) | | | - - - - - - - - - - - - - - - - -

Top

- -## axelarcork/v1/genesis.proto - - - - - -### GenesisState -GenesisState - all cork state that must be provided at genesis - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#axelarcork.v1.Params) | | | -| `chain_configurations` | [ChainConfigurations](#axelarcork.v1.ChainConfigurations) | | | -| `cellar_ids` | [CellarIDSet](#axelarcork.v1.CellarIDSet) | repeated | | -| `scheduled_corks` | [ScheduledAxelarCorks](#axelarcork.v1.ScheduledAxelarCorks) | | | -| `cork_results` | [AxelarCorkResults](#axelarcork.v1.AxelarCorkResults) | | | -| `axelar_contract_call_nonces` | [AxelarContractCallNonce](#axelarcork.v1.AxelarContractCallNonce) | repeated | | -| `axelar_upgrade_data` | [AxelarUpgradeData](#axelarcork.v1.AxelarUpgradeData) | repeated | | - - - - - - - - -### Params - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `enabled` | [bool](#bool) | | | -| `ibc_channel` | [string](#string) | | | -| `ibc_port` | [string](#string) | | | -| `gmp_account` | [string](#string) | | | -| `executor_account` | [string](#string) | | | -| `timeout_duration` | [uint64](#uint64) | | | -| `cork_timeout_blocks` | [uint64](#uint64) | | | - - - - - - - - - - - - - - - - -

Top

- -## axelarcork/v1/proposal.proto - - - - - -### AddAxelarManagedCellarIDsProposal - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `cellar_ids` | [CellarIDSet](#axelarcork.v1.CellarIDSet) | | | -| `publisher_domain` | [string](#string) | | | - - - - - - - - -### AddAxelarManagedCellarIDsProposalWithDeposit -AddAxelarManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `cellar_ids` | [string](#string) | repeated | | -| `publisher_domain` | [string](#string) | | | -| `deposit` | [string](#string) | | | - - - - - - - - -### AddChainConfigurationProposal - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_configuration` | [ChainConfiguration](#axelarcork.v1.ChainConfiguration) | | | - - - - - - - - -### AddChainConfigurationProposalWithDeposit - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_configuration` | [ChainConfiguration](#axelarcork.v1.ChainConfiguration) | | | -| `deposit` | [string](#string) | | | - - - - - - - - -### AxelarCommunityPoolSpendProposal - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `recipient` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - - - - - -### AxelarCommunityPoolSpendProposalForCLI -This format of the Axelar community spend Ethereum proposal is specifically for -the CLI to allow simple text serialization. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `recipient` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `amount` | [string](#string) | | | -| `deposit` | [string](#string) | | | - - - - - - - - -### AxelarScheduledCorkProposal - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `block_height` | [uint64](#uint64) | | | -| `chain_id` | [uint64](#uint64) | | | -| `target_contract_address` | [string](#string) | | | -| `contract_call_proto_json` | [string](#string) | | The JSON representation of a ScheduleRequest defined in the Steward protos - -Example: The following is the JSON form of a ScheduleRequest containing a steward.v2.cellar_v1.TrustPosition message, which maps to the `trustPosition(address)` function of the the V1 Cellar contract. - -{ "cellar_id": "0x1234567890000000000000000000000000000000", "cellar_v1": { "trust_position": { "erc20_address": "0x1234567890000000000000000000000000000000" } }, "block_height": 1000000 } - -You can use the Steward CLI to generate the required JSON rather than constructing it by hand https://github.com/peggyjv/steward | -| `deadline` | [uint64](#uint64) | | unix timestamp before which the contract call must be executed. enforced by the Axelar proxy contract | - - - - - - - - -### AxelarScheduledCorkProposalWithDeposit -AxelarScheduledCorkProposalWithDeposit is a specific definition for CLI commands - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `block_height` | [uint64](#uint64) | | | -| `chain_id` | [uint64](#uint64) | | | -| `target_contract_address` | [string](#string) | | | -| `contract_call_proto_json` | [string](#string) | | | -| `deadline` | [uint64](#uint64) | | | -| `deposit` | [string](#string) | | | - - - - - - - - -### CancelAxelarProxyContractUpgradeProposal - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | - - - - - - - - -### CancelAxelarProxyContractUpgradeProposalWithDeposit - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `deposit` | [string](#string) | | | - - - - - - - - -### RemoveAxelarManagedCellarIDsProposal - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `cellar_ids` | [CellarIDSet](#axelarcork.v1.CellarIDSet) | | | - - - - - - - - -### RemoveAxelarManagedCellarIDsProposalWithDeposit -RemoveAxelarManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `cellar_ids` | [string](#string) | repeated | | -| `deposit` | [string](#string) | | | - - - - - - - - -### RemoveChainConfigurationProposal - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | - - - - - - - - -### RemoveChainConfigurationProposalWithDeposit - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `deposit` | [string](#string) | | | - - - - - - - - -### UpgradeAxelarProxyContractProposal - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `new_proxy_address` | [string](#string) | | | - - - - - - - - -### UpgradeAxelarProxyContractProposalWithDeposit - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `new_proxy_address` | [string](#string) | | | -| `deposit` | [string](#string) | | | - - - - - - - - - - - - - - - - -

Top

- -## axelarcork/v1/query.proto - - - - - -### QueryAxelarContractCallNoncesRequest - - - - - - - - - -### QueryAxelarContractCallNoncesResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `contract_call_nonces` | [AxelarContractCallNonce](#axelarcork.v1.AxelarContractCallNonce) | repeated | | - - - - - - - - -### QueryAxelarProxyUpgradeDataRequest - - - - - - - - - -### QueryAxelarProxyUpgradeDataResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `proxy_upgrade_data` | [AxelarUpgradeData](#axelarcork.v1.AxelarUpgradeData) | repeated | | - - - - - - - - -### QueryCellarIDsByChainIDRequest -QueryCellarIDsByChainIDRequest is the request type for Query/QueryCellarIDsByChainID gRPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `chain_id` | [uint64](#uint64) | | | - - - - - - - - -### QueryCellarIDsByChainIDResponse -QueryCellarIDsByChainIDResponse is the response type for Query/QueryCellarIDsByChainID gRPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cellar_ids` | [string](#string) | repeated | | - - - - - - - - -### QueryCellarIDsRequest -QueryCellarIDs is the request type for Query/QueryCellarIDs gRPC method. - - - - - - - - -### QueryCellarIDsResponse -QueryCellarIDsResponse is the response type for Query/QueryCellarIDs gRPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cellar_ids` | [CellarIDSet](#axelarcork.v1.CellarIDSet) | repeated | | - - - - - - - - -### QueryChainConfigurationsRequest - - - - - - - - - -### QueryChainConfigurationsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `configurations` | [ChainConfiguration](#axelarcork.v1.ChainConfiguration) | repeated | | - - - - - - - - -### QueryCorkResultRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | - - - - - - - - -### QueryCorkResultResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `corkResult` | [AxelarCorkResult](#axelarcork.v1.AxelarCorkResult) | | | - - - - - - - - -### QueryCorkResultsRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `chain_id` | [uint64](#uint64) | | | - - - - - - - - -### QueryCorkResultsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `corkResults` | [AxelarCorkResult](#axelarcork.v1.AxelarCorkResult) | repeated | | - - - - - - - - -### QueryParamsRequest -QueryParamsRequest is the request type for the Query/Params gRPC method. - - - - - - - - -### QueryParamsResponse -QueryParamsRequest is the response type for the Query/Params gRPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#axelarcork.v1.Params) | | allocation parameters | - - - - - - - - -### QueryScheduledBlockHeightsRequest -QueryScheduledBlockHeightsRequest - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `chain_id` | [uint64](#uint64) | | | - - - - - - - - -### QueryScheduledBlockHeightsResponse -QueryScheduledBlockHeightsResponse - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `block_heights` | [uint64](#uint64) | repeated | | - - - - - - - - -### QueryScheduledCorksByBlockHeightRequest -QueryScheduledCorksByBlockHeightRequest - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `block_height` | [uint64](#uint64) | | | -| `chain_id` | [uint64](#uint64) | | | - - - - - - - - -### QueryScheduledCorksByBlockHeightResponse -QueryScheduledCorksByBlockHeightResponse - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `corks` | [ScheduledAxelarCork](#axelarcork.v1.ScheduledAxelarCork) | repeated | | - - - - - - - - -### QueryScheduledCorksByIDRequest -QueryScheduledCorksByIDRequest - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | - - - - - - - - -### QueryScheduledCorksByIDResponse -QueryScheduledCorksByIDResponse - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `corks` | [ScheduledAxelarCork](#axelarcork.v1.ScheduledAxelarCork) | repeated | | - - - - - - - - -### QueryScheduledCorksRequest -QueryScheduledCorksRequest - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `chain_id` | [uint64](#uint64) | | | - - - - - - - - -### QueryScheduledCorksResponse -QueryScheduledCorksResponse - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `corks` | [ScheduledAxelarCork](#axelarcork.v1.ScheduledAxelarCork) | repeated | | - - - - - - - - -### QueryWinningAxelarCorkRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `chain_id` | [uint64](#uint64) | | | -| `contract_address` | [string](#string) | | | - - - - - - - - -### QueryWinningAxelarCorkResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cork` | [AxelarCork](#axelarcork.v1.AxelarCork) | | | -| `block_height` | [uint64](#uint64) | | | - - - - - - - - -### QueryWinningAxelarCorksRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `chain_id` | [uint64](#uint64) | | | - - - - - - - - -### QueryWinningAxelarCorksResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `winning_axelar_corks` | [WinningAxelarCork](#axelarcork.v1.WinningAxelarCork) | repeated | | - - - - - - - - - - - - - - -### Query -Query defines the gRPC query service for the cork module. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `QueryParams` | [QueryParamsRequest](#axelarcork.v1.QueryParamsRequest) | [QueryParamsResponse](#axelarcork.v1.QueryParamsResponse) | QueryParams queries the axelar cork module parameters. | GET|/sommelier/cork/v1/params| -| `QueryCellarIDs` | [QueryCellarIDsRequest](#axelarcork.v1.QueryCellarIDsRequest) | [QueryCellarIDsResponse](#axelarcork.v1.QueryCellarIDsResponse) | QueryCellarIDs queries approved cellar ids of all supported chains | GET|/sommelier/axelarcork/v1/cellar_ids| -| `QueryCellarIDsByChainID` | [QueryCellarIDsByChainIDRequest](#axelarcork.v1.QueryCellarIDsByChainIDRequest) | [QueryCellarIDsByChainIDResponse](#axelarcork.v1.QueryCellarIDsByChainIDResponse) | QueryCellarIDsByChainID returns all cellars and current tick ranges | GET|/sommelier/axelarcork/v1/cellar_ids_by_chain_id| -| `QueryScheduledCorks` | [QueryScheduledCorksRequest](#axelarcork.v1.QueryScheduledCorksRequest) | [QueryScheduledCorksResponse](#axelarcork.v1.QueryScheduledCorksResponse) | QueryScheduledCorks returns all scheduled corks | GET|/sommelier/axelarcork/v1/scheduled_corks| -| `QueryScheduledBlockHeights` | [QueryScheduledBlockHeightsRequest](#axelarcork.v1.QueryScheduledBlockHeightsRequest) | [QueryScheduledBlockHeightsResponse](#axelarcork.v1.QueryScheduledBlockHeightsResponse) | QueryScheduledBlockHeights returns all scheduled block heights | GET|/sommelier/axelarcork/v1/scheduled_block_heights| -| `QueryScheduledCorksByBlockHeight` | [QueryScheduledCorksByBlockHeightRequest](#axelarcork.v1.QueryScheduledCorksByBlockHeightRequest) | [QueryScheduledCorksByBlockHeightResponse](#axelarcork.v1.QueryScheduledCorksByBlockHeightResponse) | QueryScheduledCorks returns all scheduled corks at a block height | GET|/sommelier/axelarcork/v1/scheduled_corks_by_block_height/{block_height}| -| `QueryScheduledCorksByID` | [QueryScheduledCorksByIDRequest](#axelarcork.v1.QueryScheduledCorksByIDRequest) | [QueryScheduledCorksByIDResponse](#axelarcork.v1.QueryScheduledCorksByIDResponse) | QueryScheduledCorks returns all scheduled corks with the specified ID | GET|/sommelier/axelarcork/v1/scheduled_corks_by_id/{id}| -| `QueryCorkResult` | [QueryCorkResultRequest](#axelarcork.v1.QueryCorkResultRequest) | [QueryCorkResultResponse](#axelarcork.v1.QueryCorkResultResponse) | | GET|/sommelier/axelarcork/v1/cork_results/{id}| -| `QueryCorkResults` | [QueryCorkResultsRequest](#axelarcork.v1.QueryCorkResultsRequest) | [QueryCorkResultsResponse](#axelarcork.v1.QueryCorkResultsResponse) | | GET|/sommelier/axelarcork/v1/cork_results| -| `QueryChainConfigurations` | [QueryChainConfigurationsRequest](#axelarcork.v1.QueryChainConfigurationsRequest) | [QueryChainConfigurationsResponse](#axelarcork.v1.QueryChainConfigurationsResponse) | | GET|/sommelier/axelarcork/v1/chain_configurations| -| `QueryAxelarContractCallNonces` | [QueryAxelarContractCallNoncesRequest](#axelarcork.v1.QueryAxelarContractCallNoncesRequest) | [QueryAxelarContractCallNoncesResponse](#axelarcork.v1.QueryAxelarContractCallNoncesResponse) | | GET|/sommelier/axelarcork/v1/contract_call_nonces| -| `QueryAxelarProxyUpgradeData` | [QueryAxelarProxyUpgradeDataRequest](#axelarcork.v1.QueryAxelarProxyUpgradeDataRequest) | [QueryAxelarProxyUpgradeDataResponse](#axelarcork.v1.QueryAxelarProxyUpgradeDataResponse) | | GET|/sommelier/axelarcork/v1/proxy_upgrade_data| -| `QueryWinningAxelarCork` | [QueryWinningAxelarCorkRequest](#axelarcork.v1.QueryWinningAxelarCorkRequest) | [QueryWinningAxelarCorkResponse](#axelarcork.v1.QueryWinningAxelarCorkResponse) | | GET|/sommelier/axelarcork/v1/winning_axelar_corks/{chain_id}/{contract_address}| -| `QueryWinningAxelarCorks` | [QueryWinningAxelarCorksRequest](#axelarcork.v1.QueryWinningAxelarCorksRequest) | [QueryWinningAxelarCorksResponse](#axelarcork.v1.QueryWinningAxelarCorksResponse) | | GET|/sommelier/axelarcork/v1/winning_axelar_corks/{chain_id}| - - - - - - -

Top

- -## axelarcork/v1/tx.proto - - - - - -### MsgBumpAxelarCorkGasRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `signer` | [string](#string) | | | -| `token` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `message_id` | [string](#string) | | | - - - - - - - - -### MsgBumpAxelarCorkGasResponse - - - - - - - - - -### MsgCancelAxelarCorkRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `signer` | [string](#string) | | | -| `chain_id` | [uint64](#uint64) | | | -| `target_contract_address` | [string](#string) | | | - - - - - - - - -### MsgCancelAxelarCorkResponse - - - - - - - - - -### MsgRelayAxelarCorkRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `signer` | [string](#string) | | | -| `token` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `fee` | [uint64](#uint64) | | | -| `chain_id` | [uint64](#uint64) | | | -| `target_contract_address` | [string](#string) | | | - - - - - - - - -### MsgRelayAxelarCorkResponse - - - - - - - - - -### MsgRelayAxelarProxyUpgradeRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `signer` | [string](#string) | | | -| `token` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `fee` | [uint64](#uint64) | | | -| `chain_id` | [uint64](#uint64) | | | - - - - - - - - -### MsgRelayAxelarProxyUpgradeResponse - - - - - - - - - -### MsgScheduleAxelarCorkRequest -MsgScheduleCorkRequest - sdk.Msg for scheduling a cork request for on or after a specific block height - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cork` | [AxelarCork](#axelarcork.v1.AxelarCork) | | the scheduled cork | -| `chain_id` | [uint64](#uint64) | | the chain id | -| `block_height` | [uint64](#uint64) | | the block height that must be reached | -| `signer` | [string](#string) | | signer account address | - - - - - - - - -### MsgScheduleAxelarCorkResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | cork ID | - - - - - - - - - - - - - - -### Msg -MsgService defines the msgs that the cork module handles - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `ScheduleCork` | [MsgScheduleAxelarCorkRequest](#axelarcork.v1.MsgScheduleAxelarCorkRequest) | [MsgScheduleAxelarCorkResponse](#axelarcork.v1.MsgScheduleAxelarCorkResponse) | | | -| `RelayCork` | [MsgRelayAxelarCorkRequest](#axelarcork.v1.MsgRelayAxelarCorkRequest) | [MsgRelayAxelarCorkResponse](#axelarcork.v1.MsgRelayAxelarCorkResponse) | | | -| `BumpCorkGas` | [MsgBumpAxelarCorkGasRequest](#axelarcork.v1.MsgBumpAxelarCorkGasRequest) | [MsgBumpAxelarCorkGasResponse](#axelarcork.v1.MsgBumpAxelarCorkGasResponse) | | | -| `CancelScheduledCork` | [MsgCancelAxelarCorkRequest](#axelarcork.v1.MsgCancelAxelarCorkRequest) | [MsgCancelAxelarCorkResponse](#axelarcork.v1.MsgCancelAxelarCorkResponse) | | | - - - - - - -

Top

- -## cellarfees/v1/cellarfees.proto - - - - - -### FeeAccrualCounter - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `count` | [uint64](#uint64) | | | - - - - - - - - -### FeeAccrualCounters - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `counters` | [FeeAccrualCounter](#cellarfees.v1.FeeAccrualCounter) | repeated | | - - - - - - - - - - - - - - - - -

Top

- -## cellarfees/v1/params.proto - - - - - -### Params -Params defines the parameters for the module. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `fee_accrual_auction_threshold` | [uint64](#uint64) | | The number of fee accruals after which an auction should be started | -| `reward_emission_period` | [uint64](#uint64) | | Emission rate factor. Specifically, the number of blocks over which to distribute some amount of staking rewards. | -| `initial_price_decrease_rate` | [string](#string) | | The initial rate at which auctions should decrease their denom's price in SOMM | -| `price_decrease_block_interval` | [uint64](#uint64) | | Number of blocks between auction price decreases | -| `auction_interval` | [uint64](#uint64) | | The interval between starting auctions | - - - - - - - - - - - - - - - - -

Top

- -## cellarfees/v1/genesis.proto - - - - - -### GenesisState -GenesisState defines the cellarfees module's genesis state. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#cellarfees.v1.Params) | | | -| `fee_accrual_counters` | [FeeAccrualCounters](#cellarfees.v1.FeeAccrualCounters) | | | -| `last_reward_supply_peak` | [string](#string) | | | - - - - - - - - - - - - - - - - -

Top

- -## cellarfees/v1/query.proto - - - - - -### QueryAPYRequest - - - - - - - - - -### QueryAPYResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `apy` | [string](#string) | | | - - - - - - - - -### QueryFeeAccrualCountersRequest - - - - - - - - - -### QueryFeeAccrualCountersResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `fee_accrual_counters` | [FeeAccrualCounters](#cellarfees.v1.FeeAccrualCounters) | | | - - - - - - - - -### QueryLastRewardSupplyPeakRequest - - - - - - - - - -### QueryLastRewardSupplyPeakResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `last_reward_supply_peak` | [string](#string) | | | - - - - - - - - -### QueryModuleAccountsRequest - - - - - - - - - -### QueryModuleAccountsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `fees_address` | [string](#string) | | | - - - - - - - - -### QueryParamsRequest - - - - - - - - - -### QueryParamsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#cellarfees.v1.Params) | | | - - - - - - - - - - - - - - -### Query - - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `QueryParams` | [QueryParamsRequest](#cellarfees.v1.QueryParamsRequest) | [QueryParamsResponse](#cellarfees.v1.QueryParamsResponse) | | GET|/sommelier/cellarfees/v1/params| -| `QueryModuleAccounts` | [QueryModuleAccountsRequest](#cellarfees.v1.QueryModuleAccountsRequest) | [QueryModuleAccountsResponse](#cellarfees.v1.QueryModuleAccountsResponse) | | GET|/sommelier/cellarfees/v1/module_accounts| -| `QueryLastRewardSupplyPeak` | [QueryLastRewardSupplyPeakRequest](#cellarfees.v1.QueryLastRewardSupplyPeakRequest) | [QueryLastRewardSupplyPeakResponse](#cellarfees.v1.QueryLastRewardSupplyPeakResponse) | | GET|/sommelier/cellarfees/v1/last_reward_supply_peak| -| `QueryFeeAccrualCounters` | [QueryFeeAccrualCountersRequest](#cellarfees.v1.QueryFeeAccrualCountersRequest) | [QueryFeeAccrualCountersResponse](#cellarfees.v1.QueryFeeAccrualCountersResponse) | | GET|/sommelier/cellarfees/v1/fee_accrual_counters| -| `QueryAPY` | [QueryAPYRequest](#cellarfees.v1.QueryAPYRequest) | [QueryAPYResponse](#cellarfees.v1.QueryAPYResponse) | | GET|/sommelier/cellarfees/v1/apy| - - - - - - -

Top

- -## cork/v2/cork.proto - - - - - -### CellarIDSet - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `ids` | [string](#string) | repeated | | - - - - - - - - -### Cork - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `encoded_contract_call` | [bytes](#bytes) | | call body containing the ABI encoded bytes to send to the contract | -| `target_contract_address` | [string](#string) | | address of the contract to send the call | - - - - - - - - -### CorkResult - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cork` | [Cork](#cork.v2.Cork) | | | -| `block_height` | [uint64](#uint64) | | | -| `approved` | [bool](#bool) | | | -| `approval_percentage` | [string](#string) | | | - - - - - - - - -### ScheduledCork - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cork` | [Cork](#cork.v2.Cork) | | | -| `block_height` | [uint64](#uint64) | | | -| `validator` | [string](#string) | | | -| `id` | [bytes](#bytes) | | | - - - - - - - - - - - - - - - - -

Top

- -## cork/v2/genesis.proto - - - - - -### GenesisState -GenesisState - all cork state that must be provided at genesis - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#cork.v2.Params) | | | -| `cellar_ids` | [CellarIDSet](#cork.v2.CellarIDSet) | | | -| `invalidation_nonce` | [uint64](#uint64) | | | -| `scheduled_corks` | [ScheduledCork](#cork.v2.ScheduledCork) | repeated | | -| `cork_results` | [CorkResult](#cork.v2.CorkResult) | repeated | | - - - - - - - - -### Params -Params cork parameters - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `vote_threshold` | [string](#string) | | Deprecated VoteThreshold defines the percentage of bonded stake required to vote for a scheduled cork to be approved | -| `max_corks_per_validator` | [uint64](#uint64) | | | - - - - - - - - - - - - - - - - -

Top

- -## cork/v2/proposal.proto - - - - - -### AddManagedCellarIDsProposal - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `cellar_ids` | [CellarIDSet](#cork.v2.CellarIDSet) | | | -| `publisher_domain` | [string](#string) | | | - - - - - - - - -### AddManagedCellarIDsProposalWithDeposit -AddManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `cellar_ids` | [string](#string) | repeated | | -| `publisher_domain` | [string](#string) | | | -| `deposit` | [string](#string) | | | - - - - - - - - -### RemoveManagedCellarIDsProposal - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `cellar_ids` | [CellarIDSet](#cork.v2.CellarIDSet) | | | - - - - - - - - -### RemoveManagedCellarIDsProposalWithDeposit -RemoveManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `cellar_ids` | [string](#string) | repeated | | -| `deposit` | [string](#string) | | | - - - - - - - - -### ScheduledCorkProposal - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `block_height` | [uint64](#uint64) | | | -| `target_contract_address` | [string](#string) | | | -| `contract_call_proto_json` | [string](#string) | | The JSON representation of a ScheduleRequest defined in the Steward protos - -Example: The following is the JSON form of a ScheduleRequest containing a steward.v2.cellar_v1.TrustPosition message, which maps to the `trustPosition(address)` function of the the V1 Cellar contract. - -{ "cellar_id": "0x1234567890000000000000000000000000000000", "cellar_v1": { "trust_position": { "erc20_address": "0x1234567890000000000000000000000000000000" } }, "block_height": 1000000 } - -You can use the Steward CLI to generate the required JSON rather than constructing it by hand https://github.com/peggyjv/steward | - - - - - - - - -### ScheduledCorkProposalWithDeposit -ScheduledCorkProposalWithDeposit is a specific definition for CLI commands - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `block_height` | [uint64](#uint64) | | | -| `target_contract_address` | [string](#string) | | | -| `contract_call_proto_json` | [string](#string) | | | -| `deposit` | [string](#string) | | | - - - - - - - - - - - - - - - - -

Top

- -## cork/v2/query.proto - - - - - -### QueryCellarIDsRequest -QueryCellarIDsRequest is the request type for Query/QueryCellarIDs gRPC method. - - - - - - - - -### QueryCellarIDsResponse -QueryCellarIDsResponse is the response type for Query/QueryCellars gRPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cellar_ids` | [string](#string) | repeated | | - - - - - - - - -### QueryCorkResultRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | - - - - - - - - -### QueryCorkResultResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `corkResult` | [CorkResult](#cork.v2.CorkResult) | | | - - - - - - - - -### QueryCorkResultsRequest - - - - - - - - - -### QueryCorkResultsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `corkResults` | [CorkResult](#cork.v2.CorkResult) | repeated | | - - - - - - - - -### QueryParamsRequest -QueryParamsRequest is the request type for the Query/Params gRPC method. - - - - - - - - -### QueryParamsResponse -QueryParamsRequest is the response type for the Query/Params gRPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#cork.v2.Params) | | allocation parameters | - - - - - - - - -### QueryScheduledBlockHeightsRequest -QueryScheduledBlockHeightsRequest - - - - - - - - -### QueryScheduledBlockHeightsResponse -QueryScheduledBlockHeightsResponse - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `block_heights` | [uint64](#uint64) | repeated | | - - - - - - - - -### QueryScheduledCorksByBlockHeightRequest -QueryScheduledCorksByBlockHeightRequest - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `block_height` | [uint64](#uint64) | | | - - - - - - - - -### QueryScheduledCorksByBlockHeightResponse -QueryScheduledCorksByBlockHeightResponse - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `corks` | [ScheduledCork](#cork.v2.ScheduledCork) | repeated | | - - - - - - - - -### QueryScheduledCorksByIDRequest -QueryScheduledCorksByIDRequest - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | | - - - - - - - - -### QueryScheduledCorksByIDResponse -QueryScheduledCorksByIDResponse - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `corks` | [ScheduledCork](#cork.v2.ScheduledCork) | repeated | | - - - - - - - - -### QueryScheduledCorksRequest -QueryScheduledCorksRequest - - - - - - - - -### QueryScheduledCorksResponse -QueryScheduledCorksResponse - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `corks` | [ScheduledCork](#cork.v2.ScheduledCork) | repeated | | - - - - - - - - - - - - - - -### Query -Query defines the gRPC query service for the cork module. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `QueryParams` | [QueryParamsRequest](#cork.v2.QueryParamsRequest) | [QueryParamsResponse](#cork.v2.QueryParamsResponse) | QueryParams queries the allocation module parameters. | GET|/sommelier/cork/v2/params| -| `QueryCellarIDs` | [QueryCellarIDsRequest](#cork.v2.QueryCellarIDsRequest) | [QueryCellarIDsResponse](#cork.v2.QueryCellarIDsResponse) | QueryCellarIDs returns all cellars and current tick ranges | GET|/sommelier/cork/v2/cellar_ids| -| `QueryScheduledCorks` | [QueryScheduledCorksRequest](#cork.v2.QueryScheduledCorksRequest) | [QueryScheduledCorksResponse](#cork.v2.QueryScheduledCorksResponse) | QueryScheduledCorks returns all scheduled corks | GET|/sommelier/cork/v2/scheduled_corks| -| `QueryScheduledBlockHeights` | [QueryScheduledBlockHeightsRequest](#cork.v2.QueryScheduledBlockHeightsRequest) | [QueryScheduledBlockHeightsResponse](#cork.v2.QueryScheduledBlockHeightsResponse) | QueryScheduledBlockHeights returns all scheduled block heights | GET|/sommelier/cork/v2/scheduled_block_heights| -| `QueryScheduledCorksByBlockHeight` | [QueryScheduledCorksByBlockHeightRequest](#cork.v2.QueryScheduledCorksByBlockHeightRequest) | [QueryScheduledCorksByBlockHeightResponse](#cork.v2.QueryScheduledCorksByBlockHeightResponse) | QueryScheduledCorks returns all scheduled corks at a block height | GET|/sommelier/cork/v2/scheduled_corks_by_block_height/{block_height}| -| `QueryScheduledCorksByID` | [QueryScheduledCorksByIDRequest](#cork.v2.QueryScheduledCorksByIDRequest) | [QueryScheduledCorksByIDResponse](#cork.v2.QueryScheduledCorksByIDResponse) | QueryScheduledCorks returns all scheduled corks with the specified ID | GET|/sommelier/cork/v2/scheduled_corks_by_id/{id}| -| `QueryCorkResult` | [QueryCorkResultRequest](#cork.v2.QueryCorkResultRequest) | [QueryCorkResultResponse](#cork.v2.QueryCorkResultResponse) | | GET|/sommelier/cork/v2/cork_results/{id}| -| `QueryCorkResults` | [QueryCorkResultsRequest](#cork.v2.QueryCorkResultsRequest) | [QueryCorkResultsResponse](#cork.v2.QueryCorkResultsResponse) | | GET|/sommelier/cork/v2/cork_results| - - - - - - -

Top

- -## cork/v2/tx.proto - - - - - -### MsgScheduleCorkRequest -MsgScheduleCorkRequest - sdk.Msg for scheduling a cork request for on or after a specific block height - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `cork` | [Cork](#cork.v2.Cork) | | the scheduled cork | -| `block_height` | [uint64](#uint64) | | the block height that must be reached | -| `signer` | [string](#string) | | signer account address | - - - - - - - - -### MsgScheduleCorkResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `id` | [string](#string) | | cork ID | - - - - - - - - - - - - - - -### Msg -MsgService defines the msgs that the cork module handles - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `ScheduleCork` | [MsgScheduleCorkRequest](#cork.v2.MsgScheduleCorkRequest) | [MsgScheduleCorkResponse](#cork.v2.MsgScheduleCorkResponse) | | | - - - - - - -

Top

- -## incentives/v1/genesis.proto - - - - - -### GenesisState - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#incentives.v1.Params) | | | - - - - - - - - -### Params -Params incentives parameters - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `distribution_per_block` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | DistributionPerBlock defines the coin to be sent to the distribution module from the community pool every block | -| `incentives_cutoff_height` | [uint64](#uint64) | | IncentivesCutoffHeight defines the block height after which the incentives module will stop sending coins to the distribution module from the community pool | - - - - - - - - - - - - - - - - -

Top

- -## incentives/v1/query.proto - - - - - -### QueryAPYRequest -QueryAPYRequest is the request type for the QueryAPY gRPC method. - - - - - - - - -### QueryAPYResponse -QueryAPYRequest is the response type for the QueryAPY gRPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `apy` | [string](#string) | | | - - - - - - - - -### QueryParamsRequest -QueryParamsRequest is the request type for the QueryParams gRPC method. - - - - - - - - -### QueryParamsResponse -QueryParamsRequest is the response type for the QueryParams gRPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#incentives.v1.Params) | | allocation parameters | - - - - - - - - - - - - - - -### Query -Query defines the gRPC query service for the cork module. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `QueryParams` | [QueryParamsRequest](#incentives.v1.QueryParamsRequest) | [QueryParamsResponse](#incentives.v1.QueryParamsResponse) | QueryParams queries the allocation module parameters. | GET|/sommelier/incentives/v1/params| -| `QueryAPY` | [QueryAPYRequest](#incentives.v1.QueryAPYRequest) | [QueryAPYResponse](#incentives.v1.QueryAPYResponse) | QueryAPY queries the APY returned from the incentives module. | GET|/sommelier/incentives/v1/apy| - - - - - - -

Top

- -## pubsub/v1/params.proto - - - - - -### Params -Params defines the parameters for the module. - - - - - - - - - - - - - - - - -

Top

- -## pubsub/v1/pubsub.proto - - - - - -### AddDefaultSubscriptionProposal -set the default publisher for a given subscription ID -these can be overridden by the client - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `subscription_id` | [string](#string) | | | -| `publisher_domain` | [string](#string) | | | - - - - - - - - -### AddDefaultSubscriptionProposalWithDeposit - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `subscription_id` | [string](#string) | | | -| `publisher_domain` | [string](#string) | | | -| `deposit` | [string](#string) | | | - - - - - - - - -### AddPublisherProposal -governance proposal to add a publisher, with domain, adress, and ca_cert the same as the Publisher type -proof URL expected in the format: https:///
/cacert.pem and serving cacert.pem matching ca_cert - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `domain` | [string](#string) | | | -| `address` | [string](#string) | | | -| `proof_url` | [string](#string) | | | -| `ca_cert` | [string](#string) | | | - - - - - - - - -### AddPublisherProposalWithDeposit - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `domain` | [string](#string) | | | -| `address` | [string](#string) | | | -| `proof_url` | [string](#string) | | | -| `ca_cert` | [string](#string) | | | -| `deposit` | [string](#string) | | | - - - - - - - - -### DefaultSubscription -represents a default subscription voted in by governance that can be overridden by a subscriber - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscription_id` | [string](#string) | | arbitary string representing a subscription, max length of 128 | -| `publisher_domain` | [string](#string) | | FQDN of the publisher, max length of 256 | - - - - - - - - -### Publisher -represents a publisher, which are added via governance - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | account address of the publisher | -| `domain` | [string](#string) | | unique key, FQDN of the publisher, max length of 256 | -| `ca_cert` | [string](#string) | | the publisher's self-signed CA cert PEM file, expecting TLS 1.3 compatible ECDSA certificates, max length 4096 | - - - - - - - - -### PublisherIntent -represents a publisher committing to sending messages for a specific subscription ID - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscription_id` | [string](#string) | | arbitary string representing a subscription, max length of 128 | -| `publisher_domain` | [string](#string) | | FQDN of the publisher, max length of 256 | -| `method` | [PublishMethod](#pubsub.v1.PublishMethod) | | either PULL or PUSH (see enum above for details) | -| `pull_url` | [string](#string) | | optional, only needs to be set if using the PULL method, max length of 512 | -| `allowed_subscribers` | [AllowedSubscribers](#pubsub.v1.AllowedSubscribers) | | either ANY, VALIDATORS, or LIST (see enum above for details) | -| `allowed_addresses` | [string](#string) | repeated | optional, must be provided if allowed_subscribers is LIST, list of account addresses, max length 256 | - - - - - - - - -### RemoveDefaultSubscriptionProposal -remove a default subscription - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `subscription_id` | [string](#string) | | | - - - - - - - - -### RemoveDefaultSubscriptionProposalWithDeposit - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `subscription_id` | [string](#string) | | | -| `deposit` | [string](#string) | | | - - - - - - - - -### RemovePublisherProposal -governance proposal to remove a publisher (publishers can remove themselves, but this might be necessary in the -event of a malicious publisher or a key compromise), since Publishers are unique by domain, it's the only -necessary information to remove one - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `domain` | [string](#string) | | | - - - - - - - - -### RemovePublisherProposalWithDeposit - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `title` | [string](#string) | | | -| `description` | [string](#string) | | | -| `domain` | [string](#string) | | | -| `deposit` | [string](#string) | | | - - - - - - - - -### Subscriber -represents a subscriber, can be set or modified by the owner of the subscriber address - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | unique key, account address representation of either an account or a validator | -| `ca_cert` | [string](#string) | | the subscriber's self-signed CA cert PEM file, expecting TLS 1.3 compatible ECDSA certificates, max length 4096 | -| `push_url` | [string](#string) | | max length of 512 | - - - - - - - - -### SubscriberIntent -represents a subscriber requesting messages for a specific subscription ID and publisher - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscription_id` | [string](#string) | | arbitary string representing a subscription, max length of 128 | -| `subscriber_address` | [string](#string) | | account address of the subscriber | -| `publisher_domain` | [string](#string) | | FQDN of the publisher, max length of 256 | - - - - - - - - - - -### AllowedSubscribers -for a given PublisherIntent, determines what types of subscribers may subscribe - -| Name | Number | Description | -| ---- | ------ | ----------- | -| ANY | 0 | any valid account address | -| VALIDATORS | 1 | account address must map to a validator in the active validator set | -| LIST | 2 | a specific list of account addresses | - - - - - -### PublishMethod -for a given PublisherIntent, whether or not it is pulled or pushed - -| Name | Number | Description | -| ---- | ------ | ----------- | -| PULL | 0 | subscribers should pull from the provided URL | -| PUSH | 1 | subscribers must provide a URL to receive push messages | - - - - - - - - - - - -

Top

- -## pubsub/v1/genesis.proto - - - - - -### GenesisState -GenesisState defines the pubsub module's genesis state. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#pubsub.v1.Params) | | | -| `publishers` | [Publisher](#pubsub.v1.Publisher) | repeated | | -| `subscribers` | [Subscriber](#pubsub.v1.Subscriber) | repeated | | -| `publisher_intents` | [PublisherIntent](#pubsub.v1.PublisherIntent) | repeated | | -| `subscriber_intents` | [SubscriberIntent](#pubsub.v1.SubscriberIntent) | repeated | | -| `default_subscriptions` | [DefaultSubscription](#pubsub.v1.DefaultSubscription) | repeated | | - - - - - - - - - - - - - - - - -

Top

- -## pubsub/v1/query.proto - - - - - -### QueryDefaultSubscriptionRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscription_id` | [string](#string) | | | - - - - - - - - -### QueryDefaultSubscriptionResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `default_subscription` | [DefaultSubscription](#pubsub.v1.DefaultSubscription) | | | - - - - - - - - -### QueryDefaultSubscriptionsRequest - - - - - - - - - -### QueryDefaultSubscriptionsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `default_subscriptions` | [DefaultSubscription](#pubsub.v1.DefaultSubscription) | repeated | | - - - - - - - - -### QueryParamsRequest - - - - - - - - - -### QueryParamsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#pubsub.v1.Params) | | | - - - - - - - - -### QueryPublisherIntentRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `publisher_domain` | [string](#string) | | | -| `subscription_id` | [string](#string) | | | - - - - - - - - -### QueryPublisherIntentResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `publisher_intent` | [PublisherIntent](#pubsub.v1.PublisherIntent) | | | - - - - - - - - -### QueryPublisherIntentsByPublisherDomainRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `publisher_domain` | [string](#string) | | | - - - - - - - - -### QueryPublisherIntentsByPublisherDomainResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `publisher_intents` | [PublisherIntent](#pubsub.v1.PublisherIntent) | repeated | | - - - - - - - - -### QueryPublisherIntentsBySubscriptionIDRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscription_id` | [string](#string) | | | - - - - - - - - -### QueryPublisherIntentsBySubscriptionIDResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `publisher_intents` | [PublisherIntent](#pubsub.v1.PublisherIntent) | repeated | | - - - - - - - - -### QueryPublisherIntentsRequest - - - - - - - - - -### QueryPublisherIntentsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `publisher_intents` | [PublisherIntent](#pubsub.v1.PublisherIntent) | repeated | | - - - - - - - - -### QueryPublisherRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `publisher_domain` | [string](#string) | | | - - - - - - - - -### QueryPublisherResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `publisher` | [Publisher](#pubsub.v1.Publisher) | | | - - - - - - - - -### QueryPublishersRequest - - - - - - - - - -### QueryPublishersResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `publishers` | [Publisher](#pubsub.v1.Publisher) | repeated | | - - - - - - - - -### QuerySubscriberIntentRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscriber_address` | [string](#string) | | | -| `subscription_id` | [string](#string) | | | - - - - - - - - -### QuerySubscriberIntentResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscriber_intent` | [SubscriberIntent](#pubsub.v1.SubscriberIntent) | | | - - - - - - - - -### QuerySubscriberIntentsByPublisherDomainRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `publisher_domain` | [string](#string) | | | - - - - - - - - -### QuerySubscriberIntentsByPublisherDomainResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscriber_intents` | [SubscriberIntent](#pubsub.v1.SubscriberIntent) | repeated | | - - - - - - - - -### QuerySubscriberIntentsBySubscriberAddressRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscriber_address` | [string](#string) | | | - - - - - - - - -### QuerySubscriberIntentsBySubscriberAddressResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscriber_intents` | [SubscriberIntent](#pubsub.v1.SubscriberIntent) | repeated | | - - - - - - - - -### QuerySubscriberIntentsBySubscriptionIDRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscription_id` | [string](#string) | | | - - - - - - - - -### QuerySubscriberIntentsBySubscriptionIDResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscriber_intents` | [SubscriberIntent](#pubsub.v1.SubscriberIntent) | repeated | | - - - - - - - - -### QuerySubscriberIntentsRequest - - - - - - - - - -### QuerySubscriberIntentsResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscriber_intents` | [SubscriberIntent](#pubsub.v1.SubscriberIntent) | repeated | | - - - - - - - - -### QuerySubscriberRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscriber_address` | [string](#string) | | | - - - - - - - - -### QuerySubscriberResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscriber` | [Subscriber](#pubsub.v1.Subscriber) | | | - - - - - - - - -### QuerySubscribersRequest - - - - - - - - - -### QuerySubscribersResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscribers` | [Subscriber](#pubsub.v1.Subscriber) | repeated | | - - - - - - - - - - - - - - -### Query - - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#pubsub.v1.QueryParamsRequest) | [QueryParamsResponse](#pubsub.v1.QueryParamsResponse) | | GET|/sommelier/pubsub/v1/params| -| `QueryPublisher` | [QueryPublisherRequest](#pubsub.v1.QueryPublisherRequest) | [QueryPublisherResponse](#pubsub.v1.QueryPublisherResponse) | | GET|/sommelier/pubsub/v1/publishers/{publisher_domain}| -| `QueryPublishers` | [QueryPublishersRequest](#pubsub.v1.QueryPublishersRequest) | [QueryPublishersResponse](#pubsub.v1.QueryPublishersResponse) | | GET|/sommelier/pubsub/v1/publishers| -| `QuerySubscriber` | [QuerySubscriberRequest](#pubsub.v1.QuerySubscriberRequest) | [QuerySubscriberResponse](#pubsub.v1.QuerySubscriberResponse) | | GET|/sommelier/pubsub/v1/subscribers/{subscriber_address}| -| `QuerySubscribers` | [QuerySubscribersRequest](#pubsub.v1.QuerySubscribersRequest) | [QuerySubscribersResponse](#pubsub.v1.QuerySubscribersResponse) | | GET|/sommelier/pubsub/v1/subscribers| -| `QueryPublisherIntent` | [QueryPublisherIntentRequest](#pubsub.v1.QueryPublisherIntentRequest) | [QueryPublisherIntentResponse](#pubsub.v1.QueryPublisherIntentResponse) | | GET|/sommelier/pubsub/v1/publisher_intents/{publisher_domain}/{subscription_id}| -| `QueryPublisherIntents` | [QueryPublisherIntentsRequest](#pubsub.v1.QueryPublisherIntentsRequest) | [QueryPublisherIntentsResponse](#pubsub.v1.QueryPublisherIntentsResponse) | | GET|/sommelier/pubsub/v1/publisher_intents| -| `QueryPublisherIntentsByPublisherDomain` | [QueryPublisherIntentsByPublisherDomainRequest](#pubsub.v1.QueryPublisherIntentsByPublisherDomainRequest) | [QueryPublisherIntentsByPublisherDomainResponse](#pubsub.v1.QueryPublisherIntentsByPublisherDomainResponse) | | GET|/sommelier/pubsub/v1/publisher_intents/{publisher_domain}| -| `QueryPublisherIntentsBySubscriptionID` | [QueryPublisherIntentsBySubscriptionIDRequest](#pubsub.v1.QueryPublisherIntentsBySubscriptionIDRequest) | [QueryPublisherIntentsBySubscriptionIDResponse](#pubsub.v1.QueryPublisherIntentsBySubscriptionIDResponse) | | GET|/sommelier/pubsub/v1/publisher_intents_by_subscription_id/{subscription_id}| -| `QuerySubscriberIntent` | [QuerySubscriberIntentRequest](#pubsub.v1.QuerySubscriberIntentRequest) | [QuerySubscriberIntentResponse](#pubsub.v1.QuerySubscriberIntentResponse) | | GET|/sommelier/pubsub/v1/subscriber_intents/{subscriber_address}/{subscription_id}| -| `QuerySubscriberIntents` | [QuerySubscriberIntentsRequest](#pubsub.v1.QuerySubscriberIntentsRequest) | [QuerySubscriberIntentsResponse](#pubsub.v1.QuerySubscriberIntentsResponse) | | GET|/sommelier/pubsub/v1/subscriber_intents| -| `QuerySubscriberIntentsBySubscriberAddress` | [QuerySubscriberIntentsBySubscriberAddressRequest](#pubsub.v1.QuerySubscriberIntentsBySubscriberAddressRequest) | [QuerySubscriberIntentsBySubscriberAddressResponse](#pubsub.v1.QuerySubscriberIntentsBySubscriberAddressResponse) | | GET|/sommelier/pubsub/v1/subscriber_intents/{subscriber_address}| -| `QuerySubscriberIntentsBySubscriptionID` | [QuerySubscriberIntentsBySubscriptionIDRequest](#pubsub.v1.QuerySubscriberIntentsBySubscriptionIDRequest) | [QuerySubscriberIntentsBySubscriptionIDResponse](#pubsub.v1.QuerySubscriberIntentsBySubscriptionIDResponse) | | GET|/sommelier/pubsub/v1/subscriber_intents_by_subscription_id/{subscription_id}| -| `QuerySubscriberIntentsByPublisherDomain` | [QuerySubscriberIntentsByPublisherDomainRequest](#pubsub.v1.QuerySubscriberIntentsByPublisherDomainRequest) | [QuerySubscriberIntentsByPublisherDomainResponse](#pubsub.v1.QuerySubscriberIntentsByPublisherDomainResponse) | | GET|/sommelier/pubsub/v1/subscriber_intents_by_publisher_domain/{publisher_domain}| -| `QueryDefaultSubscription` | [QueryDefaultSubscriptionRequest](#pubsub.v1.QueryDefaultSubscriptionRequest) | [QueryDefaultSubscriptionResponse](#pubsub.v1.QueryDefaultSubscriptionResponse) | | GET|/sommelier/pubsub/v1/default_subscriptions/{subscription_id}| -| `QueryDefaultSubscriptions` | [QueryDefaultSubscriptionsRequest](#pubsub.v1.QueryDefaultSubscriptionsRequest) | [QueryDefaultSubscriptionsResponse](#pubsub.v1.QueryDefaultSubscriptionsResponse) | | GET|/sommelier/pubsub/v1/default_subscriptions| - - - - - - -

Top

- -## pubsub/v1/tx.proto - - - - - -### MsgAddPublisherIntentRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `publisher_intent` | [PublisherIntent](#pubsub.v1.PublisherIntent) | | | -| `signer` | [string](#string) | | | - - - - - - - - -### MsgAddPublisherIntentResponse - - - - - - - - - -### MsgAddSubscriberIntentRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscriber_intent` | [SubscriberIntent](#pubsub.v1.SubscriberIntent) | | | -| `signer` | [string](#string) | | | - - - - - - - - -### MsgAddSubscriberIntentResponse - - - - - - - - - -### MsgAddSubscriberRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscriber` | [Subscriber](#pubsub.v1.Subscriber) | | | -| `signer` | [string](#string) | | | - - - - - - - - -### MsgAddSubscriberResponse - - - - - - - - - -### MsgRemovePublisherIntentRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscription_id` | [string](#string) | | | -| `publisher_domain` | [string](#string) | | | -| `signer` | [string](#string) | | | - - - - - - - - -### MsgRemovePublisherIntentResponse - - - - - - - - - -### MsgRemovePublisherRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `publisher_domain` | [string](#string) | | | -| `signer` | [string](#string) | | | - - - - - - - - -### MsgRemovePublisherResponse - - - - - - - - - -### MsgRemoveSubscriberIntentRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscription_id` | [string](#string) | | | -| `subscriber_address` | [string](#string) | | | -| `signer` | [string](#string) | | | - - - - - - - - -### MsgRemoveSubscriberIntentResponse - - - - - - - - - -### MsgRemoveSubscriberRequest - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `subscriber_address` | [string](#string) | | | -| `signer` | [string](#string) | | | - - - - - - - - -### MsgRemoveSubscriberResponse - - - - - - - - - - - - - - - -### Msg - - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `RemovePublisher` | [MsgRemovePublisherRequest](#pubsub.v1.MsgRemovePublisherRequest) | [MsgRemovePublisherResponse](#pubsub.v1.MsgRemovePublisherResponse) | | | -| `AddSubscriber` | [MsgAddSubscriberRequest](#pubsub.v1.MsgAddSubscriberRequest) | [MsgAddSubscriberResponse](#pubsub.v1.MsgAddSubscriberResponse) | | | -| `RemoveSubscriber` | [MsgRemoveSubscriberRequest](#pubsub.v1.MsgRemoveSubscriberRequest) | [MsgRemoveSubscriberResponse](#pubsub.v1.MsgRemoveSubscriberResponse) | | | -| `AddPublisherIntent` | [MsgAddPublisherIntentRequest](#pubsub.v1.MsgAddPublisherIntentRequest) | [MsgAddPublisherIntentResponse](#pubsub.v1.MsgAddPublisherIntentResponse) | | | -| `RemovePublisherIntent` | [MsgRemovePublisherIntentRequest](#pubsub.v1.MsgRemovePublisherIntentRequest) | [MsgRemovePublisherIntentResponse](#pubsub.v1.MsgRemovePublisherIntentResponse) | | | -| `AddSubscriberIntent` | [MsgAddSubscriberIntentRequest](#pubsub.v1.MsgAddSubscriberIntentRequest) | [MsgAddSubscriberIntentResponse](#pubsub.v1.MsgAddSubscriberIntentResponse) | | | -| `RemoveSubscriberIntent` | [MsgRemoveSubscriberIntentRequest](#pubsub.v1.MsgRemoveSubscriberIntentRequest) | [MsgRemoveSubscriberIntentResponse](#pubsub.v1.MsgRemoveSubscriberIntentResponse) | | | - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | - diff --git a/docs/protodoc-markdown.tmpl b/docs/protodoc-markdown.tmpl deleted file mode 100644 index 28201837e..000000000 --- a/docs/protodoc-markdown.tmpl +++ /dev/null @@ -1,105 +0,0 @@ - -# Protobuf Documentation - - -## Table of Contents -{{range .Files}} -{{$file_name := .Name}}- [{{.Name}}](#{{.Name}}) - {{- if .Messages }} - {{range .Messages}} - [{{.LongName}}](#{{.FullName}}) - {{end}} - {{- end -}} - {{- if .Enums }} - {{range .Enums}} - [{{.LongName}}](#{{.FullName}}) - {{end}} - {{- end -}} - {{- if .Extensions }} - {{range .Extensions}} - [File-level Extensions](#{{$file_name}}-extensions) - {{end}} - {{- end -}} - {{- if .Services }} - {{range .Services}} - [{{.Name}}](#{{.FullName}}) - {{end}} - {{- end -}} -{{end}} -- [Scalar Value Types](#scalar-value-types) - -{{range .Files}} -{{$file_name := .Name}} - -

Top

- -## {{.Name}} -{{.Description}} - -{{range .Messages}} - - -### {{.LongName}} -{{.Description}} - -{{if .HasFields}} -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -{{range .Fields -}} - | `{{.Name}}` | [{{.LongType}}](#{{.FullType}}) | {{.Label}} | {{if (index .Options "deprecated"|default false)}}**Deprecated.** {{end}}{{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} | -{{end}} -{{end}} - -{{if .HasExtensions}} -| Extension | Type | Base | Number | Description | -| --------- | ---- | ---- | ------ | ----------- | -{{range .Extensions -}} - | `{{.Name}}` | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} | -{{end}} -{{end}} - -{{end}} - -{{range .Enums}} - - -### {{.LongName}} -{{.Description}} - -| Name | Number | Description | -| ---- | ------ | ----------- | -{{range .Values -}} - | {{.Name}} | {{.Number}} | {{nobr .Description}} | -{{end}} - -{{end}} - -{{if .HasExtensions}} - - -### File-level Extensions -| Extension | Type | Base | Number | Description | -| --------- | ---- | ---- | ------ | ----------- | -{{range .Extensions -}} - | `{{.Name}}` | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: `{{.DefaultValue}}`{{end}} | -{{end}} -{{end}} - -{{range .Services}} - - -### {{.Name}} -{{.Description}} - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -{{range .Methods -}} - | `{{.Name}}` | [{{.RequestLongType}}](#{{.RequestFullType}}){{if .RequestStreaming}} stream{{end}} | [{{.ResponseLongType}}](#{{.ResponseFullType}}){{if .ResponseStreaming}} stream{{end}} | {{nobr .Description}} | {{with (index .Options "google.api.http")}}{{range .Rules}}{{.Method}}|{{.Pattern}}{{end}}{{end}}| -{{end}} -{{end}} - -{{end}} - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | -{{range .Scalars -}} - | {{.ProtoType}} | {{.Notes}} | {{.CppType}} | {{.JavaType}} | {{.PythonType}} | {{.GoType}} | {{.CSharp}} | {{.PhpType}} | {{.RubyType}} | -{{end}} diff --git a/go.mod b/go.mod index c3acd521d..bb44658d3 100644 --- a/go.mod +++ b/go.mod @@ -5,8 +5,10 @@ go 1.19 require ( cosmossdk.io/errors v1.0.0-beta.7 cosmossdk.io/math v1.0.0-rc.0 + github.com/cosmos/cosmos-proto v1.0.0-alpha8 github.com/cosmos/cosmos-sdk v0.46.14 github.com/cosmos/go-bip39 v1.0.0 + github.com/cosmos/gogoproto v1.4.8 github.com/cosmos/ibc-go/v6 v6.2.0 github.com/ethereum/go-ethereum v1.10.22 github.com/gogo/protobuf v1.3.3 @@ -63,7 +65,6 @@ require ( github.com/confio/ics23/go v0.9.0 // indirect github.com/containerd/continuity v0.3.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-proto v1.0.0-alpha8 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect github.com/cosmos/iavl v0.19.6 // indirect github.com/cosmos/ledger-cosmos-go v0.12.4 // indirect diff --git a/go.sum b/go.sum index 9f3f7624a..dd41d8054 100644 --- a/go.sum +++ b/go.sum @@ -247,6 +247,8 @@ github.com/cosmos/cosmos-sdk v0.46.14/go.mod h1:9MRixWsgoJ2UmVsCRRePtENFPP3cM+gT 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.8 h1:BrHKc6WFZt8+jRV71vKSQE+JrfF+JAnzrKo2VP7wIZ4= +github.com/cosmos/gogoproto v1.4.8/go.mod h1:hnb0DIEWTv+wdNzNcqus5xCQXq5+CXauq1FJuurRfVY= github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.19.6 h1:XY78yEeNPrEYyNCKlqr9chrwoeSDJ0bV2VjocTk//OU= diff --git a/proto/buf.gen.doc.yaml b/proto/buf.gen.doc.yaml new file mode 100644 index 000000000..9890780e7 --- /dev/null +++ b/proto/buf.gen.doc.yaml @@ -0,0 +1,5 @@ +version: v1 +plugins: + - name: doc + out: ../docs/core/ + opt: ../docs/protodoc-markdown.tmpl,proto-docs.md 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..3fa18eb3d --- /dev/null +++ b/proto/buf.lock @@ -0,0 +1,18 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: cosmos + repository: cosmos-proto + commit: 1935555c206d4afb9e94615dfd0fad31 + digest: shake256:c74d91a3ac7ae07d579e90eee33abf9b29664047ac8816500cf22c081fec0d72d62c89ce0bebafc1f6fec7aa5315be72606717740ca95007248425102c365377 + - remote: buf.build + owner: cosmos + repository: gogo-proto + commit: 88ef6483f90f478fb938c37dde52ece3 + digest: shake256:89c45df2aa11e0cff97b0d695436713db3d993d76792e9f8dc1ae90e6ab9a9bec55503d48ceedd6b86069ab07d3041b32001b2bfe0227fa725dd515ff381e5ba + - remote: buf.build + owner: googleapis + repository: googleapis + commit: 7e6f6e774e29406da95bd61cdcdbc8bc + digest: shake256:fe43dd2265ea0c07d76bd925eeba612667cf4c948d2ce53d6e367e1b4b3cb5fa69a51e6acb1a6a50d32f894f054a35e6c0406f6808a483f2752e10c866ffbf73 diff --git a/proto/buf.yaml b/proto/buf.yaml new file mode 100644 index 000000000..b47252fdd --- /dev/null +++ b/proto/buf.yaml @@ -0,0 +1,10 @@ +version: v1 +name: buf.build/sommelier/sommelier +deps: + - buf.build/cosmos/cosmos-proto + - buf.build/cosmos/gogo-proto + - buf.build/googleapis/googleapis +breaking: + use: + - FILE + diff --git a/proto/cork/v2/cork.proto b/proto/cork/v2/cork.proto index b42e87110..631cbfa51 100644 --- a/proto/cork/v2/cork.proto +++ b/proto/cork/v2/cork.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package cork.v2; -option go_package = "github.com/peggyjv/sommelier/v7/x/cork/types"; +option go_package = "github.com/peggyjv/sommelier/v7/x/cork/types/v2"; message Cork { // call body containing the ABI encoded bytes to send to the contract diff --git a/proto/cork/v2/genesis.proto b/proto/cork/v2/genesis.proto index 1310a1f58..f0bd5af8a 100644 --- a/proto/cork/v2/genesis.proto +++ b/proto/cork/v2/genesis.proto @@ -4,8 +4,7 @@ package cork.v2; import "cork/v2/cork.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/cork/types"; - +option go_package = "github.com/peggyjv/sommelier/v7/x/cork/types/v2"; // GenesisState - all cork state that must be provided at genesis message GenesisState { diff --git a/proto/cork/v2/proposal.proto b/proto/cork/v2/proposal.proto index 7cbee8515..314953292 100644 --- a/proto/cork/v2/proposal.proto +++ b/proto/cork/v2/proposal.proto @@ -3,7 +3,7 @@ package cork.v2; import "cork/v2/cork.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/cork/types"; +option go_package = "github.com/peggyjv/sommelier/v7/x/cork/types/v2"; message AddManagedCellarIDsProposal { string title = 1; diff --git a/proto/cork/v2/query.proto b/proto/cork/v2/query.proto index e3812e8e0..ae9df39c4 100644 --- a/proto/cork/v2/query.proto +++ b/proto/cork/v2/query.proto @@ -6,7 +6,7 @@ import "google/api/annotations.proto"; import "cork/v2/genesis.proto"; import "cork/v2/cork.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/cork/types"; +option go_package = "github.com/peggyjv/sommelier/v7/x/cork/types/v2"; // Query defines the gRPC query service for the cork module. service Query { diff --git a/proto/cork/v2/tx.proto b/proto/cork/v2/tx.proto index 00ac7d4bf..c28f66a23 100644 --- a/proto/cork/v2/tx.proto +++ b/proto/cork/v2/tx.proto @@ -3,7 +3,7 @@ package cork.v2; import "cork/v2/cork.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/cork/types"; +option go_package = "github.com/peggyjv/sommelier/v7/x/cork/types/v2"; // MsgService defines the msgs that the cork module handles service Msg { diff --git a/scripts/README.md b/scripts/README.md deleted file mode 100644 index c0aba168f..000000000 --- a/scripts/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Scripts - -These scripts are copied from the [Cosmos-SDK](https://github.com/cosmos/cosmos-sdk/tree/v0.42.1/scripts) respository -with minor modifications. All credits and big thanks go to the original authors. - -Please note that a custom [fork](github.com/regen-network/protobuf) by the Regen network team is used. -See [`go.mod`](../go.mod) for version. \ No newline at end of file diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index f12f1c9e3..8315cad34 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -2,45 +2,19 @@ set -eo pipefail -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 sommelier folder." - return 1 - fi - - go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos@latest 2>/dev/null -} - -echo "verifying protoc gocosmos" -protoc_gen_gocosmos +ROOT=$(git rev-parse --show-toplevel 2>/dev/null) +cd $ROOT/proto echo "generating proto and gRPC gateway files..." +buf generate --template buf.gen.gogo.yaml +cd .. -proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) -for dir in $proto_dirs; do - buf 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') - -done +# move proto files to the right places +xpath=$(head -n 1 go.mod | sed 's/^module //') +cp -r $xpath/* ./ -echo "generating proto docs..." -# command to generate docs using protoc-gen-doc -buf protoc \ --I "proto" \ --I "third_party/proto" \ ---doc_out=./docs/core \ ---doc_opt=./docs/protodoc-markdown.tmpl,proto-docs.md \ -$(find "$(pwd)/proto" -maxdepth 5 -name '*.proto') +echo "cleaning up..." go mod tidy - -echo "(re)moving proto files.." -# move proto files to the right places -cp -r github.com/peggyjv/sommelier/* ./ rm -rf github.com echo "done" diff --git a/third_party/proto/buf.lock b/third_party/proto/buf.lock new file mode 100644 index 000000000..3fa18eb3d --- /dev/null +++ b/third_party/proto/buf.lock @@ -0,0 +1,18 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: cosmos + repository: cosmos-proto + commit: 1935555c206d4afb9e94615dfd0fad31 + digest: shake256:c74d91a3ac7ae07d579e90eee33abf9b29664047ac8816500cf22c081fec0d72d62c89ce0bebafc1f6fec7aa5315be72606717740ca95007248425102c365377 + - remote: buf.build + owner: cosmos + repository: gogo-proto + commit: 88ef6483f90f478fb938c37dde52ece3 + digest: shake256:89c45df2aa11e0cff97b0d695436713db3d993d76792e9f8dc1ae90e6ab9a9bec55503d48ceedd6b86069ab07d3041b32001b2bfe0227fa725dd515ff381e5ba + - remote: buf.build + owner: googleapis + repository: googleapis + commit: 7e6f6e774e29406da95bd61cdcdbc8bc + digest: shake256:fe43dd2265ea0c07d76bd925eeba612667cf4c948d2ce53d6e367e1b4b3cb5fa69a51e6acb1a6a50d32f894f054a35e6c0406f6808a483f2752e10c866ffbf73 diff --git a/buf.yaml b/third_party/proto/buf.yaml similarity index 58% rename from buf.yaml rename to third_party/proto/buf.yaml index 61b6c595e..0c9da2c91 100644 --- a/buf.yaml +++ b/third_party/proto/buf.yaml @@ -1,9 +1,8 @@ -build: - roots: - - proto - - third_party/proto - excludes: - - third_party/proto/google/protobuf +version: v1 +deps: + - buf.build/cosmos/cosmos-proto + - buf.build/cosmos/gogo-proto + - buf.build/googleapis/googleapis lint: use: - DEFAULT @@ -16,15 +15,11 @@ lint: - PACKAGE_VERSION_SUFFIX - RPC_REQUEST_STANDARD_NAME ignore: - - tendermint - - gogoproto - - cosmos_proto - - google + - tendermint/ + - cosmos_proto/ breaking: use: - FILE ignore: - tendermint - - gogoproto - cosmos_proto - - google diff --git a/third_party/proto/cosmos_proto/cosmos.proto b/third_party/proto/cosmos_proto/cosmos.proto deleted file mode 100644 index 15e190dfc..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 6342ee9fc..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 1bb611187..000000000 --- a/third_party/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 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/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 f9d53e085..000000000 --- a/third_party/proto/google/api/http.proto +++ /dev/null @@ -1,375 +0,0 @@ -// Copyright 2015 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 parameters 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; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// 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 URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `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 URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that 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) = { -// patch: "/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 | gRPC -// -----|----- -// `PATCH /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) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /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 when -// 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 | gRPC -// -----|----- -// `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 -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// 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=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method 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 { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. 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 request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - 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 e0f2c2938..000000000 --- a/third_party/proto/google/api/httpbody.proto +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2015 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; -} diff --git a/third_party/proto/google/protobuf/any.proto b/third_party/proto/google/protobuf/any.proto deleted file mode 100644 index cc1e5a386..000000000 --- a/third_party/proto/google/protobuf/any.proto +++ /dev/null @@ -1,158 +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; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option go_package = "google.golang.org/protobuf/types/known/anypb"; -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 := anypb.New(foo) -// if err != nil { -// ... -// } -// ... -// foo := &pb.Foo{} -// if err := any.UnmarshalTo(foo); err != nil { -// ... -// } -// -// The pack methods provided by protobuf library will by default use -// 'type.googleapis.com/full.type.name' as the type URL and the unpack -// methods only use the fully qualified type name after the last '/' -// in the type URL, for example "foo.bar.com/x/y.z" will yield type -// name "y.z". -// -// -// JSON -// ==== -// The JSON representation of an `Any` value uses the regular -// representation of the deserialized, embedded message, with an -// additional field `@type` which contains the type URL. Example: -// -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } -// -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } -// -// If the embedded message type is well-known and has a custom JSON -// representation, that representation will be embedded adding a field -// `value` which holds the custom JSON in addition to the `@type` -// field. Example (for message [google.protobuf.Duration][]): -// -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } -// -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; -} diff --git a/x/auction/types/auction.pb.go b/x/auction/types/auction.pb.go index 77b7bc5db..4a3b6ab44 100644 --- a/x/auction/types/auction.pb.go +++ b/x/auction/types/auction.pb.go @@ -5,11 +5,11 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/regen-network/cosmos-proto" io "io" math "math" math_bits "math/bits" diff --git a/x/auction/types/genesis.pb.go b/x/auction/types/genesis.pb.go index 17d9f3a50..1e0eeb151 100644 --- a/x/auction/types/genesis.pb.go +++ b/x/auction/types/genesis.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/x/auction/types/proposal.pb.go b/x/auction/types/proposal.pb.go index 220cf1403..728f9ad03 100644 --- a/x/auction/types/proposal.pb.go +++ b/x/auction/types/proposal.pb.go @@ -5,8 +5,8 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" proto "github.com/gogo/protobuf/proto" - _ "github.com/regen-network/cosmos-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 8ed85fbfe..b33267f96 100644 --- a/x/auction/types/query.pb.go +++ b/x/auction/types/query.pb.go @@ -6,11 +6,11 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-proto" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - _ "github.com/regen-network/cosmos-proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/auction/types/tx.pb.go b/x/auction/types/tx.pb.go index 54d1fe753..bd310badc 100644 --- a/x/auction/types/tx.pb.go +++ b/x/auction/types/tx.pb.go @@ -6,11 +6,11 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - _ "github.com/regen-network/cosmos-proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/x/axelarcork/types/axelarcork.pb.go b/x/axelarcork/types/axelarcork.pb.go index ef506c3d1..ecd7b56c1 100644 --- a/x/axelarcork/types/axelarcork.pb.go +++ b/x/axelarcork/types/axelarcork.pb.go @@ -7,7 +7,7 @@ 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" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/x/axelarcork/types/event.pb.go b/x/axelarcork/types/event.pb.go index e674b6327..00922cc9a 100644 --- a/x/axelarcork/types/event.pb.go +++ b/x/axelarcork/types/event.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/x/axelarcork/types/genesis.pb.go b/x/axelarcork/types/genesis.pb.go index 8714dd1aa..9a377a0a9 100644 --- a/x/axelarcork/types/genesis.pb.go +++ b/x/axelarcork/types/genesis.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/x/axelarcork/types/proposal.pb.go b/x/axelarcork/types/proposal.pb.go index 992d2010e..2a78fdabb 100644 --- a/x/axelarcork/types/proposal.pb.go +++ b/x/axelarcork/types/proposal.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/x/axelarcork/types/query.pb.go b/x/axelarcork/types/query.pb.go index d1791eada..2387f2dea 100644 --- a/x/axelarcork/types/query.pb.go +++ b/x/axelarcork/types/query.pb.go @@ -6,7 +6,7 @@ package types import ( context "context" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" diff --git a/x/axelarcork/types/tx.pb.go b/x/axelarcork/types/tx.pb.go index f2a2052a4..840ef50a4 100644 --- a/x/axelarcork/types/tx.pb.go +++ b/x/axelarcork/types/tx.pb.go @@ -7,7 +7,7 @@ import ( context "context" fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" diff --git a/x/cellarfees/types/cellarfees.pb.go b/x/cellarfees/types/cellarfees.pb.go index 61e7010ab..96be482c3 100644 --- a/x/cellarfees/types/cellarfees.pb.go +++ b/x/cellarfees/types/cellarfees.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/x/cellarfees/types/genesis.pb.go b/x/cellarfees/types/genesis.pb.go index 5c23e81b9..79758e695 100644 --- a/x/cellarfees/types/genesis.pb.go +++ b/x/cellarfees/types/genesis.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/x/cellarfees/types/params.pb.go b/x/cellarfees/types/params.pb.go index a3e6e5469..546ca87eb 100644 --- a/x/cellarfees/types/params.pb.go +++ b/x/cellarfees/types/params.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/x/cellarfees/types/query.pb.go b/x/cellarfees/types/query.pb.go index d9c3a281b..bb0444a55 100644 --- a/x/cellarfees/types/query.pb.go +++ b/x/cellarfees/types/query.pb.go @@ -7,7 +7,7 @@ import ( context "context" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" diff --git a/x/cork/types/v2/cork.pb.go b/x/cork/types/v2/cork.pb.go index 9a2442c47..f633ea290 100644 --- a/x/cork/types/v2/cork.pb.go +++ b/x/cork/types/v2/cork.pb.go @@ -267,30 +267,30 @@ func init() { proto.RegisterFile("cork/v2/cork.proto", fileDescriptor_1219f78116 var fileDescriptor_1219f78116b242b2 = []byte{ // 373 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xcf, 0x8a, 0xdb, 0x30, - 0x10, 0x87, 0xa3, 0xc4, 0xb4, 0xb1, 0x92, 0x94, 0xa2, 0x10, 0x6a, 0x4a, 0x71, 0x13, 0x9f, 0x72, - 0x28, 0x16, 0xb8, 0xd0, 0x9e, 0x5b, 0x97, 0xd2, 0xde, 0x8a, 0x73, 0xeb, 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0x7c, 0xc0, 0xdd, 0x42, 0x78, + 0x8e, 0x7d, 0x4e, 0xb7, 0x10, 0xc1, 0x23, 0xc2, 0xd8, 0xce, 0x87, 0x7a, 0x2b, 0xcd, 0x1b, 0x29, + 0x7c, 0xc6, 0x7d, 0x56, 0x55, 0x5a, 0x35, 0x20, 0xac, 0x41, 0x3f, 0xb9, 0xfe, 0x13, 0x8a, 0xc7, + 0xa7, 0x9a, 0xc9, 0xb4, 0x02, 0xcd, 0x61, 0x63, 0x58, 0x06, 0xd6, 0xc8, 0x4d, 0xc8, 0x05, 0xfd, + 0xbd, 0x92, 0xe0, 0x2b, 0x1e, 0xc4, 0x20, 0x25, 0xd3, 0x8b, 0xdf, 0x4b, 0x30, 0xe4, 0x23, 0xee, + 0x15, 0xa2, 0xf6, 0xd0, 0xb4, 0x37, 0x77, 0x93, 0xb6, 0xfc, 0xb5, 0x78, 0x3a, 0xf8, 0x68, 0x7f, + 0xf0, 0xd1, 0xcb, 0xc1, 0x47, 0x0f, 0x47, 0xbf, 0xb3, 0x3f, 0xfa, 0x9d, 0xe7, 0xa3, 0xdf, 0xf9, + 0x47, 0xb3, 0xc2, 0xe4, 0xdb, 0x55, 0xc8, 0xd5, 0x9a, 0x56, 0x90, 0x65, 0xbb, 0xff, 0x0d, 0xad, + 0xd5, 0x7a, 0x0d, 0xb2, 0x00, 0x4d, 0x9b, 0x1f, 0xf4, 0xce, 0x5e, 0x03, 0x35, 0xbb, 0x0a, 0x6a, + 0xda, 0x44, 0xab, 0x77, 0xf6, 0x2e, 0xbe, 0xbd, 0x06, 0x00, 0x00, 0xff, 0xff, 0x31, 0x07, 0x9d, + 0x0f, 0x2d, 0x02, 0x00, 0x00, } func (m *Cork) Marshal() (dAtA []byte, err error) { diff --git a/x/cork/types/v2/genesis.pb.go b/x/cork/types/v2/genesis.pb.go index 19095dab2..72512ad85 100644 --- a/x/cork/types/v2/genesis.pb.go +++ b/x/cork/types/v2/genesis.pb.go @@ -6,7 +6,7 @@ package v2 import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" @@ -157,35 +157,35 @@ func init() { func init() { proto.RegisterFile("cork/v2/genesis.proto", fileDescriptor_41a8de26c4f93490) } var fileDescriptor_41a8de26c4f93490 = []byte{ - // 439 bytes of a gzipped FileDescriptorProto + // 440 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x92, 0xc1, 0x6e, 0xd3, 0x40, 0x10, 0x86, 0xe3, 0x36, 0x04, 0x75, 0x53, 0x5a, 0xb1, 0xa4, 0x60, 0xf5, 0xe0, 0x44, 0x39, 0xa0, - 0x1c, 0x88, 0x2d, 0x05, 0x01, 0x82, 0x0b, 0x52, 0x5a, 0x51, 0xf5, 0x82, 0x2a, 0x07, 0x71, 0xe0, - 0x62, 0x6d, 0xed, 0x91, 0x63, 0xb2, 0xeb, 0xb5, 0x76, 0x36, 0x56, 0xf2, 0x16, 0x3c, 0x02, 0x6f, - 0xc0, 0x6b, 0xf4, 0xd8, 0x23, 0xe2, 0x10, 0xa1, 0xe4, 0x0d, 0x78, 0x02, 0xb4, 0x6b, 0x27, 0x84, - 0xd3, 0xce, 0xfe, 0xdf, 0xfc, 0xb3, 0x33, 0xa3, 0x25, 0x67, 0xb1, 0x54, 0xb3, 0xa0, 0x1c, 0x05, - 0x29, 0xe4, 0x80, 0x19, 0xfa, 0x85, 0x92, 0x5a, 0xd2, 0x87, 0x46, 0xf6, 0xcb, 0xd1, 0x39, 0xdd, - 0x72, 0x2b, 0x58, 0x78, 0xde, 0x49, 0x65, 0x2a, 0x6d, 0x18, 0x98, 0xa8, 0x52, 0xfb, 0xdf, 0x0f, - 0xc8, 0xf1, 0x55, 0x55, 0x64, 0xa2, 0x99, 0x06, 0x3a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b, 0x74, 0xaa, 0xd9, 0x69, 0x4e, 0xce, 0x4a, 0xa1, 0x20, 0x50, 0x73, 0x09, + 0x38, 0x17, 0x69, 0x64, 0x96, 0x74, 0x32, 0xb9, 0xd1, 0xb3, 0xfd, 0xda, 0xf4, 0x5f, 0xc6, 0x89, + 0x9a, 0x2f, 0xef, 0xdc, 0x50, 0x64, 0x2c, 0x14, 0x98, 0x09, 0xac, 0x8f, 0x31, 0x46, 0x0b, 0xa6, + 0xd6, 0x05, 0xa0, 0x7b, 0x0d, 0xe1, 0x9f, 0x4d, 0xff, 0x62, 0xcd, 0xb3, 0xf4, 0xfd, 0xf0, 0xff, + 0x6a, 0x43, 0xff, 0x89, 0x16, 0x3e, 0x35, 0x77, 0xfa, 0x9a, 0xbc, 0xc8, 0xf8, 0xaa, 0x9a, 0x36, + 0x28, 0x40, 0x06, 0xf5, 0x52, 0x84, 0x34, 0xab, 0x6e, 0xfb, 0xbd, 0x8c, 0xaf, 0xcc, 0x74, 0xb7, + 0x20, 0x3f, 0x37, 0x6c, 0x32, 0xbd, 0xdf, 0x3a, 0xd6, 0xc3, 0xd6, 0xb1, 0x7e, 0x6f, 0x1d, 0xeb, + 0xdb, 0xce, 0x69, 0x3d, 0xec, 0x9c, 0xd6, 0xcf, 0x9d, 0xd3, 0xfa, 0xc2, 0x0e, 0x1a, 0x2c, 0x20, + 0x8e, 0xd7, 0x5f, 0x4b, 0x86, 0x22, 0xcb, 0x20, 0x4d, 0x40, 0xb2, 0xf2, 0x2d, 0x5b, 0x99, 0x2f, + 0x53, 0xb5, 0xca, 0x4a, 0xef, 0xae, 0x63, 0xbe, 0xc9, 0xab, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x87, 0x7f, 0xdf, 0xdc, 0x72, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/cork/types/v2/proposal.pb.go b/x/cork/types/v2/proposal.pb.go index 8863520b4..3082bae69 100644 --- a/x/cork/types/v2/proposal.pb.go +++ b/x/cork/types/v2/proposal.pb.go @@ -307,21 +307,20 @@ type ScheduledCorkProposal struct { Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` BlockHeight uint64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` TargetContractAddress string `protobuf:"bytes,4,opt,name=target_contract_address,json=targetContractAddress,proto3" json:"target_contract_address,omitempty"` - // // The JSON representation of a ScheduleRequest defined in the Steward protos // // Example: The following is the JSON form of a ScheduleRequest containing a steward.v2.cellar_v1.TrustPosition // message, which maps to the `trustPosition(address)` function of the the V1 Cellar contract. // - // { - // "cellar_id": "0x1234567890000000000000000000000000000000", - // "cellar_v1": { - // "trust_position": { - // "erc20_address": "0x1234567890000000000000000000000000000000" - // } - // }, - // "block_height": 1000000 - // } + // { + // "cellar_id": "0x1234567890000000000000000000000000000000", + // "cellar_v1": { + // "trust_position": { + // "erc20_address": "0x1234567890000000000000000000000000000000" + // } + // }, + // "block_height": 1000000 + // } // // You can use the Steward CLI to generate the required JSON rather than constructing it by hand https://github.com/peggyjv/steward ContractCallProtoJson string `protobuf:"bytes,5,opt,name=contract_call_proto_json,json=contractCallProtoJson,proto3" json:"contract_call_proto_json,omitempty"` @@ -492,36 +491,37 @@ func init() { func init() { proto.RegisterFile("cork/v2/proposal.proto", fileDescriptor_e01dea5e2496e85f) } var fileDescriptor_e01dea5e2496e85f = []byte{ - // 464 bytes of a gzipped FileDescriptorProto + // 465 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xc1, 0x6a, 0x13, 0x41, - 0x18, 0xce, 0xb4, 0x69, 0x4b, 0x26, 0x82, 0x32, 0x34, 0xba, 0x28, 0x2e, 0x71, 0x0f, 0x92, 0x82, - 0xec, 0x42, 0x0a, 0xf6, 0x5c, 0x13, 0xc4, 0x0a, 0x42, 0x49, 0x0f, 0x82, 0x97, 0x65, 0x32, 0xf3, - 0xb3, 0x3b, 0xcd, 0xec, 0xce, 0x30, 0x33, 0x59, 0xec, 0x1b, 0x78, 0x11, 0x7c, 0x00, 0x5f, 0xc3, + 0x18, 0xce, 0xb4, 0x69, 0x4b, 0x26, 0x82, 0x32, 0x34, 0xba, 0x28, 0x2e, 0x71, 0x0f, 0x92, 0x5e, + 0x76, 0x20, 0x05, 0x7b, 0xae, 0xc9, 0xc1, 0x08, 0x42, 0x49, 0x0f, 0x82, 0x97, 0x65, 0x32, 0xf3, + 0xb3, 0x3b, 0xcd, 0xec, 0xce, 0x32, 0x33, 0x59, 0xec, 0x1b, 0x78, 0x11, 0x7c, 0x00, 0x5f, 0xc3, 0x37, 0xf0, 0xe0, 0xb1, 0x47, 0x8f, 0x92, 0xbc, 0x88, 0x74, 0x76, 0x53, 0x52, 0x91, 0x1e, 0xaa, - 0x94, 0x1e, 0xff, 0xef, 0xfb, 0xf7, 0xdf, 0xef, 0xfb, 0xfe, 0x99, 0xc1, 0x0f, 0x99, 0x32, 0xb3, - 0xa4, 0x1a, 0x26, 0xda, 0x28, 0xad, 0x2c, 0x95, 0xb1, 0x36, 0xca, 0x29, 0xb2, 0x73, 0x81, 0xc7, - 0xd5, 0xf0, 0x31, 0x59, 0x35, 0x78, 0xc0, 0x93, 0xd1, 0x37, 0x84, 0x9f, 0x1c, 0x72, 0xfe, 0x8e, - 0x96, 0x34, 0x03, 0x3e, 0x02, 0x29, 0xa9, 0x39, 0x1a, 0xdb, 0xe3, 0x66, 0x04, 0xd9, 0xc5, 0x5b, - 0x4e, 0x38, 0x09, 0x01, 0xea, 0xa3, 0x41, 0x67, 0x52, 0x17, 0xa4, 0x8f, 0xbb, 0x1c, 0x2c, 0x33, - 0x42, 0x3b, 0xa1, 0xca, 0x60, 0xc3, 0x73, 0xeb, 0x10, 0xd9, 0xc7, 0x98, 0xf9, 0x61, 0xa9, 0xe0, - 0x36, 0xd8, 0xec, 0xa3, 0x41, 0x77, 0x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3f, 0xa2, 0x52, 0x1e, 0x5f, 0xb0, - 0x6f, 0xad, 0x2a, 0xa3, 0x4f, 0x1b, 0xb8, 0xff, 0x57, 0x97, 0xff, 0x23, 0xfb, 0x3b, 0x68, 0x78, - 0x7d, 0xe1, 0xdb, 0x57, 0x16, 0xfe, 0xea, 0xf5, 0x8f, 0x45, 0x88, 0xce, 0x17, 0x21, 0xfa, 0xb5, - 0x08, 0xd1, 0x97, 0x65, 0xd8, 0x3a, 0x5f, 0x86, 0xad, 0x9f, 0xcb, 0xb0, 0xf5, 0xe1, 0x45, 0x26, - 0x5c, 0x3e, 0x9f, 0xc6, 0x4c, 0x15, 0x89, 0x86, 0x2c, 0x3b, 0x3b, 0xad, 0x12, 0xab, 0x8a, 0x02, - 0xa4, 0x00, 0x93, 0x54, 0x07, 0xc9, 0x47, 0xff, 0xcc, 0x25, 0xee, 0x4c, 0x83, 0x9d, 0x6e, 0x7b, - 0x29, 0xfb, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x7a, 0xd4, 0xbf, 0x65, 0x24, 0x05, 0x00, 0x00, + 0x94, 0x1e, 0xff, 0xef, 0xfb, 0xf7, 0xdf, 0xef, 0xfb, 0xfe, 0x99, 0xc1, 0x8f, 0xb9, 0x36, 0x73, + 0x5a, 0x0d, 0x69, 0x69, 0x74, 0xa9, 0x2d, 0x53, 0x71, 0x69, 0xb4, 0xd3, 0x64, 0xef, 0x12, 0x8f, + 0xab, 0xe1, 0x53, 0xb2, 0x6e, 0xf0, 0x80, 0x27, 0xa3, 0x6f, 0x08, 0x3f, 0x3b, 0x16, 0xe2, 0x1d, + 0x2b, 0x58, 0x0a, 0x62, 0x04, 0x4a, 0x31, 0x33, 0x19, 0xdb, 0x93, 0x66, 0x04, 0xd9, 0xc7, 0x3b, + 0x4e, 0x3a, 0x05, 0x01, 0xea, 0xa3, 0x41, 0x67, 0x5a, 0x17, 0xa4, 0x8f, 0xbb, 0x02, 0x2c, 0x37, + 0xb2, 0x74, 0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0x47, 0x38, 0xb8, 0xfa, 0x80, 0x33, 0xa5, 0x12, + 0x7f, 0xe3, 0x92, 0x33, 0xab, 0x8b, 0xe6, 0x18, 0xf4, 0xd6, 0xfc, 0x88, 0x29, 0x75, 0x72, 0xc9, + 0xbe, 0xb5, 0xba, 0x88, 0x3e, 0x6d, 0xe1, 0xfe, 0x5f, 0x5d, 0xfe, 0x8f, 0xec, 0xef, 0xa1, 0xe1, + 0xcd, 0x85, 0xef, 0x5e, 0x5b, 0xf8, 0xeb, 0xc9, 0x8f, 0x65, 0x88, 0x2e, 0x96, 0x21, 0xfa, 0xb5, + 0x0c, 0xd1, 0x97, 0x55, 0xd8, 0xba, 0x58, 0x85, 0xad, 0x9f, 0xab, 0xb0, 0xf5, 0x81, 0xa6, 0xd2, + 0x65, 0x8b, 0x59, 0xcc, 0x75, 0x4e, 0x4b, 0x48, 0xd3, 0xf3, 0xb3, 0x8a, 0x5a, 0x9d, 0xe7, 0xa0, + 0x24, 0x18, 0x5a, 0x1d, 0xd1, 0x8f, 0xfe, 0x99, 0xa3, 0xee, 0xbc, 0x04, 0x4b, 0xab, 0xe1, 0x6c, + 0xd7, 0xab, 0x39, 0xfc, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xda, 0xa2, 0x0d, 0x25, 0x27, 0x05, 0x00, + 0x00, } func (m *AddManagedCellarIDsProposal) Marshal() (dAtA []byte, err error) { diff --git a/x/cork/types/v2/query.pb.go b/x/cork/types/v2/query.pb.go index aa3960fd2..9c93bf38b 100644 --- a/x/cork/types/v2/query.pb.go +++ b/x/cork/types/v2/query.pb.go @@ -6,7 +6,7 @@ package v2 import ( context "context" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -732,55 +732,55 @@ func init() { func init() { proto.RegisterFile("cork/v2/query.proto", fileDescriptor_5f2ffa9107b7d7f7) } var fileDescriptor_5f2ffa9107b7d7f7 = []byte{ - // 761 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0xcf, 0x4e, 0xdb, 0x58, - 0x14, 0xc6, 0x63, 0x06, 0x18, 0xe5, 0x84, 0x81, 0xd1, 0xe1, 0xbf, 0x01, 0x87, 0x18, 0x66, 0x88, - 0x68, 0x88, 0x69, 0x10, 0x62, 0xdd, 0x80, 0xaa, 0x46, 0xad, 0xda, 0x92, 0x6e, 0xaa, 0x6e, 0xa2, - 0x24, 0xbe, 0x72, 0xdc, 0xfc, 0xb9, 0xc1, 0x76, 0x22, 0x22, 0x84, 0x54, 0xb1, 0xee, 0xa2, 0x52, - 0x1f, 0xa1, 0xab, 0x4a, 0x7d, 0x10, 0x96, 0xa8, 0xdd, 0x74, 0x55, 0x55, 0xd0, 0x07, 0xa9, 0x7c, - 0x7d, 0x6d, 0x6c, 0xc7, 0x49, 0x28, 0xbb, 0xe4, 0x9c, 0xef, 0x7e, 0xdf, 0xcf, 0xce, 0x3d, 0x47, - 0x81, 0xd9, 0x2a, 0x35, 0xea, 0x4a, 0x37, 0xa7, 0x9c, 0x74, 0x88, 0xd1, 0xcb, 0xb6, 0x0d, 0x6a, - 0x51, 0xfc, 0xdb, 0x2e, 0x66, 0xbb, 0x39, 0x71, 0x4e, 0xa3, 0x1a, 0x65, 0x35, 0xc5, 0xfe, 0xe4, - 0xb4, 0xc5, 0x55, 0x8d, 0x52, 0xad, 0x41, 0x94, 0x72, 0x5b, 0x57, 0xca, 0xad, 0x16, 0xb5, 0xca, - 0x96, 0x4e, 0x5b, 0x26, 0xef, 0xce, 0xbb, 0x8e, 0x1a, 0x69, 0x11, 0x53, 0x77, 0xcb, 0xe8, 0x96, - 0x99, 0x37, 0xab, 0xc9, 0x73, 0x80, 0xc7, 0x76, 0xec, 0xcb, 0xb2, 0x51, 0x6e,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- 0x64, 0xab, 0xb4, 0xa9, 0xb4, 0x89, 0xa6, 0xf5, 0xde, 0x76, 0x7d, 0x66, 0xdd, 0x03, 0xe5, 0xd4, - 0x71, 0xb4, 0x7a, 0x6d, 0x62, 0x56, 0x26, 0xd9, 0x3f, 0x93, 0xbd, 0xdf, 0x01, 0x00, 0x00, 0xff, - 0xff, 0x4f, 0xad, 0x77, 0xc4, 0x18, 0x09, 0x00, 0x00, + // 760 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0xcf, 0x4e, 0x13, 0x51, + 0x14, 0xc6, 0x3b, 0x08, 0x98, 0x9e, 0x22, 0x98, 0xc3, 0xff, 0x01, 0xa6, 0x74, 0x40, 0x69, 0x10, + 0x7a, 0xb1, 0x84, 0xb0, 0xb6, 0xb0, 0xb0, 0xd1, 0xa8, 0xd4, 0x8d, 0x71, 0xd3, 0xb4, 0x9d, 0x9b, + 0xe9, 0xd8, 0x3f, 0xb7, 0xcc, 0x4c, 0x1b, 0x1a, 0x42, 0x62, 0x58, 0xbb, 0x30, 0xf1, 0x11, 0x5c, + 0x99, 0xf8, 0x20, 0x2c, 0x89, 0x6e, 0x5c, 0x19, 0x03, 0x3e, 0x88, 0xe9, 0x9d, 0x3b, 0xc3, 0x4c, + 0x3b, 0x6d, 0x91, 0x5d, 0x7b, 0xce, 0x77, 0xbf, 0xef, 0x37, 0xd3, 0x7b, 0x4e, 0x0a, 0xd3, 0x25, + 0x66, 0x56, 0x48, 0x2b, 0x4d, 0x8e, 0x9b, 0xd4, 0x6c, 0xa7, 0x1a, 0x26, 0xb3, 0x19, 0xde, 0xef, + 0x14, 0x53, 0xad, 0xb4, 0x3c, 0xa3, 0x33, 0x9d, 0xf1, 0x1a, 0xe9, 0x7c, 0x72, 0xda, 0xf2, 0xb2, + 0xce, 0x98, 0x5e, 0xa5, 0xa4, 0xd0, 0x30, 0x48, 0xa1, 0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0, 0xf8, 0x10, 0x8e, 0x4c, + 0xf6, 0xe2, 0x4a, 0x91, 0x2e, 0xaf, 0x14, 0xe9, 0xcf, 0x95, 0x22, 0x7d, 0xbe, 0x56, 0x22, 0x97, + 0xd7, 0x4a, 0xe4, 0xd7, 0xb5, 0x12, 0x79, 0x4f, 0x74, 0xc3, 0x2e, 0x37, 0x8b, 0xa9, 0x12, 0xab, + 0x91, 0x06, 0xd5, 0xf5, 0xf6, 0x87, 0x96, 0xcf, 0xac, 0xb5, 0x4f, 0x4e, 0x1c, 0x47, 0xbb, 0xdd, + 0xa0, 0x16, 0x69, 0xa5, 0x8b, 0xe3, 0xfc, 0xcf, 0xc9, 0xee, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x3d, 0x0d, 0xef, 0x6c, 0x1b, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/cork/types/v2/query.pb.gw.go b/x/cork/types/v2/query.pb.gw.go index 1458cdc9c..10d686865 100644 --- a/x/cork/types/v2/query.pb.gw.go +++ b/x/cork/types/v2/query.pb.gw.go @@ -2,7 +2,7 @@ // source: cork/v2/query.proto /* -Package types is a reverse proxy. +Package v2 is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ diff --git a/x/cork/types/v2/tx.pb.go b/x/cork/types/v2/tx.pb.go index c959b2813..198a7e830 100644 --- a/x/cork/types/v2/tx.pb.go +++ b/x/cork/types/v2/tx.pb.go @@ -145,24 +145,24 @@ func init() { proto.RegisterFile("cork/v2/tx.proto", fileDescriptor_271bdc677f23 var fileDescriptor_271bdc677f232222 = []byte{ // 280 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0xc1, 0x4a, 0xc3, 0x30, - 0x1c, 0xc6, 0x9b, 0x6e, 0x4c, 0x96, 0x4d, 0x91, 0x1c, 0x66, 0xd9, 0x21, 0x76, 0x3b, 0x55, 0x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0x6b, 0x29, 0xda, 0xb4, 0x14, 0x7d, 0xb4, 0x14, 0xbd, 0x76, 0xd4, - 0xda, 0x74, 0xd4, 0x7a, 0xef, 0xa8, 0xf5, 0x78, 0xce, 0x85, 0x4e, 0xeb, 0xc8, 0x8f, 0x65, 0xc1, - 0x4a, 0xe0, 0x7c, 0xfd, 0xdc, 0x30, 0x25, 0x8b, 0x02, 0x72, 0x01, 0x15, 0x6b, 0x2e, 0xd9, 0xca, - 0x8c, 0xc8, 0xf4, 0xba, 0x04, 0x15, 0x0d, 0xcc, 0x96, 0x17, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x61, 0xc9, 0x52, 0x38, 0x7c, 0x01, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x31, 0x4e, 0xc3, 0x30, + 0x18, 0x85, 0xeb, 0xb4, 0x2a, 0xaa, 0x5b, 0x10, 0xf2, 0x50, 0xa2, 0x0e, 0x26, 0xed, 0x14, 0x96, + 0x58, 0x0a, 0x03, 0x3b, 0x2c, 0x30, 0x74, 0x20, 0x2c, 0x88, 0x05, 0x29, 0xc9, 0x2f, 0xc7, 0x24, + 0xa9, 0x43, 0xec, 0x58, 0xed, 0x2d, 0x38, 0x16, 0x63, 0x47, 0x46, 0x94, 0x5c, 0x04, 0xd5, 0x14, + 0x84, 0x04, 0x8c, 0xfe, 0xde, 0x27, 0x3f, 0xfb, 0xe1, 0xe3, 0x44, 0xd6, 0x39, 0x33, 0x21, 0xd3, + 0xeb, 0xa0, 0xaa, 0xa5, 0x96, 0xe4, 0x60, 0x47, 0x02, 0x13, 0xce, 0xc8, 0x57, 0x64, 0x81, 0x0d, + 0x17, 0x06, 0x4f, 0x97, 0x8a, 0xdf, 0x25, 0x19, 0xa4, 0x4d, 0x01, 0x57, 0xb2, 0xce, 0x23, 0x78, + 0x6e, 0x40, 0x69, 0x32, 0xc7, 0x83, 0x9d, 0xe7, 0x22, 0x0f, 0xf9, 0xe3, 0xf0, 0x30, 0xd8, 0xdf, + 0x12, 0x58, 0xc7, 0x46, 0x64, 0x8e, 0x27, 0x71, 0x21, 0x93, 0xfc, 0x31, 0x03, 0xc1, 0x33, 0xed, + 0x3a, 0x1e, 0xf2, 0x07, 0xd1, 0xd8, 0xb2, 0x6b, 0x8b, 0xc8, 0x14, 0x0f, 0x95, 0xe0, 0x2b, 0xa8, + 0xdd, 0xbe, 0x87, 0xfc, 0x51, 0xb4, 0x3f, 0x2d, 0xce, 0xf0, 0xc9, 0xaf, 0x5e, 0x55, 0xc9, 0x95, + 0x02, 0x72, 0x84, 0x1d, 0x91, 0xda, 0xda, 0x51, 0xe4, 0x88, 0x34, 0xbc, 0xc7, 0xfd, 0xa5, 0xe2, + 0xe4, 0x16, 0x4f, 0x7e, 0xea, 0xe4, 0xf4, 0xfb, 0x45, 0x7f, 0x7f, 0x60, 0xe6, 0xfd, 0x2f, 0x7c, + 0x36, 0x5d, 0xde, 0xbc, 0xb6, 0x14, 0x6d, 0x5b, 0x8a, 0xde, 0x5b, 0x8a, 0x5e, 0x3a, 0xda, 0xdb, + 0x76, 0xb4, 0xf7, 0xd6, 0xd1, 0xde, 0x03, 0xe3, 0x42, 0x67, 0x4d, 0x1c, 0x24, 0xb2, 0x64, 0x15, + 0x70, 0xbe, 0x79, 0x32, 0x4c, 0xc9, 0xb2, 0x84, 0x42, 0x40, 0xcd, 0xcc, 0x05, 0x5b, 0xdb, 0x11, + 0x99, 0xde, 0x54, 0xa0, 0x98, 0x09, 0xe3, 0xa1, 0x9d, 0xf3, 0xfc, 0x23, 0x00, 0x00, 0xff, 0xff, + 0xcf, 0x1c, 0xa9, 0x14, 0x7f, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/incentives/types/genesis.pb.go b/x/incentives/types/genesis.pb.go index 9a7af1f9e..2a02bb252 100644 --- a/x/incentives/types/genesis.pb.go +++ b/x/incentives/types/genesis.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/x/incentives/types/query.pb.go b/x/incentives/types/query.pb.go index 0588d2e04..06e3d68ad 100644 --- a/x/incentives/types/query.pb.go +++ b/x/incentives/types/query.pb.go @@ -6,7 +6,7 @@ package types import ( context "context" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" diff --git a/x/pubsub/types/genesis.pb.go b/x/pubsub/types/genesis.pb.go index 0bef269ad..af050e42c 100644 --- a/x/pubsub/types/genesis.pb.go +++ b/x/pubsub/types/genesis.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/x/pubsub/types/params.pb.go b/x/pubsub/types/params.pb.go index 8cdf592bb..b0dad2270 100644 --- a/x/pubsub/types/params.pb.go +++ b/x/pubsub/types/params.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/x/pubsub/types/query.pb.go b/x/pubsub/types/query.pb.go index d3d519412..8da9dd243 100644 --- a/x/pubsub/types/query.pb.go +++ b/x/pubsub/types/query.pb.go @@ -7,7 +7,7 @@ import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" From 01ad6c8bdab60c1291bf608aa4a05bec0392e4fd Mon Sep 17 00:00:00 2001 From: Collin Date: Mon, 18 Mar 2024 17:00:06 -0500 Subject: [PATCH 25/32] feat: cellarfees v2 changes (#289) * WIP - cellarfees v2 protos * FeeTokenBalance(s) queries and helper functions * Remove previous upgrade wiring * Remove gravity keeper and hooks from cellarfees * Fix imports * Fix expected keeper * remove empty file * Initial update to auction handling * Wire up new param * Remove old upgrade files from build * Refactor cellarfees BeginBlocker * Update cellarfees keeper unit tests * Remove empty file * Fix broken unit tests and compiler errors * gofmt * WIP - fix integration tests * WIP - Integration test updates * Remove auction requirement that denom be prefixed with gravity * WIP - Integration test passing, fee acct usomm balance not going to 0 bug * Fix test and skip usomm in auction start logic * Linting * Remove old upgrades from linting rules * Add CLI commands for new queries * Fix bugs found in testing * Refactor FeeBalance methods/handler to iterate balances instead of token prices * Tweak comments and imports * Refactor beginAuction method * Comment in proto --- app/app.go | 78 +- app/upgrades/v4/upgrades.go | 2 + app/upgrades/v5/upgrades.go | 2 + app/upgrades/v6/upgrades.go | 2 + app/upgrades/v7/constants.go | 2 + app/upgrades/v7/upgrades.go | 3 + integration_tests/cellarfees_test.go | 297 +-- integration_tests/setup_test.go | 51 +- proto/cellarfees/v1/cellarfees.proto | 2 +- proto/cellarfees/v1/genesis.proto | 2 +- proto/cellarfees/v1/params.proto | 2 +- proto/cellarfees/v1/query.proto | 2 +- proto/cellarfees/v2/cellarfees.proto | 14 + proto/cellarfees/v2/genesis.proto | 16 + proto/cellarfees/v2/params.proto | 29 + proto/cellarfees/v2/query.proto | 74 + x/auction/keeper/proposal_handler_test.go | 18 +- x/auction/types/auction.go | 15 - x/auction/types/auction_test.go | 91 +- x/auction/types/errors.go | 4 +- x/auction/types/genesis_test.go | 23 +- x/auction/types/msgs.go | 6 - x/auction/types/msgs_test.go | 11 - x/cellarfees/client/cli/query.go | 99 +- x/cellarfees/keeper/abci.go | 68 +- x/cellarfees/keeper/abci_test.go | 264 +- x/cellarfees/keeper/auction.go | 8 +- x/cellarfees/keeper/auction_test.go | 52 +- x/cellarfees/keeper/cellarfees.go | 19 + x/cellarfees/keeper/cellarfees_test.go | 79 + x/cellarfees/keeper/genesis.go | 7 +- x/cellarfees/keeper/genesis_test.go | 50 +- x/cellarfees/keeper/hooks.go | 76 - x/cellarfees/keeper/hooks_test.go | 85 - x/cellarfees/keeper/keeper.go | 64 +- x/cellarfees/keeper/keeper_test.go | 32 +- x/cellarfees/keeper/query_server.go | 73 +- x/cellarfees/keeper/query_server_test.go | 150 +- x/cellarfees/module.go | 17 +- .../testutil/expected_keepers_mocks.go | 100 +- x/cellarfees/types/cellarfees.go | 68 - x/cellarfees/types/cellarfees_test.go | 65 - x/cellarfees/types/errors.go | 1 + x/cellarfees/types/expected_keepers.go | 9 +- x/cellarfees/types/genesis.go | 44 - x/cellarfees/types/keys.go | 6 +- x/cellarfees/types/{ => v1}/cellarfees.pb.go | 10 +- x/cellarfees/types/{ => v1}/genesis.pb.go | 42 +- x/cellarfees/types/v1/params.go | 9 + x/cellarfees/types/{ => v1}/params.pb.go | 46 +- x/cellarfees/types/{ => v1}/query.pb.go | 84 +- x/cellarfees/types/{ => v1}/query.pb.gw.go | 4 +- x/cellarfees/types/v2/cellarfees.pb.go | 353 +++ x/cellarfees/types/{ => v2}/codec.go | 2 +- x/cellarfees/types/v2/genesis.go | 29 + x/cellarfees/types/v2/genesis.pb.go | 374 +++ x/cellarfees/types/{ => v2}/params.go | 60 +- x/cellarfees/types/v2/params.pb.go | 484 ++++ x/cellarfees/types/v2/query.pb.go | 2249 +++++++++++++++++ x/cellarfees/types/v2/query.pb.gw.go | 514 ++++ x/cork/module.go | 2 - 61 files changed, 5110 insertions(+), 1334 deletions(-) create mode 100644 proto/cellarfees/v2/cellarfees.proto create mode 100644 proto/cellarfees/v2/genesis.proto create mode 100644 proto/cellarfees/v2/params.proto create mode 100644 proto/cellarfees/v2/query.proto create mode 100644 x/cellarfees/keeper/cellarfees_test.go delete mode 100644 x/cellarfees/keeper/hooks.go delete mode 100644 x/cellarfees/keeper/hooks_test.go delete mode 100644 x/cellarfees/types/cellarfees.go delete mode 100644 x/cellarfees/types/cellarfees_test.go delete mode 100644 x/cellarfees/types/genesis.go rename x/cellarfees/types/{ => v1}/cellarfees.pb.go (98%) rename x/cellarfees/types/{ => v1}/genesis.pb.go (84%) create mode 100644 x/cellarfees/types/v1/params.go rename x/cellarfees/types/{ => v1}/params.pb.go (84%) rename x/cellarfees/types/{ => v1}/query.pb.go (92%) rename x/cellarfees/types/{ => v1}/query.pb.gw.go (99%) create mode 100644 x/cellarfees/types/v2/cellarfees.pb.go rename x/cellarfees/types/{ => v2}/codec.go (96%) create mode 100644 x/cellarfees/types/v2/genesis.go create mode 100644 x/cellarfees/types/v2/genesis.pb.go rename x/cellarfees/types/{ => v2}/params.go (65%) create mode 100644 x/cellarfees/types/v2/params.pb.go create mode 100644 x/cellarfees/types/v2/query.pb.go create mode 100644 x/cellarfees/types/v2/query.pb.gw.go diff --git a/app/app.go b/app/app.go index b2d478e42..22a4e373f 100644 --- a/app/app.go +++ b/app/app.go @@ -96,10 +96,6 @@ import ( gravitykeeper "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/keeper" gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" appParams "github.com/peggyjv/sommelier/v7/app/params" - v4 "github.com/peggyjv/sommelier/v7/app/upgrades/v4" - v5 "github.com/peggyjv/sommelier/v7/app/upgrades/v5" - v6 "github.com/peggyjv/sommelier/v7/app/upgrades/v6" - v7 "github.com/peggyjv/sommelier/v7/app/upgrades/v7" "github.com/peggyjv/sommelier/v7/x/auction" auctionclient "github.com/peggyjv/sommelier/v7/x/auction/client" auctionkeeper "github.com/peggyjv/sommelier/v7/x/auction/keeper" @@ -223,6 +219,7 @@ var ( // incidentally this permission is also required to be able to send tokens from module accounts allowedReceivingModAcc = map[string]bool{ axelarcorktypes.ModuleName: true, + cellarfeestypes.ModuleName: true, } _ simapp.App = (*SommelierApp)(nil) @@ -492,7 +489,7 @@ func NewSommelierApp( app.CellarFeesKeeper = cellarfeeskeeper.NewKeeper( appCodec, keys[cellarfeestypes.StoreKey], app.GetSubspace(cellarfeestypes.ModuleName), - app.AccountKeeper, app.BankKeeper, app.MintKeeper, app.CorkKeeper, app.GravityKeeper, app.AuctionKeeper, + app.AccountKeeper, app.BankKeeper, app.MintKeeper, app.CorkKeeper, app.AuctionKeeper, ) app.IncentivesKeeper = incentiveskeeper.NewKeeper( @@ -506,7 +503,6 @@ func NewSommelierApp( app.GravityKeeper = *app.GravityKeeper.SetHooks( gravitytypes.NewMultiGravityHooks( app.CorkKeeper.Hooks(), - app.CellarFeesKeeper.Hooks(), )) // register the proposal types @@ -578,7 +574,7 @@ func NewSommelierApp( authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), cork.NewAppModule(app.CorkKeeper, appCodec), incentives.NewAppModule(app.IncentivesKeeper, app.DistrKeeper, app.BankKeeper, app.MintKeeper, appCodec), - cellarfees.NewAppModule(app.CellarFeesKeeper, appCodec, app.AccountKeeper, app.BankKeeper, app.MintKeeper, app.CorkKeeper, app.GravityKeeper, app.AuctionKeeper), + cellarfees.NewAppModule(app.CellarFeesKeeper, appCodec, app.AccountKeeper, app.BankKeeper, app.MintKeeper, app.CorkKeeper, app.AuctionKeeper), auction.NewAppModule(app.AuctionKeeper, app.BankKeeper, app.AccountKeeper, appCodec), pubsub.NewAppModule(appCodec, app.PubsubKeeper, app.StakingKeeper, app.GravityKeeper), ) @@ -713,7 +709,7 @@ func NewSommelierApp( cork.NewAppModule(app.CorkKeeper, appCodec), axelarcork.NewAppModule(app.AxelarCorkKeeper, appCodec), incentives.NewAppModule(app.IncentivesKeeper, app.DistrKeeper, app.BankKeeper, app.MintKeeper, appCodec), - cellarfees.NewAppModule(app.CellarFeesKeeper, appCodec, app.AccountKeeper, app.BankKeeper, app.MintKeeper, app.CorkKeeper, app.GravityKeeper, app.AuctionKeeper), + cellarfees.NewAppModule(app.CellarFeesKeeper, appCodec, app.AccountKeeper, app.BankKeeper, app.MintKeeper, app.CorkKeeper, app.AuctionKeeper), auction.NewAppModule(app.AuctionKeeper, app.BankKeeper, app.AccountKeeper, appCodec), pubsub.NewAppModule(appCodec, app.PubsubKeeper, app.StakingKeeper, app.GravityKeeper), ) @@ -969,30 +965,7 @@ func (app *SommelierApp) setupUpgradeStoreLoaders() { var storeUpgrades *storetypes.StoreUpgrades = nil - if upgradeInfo.Name == v4.UpgradeName { - storeUpgrades = &storetypes.StoreUpgrades{ - Added: []string{corktypes.ModuleName, cellarfeestypes.ModuleName}, - Deleted: []string{"allocation"}, - } - } - - if upgradeInfo.Name == v5.UpgradeName { - storeUpgrades = &storetypes.StoreUpgrades{ - Added: []string{incentivestypes.ModuleName}, - } - } - - if upgradeInfo.Name == v6.UpgradeName { - storeUpgrades = &storetypes.StoreUpgrades{ - Added: []string{icahosttypes.SubModuleName}, - } - } - - if upgradeInfo.Name == v7.UpgradeName { - storeUpgrades = &storetypes.StoreUpgrades{ - Added: []string{auctiontypes.ModuleName, axelarcorktypes.ModuleName, cellarfeestypes.ModuleName, pubsubtypes.ModuleName}, - } - } + // TODO: Add v8 store loader when writing upgrade handler if storeUpgrades != nil { app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, storeUpgrades)) @@ -1000,44 +973,5 @@ func (app *SommelierApp) setupUpgradeStoreLoaders() { } func (app *SommelierApp) setupUpgradeHandlers() { - app.UpgradeKeeper.SetUpgradeHandler( - v4.UpgradeName, - v4.CreateUpgradeHandler( - app.mm, - app.configurator, - app.AccountKeeper, - app.BankKeeper, - ), - ) - - app.UpgradeKeeper.SetUpgradeHandler( - v5.UpgradeName, - v5.CreateUpgradeHandler( - app.mm, - app.configurator, - app.IncentivesKeeper, - ), - ) - - app.UpgradeKeeper.SetUpgradeHandler( - v6.UpgradeName, - v6.CreateUpgradeHandler( - app.mm, - app.configurator, - ), - ) - - app.UpgradeKeeper.SetUpgradeHandler( - v7.UpgradeName, - v7.CreateUpgradeHandler( - app.mm, - app.configurator, - app.AuctionKeeper, - app.AxelarCorkKeeper, - app.CellarFeesKeeper, - app.CorkKeeper, - app.ICAHostKeeper, - app.PubsubKeeper, - ), - ) + // TODO: Add v8 upgrade handler } diff --git a/app/upgrades/v4/upgrades.go b/app/upgrades/v4/upgrades.go index a8e358bf5..81d8cd376 100644 --- a/app/upgrades/v4/upgrades.go +++ b/app/upgrades/v4/upgrades.go @@ -1,3 +1,5 @@ +//go:build exclude + package v4 import ( diff --git a/app/upgrades/v5/upgrades.go b/app/upgrades/v5/upgrades.go index bb34bd838..06c07b64c 100644 --- a/app/upgrades/v5/upgrades.go +++ b/app/upgrades/v5/upgrades.go @@ -1,3 +1,5 @@ +//go:build exclude + package v5 import ( diff --git a/app/upgrades/v6/upgrades.go b/app/upgrades/v6/upgrades.go index 93f027776..ba0add25d 100644 --- a/app/upgrades/v6/upgrades.go +++ b/app/upgrades/v6/upgrades.go @@ -1,3 +1,5 @@ +//go:build exclude + package v6 import ( diff --git a/app/upgrades/v7/constants.go b/app/upgrades/v7/constants.go index 43b8ba413..9bb0182e2 100644 --- a/app/upgrades/v7/constants.go +++ b/app/upgrades/v7/constants.go @@ -1,3 +1,5 @@ +//go:build exclude + package v7 // UpgradeName defines the on-chain upgrade name for the Sommelier v7 upgrade diff --git a/app/upgrades/v7/upgrades.go b/app/upgrades/v7/upgrades.go index e5dca5cf9..1d13ce00a 100644 --- a/app/upgrades/v7/upgrades.go +++ b/app/upgrades/v7/upgrades.go @@ -1,3 +1,6 @@ +//go:build exclude +// +build exclude + package v7 import ( diff --git a/integration_tests/cellarfees_test.go b/integration_tests/cellarfees_test.go index 308d921cd..042e7c47d 100644 --- a/integration_tests/cellarfees_test.go +++ b/integration_tests/cellarfees_test.go @@ -2,228 +2,180 @@ package integration_tests import ( "context" - "fmt" + "math/big" "time" + "cosmossdk.io/math" 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" disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethclient" + govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" auctiontypes "github.com/peggyjv/sommelier/v7/x/auction/types" cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" - corktypes "github.com/peggyjv/sommelier/v7/x/cork/types/v2" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" ) func (s *IntegrationTestSuite) TestCellarFees() { - s.Run("Bring up chain, send fees from ethereum, observe auction and fee distribution", func() { + s.Run("Bring up chain, submit TokenPrices, observe auction and fee distribution", func() { val := s.chain.validators[0] - ethereumSender := val.ethereumKey.address kb, err := val.keyring() s.Require().NoError(err) - ethClient, err := ethclient.Dial(fmt.Sprintf("http://%s", s.ethResource.GetHostPort("8545/tcp"))) - s.Require().NoError(err) - clientCtx, err := s.chain.clientContext("tcp://localhost:26657", &kb, "val", val.address()) s.Require().NoError(err) auctionQueryClient := auctiontypes.NewQueryClient(clientCtx) bankQueryClient := banktypes.NewQueryClient(clientCtx) - cellarfeesQueryClient := cellarfeestypes.NewQueryClient(clientCtx) - corkQueryClient := corktypes.NewQueryClient(clientCtx) + cellarfeesQueryClient := cellarfeestypesv2.NewQueryClient(clientCtx) distQueryClient := disttypes.NewQueryClient(clientCtx) - s.T().Log("Verify that the first validator address is an approved cellar ID") - idsRes, err := corkQueryClient.QueryCellarIDs(context.Background(), &corktypes.QueryCellarIDsRequest{}) - s.Require().NoError(err) - - var found bool - for _, id := range idsRes.CellarIds { - if id == ethereumSender { - found = true - break - } - } - s.Require().True(found, "validator ethereum address %s is not an approved cellar ID", ethereumSender) - - s.T().Logf("Verify that the module account's fee balances are zero") + s.T().Logf("Verify that the module account's fee balances are not zero") ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) defer cancel() - acctsRes, err := cellarfeesQueryClient.QueryModuleAccounts(ctx, &cellarfeestypes.QueryModuleAccountsRequest{}) + acctsRes, err := cellarfeesQueryClient.QueryModuleAccounts(ctx, &cellarfeestypesv2.QueryModuleAccountsRequest{}) s.Require().NoError(err, "Failed to query module accounts") feesAddress := acctsRes.FeesAddress s.T().Logf("Fees address: %s", feesAddress) - balanceRes, err := bankQueryClient.Balance(ctx, &banktypes.QueryBalanceRequest{ + balanceRes, err := bankQueryClient.AllBalances(ctx, &banktypes.QueryAllBalancesRequest{ Address: feesAddress, - Denom: fmt.Sprintf("gravity%s", alphaERC20Contract.Hex()), }) s.Require().NoError(err, "Failed to query fee balance of denom %s", alphaERC20Contract.Hex()) - s.Require().Zero(balanceRes.Balance.Amount.Uint64()) - balanceRes, err = bankQueryClient.Balance(ctx, &banktypes.QueryBalanceRequest{ - Address: feesAddress, - Denom: fmt.Sprintf("gravity%s", betaERC20Contract.Hex()), - }) - s.Require().NoError(err, "Failed to query fee balance of denom %s", betaERC20Contract.Hex()) - s.Require().Zero(balanceRes.Balance.Amount.Uint64()) - - s.T().Logf("Approving Gravity to spend Alpha ERC20") - approveData := PackApproveERC20(gravityContract) - err = SendEthTransaction(ethClient, &val.ethereumKey, alphaERC20Contract, approveData) - s.Require().NoError(err, "Error approving spending ALPHA balance for the gravity contract on behalf of the first validator") - s.T().Logf("Approving Gravity to spend Beta ERC20") - approveData = PackApproveERC20(gravityContract) - err = SendEthTransaction(ethClient, &val.ethereumKey, betaERC20Contract, approveData) - s.Require().NoError(err, "Error approving spending BETA balance for the gravity contract on behalf of the first validator") - - s.T().Logf("Waiting for allowance confirmations..") - data := PackAllowance(common.HexToAddress(ethereumSender), gravityContract) - s.Require().Eventually(func() bool { - res, _ := ethClient.CallContract(context.Background(), ethereum.CallMsg{ - From: common.HexToAddress(ethereumSender), - To: &alphaERC20Contract, - Gas: 0, - Data: data, - }, nil) - - allowance := UnpackEthUInt(res).BigInt() - s.T().Logf("Allowance: %v", allowance) - - return sdk.NewIntFromBigInt(allowance).GT(sdk.ZeroInt()) - }, time.Second*10, time.Second, "AlphaERC20 allowance not found") + foundGravityDenom, foundIbcDenom := false, false + for _, balance := range balanceRes.Balances { + if balance.Denom == gravityDenom { + s.Require().NotZero(balance.Amount.Uint64()) + foundGravityDenom = true + } else if balance.Denom == ibcDenom { + s.Require().NotZero(balance.Amount.Uint64()) + foundIbcDenom = true + } + } - data = PackAllowance(common.HexToAddress(ethereumSender), gravityContract) - s.Require().Eventually(func() bool { - res, _ := ethClient.CallContract(context.Background(), ethereum.CallMsg{ - From: common.HexToAddress(ethereumSender), - To: &betaERC20Contract, - Gas: 0, - Data: data, - }, nil) - - allowance := UnpackEthUInt(res).BigInt() - s.T().Logf("Allowance: %v", allowance) - - return sdk.NewIntFromBigInt(allowance).GT(sdk.ZeroInt()) - }, time.Second*10, time.Second, "BetaERC20 allowance not found") - - s.T().Log("Sending ALPHA fees to cellarfees module account") - acc, err := sdk.AccAddressFromBech32(feesAddress) - s.Require().NoError(err, "Failed to derive fees account address from bech32 string: %s", feesAddress) - sendData := PackSendToCosmos(alphaERC20Contract, acc, sdk.NewInt(50000)) - err = SendEthTransaction(ethClient, &val.ethereumKey, gravityContract, sendData) - s.Require().NoError(err, "Failed to send fees transaction to Cosmos") - - s.T().Log("Sending BETA fees to cellarfees module account") - acc, err = sdk.AccAddressFromBech32(feesAddress) - s.Require().NoError(err, "Failed to derive fees account address from bech32 string: %s", feesAddress) - sendData = PackSendToCosmos(betaERC20Contract, acc, sdk.NewInt(20000)) - err = SendEthTransaction(ethClient, &val.ethereumKey, gravityContract, sendData) - s.Require().NoError(err, "Failed to send fees transaction to Cosmos") - - s.T().Log("Waiting for fees to be received...") - s.Require().Eventually(func() bool { - res, err := bankQueryClient.Balance(context.Background(), - &banktypes.QueryBalanceRequest{ - Address: feesAddress, - Denom: alphaFeeDenom, - }) - s.Require().NoError(err) - s.T().Logf("fee balance: %s", res.Balance) + s.Require().True(foundGravityDenom, "fees account is missing initial gravity denom balance") + s.Require().True(foundIbcDenom, "fees account is missing initial ibc denom balance") - return res.Balance.Amount.GT(sdk.ZeroInt()) - }, time.Second*60, time.Second*6, "ALPHA Fees never received by cellarfees account") + // Submit TokenPrices proposal + orch0 := s.chain.orchestrators[0] + orch0ClientCtx, err := s.chain.clientContext("tcp://localhost:26657", orch0.keyring, "orch", orch0.address()) + s.Require().NoError(err) + proposer := s.chain.proposer + proposerCtx, err := s.chain.clientContext("tcp://localhost:26657", proposer.keyring, "proposer", proposer.address()) + s.Require().NoError(err) + propID := uint64(1) + + s.T().Log("Submitting TokenPrices proposal") + tokenPrices := []*auctiontypes.ProposedTokenPrice{ + { + Denom: gravityDenom, + Exponent: 12, + UsdPrice: sdk.MustNewDecFromStr("10.00"), + }, + { + Denom: ibcDenom, + Exponent: 6, + UsdPrice: sdk.MustNewDecFromStr("1.00"), + }, + } + addTokenPricesProp := auctiontypes.SetTokenPricesProposal{ + Title: "add token prices", + Description: "add token prices", + TokenPrices: tokenPrices, + } + addTokenPricesPropMsg, err := govtypesv1beta1.NewMsgSubmitProposal( + &addTokenPricesProp, + sdk.Coins{ + { + Denom: testDenom, + Amount: math.NewInt(2), + }, + }, + proposer.address(), + ) + s.Require().NoError(err, "Unable to create governance proposal") + + s.submitAndVoteForProposal(proposerCtx, orch0ClientCtx, propID, addTokenPricesPropMsg) + + s.T().Log("Waiting for gravity denom auction to start") + var gravityAuctionID uint32 + var ibcAuctionID uint32 s.Require().Eventually(func() bool { - res, err := bankQueryClient.Balance(context.Background(), - &banktypes.QueryBalanceRequest{ - Address: feesAddress, - Denom: betaFeeDenom, - }) - s.Require().NoError(err) - s.T().Logf("fee balance: %s", res.Balance) - - return res.Balance.Amount.GT(sdk.ZeroInt()) - }, time.Second*60, time.Second*6, "BETA Fees never received by cellarfees account") - - s.T().Log("Fees received! Confirming no auction gets started yet...") - for i := 0; i < 10; i++ { res, _ := auctionQueryClient.QueryActiveAuctions(ctx, &auctiontypes.QueryActiveAuctionsRequest{}) - if res == nil { - continue - } - for _, auction := range res.Auctions { - s.Require().NotEqual(auction.StartingTokensForSale.Denom, alphaFeeDenom) - s.Require().NotEqual(auction.StartingTokensForSale.Denom, betaFeeDenom) + if res != nil { + for _, auction := range res.Auctions { + if auction.StartingTokensForSale.Denom == gravityDenom { + gravityAuctionID = auction.Id + return true + } + } } - time.Sleep(time.Second) - } - - s.T().Log("Sending ERC20 fees a second time") - sendData = PackSendToCosmos(alphaERC20Contract, acc, sdk.NewInt(100000)) - err = SendEthTransaction(ethClient, &val.ethereumKey, gravityContract, sendData) - s.Require().NoError(err, "Failed to send fees transaction to Cosmos") + return false + }, time.Second*60, time.Second*5, "Auctions never started for gravity fees") - sendData = PackSendToCosmos(betaERC20Contract, acc, sdk.NewInt(120000)) - err = SendEthTransaction(ethClient, &val.ethereumKey, gravityContract, sendData) - s.Require().NoError(err, "Failed to send fees transaction to Cosmos") + // Send ibcDenom tokens from the orch to the fee account to trigger another auction + orch := s.chain.orchestrators[0] + orchClientCtx, err := s.chain.clientContext("tcp://localhost:26657", orch.keyring, "orch", orch.address()) + s.Require().NoError(err, "Failed to create client for orchestrator") - s.T().Log("Waiting for auctions to start") - alphaAuctionID, betaAuctionID := uint32(0), uint32(0) + s.T().Log("sending 1 ibc/1 to fees account to trigger auction") + feesAcct := authtypes.NewModuleAddress(cellarfeestypes.ModuleName) + sendRequest := banktypes.NewMsgSend( + orch.address(), + feesAcct, + sdk.NewCoins( + sdk.Coin{ + Denom: ibcDenom, + Amount: sdk.NewInt(1), + }, + ), + ) + + _, err = s.chain.sendMsgs(*orchClientCtx, sendRequest) + s.Require().NoError(err, "Failed to submit send request") + + s.T().Log("Waiting for ibc denom auction to start") s.Require().Eventually(func() bool { res, _ := auctionQueryClient.QueryActiveAuctions(ctx, &auctiontypes.QueryActiveAuctionsRequest{}) - alpha, beta := false, false if res != nil { for _, auction := range res.Auctions { - if auction.StartingTokensForSale.Denom == alphaFeeDenom { - alphaAuctionID = auction.Id - alpha = true - } else if auction.StartingTokensForSale.Denom == betaFeeDenom { - betaAuctionID = auction.Id - beta = true - } - - if alpha && beta { - break + if auction.StartingTokensForSale.Denom == ibcDenom { + ibcAuctionID = auction.Id + return true } } } - return alpha && beta - }, time.Second*30, time.Second*5, "Auctions never started for test fees") + return false + }, time.Second*120, time.Second*5, "Auctions never started for ibc fees") - s.T().Log("Bidding to buy all of the ALPHA fees available") - orch := s.chain.orchestrators[0] + s.T().Log("Bidding to buy all of the gravity fees available") bidRequest1 := auctiontypes.MsgSubmitBidRequest{ - AuctionId: alphaAuctionID, + AuctionId: gravityAuctionID, Signer: orch.address().String(), - MaxBidInUsomm: sdk.NewCoin(testDenom, sdk.NewIntFromUint64(300000)), - SaleTokenMinimumAmount: sdk.NewCoin(alphaFeeDenom, sdk.NewIntFromUint64(150000)), + MaxBidInUsomm: sdk.NewCoin(testDenom, sdk.NewIntFromUint64(1000000000000000)), + SaleTokenMinimumAmount: sdk.NewCoin(gravityDenom, sdk.NewIntFromBigInt(big.NewInt(100000000000000))), } - - orchClientCtx, err := s.chain.clientContext("tcp://localhost:26657", orch.keyring, "orch", orch.address()) - s.Require().NoError(err, "Failed to create client for orchestrator") _, err = s.chain.sendMsgs(*orchClientCtx, &bidRequest1) - s.Require().NoError(err, "Failed to submit bid") + s.Require().NoError(err, "Failed to submit gravity bid") - s.T().Log("Bid submitted. Waiting to confirm auction ended") + s.T().Log("Bids submitted. Waiting to confirm gravity auction ended") s.Require().Eventually(func() bool { _, err := auctionQueryClient.QueryEndedAuction(ctx, &auctiontypes.QueryEndedAuctionRequest{ - AuctionId: alphaAuctionID, + AuctionId: gravityAuctionID, }) // a nil error indicates the item was found return err == nil }, time.Second*10, time.Second, "Auction did not end.") - s.T().Log("Auction ended. Waiting to receive usomm in fees account") + s.T().Log("Gravity auction ended. Waiting to receive usomm in fees account") s.Require().Eventually(func() bool { res, err := bankQueryClient.Balance(ctx, &banktypes.QueryBalanceRequest{ Address: feesAddress, @@ -264,18 +216,28 @@ func (s *IntegrationTestSuite) TestCellarFees() { return false }, time.Second*30, time.Millisecond*400, "Distribution rate was invalid or could not be determined") - s.T().Log("Distribution rate is linear. Increasing the reward supply by bidding on the BETA auction") + s.T().Log("Distribution rate is nonzero. Submitting bid for all of the ibc fees available") bidRequest2 := auctiontypes.MsgSubmitBidRequest{ - AuctionId: betaAuctionID, + AuctionId: ibcAuctionID, Signer: orch.address().String(), - MaxBidInUsomm: sdk.NewCoin(testDenom, sdk.NewIntFromUint64(1400000)), - SaleTokenMinimumAmount: sdk.NewCoin(betaFeeDenom, sdk.NewIntFromUint64(140000)), + MaxBidInUsomm: sdk.NewCoin(testDenom, sdk.NewIntFromUint64(100000000)), + SaleTokenMinimumAmount: sdk.NewCoin(ibcDenom, sdk.NewIntFromBigInt(big.NewInt(100000000))), } _, err = s.chain.sendMsgs(*orchClientCtx, &bidRequest2) - s.Require().NoError(err, "Failed to submit bid") + s.Require().NoError(err, "Failed to submit ibc bid") + + s.T().Log("Waiting to confirm ibc auction ended") + s.Require().Eventually(func() bool { + _, err := auctionQueryClient.QueryEndedAuction(ctx, &auctiontypes.QueryEndedAuctionRequest{ + AuctionId: ibcAuctionID, + }) - s.T().Log("Waiting to see distribution rate increase") + // a nil error indicates the item was found + return err == nil + }, time.Second*10, time.Second, "Auction did not end.") + + s.T().Log("IBC auction ended. Waiting to see distribution rate increase") lastBalanceSeen = sdk.ZeroInt() s.Require().Eventually(func() bool { res, err := bankQueryClient.Balance(ctx, &banktypes.QueryBalanceRequest{ @@ -332,14 +294,9 @@ func (s *IntegrationTestSuite) TestCellarFees() { bankQueryClient = banktypes.NewQueryClient(clientCtx) } - return res == nil || res.Balance.Amount.Equal(sdk.ZeroInt()) + return res != nil && res.Balance.Amount.IsZero() }, time.Second*300, time.Second*10, "Reward supply did not exhaust in the provided amount of time") - s.T().Log("Verify that the accrual counter reset by sending more ALPHA") - sendData = PackSendToCosmos(alphaERC20Contract, acc, sdk.NewInt(25000)) - err = SendEthTransaction(ethClient, &val.ethereumKey, gravityContract, sendData) - s.Require().NoError(err, "Failed to send fees transaction to Cosmos") - s.T().Log("Confirming no auction is started...") for i := 0; i < 20; i++ { res, _ := auctionQueryClient.QueryActiveAuctions(ctx, &auctiontypes.QueryActiveAuctionsRequest{}) @@ -348,7 +305,7 @@ func (s *IntegrationTestSuite) TestCellarFees() { } for _, auction := range res.Auctions { - s.Require().NotEqual(auction.StartingTokensForSale.Denom, alphaFeeDenom) + s.Require().NotEqual(auction.StartingTokensForSale.Denom, gravityDenom) } time.Sleep(time.Second) diff --git a/integration_tests/setup_test.go b/integration_tests/setup_test.go index 47dac1a0d..073b9af9c 100644 --- a/integration_tests/setup_test.go +++ b/integration_tests/setup_test.go @@ -22,6 +22,7 @@ import ( auctiontypes "github.com/peggyjv/sommelier/v7/x/auction/types" axelarcorktypes "github.com/peggyjv/sommelier/v7/x/axelarcork/types" cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" corktypesunversioned "github.com/peggyjv/sommelier/v7/x/cork/types" corktypes "github.com/peggyjv/sommelier/v7/x/cork/types/v2" pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" @@ -50,7 +51,7 @@ import ( const ( testDenom = "usomm" - initBalanceStr = "210000000000usomm" + initBalanceStr = "210000000000usomm,1ibc/1" minGasPrice = "2" ethChainID uint = 15 exampleCA = `-----BEGIN CERTIFICATE----- @@ -69,6 +70,8 @@ pohf4PJrfacqpi7PoXBk -----END CERTIFICATE----- ` axelarSweepDenom = "sweep" + gravityDenom = "gravity0x0000000000000000000000000000000000000000" + ibcDenom = "ibc/1" ) var ( @@ -79,12 +82,8 @@ var ( gravityContract = common.HexToAddress("0x04C89607413713Ec9775E14b954286519d836FEf") counterContract = common.HexToAddress("0x0000000000000000000000000000000000000000") alphaERC20Contract = common.HexToAddress("0x0000000000000000000000000000000000000000") - betaERC20Contract = common.HexToAddress("0x0000000000000000000000000000000000000000") unusedGenesisContract = common.HexToAddress("0x0000000000000000000000000000000000000001") - alphaFeeDenom = "" - betaFeeDenom = "" - // 67% corkVoteThreshold = sdk.NewDecWithPrec(67, 2) @@ -335,7 +334,7 @@ func (s *IntegrationTestSuite) initGenesis() { }) // Set up auction module with some coins to auction off - balance := banktypes.Balance{ + auctionBalance := banktypes.Balance{ Address: authtypes.NewModuleAddress(auctiontypes.ModuleName).String(), Coins: sdk.NewCoins(sdk.NewCoin("gravity0x3506424f91fd33084466f402d5d97f05f8e3b4af", sdk.NewInt(5000000000))), } @@ -347,9 +346,17 @@ func (s *IntegrationTestSuite) initGenesis() { Address: s.chain.orchestrators[0].address().String(), Coins: sdk.NewCoins(sdk.NewCoin(axelarSweepDenom, sdk.NewInt(2000000000))), } - bankGenState.Balances = append(bankGenState.Balances, balance) + feesBalance := banktypes.Balance{ + Address: authtypes.NewModuleAddress(cellarfeestypes.ModuleName).String(), + Coins: sdk.NewCoins( + sdk.NewCoin(gravityDenom, sdk.NewInt(100000000000000)), + sdk.NewCoin(ibcDenom, sdk.NewInt(99999999)), + ), + } + bankGenState.Balances = append(bankGenState.Balances, auctionBalance) bankGenState.Balances = append(bankGenState.Balances, distBalance) bankGenState.Balances = append(bankGenState.Balances, orchSweepBalance) + bankGenState.Balances = append(bankGenState.Balances, feesBalance) bz, err := cdc.MarshalJSON(&bankGenState) s.Require().NoError(err) @@ -407,26 +414,12 @@ func (s *IntegrationTestSuite) initGenesis() { s.Require().NoError(cdc.UnmarshalJSON(appGenState[genutiltypes.ModuleName], &genUtilGenState)) // Add an auction for integration testing of the auction module - alphaFeeDenom = fmt.Sprintf("gravity%s", alphaERC20Contract.Hex()) - betaFeeDenom = fmt.Sprintf("gravity%s", betaERC20Contract.Hex()) var auctionGenState auctiontypes.GenesisState s.Require().NoError(cdc.UnmarshalJSON(appGenState[auctiontypes.ModuleName], &auctionGenState)) - auctionGenState.TokenPrices = append(auctionGenState.TokenPrices, &auctiontypes.TokenPrice{ - Denom: alphaFeeDenom, - Exponent: 6, - UsdPrice: sdk.MustNewDecFromStr("1.0"), - LastUpdatedBlock: 0, - }) - auctionGenState.TokenPrices = append(auctionGenState.TokenPrices, &auctiontypes.TokenPrice{ - Denom: betaFeeDenom, - Exponent: 6, - UsdPrice: sdk.MustNewDecFromStr("5.0"), - LastUpdatedBlock: 0, - }) auctionGenState.TokenPrices = append(auctionGenState.TokenPrices, &auctiontypes.TokenPrice{ Denom: testDenom, Exponent: 6, - UsdPrice: sdk.MustNewDecFromStr("0.5"), + UsdPrice: sdk.MustNewDecFromStr("1.0"), LastUpdatedBlock: 0, }) auctionGenState.Auctions = append(auctionGenState.Auctions, &auctiontypes.Auction{ @@ -443,6 +436,7 @@ func (s *IntegrationTestSuite) initGenesis() { FundingModuleAccount: cellarfeestypes.ModuleName, ProceedsModuleAccount: cellarfeestypes.ModuleName, }) + auctionGenState.LastAuctionId = 1 bz, err = cdc.MarshalJSON(&auctionGenState) s.Require().NoError(err) appGenState[auctiontypes.ModuleName] = bz @@ -463,14 +457,14 @@ func (s *IntegrationTestSuite) initGenesis() { appGenState[axelarcorktypes.ModuleName] = bz // set cellarfees gen state - cellarfeesGenState := cellarfeestypes.DefaultGenesisState() + cellarfeesGenState := cellarfeestypesv2.DefaultGenesisState() s.Require().NoError(cdc.UnmarshalJSON(appGenState[cellarfeestypes.ModuleName], &cellarfeesGenState)) - cellarfeesGenState.Params = cellarfeestypes.Params{ - FeeAccrualAuctionThreshold: 2, + cellarfeesGenState.Params = cellarfeestypesv2.Params{ RewardEmissionPeriod: 100, InitialPriceDecreaseRate: sdk.MustNewDecFromStr("0.05"), PriceDecreaseBlockInterval: uint64(1000), AuctionInterval: 50, + AuctionThresholdUsdValue: sdk.MustNewDecFromStr("100.00"), } bz, err = cdc.MarshalJSON(&cellarfeesGenState) s.Require().NoError(err) @@ -681,12 +675,6 @@ func (s *IntegrationTestSuite) runEthContainer() { // this is not the last contract deployed continue } - if strings.HasPrefix(s, "betaERC20 contract deployed at") { - strSpl := strings.Split(s, "-") - betaERC20Contract = common.HexToAddress(strings.ReplaceAll(strSpl[1], " ", "")) - // this is not the last contract deployed - continue - } if strings.HasPrefix(s, "counter contract deployed at") { strSpl := strings.Split(s, "-") counterContract = common.HexToAddress(strings.ReplaceAll(strSpl[1], " ", "")) @@ -697,7 +685,6 @@ func (s *IntegrationTestSuite) runEthContainer() { }, time.Minute*5, time.Second*10, "unable to retrieve gravity address from logs") s.T().Logf("gravity contract deployed at %s", gravityContract.String()) s.T().Logf("alphaERC20 contract deployed at %s", alphaERC20Contract.String()) - s.T().Logf("betaERC20 contract deployed at %s", betaERC20Contract.String()) s.T().Logf("counter contract deployed at %s", counterContract.String()) s.T().Logf("started Ethereum container: %s", s.ethResource.Container.ID) } diff --git a/proto/cellarfees/v1/cellarfees.proto b/proto/cellarfees/v1/cellarfees.proto index 2c184cf13..cacb50905 100644 --- a/proto/cellarfees/v1/cellarfees.proto +++ b/proto/cellarfees/v1/cellarfees.proto @@ -3,7 +3,7 @@ package cellarfees.v1; import "gogoproto/gogo.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/cellarfees/types"; +option go_package = "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v1"; message FeeAccrualCounter { string denom = 1; diff --git a/proto/cellarfees/v1/genesis.proto b/proto/cellarfees/v1/genesis.proto index 6bb6a2915..bb09cbb3f 100644 --- a/proto/cellarfees/v1/genesis.proto +++ b/proto/cellarfees/v1/genesis.proto @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto"; import "cellarfees/v1/params.proto"; import "cellarfees/v1/cellarfees.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/cellarfees/types"; +option go_package = "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v1"; // GenesisState defines the cellarfees module's genesis state. message GenesisState { diff --git a/proto/cellarfees/v1/params.proto b/proto/cellarfees/v1/params.proto index ab5cc7dcd..56bb6e2ea 100644 --- a/proto/cellarfees/v1/params.proto +++ b/proto/cellarfees/v1/params.proto @@ -3,7 +3,7 @@ package cellarfees.v1; import "gogoproto/gogo.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/cellarfees/types"; +option go_package = "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v1"; // Params defines the parameters for the module. message Params { diff --git a/proto/cellarfees/v1/query.proto b/proto/cellarfees/v1/query.proto index eecbce6f2..ead312ce9 100644 --- a/proto/cellarfees/v1/query.proto +++ b/proto/cellarfees/v1/query.proto @@ -6,7 +6,7 @@ import "google/api/annotations.proto"; import "cellarfees/v1/params.proto"; import "cellarfees/v1/cellarfees.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/cellarfees/types"; +option go_package = "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v1"; service Query { rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { diff --git a/proto/cellarfees/v2/cellarfees.proto b/proto/cellarfees/v2/cellarfees.proto new file mode 100644 index 000000000..7f56b8702 --- /dev/null +++ b/proto/cellarfees/v2/cellarfees.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; +package cellarfees.v2; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2"; + +// Collin: This type should never be saved to state in case of indeterminism around how +// Go interprets floating point numbers. This is only meant to be used for query results. +message FeeTokenBalance { + cosmos.base.v1beta1.Coin balance = 1 [ (gogoproto.nullable) = false ]; + double usd_value = 2; +} diff --git a/proto/cellarfees/v2/genesis.proto b/proto/cellarfees/v2/genesis.proto new file mode 100644 index 000000000..9e53c362f --- /dev/null +++ b/proto/cellarfees/v2/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package cellarfees.v2; + +import "gogoproto/gogo.proto"; +import "cellarfees/v2/params.proto"; + +option go_package = "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2"; + +// GenesisState defines the cellarfees module's genesis state. +message GenesisState { + reserved 2; // deleted fee accrual counters field + + Params params = 1 [(gogoproto.nullable) = false]; + string last_reward_supply_peak = 3 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; +} diff --git a/proto/cellarfees/v2/params.proto b/proto/cellarfees/v2/params.proto new file mode 100644 index 000000000..4d5f31fa9 --- /dev/null +++ b/proto/cellarfees/v2/params.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; +package cellarfees.v2; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2"; + +// Params defines the parameters for the module. +message Params { + reserved 1; // deleted fee accrual threshold field + + option (gogoproto.goproto_stringer) = false; + + // Emission rate factor. Specifically, the number of blocks over which to distribute + // some amount of staking rewards. + uint64 reward_emission_period = 2; + // The initial rate at which auctions should decrease their denom's price in SOMM + string initial_price_decrease_rate = 3 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + // Number of blocks between auction price decreases + uint64 price_decrease_block_interval = 4; + // The interval between starting auctions + uint64 auction_interval = 5; + // A fee token's total USD value threshold, based on it's auction.v1.TokenPrice, above which an auction is triggered + string auction_threshold_usd_value = 6 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + + diff --git a/proto/cellarfees/v2/query.proto b/proto/cellarfees/v2/query.proto new file mode 100644 index 000000000..05d8614fe --- /dev/null +++ b/proto/cellarfees/v2/query.proto @@ -0,0 +1,74 @@ +syntax = "proto3"; +package cellarfees.v2; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cellarfees/v2/params.proto"; +import "cellarfees/v2/cellarfees.proto"; + +option go_package = "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2"; + +service Query { + rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/sommelier/cellarfees/v2/params"; + } + + rpc QueryModuleAccounts(QueryModuleAccountsRequest) returns (QueryModuleAccountsResponse) { + option (google.api.http).get = "/sommelier/cellarfees/v2/module_accounts"; + } + + rpc QueryLastRewardSupplyPeak(QueryLastRewardSupplyPeakRequest) returns (QueryLastRewardSupplyPeakResponse) { + option (google.api.http).get = "/sommelier/cellarfees/v2/last_reward_supply_peak"; + } + + rpc QueryAPY(QueryAPYRequest) returns (QueryAPYResponse) { + option (google.api.http).get = "/sommelier/cellarfees/v2/apy"; + } + + rpc QueryFeeTokenBalances(QueryFeeTokenBalancesRequest) returns (QueryFeeTokenBalancesResponse) { + option (google.api.http).get = "/sommelier/cellarfees/v2/fee_token_balances"; + } + + rpc QueryFeeTokenBalance(QueryFeeTokenBalanceRequest) returns (QueryFeeTokenBalanceResponse) { + option (google.api.http).get = "/sommelier/cellarfees/v2/fee_token_balances/{denom}"; + } +} + +message QueryParamsRequest {} + +message QueryParamsResponse { + Params params = 1 [(gogoproto.nullable) = false]; +} + +message QueryModuleAccountsRequest {} + +message QueryModuleAccountsResponse { + string fees_address = 1; +} + +message QueryLastRewardSupplyPeakRequest {} + +message QueryLastRewardSupplyPeakResponse { + string last_reward_supply_peak = 1 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; +} + +message QueryAPYRequest {} + +message QueryAPYResponse { + string apy = 1; +} + +message QueryFeeTokenBalancesRequest {} + +message QueryFeeTokenBalancesResponse { + repeated FeeTokenBalance balances = 1; +} + +message QueryFeeTokenBalanceRequest { + string denom = 1; +} + +message QueryFeeTokenBalanceResponse { + FeeTokenBalance balance = 1; +} diff --git a/x/auction/keeper/proposal_handler_test.go b/x/auction/keeper/proposal_handler_test.go index 60e72ca6e..82a0580ef 100644 --- a/x/auction/keeper/proposal_handler_test.go +++ b/x/auction/keeper/proposal_handler_test.go @@ -12,7 +12,7 @@ import ( ) // Happy path test for proposal handler -func (suite *KeeperTestSuite) TestHappPathForProposalHandler() { +func (suite *KeeperTestSuite) TestHappyPathForProposalHandler() { ctx, auctionKeeper := suite.ctx, suite.auctionKeeper require := suite.Require() @@ -55,7 +55,7 @@ func (suite *KeeperTestSuite) TestHappPathForProposalHandler() { } // Unhappy path test for proposal handler -func (suite *KeeperTestSuite) TestUnhappPathForProposalHandler() { +func (suite *KeeperTestSuite) TestUnhappyPathForProposalHandler() { ctx, auctionKeeper := suite.ctx, suite.auctionKeeper require := suite.Require() @@ -73,20 +73,6 @@ func (suite *KeeperTestSuite) TestUnhappPathForProposalHandler() { }, expectedError: errorsmod.Wrap(govTypes.ErrInvalidProposalContent, "proposal title cannot be blank"), }, - { - name: "Validate basic canary 2 -- cannot have non usomm & non gravity denom", - proposal: auctionTypes.SetTokenPricesProposal{ - Title: "Title", - Description: "Description", - TokenPrices: []*auctionTypes.ProposedTokenPrice{ - { - Denom: "weth", - UsdPrice: sdk.MustNewDecFromStr("17.0"), - }, - }, - }, - expectedError: errorsmod.Wrapf(auctionTypes.ErrInvalidTokenPriceDenom, "denom: weth"), - }, { name: "Cannot attempt to update prices twice for a denom in one proposal", proposal: auctionTypes.SetTokenPricesProposal{ diff --git a/x/auction/types/auction.go b/x/auction/types/auction.go index dac5c87f6..cd18017a2 100644 --- a/x/auction/types/auction.go +++ b/x/auction/types/auction.go @@ -1,12 +1,9 @@ package types import ( - "strings" - errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" "github.com/peggyjv/sommelier/v7/app/params" ) @@ -83,10 +80,6 @@ func (b *Bid) ValidateBasic() error { return errorsmod.Wrapf(ErrBidMustBeInUsomm, "bid: %s", b.MaxBidInUsomm.String()) } - if !strings.HasPrefix(b.SaleTokenMinimumAmount.Denom, gravitytypes.GravityDenomPrefix) { - return errorsmod.Wrapf(ErrInvalidTokenBeingBidOn, "sale token: %s", b.SaleTokenMinimumAmount.String()) - } - if !b.SaleTokenMinimumAmount.IsValid() || !b.SaleTokenMinimumAmount.IsPositive() { return errorsmod.Wrapf(ErrMinimumAmountMustBePositive, "sale token amount: %s", b.SaleTokenMinimumAmount.String()) } @@ -123,10 +116,6 @@ func (t *TokenPrice) ValidateBasic() error { return errorsmod.Wrapf(ErrInvalidLastUpdatedBlock, "block: %d", t.LastUpdatedBlock) } - if !strings.HasPrefix(t.Denom, gravitytypes.GravityDenomPrefix) && t.Denom != params.BaseCoinUnit { - return errorsmod.Wrapf(ErrInvalidTokenPriceDenom, "denom: %s", t.Denom) - } - if t.Exponent > 18 { return errorsmod.Wrapf(ErrTokenPriceExponentTooHigh, "exponent: %d", t.Exponent) } @@ -143,10 +132,6 @@ func (t *ProposedTokenPrice) ValidateBasic() error { return errorsmod.Wrapf(ErrPriceMustBePositive, "usd price: %s", t.UsdPrice.String()) } - if !strings.HasPrefix(t.Denom, gravitytypes.GravityDenomPrefix) && t.Denom != params.BaseCoinUnit { - return errorsmod.Wrapf(ErrInvalidTokenPriceDenom, "denom: %s", t.Denom) - } - if t.Exponent > 18 { return errorsmod.Wrapf(ErrTokenPriceExponentTooHigh, "exponent: %d", t.Exponent) } diff --git a/x/auction/types/auction_test.go b/x/auction/types/auction_test.go index 20bdf242c..220c86f1e 100644 --- a/x/auction/types/auction_test.go +++ b/x/auction/types/auction_test.go @@ -23,7 +23,7 @@ func TestAuctionValidate(t *testing.T) { err error }{ { - name: "Happy path", + name: "Happy path 1", auction: Auction{ Id: uint32(1), StartingTokensForSale: sdk.NewCoin("gravity0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", sdk.NewIntFromUint64(1000)), @@ -41,6 +41,25 @@ func TestAuctionValidate(t *testing.T) { expPass: true, err: nil, }, + { + name: "Happy path 2", + auction: Auction{ + Id: uint32(1), + StartingTokensForSale: sdk.NewCoin("ibc/1", sdk.NewIntFromUint64(1000)), + StartBlock: uint64(200), + EndBlock: uint64(0), + InitialPriceDecreaseRate: sdk.MustNewDecFromStr("0.05"), + CurrentPriceDecreaseRate: sdk.MustNewDecFromStr("0.05"), + PriceDecreaseBlockInterval: uint64(10), + InitialUnitPriceInUsomm: sdk.MustNewDecFromStr("20.0"), + CurrentUnitPriceInUsomm: sdk.MustNewDecFromStr("20.0"), + RemainingTokensForSale: sdk.NewCoin("ibc/1", sdk.NewIntFromUint64(900)), + FundingModuleAccount: "someModule", + ProceedsModuleAccount: "someModule", + }, + expPass: true, + err: nil, + }, { name: "Auction ID cannot be 0", auction: Auction{ @@ -311,7 +330,7 @@ func TestBidValidate(t *testing.T) { err error }{ { - name: "Happy path", + name: "Happy path 1", bid: Bid{ Id: uint64(1), AuctionId: uint32(1), @@ -325,6 +344,21 @@ func TestBidValidate(t *testing.T) { expPass: true, err: nil, }, + { + name: "Happy path 2", + bid: Bid{ + Id: uint64(1), + AuctionId: uint32(1), + Bidder: cosmosAddress2, + MaxBidInUsomm: sdk.NewCoin("usomm", sdk.NewInt(100)), + SaleTokenMinimumAmount: sdk.NewCoin("ibc/1", sdk.NewInt(50)), + TotalFulfilledSaleTokens: sdk.NewCoin("ibc/1", sdk.NewInt(50)), + SaleTokenUnitPriceInUsomm: sdk.MustNewDecFromStr("2.0"), + TotalUsommPaid: sdk.NewCoin("usomm", sdk.NewInt(100)), + }, + expPass: true, + err: nil, + }, { name: "Bid ID cannot be 0", bid: Bid{ @@ -415,21 +449,6 @@ func TestBidValidate(t *testing.T) { expPass: false, err: errorsmod.Wrapf(ErrBidMustBeInUsomm, "bid: %s", sdk.NewCoin("usdc", sdk.NewInt(100)).String()), }, - { - name: "Sale token must be gravity prefixed", - bid: Bid{ - Id: uint64(1), - AuctionId: uint32(1), - Bidder: cosmosAddress2, - MaxBidInUsomm: sdk.NewCoin("usomm", sdk.NewInt(100)), - SaleTokenMinimumAmount: sdk.NewCoin("usdc", sdk.NewInt(50)), - TotalFulfilledSaleTokens: sdk.NewCoin("gravity0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", sdk.NewInt(50)), - SaleTokenUnitPriceInUsomm: sdk.MustNewDecFromStr("2.0"), - TotalUsommPaid: sdk.NewCoin("usomm", sdk.NewInt(100)), - }, - expPass: false, - err: errorsmod.Wrapf(ErrInvalidTokenBeingBidOn, "sale token: %s", sdk.NewCoin("usdc", sdk.NewInt(50)).String()), - }, { name: "Sale token amount must be positive", bid: Bid{ @@ -516,6 +535,16 @@ func TestTokenPriceValidate(t *testing.T) { expPass: true, err: nil, }, + { + name: "Happy path -- ibc denom", + tokenPrice: TokenPrice{ + Denom: "ibc/1", + UsdPrice: sdk.MustNewDecFromStr("0.001"), + LastUpdatedBlock: uint64(321), + }, + expPass: true, + err: nil, + }, { name: "Denom cannot be empty", tokenPrice: TokenPrice{ @@ -546,16 +575,6 @@ func TestTokenPriceValidate(t *testing.T) { expPass: false, err: errorsmod.Wrapf(ErrInvalidLastUpdatedBlock, "block: 0"), }, - { - name: "Token price must be usomm or gravity prefixed", - tokenPrice: TokenPrice{ - Denom: "usdc", - UsdPrice: sdk.MustNewDecFromStr("1.0"), - LastUpdatedBlock: uint64(321), - }, - expPass: false, - err: errorsmod.Wrapf(ErrInvalidTokenPriceDenom, "denom: usdc"), - }, } for _, tc := range testCases { @@ -595,6 +614,15 @@ func TestProposedTokenPriceValidate(t *testing.T) { expPass: true, err: nil, }, + { + name: "Happy path -- ibc denom", + proposedTokenPrice: ProposedTokenPrice{ + Denom: "ibc/1", + UsdPrice: sdk.MustNewDecFromStr("0.001"), + }, + expPass: true, + err: nil, + }, { name: "Denom cannot be empty", proposedTokenPrice: ProposedTokenPrice{ @@ -613,15 +641,6 @@ func TestProposedTokenPriceValidate(t *testing.T) { expPass: false, err: errorsmod.Wrapf(ErrPriceMustBePositive, "usd price: %s", sdk.MustNewDecFromStr("0.0").String()), }, - { - name: "Token price must be usomm or gravity prefixed", - proposedTokenPrice: ProposedTokenPrice{ - Denom: "usdc", - UsdPrice: sdk.MustNewDecFromStr("1.0"), - }, - expPass: false, - err: errorsmod.Wrapf(ErrInvalidTokenPriceDenom, "denom: usdc"), - }, } for _, tc := range testCases { diff --git a/x/auction/types/errors.go b/x/auction/types/errors.go index 7fc6155bc..199138883 100644 --- a/x/auction/types/errors.go +++ b/x/auction/types/errors.go @@ -32,11 +32,11 @@ var ( ErrBidIDMustBeNonZero = errorsmod.Register(ModuleName, 25, "bid ID must be non-zero") ErrBidAmountMustBePositive = errorsmod.Register(ModuleName, 26, "bid amount must be positive") ErrBidMustBeInUsomm = errorsmod.Register(ModuleName, 27, "bid must be in usomm") - ErrInvalidTokenBeingBidOn = errorsmod.Register(ModuleName, 28, "tokens being bid on must have the gravity prefix") + ErrInvalidTokenBeingBidOn = errorsmod.Register(ModuleName, 28, "bid token denom is invalid") ErrMinimumAmountMustBePositive = errorsmod.Register(ModuleName, 29, "minimum amount to purchase with bid must be positive") ErrAddressExpected = errorsmod.Register(ModuleName, 30, "address cannot be empty") ErrBidUnitPriceInUsommMustBePositive = errorsmod.Register(ModuleName, 31, "unit price of sale tokens in usomm must be positive") - ErrInvalidTokenPriceDenom = errorsmod.Register(ModuleName, 32, "token price denoms must be either usomm or addresses prefixed with 'gravity'") + ErrInvalidTokenPriceDenom = errorsmod.Register(ModuleName, 32, "invalid token price denom") ErrTokenPriceProposalAttemptsToUpdateTokenPriceMoreThanOnce = errorsmod.Register(ModuleName, 33, "token price proposals should not attempt to update the same denom's price more than once per proposal") ErrTokenPriceMaxBlockAgeMustBePositive = errorsmod.Register(ModuleName, 34, "price max block age must be positive") ErrInvalidPriceMaxBlockAgeParameterType = errorsmod.Register(ModuleName, 35, "price max block age type must be uint64") diff --git a/x/auction/types/genesis_test.go b/x/auction/types/genesis_test.go index cd390fd58..a0144fd75 100644 --- a/x/auction/types/genesis_test.go +++ b/x/auction/types/genesis_test.go @@ -51,6 +51,20 @@ func TestGenesisValidate(t *testing.T) { FundingModuleAccount: "someModule", ProceedsModuleAccount: "someModule", }, + { + Id: uint32(2), + StartingTokensForSale: sdk.NewCoin("ibc/1", sdk.NewIntFromUint64(1000)), + StartBlock: uint64(200), + EndBlock: uint64(0), + InitialPriceDecreaseRate: sdk.MustNewDecFromStr("0.05"), + CurrentPriceDecreaseRate: sdk.MustNewDecFromStr("0.05"), + PriceDecreaseBlockInterval: uint64(10), + InitialUnitPriceInUsomm: sdk.MustNewDecFromStr("20.0"), + CurrentUnitPriceInUsomm: sdk.MustNewDecFromStr("20.0"), + RemainingTokensForSale: sdk.NewCoin("ibc/1", sdk.NewIntFromUint64(900)), + FundingModuleAccount: "someModule", + ProceedsModuleAccount: "someModule", + }, }, Bids: []*Bid{ { @@ -125,6 +139,11 @@ func TestGenesisValidate(t *testing.T) { UsdPrice: sdk.MustNewDecFromStr("0.032"), LastUpdatedBlock: uint64(321), }, + { + Denom: "ibc/1", + UsdPrice: sdk.MustNewDecFromStr("0.032"), + LastUpdatedBlock: uint64(321), + }, }, LastAuctionId: uint32(1), LastBidId: uint64(1), @@ -218,7 +237,7 @@ func TestGenesisValidate(t *testing.T) { { Denom: "usdc", UsdPrice: sdk.MustNewDecFromStr("0.0008"), - LastUpdatedBlock: uint64(123), + LastUpdatedBlock: uint64(0), }, { Denom: "gravity0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", @@ -230,7 +249,7 @@ func TestGenesisValidate(t *testing.T) { LastBidId: uint64(1), }, expPass: false, - err: errorsmod.Wrapf(ErrInvalidTokenPriceDenom, "denom: usdc"), + err: errorsmod.Wrapf(ErrInvalidLastUpdatedBlock, "block: 0"), }, } diff --git a/x/auction/types/msgs.go b/x/auction/types/msgs.go index c9a8abfa0..0f5827a62 100644 --- a/x/auction/types/msgs.go +++ b/x/auction/types/msgs.go @@ -1,8 +1,6 @@ package types import ( - "strings" - errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -55,10 +53,6 @@ func (m *MsgSubmitBidRequest) ValidateBasic() error { return errorsmod.Wrapf(ErrMinimumAmountMustBePositive, "sale token amount: %s", m.SaleTokenMinimumAmount.String()) } - if !strings.HasPrefix(m.SaleTokenMinimumAmount.Denom, "gravity0x") { - return errorsmod.Wrapf(ErrInvalidTokenBeingBidOn, "sale token: %s", m.SaleTokenMinimumAmount.String()) - } - if _, err := sdk.AccAddressFromBech32(m.Signer); err != nil { return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, err.Error()) } diff --git a/x/auction/types/msgs_test.go b/x/auction/types/msgs_test.go index d141cf0bc..642863e16 100644 --- a/x/auction/types/msgs_test.go +++ b/x/auction/types/msgs_test.go @@ -75,17 +75,6 @@ func TestMsgValidate(t *testing.T) { expPass: false, err: errorsmod.Wrapf(ErrBidAmountMustBePositive, "bid amount in usomm: %s", sdk.NewCoin("usomm", sdk.NewInt(0))), }, - { - name: "Sale token must be prefixed with gravity0x", - msgSubmitBidRequest: MsgSubmitBidRequest{ - AuctionId: uint32(1), - MaxBidInUsomm: sdk.NewCoin("usomm", sdk.NewInt(200)), - SaleTokenMinimumAmount: sdk.NewCoin("usdc", sdk.NewInt(1)), - Signer: cosmosAddress1, - }, - expPass: false, - err: errorsmod.Wrapf(ErrInvalidTokenBeingBidOn, "sale token: %s", sdk.NewCoin("usdc", sdk.NewInt(1))), - }, { name: "Sale token minimum amount must be positive", msgSubmitBidRequest: MsgSubmitBidRequest{ diff --git a/x/cellarfees/client/cli/query.go b/x/cellarfees/client/cli/query.go index 9f4eb7ead..7d025c7a9 100644 --- a/x/cellarfees/client/cli/query.go +++ b/x/cellarfees/client/cli/query.go @@ -4,25 +4,21 @@ import ( "context" "fmt" - // "strings" - "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - // "github.com/cosmos/cosmos-sdk/client/flags" - // sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" ) // GetQueryCmd returns the cli query commands for this module func GetQueryCmd(queryRoute string) *cobra.Command { // Group cellarfees queries under a subcommand cmd := &cobra.Command{ - Use: types.ModuleName, - Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName), + Use: cellarfeestypes.ModuleName, + Short: fmt.Sprintf("Querying commands for the %s module", cellarfeestypes.ModuleName), DisableFlagParsing: true, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, @@ -30,9 +26,10 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdQueryParams()) cmd.AddCommand(CmdQueryModuleAccounts()) - cmd.AddCommand(CmdQueryFeeAccrualCounters()) cmd.AddCommand(CmdQueryLastRewardSupplyPeak()) cmd.AddCommand(CmdQueryAPY()) + cmd.AddCommand(CmdQueryFeeTokenBalance()) + cmd.AddCommand(CmdQueryFeeTokenBalances()) return cmd } @@ -45,9 +42,9 @@ func CmdQueryParams() *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) - queryClient := types.NewQueryClient(clientCtx) + queryClient := cellarfeestypesv2.NewQueryClient(clientCtx) - res, err := queryClient.QueryParams(context.Background(), &types.QueryParamsRequest{}) + res, err := queryClient.QueryParams(context.Background(), &cellarfeestypesv2.QueryParamsRequest{}) if err != nil { return err } @@ -70,10 +67,10 @@ func CmdQueryModuleAccounts() *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) - queryClient := types.NewQueryClient(clientCtx) + queryClient := cellarfeestypesv2.NewQueryClient(clientCtx) res, err := queryClient.QueryModuleAccounts( - context.Background(), &types.QueryModuleAccountsRequest{}) + context.Background(), &cellarfeestypesv2.QueryModuleAccountsRequest{}) if err != nil { return err } @@ -96,10 +93,10 @@ func CmdQueryLastRewardSupplyPeak() *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) - queryClient := types.NewQueryClient(clientCtx) + queryClient := cellarfeestypesv2.NewQueryClient(clientCtx) res, err := queryClient.QueryLastRewardSupplyPeak( - context.Background(), &types.QueryLastRewardSupplyPeakRequest{}) + context.Background(), &cellarfeestypesv2.QueryLastRewardSupplyPeakRequest{}) if err != nil { return err } @@ -113,24 +110,26 @@ func CmdQueryLastRewardSupplyPeak() *cobra.Command { return cmd } -func CmdQueryFeeAccrualCounters() *cobra.Command { +func CmdQueryAPY() *cobra.Command { cmd := &cobra.Command{ - Use: "fee-accrual-counters", - Aliases: []string{"fac"}, - Short: "shows the number of fee accruals per denom since the last respective auction", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + Use: "apy", + Args: cobra.NoArgs, + Short: "query cellarfees APY", + RunE: func(cmd *cobra.Command, _ []string) error { + ctx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } - queryClient := types.NewQueryClient(clientCtx) + queryClient := cellarfeestypesv2.NewQueryClient(ctx) + req := &cellarfeestypesv2.QueryAPYRequest{} - res, err := queryClient.QueryFeeAccrualCounters( - context.Background(), &types.QueryFeeAccrualCountersRequest{}) + res, err := queryClient.QueryAPY(cmd.Context(), req) if err != nil { return err } - return clientCtx.PrintProto(res) + return ctx.PrintProto(res) }, } @@ -139,21 +138,55 @@ func CmdQueryFeeAccrualCounters() *cobra.Command { return cmd } -func CmdQueryAPY() *cobra.Command { +func CmdQueryFeeTokenBalance() *cobra.Command { cmd := &cobra.Command{ - Use: "apy", - Args: cobra.NoArgs, - Short: "query cellarfees APY", + Use: "fee-token-balance", + Aliases: []string{"ftb"}, + Args: cobra.ExactArgs(1), + Short: "query a fee token's balance and it's USD value in the cellarfees module", RunE: func(cmd *cobra.Command, _ []string) error { ctx, err := client.GetClientQueryContext(cmd) if err != nil { return err } - queryClient := types.NewQueryClient(ctx) - req := &types.QueryAPYRequest{} + args := cmd.Flags().Args() - res, err := queryClient.QueryAPY(cmd.Context(), req) + queryClient := cellarfeestypesv2.NewQueryClient(ctx) + req := &cellarfeestypesv2.QueryFeeTokenBalanceRequest{ + Denom: args[0], + } + + res, err := queryClient.QueryFeeTokenBalance(cmd.Context(), req) + if err != nil { + return err + } + + return ctx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func CmdQueryFeeTokenBalances() *cobra.Command { + cmd := &cobra.Command{ + Use: "fee-token-balances", + Aliases: []string{"ftbs"}, + Args: cobra.NoArgs, + Short: "query all fee token balances and their USD values in the cellarfees module", + RunE: func(cmd *cobra.Command, _ []string) error { + ctx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := cellarfeestypesv2.NewQueryClient(ctx) + req := &cellarfeestypesv2.QueryFeeTokenBalancesRequest{} + + res, err := queryClient.QueryFeeTokenBalances(cmd.Context(), req) if err != nil { return err } diff --git a/x/cellarfees/keeper/abci.go b/x/cellarfees/keeper/abci.go index 1ae5e2668..fa55c20bf 100644 --- a/x/cellarfees/keeper/abci.go +++ b/x/cellarfees/keeper/abci.go @@ -3,36 +3,24 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/peggyjv/sommelier/v7/app/params" + paramstypes "github.com/peggyjv/sommelier/v7/app/params" + "github.com/peggyjv/sommelier/v7/x/cellarfees/types" ) // BeginBlocker emits rewards each block they are available by sending them to the distribution module's fee collector // account. Emissions are a constant value based on the last peak supply of distributable fees so that the reward supply // will decrease linearly until exhausted. func (k Keeper) BeginBlocker(ctx sdk.Context) { + k.handleRewardEmission(ctx) + k.handleFeeAuctions(ctx) +} - // Handle fee auctions - cellarfeesParams := k.GetParams(ctx) - - counters := k.GetFeeAccrualCounters(ctx) - - modulus := ctx.BlockHeader().Height % int64(cellarfeesParams.AuctionInterval) - - for _, counter := range counters.Counters { - - if counter.Count >= cellarfeesParams.FeeAccrualAuctionThreshold && modulus == 0 { - started := k.beginAuction(ctx, counter.Denom) - if started { - counters.ResetCounter(counter.Denom) - } - } - - } - k.SetFeeAccrualCounters(ctx, counters) +// EndBlocker is called at the end of every block +func (k Keeper) EndBlocker(ctx sdk.Context) {} - // Handle reward emissions +func (k Keeper) handleRewardEmission(ctx sdk.Context) { moduleAccount := k.GetFeesAccount(ctx) - remainingRewardsSupply := k.bankKeeper.GetBalance(ctx, moduleAccount.GetAddress(), params.BaseCoinUnit).Amount + remainingRewardsSupply := k.bankKeeper.GetBalance(ctx, moduleAccount.GetAddress(), paramstypes.BaseCoinUnit).Amount if remainingRewardsSupply.IsZero() { return @@ -40,13 +28,45 @@ func (k Keeper) BeginBlocker(ctx sdk.Context) { emission := k.GetEmission(ctx, remainingRewardsSupply) + // sanity check. the upcoming bank keeper call will error causing a panic if this is zero + if emission.IsZero() { + return + } + // Send to fee collector for distribution + ctx.Logger().Info("Sending rewards to fee collector", "module", types.ModuleName) err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, moduleAccount.GetName(), authtypes.FeeCollectorName, emission) if err != nil { panic(err) } - } -// EndBlocker is called at the end of every block -func (k Keeper) EndBlocker(ctx sdk.Context) {} +func (k Keeper) handleFeeAuctions(ctx sdk.Context) { + params := k.GetParams(ctx) + + if uint64(ctx.BlockHeight())%params.AuctionInterval != 0 { + return + } + + for _, balance := range k.bankKeeper.GetAllBalances(ctx, k.GetFeesAccount(ctx).GetAddress()) { + // skip usomm + if balance.Denom == paramstypes.BaseCoinUnit { + continue + } + + if balance.IsZero() { + continue + } + + tokenPrice, found := k.auctionKeeper.GetTokenPrice(ctx, balance.Denom) + if !found { + continue + } + + usdValue := k.GetBalanceUsdValue(ctx, balance, tokenPrice) + + if usdValue.GTE(params.AuctionThresholdUsdValue) { + k.beginAuction(ctx, balance) + } + } +} diff --git a/x/cellarfees/keeper/abci_test.go b/x/cellarfees/keeper/abci_test.go index f6612a75e..d10cd0951 100644 --- a/x/cellarfees/keeper/abci_test.go +++ b/x/cellarfees/keeper/abci_test.go @@ -2,25 +2,23 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/common" "github.com/golang/mock/gomock" - gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" appParams "github.com/peggyjv/sommelier/v7/app/params" - auctionTypes "github.com/peggyjv/sommelier/v7/x/auction/types" - cellarfeesTypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + auctiontypes "github.com/peggyjv/sommelier/v7/x/auction/types" + cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" ) func (suite *KeeperTestSuite) TestBeginBlockerZeroRewardsBalance() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper - cellarfeesKeeper.SetFeeAccrualCounters(ctx, cellarfeesTypes.DefaultFeeAccrualCounters()) require := suite.Require() - params := cellarfeesTypes.DefaultParams() + params := cellarfeestypesv2.DefaultParams() cellarfeesKeeper.SetParams(ctx, params) // mocks - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount) suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), appParams.BaseCoinUnit).Return(sdk.NewCoin(appParams.BaseCoinUnit, sdk.ZeroInt())) suite.bankKeeper.EXPECT().SendCoinsFromModuleToModule(ctx, gomock.Any(), gomock.Any(), gomock.Any()).Times(0) @@ -31,15 +29,14 @@ func (suite *KeeperTestSuite) TestBeginBlockerZeroRewardsBalance() { func (suite *KeeperTestSuite) TestBeginBlockerWithRewardBalanceAndPreviousPeakZero() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper - cellarfeesKeeper.SetFeeAccrualCounters(ctx, cellarfeesTypes.DefaultFeeAccrualCounters()) require := suite.Require() - params := cellarfeesTypes.DefaultParams() + params := cellarfeestypesv2.DefaultParams() cellarfeesKeeper.SetParams(ctx, params) // mocks - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount) rewardSupply := sdk.NewCoin(appParams.BaseCoinUnit, sdk.NewInt(1000000)) emissionPeriod := sdk.NewInt(int64(params.RewardEmissionPeriod)) @@ -55,14 +52,13 @@ func (suite *KeeperTestSuite) TestBeginBlockerWithRewardBalanceAndPreviousPeakZe func (suite *KeeperTestSuite) TestBeginBlockerWithRewardBalanceAndHigherPreviousPeak() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper - cellarfeesKeeper.SetFeeAccrualCounters(ctx, cellarfeesTypes.DefaultFeeAccrualCounters()) require := suite.Require() - params := cellarfeesTypes.DefaultParams() + params := cellarfeestypesv2.DefaultParams() cellarfeesKeeper.SetParams(ctx, params) // mocks - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount) rewardSupply := sdk.NewCoin(appParams.BaseCoinUnit, sdk.NewInt(1000000)) emissionPeriod := sdk.NewInt(int64(params.RewardEmissionPeriod)) @@ -80,15 +76,14 @@ func (suite *KeeperTestSuite) TestBeginBlockerWithRewardBalanceAndHigherPrevious func (suite *KeeperTestSuite) TestBeginBlockerWithRewardBalanceAndLowerPreviousPeak() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper - cellarfeesKeeper.SetFeeAccrualCounters(ctx, cellarfeesTypes.DefaultFeeAccrualCounters()) require := suite.Require() - params := cellarfeesTypes.DefaultParams() + params := cellarfeestypesv2.DefaultParams() cellarfeesKeeper.SetParams(ctx, params) // mocks - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount) rewardSupply := sdk.NewCoin(appParams.BaseCoinUnit, sdk.NewInt(1000000)) emissionPeriod := sdk.NewInt(int64(params.RewardEmissionPeriod)) @@ -107,15 +102,14 @@ func (suite *KeeperTestSuite) TestBeginBlockerWithRewardBalanceAndLowerPreviousP // If the emission calculation underflows to zero, it should be set to 1 func (suite *KeeperTestSuite) TestBeginBlockerEmissionCalculationUnderflowsToZero() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper - cellarfeesKeeper.SetFeeAccrualCounters(ctx, cellarfeesTypes.DefaultFeeAccrualCounters()) require := suite.Require() - params := cellarfeesTypes.DefaultParams() + params := cellarfeestypesv2.DefaultParams() cellarfeesKeeper.SetParams(ctx, params) cellarfeesKeeper.SetLastRewardSupplyPeak(ctx, sdk.ZeroInt()) // mocks - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount) rewardSupply := sdk.NewCoin(appParams.BaseCoinUnit, sdk.NewInt(1)) suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), appParams.BaseCoinUnit).Return(sdk.NewCoin(appParams.BaseCoinUnit, rewardSupply.Amount)) @@ -129,15 +123,14 @@ func (suite *KeeperTestSuite) TestBeginBlockerEmissionCalculationUnderflowsToZer // If the calculated emission is greater than the remaining supply, it should be set to the remaining supply func (suite *KeeperTestSuite) TestBeginBlockerEmissionGreaterThanRewardSupply() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper - cellarfeesKeeper.SetFeeAccrualCounters(ctx, cellarfeesTypes.DefaultFeeAccrualCounters()) require := suite.Require() - params := cellarfeesTypes.DefaultParams() + params := cellarfeestypesv2.DefaultParams() cellarfeesKeeper.SetParams(ctx, params) cellarfeesKeeper.SetLastRewardSupplyPeak(ctx, sdk.NewInt(1000000)) // mocks - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount) rewardSupply := sdk.NewCoin(appParams.BaseCoinUnit, sdk.NewInt(1)) suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), appParams.BaseCoinUnit).Return(sdk.NewCoin(appParams.BaseCoinUnit, rewardSupply.Amount)) @@ -148,184 +141,77 @@ func (suite *KeeperTestSuite) TestBeginBlockerEmissionGreaterThanRewardSupply() require.NotPanics(func() { cellarfeesKeeper.BeginBlocker(ctx) }) } -func (suite *KeeperTestSuite) TestAuctionBeginWithSufficientFunds() { +func (suite *KeeperTestSuite) TestHandleFeeAuctionsHappyPath() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper - cellarfeesKeeper.SetFeeAccrualCounters(ctx, cellarfeesTypes.DefaultFeeAccrualCounters()) - suite.SetupHooksTests(ctx, cellarfeesKeeper) + params := cellarfeestypesv2.DefaultParams() - require := suite.Require() - params := cellarfeesTypes.DefaultParams() params.AuctionInterval = 1 - cellarfeesKeeper.SetParams(ctx, params) - cellarfeesKeeper.SetLastRewardSupplyPeak(ctx, sdk.NewInt(1000000)) - - hooks := Hooks{k: cellarfeesKeeper} - event := gravitytypes.SendToCosmosEvent{ - CosmosReceiver: feesAccount.GetAddress().String(), - Amount: sdk.NewInt(2), - EthereumSender: "0x0000000000000000000000000000000000000000", - TokenContract: "0x1111111111111111111111111111111111111111", - } - cellarID := common.HexToAddress(event.EthereumSender) - cellarfeesKeeper.SetFeeAccrualCounters(ctx, cellarfeesTypes.FeeAccrualCounters{ - Counters: []cellarfeesTypes.FeeAccrualCounter{ - { - Denom: gravityFeeDenom, - Count: 1, - }, - }, - }) - expectedCounters := cellarfeesTypes.FeeAccrualCounters{ - Counters: []cellarfeesTypes.FeeAccrualCounter{ - { - Denom: gravityFeeDenom, - Count: 0, - }, - }, - } - - suite.corkKeeper.EXPECT().HasCellarID(ctx, cellarID).Return(true) - suite.gravityKeeper.EXPECT().ERC20ToDenomLookup(ctx, common.HexToAddress(event.TokenContract)).Return(false, gravityFeeDenom) - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) - - require.NotPanics(func() { hooks.AfterSendToCosmosEvent(ctx, event) }) - - // mocks - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) - - suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), appParams.BaseCoinUnit).Return(sdk.NewCoin(gravityFeeDenom, sdk.NewInt(0))) - - suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), gravityFeeDenom).Return(sdk.NewCoin(gravityFeeDenom, event.Amount)) - - expectedEmission := sdk.NewCoin(appParams.BaseCoinUnit, event.Amount) - suite.bankKeeper.EXPECT().SendCoinsFromModuleToModule(ctx, gomock.Any(), gomock.Any(), sdk.NewCoins(expectedEmission)).Times(1) - suite.auctionKeeper.EXPECT().GetActiveAuctions(ctx).Return([]*auctionTypes.Auction{}) - suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), gravityFeeDenom).Return(sdk.NewCoin(gravityFeeDenom, event.Amount)) - suite.auctionKeeper.EXPECT().BeginAuction(ctx, gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).Times(1) - - require.NotPanics(func() { cellarfeesKeeper.BeginBlocker(ctx) }) - - require.Equal(expectedCounters, cellarfeesKeeper.GetFeeAccrualCounters(ctx)) - -} - -func (suite *KeeperTestSuite) TestAuctionBeginWithInSufficientFunds() { - ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper - cellarfeesKeeper.SetFeeAccrualCounters(ctx, cellarfeesTypes.DefaultFeeAccrualCounters()) - suite.SetupHooksTests(ctx, cellarfeesKeeper) + params.AuctionThresholdUsdValue = sdk.MustNewDecFromStr("100.00") - require := suite.Require() - params := cellarfeesTypes.DefaultParams() - params.AuctionInterval = 1 cellarfeesKeeper.SetParams(ctx, params) - cellarfeesKeeper.SetLastRewardSupplyPeak(ctx, sdk.NewInt(1000000)) - hooks := Hooks{k: cellarfeesKeeper} - event := gravitytypes.SendToCosmosEvent{ - CosmosReceiver: feesAccount.GetAddress().String(), - Amount: sdk.NewInt(1), - EthereumSender: "0x0000000000000000000000000000000000000000", - TokenContract: "0x1111111111111111111111111111111111111111", - } - cellarID := common.HexToAddress(event.EthereumSender) - cellarfeesKeeper.SetFeeAccrualCounters(ctx, cellarfeesTypes.FeeAccrualCounters{ - Counters: []cellarfeesTypes.FeeAccrualCounter{ - { - Denom: gravityFeeDenom, - Count: 0, - }, + denom1 := "denom1" + denom2 := "denom2" + denom3 := "denom3" + amount1 := sdk.NewInt(1000000) + amount2 := sdk.NewInt(2000000000000) + amount3 := sdk.NewInt(3000000000000000) + balance1 := sdk.NewCoin(denom1, amount1) + balance2 := sdk.NewCoin(denom2, amount2) + balance3 := sdk.NewCoin(denom3, amount3) + price1 := sdk.NewDec(100) + price2 := sdk.NewDec(50) + price3 := sdk.NewDec(33) + tokenPrices := []*auctiontypes.TokenPrice{ + { + Exponent: 6, + Denom: denom1, + UsdPrice: price1, }, - }) - expectedCounters := cellarfeesTypes.FeeAccrualCounters{ - Counters: []cellarfeesTypes.FeeAccrualCounter{ - { - Denom: gravityFeeDenom, - Count: 1, - }, - }, - } - - suite.corkKeeper.EXPECT().HasCellarID(ctx, cellarID).Return(true) - suite.gravityKeeper.EXPECT().ERC20ToDenomLookup(ctx, common.HexToAddress(event.TokenContract)).Return(false, gravityFeeDenom) - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) - - require.NotPanics(func() { hooks.AfterSendToCosmosEvent(ctx, event) }) - - // mocks - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) - - suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), appParams.BaseCoinUnit).Return(sdk.NewCoin(gravityFeeDenom, sdk.NewInt(0))) - - suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), gravityFeeDenom).Return(sdk.NewCoin(gravityFeeDenom, event.Amount)) - - expectedEmission := sdk.NewCoin(appParams.BaseCoinUnit, event.Amount) - suite.bankKeeper.EXPECT().SendCoinsFromModuleToModule(ctx, gomock.Any(), gomock.Any(), sdk.NewCoins(expectedEmission)).Times(1) - suite.auctionKeeper.EXPECT().GetActiveAuctions(ctx).Return([]*auctionTypes.Auction{}) - suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), gravityFeeDenom).Return(sdk.NewCoin(gravityFeeDenom, event.Amount)) - suite.auctionKeeper.EXPECT().BeginAuction(ctx, gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil).Times(1) - - require.NotPanics(func() { cellarfeesKeeper.BeginBlocker(ctx) }) - - require.Equal(expectedCounters, cellarfeesKeeper.GetFeeAccrualCounters(ctx)) - -} - -func (suite *KeeperTestSuite) TestAuctionBeginWithSufficientFundsWrongBlockHeight() { - ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper - cellarfeesKeeper.SetFeeAccrualCounters(ctx, cellarfeesTypes.DefaultFeeAccrualCounters()) - suite.SetupHooksTests(ctx, cellarfeesKeeper) - - require := suite.Require() - params := cellarfeesTypes.DefaultParams() - params.AuctionInterval = 1000 - cellarfeesKeeper.SetParams(ctx, params) - cellarfeesKeeper.SetLastRewardSupplyPeak(ctx, sdk.NewInt(1000000)) - - hooks := Hooks{k: cellarfeesKeeper} - event := gravitytypes.SendToCosmosEvent{ - CosmosReceiver: feesAccount.GetAddress().String(), - Amount: sdk.NewInt(2), - EthereumSender: "0x0000000000000000000000000000000000000000", - TokenContract: "0x1111111111111111111111111111111111111111", - } - cellarID := common.HexToAddress(event.EthereumSender) - cellarfeesKeeper.SetFeeAccrualCounters(ctx, cellarfeesTypes.FeeAccrualCounters{ - Counters: []cellarfeesTypes.FeeAccrualCounter{ - { - Denom: gravityFeeDenom, - Count: 1, - }, + { + Exponent: 12, + Denom: denom2, + UsdPrice: price2, }, - }) - expectedCounters := cellarfeesTypes.FeeAccrualCounters{ - Counters: []cellarfeesTypes.FeeAccrualCounter{ - { - Denom: gravityFeeDenom, - Count: 2, - }, + { + Exponent: 18, + Denom: denom3, + UsdPrice: price3, }, } - suite.corkKeeper.EXPECT().HasCellarID(ctx, cellarID).Return(true) - suite.gravityKeeper.EXPECT().ERC20ToDenomLookup(ctx, common.HexToAddress(event.TokenContract)).Return(false, gravityFeeDenom) - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) - - require.NotPanics(func() { hooks.AfterSendToCosmosEvent(ctx, event) }) - - // mocks - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) - - suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), appParams.BaseCoinUnit).Return(sdk.NewCoin(gravityFeeDenom, sdk.NewInt(0))) - - suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), gravityFeeDenom).Return(sdk.NewCoin(gravityFeeDenom, event.Amount)) - - expectedEmission := sdk.NewCoin(appParams.BaseCoinUnit, event.Amount) - suite.bankKeeper.EXPECT().SendCoinsFromModuleToModule(ctx, gomock.Any(), gomock.Any(), sdk.NewCoins(expectedEmission)).Times(1) - suite.auctionKeeper.EXPECT().GetActiveAuctions(ctx).Return([]*auctionTypes.Auction{}) - suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), gravityFeeDenom).Return(sdk.NewCoin(gravityFeeDenom, event.Amount)) - - require.NotPanics(func() { cellarfeesKeeper.BeginBlocker(ctx) }) + suite.auctionKeeper.EXPECT().GetTokenPrice(ctx, denom1).Return(*tokenPrices[0], true) + suite.auctionKeeper.EXPECT().GetTokenPrice(ctx, denom2).Return(*tokenPrices[1], true) + suite.auctionKeeper.EXPECT().GetTokenPrice(ctx, denom3).Return(*tokenPrices[2], true) + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount).Times(len(tokenPrices) * 2) + suite.bankKeeper.EXPECT().GetAllBalances(ctx, feesAccount.GetAddress()).Return(sdk.NewCoins(balance1)).Times(2) + suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), denom1).Return(balance1).Times(2) + suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), denom2).Return(balance2).Times(2) + suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), denom3).Return(balance3).Times(2) + + // retreiving module account + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount) + + // no active auctions + suite.auctionKeeper.EXPECT().GetActiveAuctions(ctx).Return([]*auctiontypes.Auction{}) + suite.auctionKeeper.EXPECT().BeginAuction(ctx, balance1, params.InitialPriceDecreaseRate, params.PriceDecreaseBlockInterval, cellarfeestypes.ModuleName, cellarfeestypes.ModuleName).Return(nil) + expectedAuction1 := auctiontypes.Auction{ + Id: 1, + StartingTokensForSale: balance1, + InitialPriceDecreaseRate: params.InitialPriceDecreaseRate, + CurrentPriceDecreaseRate: params.InitialPriceDecreaseRate, + StartBlock: uint64(ctx.BlockHeight()), + EndBlock: 0, + PriceDecreaseBlockInterval: params.PriceDecreaseBlockInterval, + InitialUnitPriceInUsomm: price1, + CurrentUnitPriceInUsomm: price1, + FundingModuleAccount: cellarfeestypes.ModuleName, + ProceedsModuleAccount: cellarfeestypes.ModuleName, + } + suite.auctionKeeper.EXPECT().GetActiveAuctions(ctx).Return([]*auctiontypes.Auction{&expectedAuction1}) + suite.auctionKeeper.EXPECT().BeginAuction(ctx, balance2, params.InitialPriceDecreaseRate, params.PriceDecreaseBlockInterval, cellarfeestypes.ModuleName, cellarfeestypes.ModuleName).Return(nil) - require.Equal(expectedCounters, cellarfeesKeeper.GetFeeAccrualCounters(ctx)) + // we only set expected calls for two auctions because the third token price is $99, so no auction should be started. + cellarfeesKeeper.handleFeeAuctions(ctx) } diff --git a/x/cellarfees/keeper/auction.go b/x/cellarfees/keeper/auction.go index ea4e4ab90..111b0cd4c 100644 --- a/x/cellarfees/keeper/auction.go +++ b/x/cellarfees/keeper/auction.go @@ -7,21 +7,19 @@ import ( ) // Attempts to start an auction for the provided denom -func (k Keeper) beginAuction(ctx sdk.Context, denom string) (started bool) { +func (k Keeper) beginAuction(ctx sdk.Context, balance sdk.Coin) bool { activeAuctions := k.auctionKeeper.GetActiveAuctions(ctx) // Don't start an auction if the denom has an active one for _, auction := range activeAuctions { - if denom == auction.StartingTokensForSale.Denom { + if balance.Denom == auction.StartingTokensForSale.Denom { return false } } - // We auction the entire balance in the cellarfees module account cellarfeesParams := k.GetParams(ctx) - balance := k.bankKeeper.GetBalance(ctx, k.GetFeesAccount(ctx).GetAddress(), denom) if balance.IsZero() { - k.Logger(ctx).Error("Attempted to begin auction for denom %s with a zero balance.", denom) + k.Logger(ctx).Error("Attempted to begin auction for denom %s with a zero balance.", balance.Denom) return false } diff --git a/x/cellarfees/keeper/auction_test.go b/x/cellarfees/keeper/auction_test.go index 075c0e732..6c52cb4ff 100644 --- a/x/cellarfees/keeper/auction_test.go +++ b/x/cellarfees/keeper/auction_test.go @@ -4,7 +4,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/golang/mock/gomock" auctionTypes "github.com/peggyjv/sommelier/v7/x/auction/types" - cellarfeesTypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" ) const feeDenom = "testdenom" @@ -13,124 +14,109 @@ func (suite *KeeperTestSuite) TestHappyPathBeginAuction() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper require := suite.Require() - params := cellarfeesTypes.DefaultParams() + params := cellarfeestypesv2.DefaultParams() cellarfeesKeeper.SetParams(ctx, params) fees := sdk.NewCoin(feeDenom, sdk.NewInt(1000000)) // retreiving module account - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount) // no active auctions suite.auctionKeeper.EXPECT().GetActiveAuctions(ctx).Return([]*auctionTypes.Auction{}) - // nonzero fee balance - suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), feeDenom).Return(fees) - // begin auction doesn't error suite.auctionKeeper.EXPECT().BeginAuction(ctx, fees, gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil) - require.True(cellarfeesKeeper.beginAuction(ctx, feeDenom)) + require.True(cellarfeesKeeper.beginAuction(ctx, fees)) } func (suite *KeeperTestSuite) TestAuctionFeeBalanceZeroDoesNotStartAuction() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper require := suite.Require() - params := cellarfeesTypes.DefaultParams() + params := cellarfeestypesv2.DefaultParams() cellarfeesKeeper.SetParams(ctx, params) fees := sdk.NewCoin(feeDenom, sdk.NewInt(0)) // retreiving module account - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount) // no active auctions suite.auctionKeeper.EXPECT().GetActiveAuctions(ctx).Return([]*auctionTypes.Auction{}) - // zero fee balance - suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), feeDenom).Return(fees) - - require.False(cellarfeesKeeper.beginAuction(ctx, feeDenom)) + require.False(cellarfeesKeeper.beginAuction(ctx, fees)) } func (suite *KeeperTestSuite) TestAuctionUnauthorizedFundingModule() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper require := suite.Require() - params := cellarfeesTypes.DefaultParams() + params := cellarfeestypesv2.DefaultParams() cellarfeesKeeper.SetParams(ctx, params) fees := sdk.NewCoin(feeDenom, sdk.NewInt(1000000)) // retreiving module account - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount) // no active auctions suite.auctionKeeper.EXPECT().GetActiveAuctions(ctx).Return([]*auctionTypes.Auction{}) - // nonzero fee balance - suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), feeDenom).Return(fees) - // begin auction errors suite.auctionKeeper.EXPECT().BeginAuction(ctx, fees, gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(auctionTypes.ErrUnauthorizedFundingModule) - require.Panics(func() { cellarfeesKeeper.beginAuction(ctx, feeDenom) }) + require.Panics(func() { cellarfeesKeeper.beginAuction(ctx, fees) }) } func (suite *KeeperTestSuite) TestAuctionUnauthorizedProceedsModule() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper require := suite.Require() - params := cellarfeesTypes.DefaultParams() + params := cellarfeestypesv2.DefaultParams() cellarfeesKeeper.SetParams(ctx, params) fees := sdk.NewCoin(feeDenom, sdk.NewInt(1000000)) // retreiving module account - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount) // no active auctions suite.auctionKeeper.EXPECT().GetActiveAuctions(ctx).Return([]*auctionTypes.Auction{}) - // nonzero fee balance - suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), feeDenom).Return(fees) - // begin auction errors suite.auctionKeeper.EXPECT().BeginAuction(ctx, fees, gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(auctionTypes.ErrUnauthorizedProceedsModule) - require.Panics(func() { cellarfeesKeeper.beginAuction(ctx, feeDenom) }) + require.Panics(func() { cellarfeesKeeper.beginAuction(ctx, fees) }) } func (suite *KeeperTestSuite) TestAuctionNonPanicError() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper require := suite.Require() - params := cellarfeesTypes.DefaultParams() + params := cellarfeestypesv2.DefaultParams() cellarfeesKeeper.SetParams(ctx, params) fees := sdk.NewCoin(feeDenom, sdk.NewInt(1000000)) // retreiving module account - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount) // no active auctions suite.auctionKeeper.EXPECT().GetActiveAuctions(ctx).Return([]*auctionTypes.Auction{}) - // nonzero fee balance - suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), feeDenom).Return(fees) - // begin auction errors suite.auctionKeeper.EXPECT().BeginAuction(ctx, fees, gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(auctionTypes.ErrDenomCannotBeEmpty) - require.False(cellarfeesKeeper.beginAuction(ctx, feeDenom)) + require.False(cellarfeesKeeper.beginAuction(ctx, fees)) } func (suite *KeeperTestSuite) TestAuctionAlreadyActive() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper require := suite.Require() - params := cellarfeesTypes.DefaultParams() + params := cellarfeestypesv2.DefaultParams() cellarfeesKeeper.SetParams(ctx, params) fees := sdk.NewCoin(feeDenom, sdk.NewInt(1000000)) @@ -141,5 +127,5 @@ func (suite *KeeperTestSuite) TestAuctionAlreadyActive() { } suite.auctionKeeper.EXPECT().GetActiveAuctions(ctx).Return([]*auctionTypes.Auction{&testAuction}) - require.False(cellarfeesKeeper.beginAuction(ctx, feeDenom)) + require.False(cellarfeesKeeper.beginAuction(ctx, fees)) } diff --git a/x/cellarfees/keeper/cellarfees.go b/x/cellarfees/keeper/cellarfees.go index fd90e763d..399d039f9 100644 --- a/x/cellarfees/keeper/cellarfees.go +++ b/x/cellarfees/keeper/cellarfees.go @@ -5,6 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/peggyjv/sommelier/v7/app/params" + auctiontypes "github.com/peggyjv/sommelier/v7/x/auction/types" "github.com/peggyjv/sommelier/v7/x/cellarfees/types" ) @@ -38,3 +39,21 @@ func (k Keeper) GetEmission(ctx sdk.Context, remainingRewardsSupply math.Int) sd return sdk.NewCoins(sdk.NewCoin(params.BaseCoinUnit, emissionAmount)) } + +func (k Keeper) GetFeeBalance(ctx sdk.Context, denom string) (sdk.Coin, bool) { + feesAddr := k.GetFeesAccount(ctx).GetAddress() + + for _, balance := range k.bankKeeper.GetAllBalances(ctx, feesAddr) { + if balance.Denom == denom { + return balance, true + } + } + + return sdk.Coin{}, false +} + +func (k Keeper) GetBalanceUsdValue(ctx sdk.Context, balance sdk.Coin, tokenPrice auctiontypes.TokenPrice) sdk.Dec { + unitAmount := sdk.NewDecFromInt(balance.Amount).Quo(sdk.NewDec(10).Power(tokenPrice.Exponent)) + + return tokenPrice.UsdPrice.Mul(unitAmount) +} diff --git a/x/cellarfees/keeper/cellarfees_test.go b/x/cellarfees/keeper/cellarfees_test.go new file mode 100644 index 000000000..a65d4fc2d --- /dev/null +++ b/x/cellarfees/keeper/cellarfees_test.go @@ -0,0 +1,79 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + accounttypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/peggyjv/sommelier/v7/app/params" + auctiontypes "github.com/peggyjv/sommelier/v7/x/auction/types" + cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" +) + +func (suite *KeeperTestSuite) TestGetFeesAccount() { + ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper + require := suite.Require() + + expectedAddress := "somm1hqf42j6zxfnth4xpdse05wpnjjrgc864vwujxx" + account := accounttypes.ModuleAccount{ + Name: cellarfeestypes.ModuleName, + BaseAccount: accounttypes.NewBaseAccountWithAddress(sdk.MustAccAddressFromBech32(expectedAddress)), + } + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(&account) + + address := cellarfeesKeeper.GetFeesAccount(ctx).GetAddress().String() + + require.Equal(expectedAddress, address) +} + +func (suite *KeeperTestSuite) TestGetFeeBalance() { + ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper + require := suite.Require() + + expectedDenom := "testdenom" + expectedBalances := sdk.Coins{sdk.NewCoin(expectedDenom, sdk.NewInt(1000000))} + account := accounttypes.ModuleAccount{ + Name: cellarfeestypes.ModuleName, + BaseAccount: accounttypes.NewBaseAccountWithAddress(sdk.MustAccAddressFromBech32("somm1hqf42j6zxfnth4xpdse05wpnjjrgc864vwujxx")), + } + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(&account) + suite.bankKeeper.EXPECT().GetAllBalances(ctx, account.GetAddress()).Return(expectedBalances) + + balance, found := cellarfeesKeeper.GetFeeBalance(ctx, expectedDenom) + + require.True(found) + require.Equal(expectedBalances[0], balance) +} + +func (suite *KeeperTestSuite) TestGetBalanceUsdValue() { + ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper + require := suite.Require() + + balance := sdk.NewCoin("testdenom", sdk.NewInt(1000000)) + usdPrice := sdk.NewDec(100) + tokenPrice := auctiontypes.TokenPrice{ + Exponent: 6, + UsdPrice: usdPrice, + } + + expectedUsdValue := usdPrice.Mul(sdk.NewDecFromInt(balance.Amount).Quo(sdk.NewDec(10).Power(tokenPrice.Exponent))) + usdValue := cellarfeesKeeper.GetBalanceUsdValue(ctx, balance, tokenPrice) + + require.Equal(expectedUsdValue, usdValue) +} + +func (suite *KeeperTestSuite) TestGetEmission() { + ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper + require := suite.Require() + + remainingRewardsSupply := sdk.NewInt(1000000) + previousSupplyPeak := sdk.NewInt(500000) + cellarfeesParams := cellarfeestypesv2.DefaultParams() + cellarfeesParams.RewardEmissionPeriod = 10 + cellarfeesKeeper.SetParams(ctx, cellarfeesParams) + cellarfeesKeeper.SetLastRewardSupplyPeak(ctx, previousSupplyPeak) + + expectedEmissionAmount := remainingRewardsSupply.Quo(sdk.NewInt(int64(cellarfeesParams.RewardEmissionPeriod))) + emission := cellarfeesKeeper.GetEmission(ctx, remainingRewardsSupply) + + require.Equal(sdk.NewCoins(sdk.NewCoin(params.BaseCoinUnit, expectedEmissionAmount)), emission) +} diff --git a/x/cellarfees/keeper/genesis.go b/x/cellarfees/keeper/genesis.go index bfcab0304..ea5d2c020 100644 --- a/x/cellarfees/keeper/genesis.go +++ b/x/cellarfees/keeper/genesis.go @@ -4,19 +4,19 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + types "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" ) // InitGenesis initializes the module's state from a provided genesis // state. func (k Keeper) InitGenesis(ctx sdk.Context, gs types.GenesisState) { k.SetParams(ctx, gs.Params) - k.SetFeeAccrualCounters(ctx, gs.FeeAccrualCounters) k.SetLastRewardSupplyPeak(ctx, gs.LastRewardSupplyPeak) feesAccount := k.GetFeesAccount(ctx) if feesAccount == nil { - panic(fmt.Sprintf("%s module account has not been set", types.ModuleName)) + panic(fmt.Sprintf("%s module account has not been set", cellarfeestypes.ModuleName)) } } @@ -24,7 +24,6 @@ func (k Keeper) InitGenesis(ctx sdk.Context, gs types.GenesisState) { func (k Keeper) ExportGenesis(ctx sdk.Context) types.GenesisState { return types.GenesisState{ Params: k.GetParams(ctx), - FeeAccrualCounters: k.GetFeeAccrualCounters(ctx), LastRewardSupplyPeak: k.GetLastRewardSupplyPeak(ctx), } } diff --git a/x/cellarfees/keeper/genesis_test.go b/x/cellarfees/keeper/genesis_test.go index f48e2a3e5..dfce65b31 100644 --- a/x/cellarfees/keeper/genesis_test.go +++ b/x/cellarfees/keeper/genesis_test.go @@ -2,63 +2,48 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - cellarfeesTypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" ) func (suite *KeeperTestSuite) TestImportingEmptyGenesis() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper require := suite.Require() - testGenesis := cellarfeesTypes.GenesisState{} + testGenesis := cellarfeestypesv2.GenesisState{} // Canary to make sure validate basic is being run require.Panics(func() { cellarfeesKeeper.InitGenesis(ctx, testGenesis) }) - testGenesis = cellarfeesTypes.DefaultGenesisState() + testGenesis = cellarfeestypesv2.DefaultGenesisState() require.NotPanics(func() { suite.accountKeeper.EXPECT().GetModuleAccount(ctx, feesAccount.GetName()).Return(feesAccount) cellarfeesKeeper.InitGenesis(ctx, testGenesis) }) - require.Len(cellarfeesKeeper.GetFeeAccrualCounters(ctx).Counters, 0) require.Zero(cellarfeesKeeper.GetLastRewardSupplyPeak(ctx).Int64()) - require.Equal(cellarfeesKeeper.GetParams(ctx), cellarfeesTypes.DefaultParams()) + require.Equal(cellarfeesKeeper.GetParams(ctx), cellarfeestypesv2.DefaultParams()) } func (suite *KeeperTestSuite) TestImportingPopulatedGenesis() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper require := suite.Require() - testGenesis := cellarfeesTypes.GenesisState{} + testGenesis := cellarfeestypesv2.GenesisState{} // Canary to make sure validate basic is being run require.Panics(func() { cellarfeesKeeper.InitGenesis(ctx, testGenesis) }) - - testGenesis.FeeAccrualCounters = cellarfeesTypes.FeeAccrualCounters{ - Counters: []cellarfeesTypes.FeeAccrualCounter{ - { - Denom: "denom1", - Count: 2, - }, - { - Denom: "denom2", - Count: 0, - }, - }, - } testGenesis.LastRewardSupplyPeak = sdk.NewInt(1337) - testGenesis.Params.FeeAccrualAuctionThreshold = 2 testGenesis.Params.InitialPriceDecreaseRate = sdk.MustNewDecFromStr("0.01") testGenesis.Params.PriceDecreaseBlockInterval = 10 testGenesis.Params.RewardEmissionPeriod = 600 testGenesis.Params.AuctionInterval = 1000 + testGenesis.Params.AuctionThresholdUsdValue = sdk.NewDec(1000000) require.NotPanics(func() { suite.accountKeeper.EXPECT().GetModuleAccount(ctx, feesAccount.GetName()).Return(feesAccount) cellarfeesKeeper.InitGenesis(ctx, testGenesis) }) - require.Equal(testGenesis.FeeAccrualCounters, cellarfeesKeeper.GetFeeAccrualCounters(ctx)) require.Equal(testGenesis.LastRewardSupplyPeak, cellarfeesKeeper.GetLastRewardSupplyPeak(ctx)) require.Equal(testGenesis.Params, cellarfeesKeeper.GetParams(ctx)) } @@ -67,42 +52,27 @@ func (suite *KeeperTestSuite) TestExportingEmptyGenesis() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper require := suite.Require() - cellarfeesKeeper.SetParams(ctx, cellarfeesTypes.DefaultParams()) - cellarfeesKeeper.SetFeeAccrualCounters(ctx, cellarfeesTypes.DefaultFeeAccrualCounters()) + cellarfeesKeeper.SetParams(ctx, cellarfeestypesv2.DefaultParams()) cellarfeesKeeper.SetLastRewardSupplyPeak(ctx, sdk.ZeroInt()) - require.Equal(cellarfeesTypes.DefaultGenesisState(), cellarfeesKeeper.ExportGenesis(ctx)) + require.Equal(cellarfeestypesv2.DefaultGenesisState(), cellarfeesKeeper.ExportGenesis(ctx)) } func (suite *KeeperTestSuite) TestExportingPopulatedGenesis() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper require := suite.Require() - var params cellarfeesTypes.Params - params.FeeAccrualAuctionThreshold = 2 + var params cellarfeestypesv2.Params params.InitialPriceDecreaseRate = sdk.MustNewDecFromStr("0.01") params.PriceDecreaseBlockInterval = 10 params.RewardEmissionPeriod = 600 params.AuctionInterval = 1000 + params.AuctionThresholdUsdValue = sdk.NewDec(1000000) cellarfeesKeeper.SetParams(ctx, params) - counters := cellarfeesTypes.FeeAccrualCounters{ - Counters: []cellarfeesTypes.FeeAccrualCounter{ - { - Denom: "denom1", - Count: 2, - }, - { - Denom: "denom2", - Count: 0, - }, - }, - } - cellarfeesKeeper.SetFeeAccrualCounters(ctx, counters) peak := sdk.NewInt(1337) cellarfeesKeeper.SetLastRewardSupplyPeak(ctx, peak) export := cellarfeesKeeper.ExportGenesis(ctx) require.Equal(params, export.Params) - require.Equal(counters, export.FeeAccrualCounters) require.Equal(peak, export.LastRewardSupplyPeak) } diff --git a/x/cellarfees/keeper/hooks.go b/x/cellarfees/keeper/hooks.go deleted file mode 100644 index 70ecdfd8a..000000000 --- a/x/cellarfees/keeper/hooks.go +++ /dev/null @@ -1,76 +0,0 @@ -package keeper - -import ( - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/common" - gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" - "github.com/peggyjv/sommelier/v7/app/params" - "github.com/peggyjv/sommelier/v7/x/cellarfees/types" -) - -type Hooks struct { - k Keeper -} - -var _ gravitytypes.GravityHooks = Hooks{} - -// Hooks Return the wrapper struct -func (k Keeper) Hooks() Hooks { - return Hooks{k} -} - -func (h Hooks) AfterContractCallExecutedEvent(ctx sdk.Context, event gravitytypes.ContractCallExecutedEvent) { -} - -func (h Hooks) AfterERC20DeployedEvent(ctx sdk.Context, event gravitytypes.ERC20DeployedEvent) {} - -func (h Hooks) AfterSignerSetExecutedEvent(ctx sdk.Context, event gravitytypes.SignerSetTxExecutedEvent) { -} - -func (h Hooks) AfterBatchExecutedEvent(ctx sdk.Context, event gravitytypes.BatchExecutedEvent) {} - -// Each time we receive a fee accrual from a cellar, we increment a counter for the respective denom. If a counter -// reaches a threshold defined in the cellarfees params, we attempt to start an auction. If the auction is started -// successfully we reset the count for that denom. -func (h Hooks) AfterSendToCosmosEvent(ctx sdk.Context, event gravitytypes.SendToCosmosEvent) { - // Check if recipient is the cellarfees module account - moduleAccountAddress := h.k.GetFeesAccount(ctx).GetAddress() - if event.CosmosReceiver != moduleAccountAddress.String() { - return - } - - if event.Amount.IsZero() { - return - } - - // Check if the sender is an approved Cellar contract. We don't want to count coins sent from any address - // as fee accruals. - if !h.k.corkKeeper.HasCellarID(ctx, common.HexToAddress(event.EthereumSender)) { - return - } - - // Denom cannot be SOMM - _, denom := h.k.gravityKeeper.ERC20ToDenomLookup(ctx, common.HexToAddress(event.TokenContract)) - if denom == params.BaseCoinUnit { - return - } - - counters := h.k.GetFeeAccrualCounters(ctx) - count := counters.IncrementCounter(denom) - h.k.SetFeeAccrualCounters(ctx, counters) - - ctx.EventManager().EmitEvents( - sdk.Events{ - sdk.NewEvent( - types.EventTypeFeeAccrual, - sdk.NewAttribute(types.AttributeKeyCellar, event.EthereumSender), - sdk.NewAttribute(types.AttributeKeyTokenContract, event.TokenContract), - sdk.NewAttribute(types.AttributeKeyDenom, denom), - sdk.NewAttribute(types.AttributeKeyAmount, event.Amount.String()), - sdk.NewAttribute(types.AttributeKeyCount, fmt.Sprint(count)), - ), - }, - ) -} diff --git a/x/cellarfees/keeper/hooks_test.go b/x/cellarfees/keeper/hooks_test.go deleted file mode 100644 index 9238af47a..000000000 --- a/x/cellarfees/keeper/hooks_test.go +++ /dev/null @@ -1,85 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/common" - gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" - cellarfeesTypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" -) - -const gravityFeeDenom = "gravity0x1111111111111111111111111111111111111111" - -func (suite *KeeperTestSuite) SetupHooksTests(ctx sdk.Context, cellarfeesKeeper Keeper) { - cellarfeesKeeper.SetParams(ctx, cellarfeesTypes.DefaultParams()) - cellarfeesKeeper.SetFeeAccrualCounters(ctx, cellarfeesTypes.DefaultFeeAccrualCounters()) - - // mocks - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, feesAccount.GetName()).Return(feesAccount).Times(1) -} - -func (suite *KeeperTestSuite) TestHooksRecipientNotFeesAccountDoesNothing() { - ctx, cellarfeesKeeper, require := suite.ctx, suite.cellarfeesKeeper, suite.Require() - suite.SetupHooksTests(ctx, cellarfeesKeeper) - - hooks := Hooks{k: cellarfeesKeeper} - event := gravitytypes.SendToCosmosEvent{ - CosmosReceiver: "fakeaddress", - } - - require.NotPanics(func() { hooks.AfterSendToCosmosEvent(ctx, event) }) - require.Equal(cellarfeesTypes.DefaultFeeAccrualCounters(), cellarfeesKeeper.GetFeeAccrualCounters(ctx)) -} - -func (suite *KeeperTestSuite) TestHooksEventAmountZeroDoesNothing() { - ctx, cellarfeesKeeper, require := suite.ctx, suite.cellarfeesKeeper, suite.Require() - suite.SetupHooksTests(ctx, cellarfeesKeeper) - - hooks := Hooks{k: cellarfeesKeeper} - event := gravitytypes.SendToCosmosEvent{ - CosmosReceiver: feesAccount.GetAddress().String(), - Amount: sdk.ZeroInt(), - } - - require.NotPanics(func() { hooks.AfterSendToCosmosEvent(ctx, event) }) - require.Equal(cellarfeesTypes.DefaultFeeAccrualCounters(), cellarfeesKeeper.GetFeeAccrualCounters(ctx)) -} - -func (suite *KeeperTestSuite) TestHooksUnapprovedCellarDoesNothing() { - ctx, cellarfeesKeeper, require := suite.ctx, suite.cellarfeesKeeper, suite.Require() - suite.SetupHooksTests(ctx, cellarfeesKeeper) - - hooks := Hooks{k: cellarfeesKeeper} - event := gravitytypes.SendToCosmosEvent{ - CosmosReceiver: feesAccount.GetAddress().String(), - Amount: sdk.OneInt(), - EthereumSender: "0x0000000000000000000000000000000000000000", - } - cellarID := common.HexToAddress(event.EthereumSender) - - // mocks - suite.corkKeeper.EXPECT().HasCellarID(ctx, cellarID).Return(false).Times(1) - - require.NotPanics(func() { hooks.AfterSendToCosmosEvent(ctx, event) }) - require.Equal(cellarfeesTypes.DefaultFeeAccrualCounters(), cellarfeesKeeper.GetFeeAccrualCounters(ctx)) -} - -func (suite *KeeperTestSuite) TestHooksDenomIsUsommDoesNothing() { - ctx, cellarfeesKeeper, require := suite.ctx, suite.cellarfeesKeeper, suite.Require() - suite.SetupHooksTests(ctx, cellarfeesKeeper) - - hooks := Hooks{k: cellarfeesKeeper} - event := gravitytypes.SendToCosmosEvent{ - CosmosReceiver: feesAccount.GetAddress().String(), - Amount: sdk.OneInt(), - EthereumSender: "0x0000000000000000000000000000000000000000", - TokenContract: "0x1111111111111111111111111111111111111111", - } - cellarID := common.HexToAddress(event.EthereumSender) - - // mocks - suite.corkKeeper.EXPECT().HasCellarID(ctx, cellarID).Return(true) - suite.gravityKeeper.EXPECT().ERC20ToDenomLookup(ctx, common.HexToAddress(event.TokenContract)).Return(true, "usomm").Times(1) - - require.NotPanics(func() { hooks.AfterSendToCosmosEvent(ctx, event) }) - require.Equal(cellarfeesTypes.DefaultFeeAccrualCounters(), cellarfeesKeeper.GetFeeAccrualCounters(ctx)) -} diff --git a/x/cellarfees/keeper/keeper.go b/x/cellarfees/keeper/keeper.go index 66682e899..2d1c22f3a 100644 --- a/x/cellarfees/keeper/keeper.go +++ b/x/cellarfees/keeper/keeper.go @@ -3,8 +3,6 @@ package keeper import ( "fmt" "math/big" - "sort" - "strings" "cosmossdk.io/math" "github.com/tendermint/tendermint/libs/log" @@ -14,31 +12,30 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/peggyjv/sommelier/v7/app/params" - "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + types "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" ) type Keeper struct { cdc codec.BinaryCodec storeKey storetypes.StoreKey paramSpace paramtypes.Subspace - accountKeeper types.AccountKeeper - bankKeeper types.BankKeeper - mintKeeper types.MintKeeper - corkKeeper types.CorkKeeper - gravityKeeper types.GravityKeeper - auctionKeeper types.AuctionKeeper + accountKeeper cellarfeestypes.AccountKeeper + bankKeeper cellarfeestypes.BankKeeper + mintKeeper cellarfeestypes.MintKeeper + corkKeeper cellarfeestypes.CorkKeeper + auctionKeeper cellarfeestypes.AuctionKeeper } func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, paramSpace paramtypes.Subspace, - accountKeeper types.AccountKeeper, - bankKeeper types.BankKeeper, - mintKeeper types.MintKeeper, - corkKeeper types.CorkKeeper, - gravityKeeper types.GravityKeeper, - auctionKeeper types.AuctionKeeper, + accountKeeper cellarfeestypes.AccountKeeper, + bankKeeper cellarfeestypes.BankKeeper, + mintKeeper cellarfeestypes.MintKeeper, + corkKeeper cellarfeestypes.CorkKeeper, + auctionKeeper cellarfeestypes.AuctionKeeper, ) Keeper { if !paramSpace.HasKeyTable() { paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) @@ -52,13 +49,12 @@ func NewKeeper( bankKeeper: bankKeeper, mintKeeper: mintKeeper, corkKeeper: corkKeeper, - gravityKeeper: gravityKeeper, auctionKeeper: auctionKeeper, } } func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) + return ctx.Logger().With("module", fmt.Sprintf("x/%s", cellarfeestypes.ModuleName)) } //////////// @@ -81,7 +77,7 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { func (k Keeper) GetLastRewardSupplyPeak(ctx sdk.Context) math.Int { store := ctx.KVStore(k.storeKey) - b := store.Get(types.GetLastRewardSupplyPeakKey()) + b := store.Get(cellarfeestypes.GetLastRewardSupplyPeakKey()) if b == nil { panic("Last highest reward supply should not have been nil") } @@ -92,37 +88,7 @@ func (k Keeper) GetLastRewardSupplyPeak(ctx sdk.Context) math.Int { func (k Keeper) SetLastRewardSupplyPeak(ctx sdk.Context, amount math.Int) { store := ctx.KVStore(k.storeKey) b := amount.BigInt().Bytes() - store.Set(types.GetLastRewardSupplyPeakKey(), b) -} - -////////////////////////// -// Fee accrual counters // -////////////////////////// - -func (k Keeper) GetFeeAccrualCounters(ctx sdk.Context) (counters types.FeeAccrualCounters) { - store := ctx.KVStore(k.storeKey) - b := store.Get(types.GetFeeAccrualCountersKey()) - if b == nil { - panic("Fee accrual counters is nil, it should have been set by InitGenesis") - } - if len(b) == 0 { - return types.DefaultFeeAccrualCounters() - } - - k.cdc.MustUnmarshal(b, &counters) - return -} - -func (k Keeper) SetFeeAccrualCounters(ctx sdk.Context, counters types.FeeAccrualCounters) { - store := ctx.KVStore(k.storeKey) - counterSlice := make([]types.FeeAccrualCounter, 0, len(counters.Counters)) - counterSlice = append(counterSlice, counters.Counters...) - sort.Slice(counterSlice, func(i, j int) bool { - return strings.Compare(counterSlice[i].Denom, counterSlice[j].Denom) == -1 - }) - counters.Counters = counterSlice - b := k.cdc.MustMarshal(&counters) - store.Set(types.GetFeeAccrualCountersKey(), b) + store.Set(cellarfeestypes.GetLastRewardSupplyPeakKey(), b) } //////////// diff --git a/x/cellarfees/keeper/keeper_test.go b/x/cellarfees/keeper/keeper_test.go index 17b90cd2c..69aa2b2f4 100644 --- a/x/cellarfees/keeper/keeper_test.go +++ b/x/cellarfees/keeper/keeper_test.go @@ -15,7 +15,8 @@ import ( cellarfeestestutil "github.com/peggyjv/sommelier/v7/x/cellarfees/testutil" moduletestutil "github.com/peggyjv/sommelier/v7/testutil" - cellarfeesTypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" "github.com/stretchr/testify/suite" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmtime "github.com/tendermint/tendermint/types/time" @@ -34,16 +35,15 @@ type KeeperTestSuite struct { bankKeeper *cellarfeestestutil.MockBankKeeper mintKeeper *cellarfeestestutil.MockMintKeeper corkKeeper *cellarfeestestutil.MockCorkKeeper - gravityKeeper *cellarfeestestutil.MockGravityKeeper auctionKeeper *cellarfeestestutil.MockAuctionKeeper - queryClient cellarfeesTypes.QueryClient + queryClient cellarfeestypesv2.QueryClient encCfg moduletestutil.TestEncodingConfig } func (suite *KeeperTestSuite) SetupTest() { - key := sdk.NewKVStoreKey(cellarfeesTypes.StoreKey) + key := sdk.NewKVStoreKey(cellarfeestypes.StoreKey) tkey := sdk.NewTransientStoreKey("transient_test") testCtx := testutil.DefaultContext(key, tkey) ctx := testCtx.WithBlockHeader(tmproto.Header{Height: 5, Time: tmtime.Now()}) @@ -57,7 +57,6 @@ func (suite *KeeperTestSuite) SetupTest() { suite.mintKeeper = cellarfeestestutil.NewMockMintKeeper(ctrl) suite.accountKeeper = cellarfeestestutil.NewMockAccountKeeper(ctrl) suite.corkKeeper = cellarfeestestutil.NewMockCorkKeeper(ctrl) - suite.gravityKeeper = cellarfeestestutil.NewMockGravityKeeper(ctrl) suite.auctionKeeper = cellarfeestestutil.NewMockAuctionKeeper(ctrl) suite.ctx = ctx @@ -68,8 +67,8 @@ func (suite *KeeperTestSuite) SetupTest() { tkey, ) - params.Subspace(cellarfeesTypes.ModuleName) - subSpace, found := params.GetSubspace(cellarfeesTypes.ModuleName) + params.Subspace(cellarfeestypes.ModuleName) + subSpace, found := params.GetSubspace(cellarfeestypes.ModuleName) suite.Assertions.True(found) suite.cellarfeesKeeper = NewKeeper( @@ -80,15 +79,14 @@ func (suite *KeeperTestSuite) SetupTest() { suite.bankKeeper, suite.mintKeeper, suite.corkKeeper, - suite.gravityKeeper, suite.auctionKeeper, ) - cellarfeesTypes.RegisterInterfaces(encCfg.InterfaceRegistry) + cellarfeestypesv2.RegisterInterfaces(encCfg.InterfaceRegistry) queryHelper := baseapp.NewQueryServerTestHelper(ctx, encCfg.InterfaceRegistry) - cellarfeesTypes.RegisterQueryServer(queryHelper, suite.cellarfeesKeeper) - queryClient := cellarfeesTypes.NewQueryClient(queryHelper) + cellarfeestypesv2.RegisterQueryServer(queryHelper, suite.cellarfeesKeeper) + queryClient := cellarfeestypesv2.NewQueryClient(queryHelper) suite.queryClient = queryClient suite.encCfg = encCfg @@ -98,16 +96,6 @@ func TestKeeperTestSuite(t *testing.T) { suite.Run(t, new(KeeperTestSuite)) } -func (suite *KeeperTestSuite) TestKeeperGettingSettingFeeAccrualCounters() { - ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper - require := suite.Require() - - expected := cellarfeesTypes.DefaultFeeAccrualCounters() - cellarfeesKeeper.SetFeeAccrualCounters(ctx, expected) - - require.Equal(expected, cellarfeesKeeper.GetFeeAccrualCounters(ctx)) -} - func (suite *KeeperTestSuite) TestKeeperGettingSettingLastRewardSupplyPeak() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper require := suite.Require() @@ -127,7 +115,7 @@ func (suite *KeeperTestSuite) TestGetAPY() { lastPeak := sdk.NewInt(10_000_000) cellarfeesKeeper.SetLastRewardSupplyPeak(ctx, lastPeak) - cellarfeesParams := cellarfeesTypes.DefaultParams() + cellarfeesParams := cellarfeestypesv2.DefaultParams() cellarfeesParams.RewardEmissionPeriod = 10 cellarfeesKeeper.SetParams(ctx, cellarfeesParams) suite.mintKeeper.EXPECT().GetParams(ctx).Return(minttypes.Params{ diff --git a/x/cellarfees/keeper/query_server.go b/x/cellarfees/keeper/query_server.go index d78e3713a..18a3e701e 100644 --- a/x/cellarfees/keeper/query_server.go +++ b/x/cellarfees/keeper/query_server.go @@ -4,7 +4,7 @@ import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + types "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) @@ -25,7 +25,6 @@ func (k Keeper) QueryModuleAccounts(c context.Context, req *types.QueryModuleAcc if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } - return &types.QueryModuleAccountsResponse{ FeesAddress: k.GetFeesAccount(sdk.UnwrapSDKContext(c)).GetAddress().String(), }, nil @@ -39,16 +38,76 @@ func (k Keeper) QueryLastRewardSupplyPeak(c context.Context, req *types.QueryLas return &types.QueryLastRewardSupplyPeakResponse{LastRewardSupplyPeak: k.GetLastRewardSupplyPeak(sdk.UnwrapSDKContext(c))}, nil } -func (k Keeper) QueryFeeAccrualCounters(c context.Context, req *types.QueryFeeAccrualCountersRequest) (*types.QueryFeeAccrualCountersResponse, error) { +func (k Keeper) QueryAPY(c context.Context, _ *types.QueryAPYRequest) (*types.QueryAPYResponse, error) { + return &types.QueryAPYResponse{ + Apy: k.GetAPY(sdk.UnwrapSDKContext(c)).String(), + }, nil +} + +func (k Keeper) QueryFeeTokenBalance(c context.Context, req *types.QueryFeeTokenBalanceRequest) (*types.QueryFeeTokenBalanceResponse, error) { + ctx := sdk.UnwrapSDKContext(c) if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } - return &types.QueryFeeAccrualCountersResponse{FeeAccrualCounters: k.GetFeeAccrualCounters(sdk.UnwrapSDKContext(c))}, nil + if req.Denom == "" { + return nil, status.Error(codes.InvalidArgument, "denom cannot be empty") + } + + balance, found := k.GetFeeBalance(ctx, req.Denom) + if !found { + return nil, status.Error(codes.NotFound, "fee token balance not found") + } + + tokenPrice, found := k.auctionKeeper.GetTokenPrice(ctx, req.Denom) + if !found { + return nil, status.Error(codes.NotFound, "token price not found") + } + + totalUsdValue, err := k.GetBalanceUsdValue(ctx, balance, tokenPrice).Float64() + if err != nil { + return nil, status.Error(codes.Internal, "failed to convert usd value to float") + } + + feeTokenBalance := types.FeeTokenBalance{ + Balance: balance, + UsdValue: totalUsdValue, + } + + return &types.QueryFeeTokenBalanceResponse{ + Balance: &feeTokenBalance, + }, nil } -func (k Keeper) QueryAPY(c context.Context, _ *types.QueryAPYRequest) (*types.QueryAPYResponse, error) { - return &types.QueryAPYResponse{ - Apy: k.GetAPY(sdk.UnwrapSDKContext(c)).String(), +func (k Keeper) QueryFeeTokenBalances(c context.Context, _ *types.QueryFeeTokenBalancesRequest) (*types.QueryFeeTokenBalancesResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + feeBalances := make([]*types.FeeTokenBalance, 0) + + balances := k.bankKeeper.GetAllBalances(ctx, k.GetFeesAccount(ctx).GetAddress()) + for _, balance := range balances { + if balance.IsZero() { + continue + } + + tokenPrice, found := k.auctionKeeper.GetTokenPrice(ctx, balance.Denom) + if !found { + continue + } + + totalUsdValue, err := k.GetBalanceUsdValue(ctx, balance, tokenPrice).Float64() + if err != nil { + return nil, status.Error(codes.Internal, "failed to convert usd value to float") + } + + feeTokenBalance := types.FeeTokenBalance{ + Balance: balance, + UsdValue: totalUsdValue, + } + + feeBalances = append(feeBalances, &feeTokenBalance) + } + + return &types.QueryFeeTokenBalancesResponse{ + Balances: feeBalances, }, nil } diff --git a/x/cellarfees/keeper/query_server_test.go b/x/cellarfees/keeper/query_server_test.go index f4cb0c143..277f0b68f 100644 --- a/x/cellarfees/keeper/query_server_test.go +++ b/x/cellarfees/keeper/query_server_test.go @@ -2,10 +2,15 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/golang/mock/gomock" "github.com/peggyjv/sommelier/v7/app/params" - cellarfeesTypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + auctiontypes "github.com/peggyjv/sommelier/v7/x/auction/types" + cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) func (suite *KeeperTestSuite) TestQueriesHappyPath() { @@ -13,47 +18,27 @@ func (suite *KeeperTestSuite) TestQueriesHappyPath() { require := suite.Require() // mock - suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeesTypes.ModuleName).Return(feesAccount) + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount) - cellarfeesParams := cellarfeesTypes.DefaultParams() + cellarfeesParams := cellarfeestypesv2.DefaultParams() cellarfeesKeeper.SetParams(ctx, cellarfeesParams) expectedLastRewardSupplyPeakAmount := sdk.NewInt(25000) cellarfeesKeeper.SetLastRewardSupplyPeak(ctx, expectedLastRewardSupplyPeakAmount) - - expectedFeeAccrualCounters := cellarfeesTypes.FeeAccrualCounters{ - Counters: []cellarfeesTypes.FeeAccrualCounter{ - { - Denom: "denom1", - Count: 2, - }, - { - Denom: "denom2", - Count: 0, - }, - }, - } - cellarfeesKeeper.SetFeeAccrualCounters(ctx, expectedFeeAccrualCounters) - // QueryParams - paramsResponse, err := cellarfeesKeeper.QueryParams(sdk.WrapSDKContext(ctx), &cellarfeesTypes.QueryParamsRequest{}) + paramsResponse, err := cellarfeesKeeper.QueryParams(sdk.WrapSDKContext(ctx), &cellarfeestypesv2.QueryParamsRequest{}) require.Nil(err) - require.Equal(&cellarfeesTypes.QueryParamsResponse{Params: cellarfeesParams}, paramsResponse) + require.Equal(&cellarfeestypesv2.QueryParamsResponse{Params: cellarfeesParams}, paramsResponse) // QueryModuleAccounts - moduleAccountsResponse, err := cellarfeesKeeper.QueryModuleAccounts(sdk.WrapSDKContext(ctx), &cellarfeesTypes.QueryModuleAccountsRequest{}) + moduleAccountsResponse, err := cellarfeesKeeper.QueryModuleAccounts(sdk.WrapSDKContext(ctx), &cellarfeestypesv2.QueryModuleAccountsRequest{}) require.Nil(err) - require.Equal(&cellarfeesTypes.QueryModuleAccountsResponse{FeesAddress: feesAccount.GetAddress().String()}, moduleAccountsResponse) + require.Equal(&cellarfeestypesv2.QueryModuleAccountsResponse{FeesAddress: feesAccount.GetAddress().String()}, moduleAccountsResponse) // QueryLastRewardSupplyPeak - lastRewardSupplyPeakResponse, err := cellarfeesKeeper.QueryLastRewardSupplyPeak(sdk.WrapSDKContext(ctx), &cellarfeesTypes.QueryLastRewardSupplyPeakRequest{}) + lastRewardSupplyPeakResponse, err := cellarfeesKeeper.QueryLastRewardSupplyPeak(sdk.WrapSDKContext(ctx), &cellarfeestypesv2.QueryLastRewardSupplyPeakRequest{}) require.Nil(err) - require.Equal(&cellarfeesTypes.QueryLastRewardSupplyPeakResponse{LastRewardSupplyPeak: expectedLastRewardSupplyPeakAmount}, lastRewardSupplyPeakResponse) - - // QueryFeeAccrualCounters - feeAccrualCountersResponse, err := cellarfeesKeeper.QueryFeeAccrualCounters(sdk.WrapSDKContext(ctx), &cellarfeesTypes.QueryFeeAccrualCountersRequest{}) - require.Nil(err) - require.Equal(&cellarfeesTypes.QueryFeeAccrualCountersResponse{FeeAccrualCounters: expectedFeeAccrualCounters}, feeAccrualCountersResponse) + require.Equal(&cellarfeestypesv2.QueryLastRewardSupplyPeakResponse{LastRewardSupplyPeak: expectedLastRewardSupplyPeakAmount}, lastRewardSupplyPeakResponse) // QueryAPY blocksPerYear := 365 * 6 @@ -74,9 +59,86 @@ func (suite *KeeperTestSuite) TestQueriesHappyPath() { suite.mintKeeper.EXPECT().BondedRatio(ctx).Return(bondedRatio) suite.mintKeeper.EXPECT().StakingTokenSupply(ctx).Return(stakingTotalSupply) - APYResult, err := cellarfeesKeeper.QueryAPY(sdk.WrapSDKContext(ctx), &cellarfeesTypes.QueryAPYRequest{}) + APYResult, err := cellarfeesKeeper.QueryAPY(sdk.WrapSDKContext(ctx), &cellarfeestypesv2.QueryAPYRequest{}) require.Nil(err) require.Equal("0.004380000000000000", APYResult.Apy) + + // QueryFeeTokenBalance + denom := feeDenom + amount := sdk.NewInt(1000000) + suite.bankKeeper.EXPECT().GetDenomMetaData(ctx, denom).Return(banktypes.Metadata{}, true) + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount).Times(1) + suite.auctionKeeper.EXPECT().GetTokenPrice(ctx, denom).Return(auctiontypes.TokenPrice{ + Exponent: 6, + UsdPrice: sdk.NewDec(100), + }, true) + suite.bankKeeper.EXPECT().GetAllBalances(ctx, feesAccount.GetAddress()).Return(sdk.Coins{sdk.NewCoin(denom, amount)}) + + expectedFeeTokenBalance := cellarfeestypesv2.FeeTokenBalance{ + Balance: sdk.NewCoin(denom, amount), + UsdValue: 100.00, + } + feeTokenBalanceResponse, err := cellarfeesKeeper.QueryFeeTokenBalance(sdk.WrapSDKContext(ctx), &cellarfeestypesv2.QueryFeeTokenBalanceRequest{ + Denom: denom, + }) + require.Nil(err) + require.Equal(&expectedFeeTokenBalance, feeTokenBalanceResponse.Balance) + + // QueryFeeTokenBalances + suite.SetupTest() + ctx, cellarfeesKeeper = suite.ctx, suite.cellarfeesKeeper + denom1 := "testdenom1" + denom2 := "testdenom2" + denom3 := "testdenom3" + amount1 := sdk.NewInt(1000000) + amount2 := sdk.NewInt(2000000) + amount3 := sdk.NewInt(3000000) + balance1 := sdk.NewCoin(denom1, amount1) + balance2 := sdk.NewCoin(denom2, amount2) + balance3 := sdk.NewCoin(denom3, amount3) + tokenPrice1 := auctiontypes.TokenPrice{ + Exponent: 6, + UsdPrice: sdk.NewDec(100), + Denom: denom1, + } + tokenPrice2 := auctiontypes.TokenPrice{ + Exponent: 12, + UsdPrice: sdk.NewDec(50), + Denom: denom2, + } + tokenPrice3 := auctiontypes.TokenPrice{ + Exponent: 18, + UsdPrice: sdk.NewDec(25), + Denom: denom3, + } + tokenPrices := []*auctiontypes.TokenPrice{&tokenPrice1, &tokenPrice2, &tokenPrice3} + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount).Times(3) + suite.bankKeeper.EXPECT().GetAllBalances(ctx, feesAccount.GetAddress()).Return(sdk.Coins{balance1, balance2, balance3}).Times(3) + suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), denom1).Return(balance1) + suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), denom2).Return(balance2) + suite.bankKeeper.EXPECT().GetBalance(ctx, feesAccount.GetAddress(), denom3).Return(balance3) + suite.auctionKeeper.EXPECT().GetTokenPrice(ctx, denom1).Return(*tokenPrices[0], true) + suite.auctionKeeper.EXPECT().GetTokenPrice(ctx, denom2).Return(*tokenPrices[1], true) + suite.auctionKeeper.EXPECT().GetTokenPrice(ctx, denom3).Return(*tokenPrices[2], true) + + expectedFeeTokenBalances := []*cellarfeestypesv2.FeeTokenBalance{ + { + Balance: balance1, + UsdValue: cellarfeesKeeper.GetBalanceUsdValue(ctx, balance1, tokenPrice1).MustFloat64(), + }, + { + Balance: balance2, + UsdValue: cellarfeesKeeper.GetBalanceUsdValue(ctx, balance2, tokenPrice2).MustFloat64(), + }, + { + Balance: balance3, + UsdValue: cellarfeesKeeper.GetBalanceUsdValue(ctx, balance3, tokenPrice3).MustFloat64(), + }, + } + + feeTokenBalancesResponse, err := cellarfeesKeeper.QueryFeeTokenBalances(sdk.WrapSDKContext(ctx), &cellarfeestypesv2.QueryFeeTokenBalancesRequest{}) + require.Nil(err) + require.Equal(expectedFeeTokenBalances, feeTokenBalancesResponse.Balances) } func (suite *KeeperTestSuite) TestQueriesUnhappyPath() { @@ -98,8 +160,30 @@ func (suite *KeeperTestSuite) TestQueriesUnhappyPath() { require.Nil(lastRewardSupplyPeakResponse) require.NotNil(err) - // QueryFeeAccrualCounters - feeAccrualCountersResponse, err := cellarfeesKeeper.QueryFeeAccrualCounters(sdk.WrapSDKContext(ctx), nil) - require.Nil(feeAccrualCountersResponse) + // QueryFeeTokenBalance + denom := feeDenom + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, cellarfeestypes.ModuleName).Return(feesAccount) + suite.bankKeeper.EXPECT().GetAllBalances(ctx, feesAccount.GetAddress()).Return(sdk.Coins{sdk.NewCoin(denom, sdk.NewInt(1000000))}) + suite.auctionKeeper.EXPECT().GetTokenPrice(ctx, denom).Return(auctiontypes.TokenPrice{}, false).Times(2) + feeTokenBalanceResponse, err := cellarfeesKeeper.QueryFeeTokenBalance(sdk.WrapSDKContext(ctx), nil) + require.Nil(feeTokenBalanceResponse) + require.NotNil(err) + require.Equal(status.Code(err), codes.InvalidArgument) + + feeTokenBalanceResponse, err = cellarfeesKeeper.QueryFeeTokenBalance(sdk.WrapSDKContext(ctx), &cellarfeestypesv2.QueryFeeTokenBalanceRequest{}) + require.Nil(feeTokenBalanceResponse) + require.NotNil(err) + require.Equal(status.Code(err), codes.InvalidArgument) + + feeTokenBalanceResponse, err = cellarfeesKeeper.QueryFeeTokenBalance(sdk.WrapSDKContext(ctx), &cellarfeestypesv2.QueryFeeTokenBalanceRequest{Denom: denom}) + require.Nil(feeTokenBalanceResponse) + require.NotNil(err) + require.Equal(status.Code(err), codes.NotFound) + + suite.accountKeeper.EXPECT().GetModuleAccount(ctx, gomock.Any()).Return(feesAccount) + suite.bankKeeper.EXPECT().GetAllBalances(ctx, feesAccount.GetAddress()).Return(sdk.Coins{sdk.NewCoin(denom, sdk.NewInt(1000000))}) + feeTokenBalanceResponse, err = cellarfeesKeeper.QueryFeeTokenBalance(sdk.WrapSDKContext(ctx), &cellarfeestypesv2.QueryFeeTokenBalanceRequest{Denom: denom}) + require.Nil(feeTokenBalanceResponse) require.NotNil(err) + require.Equal(status.Code(err), codes.NotFound) } diff --git a/x/cellarfees/module.go b/x/cellarfees/module.go index 139029b07..01bb1bec0 100644 --- a/x/cellarfees/module.go +++ b/x/cellarfees/module.go @@ -15,6 +15,7 @@ import ( "github.com/peggyjv/sommelier/v7/x/cellarfees/client/cli" "github.com/peggyjv/sommelier/v7/x/cellarfees/keeper" "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + typesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" ) @@ -38,13 +39,13 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} // DefaultGenesis returns default genesis state as raw bytes for the cellarfees // module. func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - gs := types.DefaultGenesisState() + gs := typesv2.DefaultGenesisState() return cdc.MustMarshalJSON(&gs) } // ValidateGenesis performs genesis state validation for the cellarfees module. func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { - var gs types.GenesisState + var gs typesv2.GenesisState if err := cdc.UnmarshalJSON(bz, &gs); err != nil { return err } @@ -64,12 +65,12 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the cellarfees module. // also implements AppModuleBasic func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) + typesv2.RegisterQueryHandlerClient(context.Background(), mux, typesv2.NewQueryClient(clientCtx)) } // RegisterInterfaces implements AppModuleBasic func (b AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { - types.RegisterInterfaces(registry) + typesv2.RegisterInterfaces(registry) } // AppModule implements an application module for the cellarfees module. @@ -81,13 +82,12 @@ type AppModule struct { bankKeeper types.BankKeeper mintKeeper types.MintKeeper corkKeeper types.CorkKeeper - gravityKeeper types.GravityKeeper auctionKeeper types.AuctionKeeper } // NewAppModule creates a new AppModule object func NewAppModule(keeper keeper.Keeper, cdc codec.Codec, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, - mintKeeper types.MintKeeper, corkKeeper types.CorkKeeper, gravityKeeper types.GravityKeeper, auctionKeeper types.AuctionKeeper) AppModule { + mintKeeper types.MintKeeper, corkKeeper types.CorkKeeper, auctionKeeper types.AuctionKeeper) AppModule { return AppModule{ AppModuleBasic: AppModuleBasic{}, keeper: keeper, @@ -96,7 +96,6 @@ func NewAppModule(keeper keeper.Keeper, cdc codec.Codec, accountKeeper types.Acc bankKeeper: bankKeeper, mintKeeper: mintKeeper, corkKeeper: corkKeeper, - gravityKeeper: gravityKeeper, auctionKeeper: auctionKeeper, } } @@ -130,12 +129,12 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.We // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { //types.RegisterMsgServer(cfg.MsgServer(), am.keeper) - types.RegisterQueryServer(cfg.QueryServer(), am.keeper) + typesv2.RegisterQueryServer(cfg.QueryServer(), am.keeper) } // InitGenesis performs genesis initialization for the cellarfees module. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { - var genesisState types.GenesisState + var genesisState typesv2.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) am.keeper.InitGenesis(ctx, genesisState) diff --git a/x/cellarfees/testutil/expected_keepers_mocks.go b/x/cellarfees/testutil/expected_keepers_mocks.go index e38696d5b..3ea8d6a1f 100644 --- a/x/cellarfees/testutil/expected_keepers_mocks.go +++ b/x/cellarfees/testutil/expected_keepers_mocks.go @@ -7,12 +7,14 @@ package mock_types import ( reflect "reflect" + math "cosmossdk.io/math" types "github.com/cosmos/cosmos-sdk/types" types0 "github.com/cosmos/cosmos-sdk/x/auth/types" - types1 "github.com/cosmos/cosmos-sdk/x/mint/types" + types1 "github.com/cosmos/cosmos-sdk/x/bank/types" + types2 "github.com/cosmos/cosmos-sdk/x/mint/types" common "github.com/ethereum/go-ethereum/common" gomock "github.com/golang/mock/gomock" - types2 "github.com/peggyjv/sommelier/v7/x/auction/types" + types3 "github.com/peggyjv/sommelier/v7/x/auction/types" ) // MockAccountKeeper is a mock of AccountKeeper interface. @@ -145,6 +147,21 @@ func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) * return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBalance", reflect.TypeOf((*MockBankKeeper)(nil).GetBalance), ctx, addr, denom) } +// GetDenomMetaData mocks base method. +func (m *MockBankKeeper) GetDenomMetaData(ctx types.Context, denom string) (types1.Metadata, bool) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetDenomMetaData", ctx, denom) + ret0, _ := ret[0].(types1.Metadata) + ret1, _ := ret[1].(bool) + return ret0, ret1 +} + +// GetDenomMetaData indicates an expected call of GetDenomMetaData. +func (mr *MockBankKeeperMockRecorder) GetDenomMetaData(ctx, denom interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDenomMetaData", reflect.TypeOf((*MockBankKeeper)(nil).GetDenomMetaData), ctx, denom) +} + // LockedCoins mocks base method. func (m *MockBankKeeper) LockedCoins(ctx types.Context, addr types.AccAddress) types.Coins { m.ctrl.T.Helper() @@ -266,44 +283,6 @@ func (mr *MockCorkKeeperMockRecorder) HasCellarID(ctx, address interface{}) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasCellarID", reflect.TypeOf((*MockCorkKeeper)(nil).HasCellarID), ctx, address) } -// MockGravityKeeper is a mock of GravityKeeper interface. -type MockGravityKeeper struct { - ctrl *gomock.Controller - recorder *MockGravityKeeperMockRecorder -} - -// MockGravityKeeperMockRecorder is the mock recorder for MockGravityKeeper. -type MockGravityKeeperMockRecorder struct { - mock *MockGravityKeeper -} - -// NewMockGravityKeeper creates a new mock instance. -func NewMockGravityKeeper(ctrl *gomock.Controller) *MockGravityKeeper { - mock := &MockGravityKeeper{ctrl: ctrl} - mock.recorder = &MockGravityKeeperMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockGravityKeeper) EXPECT() *MockGravityKeeperMockRecorder { - return m.recorder -} - -// ERC20ToDenomLookup mocks base method. -func (m *MockGravityKeeper) ERC20ToDenomLookup(ctx types.Context, tokenContract common.Address) (bool, string) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ERC20ToDenomLookup", ctx, tokenContract) - ret0, _ := ret[0].(bool) - ret1, _ := ret[1].(string) - return ret0, ret1 -} - -// ERC20ToDenomLookup indicates an expected call of ERC20ToDenomLookup. -func (mr *MockGravityKeeperMockRecorder) ERC20ToDenomLookup(ctx, tokenContract interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ERC20ToDenomLookup", reflect.TypeOf((*MockGravityKeeper)(nil).ERC20ToDenomLookup), ctx, tokenContract) -} - // MockAuctionKeeper is a mock of AuctionKeeper interface. type MockAuctionKeeper struct { ctrl *gomock.Controller @@ -342,10 +321,10 @@ func (mr *MockAuctionKeeperMockRecorder) BeginAuction(ctx, startingTokensForSale } // GetActiveAuctions mocks base method. -func (m *MockAuctionKeeper) GetActiveAuctions(ctx types.Context) []*types2.Auction { +func (m *MockAuctionKeeper) GetActiveAuctions(ctx types.Context) []*types3.Auction { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetActiveAuctions", ctx) - ret0, _ := ret[0].([]*types2.Auction) + ret0, _ := ret[0].([]*types3.Auction) return ret0 } @@ -355,6 +334,35 @@ func (mr *MockAuctionKeeperMockRecorder) GetActiveAuctions(ctx interface{}) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActiveAuctions", reflect.TypeOf((*MockAuctionKeeper)(nil).GetActiveAuctions), ctx) } +// GetTokenPrice mocks base method. +func (m *MockAuctionKeeper) GetTokenPrice(ctx types.Context, denom string) (types3.TokenPrice, bool) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetTokenPrice", ctx, denom) + ret0, _ := ret[0].(types3.TokenPrice) + ret1, _ := ret[1].(bool) + return ret0, ret1 +} + +// GetTokenPrice indicates an expected call of GetTokenPrice. +func (mr *MockAuctionKeeperMockRecorder) GetTokenPrice(ctx, denom interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTokenPrice", reflect.TypeOf((*MockAuctionKeeper)(nil).GetTokenPrice), ctx, denom) +} + +// GetTokenPrices mocks base method. +func (m *MockAuctionKeeper) GetTokenPrices(ctx types.Context) []*types3.TokenPrice { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetTokenPrices", ctx) + ret0, _ := ret[0].([]*types3.TokenPrice) + return ret0 +} + +// GetTokenPrices indicates an expected call of GetTokenPrices. +func (mr *MockAuctionKeeperMockRecorder) GetTokenPrices(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTokenPrices", reflect.TypeOf((*MockAuctionKeeper)(nil).GetTokenPrices), ctx) +} + // MockMintKeeper is a mock of MintKeeper interface. type MockMintKeeper struct { ctrl *gomock.Controller @@ -393,10 +401,10 @@ func (mr *MockMintKeeperMockRecorder) BondedRatio(ctx interface{}) *gomock.Call } // GetParams mocks base method. -func (m *MockMintKeeper) GetParams(ctx types.Context) types1.Params { +func (m *MockMintKeeper) GetParams(ctx types.Context) types2.Params { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetParams", ctx) - ret0, _ := ret[0].(types1.Params) + ret0, _ := ret[0].(types2.Params) return ret0 } @@ -407,10 +415,10 @@ func (mr *MockMintKeeperMockRecorder) GetParams(ctx interface{}) *gomock.Call { } // StakingTokenSupply mocks base method. -func (m *MockMintKeeper) StakingTokenSupply(ctx types.Context) types.Int { +func (m *MockMintKeeper) StakingTokenSupply(ctx types.Context) math.Int { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StakingTokenSupply", ctx) - ret0, _ := ret[0].(types.Int) + ret0, _ := ret[0].(math.Int) return ret0 } diff --git a/x/cellarfees/types/cellarfees.go b/x/cellarfees/types/cellarfees.go deleted file mode 100644 index 59e54f938..000000000 --- a/x/cellarfees/types/cellarfees.go +++ /dev/null @@ -1,68 +0,0 @@ -package types - -import ( - "sort" - "strings" -) - -func DefaultFeeAccrualCounters() FeeAccrualCounters { - return FeeAccrualCounters{ - Counters: []FeeAccrualCounter{}, - } -} - -// Implementing sort.Interface (see https://pkg.go.dev/sort#Interface) -func (f FeeAccrualCounters) Len() int { - return len(f.Counters) -} - -func (f FeeAccrualCounters) Less(i, j int) bool { - return strings.Compare(f.Counters[i].Denom, f.Counters[j].Denom) == -1 -} - -func (f FeeAccrualCounters) Swap(i, j int) { - f.Counters[i], f.Counters[j] = f.Counters[j], f.Counters[i] -} - -// WARNING: If editing these methods, be aware that insert() doesn't check if the denom is already -// present. Duplicate denom entries can result in fees not being auctioned. -func (f *FeeAccrualCounters) insertCounter(denom string, count uint64) { - f.Counters = append(f.Counters, FeeAccrualCounter{Denom: denom, Count: count}) - sort.Sort(f) -} - -// Increment fee accrual counter for denom. If it isn't present, append it to the counters -// slice and increment to 1. -func (f *FeeAccrualCounters) IncrementCounter(denom string) uint64 { - found := false - var count uint64 - for i, k := range f.Counters { - if k.Denom == denom { - found = true - f.Counters[i].Count++ - count = f.Counters[i].Count - break - } - } - if !found { - f.insertCounter(denom, 1) - count = 1 - } - - return count -} - -// Sets the denom's fee accrual counter to zero -func (f *FeeAccrualCounters) ResetCounter(denom string) { - found := false - for i, k := range f.Counters { - if k.Denom == denom { - found = true - f.Counters[i].Count = 0 - break - } - } - if !found { - f.insertCounter(denom, 0) - } -} diff --git a/x/cellarfees/types/cellarfees_test.go b/x/cellarfees/types/cellarfees_test.go deleted file mode 100644 index bc466e716..000000000 --- a/x/cellarfees/types/cellarfees_test.go +++ /dev/null @@ -1,65 +0,0 @@ -package types - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func TestFeeAccrualCounters(t *testing.T) { - expected := FeeAccrualCounters{ - Counters: []FeeAccrualCounter{ - { - Denom: "uatom", - Count: 1, - }, - { - Denom: "uist", - Count: 0, - }, - { - Denom: "uusdc", - Count: 2, - }, - }, - } - - actual := DefaultFeeAccrualCounters() - - require.Equal(t, 0, len(actual.Counters)) - - // uist: 0 - actual.ResetCounter("uist") - require.Equal(t, 1, len(actual.Counters)) - require.Equal(t, uint64(0), actual.Counters[0].Count) - - // uist: 0 - // uusdc: 1 - actual.IncrementCounter("uusdc") - require.Equal(t, len(actual.Counters), 2) - require.Equal(t, "uusdc", actual.Counters[1].Denom) - require.Equal(t, uint64(1), actual.Counters[1].Count) - - // uist: 0 - // uusdc: 2 - actual.IncrementCounter("uusdc") - - // uatom: 1 - // uist: 0 - // uusdc: 2 - actual.IncrementCounter("uatom") - require.Equal(t, len(actual.Counters), 3) - require.Equal(t, "uatom", actual.Counters[0].Denom) - require.Equal(t, uint64(1), actual.Counters[0].Count) - require.Equal(t, expected, actual) - - // uatom: 1 - // uist: 0 - // uusdc: 0 - actual.ResetCounter("uusdc") - - // uatom: 1 - // uist: 0 - // uusdc: 1 - require.Equal(t, uint64(1), actual.IncrementCounter("uusdc")) -} diff --git a/x/cellarfees/types/errors.go b/x/cellarfees/types/errors.go index 8e55258b6..8e587e9b1 100644 --- a/x/cellarfees/types/errors.go +++ b/x/cellarfees/types/errors.go @@ -13,4 +13,5 @@ var ( ErrInvalidFeeAccrualCounters = errorsmod.Register(ModuleName, 6, "invalid fee accrual counters") ErrInvalidLastRewardSupplyPeak = errorsmod.Register(ModuleName, 7, "invalid last reward supply peak") ErrInvalidAuctionInterval = errorsmod.Register(ModuleName, 8, "invalid interval blocks between auctions") + ErrInvalidAuctionThresholdUsdValue = errorsmod.Register(ModuleName, 9, "invalid auction threshold USD value") ) diff --git a/x/cellarfees/types/expected_keepers.go b/x/cellarfees/types/expected_keepers.go index 3a5912fdb..e1935a0bf 100644 --- a/x/cellarfees/types/expected_keepers.go +++ b/x/cellarfees/types/expected_keepers.go @@ -4,6 +4,7 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/ethereum/go-ethereum/common" auctiontypes "github.com/peggyjv/sommelier/v7/x/auction/types" @@ -21,6 +22,7 @@ type AccountKeeper interface { type BankKeeper interface { GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin + GetDenomMetaData(ctx sdk.Context, denom string) (banktypes.Metadata, bool) LockedCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins @@ -37,14 +39,11 @@ type CorkKeeper interface { HasCellarID(ctx sdk.Context, address common.Address) (found bool) } -// GravityKeeper defines the expected gravity keeper methods -type GravityKeeper interface { - ERC20ToDenomLookup(ctx sdk.Context, tokenContract common.Address) (bool, string) -} - // AuctionKeeper defines the expected auction keeper methods type AuctionKeeper interface { GetActiveAuctions(ctx sdk.Context) []*auctiontypes.Auction + GetTokenPrice(ctx sdk.Context, denom string) (auctiontypes.TokenPrice, bool) + GetTokenPrices(ctx sdk.Context) []*auctiontypes.TokenPrice BeginAuction(ctx sdk.Context, startingTokensForSale sdk.Coin, initialPriceDecreaseRate sdk.Dec, diff --git a/x/cellarfees/types/genesis.go b/x/cellarfees/types/genesis.go deleted file mode 100644 index 774a3274f..000000000 --- a/x/cellarfees/types/genesis.go +++ /dev/null @@ -1,44 +0,0 @@ -package types - -import ( - "sort" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -const DefaultParamspace = ModuleName - -// DefaultGenesisState get raw genesis raw message for testing -func DefaultGenesisState() GenesisState { - return GenesisState{ - Params: DefaultParams(), - FeeAccrualCounters: DefaultFeeAccrualCounters(), - LastRewardSupplyPeak: sdk.ZeroInt(), - } -} - -// Validate performs a basic stateless validation of the genesis fields. -func (gs GenesisState) Validate() error { - if err := gs.Params.ValidateBasic(); err != nil { - return err - } - - if gs.FeeAccrualCounters.Counters == nil { - return ErrInvalidFeeAccrualCounters.Wrap("counters cannot be nil!") - } - - counters := gs.FeeAccrualCounters - counters.Counters = append([]FeeAccrualCounter{}, gs.FeeAccrualCounters.Counters...) - sort.Sort(counters) - for i := range counters.Counters { - if counters.Counters[i].Denom != gs.FeeAccrualCounters.Counters[i].Denom { - return ErrInvalidFeeAccrualCounters.Wrapf("counters are unsorted! expected: %T, actual: %T", counters.Counters, gs.FeeAccrualCounters.Counters) - } - } - - if gs.LastRewardSupplyPeak.LT(sdk.ZeroInt()) { - return ErrInvalidLastRewardSupplyPeak.Wrap("last reward supply peak cannot be less than zero!") - } - - return nil -} diff --git a/x/cellarfees/types/keys.go b/x/cellarfees/types/keys.go index 3495e8bc0..db7b6329a 100644 --- a/x/cellarfees/types/keys.go +++ b/x/cellarfees/types/keys.go @@ -22,6 +22,7 @@ const ( LastRewardSupplyPeakKey // key for storing fee accrual counts + // DEPRECATED FeeAccrualCountersKey ) @@ -29,8 +30,3 @@ const ( func GetLastRewardSupplyPeakKey() []byte { return []byte{LastRewardSupplyPeakKey} } - -// GetFeeAccrualCountersKey returns the key prefix -func GetFeeAccrualCountersKey() []byte { - return []byte{FeeAccrualCountersKey} -} diff --git a/x/cellarfees/types/cellarfees.pb.go b/x/cellarfees/types/v1/cellarfees.pb.go similarity index 98% rename from x/cellarfees/types/cellarfees.pb.go rename to x/cellarfees/types/v1/cellarfees.pb.go index 96be482c3..2dd2a5f80 100644 --- a/x/cellarfees/types/cellarfees.pb.go +++ b/x/cellarfees/types/v1/cellarfees.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: cellarfees/v1/cellarfees.proto -package types +package v1 import ( fmt "fmt" @@ -137,12 +137,12 @@ var fileDescriptor_34c89ca12b610c1b = []byte{ 0x90, 0x60, 0x52, 0x60, 0xd4, 0x60, 0x09, 0x82, 0x70, 0x94, 0x22, 0xb8, 0x84, 0x30, 0x0c, 0x28, 0x16, 0x72, 0xe2, 0xe2, 0x48, 0x86, 0xb2, 0x25, 0x18, 0x15, 0x98, 0x35, 0xb8, 0x8d, 0x14, 0xf4, 0x50, 0x9c, 0xa3, 0x87, 0xa1, 0xc9, 0x89, 0xe5, 0xc4, 0x3d, 0x79, 0x86, 0x20, 0xb8, 0x3e, 0x27, - 0x9f, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, - 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x32, 0x4a, 0xcf, 0x2c, 0xc9, + 0xff, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, + 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x32, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x48, 0x4d, 0x4f, 0xaf, 0xcc, 0x2a, 0xd3, 0x2f, 0xce, 0xcf, 0xcd, 0x4d, 0xcd, 0xc9, 0x4c, 0x2d, 0xd2, 0x2f, 0x33, 0xd7, 0xaf, 0x40, 0x0a, 0x0d, - 0xfd, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0x7f, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, - 0xff, 0x9f, 0x35, 0xe6, 0x97, 0x36, 0x01, 0x00, 0x00, + 0xfd, 0x92, 0xca, 0x02, 0x70, 0x08, 0x25, 0xb1, 0x81, 0xbd, 0x6c, 0x0c, 0x08, 0x00, 0x00, 0xff, + 0xff, 0xae, 0x5f, 0x26, 0x62, 0x39, 0x01, 0x00, 0x00, } func (m *FeeAccrualCounter) Marshal() (dAtA []byte, err error) { diff --git a/x/cellarfees/types/genesis.pb.go b/x/cellarfees/types/v1/genesis.pb.go similarity index 84% rename from x/cellarfees/types/genesis.pb.go rename to x/cellarfees/types/v1/genesis.pb.go index 79758e695..9c9c6f6f7 100644 --- a/x/cellarfees/types/genesis.pb.go +++ b/x/cellarfees/types/v1/genesis.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: cellarfees/v1/genesis.proto -package types +package v1 import ( fmt "fmt" @@ -85,28 +85,28 @@ func init() { func init() { proto.RegisterFile("cellarfees/v1/genesis.proto", fileDescriptor_856aa03b4cb6eca9) } var fileDescriptor_856aa03b4cb6eca9 = []byte{ - // 326 bytes of a gzipped FileDescriptorProto + // 328 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0xd0, 0x31, 0x4f, 0x32, 0x31, 0x18, 0x07, 0xf0, 0x3b, 0xde, 0x37, 0x24, 0x9e, 0xba, 0x5c, 0x30, 0x92, 0x33, 0x29, 0xe8, 0x60, - 0x58, 0x6c, 0x03, 0x0c, 0xce, 0x62, 0xa2, 0x31, 0x71, 0x20, 0x30, 0xe9, 0x72, 0x29, 0xe5, 0xa1, - 0x22, 0x3d, 0xda, 0xb4, 0xbd, 0x53, 0x3e, 0x80, 0xbb, 0x1f, 0x8b, 0x91, 0xd1, 0x38, 0x10, 0x03, - 0x5f, 0xc4, 0xd0, 0xbb, 0x44, 0xd0, 0xa9, 0x4d, 0xfe, 0xff, 0xfe, 0x9e, 0xe6, 0x09, 0x4e, 0x18, - 0x08, 0x41, 0xf5, 0x08, 0xc0, 0x90, 0xac, 0x49, 0x38, 0x4c, 0xc1, 0x8c, 0x0d, 0x56, 0x5a, 0x5a, - 0x19, 0x1e, 0xfe, 0x84, 0x38, 0x6b, 0x46, 0x15, 0x2e, 0xb9, 0x74, 0x09, 0xd9, 0xdc, 0xf2, 0x52, - 0x14, 0xed, 0x0a, 0x8a, 0x6a, 0x9a, 0x14, 0x40, 0x84, 0x76, 0xb3, 0x2d, 0xce, 0xe5, 0x67, 0x6f, - 0xa5, 0xe0, 0xe0, 0x36, 0x1f, 0xd9, 0xb7, 0xd4, 0x42, 0xd8, 0x0e, 0xca, 0x39, 0x50, 0xf5, 0xeb,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, 0x3a, 0xae, 0xfe, 0xab, 0xfb, 0x8d, 0x9d, 0x36, 0x5e, 0x3f, + 0xfd, 0x5c, 0xd4, 0x4e, 0xf9, 0xc8, 0x3e, 0xa5, 0x7d, 0xcc, 0x64, 0x42, 0x98, 0x34, 0x89, 0x34, + 0xc5, 0x71, 0x66, 0x06, 0x63, 0x62, 0xa7, 0x0a, 0x0c, 0xbe, 0x9b, 0xd8, 0x6e, 0x65, 0xcd, 0x75, + 0x9d, 0xd6, 0x73, 0x58, 0x07, 0xe8, 0xb8, 0x7d, 0x3f, 0x5b, 0x22, 0x7f, 0xbe, 0x44, 0xfe, 0xd7, + 0x12, 0xf9, 0xef, 0x2b, 0xe4, 0xcd, 0x57, 0xc8, 0xfb, 0x58, 0x21, 0xef, 0xf1, 0x62, 0xc3, 0x55, + 0xc0, 0xf9, 0xf4, 0x39, 0x23, 0x46, 0x26, 0x09, 0x88, 0x11, 0x68, 0x92, 0x5d, 0x92, 0xd7, 0x8d, + 0xad, 0xe6, 0x73, 0x48, 0xd6, 0xec, 0x97, 0xdd, 0x7e, 0x5b, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x3f, 0x21, 0x00, 0x71, 0xdf, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/cellarfees/types/v1/params.go b/x/cellarfees/types/v1/params.go new file mode 100644 index 000000000..7f383094a --- /dev/null +++ b/x/cellarfees/types/v1/params.go @@ -0,0 +1,9 @@ +package v1 + +import "gopkg.in/yaml.v2" + +// String implements the String interface +func (p Params) String() string { + out, _ := yaml.Marshal(p) + return string(out) +} diff --git a/x/cellarfees/types/params.pb.go b/x/cellarfees/types/v1/params.pb.go similarity index 84% rename from x/cellarfees/types/params.pb.go rename to x/cellarfees/types/v1/params.pb.go index 546ca87eb..145770448 100644 --- a/x/cellarfees/types/params.pb.go +++ b/x/cellarfees/types/v1/params.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: cellarfees/v1/params.proto -package types +package v1 import ( fmt "fmt" @@ -106,30 +106,30 @@ func init() { func init() { proto.RegisterFile("cellarfees/v1/params.proto", fileDescriptor_f3220ed6f8663c98) } var fileDescriptor_f3220ed6f8663c98 = []byte{ - // 366 bytes of a gzipped FileDescriptorProto + // 367 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0x41, 0x4b, 0xf3, 0x30, 0x18, 0xc7, 0xdb, 0xbd, 0x7b, 0x07, 0x16, 0x44, 0x29, 0x43, 0xca, 0xc4, 0x6e, 0x78, 0x90, 0x79, - 0xb0, 0x61, 0x2a, 0x08, 0xde, 0x36, 0xe6, 0x41, 0xf0, 0x30, 0x86, 0x27, 0x2f, 0x21, 0x4b, 0x9f, - 0x75, 0x71, 0xe9, 0x52, 0x92, 0xac, 0xba, 0x6f, 0xe1, 0xd1, 0xa3, 0x1f, 0x67, 0xc7, 0x1d, 0xc5, - 0xc3, 0x90, 0xcd, 0x0f, 0x22, 0x4d, 0x3b, 0x1d, 0x9e, 0x5a, 0xf2, 0xff, 0xfd, 0x9e, 0xf0, 0xcf, - 0xe3, 0xd4, 0x28, 0x70, 0x4e, 0xe4, 0x10, 0x40, 0xa1, 0xb4, 0x85, 0x12, 0x22, 0x49, 0xac, 0x82, - 0x44, 0x0a, 0x2d, 0xdc, 0xdd, 0xdf, 0x2c, 0x48, 0x5b, 0xb5, 0x6a, 0x24, 0x22, 0x61, 0x12, 0x94, - 0xfd, 0xe5, 0xd0, 0xf1, 0x57, 0xc9, 0xa9, 0xf4, 0x8c, 0xe5, 0xb6, 0x9d, 0xa3, 0x21, 0x00, 0x26, - 0x94, 0xca, 0x29, 0xe1, 0x98, 0x4c, 0xa9, 0x66, 0x62, 0x82, 0xf5, 0x48, 0x82, 0x1a, 0x09, 0x1e, - 0x7a, 0x76, 0xc3, 0x6e, 0x96, 0xfb, 0xb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, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/cellarfees/types/query.pb.go b/x/cellarfees/types/v1/query.pb.go similarity index 92% rename from x/cellarfees/types/query.pb.go rename to x/cellarfees/types/v1/query.pb.go index bb0444a55..1f1f8a7dd 100644 --- a/x/cellarfees/types/query.pb.go +++ b/x/cellarfees/types/v1/query.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: cellarfees/v1/query.proto -package types +package v1 import ( context "context" @@ -439,47 +439,47 @@ func init() { func init() { proto.RegisterFile("cellarfees/v1/query.proto", fileDescriptor_6f4742d3026cf20c) } var fileDescriptor_6f4742d3026cf20c = []byte{ - // 625 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x41, 0x8f, 0xd2, 0x4c, - 0x1c, 0xc6, 0xe9, 0xfb, 0x2a, 0xd1, 0x41, 0xe3, 0x3a, 0x62, 0xd6, 0xad, 0xa4, 0x40, 0xb3, 0xd1, - 0x75, 0x13, 0x3a, 0x2c, 0x1b, 0xa3, 0x47, 0xc1, 0xc4, 0x44, 0xb3, 0x26, 0x88, 0xa7, 0xf5, 0xd2, - 0xcc, 0x96, 0xa1, 0x22, 0x6d, 0x67, 0xe8, 0xb4, 0x68, 0x13, 0xbd, 0x78, 0x31, 0xf1, 0x64, 0xe2, - 0xdd, 0xaf, 0xe0, 0xd5, 0x8f, 0xb0, 0xc7, 0x4d, 0xbc, 0x18, 0x0f, 0x1b, 0x03, 0x7e, 0x10, 0xd3, - 0xe9, 0xb0, 0xc0, 0xd2, 0x12, 0x4e, 0x34, 0xf3, 0x3c, 0xfd, 0x3f, 0xbf, 0x61, 0x9e, 0x0e, 0xd8, - 0xb2, 0x88, 0xe3, 0x60, 0xbf, 0x47, 0x08, 0x47, 0xa3, 0x3d, 0x34, 0x0c, 0x89, 0x1f, 0x19, 0xcc, - 0xa7,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0xad, 0x04, 0xe4, 0x87, 0x02, 0xb6, 0x32, 0xfb, 0x08, 0x51, 0x5a, 0xf6, 0x8a, 0x7a, 0xab, 0xf5, - 0xf5, 0x5f, 0x90, 0xc8, 0x0f, 0x05, 0x72, 0x03, 0xd6, 0x33, 0x91, 0x33, 0xbe, 0x04, 0xf8, 0x5d, - 0x01, 0x9b, 0x19, 0xe5, 0x84, 0xb5, 0x34, 0x8e, 0xcc, 0x9a, 0xab, 0xc6, 0xba, 0x76, 0x09, 0x7d, - 0x5f, 0x40, 0x23, 0x58, 0xcb, 0x84, 0x4e, 0xfb, 0x24, 0xe0, 0x10, 0x5c, 0x9a, 0x96, 0x17, 0x6a, - 0x69, 0x91, 0xb3, 0xa2, 0xab, 0xe5, 0x4c, 0x5d, 0x32, 0x6c, 0x0b, 0x06, 0x0d, 0x96, 0x32, 0x19, - 0x30, 0x8b, 0x5a, 0x07, 0xc7, 0x63, 0x4d, 0x39, 0x19, 0x6b, 0xca, 0x9f, 0xb1, 0xa6, 0x7c, 0x99, - 0x68, 0xb9, 0x93, 0x89, 0x96, 0xfb, 0x35, 0xd1, 0x72, 0xaf, 0x1a, 0x73, 0x57, 0x07, 0x23, 0xb6, - 0x1d, 0xbd, 0x19, 0xcd, 0x4d, 0x1a, 0x3d, 0x40, 0xef, 0xe6, 0xc7, 0x89, 0xab, 0xe4, 0x28, 0x2f, - 0xae, 0xea, 0xfd, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6e, 0xe0, 0x3d, 0x9c, 0x46, 0x06, 0x00, - 0x00, + // 627 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xcf, 0x8f, 0xd2, 0x40, + 0x1c, 0xc5, 0xa9, 0x3f, 0x36, 0x3a, 0xab, 0x71, 0x1d, 0x31, 0xeb, 0x56, 0x52, 0xa0, 0xd9, 0xe8, + 0xba, 0x09, 0x1d, 0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, 0x5a, 0xee, 0xf5, 0xfe, 0xcc, 0xd5, 0xc1, 0x88, 0x6d, + 0x47, 0x6f, 0x87, 0x33, 0x93, 0x86, 0xf7, 0xd1, 0xfb, 0xd9, 0x71, 0xe2, 0x2a, 0x41, 0xc3, 0xda, + 0xe1, 0x9a, 0xb8, 0xad, 0xf7, 0xfe, 0x07, 0x00, 0x00, 0xff, 0xff, 0x44, 0x7c, 0x6e, 0x3b, 0x49, + 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/cellarfees/types/query.pb.gw.go b/x/cellarfees/types/v1/query.pb.gw.go similarity index 99% rename from x/cellarfees/types/query.pb.gw.go rename to x/cellarfees/types/v1/query.pb.gw.go index 009be4f05..216b37ab8 100644 --- a/x/cellarfees/types/query.pb.gw.go +++ b/x/cellarfees/types/v1/query.pb.gw.go @@ -2,11 +2,11 @@ // source: cellarfees/v1/query.proto /* -Package types is a reverse proxy. +Package v1 is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package types +package v1 import ( "context" diff --git a/x/cellarfees/types/v2/cellarfees.pb.go b/x/cellarfees/types/v2/cellarfees.pb.go new file mode 100644 index 000000000..cbb6e33a9 --- /dev/null +++ b/x/cellarfees/types/v2/cellarfees.pb.go @@ -0,0 +1,353 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cellarfees/v2/cellarfees.proto + +package v2 + +import ( + encoding_binary "encoding/binary" + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type FeeTokenBalance struct { + Balance types.Coin `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance"` + UsdValue float64 `protobuf:"fixed64,2,opt,name=usd_value,json=usdValue,proto3" json:"usd_value,omitempty"` +} + +func (m *FeeTokenBalance) Reset() { *m = FeeTokenBalance{} } +func (m *FeeTokenBalance) String() string { return proto.CompactTextString(m) } +func (*FeeTokenBalance) ProtoMessage() {} +func (*FeeTokenBalance) Descriptor() ([]byte, []int) { + return fileDescriptor_f9a743a746b9d1be, []int{0} +} +func (m *FeeTokenBalance) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FeeTokenBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FeeTokenBalance.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 *FeeTokenBalance) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeeTokenBalance.Merge(m, src) +} +func (m *FeeTokenBalance) XXX_Size() int { + return m.Size() +} +func (m *FeeTokenBalance) XXX_DiscardUnknown() { + xxx_messageInfo_FeeTokenBalance.DiscardUnknown(m) +} + +var xxx_messageInfo_FeeTokenBalance proto.InternalMessageInfo + +func (m *FeeTokenBalance) GetBalance() types.Coin { + if m != nil { + return m.Balance + } + return types.Coin{} +} + +func (m *FeeTokenBalance) GetUsdValue() float64 { + if m != nil { + return m.UsdValue + } + return 0 +} + +func init() { + proto.RegisterType((*FeeTokenBalance)(nil), "cellarfees.v2.FeeTokenBalance") +} + +func init() { proto.RegisterFile("cellarfees/v2/cellarfees.proto", fileDescriptor_f9a743a746b9d1be) } + +var fileDescriptor_f9a743a746b9d1be = []byte{ + // 255 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0xbd, 0x4a, 0xc4, 0x40, + 0x14, 0x85, 0x33, 0x22, 0xfe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e0, 0xb3, 0xe5, 0xc1, 0xe3, 0xa5, 0x36, + 0xd5, 0x4b, 0x9d, 0x0a, 0x45, 0x19, 0x14, 0xa8, 0xf5, 0xf2, 0xd5, 0x83, 0xa3, 0x2c, 0x43, 0x6b, + 0xb0, 0x04, 0x7f, 0x05, 0xef, 0x1b, 0xeb, 0xa1, 0x5a, 0x16, 0xfd, 0x47, 0xd2, 0x9d, 0x7e, 0xc2, + 0xc5, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x33, 0xd0, 0x4f, 0xe6, 0x29, 0x01, 0x00, 0x00, +} + +func (m *FeeTokenBalance) 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 *FeeTokenBalance) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FeeTokenBalance) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UsdValue != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.UsdValue)))) + i-- + dAtA[i] = 0x11 + } + { + size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCellarfees(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintCellarfees(dAtA []byte, offset int, v uint64) int { + offset -= sovCellarfees(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *FeeTokenBalance) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Balance.Size() + n += 1 + l + sovCellarfees(uint64(l)) + if m.UsdValue != 0 { + n += 9 + } + return n +} + +func sovCellarfees(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozCellarfees(x uint64) (n int) { + return sovCellarfees(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *FeeTokenBalance) 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 ErrIntOverflowCellarfees + } + 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: FeeTokenBalance: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeeTokenBalance: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCellarfees + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCellarfees + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCellarfees + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field UsdValue", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.UsdValue = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipCellarfees(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCellarfees + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCellarfees(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, ErrIntOverflowCellarfees + } + 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, ErrIntOverflowCellarfees + } + 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, ErrIntOverflowCellarfees + } + 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, ErrInvalidLengthCellarfees + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupCellarfees + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthCellarfees + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthCellarfees = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCellarfees = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupCellarfees = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/cellarfees/types/codec.go b/x/cellarfees/types/v2/codec.go similarity index 96% rename from x/cellarfees/types/codec.go rename to x/cellarfees/types/v2/codec.go index 5454a5be6..dca3695e2 100644 --- a/x/cellarfees/types/codec.go +++ b/x/cellarfees/types/v2/codec.go @@ -1,4 +1,4 @@ -package types +package v2 import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/cellarfees/types/v2/genesis.go b/x/cellarfees/types/v2/genesis.go new file mode 100644 index 000000000..67b93be09 --- /dev/null +++ b/x/cellarfees/types/v2/genesis.go @@ -0,0 +1,29 @@ +package v2 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/peggyjv/sommelier/v7/x/cellarfees/types" +) + +const DefaultParamspace = types.ModuleName + +// DefaultGenesisState get raw genesis raw message for testing +func DefaultGenesisState() GenesisState { + return GenesisState{ + Params: DefaultParams(), + LastRewardSupplyPeak: sdk.ZeroInt(), + } +} + +// Validate performs a basic stateless validation of the genesis fields. +func (gs GenesisState) Validate() error { + if err := gs.Params.ValidateBasic(); err != nil { + return err + } + + if gs.LastRewardSupplyPeak.LT(sdk.ZeroInt()) { + return types.ErrInvalidLastRewardSupplyPeak.Wrap("last reward supply peak cannot be less than zero!") + } + + return nil +} diff --git a/x/cellarfees/types/v2/genesis.pb.go b/x/cellarfees/types/v2/genesis.pb.go new file mode 100644 index 000000000..09f70f160 --- /dev/null +++ b/x/cellarfees/types/v2/genesis.pb.go @@ -0,0 +1,374 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cellarfees/v2/genesis.proto + +package v2 + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the cellarfees module's genesis state. +type GenesisState struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + LastRewardSupplyPeak github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=last_reward_supply_peak,json=lastRewardSupplyPeak,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"last_reward_supply_peak"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_95cfe5fde263fa24, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "cellarfees.v2.GenesisState") +} + +func init() { proto.RegisterFile("cellarfees/v2/genesis.proto", fileDescriptor_95cfe5fde263fa24) } + +var fileDescriptor_95cfe5fde263fa24 = []byte{ + // 288 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0x41, 0x4b, 0xc3, 0x30, + 0x18, 0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x17, 0x11, 0x35, 0x99, 0x04, 0x4d, 0x1e, 0x96, 0x66, + 0xda, 0x29, 0x75, 0x53, 0x6b, 0x9b, 0x59, 0xd9, 0x04, 0x58, 0xf4, 0xd8, 0x3c, 0x3c, 0x38, 0x6b, + 0x8c, 0x9f, 0xd6, 0x39, 0x46, 0x9b, 0x1c, 0xa3, 0xdf, 0x1c, 0xa3, 0xcf, 0x02, 0x3b, 0x9b, 0x02, + 0x3b, 0xdf, 0x05, 0x76, 0x9e, 0x6f, 0x77, 0xec, 0x12, 0x38, 0xcf, 0xde, 0x52, 0xaa, 0x45, 0x92, + 0x40, 0x1c, 0x82, 0xa2, 0xe9, 0x1d, 0xfd, 0xa0, 0x3b, 0x53, 0xd8, 0x36, 0x9a, 0x7a, 0xf3, 0x96, + 0x9d, 0x62, 0xf4, 0x17, 0x00, 0x00, 0xff, 0xff, 0x01, 0x6d, 0xf0, 0xe5, 0x6a, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.LastRewardSupplyPeak.Size() + i -= size + if _, err := m.LastRewardSupplyPeak.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.LastRewardSupplyPeak.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastRewardSupplyPeak", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastRewardSupplyPeak.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrIntOverflowGenesis + } + 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, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/cellarfees/types/params.go b/x/cellarfees/types/v2/params.go similarity index 65% rename from x/cellarfees/types/params.go rename to x/cellarfees/types/v2/params.go index 0d81222a0..cecf3300e 100644 --- a/x/cellarfees/types/params.go +++ b/x/cellarfees/types/v2/params.go @@ -1,14 +1,14 @@ -package types +package v2 import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/peggyjv/sommelier/v7/x/cellarfees/types" "gopkg.in/yaml.v2" ) const ( - DefaultFeeAccrualAuctionThreshold uint64 = 2 // Rough number of blocks in 28 days, the time it takes to unbond DefaultRewardEmissionPeriod uint64 = 403200 // Initial rate at which an auction should decrease the price of the relevant coin from it's starting price. @@ -19,15 +19,18 @@ const ( DefaultPriceDecreaseBlockInterval uint64 = 10 // Blocks between each auction DefaultAuctionInterval uint64 = 15000 + // Minimum USD value of a token's fees balance to trigger an auction + // $10,000 + DefaultAuctionThresholdUsdValue = "10000.00" ) // Parameter keys var ( - KeyFeeAccrualAuctionThreshold = []byte("FeeAccrualAuctionThreshold") KeyRewardEmissionPeriod = []byte("RewardEmissionPeriod") KeyInitialPriceDecreaseRate = []byte("InitialPriceDecreaseRate") KeyPriceDecreaseBlockInterval = []byte("PriceDecreaseBlockInterval") KeyAuctionInterval = []byte("AuctionInterval") + KeyAuctionThresholdUsdValue = []byte("AuctionThresholdUsdValue") ) var _ paramtypes.ParamSet = &Params{} @@ -40,30 +43,27 @@ func ParamKeyTable() paramtypes.KeyTable { // DefaultParams returns default cellarfees parameters func DefaultParams() Params { return Params{ - FeeAccrualAuctionThreshold: DefaultFeeAccrualAuctionThreshold, RewardEmissionPeriod: DefaultRewardEmissionPeriod, InitialPriceDecreaseRate: sdk.MustNewDecFromStr(DefaultInitialPriceDecreaseRate), PriceDecreaseBlockInterval: DefaultPriceDecreaseBlockInterval, AuctionInterval: DefaultAuctionInterval, + AuctionThresholdUsdValue: sdk.MustNewDecFromStr(DefaultAuctionThresholdUsdValue), } } // ParamSetPairs returns the parameter set pairs. func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ - paramtypes.NewParamSetPair(KeyFeeAccrualAuctionThreshold, &p.FeeAccrualAuctionThreshold, validateFeeAccrualAuctionThreshold), paramtypes.NewParamSetPair(KeyRewardEmissionPeriod, &p.RewardEmissionPeriod, validateRewardEmissionPeriod), paramtypes.NewParamSetPair(KeyInitialPriceDecreaseRate, &p.InitialPriceDecreaseRate, validateInitialPriceDecreaseRate), paramtypes.NewParamSetPair(KeyPriceDecreaseBlockInterval, &p.PriceDecreaseBlockInterval, validatePriceDecreaseBlockInterval), paramtypes.NewParamSetPair(KeyAuctionInterval, &p.AuctionInterval, validateAuctionInterval), + paramtypes.NewParamSetPair(KeyAuctionThresholdUsdValue, &p.AuctionThresholdUsdValue, validateAuctionThresholdUsdValue), } } // ValidateBasic performs basic validation on cellarfees parameters. func (p *Params) ValidateBasic() error { - if err := validateFeeAccrualAuctionThreshold(p.FeeAccrualAuctionThreshold); err != nil { - return err - } if err := validateRewardEmissionPeriod(p.RewardEmissionPeriod); err != nil { return err } @@ -76,27 +76,14 @@ func (p *Params) ValidateBasic() error { return nil } -func validateFeeAccrualAuctionThreshold(i interface{}) error { - threshold, ok := i.(uint64) - if !ok { - return errorsmod.Wrapf(ErrInvalidFeeAccrualAuctionThreshold, "fee accrual auction threshold: %T", i) - } - - if threshold == 0 { - return errorsmod.Wrapf(ErrInvalidFeeAccrualAuctionThreshold, "fee accrual auction threshold cannot be zero") - } - - return nil -} - func validateRewardEmissionPeriod(i interface{}) error { emissionPeriod, ok := i.(uint64) if !ok { - return errorsmod.Wrapf(ErrInvalidRewardEmissionPeriod, "reward emission period: %T", i) + return errorsmod.Wrapf(types.ErrInvalidRewardEmissionPeriod, "reward emission period: %T", i) } if emissionPeriod == 0 { - return errorsmod.Wrapf(ErrInvalidRewardEmissionPeriod, "reward emission period cannot be zero") + return errorsmod.Wrapf(types.ErrInvalidRewardEmissionPeriod, "reward emission period cannot be zero") } return nil @@ -105,15 +92,15 @@ func validateRewardEmissionPeriod(i interface{}) error { func validateInitialPriceDecreaseRate(i interface{}) error { rate, ok := i.(sdk.Dec) if !ok { - return errorsmod.Wrapf(ErrInvalidInitialPriceDecreaseRate, "initial price decrease rate: %T", i) + return errorsmod.Wrapf(types.ErrInvalidInitialPriceDecreaseRate, "initial price decrease rate: %T", i) } if rate == sdk.ZeroDec() { - return errorsmod.Wrapf(ErrInvalidInitialPriceDecreaseRate, "initial price decrease rate cannot be zero, must be 0 < x < 1") + return errorsmod.Wrapf(types.ErrInvalidInitialPriceDecreaseRate, "initial price decrease rate cannot be zero, must be 0 < x < 1") } if rate == sdk.OneDec() { - return errorsmod.Wrapf(ErrInvalidInitialPriceDecreaseRate, "initial price decrease rate cannot be one, must be 0 < x < 1") + return errorsmod.Wrapf(types.ErrInvalidInitialPriceDecreaseRate, "initial price decrease rate cannot be one, must be 0 < x < 1") } return nil @@ -122,11 +109,11 @@ func validateInitialPriceDecreaseRate(i interface{}) error { func validatePriceDecreaseBlockInterval(i interface{}) error { interval, ok := i.(uint64) if !ok { - return errorsmod.Wrapf(ErrInvalidPriceDecreaseBlockInterval, "price decrease block interval: %T", i) + return errorsmod.Wrapf(types.ErrInvalidPriceDecreaseBlockInterval, "price decrease block interval: %T", i) } if interval == 0 { - return errorsmod.Wrapf(ErrInvalidPriceDecreaseBlockInterval, "price decrease block interval cannot be zero") + return errorsmod.Wrapf(types.ErrInvalidPriceDecreaseBlockInterval, "price decrease block interval cannot be zero") } return nil @@ -135,11 +122,24 @@ func validatePriceDecreaseBlockInterval(i interface{}) error { func validateAuctionInterval(i interface{}) error { interval, ok := i.(uint64) if !ok { - return errorsmod.Wrapf(ErrInvalidAuctionInterval, "auction interval: %T", i) + return errorsmod.Wrapf(types.ErrInvalidAuctionInterval, "auction interval: %T", i) } if interval == 0 { - return errorsmod.Wrapf(ErrInvalidAuctionInterval, "auction interval cannot be zero") + return errorsmod.Wrapf(types.ErrInvalidAuctionInterval, "auction interval cannot be zero") + } + + return nil +} + +func validateAuctionThresholdUsdValue(i interface{}) error { + threshold, ok := i.(sdk.Dec) + if !ok { + return errorsmod.Wrapf(types.ErrInvalidAuctionThresholdUsdValue, "auction threshold USD value: %T", i) + } + + if !threshold.IsPositive() { + return errorsmod.Wrapf(types.ErrInvalidAuctionThresholdUsdValue, "auction threshold USD value must be greater than zero") } return nil diff --git a/x/cellarfees/types/v2/params.pb.go b/x/cellarfees/types/v2/params.pb.go new file mode 100644 index 000000000..ae6a75111 --- /dev/null +++ b/x/cellarfees/types/v2/params.pb.go @@ -0,0 +1,484 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cellarfees/v2/params.proto + +package v2 + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Params defines the parameters for the module. +type Params struct { + // Emission rate factor. Specifically, the number of blocks over which to distribute + // some amount of staking rewards. + RewardEmissionPeriod uint64 `protobuf:"varint,2,opt,name=reward_emission_period,json=rewardEmissionPeriod,proto3" json:"reward_emission_period,omitempty"` + // The initial rate at which auctions should decrease their denom's price in SOMM + InitialPriceDecreaseRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=initial_price_decrease_rate,json=initialPriceDecreaseRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"initial_price_decrease_rate"` + // Number of blocks between auction price decreases + PriceDecreaseBlockInterval uint64 `protobuf:"varint,4,opt,name=price_decrease_block_interval,json=priceDecreaseBlockInterval,proto3" json:"price_decrease_block_interval,omitempty"` + // The interval between starting auctions + AuctionInterval uint64 `protobuf:"varint,5,opt,name=auction_interval,json=auctionInterval,proto3" json:"auction_interval,omitempty"` + // A fee token's total USD value threshold, based on it's auction.v1.TokenPrice, above which an auction is triggered + AuctionThresholdUsdValue github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=auction_threshold_usd_value,json=auctionThresholdUsdValue,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"auction_threshold_usd_value"` +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_270f377f75209ba6, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetRewardEmissionPeriod() uint64 { + if m != nil { + return m.RewardEmissionPeriod + } + return 0 +} + +func (m *Params) GetPriceDecreaseBlockInterval() uint64 { + if m != nil { + return m.PriceDecreaseBlockInterval + } + return 0 +} + +func (m *Params) GetAuctionInterval() uint64 { + if m != nil { + return m.AuctionInterval + } + return 0 +} + +func init() { + proto.RegisterType((*Params)(nil), "cellarfees.v2.Params") +} + +func init() { proto.RegisterFile("cellarfees/v2/params.proto", fileDescriptor_270f377f75209ba6) } + +var fileDescriptor_270f377f75209ba6 = []byte{ + // 381 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x41, 0x6b, 0xdb, 0x30, + 0x1c, 0xc5, 0xed, 0xc4, 0x0b, 0x9b, 0x61, 0x2c, 0x98, 0x30, 0x4c, 0xc2, 0x9c, 0xb0, 0xc3, 0xc8, + 0x0e, 0xb3, 0x20, 0xdb, 0x18, 0xec, 0xb6, 0x90, 0x1d, 0xb6, 0x4b, 0x43, 0x68, 0x7b, 0xe8, 0x45, + 0x28, 0xf2, 0xbf, 0x8e, 0x1a, 0x29, 0x32, 0x92, 0xec, 0x36, 0xdf, 0xa2, 0xa7, 0xd2, 0x63, 0x3f, + 0x4e, 0x8e, 0x39, 0x96, 0x1e, 0x42, 0x49, 0xbe, 0x48, 0xb1, 0xe3, 0xa4, 0xa1, 0xc7, 0x9e, 0x24, + 0xf4, 0xde, 0xfb, 0x3d, 0xfd, 0x91, 0xdc, 0x26, 0x05, 0xce, 0x89, 0x3a, 0x07, 0xd0, 0x28, 0xeb, + 0xa1, 0x84, 0x28, 0x22, 0x74, 0x98, 0x28, 0x69, 0xa4, 0xf7, 0xfe, 0x59, 0x0b, 0xb3, 0x5e, 0xb3, + 0x11, 0xcb, 0x58, 0x16, 0x0a, 0xca, 0x77, 0x5b, 0xd3, 0xe7, 0x9b, 0xaa, 0x5b, 0x1b, 0x16, 0x29, + 0xef, 0x87, 0xfb, 0x51, 0xc1, 0x25, 0x51, 0x11, 0x06, 0xc1, 0xb4, 0x66, 0x72, 0x86, 0x13, 0x50, + 0x4c, 0x46, 0x7e, 0xa5, 0x63, 0x77, 0x9d, 0x51, 0x63, 0xab, 0xfe, 0x2d, 0xc5, 0x61, 0xa1, 0x79, + 0xc2, 0x6d, 0xb1, 0x19, 0x33, 0x8c, 0x70, 0x9c, 0x28, 0x46, 0x01, 0x47, 0x40, 0x15, 0x10, 0x0d, + 0x58, 0x11, 0x03, 0x7e, 0xb5, 0x63, 0x77, 0xdf, 0xf5, 0xc3, 0xc5, 0xaa, 0x6d, 0x3d, 0xac, 0xda, + 0x5f, 0x62, 0x66, 0x26, 0xe9, 0x38, 0xa4, 0x52, 0x20, 0x2a, 0xb5, 0x90, 0xba, 0x5c, 0xbe, 0xe9, + 0x68, 0x8a, 0xcc, 0x3c, 0x01, 0x1d, 0x0e, 0x80, 0x8e, 0xfc, 0x12, 0x39, 0xcc, 0x89, 0x83, 0x12, + 0x38, 0x22, 0x06, 0xbc, 0x3f, 0xee, 0xa7, 0x17, 0x35, 0x63, 0x2e, 0xe9, 0x14, 0xb3, 0x99, 0x01, + 0x95, 0x11, 0xee, 0x3b, 0xc5, 0x5d, 0x9b, 0xc9, 0x61, 0xb2, 0x9f, 0x5b, 0xfe, 0x95, 0x0e, 0xef, + 0xab, 0x5b, 0x27, 0x29, 0x35, 0xf9, 0x7c, 0xfb, 0xd4, 0x9b, 0x22, 0xf5, 0xa1, 0x3c, 0xdf, 0x5b, + 0x85, 0xdb, 0xda, 0x59, 0xcd, 0x44, 0x81, 0x9e, 0x48, 0x1e, 0xe1, 0x54, 0x47, 0x38, 0x23, 0x3c, + 0x05, 0xbf, 0xf6, 0xba, 0xe1, 0x4a, 0xe4, 0xf1, 0x8e, 0x78, 0xa2, 0xa3, 0xd3, 0x9c, 0xf7, 0xdb, + 0xb9, 0xbd, 0x6b, 0x5b, 0xff, 0x9d, 0xb7, 0x76, 0xbd, 0xd2, 0x3f, 0x5a, 0xac, 0x03, 0x7b, 0xb9, + 0x0e, 0xec, 0xc7, 0x75, 0x60, 0x5f, 0x6f, 0x02, 0x6b, 0xb9, 0x09, 0xac, 0xfb, 0x4d, 0x60, 0x9d, + 0xfd, 0x3c, 0xe8, 0x49, 0x20, 0x8e, 0xe7, 0x17, 0x19, 0xd2, 0x52, 0x08, 0xe0, 0x0c, 0x14, 0xca, + 0x7e, 0xa1, 0x2b, 0x74, 0xf0, 0x2b, 0x8a, 0x5e, 0x94, 0xf5, 0xc6, 0xb5, 0xe2, 0xc1, 0xbf, 0x3f, + 0x05, 0x00, 0x00, 0xff, 0xff, 0x87, 0x16, 0xc6, 0xed, 0x33, 0x02, 0x00, 0x00, +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.AuctionThresholdUsdValue.Size() + i -= size + if _, err := m.AuctionThresholdUsdValue.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + if m.AuctionInterval != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.AuctionInterval)) + i-- + dAtA[i] = 0x28 + } + if m.PriceDecreaseBlockInterval != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.PriceDecreaseBlockInterval)) + i-- + dAtA[i] = 0x20 + } + { + size := m.InitialPriceDecreaseRate.Size() + i -= size + if _, err := m.InitialPriceDecreaseRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.RewardEmissionPeriod != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.RewardEmissionPeriod)) + i-- + dAtA[i] = 0x10 + } + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RewardEmissionPeriod != 0 { + n += 1 + sovParams(uint64(m.RewardEmissionPeriod)) + } + l = m.InitialPriceDecreaseRate.Size() + n += 1 + l + sovParams(uint64(l)) + if m.PriceDecreaseBlockInterval != 0 { + n += 1 + sovParams(uint64(m.PriceDecreaseBlockInterval)) + } + if m.AuctionInterval != 0 { + n += 1 + sovParams(uint64(m.AuctionInterval)) + } + l = m.AuctionThresholdUsdValue.Size() + n += 1 + l + sovParams(uint64(l)) + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowParams + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RewardEmissionPeriod", wireType) + } + m.RewardEmissionPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RewardEmissionPeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialPriceDecreaseRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialPriceDecreaseRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceDecreaseBlockInterval", wireType) + } + m.PriceDecreaseBlockInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PriceDecreaseBlockInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AuctionInterval", wireType) + } + m.AuctionInterval = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AuctionInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuctionThresholdUsdValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AuctionThresholdUsdValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrIntOverflowParams + } + 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, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/cellarfees/types/v2/query.pb.go b/x/cellarfees/types/v2/query.pb.go new file mode 100644 index 000000000..588c30566 --- /dev/null +++ b/x/cellarfees/types/v2/query.pb.go @@ -0,0 +1,2249 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cellarfees/v2/query.proto + +package v2 + +import ( + context "context" + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + 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. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_43b5cfd9b5e06b70, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.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 *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +type QueryParamsResponse struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_43b5cfd9b5e06b70, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +type QueryModuleAccountsRequest struct { +} + +func (m *QueryModuleAccountsRequest) Reset() { *m = QueryModuleAccountsRequest{} } +func (m *QueryModuleAccountsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryModuleAccountsRequest) ProtoMessage() {} +func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_43b5cfd9b5e06b70, []int{2} +} +func (m *QueryModuleAccountsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryModuleAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryModuleAccountsRequest.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 *QueryModuleAccountsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryModuleAccountsRequest.Merge(m, src) +} +func (m *QueryModuleAccountsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryModuleAccountsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryModuleAccountsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryModuleAccountsRequest proto.InternalMessageInfo + +type QueryModuleAccountsResponse struct { + FeesAddress string `protobuf:"bytes,1,opt,name=fees_address,json=feesAddress,proto3" json:"fees_address,omitempty"` +} + +func (m *QueryModuleAccountsResponse) Reset() { *m = QueryModuleAccountsResponse{} } +func (m *QueryModuleAccountsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryModuleAccountsResponse) ProtoMessage() {} +func (*QueryModuleAccountsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_43b5cfd9b5e06b70, []int{3} +} +func (m *QueryModuleAccountsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryModuleAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryModuleAccountsResponse.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 *QueryModuleAccountsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryModuleAccountsResponse.Merge(m, src) +} +func (m *QueryModuleAccountsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryModuleAccountsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryModuleAccountsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryModuleAccountsResponse proto.InternalMessageInfo + +func (m *QueryModuleAccountsResponse) GetFeesAddress() string { + if m != nil { + return m.FeesAddress + } + return "" +} + +type QueryLastRewardSupplyPeakRequest struct { +} + +func (m *QueryLastRewardSupplyPeakRequest) Reset() { *m = QueryLastRewardSupplyPeakRequest{} } +func (m *QueryLastRewardSupplyPeakRequest) String() string { return proto.CompactTextString(m) } +func (*QueryLastRewardSupplyPeakRequest) ProtoMessage() {} +func (*QueryLastRewardSupplyPeakRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_43b5cfd9b5e06b70, []int{4} +} +func (m *QueryLastRewardSupplyPeakRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLastRewardSupplyPeakRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLastRewardSupplyPeakRequest.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 *QueryLastRewardSupplyPeakRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLastRewardSupplyPeakRequest.Merge(m, src) +} +func (m *QueryLastRewardSupplyPeakRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryLastRewardSupplyPeakRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLastRewardSupplyPeakRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLastRewardSupplyPeakRequest proto.InternalMessageInfo + +type QueryLastRewardSupplyPeakResponse struct { + LastRewardSupplyPeak github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=last_reward_supply_peak,json=lastRewardSupplyPeak,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"last_reward_supply_peak"` +} + +func (m *QueryLastRewardSupplyPeakResponse) Reset() { *m = QueryLastRewardSupplyPeakResponse{} } +func (m *QueryLastRewardSupplyPeakResponse) String() string { return proto.CompactTextString(m) } +func (*QueryLastRewardSupplyPeakResponse) ProtoMessage() {} +func (*QueryLastRewardSupplyPeakResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_43b5cfd9b5e06b70, []int{5} +} +func (m *QueryLastRewardSupplyPeakResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryLastRewardSupplyPeakResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryLastRewardSupplyPeakResponse.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 *QueryLastRewardSupplyPeakResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLastRewardSupplyPeakResponse.Merge(m, src) +} +func (m *QueryLastRewardSupplyPeakResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryLastRewardSupplyPeakResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLastRewardSupplyPeakResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryLastRewardSupplyPeakResponse proto.InternalMessageInfo + +type QueryAPYRequest struct { +} + +func (m *QueryAPYRequest) Reset() { *m = QueryAPYRequest{} } +func (m *QueryAPYRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAPYRequest) ProtoMessage() {} +func (*QueryAPYRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_43b5cfd9b5e06b70, []int{6} +} +func (m *QueryAPYRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAPYRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAPYRequest.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 *QueryAPYRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAPYRequest.Merge(m, src) +} +func (m *QueryAPYRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAPYRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAPYRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAPYRequest proto.InternalMessageInfo + +type QueryAPYResponse struct { + Apy string `protobuf:"bytes,1,opt,name=apy,proto3" json:"apy,omitempty"` +} + +func (m *QueryAPYResponse) Reset() { *m = QueryAPYResponse{} } +func (m *QueryAPYResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAPYResponse) ProtoMessage() {} +func (*QueryAPYResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_43b5cfd9b5e06b70, []int{7} +} +func (m *QueryAPYResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAPYResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAPYResponse.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 *QueryAPYResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAPYResponse.Merge(m, src) +} +func (m *QueryAPYResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAPYResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAPYResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAPYResponse proto.InternalMessageInfo + +func (m *QueryAPYResponse) GetApy() string { + if m != nil { + return m.Apy + } + return "" +} + +type QueryFeeTokenBalancesRequest struct { +} + +func (m *QueryFeeTokenBalancesRequest) Reset() { *m = QueryFeeTokenBalancesRequest{} } +func (m *QueryFeeTokenBalancesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryFeeTokenBalancesRequest) ProtoMessage() {} +func (*QueryFeeTokenBalancesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_43b5cfd9b5e06b70, []int{8} +} +func (m *QueryFeeTokenBalancesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeeTokenBalancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeeTokenBalancesRequest.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 *QueryFeeTokenBalancesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeeTokenBalancesRequest.Merge(m, src) +} +func (m *QueryFeeTokenBalancesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryFeeTokenBalancesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeeTokenBalancesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeeTokenBalancesRequest proto.InternalMessageInfo + +type QueryFeeTokenBalancesResponse struct { + Balances []*FeeTokenBalance `protobuf:"bytes,1,rep,name=balances,proto3" json:"balances,omitempty"` +} + +func (m *QueryFeeTokenBalancesResponse) Reset() { *m = QueryFeeTokenBalancesResponse{} } +func (m *QueryFeeTokenBalancesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryFeeTokenBalancesResponse) ProtoMessage() {} +func (*QueryFeeTokenBalancesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_43b5cfd9b5e06b70, []int{9} +} +func (m *QueryFeeTokenBalancesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeeTokenBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeeTokenBalancesResponse.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 *QueryFeeTokenBalancesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeeTokenBalancesResponse.Merge(m, src) +} +func (m *QueryFeeTokenBalancesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryFeeTokenBalancesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeeTokenBalancesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeeTokenBalancesResponse proto.InternalMessageInfo + +func (m *QueryFeeTokenBalancesResponse) GetBalances() []*FeeTokenBalance { + if m != nil { + return m.Balances + } + return nil +} + +type QueryFeeTokenBalanceRequest struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QueryFeeTokenBalanceRequest) Reset() { *m = QueryFeeTokenBalanceRequest{} } +func (m *QueryFeeTokenBalanceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryFeeTokenBalanceRequest) ProtoMessage() {} +func (*QueryFeeTokenBalanceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_43b5cfd9b5e06b70, []int{10} +} +func (m *QueryFeeTokenBalanceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeeTokenBalanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeeTokenBalanceRequest.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 *QueryFeeTokenBalanceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeeTokenBalanceRequest.Merge(m, src) +} +func (m *QueryFeeTokenBalanceRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryFeeTokenBalanceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeeTokenBalanceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeeTokenBalanceRequest proto.InternalMessageInfo + +func (m *QueryFeeTokenBalanceRequest) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +type QueryFeeTokenBalanceResponse struct { + Balance *FeeTokenBalance `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` +} + +func (m *QueryFeeTokenBalanceResponse) Reset() { *m = QueryFeeTokenBalanceResponse{} } +func (m *QueryFeeTokenBalanceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryFeeTokenBalanceResponse) ProtoMessage() {} +func (*QueryFeeTokenBalanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_43b5cfd9b5e06b70, []int{11} +} +func (m *QueryFeeTokenBalanceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeeTokenBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeeTokenBalanceResponse.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 *QueryFeeTokenBalanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeeTokenBalanceResponse.Merge(m, src) +} +func (m *QueryFeeTokenBalanceResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryFeeTokenBalanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeeTokenBalanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeeTokenBalanceResponse proto.InternalMessageInfo + +func (m *QueryFeeTokenBalanceResponse) GetBalance() *FeeTokenBalance { + if m != nil { + return m.Balance + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "cellarfees.v2.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "cellarfees.v2.QueryParamsResponse") + proto.RegisterType((*QueryModuleAccountsRequest)(nil), "cellarfees.v2.QueryModuleAccountsRequest") + proto.RegisterType((*QueryModuleAccountsResponse)(nil), "cellarfees.v2.QueryModuleAccountsResponse") + proto.RegisterType((*QueryLastRewardSupplyPeakRequest)(nil), "cellarfees.v2.QueryLastRewardSupplyPeakRequest") + proto.RegisterType((*QueryLastRewardSupplyPeakResponse)(nil), "cellarfees.v2.QueryLastRewardSupplyPeakResponse") + proto.RegisterType((*QueryAPYRequest)(nil), "cellarfees.v2.QueryAPYRequest") + proto.RegisterType((*QueryAPYResponse)(nil), "cellarfees.v2.QueryAPYResponse") + proto.RegisterType((*QueryFeeTokenBalancesRequest)(nil), "cellarfees.v2.QueryFeeTokenBalancesRequest") + proto.RegisterType((*QueryFeeTokenBalancesResponse)(nil), "cellarfees.v2.QueryFeeTokenBalancesResponse") + proto.RegisterType((*QueryFeeTokenBalanceRequest)(nil), "cellarfees.v2.QueryFeeTokenBalanceRequest") + proto.RegisterType((*QueryFeeTokenBalanceResponse)(nil), "cellarfees.v2.QueryFeeTokenBalanceResponse") +} + +func init() { proto.RegisterFile("cellarfees/v2/query.proto", fileDescriptor_43b5cfd9b5e06b70) } + +var fileDescriptor_43b5cfd9b5e06b70 = []byte{ + // 700 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x95, 0xbf, 0x6f, 0xd3, 0x4e, + 0x18, 0xc6, 0xe3, 0x6f, 0xbf, 0xfd, 0xc1, 0x05, 0x44, 0x39, 0x52, 0xd1, 0x9a, 0xe0, 0x34, 0x56, + 0x05, 0xa5, 0xa5, 0xbe, 0xca, 0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x51, 0xbd, 0x36, 0x9a, 0x58, 0xa2, 0x55, 0x04, 0xda, + 0x0a, 0x5e, 0xce, 0x44, 0xdb, 0x06, 0xb0, 0xc2, 0xa8, 0xd7, 0x4a, 0x02, 0x89, 0x3f, 0x2b, 0xa8, + 0x90, 0x36, 0x16, 0x2f, 0x8d, 0xe0, 0x9d, 0x70, 0x2e, 0x8f, 0xa4, 0x95, 0x98, 0x37, 0x05, 0xe6, + 0x1a, 0xae, 0xfc, 0x03, 0x26, 0x79, 0x23, 0xde, 0x04, 0xbb, 0xd5, 0x07, 0x7b, 0x87, 0x9a, 0xb2, + 0x7f, 0xa8, 0x29, 0x3f, 0x0f, 0x35, 0xe5, 0xfd, 0x91, 0x96, 0xdb, 0x3f, 0xd2, 0x72, 0xdf, 0x8f, + 0xb4, 0xdc, 0xb3, 0xb5, 0xbe, 0xb7, 0xa9, 0x0f, 0xb6, 0xdd, 0x7d, 0xd9, 0xe9, 0x33, 0xe8, 0x5c, + 0x27, 0xaf, 0xfb, 0x5d, 0xc4, 0xdb, 0x95, 0x74, 0xcc, 0xad, 0x09, 0xf1, 0x07, 0x56, 0xf9, 0x1d, + 0x00, 0x00, 0xff, 0xff, 0x21, 0x3f, 0x46, 0xc0, 0x5c, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + QueryModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) + QueryLastRewardSupplyPeak(ctx context.Context, in *QueryLastRewardSupplyPeakRequest, opts ...grpc.CallOption) (*QueryLastRewardSupplyPeakResponse, error) + QueryAPY(ctx context.Context, in *QueryAPYRequest, opts ...grpc.CallOption) (*QueryAPYResponse, error) + QueryFeeTokenBalances(ctx context.Context, in *QueryFeeTokenBalancesRequest, opts ...grpc.CallOption) (*QueryFeeTokenBalancesResponse, error) + QueryFeeTokenBalance(ctx context.Context, in *QueryFeeTokenBalanceRequest, opts ...grpc.CallOption) (*QueryFeeTokenBalanceResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/cellarfees.v2.Query/QueryParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) QueryModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, error) { + out := new(QueryModuleAccountsResponse) + err := c.cc.Invoke(ctx, "/cellarfees.v2.Query/QueryModuleAccounts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) QueryLastRewardSupplyPeak(ctx context.Context, in *QueryLastRewardSupplyPeakRequest, opts ...grpc.CallOption) (*QueryLastRewardSupplyPeakResponse, error) { + out := new(QueryLastRewardSupplyPeakResponse) + err := c.cc.Invoke(ctx, "/cellarfees.v2.Query/QueryLastRewardSupplyPeak", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) QueryAPY(ctx context.Context, in *QueryAPYRequest, opts ...grpc.CallOption) (*QueryAPYResponse, error) { + out := new(QueryAPYResponse) + err := c.cc.Invoke(ctx, "/cellarfees.v2.Query/QueryAPY", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) QueryFeeTokenBalances(ctx context.Context, in *QueryFeeTokenBalancesRequest, opts ...grpc.CallOption) (*QueryFeeTokenBalancesResponse, error) { + out := new(QueryFeeTokenBalancesResponse) + err := c.cc.Invoke(ctx, "/cellarfees.v2.Query/QueryFeeTokenBalances", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) QueryFeeTokenBalance(ctx context.Context, in *QueryFeeTokenBalanceRequest, opts ...grpc.CallOption) (*QueryFeeTokenBalanceResponse, error) { + out := new(QueryFeeTokenBalanceResponse) + err := c.cc.Invoke(ctx, "/cellarfees.v2.Query/QueryFeeTokenBalance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + QueryParams(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + QueryModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) + QueryLastRewardSupplyPeak(context.Context, *QueryLastRewardSupplyPeakRequest) (*QueryLastRewardSupplyPeakResponse, error) + QueryAPY(context.Context, *QueryAPYRequest) (*QueryAPYResponse, error) + QueryFeeTokenBalances(context.Context, *QueryFeeTokenBalancesRequest) (*QueryFeeTokenBalancesResponse, error) + QueryFeeTokenBalance(context.Context, *QueryFeeTokenBalanceRequest) (*QueryFeeTokenBalanceResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) QueryParams(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryParams not implemented") +} +func (*UnimplementedQueryServer) QueryModuleAccounts(ctx context.Context, req *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryModuleAccounts not implemented") +} +func (*UnimplementedQueryServer) QueryLastRewardSupplyPeak(ctx context.Context, req *QueryLastRewardSupplyPeakRequest) (*QueryLastRewardSupplyPeakResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryLastRewardSupplyPeak not implemented") +} +func (*UnimplementedQueryServer) QueryAPY(ctx context.Context, req *QueryAPYRequest) (*QueryAPYResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryAPY not implemented") +} +func (*UnimplementedQueryServer) QueryFeeTokenBalances(ctx context.Context, req *QueryFeeTokenBalancesRequest) (*QueryFeeTokenBalancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryFeeTokenBalances not implemented") +} +func (*UnimplementedQueryServer) QueryFeeTokenBalance(ctx context.Context, req *QueryFeeTokenBalanceRequest) (*QueryFeeTokenBalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryFeeTokenBalance not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_QueryParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cellarfees.v2.Query/QueryParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryParams(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_QueryModuleAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryModuleAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryModuleAccounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cellarfees.v2.Query/QueryModuleAccounts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryModuleAccounts(ctx, req.(*QueryModuleAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_QueryLastRewardSupplyPeak_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLastRewardSupplyPeakRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryLastRewardSupplyPeak(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cellarfees.v2.Query/QueryLastRewardSupplyPeak", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryLastRewardSupplyPeak(ctx, req.(*QueryLastRewardSupplyPeakRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_QueryAPY_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAPYRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryAPY(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cellarfees.v2.Query/QueryAPY", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryAPY(ctx, req.(*QueryAPYRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_QueryFeeTokenBalances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFeeTokenBalancesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryFeeTokenBalances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cellarfees.v2.Query/QueryFeeTokenBalances", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryFeeTokenBalances(ctx, req.(*QueryFeeTokenBalancesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_QueryFeeTokenBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFeeTokenBalanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryFeeTokenBalance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cellarfees.v2.Query/QueryFeeTokenBalance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryFeeTokenBalance(ctx, req.(*QueryFeeTokenBalanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cellarfees.v2.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "QueryParams", + Handler: _Query_QueryParams_Handler, + }, + { + MethodName: "QueryModuleAccounts", + Handler: _Query_QueryModuleAccounts_Handler, + }, + { + MethodName: "QueryLastRewardSupplyPeak", + Handler: _Query_QueryLastRewardSupplyPeak_Handler, + }, + { + MethodName: "QueryAPY", + Handler: _Query_QueryAPY_Handler, + }, + { + MethodName: "QueryFeeTokenBalances", + Handler: _Query_QueryFeeTokenBalances_Handler, + }, + { + MethodName: "QueryFeeTokenBalance", + Handler: _Query_QueryFeeTokenBalance_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cellarfees/v2/query.proto", +} + +func (m *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryModuleAccountsRequest) 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 *QueryModuleAccountsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryModuleAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryModuleAccountsResponse) 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 *QueryModuleAccountsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryModuleAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FeesAddress) > 0 { + i -= len(m.FeesAddress) + copy(dAtA[i:], m.FeesAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.FeesAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryLastRewardSupplyPeakRequest) 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 *QueryLastRewardSupplyPeakRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLastRewardSupplyPeakRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryLastRewardSupplyPeakResponse) 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 *QueryLastRewardSupplyPeakResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryLastRewardSupplyPeakResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.LastRewardSupplyPeak.Size() + i -= size + if _, err := m.LastRewardSupplyPeak.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryAPYRequest) 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 *QueryAPYRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAPYRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryAPYResponse) 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 *QueryAPYResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAPYResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Apy) > 0 { + i -= len(m.Apy) + copy(dAtA[i:], m.Apy) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Apy))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryFeeTokenBalancesRequest) 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 *QueryFeeTokenBalancesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeeTokenBalancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryFeeTokenBalancesResponse) 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 *QueryFeeTokenBalancesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeeTokenBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Balances) > 0 { + for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryFeeTokenBalanceRequest) 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 *QueryFeeTokenBalanceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeeTokenBalanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryFeeTokenBalanceResponse) 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 *QueryFeeTokenBalanceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeeTokenBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Balance != nil { + { + size, err := m.Balance.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryModuleAccountsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryModuleAccountsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FeesAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryLastRewardSupplyPeakRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryLastRewardSupplyPeakResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.LastRewardSupplyPeak.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAPYRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryAPYResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Apy) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryFeeTokenBalancesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryFeeTokenBalancesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Balances) > 0 { + for _, e := range m.Balances { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryFeeTokenBalanceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryFeeTokenBalanceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Balance != nil { + l = m.Balance.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) 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 ErrIntOverflowQuery + } + 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) 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 ErrIntOverflowQuery + } + 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryModuleAccountsRequest) 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 ErrIntOverflowQuery + } + 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: QueryModuleAccountsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryModuleAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryModuleAccountsResponse) 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 ErrIntOverflowQuery + } + 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: QueryModuleAccountsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryModuleAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeesAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeesAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryLastRewardSupplyPeakRequest) 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 ErrIntOverflowQuery + } + 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: QueryLastRewardSupplyPeakRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLastRewardSupplyPeakRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryLastRewardSupplyPeakResponse) 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 ErrIntOverflowQuery + } + 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: QueryLastRewardSupplyPeakResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryLastRewardSupplyPeakResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastRewardSupplyPeak", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastRewardSupplyPeak.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAPYRequest) 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 ErrIntOverflowQuery + } + 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: QueryAPYRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAPYRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAPYResponse) 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 ErrIntOverflowQuery + } + 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: QueryAPYResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAPYResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Apy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Apy = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFeeTokenBalancesRequest) 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 ErrIntOverflowQuery + } + 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: QueryFeeTokenBalancesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeeTokenBalancesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFeeTokenBalancesResponse) 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 ErrIntOverflowQuery + } + 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: QueryFeeTokenBalancesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeeTokenBalancesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Balances = append(m.Balances, &FeeTokenBalance{}) + if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFeeTokenBalanceRequest) 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 ErrIntOverflowQuery + } + 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: QueryFeeTokenBalanceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeeTokenBalanceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryFeeTokenBalanceResponse) 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 ErrIntOverflowQuery + } + 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: QueryFeeTokenBalanceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeeTokenBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Balance == nil { + m.Balance = &FeeTokenBalance{} + } + if err := m.Balance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/cellarfees/types/v2/query.pb.gw.go b/x/cellarfees/types/v2/query.pb.gw.go new file mode 100644 index 000000000..74f2f5719 --- /dev/null +++ b/x/cellarfees/types/v2/query.pb.gw.go @@ -0,0 +1,514 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: cellarfees/v2/query.proto + +/* +Package v2 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v2 + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_QueryParams_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.QueryParams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QueryParams_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.QueryParams(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_QueryModuleAccounts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryModuleAccountsRequest + var metadata runtime.ServerMetadata + + msg, err := client.QueryModuleAccounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QueryModuleAccounts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryModuleAccountsRequest + var metadata runtime.ServerMetadata + + msg, err := server.QueryModuleAccounts(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_QueryLastRewardSupplyPeak_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastRewardSupplyPeakRequest + var metadata runtime.ServerMetadata + + msg, err := client.QueryLastRewardSupplyPeak(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QueryLastRewardSupplyPeak_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLastRewardSupplyPeakRequest + var metadata runtime.ServerMetadata + + msg, err := server.QueryLastRewardSupplyPeak(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_QueryAPY_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAPYRequest + var metadata runtime.ServerMetadata + + msg, err := client.QueryAPY(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QueryAPY_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAPYRequest + var metadata runtime.ServerMetadata + + msg, err := server.QueryAPY(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_QueryFeeTokenBalances_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryFeeTokenBalancesRequest + var metadata runtime.ServerMetadata + + msg, err := client.QueryFeeTokenBalances(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QueryFeeTokenBalances_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryFeeTokenBalancesRequest + var metadata runtime.ServerMetadata + + msg, err := server.QueryFeeTokenBalances(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_QueryFeeTokenBalance_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryFeeTokenBalanceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + } + + protoReq.Denom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + } + + msg, err := client.QueryFeeTokenBalance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QueryFeeTokenBalance_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryFeeTokenBalanceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["denom"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") + } + + protoReq.Denom, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) + } + + msg, err := server.QueryFeeTokenBalance(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_QueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_QueryParams_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_QueryModuleAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_QueryModuleAccounts_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryModuleAccounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_QueryLastRewardSupplyPeak_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_QueryLastRewardSupplyPeak_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryLastRewardSupplyPeak_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_QueryAPY_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_QueryAPY_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryAPY_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_QueryFeeTokenBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_QueryFeeTokenBalances_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryFeeTokenBalances_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_QueryFeeTokenBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_QueryFeeTokenBalance_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryFeeTokenBalance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_QueryParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_QueryParams_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_QueryModuleAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_QueryModuleAccounts_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryModuleAccounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_QueryLastRewardSupplyPeak_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_QueryLastRewardSupplyPeak_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryLastRewardSupplyPeak_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_QueryAPY_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_QueryAPY_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryAPY_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_QueryFeeTokenBalances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_QueryFeeTokenBalances_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryFeeTokenBalances_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_QueryFeeTokenBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_QueryFeeTokenBalance_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryFeeTokenBalance_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_QueryParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "cellarfees", "v2", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_QueryModuleAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "cellarfees", "v2", "module_accounts"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_QueryLastRewardSupplyPeak_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "cellarfees", "v2", "last_reward_supply_peak"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_QueryAPY_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "cellarfees", "v2", "apy"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_QueryFeeTokenBalances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "cellarfees", "v2", "fee_token_balances"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_QueryFeeTokenBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sommelier", "cellarfees", "v2", "fee_token_balances", "denom"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_QueryParams_0 = runtime.ForwardResponseMessage + + forward_Query_QueryModuleAccounts_0 = runtime.ForwardResponseMessage + + forward_Query_QueryLastRewardSupplyPeak_0 = runtime.ForwardResponseMessage + + forward_Query_QueryAPY_0 = runtime.ForwardResponseMessage + + forward_Query_QueryFeeTokenBalances_0 = runtime.ForwardResponseMessage + + forward_Query_QueryFeeTokenBalance_0 = runtime.ForwardResponseMessage +) diff --git a/x/cork/module.go b/x/cork/module.go index 246fbe799..bf434cc09 100644 --- a/x/cork/module.go +++ b/x/cork/module.go @@ -16,7 +16,6 @@ import ( "github.com/peggyjv/sommelier/v7/x/cork/client/cli" "github.com/peggyjv/sommelier/v7/x/cork/keeper" corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" - v1types "github.com/peggyjv/sommelier/v7/x/cork/types/v1" types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -74,7 +73,6 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r // RegisterInterfaces implements app module basic func (b AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { types.RegisterInterfaces(registry) - v1types.RegisterInterfaces(registry) } // AppModule implements an application module for the cork module. From 2f1f8c2761346d86e5322d3ae1b7d51e0f81c977 Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Fri, 19 Apr 2024 08:44:59 +0400 Subject: [PATCH 26/32] Update README.md (#301) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1247ec129..7e8281dde 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ We have active, helpful communities on Twitter, Discord, and Telegram. * [Twitter](https://twitter.com/sommfinance) * [Discord](https://discord.gg/gZzaPmDzUq) -* [Telegram](https://t.me/peggyvaults) +* [Telegram](https://t.me/getsomm) ## Sommelier From 86340b6221e59308e9402c9523ffcff4929d9992 Mon Sep 17 00:00:00 2001 From: Collin Date: Tue, 7 May 2024 11:32:38 -0500 Subject: [PATCH 27/32] Collin/sdk 0.47 (#303) * Update dependencies * WIP - 0.47 upgrade work * WIP - Remove removed AppModule methods * WIP - Debugging app setup * WIP - grpc issue * Go version changes in Dockerfile and toolchain * Fixed gRPC issue * Fix auction test * Working axelarcork test * Fix scheduled cork test * Passing pubsub test * Fix app_test.go * WIP - Broken unit tests * Update CI go version --- .github/workflows/integration-tests.yml | 8 +- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/unit-test.yml | 2 +- Dockerfile | 2 +- Makefile | 14 +- app/app.go | 207 ++- app/app_test.go | 33 +- app/export.go | 8 +- app/sim_test.go | 141 -- app/test_setup.go | 12 +- app/upgrades/v6/upgrades.go | 10 +- app/upgrades/v7/upgrades.go | 6 +- buf.gen.yaml | 8 + buf.work.yaml | 1 - cmd/sommelier/cmd/root.go | 23 +- cmd/sommelier/cmd/testnet.go | 17 +- go.mod | 213 ++- go.sum | 1455 +++++++++++++---- integration_tests/auction_test.go | 37 +- integration_tests/axelarcork_test.go | 38 +- integration_tests/chain.go | 79 +- integration_tests/genesis.go | 2 +- integration_tests/gorc_bootstrap.sh | 2 +- integration_tests/pubsub_test.go | 115 +- integration_tests/scheduled_cork_test.go | 49 +- integration_tests/setup_test.go | 17 +- integration_tests/validator.go | 8 +- proto/auction/v1/auction.proto | 2 +- proto/auction/v1/proposal.proto | 1 + proto/auction/v1/query.proto | 10 + proto/auction/v1/tx.proto | 5 + proto/axelarcork/v1/event.proto | 2 +- proto/axelarcork/v1/query.proto | 15 + proto/axelarcork/v1/tx.proto | 13 + proto/buf.lock | 9 +- proto/buf.yaml | 1 + proto/cellarfees/v2/query.proto | 7 + proto/cork/v2/cork.proto | 2 + proto/cork/v2/proposal.proto | 1 + proto/cork/v2/query.proto | 9 + proto/cork/v2/tx.proto | 6 + proto/incentives/v1/query.proto | 3 + proto/pubsub/v1/pubsub.proto | 4 +- proto/pubsub/v1/query.proto | 20 +- proto/pubsub/v1/tx.proto | 19 + scripts/protocgen.sh | 9 +- third_party/proto/buf.lock | 18 - third_party/proto/buf.yaml | 25 - x/auction/client/cli/tx_test.go | 6 +- x/auction/keeper/keeper.go | 2 +- x/auction/keeper/keeper_test.go | 4 +- x/auction/module.go | 16 +- x/auction/types/auction.pb.go | 2 +- x/auction/types/genesis.pb.go | 2 +- x/auction/types/proposal.go | 8 - x/auction/types/proposal.pb.go | 42 +- x/auction/types/query.pb.go | 121 +- x/auction/types/tx.pb.go | 59 +- x/axelarcork/client/cli/tx_test.go | 17 +- x/axelarcork/ibc_middleware.go | 8 +- x/axelarcork/keeper/keeper.go | 8 +- x/axelarcork/keeper/keeper_test.go | 4 +- x/axelarcork/keeper/msg_server.go | 4 +- x/axelarcork/keeper/packet.go | 2 +- x/axelarcork/keeper/proposal_handler.go | 4 +- x/axelarcork/keeper/setup_unit_test.go | 6 +- x/axelarcork/module.go | 16 +- x/axelarcork/module_test.go | 4 +- .../tests/mocks/expected_keepers_mocks.go | 8 +- x/axelarcork/tests/mocks/ibc_module_mocks.go | 8 +- x/axelarcork/tests/mocks/staking_mocks.go | 2 +- x/axelarcork/tests/setup.go | 8 +- x/axelarcork/types/axelarcork.pb.go | 2 +- x/axelarcork/types/event.pb.go | 2 +- x/axelarcork/types/expected_keepers.go | 8 +- x/axelarcork/types/genesis.pb.go | 2 +- x/axelarcork/types/params.go | 2 +- x/axelarcork/types/proposal.go | 8 - x/axelarcork/types/proposal.pb.go | 2 +- x/axelarcork/types/query.pb.go | 168 +- x/axelarcork/types/tx.pb.go | 87 +- x/cellarfees/keeper/keeper.go | 2 +- x/cellarfees/keeper/keeper_test.go | 4 +- x/cellarfees/module.go | 16 +- x/cellarfees/types/v1/cellarfees.pb.go | 2 +- x/cellarfees/types/v1/genesis.pb.go | 2 +- x/cellarfees/types/v1/params.pb.go | 2 +- x/cellarfees/types/v1/query.pb.go | 4 +- x/cellarfees/types/v2/cellarfees.pb.go | 4 +- x/cellarfees/types/v2/genesis.pb.go | 2 +- x/cellarfees/types/v2/params.pb.go | 2 +- x/cellarfees/types/v2/query.pb.go | 97 +- x/cork/client/cli/tx_test.go | 7 +- x/cork/keeper/keeper.go | 2 +- x/cork/keeper/keeper_test.go | 4 +- x/cork/keeper/setup_unit_test.go | 6 +- x/cork/keeper/test_common.go | 50 +- x/cork/mock/mocks.go | 2 +- x/cork/mock/sdk_mocks.go | 2 +- x/cork/module.go | 18 +- x/cork/testutil/expected_keepers_mocks.go | 2 +- x/cork/testutil/staking_types.go | 2 +- x/cork/types/expected_keepers.go | 2 +- x/cork/types/v1/cork.go | 2 +- x/cork/types/v1/proposal.go | 2 - x/cork/types/v2/cork.go | 2 +- x/cork/types/v2/cork.pb.go | 53 +- x/cork/types/v2/genesis.pb.go | 2 +- x/cork/types/v2/proposal.go | 3 - x/cork/types/v2/proposal.pb.go | 65 +- x/cork/types/v2/query.pb.go | 104 +- x/cork/types/v2/tx.pb.go | 47 +- x/incentives/keeper/keeper.go | 2 +- x/incentives/keeper/keeper_test.go | 4 +- x/incentives/module.go | 16 +- x/incentives/types/genesis.pb.go | 2 +- x/incentives/types/query.pb.go | 52 +- x/pubsub/keeper/keeper.go | 2 +- x/pubsub/module.go | 18 +- x/pubsub/types/genesis.pb.go | 2 +- x/pubsub/types/params.pb.go | 2 +- x/pubsub/types/proposal.go | 4 - x/pubsub/types/pubsub.pb.go | 90 +- x/pubsub/types/query.pb.go | 169 +- x/pubsub/types/tx.pb.go | 83 +- 126 files changed, 2621 insertions(+), 1673 deletions(-) delete mode 100644 app/sim_test.go create mode 100644 buf.gen.yaml delete mode 100644 third_party/proto/buf.lock delete mode 100644 third_party/proto/buf.yaml diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 2a2f44d66..d60fbcf94 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -20,10 +20,10 @@ jobs: packages: write runs-on: ubuntu-20.04 steps: - - name: Set up Go 1.19 + - name: Set up Go 1.22 uses: actions/setup-go@v2 with: - go-version: 1.19 + go-version: 1.22 - name: checkout uses: actions/checkout@v2 - name: Set up Docker Buildx @@ -128,10 +128,10 @@ jobs: "Pubsub", ] steps: - - name: Set up Go 1.19 + - name: Set up Go 1.22 uses: actions/setup-go@v2 with: - go-version: 1.19 + go-version: 1.22 - name: checkout uses: actions/checkout@v2 - name: go-cache diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d2bedc9e7..c9f61ee46 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.22 - uses: actions/checkout@v2 - uses: technote-space/get-diff-action@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a74a3c00e..3fc2fcd9e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/setup-go@v2 with: - go-version: '1.19' + go-version: '1.22' - run: echo ":rocket::rocket::rocket:" > ../release_notes.md if: startsWith(github.ref, 'refs/tags/') diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 3d875990a..4587997d7 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -12,7 +12,7 @@ jobs: test: strategy: matrix: - go-version: [1.19] + go-version: [1.22] os: [ubuntu-latest] runs-on: ubuntu-latest steps: diff --git a/Dockerfile b/Dockerfile index 08653a1bc..262a88b93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:alpine AS build-env +FROM golang:1.22.2-alpine AS build-env RUN apk add --no-cache curl make git libc-dev bash gcc linux-headers eudev-dev python3 diff --git a/Makefile b/Makefile index 45eb7906d..0cf6219da 100644 --- a/Makefile +++ b/Makefile @@ -211,14 +211,17 @@ test-docker-push: test-docker ############################################################################### ### Protobuf ### ############################################################################### - -PROTO_BUILD_IMAGE=ghcr.io/cosmos/proto-builder:0.8 +protoVer=0.13.1 +protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) +protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) proto-all: proto-format proto-lint proto-gen - + proto-gen: @echo "Generating Protobuf files" - $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(PROTO_BUILD_IMAGE) sh ./scripts/protocgen.sh + # todo: figure out why this old method was failing + # $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen:v0.1 sh ./contrib/local/protocgen.sh + @$(protoImage) sh ./scripts/protocgen.sh proto-format: @echo "Formatting Protobuf files" @@ -364,6 +367,9 @@ e2e_build_images: e2e_clean_slate e2e_clean_slate: @./clean_slate.sh +e2e_test: e2e_clean_slate + @E2E_SKIP_CLEANUP=true integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite || make -s fail + e2e_basic: e2e_clean_slate @integration_tests/integration_tests.test -test.run TestBasicChain -test.failfast -test.v || make -s fail diff --git a/app/app.go b/app/app.go index 22a4e373f..e3f92289e 100644 --- a/app/app.go +++ b/app/app.go @@ -7,15 +7,22 @@ import ( "os" "path/filepath" + "github.com/cosmos/cosmos-sdk/runtime" + + dbm "github.com/cometbft/cometbft-db" + abci "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" "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/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/simapp" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -23,7 +30,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/ante" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/auth/vesting" @@ -37,11 +43,12 @@ import ( "github.com/cosmos/cosmos-sdk/x/capability" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" + consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" "github.com/cosmos/cosmos-sdk/x/crisis" 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" @@ -76,20 +83,20 @@ 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" - ica "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts" - icahost "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host" - icahostkeeper "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/keeper" - icahosttypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types" - ibctransfer "github.com/cosmos/ibc-go/v6/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v6/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v6/modules/core" - ibcclient "github.com/cosmos/ibc-go/v6/modules/core/02-client" - ibcclienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" - ibcporttypes "github.com/cosmos/ibc-go/v6/modules/core/05-port/types" - ibchost "github.com/cosmos/ibc-go/v6/modules/core/24-host" - ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper" + 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" + 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" + ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + ibcporttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + icaexported "github.com/cosmos/ibc-go/v7/modules/core/exported" + ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" "github.com/gorilla/mux" "github.com/peggyjv/gravity-bridge/module/v4/x/gravity" gravityclient "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/client" @@ -119,11 +126,6 @@ import ( pubsubkeeper "github.com/peggyjv/sommelier/v7/x/pubsub/keeper" pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" "github.com/rakyll/statik/fs" - abci "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" - dbm "github.com/tendermint/tm-db" // unnamed import of statik for swagger UI support _ "github.com/cosmos/cosmos-sdk/client/docs/statik" @@ -155,7 +157,6 @@ var ( gov.NewAppModuleBasic( []govclient.ProposalHandler{ paramsclient.ProposalHandler, - distrclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler, gravityclient.ProposalHandler, @@ -222,7 +223,7 @@ var ( cellarfeestypes.ModuleName: true, } - _ simapp.App = (*SommelierApp)(nil) + _ runtime.AppI = (*SommelierApp)(nil) _ servertypes.Application = (*SommelierApp)(nil) ) @@ -243,24 +244,25 @@ type SommelierApp struct { memKeys map[string]*storetypes.MemoryStoreKey // SDK keepers - AccountKeeper authkeeper.AccountKeeper - BankKeeper bankkeeper.Keeper - CapabilityKeeper *capabilitykeeper.Keeper - StakingKeeper stakingkeeper.Keeper - SlashingKeeper slashingkeeper.Keeper - MintKeeper mintkeeper.Keeper - DistrKeeper distrkeeper.Keeper - GovKeeper govkeeper.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 - ICAHostKeeper icahostkeeper.Keeper - EvidenceKeeper evidencekeeper.Keeper - TransferKeeper ibctransferkeeper.Keeper - GravityKeeper gravitykeeper.Keeper - AuthzKeeper authzkeeper.Keeper - FeeGrantKeeper feegrantkeeper.Keeper + AccountKeeper authkeeper.AccountKeeper + BankKeeper bankkeeper.Keeper + CapabilityKeeper *capabilitykeeper.Keeper + StakingKeeper stakingkeeper.Keeper + SlashingKeeper slashingkeeper.Keeper + MintKeeper mintkeeper.Keeper + DistrKeeper distrkeeper.Keeper + GovKeeper govkeeper.Keeper + ConsensusParamsKeeper consensusparamkeeper.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 + ICAHostKeeper icahostkeeper.Keeper + EvidenceKeeper evidencekeeper.Keeper + TransferKeeper ibctransferkeeper.Keeper + GravityKeeper gravitykeeper.Keeper + AuthzKeeper authzkeeper.Keeper + FeeGrantKeeper feegrantkeeper.Keeper // Sommelier keepers CorkKeeper corkkeeper.Keeper @@ -317,12 +319,15 @@ func NewSommelierApp( distrtypes.StoreKey, slashingtypes.StoreKey, govtypes.StoreKey, + consensusparamtypes.StoreKey, paramstypes.StoreKey, - ibchost.StoreKey, + icaexported.StoreKey, upgradetypes.StoreKey, + crisistypes.StoreKey, evidencetypes.StoreKey, ibctransfertypes.StoreKey, icahosttypes.StoreKey, + //icaexported.StoreKey, capabilitytypes.StoreKey, gravitytypes.StoreKey, feegrant.StoreKey, @@ -349,12 +354,16 @@ func NewSommelierApp( } app.ParamsKeeper = initParamsKeeper(appCodec, legacyAmino, keys[paramstypes.StoreKey], tkeys[paramstypes.TStoreKey]) + + authority := authtypes.NewModuleAddress(govtypes.ModuleName).String() + // set the BaseApp's parameter store - bApp.SetParamStore(app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable())) + app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper(appCodec, keys[consensusparamtypes.StoreKey], authority) + bApp.SetParamStore(&app.ConsensusParamsKeeper) // add capability keeper and ScopeToModule for ibc module app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey]) - scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName) + scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(icaexported.ModuleName) scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) scopedICAHostKeeper := app.CapabilityKeeper.ScopeToModule(icahosttypes.SubModuleName) scopedAxelarCorkKeeper := app.CapabilityKeeper.ScopeToModule(axelarcorktypes.ModuleName) @@ -362,50 +371,54 @@ func NewSommelierApp( // add keepers app.AccountKeeper = authkeeper.NewAccountKeeper( - appCodec, keys[authtypes.StoreKey], app.GetSubspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms, appParams.Bech32PrefixAccAddr, + appCodec, keys[authtypes.StoreKey], authtypes.ProtoBaseAccount, maccPerms, appParams.Bech32PrefixAccAddr, authority, ) app.BankKeeper = bankkeeper.NewBaseKeeper( - appCodec, keys[banktypes.StoreKey], app.AccountKeeper, app.GetSubspace(banktypes.ModuleName), app.BlockedAddrs(), + appCodec, keys[banktypes.StoreKey], app.AccountKeeper, app.BlockedAddrs(), authority, ) stakingKeeper := stakingkeeper.NewKeeper( - appCodec, keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName), + appCodec, keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, authority, ) app.MintKeeper = mintkeeper.NewKeeper( - appCodec, keys[minttypes.StoreKey], app.GetSubspace(minttypes.ModuleName), &stakingKeeper, + appCodec, keys[minttypes.StoreKey], stakingKeeper, app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, + authority, ) app.DistrKeeper = distrkeeper.NewKeeper( - appCodec, keys[distrtypes.StoreKey], app.GetSubspace(distrtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - &stakingKeeper, authtypes.FeeCollectorName, + appCodec, keys[distrtypes.StoreKey], app.AccountKeeper, app.BankKeeper, + stakingKeeper, authtypes.FeeCollectorName, + authority, ) app.SlashingKeeper = slashingkeeper.NewKeeper( - appCodec, keys[slashingtypes.StoreKey], &stakingKeeper, app.GetSubspace(slashingtypes.ModuleName), + appCodec, legacyAmino, keys[slashingtypes.StoreKey], stakingKeeper, authority, ) - app.CrisisKeeper = crisiskeeper.NewKeeper( - app.GetSubspace(crisistypes.ModuleName), invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, + app.CrisisKeeper = *crisiskeeper.NewKeeper( + appCodec, app.keys[crisistypes.StoreKey], invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, authority, ) app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper) - app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp, - authtypes.NewModuleAddress(govtypes.ModuleName).String(), + app.UpgradeKeeper = *upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp, + authority, ) // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks - app.StakingKeeper = *stakingKeeper.SetHooks( + stakingKeeper.SetHooks( stakingtypes.NewMultiStakingHooks( app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks(), ), ) + app.StakingKeeper = *stakingKeeper + app.AuthzKeeper = authzkeeper.NewKeeper(keys[authzkeeper.StoreKey], appCodec, app.MsgServiceRouter(), app.AccountKeeper) // Create IBC Keeper app.IBCKeeper = ibckeeper.NewKeeper( appCodec, - keys[ibchost.StoreKey], - app.GetSubspace(ibchost.ModuleName), + keys[icaexported.StoreKey], + app.GetSubspace(icaexported.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, @@ -509,19 +522,27 @@ func NewSommelierApp( 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(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(&app.UpgradeKeeper)). AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)). AddRoute(corktypes.RouterKey, cork.NewProposalHandler(app.CorkKeeper)). AddRoute(axelarcorktypes.RouterKey, axelarcork.NewProposalHandler(app.AxelarCorkKeeper)). AddRoute(gravitytypes.RouterKey, gravity.NewCommunityPoolEthereumSpendProposalHandler(app.GravityKeeper)). AddRoute(auctiontypes.RouterKey, auction.NewSetTokenPricesProposalHandler(app.AuctionKeeper)). AddRoute(pubsubtypes.RouterKey, pubsub.NewPubsubProposalHandler(app.PubsubKeeper)) - app.GovKeeper = govkeeper.NewKeeper( - appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - &stakingKeeper, govRouter, app.MsgServiceRouter(), govtypes.DefaultConfig(), + + app.GovKeeper = *govkeeper.NewKeeper( + appCodec, + keys[govtypes.StoreKey], + app.AccountKeeper, + app.BankKeeper, + stakingKeeper, + app.MsgServiceRouter(), + govtypes.DefaultConfig(), + authority, ) + app.GovKeeper.SetLegacyRouter(govRouter) + // Create static IBC router, add transfer route, then set and seal it ibcRouter := ibcporttypes.NewRouter() ibcRouter. @@ -552,18 +573,18 @@ func NewSommelierApp( app.AccountKeeper, app.StakingKeeper, app.BaseApp.DeliverTx, encodingConfig.TxConfig, ), - auth.NewAppModule(appCodec, app.AccountKeeper, nil), + auth.NewAppModule(appCodec, app.AccountKeeper, nil, app.GetSubspace(authtypes.ModuleName)), vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants), - gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), + bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)), + capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), + crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), + gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)), feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), - upgrade.NewAppModule(app.UpgradeKeeper), + mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)), + slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName)), + distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(distrtypes.ModuleName)), + staking.NewAppModule(appCodec, &app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)), + upgrade.NewAppModule(&app.UpgradeKeeper), evidence.NewAppModule(app.EvidenceKeeper), ibc.NewAppModule(app.IBCKeeper), ica.NewAppModule(nil, &app.ICAHostKeeper), @@ -596,7 +617,7 @@ func NewSommelierApp( banktypes.ModuleName, govtypes.ModuleName, crisistypes.ModuleName, - ibchost.ModuleName, + icaexported.ModuleName, ibctransfertypes.ModuleName, icatypes.ModuleName, genutiltypes.ModuleName, @@ -618,7 +639,7 @@ func NewSommelierApp( crisistypes.ModuleName, govtypes.ModuleName, stakingtypes.ModuleName, - ibchost.ModuleName, + icaexported.ModuleName, ibctransfertypes.ModuleName, icatypes.ModuleName, capabilitytypes.ModuleName, @@ -663,7 +684,7 @@ func NewSommelierApp( minttypes.ModuleName, crisistypes.ModuleName, genutiltypes.ModuleName, - ibchost.ModuleName, + icaexported.ModuleName, ibctransfertypes.ModuleName, icatypes.ModuleName, evidencetypes.ModuleName, @@ -682,7 +703,6 @@ func NewSommelierApp( ) app.mm.RegisterInvariants(&app.CrisisKeeper) - app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino) app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) app.mm.RegisterServices(app.configurator) @@ -693,21 +713,24 @@ func NewSommelierApp( // NOTE: this is not required apps that don't use the simulator for fuzz testing // transactions app.sm = module.NewSimulationManager( - auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), + auth.NewAppModule(appCodec, app.AccountKeeper, nil, app.GetSubspace(authtypes.ModuleName)), + bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)), + capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), + gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)), feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil), - staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - params.NewAppModule(app.ParamsKeeper), + mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)), + slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName)), + distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(distrtypes.ModuleName)), + staking.NewAppModule(appCodec, &app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)), evidence.NewAppModule(app.EvidenceKeeper), ibc.NewAppModule(app.IBCKeeper), + ica.NewAppModule(nil, &app.ICAHostKeeper), + params.NewAppModule(app.ParamsKeeper), + transferModule, + axelarcork.NewAppModule(app.AxelarCorkKeeper, appCodec), + gravity.NewAppModule(app.GravityKeeper, app.BankKeeper), authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), cork.NewAppModule(app.CorkKeeper, appCodec), - axelarcork.NewAppModule(app.AxelarCorkKeeper, appCodec), incentives.NewAppModule(app.IncentivesKeeper, app.DistrKeeper, app.BankKeeper, app.MintKeeper, appCodec), cellarfees.NewAppModule(app.CellarFeesKeeper, appCodec, app.AccountKeeper, app.BankKeeper, app.MintKeeper, app.CorkKeeper, app.AuctionKeeper), auction.NewAppModule(app.AuctionKeeper, app.BankKeeper, app.AccountKeeper, appCodec), @@ -890,6 +913,7 @@ func (app *SommelierApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config. tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register grpc-gateway routes for all modules. ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) + nodeservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // register swagger API from root so that other applications can override easily if apiConfig.Swagger { @@ -897,6 +921,11 @@ func (app *SommelierApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config. } } +// RegisterNodeService registers the node gRPC Query service. +func (app *SommelierApp) RegisterNodeService(clientCtx client.Context) { + nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter()) +} + // RegisterTxService implements the Application.RegisterTxService method. func (app *SommelierApp) RegisterTxService(clientCtx client.Context) { authtx.RegisterTxService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.BaseApp.Simulate, app.interfaceRegistry) @@ -940,7 +969,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypesv1.ParamKeyTable()) paramsKeeper.Subspace(crisistypes.ModuleName) paramsKeeper.Subspace(ibctransfertypes.ModuleName) - paramsKeeper.Subspace(ibchost.ModuleName) + paramsKeeper.Subspace(icaexported.ModuleName) paramsKeeper.Subspace(icahosttypes.SubModuleName) paramsKeeper.Subspace(gravitytypes.ModuleName) paramsKeeper.Subspace(corktypes.ModuleName) diff --git a/app/app_test.go b/app/app_test.go index f4f02af90..66c3dd63f 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -5,10 +5,15 @@ import ( "testing" "time" + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + tmjson "github.com/cometbft/cometbft/libs/json" + "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/simapp" "github.com/cosmos/cosmos-sdk/testutil/mock" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -16,16 +21,10 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" appparams "github.com/peggyjv/sommelier/v7/app/params" "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" - tmjson "github.com/tendermint/tendermint/libs/json" - "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" ) -var DefaultConsensusParams = &abci.ConsensusParams{ - Block: &abci.BlockParams{ +var DefaultConsensusParams = &tmproto.ConsensusParams{ + Block: &tmproto.BlockParams{ MaxBytes: 200000, MaxGas: 2000000, }, @@ -58,7 +57,7 @@ func TestSommelierAppExport(t *testing.T) { } db := dbm.NewMemDB() - app := NewSommelierApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig(), simapp.EmptyAppOptions{}) + app := NewSommelierApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig(), EmptyAppOptions{}) genesisState := NewDefaultGenesisState() genesisState = genesisStateWithValSet(t, app, genesisState, valSet, []authtypes.GenesisAccount{acc}, balance) @@ -78,15 +77,15 @@ func TestSommelierAppExport(t *testing.T) { app.Commit() // Making a new app object with the db, so that initchain hasn't been called - app2 := NewSommelierApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig(), simapp.EmptyAppOptions{}) - _, err = app2.ExportAppStateAndValidators(false, []string{}) + app2 := NewSommelierApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig(), EmptyAppOptions{}) + _, err = app2.ExportAppStateAndValidators(false, []string{}, app.mm.ModuleNames()) require.NoError(t, err, "ExportAppStateAndValidators should not have an error") } // ensure that blocked addresses are properly set in bank keeper func TestBlockedAddrs(t *testing.T) { db := dbm.NewMemDB() - app := NewSommelierApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig(), simapp.EmptyAppOptions{}) + app := NewSommelierApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig(), EmptyAppOptions{}) for acc := range maccPerms { require.Equal(t, !allowedReceivingModAcc[acc], app.BankKeeper.BlockedAddr(app.AccountKeeper.GetModuleAddress(acc))) @@ -156,8 +155,14 @@ func genesisStateWithValSet(t *testing.T, }) // update total supply - bankGenesis := banktypes.NewGenesisState(banktypes.DefaultGenesisState().Params, balances, totalSupply, []banktypes.Metadata{}) + bankGenesis := banktypes.NewGenesisState(banktypes.DefaultGenesisState().Params, balances, totalSupply, []banktypes.Metadata{}, []banktypes.SendEnabled{}) genesisState[banktypes.ModuleName] = app.AppCodec().MustMarshalJSON(bankGenesis) return genesisState } + +type EmptyAppOptions struct{} + +func (ao EmptyAppOptions) Get(o string) interface{} { + return nil +} diff --git a/app/export.go b/app/export.go index 9440de66f..29d7aab1b 100644 --- a/app/export.go +++ b/app/export.go @@ -4,7 +4,7 @@ import ( "encoding/json" "log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -16,7 +16,7 @@ import ( // ExportAppStateAndValidators exports the state of the application for a genesis // file. func (app *SommelierApp) 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 := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) @@ -29,13 +29,13 @@ func (app *SommelierApp) ExportAppStateAndValidators( app.prepForZeroHeightGenesis(ctx, jailAllowedAddrs) } - genState := app.mm.ExportGenesis(ctx, app.appCodec) + genState := app.mm.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) appState, err := json.MarshalIndent(genState, "", " ") if err != nil { return servertypes.ExportedApp{}, err } - validators, err := staking.WriteValidators(ctx, app.StakingKeeper) + validators, err := staking.WriteValidators(ctx, &app.StakingKeeper) return servertypes.ExportedApp{ AppState: appState, Validators: validators, diff --git a/app/sim_test.go b/app/sim_test.go deleted file mode 100644 index e29456e7a..000000000 --- a/app/sim_test.go +++ /dev/null @@ -1,141 +0,0 @@ -package app_test - -import ( - "encoding/json" - "fmt" - "os" - "testing" - - sommelier "github.com/peggyjv/sommelier/v7/app" - - "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/libs/log" - "github.com/tendermint/tendermint/libs/rand" - dbm "github.com/tendermint/tm-db" - - "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/simapp" - "github.com/cosmos/cosmos-sdk/store" - simulation2 "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/simulation" -) - -func init() { - simapp.GetSimulatorFlags() -} - -// Profile with: -// /usr/local/go/bin/go test -benchmem -run=^$ github.com/cosmos/cosmos-sdk/GaiaApp -bench ^BenchmarkFullAppSimulation$ -Commit=true -cpuprofile cpu.out -func BenchmarkFullAppSimulation(b *testing.B) { - config, db, dir, logger, _, err := simapp.SetupSimulation("goleveldb-app-sim", "Simulation") - if err != nil { - b.Fatalf("simulation setup failed: %s", err.Error()) - } - - defer func() { - db.Close() - err = os.RemoveAll(dir) - if err != nil { - b.Fatal(err) - } - }() - - app := sommelier.NewSommelierApp(logger, db, nil, true, map[int64]bool{}, sommelier.DefaultNodeHome, simapp.FlagPeriodValue, sommelier.MakeEncodingConfig(), simapp.EmptyAppOptions{}, interBlockCacheOpt()) - - // Run randomized simulation:w - _, simParams, simErr := simulation.SimulateFromSeed( - b, - os.Stdout, - app.BaseApp, - simapp.AppStateFn(app.AppCodec(), app.SimulationManager()), - simulation2.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - simapp.SimulationOperations(app, app.AppCodec(), config), - app.ModuleAccountAddrs(), - config, - app.AppCodec(), - ) - - // export state and simParams before the simulation error is checked - if err = simapp.CheckExportSimulation(app, config, simParams); err != nil { - b.Fatal(err) - } - - if simErr != nil { - b.Fatal(simErr) - } - - if config.Commit { - simapp.PrintStats(db) - } -} - -// interBlockCacheOpt returns a BaseApp option function that sets the persistent -// inter-block write-through cache. -func interBlockCacheOpt() func(*baseapp.BaseApp) { - return baseapp.SetInterBlockCache(store.NewCommitKVStoreCacheManager()) -} - -func TestAppStateDeterminism(t *testing.T) { - if !simapp.FlagEnabledValue { - t.Skip("skipping application simulation") - } - - config := simapp.NewConfigFromFlags() - config.InitialBlockHeight = 1 - config.ExportParamsPath = "" - config.OnOperation = false - config.AllInvariants = false - config.ChainID = "sommerlier-1" - - numSeeds := 3 - numTimesToRunPerSeed := 5 - appHashList := make([]json.RawMessage, numTimesToRunPerSeed) - - for i := 0; i < numSeeds; i++ { - config.Seed = rand.Int63() - - for j := 0; j < numTimesToRunPerSeed; j++ { - var logger log.Logger - if simapp.FlagVerboseValue { - logger = log.TestingLogger() - } else { - logger = log.NewNopLogger() - } - - db := dbm.NewMemDB() - app := sommelier.NewSommelierApp(logger, db, nil, true, map[int64]bool{}, sommelier.DefaultNodeHome, simapp.FlagPeriodValue, sommelier.MakeEncodingConfig(), simapp.EmptyAppOptions{}, interBlockCacheOpt()) - - fmt.Printf( - "running non-determinism simulation; seed %d: %d/%d, attempt: %d/%d\n", - config.Seed, i+1, numSeeds, j+1, numTimesToRunPerSeed, - ) - - _, _, err := simulation.SimulateFromSeed( - t, - os.Stdout, - app.BaseApp, - simapp.AppStateFn(app.AppCodec(), app.SimulationManager()), - simulation2.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - simapp.SimulationOperations(app, app.AppCodec(), config), - app.ModuleAccountAddrs(), - config, - app.AppCodec(), - ) - require.NoError(t, err) - - if config.Commit { - simapp.PrintStats(db) - } - - appHash := app.LastCommitID().Hash - appHashList[j] = appHash - - if j != 0 { - require.Equal( - t, string(appHashList[0]), string(appHashList[j]), - "non-determinism in seed %d: %d/%d, attempt: %d/%d\n", config.Seed, i+1, numSeeds, j+1, numTimesToRunPerSeed, - ) - } - } - } -} diff --git a/app/test_setup.go b/app/test_setup.go index 8cea6dd93..81d36d7cd 100644 --- a/app/test_setup.go +++ b/app/test_setup.go @@ -3,11 +3,11 @@ package app import ( "encoding/json" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/log" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" - "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cosmos/cosmos-sdk/testutil/sims" ) // Setup initializes a new SimApp. A Nop logger is set in SimApp. @@ -24,7 +24,7 @@ func Setup(isCheckTx bool) *SommelierApp { app.InitChain( abci.RequestInitChain{ Validators: []abci.ValidatorUpdate{}, - ConsensusParams: simapp.DefaultConsensusParams, + ConsensusParams: sims.DefaultConsensusParams, AppStateBytes: stateBytes, }, ) @@ -36,7 +36,7 @@ func Setup(isCheckTx bool) *SommelierApp { func setup(withGenesis bool, invCheckPeriod uint) (*SommelierApp, GenesisState) { db := dbm.NewMemDB() encCdc := MakeEncodingConfig() - app := NewSommelierApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, invCheckPeriod, encCdc, simapp.EmptyAppOptions{}) + app := NewSommelierApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, invCheckPeriod, encCdc, sims.EmptyAppOptions{}) if withGenesis { return app, NewDefaultGenesisState() } diff --git a/app/upgrades/v6/upgrades.go b/app/upgrades/v6/upgrades.go index ba0add25d..91d5a5da5 100644 --- a/app/upgrades/v6/upgrades.go +++ b/app/upgrades/v6/upgrades.go @@ -10,11 +10,11 @@ import ( govtypesv1beta1 "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/v6/modules/apps/27-interchain-accounts" - icacontrollertypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/controller/types" - icahosttypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types" - transfertypes "github.com/cosmos/ibc-go/v6/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" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ) func CreateUpgradeHandler( diff --git a/app/upgrades/v7/upgrades.go b/app/upgrades/v7/upgrades.go index 1d13ce00a..2fe2f005f 100644 --- a/app/upgrades/v7/upgrades.go +++ b/app/upgrades/v7/upgrades.go @@ -10,9 +10,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - icahostkeeper "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/keeper" - icahosttypes "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types" - ibctransfertypes "github.com/cosmos/ibc-go/v6/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" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" auctionkeeper "github.com/peggyjv/sommelier/v7/x/auction/keeper" auctiontypes "github.com/peggyjv/sommelier/v7/x/auction/types" axelarcorkkeeper "github.com/peggyjv/sommelier/v7/x/axelarcork/keeper" diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 000000000..cd492c256 --- /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 diff --git a/buf.work.yaml b/buf.work.yaml index 494296bfa..1878b341b 100644 --- a/buf.work.yaml +++ b/buf.work.yaml @@ -1,4 +1,3 @@ version: v1 directories: - proto - - third_party/proto diff --git a/cmd/sommelier/cmd/root.go b/cmd/sommelier/cmd/root.go index 103d14a1f..d670a94ad 100644 --- a/cmd/sommelier/cmd/root.go +++ b/cmd/sommelier/cmd/root.go @@ -4,6 +4,10 @@ import ( "io" "os" + dbm "github.com/cometbft/cometbft-db" + tmcfg "github.com/cometbft/cometbft/config" + tmcli "github.com/cometbft/cometbft/libs/cli" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" @@ -22,10 +26,6 @@ import ( genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" "github.com/spf13/cast" "github.com/spf13/cobra" - tmcfg "github.com/tendermint/tendermint/config" - tmcli "github.com/tendermint/tendermint/libs/cli" - "github.com/tendermint/tendermint/libs/log" - dbm "github.com/tendermint/tm-db" bridgecmd "github.com/peggyjv/gravity-bridge/module/v4/cmd/gravity/cmd" "github.com/peggyjv/sommelier/v7/app" @@ -43,7 +43,7 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { WithLegacyAmino(encodingConfig.Amino). WithInput(os.Stdin). WithAccountRetriever(types.AccountRetriever{}). - WithBroadcastMode(flags.BroadcastBlock). + WithBroadcastMode(flags.BroadcastSync). WithHomeDir(app.DefaultNodeHome). WithViper("SOMMELIER") @@ -200,8 +200,15 @@ func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts serverty } func createSimappAndExport( - logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string, - appOpts servertypes.AppOptions) (servertypes.ExportedApp, error) { + logger log.Logger, + db dbm.DB, + traceStore io.Writer, + height int64, + forZeroHeight bool, + jailAllowedAddrs []string, + appOpts servertypes.AppOptions, + modulesToExport []string, +) (servertypes.ExportedApp, error) { encCfg := app.MakeEncodingConfig() // Ideally, we would reuse the one created by NewRootCmd. encCfg.Marshaler = codec.NewProtoCodec(encCfg.InterfaceRegistry) @@ -216,5 +223,5 @@ func createSimappAndExport( sommelierApp = app.NewSommelierApp(logger, db, traceStore, true, map[int64]bool{}, "", uint(1), encCfg, appOpts) } - return sommelierApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs) + return sommelierApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport) } diff --git a/cmd/sommelier/cmd/testnet.go b/cmd/sommelier/cmd/testnet.go index d05e6672b..54584f705 100644 --- a/cmd/sommelier/cmd/testnet.go +++ b/cmd/sommelier/cmd/testnet.go @@ -10,15 +10,15 @@ import ( "os" "path/filepath" + tmconfig "github.com/cometbft/cometbft/config" + tmos "github.com/cometbft/cometbft/libs/os" + tmrand "github.com/cometbft/cometbft/libs/rand" + "github.com/cometbft/cometbft/types" + tmtime "github.com/cometbft/cometbft/types/time" ccrypto "github.com/cosmos/cosmos-sdk/crypto/types" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/testutil" "github.com/spf13/cobra" - tmconfig "github.com/tendermint/tendermint/config" - tmos "github.com/tendermint/tendermint/libs/os" - tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -41,6 +41,7 @@ var ( flagOutputDir = "output-dir" flagNodeDaemonHome = "node-daemon-home" flagStartingIPAddress = "starting-ip-address" + flagKeyAlgorithm = "key-algorithm" ) // get cmd to initialize all files for tendermint testnet and application @@ -70,7 +71,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(flagKeyAlgorithm) return InitTestnet( clientCtx, cmd, config, mbm, genBalIterator, outputDir, chainID, minGasPrices, @@ -87,7 +88,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(flagKeyAlgorithm, string(hd.Secp256k1Type), "Key signing algorithm to generate keys for") return cmd } @@ -335,7 +336,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/go.mod b/go.mod index bb44658d3..31f0a13b3 100644 --- a/go.mod +++ b/go.mod @@ -1,56 +1,63 @@ module github.com/peggyjv/sommelier/v7 -go 1.19 +go 1.22 + +toolchain go1.22.2 require ( - cosmossdk.io/errors v1.0.0-beta.7 - cosmossdk.io/math v1.0.0-rc.0 - github.com/cosmos/cosmos-proto v1.0.0-alpha8 - github.com/cosmos/cosmos-sdk v0.46.14 + cosmossdk.io/errors v1.0.1 + cosmossdk.io/math v1.3.0 + github.com/cometbft/cometbft v0.37.4 + github.com/cometbft/cometbft-db v0.11.0 + github.com/cosmos/cosmos-proto v1.0.0-beta.4 + github.com/cosmos/cosmos-sdk v0.47.10 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/gogoproto v1.4.8 - github.com/cosmos/ibc-go/v6 v6.2.0 + github.com/cosmos/gogoproto v1.4.10 + github.com/cosmos/ibc-go/v7 v7.3.2 github.com/ethereum/go-ethereum v1.10.22 - github.com/gogo/protobuf v1.3.3 + github.com/gogo/protobuf v1.3.2 github.com/golang/mock v1.6.0 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/miguelmota/go-ethereum-hdwallet v0.1.1 github.com/ory/dockertest/v3 v3.10.0 - github.com/peggyjv/gravity-bridge/module/v4 v4.0.1 + github.com/peggyjv/gravity-bridge/module/v4 v4.0.2-0.20240507144821-c36490e18116 github.com/rakyll/statik v0.1.7 github.com/regen-network/cosmos-proto v0.3.1 - github.com/spf13/cast v1.5.0 - github.com/spf13/cobra v1.6.1 - github.com/spf13/viper v1.14.0 - github.com/stretchr/testify v1.8.2 - github.com/tendermint/tendermint v0.34.29 - github.com/tendermint/tm-db v0.6.7 - google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 - google.golang.org/grpc v1.54.0 + github.com/spf13/cast v1.6.0 + github.com/spf13/cobra v1.8.0 + github.com/spf13/viper v1.18.1 + github.com/stretchr/testify v1.8.4 + google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 + google.golang.org/grpc v1.61.1 gopkg.in/yaml.v2 v2.4.0 ) require ( - cloud.google.com/go v0.110.0 // indirect - cloud.google.com/go/compute v1.18.0 // indirect + cloud.google.com/go v0.111.0 // indirect + cloud.google.com/go/compute v1.23.3 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v0.12.0 // indirect - cloud.google.com/go/storage v1.28.1 // indirect - filippo.io/edwards25519 v1.0.0-rc.1 // indirect + cloud.google.com/go/iam v1.1.5 // indirect + cloud.google.com/go/storage v1.35.1 // indirect + cosmossdk.io/api v0.3.1 // indirect + cosmossdk.io/core v0.5.1 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/log v1.3.1 // indirect + cosmossdk.io/tools/rosetta v0.2.1 // indirect + filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/keyring v1.2.1 // indirect - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect - github.com/Microsoft/go-winio v0.6.0 // indirect + github.com/DataDog/zstd v1.5.0 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/StackExchange/wmi v1.2.1 // indirect - github.com/Workiva/go-datastructures v1.0.53 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.40.45 // 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.0 // indirect + github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd v0.22.1 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect @@ -58,50 +65,60 @@ require ( github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect + github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect - github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect - github.com/cometbft/cometbft-db v0.7.0 // indirect + github.com/cockroachdb/errors v1.11.1 // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/pebble v1.1.0 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/containerd/continuity v0.3.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/gorocksdb v1.2.0 // indirect - github.com/cosmos/iavl v0.19.6 // indirect + github.com/cosmos/gogogateway v1.2.0 // indirect + github.com/cosmos/iavl v0.20.1 // indirect + github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.12.4 // 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/danieljoos/wincred v1.1.2 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/deckarep/golang-set v1.8.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect - github.com/dgraph-io/ristretto v0.1.0 // indirect + github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect - github.com/docker/cli v20.10.17+incompatible // indirect - github.com/docker/docker v20.10.19+incompatible // indirect + github.com/docker/cli v23.0.1+incompatible // indirect + github.com/docker/docker v23.0.1+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/dustin/go-humanize v1.0.0 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/getsentry/sentry-go v0.23.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-stack/stack v1.8.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // 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/golang/glog v1.1.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect + github.com/google/s2a-go v0.1.7 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // 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.7.0 // indirect + github.com/google/uuid v1.4.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect + github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect @@ -109,98 +126,120 @@ require ( github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.6.1 // indirect + github.com/hashicorp/go-getter v1.7.1 // indirect github.com/hashicorp/go-immutable-radix v1.3.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/huandu/skiplist v1.2.0 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect - github.com/klauspost/compress v1.16.0 // indirect + github.com/klauspost/compress v1.17.0 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/magiconair/properties v1.8.6 // indirect + github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.18 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // 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/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect + github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/opencontainers/runc v1.1.5 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.7 // indirect + github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.14.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rjeczalik/notify v0.9.1 // indirect - github.com/rs/cors v1.8.2 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect + github.com/rs/cors v1.8.3 // indirect + github.com/rs/zerolog v1.32.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/sirupsen/logrus v1.9.0 // indirect - github.com/spf13/afero v1.9.2 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/subosito/gotenv v1.4.1 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.5.0 // indirect + github.com/tidwall/btree v1.6.0 // indirect github.com/tklauser/go-sysconf v0.3.9 // indirect github.com/tklauser/numcpus v0.3.0 // indirect github.com/tyler-smith/go-bip39 v1.0.2 // indirect - github.com/ulikunitz/xz v0.5.8 // indirect + github.com/ulikunitz/xz v0.5.11 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // indirect - go.etcd.io/bbolt v1.3.6 // indirect + go.etcd.io/bbolt v1.3.8 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.7.0 // indirect - golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0 // indirect - golang.org/x/mod v0.9.0 // indirect - golang.org/x/net v0.9.0 // indirect - golang.org/x/oauth2 v0.5.0 // indirect - golang.org/x/sys v0.7.0 // indirect - golang.org/x/term v0.7.0 // indirect - golang.org/x/text v0.9.0 // indirect - golang.org/x/tools v0.7.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.110.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.30.0 // indirect + go.opentelemetry.io/otel v1.19.0 // indirect + go.opentelemetry.io/otel/metric v1.19.0 // indirect + go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/crypto v0.18.0 // indirect + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/oauth2 v0.15.0 // indirect + golang.org/x/sync v0.5.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/term v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.13.0 // indirect + google.golang.org/api v0.153.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect + google.golang.org/protobuf v1.32.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + pgregory.net/rapid v1.1.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) -replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 +replace ( + github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 + + github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 + + 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 + + golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb +) -replace github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76 +// exclusion so we use v1.0.0 +exclude github.com/coinbase/rosetta-sdk-go v0.7.9 -// use cometbft -replace github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.28 +exclude github.com/cosmos/cosmos-sdk v0.50.1 -// replace broken goleveldb -replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 +exclude github.com/cometbft/cometbft v0.38.0 diff --git a/go.sum b/go.sum index dd41d8054..3940bcb0e 100644 --- a/go.sum +++ b/go.sum @@ -19,54 +19,531 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go 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.111.0 h1:YHLKNupSD1KqjDbQ3+LVdQ81h/UJbJyZG203cEfnQgM= +cloud.google.com/go v0.111.0/go.mod h1:0mibmpKP1TyOOFYQY5izo0LnT+ecvOQ0Sg3OdmMiNRU= +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/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= +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/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= +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/aiplatform v1.35.0/go.mod h1:7MFT/vCaOyZT/4IIFfxH4ErVg/4ku6lKv3w0+tFTgXQ= +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/analytics v0.18.0/go.mod h1:ZkeHGQlcIPkw0R/GW+boWHhCOR43xz9RN/jn7WcqfIE= +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/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= +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/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= +cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= +cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= +cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= +cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= +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/appengine v1.6.0/go.mod h1:hg6i0J/BD2cKmDJbaFSYHFyZkgBEfQrDg/X0V5fJn84= +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/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= +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/artifactregistry v1.11.2/go.mod h1:nLZns771ZGAwVLzTX/7Al6R9ehma4WUEhZGWV6CeQNQ= +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/asset v1.11.1/go.mod h1:fSwLhbRvC9p9CXQHJ3BgFeQNM4c9x10lqlrdEUYXlJo= +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/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= +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/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= +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/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= +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/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= +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/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= 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= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= 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/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm0Nf1fysJac= cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= -cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= +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/billing v1.12.0/go.mod h1:yKrZio/eu+okO/2McZEbch17O5CB5NpZhhXG6Z766ss= +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/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= +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/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= +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/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= +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/cloudbuild v1.7.0/go.mod h1:zb5tWh2XI6lR9zQmsm1VRA+7OCuve5d8S+zJUul8KTg= +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/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= +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/cloudtasks v1.9.0/go.mod h1:w+EyLsVkLWHcOaqNEyvcKAsWp9p29dL6uL9Nst1cI7Y= +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.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= +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/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= +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/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= +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/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= +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/datacatalog v1.8.1/go.mod h1:RJ58z4rMp3gvETA465Vg+ag8BGgBdnRPEMMSTr5Uv+M= +cloud.google.com/go/datacatalog v1.12.0/go.mod h1:CWae8rFkfp6LzLumKOnmVh4+Zle4A3NXLzVJ1d1mRm0= +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/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= +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/dataform v0.6.0/go.mod h1:QPflImQy33e29VuapFdf19oPbE4aYTJxr31OAPV+ulA= +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/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= +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/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= +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/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= +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/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= +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/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= 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/iam v0.12.0 h1:DRtTY29b75ciH6Ov1PHb4/iat2CLCvrOm40Q0a6DFpE= +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/datastream v1.6.0/go.mod h1:6LQSuswqLa7S4rPAOZFVjHIG3wJIjZcZrw8JDEDJuIs= +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/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= +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/dialogflow v1.31.0/go.mod h1:cuoUccuL1Z+HADhyIA7dci3N5zUssgpBJmCzI6fNRB4= +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/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= +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/documentai v1.16.0/go.mod h1:o0o0DLTEZ+YnJZ+J4wNfTxmDVyrkzFvttBXXtYRMHkM= +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/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= +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/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= +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/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= +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/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= +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/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= +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/functions v1.10.0/go.mod h1:0D3hEOe3DbEvCXtYOZHQZmD+SzYsi1YbI7dGvHfldXw= +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/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0= +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/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= +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/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= +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/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= +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/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= +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/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= +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/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= +cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= +cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= +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/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= +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/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= +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/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= +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/kms v1.9.0/go.mod h1:qb1tPTgfF9RQP8e1wq4cLFErVuTJv7UsSC915J8dh3w= +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/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= +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/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= +cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= +cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= +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/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= +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/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= +cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= +cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= +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/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= +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/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= +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/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= +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/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= +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/networkconnectivity v1.10.0/go.mod h1:UP4O4sWXJG13AqrTdQCD9TnLGEbtNRqjuaaA7bNjF5E= +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/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= +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/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= +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/notebooks v1.7.0/go.mod h1:PVlaDGfJgj1fl1S3dUwhFMXFgfYGhYQt2164xOMONmE= +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/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= +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/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= +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/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= +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/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= +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/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= +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/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= +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/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= +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/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +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/pubsub v1.28.0/go.mod h1:vuXFpwaVoIPQMGXqRyUQigu/AX1S3IWugR9xznmcXX8= +cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= +cloud.google.com/go/pubsublite v1.6.0/go.mod h1:1eFCS0U11xlOuMFV/0iBqw3zP12kddMeCbj/F3FSj9k= +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/recaptchaenterprise/v2 v2.6.0/go.mod h1:RPauz9jeLtB3JVzg6nCbe12qNoaa8pXc4d/YukAmcnA= +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/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= +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/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= +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/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= +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/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= +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/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= +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/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= +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/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= +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/scheduler v1.8.0/go.mod h1:TCET+Y5Gp1YgHT8py4nlg2Sew8nUHMqcpousDgXJVQc= +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/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= +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/security v1.12.0/go.mod h1:rV6EhrpbNHrrxqlvW0BWAIawFWq3X90SduMJdFwtLB8= +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/securitycenter v1.18.1/go.mod h1:0/25gAzCM/9OL9vVx4ChPeM/+DlfGQJDwBy/UC8AKK0= +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/servicecontrol v1.11.0/go.mod h1:kFmTzYzTUIuZs0ycVqRHNaNhgR+UMUpw9n02l/pY+mc= +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/servicedirectory v1.8.0/go.mod h1:srXodfhY1GFIPvltunswqXpVxFPpZjf8nkKQT7XcXaY= +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/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= +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/serviceusage v1.5.0/go.mod h1:w8U1JvqUqwJNPEOTQjrMHkw3IaIFLoLsPLvsE3xueec= +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/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= +cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= +cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= +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/speech v1.14.1/go.mod h1:gEosVRPJ9waG7zqqnsHpYTOoAS4KouMRLDFMekpJ0J0= 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= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.28.1 h1:F5QDG5ChchaAVQhINh24U99OWHURqrW8OmQcGKXcbgI= +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.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w= +cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= +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/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= +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/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= +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/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= +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/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= +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/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= +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/translate v1.6.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= +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/video v1.13.0/go.mod h1:ulzkYlYgCp15N2AokzKjy7MQ9ejuynOJdf1tR5lGthk= +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/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= +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/vision/v2 v2.6.0/go.mod h1:158Hes0MvOS9Z/bDMSFpjwsUrZ5fPrdwuyyvKSGAGMY= +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/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= +cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= +cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= +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/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= +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/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= +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/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= +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= +cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= -cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= -cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= -cosmossdk.io/math v1.0.0-rc.0 h1:ml46ukocrAAoBpYKMidF0R2tQJ1Uxfns0yH8wqgMAFc= -cosmossdk.io/math v1.0.0-rc.0/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= -filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -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= +cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= +cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= +cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= +cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= +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.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= +cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= +cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= +filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= +filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= +git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= 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= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= -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-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= @@ -78,15 +555,16 @@ github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/DATA-DOG/go-sqlmock v1.3.3/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.5.0 h1:+K/VEwIAaPcHiMtQvpLD4lqW7f0Gk3xdYZmI1hD+CXo= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= -github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= @@ -100,13 +578,14 @@ github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c 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.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/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/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/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= @@ -115,10 +594,13 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= +github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/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= @@ -127,10 +609,10 @@ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.40.45 h1:QN1nsY27ssD/JmW4s83qmSb+uL6DG4GmCDzjmJB4xUI= -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/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= @@ -147,25 +629,24 @@ 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 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= 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= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= +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/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.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= -github.com/btcsuite/btcd/btcec/v2 v2.1.2/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= 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.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/btcsuite/btcd/btcutil v1.1.2/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= 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-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= @@ -177,8 +658,8 @@ 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/protocompile v0.1.0 h1:HjgJBI85hY/qmW5tw/66sNDZ7z0UDdVSi/5r40WHw4s= -github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= @@ -187,6 +668,8 @@ github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInq github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= @@ -196,12 +679,15 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= +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/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= +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.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= @@ -211,23 +697,42 @@ github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3h 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-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/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/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= +github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= +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/pebble v1.1.0 h1:pcFh8CdCIt2kmEpK0OIatq67Ln9uGDYY3d5XnE0LJG4= +github.com/cockroachdb/pebble v1.1.0/go.mod h1:sEHm5NOXxyiAoKWhoFxT8xMgd/f3RA6qUqQ1BXKrh2E= +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/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= 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.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= -github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= -github.com/cometbft/cometbft v0.34.28 h1:gwryf55P1SWMUP4nOXpRVI2D0yPoYEzN+IBqmRBOsDc= -github.com/cometbft/cometbft v0.34.28/go.mod h1:L9shMfbkZ8B+7JlwANEr+NZbBcn+hBpwdbeYvA5rLCw= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= +github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= +github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= +github.com/cometbft/cometbft v0.37.4 h1:xyvvEqlyfK8MgNIIKVJaMsuIp03wxOcFmVkT26+Ikpg= +github.com/cometbft/cometbft v0.37.4/go.mod h1:Cmg5Hp4sNpapm7j+x0xRyt2g0juQfmB752ous+pA0G8= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= 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= -github.com/consensys/gnark-crypto v0.5.3/go.mod h1:hOdPlWQV1gDLp7faZVeg8Y0iEPFaOUnCc4XeCCk96p0= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= @@ -240,37 +745,40 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= 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-alpha8 h1:d3pCRuMYYvGA5bM0ZbbjKn+AoQD4A7dyNG2wzwWalUw= -github.com/cosmos/cosmos-proto v1.0.0-alpha8/go.mod h1:6/p+Bc4O8JKeZqe0VqUGTX31eoYqemTT4C1hLCWsO7I= -github.com/cosmos/cosmos-sdk v0.46.14 h1:xlrUaMZT6QACdtWputs+ZxbAMWGYktWK+zlc8J4tKoE= -github.com/cosmos/cosmos-sdk v0.46.14/go.mod h1:9MRixWsgoJ2UmVsCRRePtENFPP3cM+gTC5azEpxgllo= +github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= +github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= +github.com/cosmos/cosmos-sdk v0.47.10 h1:Wxf5yEN3jZbG4fftxAMKB6rpd8ME0mxuCVihpz65dt0= +github.com/cosmos/cosmos-sdk v0.47.10/go.mod h1:UWpgWkhcsBIATS68uUC0del7IiBN4hPv/vqg8Zz23uw= 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.8 h1:BrHKc6WFZt8+jRV71vKSQE+JrfF+JAnzrKo2VP7wIZ4= -github.com/cosmos/gogoproto v1.4.8/go.mod h1:hnb0DIEWTv+wdNzNcqus5xCQXq5+CXauq1FJuurRfVY= -github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= -github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= -github.com/cosmos/iavl v0.19.6 h1:XY78yEeNPrEYyNCKlqr9chrwoeSDJ0bV2VjocTk//OU= -github.com/cosmos/iavl v0.19.6/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/ibc-go/v6 v6.2.0 h1:HKS5WNxQrlmjowHb73J9LqlNJfvTnvkbhXZ9QzNTU7Q= -github.com/cosmos/ibc-go/v6 v6.2.0/go.mod h1:+S3sxcNwOhgraYDJAhIFDg5ipXHaUnJrg7tOQqGyWlc= +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.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= +github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= +github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= +github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= +github.com/cosmos/ibc-go/v7 v7.3.2 h1:FeUDcBX7VYY0e0iRmcVkPPUjYfAqIc//QuHXo8JHz9c= +github.com/cosmos/ibc-go/v7 v7.3.2/go.mod h1:IMeOXb7gwpZ+/nOG5BuUkdW4weM1ezvN4PQPws4uzOI= +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.1.7-0.20210622111912-ef00f8ac3d76 h1:DdzS1m6o/pCqeZ8VOAit/gyATedRgjvkVI+UCrLpyuU= github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76/go.mod h1:0mkLWIoZuQ7uBoospo5Q9zIpqq6rYCPJDSUdeCJvPM8= github.com/cosmos/ledger-cosmos-go v0.12.4 h1:drvWt+GJP7Aiw550yeb3ON/zsrgW0jgh5saFCr7pDnw= github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7wiiY35fv3ctT+k4M= +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 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= 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.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -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/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +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 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= @@ -278,27 +786,24 @@ github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnG github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/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 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= 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/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= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= 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/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 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= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= @@ -306,28 +811,25 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WA github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= 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.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= -github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/cli v20.10.17+incompatible h1:eO2KS7ZFeov5UJeaDmIs1NFEDRf32PaqRpvoEkKBy5M= -github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v23.0.1+incompatible h1:LRyWITpGzl2C9e9uGxzisptnxAn1zfZKXy13Ul2Q5oM= +github.com/docker/cli v23.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.19+incompatible h1:lzEmjivyNHFHMNAFLXORMBXyGIhw/UP4DvJwvyKYq64= -github.com/docker/docker v20.10.19+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v23.0.1+incompatible h1:vjgvJZxprTTE1A37nm+CLNAdwu6xZekyoiVlUZEINcY= +github.com/docker/docker v23.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +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 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +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 v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= -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/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= 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= @@ -340,46 +842,57 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m 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.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/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +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/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg= -github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= github.com/ethereum/go-ethereum v1.10.22 h1:HbEgsDo1YTGIf4KB/NNpn+XH+PiNJXUZ9ksRxiqWyMc= github.com/ethereum/go-ethereum v1.10.22/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= -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/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= 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/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= 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/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= 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.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= +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 v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= +github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= 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-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= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +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-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= @@ -387,29 +900,39 @@ github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= 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-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 v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +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 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= 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= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= @@ -418,21 +941,26 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v3.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.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/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= 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/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -446,6 +974,7 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -464,18 +993,20 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 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.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/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/flatbuffers v2.0.8+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= @@ -487,17 +1018,24 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +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 h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+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= @@ -510,22 +1048,42 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +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/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -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.1.5/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/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +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/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +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.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +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/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -541,16 +1099,16 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= 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/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= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= @@ -567,8 +1125,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng 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.1 h1:NASsgP4q6tL94WH6nJxKWj8As2H/2kop/bB1d8JMyRY= -github.com/hashicorp/go-getter v1.6.1/go.mod h1:IZCrswsZPeWv9IkVnLElzRU/gz/QPi6pZHn4tv6vbwA= +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-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -583,7 +1141,6 @@ github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdv github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/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.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -598,18 +1155,23 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -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/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= 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/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v1.0.1-0.20210310174557-0ca763054c88/go.mod h1:nNs7wvRfN1eKaMknBydLNQU6146XQim8t4h+q90biWo= -github.com/huin/goupnp v1.0.3-0.20220313090229-ca81a64b4204/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= +github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= @@ -617,16 +1179,13 @@ github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= 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= github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= -github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= @@ -638,7 +1197,7 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1C 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/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= 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= @@ -655,29 +1214,34 @@ github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= 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/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +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/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= 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/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.4.0/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.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= -github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= +github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -686,17 +1250,18 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 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/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/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= @@ -704,23 +1269,19 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 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/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= +github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= +github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +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-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= -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.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= @@ -728,19 +1289,18 @@ github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HN 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.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= 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.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= -github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/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= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= @@ -751,6 +1311,8 @@ github.com/miguelmota/go-ethereum-hdwallet v0.1.1/go.mod h1:f9m9uXokAHA6WNoYOPjj github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= +github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -764,22 +1326,20 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= 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.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= @@ -797,10 +1357,10 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= 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= @@ -810,13 +1370,15 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6 github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +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/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= +github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -836,6 +1398,7 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= 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.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= @@ -844,13 +1407,11 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw 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/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/peggyjv/gravity-bridge/module/v4 v4.0.1 h1:HO6d8rYdG3GseYVpiVjLu0Nwzbh1wXeF8bET/jXhRbk= -github.com/peggyjv/gravity-bridge/module/v4 v4.0.1/go.mod h1:n8Jj3X+w6q0Xz19w8feRRl2sfIGV+3FGU4anzXBQGbA= +github.com/peggyjv/gravity-bridge/module/v4 v4.0.2-0.20240507144821-c36490e18116 h1:WmtdxpmEWGv4hWpTZfFAR8SIFeoBlOjvkN4pixwYMZk= +github.com/peggyjv/gravity-bridge/module/v4 v4.0.2-0.20240507144821-c36490e18116/go.mod h1:tlA4IAHXoDRK8zgQ2PP111hBkHOZLcH6tgz2Kh/EBoI= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.7 h1:muncTPStnKRos5dpVKULv2FVd4bMOhNePj9CjgDb8Us= -github.com/pelletier/go-toml/v2 v2.0.7/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= 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= @@ -858,18 +1419,26 @@ github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCr 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/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/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= -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/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -903,8 +1472,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= @@ -916,31 +1485,40 @@ github.com/regen-network/cosmos-proto v0.3.1 h1:rV7iM4SSFAagvy8RiyhiACbWEGotmqzy 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/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +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/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +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.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= 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/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= -github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= 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= @@ -958,29 +1536,32 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1 github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= +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.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= 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.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= -github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= +github.com/spf13/viper v1.18.1 h1:rmuU42rScKWlhhJDyXZRKJQHXFX02chSVW1IvkPGiVM= +github.com/spf13/viper v1.18.1/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 h1:Gb2Tyox57NRNuZ2d3rmvB3pcmbu7O1RS3m8WRx7ilrg= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1002,28 +1583,18 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= -github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +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.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= 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/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= 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/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8= -github.com/tendermint/tm-db v0.6.7/go.mod h1:byQDzFkZV1syXr/ReXS808NxA2xvyuuVgXOJ/088L6I= -github.com/tidwall/btree v1.5.0 h1:iV0yVY/frd7r6qGBXfEYs7DH0gTDgrKTrDjS7xt/IyQ= -github.com/tidwall/btree v1.5.0/go.mod h1:LGm8L/DZjPLmeWGjv5kFrY8dL4uVhMmzmmLYmsObdKE= -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.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= -github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tidwall/sjson v1.2.4/go.mod h1:098SZ494YoMWPmMO6ct4dcFnqxwj9r/gF0Etp19pSNM= +github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= +github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= 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/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= @@ -1031,7 +1602,6 @@ github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZF github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2 h1:+t3w+KwLXO6154GNJY+qUtIxLTmFjfUmpguQT1OlOT8= @@ -1039,22 +1609,20 @@ github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2 github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ= -github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +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/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/urfave/cli/v2 v2.10.2 h1:x3p8awjp/2arX+Nl/G2040AZpOCHS/eMJJ1/a+mye4Y= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/urfave/cli/v2 v2.10.2/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= -github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -1066,19 +1634,23 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= -github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= +github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -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.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= +go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1088,13 +1660,27 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= +go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= +go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.opentelemetry.io/proto/otlp v0.19.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= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -1104,10 +1690,10 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1115,33 +1701,26 @@ golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +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.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -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= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -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= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -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-20230310171629-522b1b587ee0 h1:LGJsf5LRplCck6jUCH3dBL2dmycNruWNF5xugkSlfXw= -golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +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/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-20181026193005-c67002cb31c3/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= @@ -1153,19 +1732,24 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/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/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 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.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= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +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.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 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= @@ -1205,7 +1789,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-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -1214,13 +1797,34 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +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-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.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +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.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.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1230,8 +1834,28 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +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.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= +golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1243,7 +1867,13 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1255,8 +1885,6 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1267,11 +1895,9 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w 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-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1300,46 +1926,85 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -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-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +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-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-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/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-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/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-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-20220328115105-d36c6a25d886/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-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-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= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20221010170243-090e33056c14/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.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/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.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= +golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= 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= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1349,15 +2014,24 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 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.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +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.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 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= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 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-20220609170525-579cf78fd858 h1:Dpdu/EMxGMFgq0CeYMh4fazTD2vtlZRYE7wyynxJb9U= +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/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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= @@ -1365,7 +2039,6 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1373,11 +2046,9 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/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-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1393,7 +2064,6 @@ golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1409,8 +2079,8 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -1418,21 +2088,38 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +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.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +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.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.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= 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/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.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -1453,8 +2140,44 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.110.0 h1:l+rh0KYUooe9JGbGVx71tbFo4SMbMTXK3I3ia2QSEeU= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +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.107.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.153.0 h1:N1AwGhielyKFaUqH07/ZSIQR3uNPcV7NVw0vj+j4iR4= +google.golang.org/api v0.153.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY= 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.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1462,8 +2185,9 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/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/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1507,12 +2231,104 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +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-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= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= +google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +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-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-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +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-20221201204527-e3fa12d562f3/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-20230112194545-e10362b5ecf9/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230113154510-dbe35b8444a5/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230123190316-2c411cf9d197/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/genproto v0.0.0-20230127162408-596548ed4efa/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-20230222225845-10f96fb3dbec/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= +google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 h1:nz5NESFLZbJGPFxDT/HCn+V1mZ8JGNoY4nUpmW/Y2eg= +google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917/go.mod h1:pZqR+glSb11aJ+JQcczCvgf47+duRuzNSKqE8YAQnV0= +google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0 h1:s1w3X6gQxwrLEpxnLd/qXTVLgQE2yXwaOaoa6IlY/+o= +google.golang.org/genproto/googleapis/api v0.0.0-20231212172506-995d672761c0/go.mod h1:CAny0tYF+0/9rmDB9fahA9YLzX3+AEVl1qXbv5hhj6c= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 h1:gphdwh0npgs8elJ4T6J+DQJHPVF7RsuJHCfwztUb4J4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA= 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.19.1/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= @@ -1534,8 +2350,32 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp 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.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= +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.42.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.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.61.1 h1:kLAiWrZs7YeDM6MumDe7m3y4aM6wacLzM1Y/wiLP9XY= +google.golang.org/grpc v1.61.1/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +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= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1549,8 +2389,11 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba 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.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +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.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1590,8 +2433,8 @@ 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.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/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= @@ -1601,15 +2444,49 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/cc/v3 v3.36.2/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/cc/v3 v3.36.3/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc= +modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw= +modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= +modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= +modernc.org/ccgo/v3 v3.16.8/go.mod h1:zNjwkizS+fIFDrDjIAgBSCLkWbJuHF+ar3QRn+Z9aws= +modernc.org/ccgo/v3 v3.16.9/go.mod h1:zNMzC9A9xeNUepy6KuZBbugn3c0Mc9TeiJO4lgvkJDo= +modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= +modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= +modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= +modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A= +modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU= +modernc.org/libc v1.16.17/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU= +modernc.org/libc v1.16.19/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= +modernc.org/libc v1.17.0/go.mod h1:XsgLldpP4aWlPlsjqKRdHPqCxCjISdHfM/yeWC5GyW0= +modernc.org/libc v1.17.1/go.mod h1:FZ23b+8LjxZs7XtFMbSzL/EhPxNbfZbErxEHc7cbD9s= +modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= +modernc.org/memory v1.2.0/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= +modernc.org/memory v1.2.1/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= +modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= +modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= +modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= +modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.5.3 h1:163N50IHFqr1phZens4FQOdPgfJscR7a562mjQqeo4M= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/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= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/integration_tests/auction_test.go b/integration_tests/auction_test.go index 51ead9b65..37e379bfc 100644 --- a/integration_tests/auction_test.go +++ b/integration_tests/auction_test.go @@ -138,9 +138,6 @@ func (s *IntegrationTestSuite) TestAuction() { s.Require().NoError(err) s.T().Log("Bid submmitted successfully!") - auctionResponse, err = auctionQueryClient.QueryActiveAuction(context.Background(), &auctionQuery) - s.Require().NoError(err) - s.T().Log("Verifying auction updated as expected.") // Verify auction updated as expected expectedAuction := types.Auction{ @@ -157,8 +154,15 @@ func (s *IntegrationTestSuite) TestAuction() { FundingModuleAccount: cellarfees.ModuleName, ProceedsModuleAccount: cellarfees.ModuleName, } - s.Require().Equal(expectedAuction, *auctionResponse.Auction) - s.T().Log("Auction updated correctly!") + s.Require().Eventually(func() bool { + auctionResponse, err = auctionQueryClient.QueryActiveAuction(context.Background(), &auctionQuery) + s.T().Logf("auctionResponse: %v", auctionResponse) + if err != nil { + return false + } + + return expectedAuction.RemainingTokensForSale.Amount.Equal(auctionResponse.Auction.RemainingTokensForSale.Amount) + }, time.Second*30, time.Second*5, "auction was never updated") // Verify user has funds debited and purchase credited s.T().Log("Verifying user funds debited and credited appropriately.") @@ -194,9 +198,14 @@ func (s *IntegrationTestSuite) TestAuction() { } s.T().Log("Verifying bid stored as expected.") - actualBid, err := auctionQueryClient.QueryBid(context.Background(), &types.QueryBidRequest{BidId: uint64(1), AuctionId: uint32(1)}) - s.Require().NoError(err) - s.Require().Equal(expectedBid1, *actualBid.Bid) + s.Require().Eventually(func() bool { + actualBid, err := auctionQueryClient.QueryBid(context.Background(), &types.QueryBidRequest{BidId: uint64(1), AuctionId: uint32(1)}) + if err != nil { + return false + } + + return expectedBid1.Bidder == actualBid.Bid.Bidder && expectedBid1.MaxBidInUsomm.Amount.Equal(actualBid.Bid.MaxBidInUsomm.Amount) + }, time.Second*30, time.Second*5, "bid was never stored") s.T().Log("Bid stored correctly!") s.T().Log("Submitting another bid...") @@ -232,9 +241,13 @@ func (s *IntegrationTestSuite) TestAuction() { BlockHeight: uint64(currentBlockHeight), } - actualBid2, err := auctionQueryClient.QueryBid(context.Background(), &types.QueryBidRequest{BidId: uint64(2), AuctionId: uint32(1)}) - s.Require().NoError(err) - s.Require().Equal(expectedBid2, *actualBid2.Bid) + s.Require().Eventually(func() bool { + actualBid2, err := auctionQueryClient.QueryBid(context.Background(), &types.QueryBidRequest{BidId: uint64(2), AuctionId: uint32(1)}) + if err != nil { + return false + } + return expectedBid2.Bidder == actualBid2.Bid.Bidder && expectedBid2.MaxBidInUsomm.Amount.Equal(actualBid2.Bid.MaxBidInUsomm.Amount) + }, time.Second*30, time.Second*5, "bid was never stored") s.T().Log("Bid stored correctly!") // Verify user has funds debited and purchase credited @@ -273,7 +286,7 @@ func (s *IntegrationTestSuite) TestAuction() { Id: uint32(1), StartingTokensForSale: sdk.NewCoin("gravity0x3506424f91fd33084466f402d5d97f05f8e3b4af", sdk.NewInt(5000000000)), StartBlock: uint64(1), - EndBlock: uint64(currentBlockHeight), + EndBlock: endedAuctionResponse.Auction.EndBlock, InitialPriceDecreaseRate: sdk.MustNewDecFromStr("0.05"), CurrentPriceDecreaseRate: sdk.MustNewDecFromStr("0.05"), PriceDecreaseBlockInterval: uint64(1000), diff --git a/integration_tests/axelarcork_test.go b/integration_tests/axelarcork_test.go index b0562c649..7f3c994c5 100644 --- a/integration_tests/axelarcork_test.go +++ b/integration_tests/axelarcork_test.go @@ -21,8 +21,7 @@ import ( ) func (s *IntegrationTestSuite) TestAxelarCork() { - s.Run("Test the axelarcork module", func() { - /////////// + s.Run("Test the axelarcork module", func() { /////////// // Setup // /////////// @@ -191,13 +190,26 @@ func (s *IntegrationTestSuite) TestAxelarCork() { } s.T().Log("Verifying scheduled axelar corks were created") - scheduledCorksResponse, err := axelarcorkQueryClient.QueryScheduledCorks(context.Background(), &types.QueryScheduledCorksRequest{ChainId: arbitrumChainID}) - s.Require().NoError(err) - s.Require().Len(scheduledCorksResponse.Corks, 4) - cork0 := scheduledCorksResponse.Corks[0] - cork1 := scheduledCorksResponse.Corks[1] - cork2 := scheduledCorksResponse.Corks[2] - cork3 := scheduledCorksResponse.Corks[3] + corks := []*types.ScheduledAxelarCork{} + s.Require().Eventually(func() bool { + res, err := axelarcorkQueryClient.QueryScheduledCorks(context.Background(), &types.QueryScheduledCorksRequest{ChainId: arbitrumChainID}) + if err != nil { + return false + } + + if len(res.Corks) == 4 { + corks = res.Corks + return true + } + + return false + }, time.Second*30, time.Second*5, "scheduled corks never created") + + s.T().Log("Checking that corks have expected values") + cork0 := corks[0] + cork1 := corks[1] + cork2 := corks[2] + cork3 := corks[3] s.Require().Equal(cork0.Cork.EncodedContractCall, ABIEncodedInc()) s.Require().Equal(cork0.Cork.ChainId, arbitrumChainID) s.Require().Equal(cork0.Cork.TargetContractAddress, counterContract.Hex()) @@ -523,11 +535,11 @@ func (s *IntegrationTestSuite) submitAndVoteForAxelarProposal(proposerCtx *clien return false } - s.Require().NotEmpty(proposalsQueryResponse.Proposals) - s.Require().Equal(propID, proposalsQueryResponse.Proposals[propID-1].ProposalId, "not proposal id %d", propID) - s.Require().Equal(govtypesv1beta1.StatusVotingPeriod, proposalsQueryResponse.Proposals[propID-1].Status, "proposal not in voting period") + foundProps := len(proposalsQueryResponse.Proposals) > 0 + expectedID := propID == proposalsQueryResponse.Proposals[propID-1].ProposalId + inVotingPeriod := govtypesv1beta1.StatusVotingPeriod == proposalsQueryResponse.Proposals[propID-1].Status - return true + return foundProps && expectedID && inVotingPeriod }, time.Second*30, time.Second*5, "proposal submission was never found") s.T().Log("Vote for proposal") diff --git a/integration_tests/chain.go b/integration_tests/chain.go index f1328495f..0b30848b0 100644 --- a/integration_tests/chain.go +++ b/integration_tests/chain.go @@ -6,28 +6,46 @@ import ( corktypes "github.com/peggyjv/sommelier/v7/x/cork/types/v2" + tmrand "github.com/cometbft/cometbft/libs/rand" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/codec" - sdkTypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/types/tx/signing" - sdkTx "github.com/cosmos/cosmos-sdk/x/auth/tx" + "github.com/cosmos/cosmos-sdk/x/auth" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/auth/vesting" + "github.com/cosmos/cosmos-sdk/x/bank" + "github.com/cosmos/cosmos-sdk/x/capability" + "github.com/cosmos/cosmos-sdk/x/consensus" + "github.com/cosmos/cosmos-sdk/x/crisis" + "github.com/cosmos/cosmos-sdk/x/distribution" + "github.com/cosmos/cosmos-sdk/x/evidence" + "github.com/cosmos/cosmos-sdk/x/genutil" + "github.com/cosmos/cosmos-sdk/x/gov" + govclient "github.com/cosmos/cosmos-sdk/x/gov/client" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + "github.com/cosmos/cosmos-sdk/x/mint" + paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" + "github.com/cosmos/cosmos-sdk/x/slashing" + "github.com/cosmos/cosmos-sdk/x/staking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/cosmos/cosmos-sdk/x/upgrade" + upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" + ibctransfer "github.com/cosmos/ibc-go/v7/modules/apps/transfer" + ibc "github.com/cosmos/ibc-go/v7/modules/core" + gravityclient "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/client" gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" "github.com/peggyjv/sommelier/v7/app" "github.com/peggyjv/sommelier/v7/app/params" - tmrand "github.com/tendermint/tendermint/libs/rand" - rpchttp "github.com/tendermint/tendermint/rpc/client/http" ) const ( @@ -216,30 +234,45 @@ func (c *chain) createOrchestrator(index int) *orchestrator { } func (c *chain) clientContext(nodeURI string, kb *keyring.Keyring, fromName string, fromAddr sdk.AccAddress) (*client.Context, error) { //nolint:unparam - amino := codec.NewLegacyAmino() - interfaceRegistry := sdkTypes.NewInterfaceRegistry() - interfaceRegistry.RegisterImplementations((*sdk.Msg)(nil), + encodingConfig := moduletestutil.MakeTestEncodingConfig( + auth.AppModuleBasic{}, + genutil.AppModuleBasic{}, + bank.AppModuleBasic{}, + capability.AppModuleBasic{}, + consensus.AppModuleBasic{}, + staking.AppModuleBasic{}, + mint.AppModuleBasic{}, + distribution.AppModuleBasic{}, + gov.NewAppModuleBasic( + []govclient.ProposalHandler{ + paramsclient.ProposalHandler, + upgradeclient.LegacyProposalHandler, + upgradeclient.LegacyCancelProposalHandler, + gravityclient.ProposalHandler, + }, + ), + //params.AppModuleBasic{}, + crisis.AppModuleBasic{}, + slashing.AppModuleBasic{}, + ibc.AppModuleBasic{}, + upgrade.AppModuleBasic{}, + evidence.AppModuleBasic{}, + ibctransfer.AppModuleBasic{}, + vesting.AppModuleBasic{}, + ) + encodingConfig.InterfaceRegistry.RegisterImplementations((*sdk.Msg)(nil), &stakingtypes.MsgCreateValidator{}, &gravitytypes.MsgDelegateKeys{}, ) - interfaceRegistry.RegisterImplementations((*govtypesv1beta1.Content)(nil), + encodingConfig.InterfaceRegistry.RegisterImplementations((*govtypesv1beta1.Content)(nil), &corktypes.AddManagedCellarIDsProposal{}, &corktypes.RemoveManagedCellarIDsProposal{}, &corktypes.ScheduledCorkProposal{}, ) - interfaceRegistry.RegisterImplementations((*cryptotypes.PubKey)(nil), &secp256k1.PubKey{}, &ed25519.PubKey{}) - - protoCodec := codec.NewProtoCodec(interfaceRegistry) - txCfg := sdkTx.NewTxConfig(protoCodec, sdkTx.DefaultSignModes) + encodingConfig.InterfaceRegistry.RegisterImplementations((*cryptotypes.PubKey)(nil), &secp256k1.PubKey{}, &ed25519.PubKey{}) - encodingConfig := params.EncodingConfig{ - InterfaceRegistry: interfaceRegistry, - Marshaler: protoCodec, - TxConfig: txCfg, - Amino: amino, - } - simapp.ModuleBasics.RegisterLegacyAminoCodec(encodingConfig.Amino) - simapp.ModuleBasics.RegisterInterfaces(encodingConfig.InterfaceRegistry) + //sims.ModuleBasics.RegisterLegacyAminoCodec(encodingConfig.Amino) + //sims.ModuleBasics.RegisterInterfaces(encodingConfig.InterfaceRegistry) rpcClient, err := rpchttp.New(nodeURI, "/websocket") if err != nil { @@ -248,14 +281,14 @@ func (c *chain) clientContext(nodeURI string, kb *keyring.Keyring, fromName stri clientContext := client.Context{}. WithChainID(c.id). - WithCodec(protoCodec). + WithCodec(encodingConfig.Codec). WithInterfaceRegistry(encodingConfig.InterfaceRegistry). WithTxConfig(encodingConfig.TxConfig). WithLegacyAmino(encodingConfig.Amino). WithInput(os.Stdin). WithNodeURI(nodeURI). WithClient(rpcClient). - WithBroadcastMode(flags.BroadcastBlock). + WithBroadcastMode(flags.BroadcastSync). WithKeyring(*kb). WithAccountRetriever(authtypes.AccountRetriever{}). WithOutputFormat("json"). diff --git a/integration_tests/genesis.go b/integration_tests/genesis.go index 22584dd2c..421ecbcf8 100644 --- a/integration_tests/genesis.go +++ b/integration_tests/genesis.go @@ -5,13 +5,13 @@ import ( "fmt" "os" + tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/server" 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" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - tmtypes "github.com/tendermint/tendermint/types" ) func getGenDoc(path string) (*tmtypes.GenesisDoc, error) { diff --git a/integration_tests/gorc_bootstrap.sh b/integration_tests/gorc_bootstrap.sh index e81f56009..8e72f0118 100755 --- a/integration_tests/gorc_bootstrap.sh +++ b/integration_tests/gorc_bootstrap.sh @@ -7,4 +7,4 @@ gorc --config=/root/gorc/config.toml keys cosmos recover orch-key "$ORCH_MNEMONI gorc --config=/root/gorc/config.toml keys eth import orch-eth-key $ETH_PRIV_KEY # start gorc orchestrator -gorc --config=/root/gorc/config.toml orchestrator start --cosmos-key=orch-key --ethereum-key=orch-eth-key +RUST_LOG=info gorc --config=/root/gorc/config.toml orchestrator start --cosmos-key=orch-key --ethereum-key=orch-eth-key diff --git a/integration_tests/pubsub_test.go b/integration_tests/pubsub_test.go index 49d0e2e95..7188611c1 100644 --- a/integration_tests/pubsub_test.go +++ b/integration_tests/pubsub_test.go @@ -46,9 +46,14 @@ func (s *IntegrationTestSuite) TestPubsub() { s.Require().NoError(err) s.T().Log("RemovePublisher submitted correctly") - publishersResponse, err := pubsubQueryClient.QueryPublishers(context.Background(), &types.QueryPublishersRequest{}) - s.Require().NoError(err) - s.Require().Len(publishersResponse.Publishers, 0) + s.Require().Eventually(func() bool { + publishersResponse, err := pubsubQueryClient.QueryPublishers(context.Background(), &types.QueryPublishersRequest{}) + if err != nil { + return false + } + + return len(publishersResponse.Publishers) == 0 + }, time.Second*30, time.Second*5, "publisher was never removed") //////////////// // Happy path // @@ -81,13 +86,20 @@ func (s *IntegrationTestSuite) TestPubsub() { propID++ s.T().Log("Verifying Publisher correctly added") - publishersResponse, err = pubsubQueryClient.QueryPublishers(context.Background(), &types.QueryPublishersRequest{}) - s.Require().NoError(err) - s.Require().Len(publishersResponse.Publishers, 1) - publisher := publishersResponse.Publishers[0] - s.Require().Equal(publisher.Address, proposer.address().String()) - s.Require().Equal(publisher.CaCert, PublisherCACert) - s.Require().Equal(publisher.Domain, "new.example.com") + var publisher *types.Publisher + s.Require().Eventually(func() bool { + publishersResponse, err := pubsubQueryClient.QueryPublishers(context.Background(), &types.QueryPublishersRequest{}) + if err != nil { + return false + } + if len(publishersResponse.Publishers) != 1 { + return false + } + publisher = publishersResponse.Publishers[0] + return publisher.Address == proposer.address().String() && + publisher.CaCert == PublisherCACert && + publisher.Domain == "new.example.com" + }, time.Second*30, time.Second*5, "publisher was never added") // set publisher intent for cellar s.T().Log("Submitting AddPublisherIntent") @@ -107,14 +119,21 @@ func (s *IntegrationTestSuite) TestPubsub() { s.T().Log("AddPublisherIntent submitted successfully") s.T().Log("Verifying PublisherIntent correctly added") - publisherIntentsResponse, err := pubsubQueryClient.QueryPublisherIntents(context.Background(), &types.QueryPublisherIntentsRequest{}) - s.Require().NoError(err) - s.Require().Len(publisherIntentsResponse.PublisherIntents, 1) - publisherIntent := publisherIntentsResponse.PublisherIntents[0] - s.Require().Equal(publisherIntent.SubscriptionId, subscriptionID) - s.Require().Equal(publisherIntent.PublisherDomain, publisher.Domain) - s.Require().Equal(publisherIntent.Method, types.PublishMethod_PUSH) - s.Require().Equal(publisherIntent.AllowedSubscribers, types.AllowedSubscribers_VALIDATORS) + s.Require().Eventually(func() bool { + publisherIntentsResponse, err := pubsubQueryClient.QueryPublisherIntents(context.Background(), &types.QueryPublisherIntentsRequest{}) + if err != nil { + return false + } + if len(publisherIntentsResponse.PublisherIntents) != 1 { + return false + } + + publisherIntent := publisherIntentsResponse.PublisherIntents[0] + return publisherIntent.SubscriptionId == subscriptionID && + publisherIntent.PublisherDomain == publisher.Domain && + publisherIntent.Method == types.PublishMethod_PUSH && + publisherIntent.AllowedSubscribers == types.AllowedSubscribers_VALIDATORS + }, time.Second*30, time.Second*5, "publisher intent was never added") // add default subscription prop s.T().Log("Creating AddDefaultSubscriptionProposal") @@ -141,12 +160,18 @@ func (s *IntegrationTestSuite) TestPubsub() { propID++ s.T().Log("Verifying DefaultSubscription correctly added") - defaultSubscriptionsResponse, err := pubsubQueryClient.QueryDefaultSubscriptions(context.Background(), &types.QueryDefaultSubscriptionsRequest{}) - s.Require().NoError(err) - s.Require().Len(defaultSubscriptionsResponse.DefaultSubscriptions, 1) - defaultSubscription := defaultSubscriptionsResponse.DefaultSubscriptions[0] - s.Require().Equal(defaultSubscription.SubscriptionId, subscriptionID) - s.Require().Equal(defaultSubscription.PublisherDomain, publisher.Domain) + s.Require().Eventually(func() bool { + defaultSubscriptionsResponse, err := pubsubQueryClient.QueryDefaultSubscriptions(context.Background(), &types.QueryDefaultSubscriptionsRequest{}) + if err != nil { + return false + } + if len(defaultSubscriptionsResponse.DefaultSubscriptions) != 1 { + return false + } + defaultSubscription := defaultSubscriptionsResponse.DefaultSubscriptions[0] + return defaultSubscription.SubscriptionId == subscriptionID && + defaultSubscription.PublisherDomain == publisher.Domain + }, time.Second*30, time.Second*5, "default subscription was never added") // create subscribers s.T().Log("Creating Subscriber for two orchestrators") @@ -179,12 +204,18 @@ func (s *IntegrationTestSuite) TestPubsub() { s.T().Log("AddSubscriber for orch 1 submitted correctly") s.T().Log("Verifying Subscribers added correctly") - subscribersResponse, err := pubsubQueryClient.QuerySubscribers(context.Background(), &types.QuerySubscribersRequest{}) - s.Require().NoError(err) - s.Require().Len(subscribersResponse.Subscribers, 2) + var subscriber0, subscriber1 *types.Subscriber + var subscribersResponse *types.QuerySubscribersResponse + s.Require().Eventually(func() bool { + subscribersResponse, err = pubsubQueryClient.QuerySubscribers(context.Background(), &types.QuerySubscribersRequest{}) + if err != nil { + return false + } + return len(subscribersResponse.Subscribers) == 2 + }, time.Second*30, time.Second*5, "subscribers were never added") - subscriber0 := subscribersResponse.Subscribers[0] - subscriber1 := subscribersResponse.Subscribers[1] + subscriber0 = subscribersResponse.Subscribers[0] + subscriber1 = subscribersResponse.Subscribers[1] s.Require().Equal(subscriber0.Address, orch0.address().String()) s.Require().Equal(subscriber0.CaCert, SubscriberCACert) s.Require().Equal(subscriber0.PushUrl, subscriber0PushURL) @@ -218,6 +249,7 @@ func (s *IntegrationTestSuite) TestPubsub() { s.T().Log("AddSubscriberIntent for orch 0 submitted incorrectly, verifying none created") subscriberIntentsResponse, err := pubsubQueryClient.QuerySubscriberIntents(context.Background(), &types.QuerySubscriberIntentsRequest{}) s.Require().NoError(err) + time.Sleep(10 * time.Second) s.Require().Len(subscriberIntentsResponse.SubscriberIntents, 0) _, err = s.chain.sendMsgs(*orch0ClientCtx, &addSubscriberIntent0Msg) @@ -229,6 +261,7 @@ func (s *IntegrationTestSuite) TestPubsub() { s.T().Log("AddSubscriberIntent for orch 1 submitted correctly") s.T().Log("Verifying SubscriberIntents added correctly") + time.Sleep(10 * time.Second) subscriberIntentsResponse, err = pubsubQueryClient.QuerySubscriberIntents(context.Background(), &types.QuerySubscriberIntentsRequest{}) s.Require().NoError(err) s.Require().Len(subscriberIntentsResponse.SubscriberIntents, 2) @@ -255,6 +288,7 @@ func (s *IntegrationTestSuite) TestPubsub() { s.T().Log("RemoveSubscriberIntent for orch 0 submitted correctly") s.T().Log("Verifying SubscriberIntent for orch 0 removed") + time.Sleep(10 * time.Second) subscriberIntentsResponse, err = pubsubQueryClient.QuerySubscriberIntents(context.Background(), &types.QuerySubscriberIntentsRequest{}) s.Require().NoError(err) s.Require().Len(subscriberIntentsResponse.SubscriberIntents, 1) @@ -272,6 +306,7 @@ func (s *IntegrationTestSuite) TestPubsub() { s.T().Log("RemoveSubscriberIntent for orch 1 submitted correctly") s.T().Log("Verifying SubscriberIntent for orch 1 removed") + time.Sleep(10 * time.Second) subscriberIntentsResponse, err = pubsubQueryClient.QuerySubscriberIntents(context.Background(), &types.QuerySubscriberIntentsRequest{}) s.Require().NoError(err) s.Require().Len(subscriberIntentsResponse.SubscriberIntents, 0) @@ -288,6 +323,7 @@ func (s *IntegrationTestSuite) TestPubsub() { s.T().Log("RemoveSubscriber for orch 0 submitted correctly") s.T().Log("Verifying Subscriber for orch 0 removed") + time.Sleep(10 * time.Second) subscribersResponse, err = pubsubQueryClient.QuerySubscribers(context.Background(), &types.QuerySubscribersRequest{}) s.Require().NoError(err) s.Require().Len(subscribersResponse.Subscribers, 1) @@ -304,6 +340,7 @@ func (s *IntegrationTestSuite) TestPubsub() { s.T().Log("RemoveSubscriber for orch 1 submitted correctly") s.T().Log("Verifying Subscriber for orch 1 removed") + time.Sleep(10 * time.Second) subscribersResponse, err = pubsubQueryClient.QuerySubscribers(context.Background(), &types.QuerySubscribersRequest{}) s.Require().NoError(err) s.Require().Len(subscribersResponse.Subscribers, 0) @@ -332,7 +369,8 @@ func (s *IntegrationTestSuite) TestPubsub() { propID++ s.T().Log("Verifying DefaultSubscription correctly removed") - defaultSubscriptionsResponse, err = pubsubQueryClient.QueryDefaultSubscriptions(context.Background(), &types.QueryDefaultSubscriptionsRequest{}) + time.Sleep(10 * time.Second) + defaultSubscriptionsResponse, err := pubsubQueryClient.QueryDefaultSubscriptions(context.Background(), &types.QueryDefaultSubscriptionsRequest{}) s.Require().NoError(err) s.Require().Len(defaultSubscriptionsResponse.DefaultSubscriptions, 0) @@ -349,7 +387,8 @@ func (s *IntegrationTestSuite) TestPubsub() { s.T().Log("RemovePublisherIntent submitted successfully") s.T().Log("Verifying PublisherIntent correctly removed") - publisherIntentsResponse, err = pubsubQueryClient.QueryPublisherIntents(context.Background(), &types.QueryPublisherIntentsRequest{}) + time.Sleep(10 * time.Second) + publisherIntentsResponse, err := pubsubQueryClient.QueryPublisherIntents(context.Background(), &types.QueryPublisherIntentsRequest{}) s.Require().NoError(err) s.Require().Len(publisherIntentsResponse.PublisherIntents, 0) @@ -377,7 +416,8 @@ func (s *IntegrationTestSuite) TestPubsub() { propID++ s.T().Log("Verifying Publisher correctly removed") - publishersResponse, err = pubsubQueryClient.QueryPublishers(context.Background(), &types.QueryPublishersRequest{}) + time.Sleep(10 * time.Second) + publishersResponse, err := pubsubQueryClient.QueryPublishers(context.Background(), &types.QueryPublishersRequest{}) s.Require().NoError(err) s.Require().Len(publishersResponse.Publishers, 0) @@ -394,6 +434,7 @@ func (s *IntegrationTestSuite) TestPubsub() { propID++ s.T().Log("Verifying Publisher correctly added") + time.Sleep(10 * time.Second) publishersResponse, err = pubsubQueryClient.QueryPublishers(context.Background(), &types.QueryPublishersRequest{}) s.Require().NoError(err) s.Require().Len(publishersResponse.Publishers, 1) @@ -408,10 +449,11 @@ func (s *IntegrationTestSuite) TestPubsub() { s.T().Log("AddPublisherIntent submitted successfully") s.T().Log("Verifying PublisherIntent correctly added") + time.Sleep(10 * time.Second) publisherIntentsResponse, err = pubsubQueryClient.QueryPublisherIntents(context.Background(), &types.QueryPublisherIntentsRequest{}) s.Require().NoError(err) s.Require().Len(publisherIntentsResponse.PublisherIntents, 1) - publisherIntent = publisherIntentsResponse.PublisherIntents[0] + publisherIntent := publisherIntentsResponse.PublisherIntents[0] s.Require().Equal(publisherIntent.SubscriptionId, subscriptionID) s.Require().Equal(publisherIntent.PublisherDomain, publisher.Domain) s.Require().Equal(publisherIntent.Method, types.PublishMethod_PUSH) @@ -424,10 +466,11 @@ func (s *IntegrationTestSuite) TestPubsub() { s.submitAndVoteForProposal(proposerCtx, orch0ClientCtx, propID, addDefaultSubscriptionPropMsg) s.T().Log("Verifying DefaultSubscription correctly added") + time.Sleep(10 * time.Second) defaultSubscriptionsResponse, err = pubsubQueryClient.QueryDefaultSubscriptions(context.Background(), &types.QueryDefaultSubscriptionsRequest{}) s.Require().NoError(err) s.Require().Len(defaultSubscriptionsResponse.DefaultSubscriptions, 1) - defaultSubscription = defaultSubscriptionsResponse.DefaultSubscriptions[0] + defaultSubscription := defaultSubscriptionsResponse.DefaultSubscriptions[0] s.Require().Equal(defaultSubscription.SubscriptionId, subscriptionID) s.Require().Equal(defaultSubscription.PublisherDomain, publisher.Domain) @@ -443,6 +486,7 @@ func (s *IntegrationTestSuite) TestPubsub() { s.T().Log("AddSubscriber for orch 1 submitted correctly") s.T().Log("Verifying Subscribers added correctly") + time.Sleep(10 * time.Second) subscribersResponse, err = pubsubQueryClient.QuerySubscribers(context.Background(), &types.QuerySubscribersRequest{}) s.Require().NoError(err) s.Require().Len(subscribersResponse.Subscribers, 2) @@ -468,6 +512,7 @@ func (s *IntegrationTestSuite) TestPubsub() { s.T().Log("AddSubscriberIntent for orch 1 submitted correctly") s.T().Log("Verifying SubscriberIntents added correctly") + time.Sleep(10 * time.Second) subscriberIntentsResponse, err = pubsubQueryClient.QuerySubscriberIntents(context.Background(), &types.QuerySubscriberIntentsRequest{}) s.Require().NoError(err) s.Require().Len(subscriberIntentsResponse.SubscriberIntents, 2) @@ -489,6 +534,7 @@ func (s *IntegrationTestSuite) TestPubsub() { s.T().Log("RemoveSubscriber for orch 0 submitted correctly") s.T().Log("Verifying Subscriber for orch 0 removed") + time.Sleep(10 * time.Second) subscribersResponse, err = pubsubQueryClient.QuerySubscribers(context.Background(), &types.QuerySubscribersRequest{}) s.Require().NoError(err) s.Require().Len(subscribersResponse.Subscribers, 1) @@ -523,6 +569,7 @@ func (s *IntegrationTestSuite) TestPubsub() { s.T().Log("RemovePublisher submitted correctly") s.T().Log("Verifying all the child values have been removed with the publisher") + time.Sleep(10 * time.Second) // now everything should be gone, the only thing that should be left is one subscriber value publishersResponse, err = pubsubQueryClient.QueryPublishers(context.Background(), &types.QueryPublishersRequest{}) s.Require().NoError(err) diff --git a/integration_tests/scheduled_cork_test.go b/integration_tests/scheduled_cork_test.go index bc45a9753..6497fb416 100644 --- a/integration_tests/scheduled_cork_test.go +++ b/integration_tests/scheduled_cork_test.go @@ -24,6 +24,9 @@ func (s *IntegrationTestSuite) TestScheduledCork() { s.Run("Bring up chain, and schedule a cork call to ethereum", func() { s.T().Log("submitting a scheduled cork porposal with unsupported cellar ID to verify rejection") proposer := s.chain.proposer + orch0 := s.chain.orchestrators[0] + orch0Ctx, err := s.chain.clientContext("tcp://localhost:26657", orch0.keyring, "orch", s.chain.orchestrators[0].address()) + s.Require().NoError(err) proposerCtx, err := s.chain.clientContext("tcp://localhost:26657", proposer.keyring, "proposer", proposer.address()) s.Require().NoError(err) invalidProposal := types.ScheduledCorkProposal{ @@ -45,7 +48,7 @@ func (s *IntegrationTestSuite) TestScheduledCork() { ) s.Require().NoError(err, "unable to create governance proposal") - submitProposalResponse, err := s.chain.sendMsgs(*proposerCtx, proposalMsg) + submitProposalResponse, err := s.chain.sendMsgs(*orch0Ctx, proposalMsg) s.Require().NoError(err) s.Require().Zero(submitProposalResponse.Code, "raw log: %s", submitProposalResponse.RawLog) govQueryClient := govtypesv1beta1.NewQueryClient(proposerCtx) @@ -104,11 +107,16 @@ func (s *IntegrationTestSuite) TestScheduledCork() { s.Require().Zero(submitProposalResponse.Code, "raw log: %s", submitProposalResponse.RawLog) s.T().Log("check proposal was submitted correctly") - proposalsQueryResponse, err = govQueryClient.Proposals(context.Background(), &govtypesv1beta1.QueryProposalsRequest{}) - s.Require().NoError(err) - s.Require().NotEmpty(proposalsQueryResponse.Proposals) - s.Require().Equal(uint64(1), proposalsQueryResponse.Proposals[0].ProposalId, "not proposal id 1") - s.Require().Equal(govtypesv1beta1.StatusVotingPeriod, proposalsQueryResponse.Proposals[0].Status, "proposal not in voting period") + s.Require().Eventually(func() bool { + proposalsQueryResponse, err = govQueryClient.Proposals(context.Background(), &govtypesv1beta1.QueryProposalsRequest{}) + if err != nil { + return false + } + if len(proposalsQueryResponse.Proposals) == 0 { + return false + } + return govtypesv1beta1.StatusVotingPeriod == proposalsQueryResponse.Proposals[0].Status + }, time.Second*30, time.Second*5, "proposal submission was never found") s.T().Log("vote for proposal allowing contract") for _, val := range s.chain.validators { @@ -203,9 +211,14 @@ func (s *IntegrationTestSuite) TestScheduledCork() { s.T().Log("verify scheduled corks were created") corkQueryClient := types.NewQueryClient(proposerCtx) - res, err := corkQueryClient.QueryScheduledCorksByBlockHeight(context.Background(), &types.QueryScheduledCorksByBlockHeightRequest{BlockHeight: uint64(targetBlockHeight)}) - s.Require().NoError(err, "failed to query scheduled corks by height") - s.Require().Len(res.Corks, 4) + + s.Require().Eventually(func() bool { + res, err := corkQueryClient.QueryScheduledCorksByBlockHeight(context.Background(), &types.QueryScheduledCorksByBlockHeightRequest{BlockHeight: uint64(targetBlockHeight)}) + if err != nil { + return false + } + return len(res.Corks) == 4 + }, 10*time.Second, 1*time.Second, "scheduled corks were not created") s.T().Log("wait for scheduled height") gbClient := gbtypes.NewQueryClient(proposerCtx) @@ -245,7 +258,7 @@ func (s *IntegrationTestSuite) TestScheduledCork() { s.Require().Equal(counterContract, common.HexToAddress(resultRes.CorkResult.Cork.TargetContractAddress)) s.T().Log("verify scheduled corks were deleted") - res, err = corkQueryClient.QueryScheduledCorksByBlockHeight(context.Background(), &types.QueryScheduledCorksByBlockHeightRequest{BlockHeight: uint64(targetBlockHeight)}) + res, err := corkQueryClient.QueryScheduledCorksByBlockHeight(context.Background(), &types.QueryScheduledCorksByBlockHeightRequest{BlockHeight: uint64(targetBlockHeight)}) s.Require().NoError(err, "failed to query scheduled corks by height") s.Require().Len(res.Corks, 0) @@ -352,11 +365,17 @@ func (s *IntegrationTestSuite) TestScheduledCork() { s.Require().Zero(submitProposalResponse.Code, "raw log: %s", submitProposalResponse.RawLog) s.T().Log("check proposal was submitted correctly") - proposalsQueryResponse, err = govQueryClient.Proposals(context.Background(), &govtypesv1beta1.QueryProposalsRequest{}) - s.Require().NoError(err) - s.Require().NotEmpty(proposalsQueryResponse.Proposals) - s.Require().Equal(uint64(3), proposalsQueryResponse.Proposals[2].ProposalId, "not proposal id 3") - s.Require().Equal(govtypesv1beta1.StatusVotingPeriod, proposalsQueryResponse.Proposals[2].Status, "proposal not in voting period") + s.Require().Eventually(func() bool { + proposalsQueryResponse, err = govQueryClient.Proposals(context.Background(), &govtypesv1beta1.QueryProposalsRequest{}) + if err != nil { + return false + } + if len(proposalsQueryResponse.Proposals) == 0 { + return false + } + s.Require().Equal(uint64(3), proposalsQueryResponse.Proposals[2].ProposalId, "not proposal id 3") + return govtypesv1beta1.StatusVotingPeriod == proposalsQueryResponse.Proposals[2].Status + }, time.Second*30, time.Second*5, "proposal submission was never found") s.T().Log("vote for proposal allowing contract") for _, val := range s.chain.validators { diff --git a/integration_tests/setup_test.go b/integration_tests/setup_test.go index 073b9af9c..842fcb458 100644 --- a/integration_tests/setup_test.go +++ b/integration_tests/setup_test.go @@ -16,7 +16,6 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" "github.com/peggyjv/sommelier/v7/app/params" auctiontypes "github.com/peggyjv/sommelier/v7/x/auction/types" @@ -30,6 +29,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" + tmconfig "github.com/cometbft/cometbft/config" + tmjson "github.com/cometbft/cometbft/libs/json" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/cosmos/cosmos-sdk/server" srvconfig "github.com/cosmos/cosmos-sdk/server/config" sdk "github.com/cosmos/cosmos-sdk/types" @@ -37,16 +39,14 @@ import ( crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - ibctransfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/ory/dockertest/v3" "github.com/ory/dockertest/v3/docker" "github.com/spf13/viper" "github.com/stretchr/testify/suite" - tmconfig "github.com/tendermint/tendermint/config" - tmjson "github.com/tendermint/tendermint/libs/json" - rpchttp "github.com/tendermint/tendermint/rpc/client/http" ) const ( @@ -362,12 +362,12 @@ func (s *IntegrationTestSuite) initGenesis() { s.Require().NoError(err) appGenState[banktypes.ModuleName] = bz - var govGenState govtypesv1beta1.GenesisState + var govGenState govtypesv1.GenesisState s.Require().NoError(cdc.UnmarshalJSON(appGenState[govtypes.ModuleName], &govGenState)) // set short voting period to allow gov proposals in tests - govGenState.VotingParams.VotingPeriod = time.Second * 20 - govGenState.DepositParams.MinDeposit = sdk.Coins{{Denom: testDenom, Amount: sdk.OneInt()}} + *govGenState.Params.VotingPeriod = time.Second * 20 + govGenState.Params.MinDeposit = sdk.Coins{{Denom: testDenom, Amount: sdk.OneInt()}} bz, err = cdc.MarshalJSON(&govGenState) s.Require().NoError(err) appGenState[govtypes.ModuleName] = bz @@ -592,6 +592,7 @@ func (s *IntegrationTestSuite) initValidatorConfigs() { appCfgPath := filepath.Join(val.configDir(), "config", "app.toml") appConfig := srvconfig.DefaultConfig() + appConfig.GRPC.Address = "0.0.0.0:9090" appConfig.API.Enable = true appConfig.Pruning = "nothing" appConfig.MinGasPrices = fmt.Sprintf("%s%s", minGasPrice, testDenom) diff --git a/integration_tests/validator.go b/integration_tests/validator.go index c84afc7ae..1aa613292 100644 --- a/integration_tests/validator.go +++ b/integration_tests/validator.go @@ -8,6 +8,10 @@ import ( "path" "path/filepath" + tmcfg "github.com/cometbft/cometbft/config" + tmos "github.com/cometbft/cometbft/libs/os" + "github.com/cometbft/cometbft/p2p" + "github.com/cometbft/cometbft/privval" sdkcrypto "github.com/cosmos/cosmos-sdk/crypto" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/hd" @@ -24,10 +28,6 @@ import ( "github.com/ethereum/go-ethereum/crypto" gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" "github.com/peggyjv/sommelier/v7/app" - tmcfg "github.com/tendermint/tendermint/config" - tmos "github.com/tendermint/tendermint/libs/os" - "github.com/tendermint/tendermint/p2p" - "github.com/tendermint/tendermint/privval" ) type validator struct { diff --git a/proto/auction/v1/auction.proto b/proto/auction/v1/auction.proto index 269a16b8f..e44a516da 100644 --- a/proto/auction/v1/auction.proto +++ b/proto/auction/v1/auction.proto @@ -69,4 +69,4 @@ message ProposedTokenPrice { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; -} \ No newline at end of file +} diff --git a/proto/auction/v1/proposal.proto b/proto/auction/v1/proposal.proto index 5886e3ff1..4b7d4b97e 100644 --- a/proto/auction/v1/proposal.proto +++ b/proto/auction/v1/proposal.proto @@ -3,6 +3,7 @@ package auction.v1; import "cosmos_proto/cosmos.proto"; import "auction/v1/auction.proto"; +import "gogoproto/gogo.proto"; option go_package = "github.com/peggyjv/sommelier/v7/x/auction/types"; diff --git a/proto/auction/v1/query.proto b/proto/auction/v1/query.proto index 5adb3e758..9e8441c92 100644 --- a/proto/auction/v1/query.proto +++ b/proto/auction/v1/query.proto @@ -6,44 +6,54 @@ import "google/api/annotations.proto"; import "auction/v1/genesis.proto"; import "auction/v1/auction.proto"; import "cosmos_proto/cosmos.proto"; +import "cosmos/query/v1/query.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; option go_package = "github.com/peggyjv/sommelier/v7/x/auction/types"; service Query { rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/auction/v1/params"; } rpc QueryActiveAuction(QueryActiveAuctionRequest) returns (QueryActiveAuctionResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/auction/v1/active_auctions/{auction_id}"; } rpc QueryEndedAuction(QueryEndedAuctionRequest) returns (QueryEndedAuctionResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/auction/v1/ended_auctions/{auction_id}"; } rpc QueryActiveAuctions(QueryActiveAuctionsRequest) returns (QueryActiveAuctionsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/auction/v1/active_auctions"; } rpc QueryEndedAuctions(QueryEndedAuctionsRequest) returns (QueryEndedAuctionsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/auction/v1/ended_auctions"; } rpc QueryBid(QueryBidRequest) returns (QueryBidResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/auction/v1/auctions/{auction_id}/bids/{bid_id}"; } rpc QueryBidsByAuction(QueryBidsByAuctionRequest) returns (QueryBidsByAuctionResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/auction/v1/auctions/{auction_id}/bids"; } rpc QueryTokenPrice(QueryTokenPriceRequest) returns (QueryTokenPriceResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/auction/v1/token_prices/{denom}"; } rpc QueryTokenPrices(QueryTokenPricesRequest) returns (QueryTokenPricesResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/auction/v1/token_prices"; } } diff --git a/proto/auction/v1/tx.proto b/proto/auction/v1/tx.proto index b63823b67..18acb8783 100644 --- a/proto/auction/v1/tx.proto +++ b/proto/auction/v1/tx.proto @@ -3,16 +3,21 @@ package auction.v1; import "auction/v1/auction.proto"; import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; option go_package = "github.com/peggyjv/sommelier/v7/x/auction/types"; service Msg { + option (cosmos.msg.v1.service) = true; + rpc SubmitBid (MsgSubmitBidRequest) returns (MsgSubmitBidResponse); } message MsgSubmitBidRequest { + option (cosmos.msg.v1.signer) = "signer"; + uint32 auction_id = 1; string signer = 2; cosmos.base.v1beta1.Coin max_bid_in_usomm = 3 [ (gogoproto.nullable) = false ]; diff --git a/proto/axelarcork/v1/event.proto b/proto/axelarcork/v1/event.proto index 057b6ab7e..85e716a5f 100644 --- a/proto/axelarcork/v1/event.proto +++ b/proto/axelarcork/v1/event.proto @@ -11,4 +11,4 @@ message ScheduleCorkEvent { string cork = 3; uint64 block_height = 4; uint64 chain_id = 5; -} \ No newline at end of file +} diff --git a/proto/axelarcork/v1/query.proto b/proto/axelarcork/v1/query.proto index 1bb5fe36e..94f20e6ed 100644 --- a/proto/axelarcork/v1/query.proto +++ b/proto/axelarcork/v1/query.proto @@ -5,6 +5,7 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "axelarcork/v1/genesis.proto"; import "axelarcork/v1/axelarcork.proto"; +import "cosmos/query/v1/query.proto"; option go_package = "github.com/peggyjv/sommelier/v7/x/axelarcork/types"; @@ -12,61 +13,75 @@ option go_package = "github.com/peggyjv/sommelier/v7/x/axelarcork/types"; service Query { // QueryParams queries the axelar cork module parameters. rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/cork/v1/params"; } // QueryCellarIDs queries approved cellar ids of all supported chains rpc QueryCellarIDs(QueryCellarIDsRequest) returns (QueryCellarIDsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/axelarcork/v1/cellar_ids"; } // QueryCellarIDsByChainID returns all cellars and current tick ranges rpc QueryCellarIDsByChainID(QueryCellarIDsByChainIDRequest) returns (QueryCellarIDsByChainIDResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/axelarcork/v1/cellar_ids_by_chain_id"; } // QueryScheduledCorks returns all scheduled corks rpc QueryScheduledCorks(QueryScheduledCorksRequest) returns (QueryScheduledCorksResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/axelarcork/v1/scheduled_corks"; } // QueryScheduledBlockHeights returns all scheduled block heights rpc QueryScheduledBlockHeights(QueryScheduledBlockHeightsRequest) returns (QueryScheduledBlockHeightsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/axelarcork/v1/scheduled_block_heights"; } // QueryScheduledCorks returns all scheduled corks at a block height rpc QueryScheduledCorksByBlockHeight(QueryScheduledCorksByBlockHeightRequest) returns (QueryScheduledCorksByBlockHeightResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/axelarcork/v1/scheduled_corks_by_block_height/{block_height}"; } // QueryScheduledCorks returns all scheduled corks with the specified ID rpc QueryScheduledCorksByID(QueryScheduledCorksByIDRequest) returns (QueryScheduledCorksByIDResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/axelarcork/v1/scheduled_corks_by_id/{id}"; } rpc QueryCorkResult(QueryCorkResultRequest) returns (QueryCorkResultResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/axelarcork/v1/cork_results/{id}"; } rpc QueryCorkResults(QueryCorkResultsRequest) returns (QueryCorkResultsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/axelarcork/v1/cork_results"; } rpc QueryChainConfigurations(QueryChainConfigurationsRequest) returns (QueryChainConfigurationsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/axelarcork/v1/chain_configurations"; } rpc QueryAxelarContractCallNonces(QueryAxelarContractCallNoncesRequest) returns (QueryAxelarContractCallNoncesResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/axelarcork/v1/contract_call_nonces"; } rpc QueryAxelarProxyUpgradeData(QueryAxelarProxyUpgradeDataRequest) returns (QueryAxelarProxyUpgradeDataResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/axelarcork/v1/proxy_upgrade_data"; } rpc QueryWinningAxelarCork(QueryWinningAxelarCorkRequest) returns (QueryWinningAxelarCorkResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/axelarcork/v1/winning_axelar_corks/{chain_id}/{contract_address}"; } rpc QueryWinningAxelarCorks(QueryWinningAxelarCorksRequest) returns (QueryWinningAxelarCorksResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/axelarcork/v1/winning_axelar_corks/{chain_id}"; } } diff --git a/proto/axelarcork/v1/tx.proto b/proto/axelarcork/v1/tx.proto index 2764c78c2..f58674b90 100644 --- a/proto/axelarcork/v1/tx.proto +++ b/proto/axelarcork/v1/tx.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package axelarcork.v1; import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/msg/v1/msg.proto"; import "axelarcork/v1/axelarcork.proto"; import "gogoproto/gogo.proto"; @@ -9,6 +10,8 @@ option go_package = "github.com/peggyjv/sommelier/v7/x/axelarcork/types"; // MsgService defines the msgs that the cork module handles service Msg { + option (cosmos.msg.v1.service) = true; + rpc ScheduleCork(MsgScheduleAxelarCorkRequest) returns (MsgScheduleAxelarCorkResponse); rpc RelayCork(MsgRelayAxelarCorkRequest) returns (MsgRelayAxelarCorkResponse); rpc BumpCorkGas(MsgBumpAxelarCorkGasRequest) returns (MsgBumpAxelarCorkGasResponse); @@ -17,6 +20,8 @@ service Msg { // MsgScheduleCorkRequest - sdk.Msg for scheduling a cork request for on or after a specific block height message MsgScheduleAxelarCorkRequest { + option (cosmos.msg.v1.signer) = "signer"; + // the scheduled cork AxelarCork cork = 1; // the chain id @@ -33,6 +38,8 @@ message MsgScheduleAxelarCorkResponse { } message MsgRelayAxelarCorkRequest { + option (cosmos.msg.v1.signer) = "signer"; + string signer = 1; cosmos.base.v1beta1.Coin token = 2 [(gogoproto.nullable) = false]; uint64 fee = 3; @@ -43,6 +50,8 @@ message MsgRelayAxelarCorkRequest { message MsgRelayAxelarCorkResponse {} message MsgRelayAxelarProxyUpgradeRequest { + option (cosmos.msg.v1.signer) = "signer"; + string signer = 1; cosmos.base.v1beta1.Coin token = 2 [(gogoproto.nullable) = false]; uint64 fee = 3; @@ -52,6 +61,8 @@ message MsgRelayAxelarProxyUpgradeRequest { message MsgRelayAxelarProxyUpgradeResponse {} message MsgBumpAxelarCorkGasRequest { + option (cosmos.msg.v1.signer) = "signer"; + string signer = 1; cosmos.base.v1beta1.Coin token = 2 [(gogoproto.nullable) = false]; string message_id = 3; @@ -60,6 +71,8 @@ message MsgBumpAxelarCorkGasRequest { message MsgBumpAxelarCorkGasResponse {} message MsgCancelAxelarCorkRequest { + option (cosmos.msg.v1.signer) = "signer"; + string signer = 1; uint64 chain_id = 2; string target_contract_address = 3; diff --git a/proto/buf.lock b/proto/buf.lock index 3fa18eb3d..2eb4782b5 100644 --- a/proto/buf.lock +++ b/proto/buf.lock @@ -6,6 +6,11 @@ deps: repository: cosmos-proto commit: 1935555c206d4afb9e94615dfd0fad31 digest: shake256:c74d91a3ac7ae07d579e90eee33abf9b29664047ac8816500cf22c081fec0d72d62c89ce0bebafc1f6fec7aa5315be72606717740ca95007248425102c365377 + - remote: buf.build + owner: cosmos + repository: cosmos-sdk + commit: 954f7b05f38440fc8250134b15adec47 + digest: shake256:2ab4404fd04a7d1d52df0e2d0f2d477a3d83ffd88d876957bf3fedfd702c8e52833d65b3ce1d89a3c5adf2aab512616b0e4f51d8463f07eda9a8a3317ee3ac54 - remote: buf.build owner: cosmos repository: gogo-proto @@ -14,5 +19,5 @@ deps: - remote: buf.build owner: googleapis repository: googleapis - commit: 7e6f6e774e29406da95bd61cdcdbc8bc - digest: shake256:fe43dd2265ea0c07d76bd925eeba612667cf4c948d2ce53d6e367e1b4b3cb5fa69a51e6acb1a6a50d32f894f054a35e6c0406f6808a483f2752e10c866ffbf73 + commit: 4ed3bc159a8b4ac68fe253218760d035 + digest: shake256:7149cf5e9955c692d381e557830555d4e93f205a0f1b8e2dfdae46d029369aa3fc1980e35df0d310f7cc3b622f93e19ad276769a283a967dd3065ddfd3a40e13 diff --git a/proto/buf.yaml b/proto/buf.yaml index b47252fdd..42fceb13d 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -2,6 +2,7 @@ version: v1 name: buf.build/sommelier/sommelier deps: - buf.build/cosmos/cosmos-proto + - buf.build/cosmos/cosmos-sdk:v0.47.0 - buf.build/cosmos/gogo-proto - buf.build/googleapis/googleapis breaking: diff --git a/proto/cellarfees/v2/query.proto b/proto/cellarfees/v2/query.proto index 05d8614fe..07916ad0c 100644 --- a/proto/cellarfees/v2/query.proto +++ b/proto/cellarfees/v2/query.proto @@ -5,31 +5,38 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cellarfees/v2/params.proto"; import "cellarfees/v2/cellarfees.proto"; +import "cosmos/query/v1/query.proto"; option go_package = "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2"; service Query { rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/cellarfees/v2/params"; } rpc QueryModuleAccounts(QueryModuleAccountsRequest) returns (QueryModuleAccountsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/cellarfees/v2/module_accounts"; } rpc QueryLastRewardSupplyPeak(QueryLastRewardSupplyPeakRequest) returns (QueryLastRewardSupplyPeakResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/cellarfees/v2/last_reward_supply_peak"; } rpc QueryAPY(QueryAPYRequest) returns (QueryAPYResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/cellarfees/v2/apy"; } rpc QueryFeeTokenBalances(QueryFeeTokenBalancesRequest) returns (QueryFeeTokenBalancesResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/cellarfees/v2/fee_token_balances"; } rpc QueryFeeTokenBalance(QueryFeeTokenBalanceRequest) returns (QueryFeeTokenBalanceResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/cellarfees/v2/fee_token_balances/{denom}"; } } diff --git a/proto/cork/v2/cork.proto b/proto/cork/v2/cork.proto index 631cbfa51..5f0d56658 100644 --- a/proto/cork/v2/cork.proto +++ b/proto/cork/v2/cork.proto @@ -1,6 +1,8 @@ syntax = "proto3"; package cork.v2; +import "gogoproto/gogo.proto"; + option go_package = "github.com/peggyjv/sommelier/v7/x/cork/types/v2"; message Cork { diff --git a/proto/cork/v2/proposal.proto b/proto/cork/v2/proposal.proto index 314953292..d67e31612 100644 --- a/proto/cork/v2/proposal.proto +++ b/proto/cork/v2/proposal.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package cork.v2; import "cork/v2/cork.proto"; +import "gogoproto/gogo.proto"; option go_package = "github.com/peggyjv/sommelier/v7/x/cork/types/v2"; diff --git a/proto/cork/v2/query.proto b/proto/cork/v2/query.proto index ae9df39c4..f9442fa3a 100644 --- a/proto/cork/v2/query.proto +++ b/proto/cork/v2/query.proto @@ -5,6 +5,7 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cork/v2/genesis.proto"; import "cork/v2/cork.proto"; +import "cosmos/query/v1/query.proto"; option go_package = "github.com/peggyjv/sommelier/v7/x/cork/types/v2"; @@ -12,36 +13,44 @@ option go_package = "github.com/peggyjv/sommelier/v7/x/cork/types/v2"; service Query { // QueryParams queries the allocation module parameters. rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/cork/v2/params"; } // QueryCellarIDs returns all cellars and current tick ranges rpc QueryCellarIDs(QueryCellarIDsRequest) returns (QueryCellarIDsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/cork/v2/cellar_ids"; } // QueryScheduledCorks returns all scheduled corks rpc QueryScheduledCorks(QueryScheduledCorksRequest) returns (QueryScheduledCorksResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/cork/v2/scheduled_corks"; } // QueryScheduledBlockHeights returns all scheduled block heights rpc QueryScheduledBlockHeights(QueryScheduledBlockHeightsRequest) returns (QueryScheduledBlockHeightsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/cork/v2/scheduled_block_heights"; } // QueryScheduledCorks returns all scheduled corks at a block height rpc QueryScheduledCorksByBlockHeight(QueryScheduledCorksByBlockHeightRequest) returns (QueryScheduledCorksByBlockHeightResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/cork/v2/scheduled_corks_by_block_height/{block_height}"; } // QueryScheduledCorks returns all scheduled corks with the specified ID rpc QueryScheduledCorksByID(QueryScheduledCorksByIDRequest) returns (QueryScheduledCorksByIDResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/cork/v2/scheduled_corks_by_id/{id}"; } rpc QueryCorkResult(QueryCorkResultRequest) returns (QueryCorkResultResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/cork/v2/cork_results/{id}"; } rpc QueryCorkResults(QueryCorkResultsRequest) returns (QueryCorkResultsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/cork/v2/cork_results"; } } diff --git a/proto/cork/v2/tx.proto b/proto/cork/v2/tx.proto index c28f66a23..9f9e11f61 100644 --- a/proto/cork/v2/tx.proto +++ b/proto/cork/v2/tx.proto @@ -2,16 +2,22 @@ syntax = "proto3"; package cork.v2; import "cork/v2/cork.proto"; +import "cosmos/msg/v1/msg.proto"; +import "gogoproto/gogo.proto"; option go_package = "github.com/peggyjv/sommelier/v7/x/cork/types/v2"; // MsgService defines the msgs that the cork module handles service Msg { + option (cosmos.msg.v1.service) = true; + rpc ScheduleCork (MsgScheduleCorkRequest) returns (MsgScheduleCorkResponse); } // MsgScheduleCorkRequest - sdk.Msg for scheduling a cork request for on or after a specific block height message MsgScheduleCorkRequest { + option (cosmos.msg.v1.signer) = "signer"; + // the scheduled cork Cork cork = 1; // the block height that must be reached diff --git a/proto/incentives/v1/query.proto b/proto/incentives/v1/query.proto index 7ecf4a583..04b80042b 100644 --- a/proto/incentives/v1/query.proto +++ b/proto/incentives/v1/query.proto @@ -4,6 +4,7 @@ package incentives.v1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "incentives/v1/genesis.proto"; +import "cosmos/query/v1/query.proto"; option go_package = "github.com/peggyjv/sommelier/v7/x/incentives/types"; @@ -11,10 +12,12 @@ option go_package = "github.com/peggyjv/sommelier/v7/x/incentives/types"; service Query { // QueryParams queries the allocation module parameters. rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/incentives/v1/params"; } // QueryAPY queries the APY returned from the incentives module. rpc QueryAPY(QueryAPYRequest) returns (QueryAPYResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/incentives/v1/apy"; } } diff --git a/proto/pubsub/v1/pubsub.proto b/proto/pubsub/v1/pubsub.proto index c11060e53..0f5a71bc9 100644 --- a/proto/pubsub/v1/pubsub.proto +++ b/proto/pubsub/v1/pubsub.proto @@ -1,6 +1,8 @@ syntax = "proto3"; package pubsub.v1; +import "gogoproto/gogo.proto"; + option go_package = "github.com/peggyjv/sommelier/v7/x/pubsub/types"; // represents a publisher, which are added via governance @@ -163,4 +165,4 @@ message RemoveDefaultSubscriptionProposalWithDeposit { string description = 2; string subscription_id = 3; string deposit = 4; -} \ No newline at end of file +} diff --git a/proto/pubsub/v1/query.proto b/proto/pubsub/v1/query.proto index 02ebfd8f4..b63cb2ba3 100644 --- a/proto/pubsub/v1/query.proto +++ b/proto/pubsub/v1/query.proto @@ -6,75 +6,93 @@ import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "pubsub/v1/params.proto"; import "pubsub/v1/pubsub.proto"; +import "cosmos/query/v1/query.proto"; option go_package = "github.com/peggyjv/sommelier/v7/x/pubsub/types"; service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/params"; } rpc QueryPublisher(QueryPublisherRequest) returns (QueryPublisherResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/publishers/{publisher_domain}"; } rpc QueryPublishers(QueryPublishersRequest) returns (QueryPublishersResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/publishers"; } rpc QuerySubscriber(QuerySubscriberRequest) returns (QuerySubscriberResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/subscribers/{subscriber_address}"; } rpc QuerySubscribers(QuerySubscribersRequest) returns (QuerySubscribersResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/subscribers"; } rpc QueryValidatorSubscribers(QueryValidatorSubscribersRequest) returns (QueryValidatorSubscribersResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/validator_subscribers"; } rpc QueryPublisherIntent(QueryPublisherIntentRequest) returns (QueryPublisherIntentResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/publisher_intents/{publisher_domain}/{subscription_id}"; } rpc QueryPublisherIntents(QueryPublisherIntentsRequest) returns (QueryPublisherIntentsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/publisher_intents"; } rpc QueryPublisherIntentsByPublisherDomain(QueryPublisherIntentsByPublisherDomainRequest) returns (QueryPublisherIntentsByPublisherDomainResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/publisher_intents/{publisher_domain}"; } rpc QueryPublisherIntentsBySubscriptionID(QueryPublisherIntentsBySubscriptionIDRequest) returns (QueryPublisherIntentsBySubscriptionIDResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/publisher_intents_by_subscription_id/{subscription_id}"; } rpc QuerySubscriberIntent(QuerySubscriberIntentRequest) returns (QuerySubscriberIntentResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/subscriber_intents/{subscriber_address}/{subscription_id}"; } rpc QuerySubscriberIntents(QuerySubscriberIntentsRequest) returns (QuerySubscriberIntentsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/subscriber_intents"; } rpc QuerySubscriberIntentsBySubscriberAddress(QuerySubscriberIntentsBySubscriberAddressRequest) returns (QuerySubscriberIntentsBySubscriberAddressResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/subscriber_intents/{subscriber_address}"; } rpc QuerySubscriberIntentsBySubscriptionID(QuerySubscriberIntentsBySubscriptionIDRequest) returns (QuerySubscriberIntentsBySubscriptionIDResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/subscriber_intents_by_subscription_id/{subscription_id}"; } rpc QuerySubscriberIntentsByPublisherDomain(QuerySubscriberIntentsByPublisherDomainRequest) returns (QuerySubscriberIntentsByPublisherDomainResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/subscriber_intents_by_publisher_domain/{publisher_domain}"; } rpc QueryDefaultSubscription(QueryDefaultSubscriptionRequest) returns (QueryDefaultSubscriptionResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/default_subscriptions/{subscription_id}"; } rpc QueryDefaultSubscriptions(QueryDefaultSubscriptionsRequest) returns (QueryDefaultSubscriptionsResponse) { + option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/sommelier/pubsub/v1/default_subscriptions"; } } @@ -201,4 +219,4 @@ message QueryDefaultSubscriptionsRequest {} message QueryDefaultSubscriptionsResponse { repeated DefaultSubscription default_subscriptions = 1; -} \ No newline at end of file +} diff --git a/proto/pubsub/v1/tx.proto b/proto/pubsub/v1/tx.proto index 99ec72e11..a3f48d5fe 100644 --- a/proto/pubsub/v1/tx.proto +++ b/proto/pubsub/v1/tx.proto @@ -1,11 +1,16 @@ syntax = "proto3"; package pubsub.v1; +import "cosmos/msg/v1/msg.proto"; +import "gogoproto/gogo.proto"; import "pubsub/v1/pubsub.proto"; +import "cosmos/query/v1/query.proto"; option go_package = "github.com/peggyjv/sommelier/v7/x/pubsub/types"; service Msg { + option (cosmos.msg.v1.service) = true; + rpc RemovePublisher (MsgRemovePublisherRequest) returns (MsgRemovePublisherResponse); rpc AddSubscriber (MsgAddSubscriberRequest) returns (MsgAddSubscriberResponse); rpc RemoveSubscriber (MsgRemoveSubscriberRequest) returns (MsgRemoveSubscriberResponse); @@ -16,6 +21,8 @@ service Msg { } message MsgRemovePublisherRequest { + option (cosmos.msg.v1.signer) = "signer"; + string publisher_domain = 1; string signer = 2; } @@ -23,6 +30,8 @@ message MsgRemovePublisherRequest { message MsgRemovePublisherResponse {} message MsgAddSubscriberRequest { + option (cosmos.msg.v1.signer) = "signer"; + Subscriber subscriber = 1; string signer = 2; } @@ -30,6 +39,8 @@ message MsgAddSubscriberRequest { message MsgAddSubscriberResponse {} message MsgRemoveSubscriberRequest { + option (cosmos.msg.v1.signer) = "signer"; + string subscriber_address = 1; string signer = 2; } @@ -37,6 +48,8 @@ message MsgRemoveSubscriberRequest { message MsgRemoveSubscriberResponse {} message MsgAddPublisherIntentRequest { + option (cosmos.msg.v1.signer) = "signer"; + PublisherIntent publisher_intent = 1; string signer = 2; } @@ -44,6 +57,8 @@ message MsgAddPublisherIntentRequest { message MsgAddPublisherIntentResponse {} message MsgRemovePublisherIntentRequest { + option (cosmos.msg.v1.signer) = "signer"; + string subscription_id = 1; string publisher_domain = 2; string signer = 3; @@ -52,6 +67,8 @@ message MsgRemovePublisherIntentRequest { message MsgRemovePublisherIntentResponse {} message MsgAddSubscriberIntentRequest { + option (cosmos.msg.v1.signer) = "signer"; + SubscriberIntent subscriber_intent = 1; string signer = 2; } @@ -59,6 +76,8 @@ message MsgAddSubscriberIntentRequest { message MsgAddSubscriberIntentResponse {} message MsgRemoveSubscriberIntentRequest { + option (cosmos.msg.v1.signer) = "signer"; + string subscription_id = 1; string subscriber_address = 2; string signer = 3; diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 8315cad34..355d841b3 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -2,19 +2,18 @@ set -eo pipefail -ROOT=$(git rev-parse --show-toplevel 2>/dev/null) - -cd $ROOT/proto echo "generating proto and gRPC gateway files..." -buf generate --template buf.gen.gogo.yaml +cd proto +buf mod update cd .. +buf generate # move proto files to the right places xpath=$(head -n 1 go.mod | sed 's/^module //') cp -r $xpath/* ./ echo "cleaning up..." -go mod tidy rm -rf github.com +go mod tidy echo "done" diff --git a/third_party/proto/buf.lock b/third_party/proto/buf.lock deleted file mode 100644 index 3fa18eb3d..000000000 --- a/third_party/proto/buf.lock +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: cosmos - repository: cosmos-proto - commit: 1935555c206d4afb9e94615dfd0fad31 - digest: shake256:c74d91a3ac7ae07d579e90eee33abf9b29664047ac8816500cf22c081fec0d72d62c89ce0bebafc1f6fec7aa5315be72606717740ca95007248425102c365377 - - remote: buf.build - owner: cosmos - repository: gogo-proto - commit: 88ef6483f90f478fb938c37dde52ece3 - digest: shake256:89c45df2aa11e0cff97b0d695436713db3d993d76792e9f8dc1ae90e6ab9a9bec55503d48ceedd6b86069ab07d3041b32001b2bfe0227fa725dd515ff381e5ba - - remote: buf.build - owner: googleapis - repository: googleapis - commit: 7e6f6e774e29406da95bd61cdcdbc8bc - digest: shake256:fe43dd2265ea0c07d76bd925eeba612667cf4c948d2ce53d6e367e1b4b3cb5fa69a51e6acb1a6a50d32f894f054a35e6c0406f6808a483f2752e10c866ffbf73 diff --git a/third_party/proto/buf.yaml b/third_party/proto/buf.yaml deleted file mode 100644 index 0c9da2c91..000000000 --- a/third_party/proto/buf.yaml +++ /dev/null @@ -1,25 +0,0 @@ -version: v1 -deps: - - buf.build/cosmos/cosmos-proto - - buf.build/cosmos/gogo-proto - - buf.build/googleapis/googleapis -lint: - use: - - DEFAULT - - COMMENTS - - FILE_LOWER_SNAKE_CASE - except: - - UNARY_RPC - - COMMENT_FIELD - - SERVICE_SUFFIX - - PACKAGE_VERSION_SUFFIX - - RPC_REQUEST_STANDARD_NAME - ignore: - - tendermint/ - - cosmos_proto/ -breaking: - use: - - FILE - ignore: - - tendermint - - cosmos_proto diff --git a/x/auction/client/cli/tx_test.go b/x/auction/client/cli/tx_test.go index 57cd298c2..f8cb53574 100644 --- a/x/auction/client/cli/tx_test.go +++ b/x/auction/client/cli/tx_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/cosmos/cosmos-sdk/simapp/params" + "github.com/cosmos/cosmos-sdk/testutil" "github.com/peggyjv/sommelier/v7/x/auction/types" "github.com/cosmos/cosmos-sdk/testutil" @@ -13,7 +13,7 @@ import ( ) func TestParseSetTokenPricesProposal(t *testing.T) { - encodingConfig := params.MakeTestEncodingConfig() + encodingConfig := testutil.TestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -33,7 +33,7 @@ func TestParseSetTokenPricesProposal(t *testing.T) { require.Equal(t, "My token proposal", proposal.Title) require.Equal(t, "Contains a usomm price update", proposal.Description) - require.Equal(t, "denom:\"usomm\" exponent:6 usd_price:\"4200000000000000000\" ", proposal.TokenPrices[0].String()) + require.Equal(t, "denom:\"usomm\" exponent:\"6\" usd_price:\"4200000000000000000\" ", proposal.TokenPrices[0].String()) require.Equal(t, "10000usomm", proposal.Deposit) } diff --git a/x/auction/keeper/keeper.go b/x/auction/keeper/keeper.go index c8d490a47..4161cafcf 100644 --- a/x/auction/keeper/keeper.go +++ b/x/auction/keeper/keeper.go @@ -7,6 +7,7 @@ import ( "encoding/binary" errorsmod "cosmossdk.io/errors" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -15,7 +16,6 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/peggyjv/sommelier/v7/app/params" "github.com/peggyjv/sommelier/v7/x/auction/types" - "github.com/tendermint/tendermint/libs/log" ) // Keeper of the auction store diff --git a/x/auction/keeper/keeper_test.go b/x/auction/keeper/keeper_test.go index 447ac5353..eaef36bf3 100644 --- a/x/auction/keeper/keeper_test.go +++ b/x/auction/keeper/keeper_test.go @@ -17,11 +17,11 @@ import ( moduletestutil "github.com/peggyjv/sommelier/v7/testutil" auctionTypes "github.com/peggyjv/sommelier/v7/x/auction/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmtime "github.com/cometbft/cometbft/types/time" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" auctiontestutil "github.com/peggyjv/sommelier/v7/x/auction/testutil" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) var ( diff --git a/x/auction/module.go b/x/auction/module.go index 5085193f1..141146637 100644 --- a/x/auction/module.go +++ b/x/auction/module.go @@ -3,8 +3,8 @@ package auction import ( "context" "encoding/json" - "math/rand" + abci "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" @@ -16,7 +16,6 @@ import ( "github.com/peggyjv/sommelier/v7/x/auction/keeper" "github.com/peggyjv/sommelier/v7/x/auction/types" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" ) var ( @@ -99,17 +98,9 @@ func (AppModule) Name() string { return types.ModuleName } // RegisterInvariants performs a no-op. func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} -// Route returns the message routing key for the auction module. -func (am AppModule) Route() sdk.Route { return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) } - // QuerierRoute returns the auction module's querier route name. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns a nil Querier. -func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { - return nil -} - // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 1 @@ -164,11 +155,6 @@ func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedPro return nil } -// RandomizedParams creates randomized distribution param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []sim.ParamChange { - return nil -} - // RegisterStoreDecoder registers a decoder for distribution module's types func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { } diff --git a/x/auction/types/auction.pb.go b/x/auction/types/auction.pb.go index 4a3b6ab44..ecda636bd 100644 --- a/x/auction/types/auction.pb.go +++ b/x/auction/types/auction.pb.go @@ -9,7 +9,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" - 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/genesis.pb.go b/x/auction/types/genesis.pb.go index 1e0eeb151..ea2469930 100644 --- a/x/auction/types/genesis.pb.go +++ b/x/auction/types/genesis.pb.go @@ -7,7 +7,7 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" - 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/proposal.go b/x/auction/types/proposal.go index 8484f3da7..5ca3662d7 100644 --- a/x/auction/types/proposal.go +++ b/x/auction/types/proposal.go @@ -13,14 +13,6 @@ var _ govtypesv1beta1.Content = &SetTokenPricesProposal{} func init() { govtypesv1beta1.RegisterProposalType(ProposalTypeSetTokenPrices) - // The RegisterProposalTypeCodec function was mysteriously removed by in 0.46.0 even though - // the claim was that the old API would be preserved in .../x/gov/types/v1beta1 so we have - // to interact with the codec directly. - // - // The PR that removed it: https://github.com/cosmos/cosmos-sdk/pull/11240 - // This PR was later reverted, but RegisterProposalTypeCodec was still left out. Not sure if - // this was intentional or not. - govtypesv1beta1.ModuleCdc.RegisterConcrete(&SetTokenPricesProposal{}, "sommelier/SetTokenPricesProposal", nil) } func NewSetTokenPricesProposal(title string, description string, proposedTokenPrices []*ProposedTokenPrice) *SetTokenPricesProposal { diff --git a/x/auction/types/proposal.pb.go b/x/auction/types/proposal.pb.go index 728f9ad03..111e70711 100644 --- a/x/auction/types/proposal.pb.go +++ b/x/auction/types/proposal.pb.go @@ -6,7 +6,8 @@ package types import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" - 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" @@ -159,25 +160,26 @@ func init() { func init() { proto.RegisterFile("auction/v1/proposal.proto", fileDescriptor_b838951ecd76ffbc) } var fileDescriptor_b838951ecd76ffbc = []byte{ - // 287 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0x2c, 0x4d, 0x2e, - 0xc9, 0xcc, 0xcf, 0xd3, 0x2f, 0x33, 0xd4, 0x2f, 0x28, 0xca, 0x2f, 0xc8, 0x2f, 0x4e, 0xcc, 0xd1, - 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0x4a, 0xe9, 0x95, 0x19, 0x4a, 0x49, 0x26, 0xe7, - 0x17, 0xe7, 0xe6, 0x17, 0xc7, 0x83, 0x65, 0xf4, 0x21, 0x1c, 0x88, 0x32, 0x29, 0x09, 0x24, 0x13, - 0x60, 0x3a, 0xc0, 0x32, 0x4a, 0x93, 0x19, 0xb9, 0xc4, 0x82, 0x53, 0x4b, 0x42, 0xf2, 0xb3, 0x53, - 0xf3, 0x02, 0x8a, 0x32, 0x93, 0x53, 0x8b, 0x03, 0x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, - 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x85, 0x4b, 0x0a, 0x49, 0x00, 0x02, 0x00, 0x00, + // 295 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x51, 0x3d, 0x4f, 0xc3, 0x30, + 0x10, 0xad, 0x29, 0x1f, 0xc2, 0x65, 0x8a, 0x2a, 0xe4, 0x76, 0xb0, 0x4a, 0xa7, 0x4e, 0xb1, 0x0a, + 0x03, 0x33, 0x88, 0x85, 0xad, 0x2a, 0x48, 0x48, 0x2c, 0x55, 0x9b, 0x9c, 0x52, 0x43, 0xd2, 0xb3, + 0xe2, 0x6b, 0x44, 0xff, 0x05, 0x12, 0x7f, 0x86, 0x9f, 0xc0, 0xd8, 0x91, 0x11, 0x25, 0x7f, 0x04, + 0x25, 0x6e, 0x94, 0x0e, 0xec, 0x6c, 0x7e, 0xf7, 0x7c, 0xef, 0xbd, 0xd3, 0xe3, 0xbd, 0xf9, 0x3a, + 0x20, 0x8d, 0x2b, 0x95, 0x8d, 0x95, 0x49, 0xd1, 0xa0, 0x9d, 0xc7, 0xbe, 0x49, 0x91, 0xd0, 0xe3, + 0x3b, 0xca, 0xcf, 0xc6, 0xfd, 0x5e, 0x80, 0x36, 0x41, 0x3b, 0xab, 0x18, 0xe5, 0x80, 0xfb, 0xd6, + 0x17, 0x7b, 0x0a, 0xf5, 0x86, 0x63, 0xba, 0x11, 0x46, 0xe8, 0x36, 0xca, 0x97, 0x9b, 0x0e, 0x3f, + 0x18, 0x3f, 0x7f, 0x00, 0x7a, 0xc4, 0x57, 0x58, 0x4d, 0x52, 0x1d, 0x80, 0x9d, 0xec, 0x7c, 0xbd, + 0x2e, 0x3f, 0x22, 0x4d, 0x31, 0x08, 0x36, 0x60, 0xa3, 0xd3, 0xa9, 0x03, 0xde, 0x80, 0x77, 0x42, + 0xb0, 0x41, 0xaa, 0x4d, 0xa9, 0x2d, 0x0e, 0x2a, 0x6e, 0x7f, 0xe4, 0xdd, 0xf0, 0x33, 0x2a, 0xe5, + 0x66, 0xa6, 0xd2, 0x13, 0xed, 0x41, 0x7b, 0xd4, 0xb9, 0x94, 0x7e, 0x73, 0x80, 0xef, 0x3c, 0x20, + 0x6c, 0x6c, 0xa7, 0x1d, 0x6a, 0x22, 0x0c, 0x3f, 0x19, 0xbf, 0xf8, 0x3b, 0xd5, 0x93, 0xa6, 0xe5, + 0x1d, 0x18, 0xb4, 0x9a, 0xfe, 0x31, 0xa0, 0x27, 0xf8, 0x49, 0xe8, 0x52, 0x88, 0xc3, 0xca, 0xa0, + 0x86, 0xb7, 0xf7, 0x5f, 0xb9, 0x64, 0xdb, 0x5c, 0xb2, 0x9f, 0x5c, 0xb2, 0xf7, 0x42, 0xb6, 0xb6, + 0x85, 0x6c, 0x7d, 0x17, 0xb2, 0xf5, 0xac, 0x22, 0x4d, 0xcb, 0xf5, 0xc2, 0x0f, 0x30, 0x51, 0x06, + 0xa2, 0x68, 0xf3, 0x92, 0x29, 0x8b, 0x49, 0x02, 0xb1, 0x86, 0x54, 0x65, 0xd7, 0xea, 0xad, 0x6e, + 0x4c, 0xd1, 0xc6, 0x80, 0x5d, 0x1c, 0x57, 0x15, 0x5d, 0xfd, 0x06, 0x00, 0x00, 0xff, 0xff, 0x12, + 0x7c, 0x89, 0x79, 0x16, 0x02, 0x00, 0x00, } func (m *SetTokenPricesProposal) Marshal() (dAtA []byte, err error) { diff --git a/x/auction/types/query.pb.go b/x/auction/types/query.pb.go index b33267f96..0f784ead2 100644 --- a/x/auction/types/query.pb.go +++ b/x/auction/types/query.pb.go @@ -9,8 +9,8 @@ import ( _ "github.com/cosmos/cosmos-proto" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + 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" @@ -855,64 +855,65 @@ func init() { func init() { proto.RegisterFile("auction/v1/query.proto", fileDescriptor_73c48d70714d6628) } var fileDescriptor_73c48d70714d6628 = []byte{ - // 905 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xdf, 0x4f, 0xf3, 0x54, - 0x18, 0xc7, 0xd7, 0xbd, 0x80, 0xef, 0x7b, 0xa6, 0x79, 0xf5, 0x01, 0x11, 0xca, 0x2c, 0x5a, 0x06, - 0x18, 0x02, 0x3d, 0x6c, 0x68, 0x70, 0x78, 0xc5, 0x12, 0x43, 0xf0, 0x57, 0x70, 0xd1, 0x1b, 0x6f, - 0x96, 0x76, 0x3d, 0xa9, 0x55, 0xd6, 0x96, 0xb5, 0x5b, 0x5c, 0x08, 0x37, 0x5e, 0xe1, 0x8d, 0xc1, - 0x18, 0xaf, 0xd4, 0xf8, 0x37, 0xf8, 0x5f, 0x70, 0x49, 0xe2, 0x8d, 0x57, 0xc6, 0x80, 0x7f, 0x88, - 0xe9, 0xe9, 0xd3, 0xb5, 0x5d, 0xcf, 0x36, 0x40, 0xef, 0xd6, 0xf3, 0x3c, 0xe7, 0x79, 0x3e, 0xcf, - 0x8f, 0x7e, 0x3b, 0xb2, 0xa8, 0xf7, 0xda, 0x81, 0xed, 0x3a, 0xb4, 0x5f, 0xa5, 0x67, 0x3d, 0xd6, - 0x1d, 0x68, 0x5e, 0xd7, 0x0d, 0x5c, 0x20, 0x78, 0xae, 0xf5, 0xab, 0xf2, 0x82, 0xe5, 0x5a, 0x2e, - 0x3f, 0xa6, 0xe1, 0xaf, 0xc8, 0x43, 0x2e, 0x5b, 0xae, 0x6b, 0x9d, 0x32, 0xaa, 0x7b, 0x36, 0xd5, - 0x1d, 0xc7, 0x0d, 0xf4, 0xd0,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a9, 0x78, 0xfd, 0x7d, 0xfa, 0xcd, - 0x30, 0x68, 0x30, 0xf0, 0x98, 0x6f, 0xcc, 0xf1, 0x3f, 0xc0, 0x7b, 0xff, 0x06, 0x00, 0x00, 0xff, - 0xff, 0x25, 0x5a, 0xbc, 0x81, 0xd5, 0x0b, 0x00, 0x00, + // 922 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x6e, 0xeb, 0x44, + 0x14, 0xc6, 0xe3, 0xdc, 0xb6, 0xdc, 0x3b, 0x01, 0x5d, 0x38, 0xb7, 0x94, 0xd6, 0x0d, 0xbe, 0xe0, + 0x9b, 0xb6, 0x50, 0x81, 0xa7, 0x49, 0x41, 0x55, 0x41, 0x80, 0x1a, 0x09, 0xaa, 0xf2, 0x4f, 0x25, + 0x82, 0x0d, 0x9b, 0xc8, 0x8e, 0x47, 0xc6, 0xd0, 0xd8, 0x6e, 0xec, 0x44, 0x44, 0x55, 0x37, 0xac, + 0xba, 0x01, 0x55, 0xaa, 0xc4, 0x02, 0xb1, 0x40, 0x88, 0x07, 0xe0, 0x31, 0xba, 0xac, 0xc4, 0x86, + 0x55, 0x85, 0x5a, 0x24, 0x5e, 0x03, 0xd9, 0x3e, 0xf6, 0xd8, 0xf1, 0x24, 0x69, 0x0b, 0xbb, 0x7a, + 0xce, 0x99, 0xf3, 0xfd, 0xe6, 0x9c, 0xc9, 0x37, 0x25, 0x0b, 0x7a, 0xbf, 0x13, 0xd8, 0xae, 0x43, + 0x07, 0x75, 0x7a, 0xd8, 0x67, 0xbd, 0xa1, 0xe6, 0xf5, 0xdc, 0xc0, 0x05, 0x82, 0xeb, 0xda, 0xa0, + 0x2e, 0xcf, 0x5b, 0xae, 0xe5, 0x46, 0xcb, 0x34, 0xfc, 0x2b, 0xce, 0x90, 0xab, 0x96, 0xeb, 0x5a, + 0x07, 0x8c, 0xea, 0x9e, 0x4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ad, 0xe3, 0x76, 0xa9, 0xc7, 0x2c, 0x6b, 0xf8, 0xf5, 0x20, 0x53, 0x6f, 0xb0, 0x45, 0xbf, + 0x4d, 0x8b, 0x06, 0x43, 0x8f, 0xf9, 0xc6, 0x5c, 0xf4, 0xdf, 0xf2, 0xe6, 0xbf, 0x01, 0x00, 0x00, + 0xff, 0xff, 0xb1, 0xcf, 0x62, 0xd3, 0x1f, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/auction/types/tx.pb.go b/x/auction/types/tx.pb.go index bd310badc..61451994d 100644 --- a/x/auction/types/tx.pb.go +++ b/x/auction/types/tx.pb.go @@ -8,9 +8,10 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + 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" @@ -150,32 +151,34 @@ func init() { func init() { proto.RegisterFile("auction/v1/tx.proto", fileDescriptor_a60fe804de30894a) } var fileDescriptor_a60fe804de30894a = []byte{ - // 392 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcd, 0x8e, 0xd3, 0x30, - 0x10, 0x8e, 0xe9, 0x6a, 0xa5, 0x7a, 0xb5, 0x02, 0x79, 0x57, 0xab, 0xb4, 0x12, 0xd9, 0xb0, 0xa7, - 0x9e, 0x6c, 0xa5, 0x1c, 0x10, 0x47, 0xc2, 0x85, 0x1e, 0xca, 0x21, 0xd0, 0x4b, 0x2f, 0x56, 0x7e, - 0x2c, 0x63, 0xa8, 0xed, 0x50, 0x3b, 0x51, 0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c, 0x98, - 0x74, 0xc3, 0xa8, 0xd5, 0x9f, 0x98, 0xa2, 0x52, 0x28, 0x21, 0x2b, 0x49, 0x53, 0xa9, 0x2b, 0x65, - 0xfd, 0x8b, 0xff, 0x6b, 0x79, 0xe7, 0x3a, 0xbc, 0x77, 0x0d, 0x96, 0x9d, 0xff, 0x55, 0x6b, 0x7f, - 0x78, 0x09, 0x6f, 0xff, 0x9c, 0xd9, 0x94, 0x5a, 0x19, 0x86, 0x9e, 0xc1, 0x51, 0xd6, 0x4f, 0x7b, - 0x35, 0x7f, 0x8c, 0x7f, 0x5f, 0x04, 0x3b, 0x95, 0xe3, 0xe6, 0x2b, 0x38, 0x5a, 0x1a, 0x8e, 0xde, - 0xc2, 0xf1, 0x2f, 0x3b, 0xba, 0x3f, 0x57, 0xfe, 0x65, 0x99, 0xd3, 0xf0, 0xdf, 0x82, 0xee, 0xcf, - 0xf1, 0x62, 0x7f, 0x0c, 0xc0, 0xe1, 0x18, 0x80, 0xef, 0xc7, 0x00, 0x7c, 0x39, 0x05, 0xde, 0xe1, - 0x14, 0x78, 0x5f, 0x4f, 0x81, 0xb7, 0x26, 0x5c, 0xd8, 0x0f, 0x55, 0x86, 0x73, 0x2d, 0x49, 0xc9, - 0x38, 0xdf, 0x7d, 0xac, 0x89, 0x5b, 0x10, 0xdb, 0x08, 0xb6, 0x25, 0xf5, 0x0b, 0xd2, 0x0c, 0x4f, - 0x84, 0xd8, 0x5d, 0xc9, 0x4c, 0x76, 0xd9, 0x1e, 0xf6, 0xf9, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x49, 0x9d, 0xdf, 0x7b, 0x66, 0x02, 0x00, 0x00, + // 423 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x3f, 0x6f, 0xd4, 0x30, + 0x14, 0x3f, 0x73, 0xa5, 0xd2, 0xf9, 0x54, 0x81, 0xdc,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x8d, 0x9d, 0x09, 0xb6, 0x26, 0xf5, 0x13, 0xd2, 0xf4, 0xef, 0x89, + 0xd8, 0xf3, 0x92, 0x99, 0x6c, 0xb7, 0x3d, 0xf6, 0xe3, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xdc, + 0x29, 0xba, 0x84, 0x93, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/axelarcork/client/cli/tx_test.go b/x/axelarcork/client/cli/tx_test.go index 723aa9f5e..087ba52f3 100644 --- a/x/axelarcork/client/cli/tx_test.go +++ b/x/axelarcork/client/cli/tx_test.go @@ -4,7 +4,6 @@ import ( "os" "testing" - "github.com/cosmos/cosmos-sdk/simapp/params" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/peggyjv/sommelier/v7/x/axelarcork/types" @@ -13,7 +12,7 @@ import ( ) func TestParseAddManagedCellarsProposal(t *testing.T) { - encodingConfig := params.MakeTestEncodingConfig() + encodingConfig := testutil.TestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -43,7 +42,7 @@ func TestParseAddManagedCellarsProposal(t *testing.T) { } func TestParseRemoveManagedCellarsProposal(t *testing.T) { - encodingConfig := params.MakeTestEncodingConfig() + encodingConfig := testutil.TestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -71,7 +70,7 @@ func TestParseRemoveManagedCellarsProposal(t *testing.T) { } func TestParseSubmitScheduledCorkProposal(t *testing.T) { - encodingConfig := params.MakeTestEncodingConfig() + encodingConfig := testutil.TestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -104,7 +103,7 @@ func TestParseSubmitScheduledCorkProposal(t *testing.T) { } func TestParseAxelarCommunityPoolSpendProposal(t *testing.T) { - encodingConfig := params.MakeTestEncodingConfig() + encodingConfig := testutil.TestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -133,7 +132,7 @@ func TestParseAxelarCommunityPoolSpendProposal(t *testing.T) { } func TestParseAddChainConfigurationProposal(t *testing.T) { - encodingConfig := params.MakeTestEncodingConfig() + encodingConfig := testutil.TestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -172,7 +171,7 @@ func TestParseAddChainConfigurationProposal(t *testing.T) { } func TestParseRemoveChainConfigurationProposal(t *testing.T) { - encodingConfig := params.MakeTestEncodingConfig() + encodingConfig := testutil.TestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -197,7 +196,7 @@ func TestParseRemoveChainConfigurationProposal(t *testing.T) { } func TestParseUpgradeAxelarProxyContractProposal(t *testing.T) { - encodingConfig := params.MakeTestEncodingConfig() + encodingConfig := testutil.TestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -224,7 +223,7 @@ func TestParseUpgradeAxelarProxyContractProposal(t *testing.T) { } func TestParseCancelAxelarProxyContractUpgradeProposal(t *testing.T) { - encodingConfig := params.MakeTestEncodingConfig() + encodingConfig := testutil.TestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { diff --git a/x/axelarcork/ibc_middleware.go b/x/axelarcork/ibc_middleware.go index 5c4a1adea..61aebcbe4 100644 --- a/x/axelarcork/ibc_middleware.go +++ b/x/axelarcork/ibc_middleware.go @@ -3,10 +3,10 @@ package axelarcork import ( sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" - "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v6/modules/core/05-port/types" - "github.com/cosmos/ibc-go/v6/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + "github.com/cosmos/ibc-go/v7/modules/core/exported" "github.com/peggyjv/sommelier/v7/x/axelarcork/keeper" ) diff --git a/x/axelarcork/keeper/keeper.go b/x/axelarcork/keeper/keeper.go index 5f328d669..39fbcb1a4 100644 --- a/x/axelarcork/keeper/keeper.go +++ b/x/axelarcork/keeper/keeper.go @@ -8,18 +8,18 @@ import ( "reflect" "sort" + "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" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" - porttypes "github.com/cosmos/ibc-go/v6/modules/core/05-port/types" - "github.com/cosmos/ibc-go/v6/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + "github.com/cosmos/ibc-go/v7/modules/core/exported" "github.com/ethereum/go-ethereum/common" "github.com/peggyjv/sommelier/v7/x/axelarcork/types" - "github.com/tendermint/tendermint/libs/log" ) var _ porttypes.ICS4Wrapper = &Keeper{} diff --git a/x/axelarcork/keeper/keeper_test.go b/x/axelarcork/keeper/keeper_test.go index 3e9fe4670..a999f6b65 100644 --- a/x/axelarcork/keeper/keeper_test.go +++ b/x/axelarcork/keeper/keeper_test.go @@ -6,6 +6,8 @@ import ( "github.com/peggyjv/sommelier/v7/x/axelarcork/tests/mocks" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmtime "github.com/cometbft/cometbft/types/time" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/testutil" @@ -18,8 +20,6 @@ import ( moduletestutil "github.com/peggyjv/sommelier/v7/testutil" "github.com/peggyjv/sommelier/v7/x/axelarcork/types" "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) const ( diff --git a/x/axelarcork/keeper/msg_server.go b/x/axelarcork/keeper/msg_server.go index 1cd7c8bc7..1fbee4faa 100644 --- a/x/axelarcork/keeper/msg_server.go +++ b/x/axelarcork/keeper/msg_server.go @@ -12,8 +12,8 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdk "github.com/cosmos/cosmos-sdk/types" - transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/ethereum/go-ethereum/common" "github.com/peggyjv/sommelier/v7/x/axelarcork/types" diff --git a/x/axelarcork/keeper/packet.go b/x/axelarcork/keeper/packet.go index de971a218..582abc483 100644 --- a/x/axelarcork/keeper/packet.go +++ b/x/axelarcork/keeper/packet.go @@ -7,7 +7,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/ethereum/go-ethereum/common" "github.com/peggyjv/sommelier/v7/x/axelarcork/types" ) diff --git a/x/axelarcork/keeper/proposal_handler.go b/x/axelarcork/keeper/proposal_handler.go index 1805e0fbd..07e120209 100644 --- a/x/axelarcork/keeper/proposal_handler.go +++ b/x/axelarcork/keeper/proposal_handler.go @@ -6,8 +6,8 @@ import ( "time" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/axelarcork/keeper/setup_unit_test.go b/x/axelarcork/keeper/setup_unit_test.go index 009779e0d..bd21dc7b1 100644 --- a/x/axelarcork/keeper/setup_unit_test.go +++ b/x/axelarcork/keeper/setup_unit_test.go @@ -7,6 +7,9 @@ import ( "github.com/peggyjv/sommelier/v7/x/axelarcork/tests/mocks" "github.com/peggyjv/sommelier/v7/x/axelarcork/types" + tmdb "github.com/cometbft/cometbft-db" + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/store" @@ -14,9 +17,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmdb "github.com/tendermint/tm-db" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" diff --git a/x/axelarcork/module.go b/x/axelarcork/module.go index be79e946a..52fae1689 100644 --- a/x/axelarcork/module.go +++ b/x/axelarcork/module.go @@ -3,8 +3,8 @@ package axelarcork import ( "context" "encoding/json" - "math/rand" + abci "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" @@ -16,7 +16,6 @@ import ( "github.com/peggyjv/sommelier/v7/x/axelarcork/keeper" "github.com/peggyjv/sommelier/v7/x/axelarcork/types" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" ) var ( @@ -95,17 +94,9 @@ func (AppModule) Name() string { return types.ModuleName } // RegisterInvariants performs a no-op. func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} -// Route returns the message routing key for the cork module. -func (am AppModule) Route() sdk.Route { return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) } - // QuerierRoute returns the cork module's querier route name. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns a nil Querier. -func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { - return nil -} - // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 1 @@ -160,11 +151,6 @@ func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedPro return nil } -// RandomizedParams creates randomized cork param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []sim.ParamChange { - return nil -} - // RegisterStoreDecoder registers a decoder for cork module's types func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { } diff --git a/x/axelarcork/module_test.go b/x/axelarcork/module_test.go index 8c4745323..e46f1b02e 100644 --- a/x/axelarcork/module_test.go +++ b/x/axelarcork/module_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" - transfertypes "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" - channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" + transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" "github.com/golang/mock/gomock" "github.com/peggyjv/sommelier/v7/x/axelarcork/tests" "github.com/peggyjv/sommelier/v7/x/axelarcork/types" diff --git a/x/axelarcork/tests/mocks/expected_keepers_mocks.go b/x/axelarcork/tests/mocks/expected_keepers_mocks.go index bb3f1a0cb..8c0e716d1 100644 --- a/x/axelarcork/tests/mocks/expected_keepers_mocks.go +++ b/x/axelarcork/tests/mocks/expected_keepers_mocks.go @@ -15,10 +15,10 @@ import ( types2 "github.com/cosmos/cosmos-sdk/x/capability/types" types3 "github.com/cosmos/cosmos-sdk/x/distribution/types" types4 "github.com/cosmos/cosmos-sdk/x/staking/types" - types5 "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" - types6 "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" - types7 "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" - exported "github.com/cosmos/ibc-go/v6/modules/core/exported" + types5 "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + types6 "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + types7 "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + exported "github.com/cosmos/ibc-go/v7/modules/core/exported" gomock "github.com/golang/mock/gomock" types8 "github.com/peggyjv/sommelier/v7/x/pubsub/types" ) diff --git a/x/axelarcork/tests/mocks/ibc_module_mocks.go b/x/axelarcork/tests/mocks/ibc_module_mocks.go index d3d719c32..79a0d84e3 100644 --- a/x/axelarcork/tests/mocks/ibc_module_mocks.go +++ b/x/axelarcork/tests/mocks/ibc_module_mocks.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: /Users/bolten/code/go/pkg/mod/github.com/cosmos/ibc-go/v6@v6.2.0/modules/core/05-port/types/module.go +// Source: /Users/bolten/code/go/pkg/mod/github.com/cosmos/ibc-go/v7@v6.2.0/modules/core/05-port/types/module.go // Package mocks is a generated GoMock package. package mocks @@ -9,9 +9,9 @@ import ( types "github.com/cosmos/cosmos-sdk/types" types0 "github.com/cosmos/cosmos-sdk/x/capability/types" - types1 "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" - types2 "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" - exported "github.com/cosmos/ibc-go/v6/modules/core/exported" + types1 "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + types2 "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + exported "github.com/cosmos/ibc-go/v7/modules/core/exported" gomock "github.com/golang/mock/gomock" ) diff --git a/x/axelarcork/tests/mocks/staking_mocks.go b/x/axelarcork/tests/mocks/staking_mocks.go index 0df4001b1..8e904d895 100644 --- a/x/axelarcork/tests/mocks/staking_mocks.go +++ b/x/axelarcork/tests/mocks/staking_mocks.go @@ -7,11 +7,11 @@ package mocks import ( reflect "reflect" + crypto "github.com/cometbft/cometbft/proto/tendermint/crypto" types "github.com/cosmos/cosmos-sdk/crypto/types" types0 "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/x/staking/types" gomock "github.com/golang/mock/gomock" - crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" ) // MockDelegationI is a mock of DelegationI interface. diff --git a/x/axelarcork/tests/setup.go b/x/axelarcork/tests/setup.go index 7816534b3..7ec3b31e1 100644 --- a/x/axelarcork/tests/setup.go +++ b/x/axelarcork/tests/setup.go @@ -3,6 +3,9 @@ package tests import ( "testing" + tmdb "github.com/cometbft/cometbft-db" + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/store" @@ -11,16 +14,13 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - porttypes "github.com/cosmos/ibc-go/v6/modules/core/05-port/types" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" "github.com/golang/mock/gomock" "github.com/peggyjv/sommelier/v7/x/axelarcork" "github.com/peggyjv/sommelier/v7/x/axelarcork/keeper" "github.com/peggyjv/sommelier/v7/x/axelarcork/tests/mocks" "github.com/peggyjv/sommelier/v7/x/axelarcork/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" ) var TestGMPAccount = authtypes.NewModuleAddress("test-gmp-account") diff --git a/x/axelarcork/types/axelarcork.pb.go b/x/axelarcork/types/axelarcork.pb.go index ecd7b56c1..4ba413828 100644 --- a/x/axelarcork/types/axelarcork.pb.go +++ b/x/axelarcork/types/axelarcork.pb.go @@ -8,7 +8,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/axelarcork/types/event.pb.go b/x/axelarcork/types/event.pb.go index 00922cc9a..f8292c034 100644 --- a/x/axelarcork/types/event.pb.go +++ b/x/axelarcork/types/event.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/axelarcork/types/expected_keepers.go b/x/axelarcork/types/expected_keepers.go index d7bc1025e..e278028d2 100644 --- a/x/axelarcork/types/expected_keepers.go +++ b/x/axelarcork/types/expected_keepers.go @@ -13,10 +13,10 @@ import ( capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v6/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types" - ibcexported "github.com/cosmos/ibc-go/v6/modules/core/exported" + "github.com/cosmos/ibc-go/v7/modules/apps/transfer/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" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" ) diff --git a/x/axelarcork/types/genesis.pb.go b/x/axelarcork/types/genesis.pb.go index 9a377a0a9..a74f12d44 100644 --- a/x/axelarcork/types/genesis.pb.go +++ b/x/axelarcork/types/genesis.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/axelarcork/types/params.go b/x/axelarcork/types/params.go index 9b555adad..3dcd479c7 100644 --- a/x/axelarcork/types/params.go +++ b/x/axelarcork/types/params.go @@ -5,7 +5,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - host "github.com/cosmos/ibc-go/v6/modules/core/24-host" + host "github.com/cosmos/ibc-go/v7/modules/core/24-host" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) diff --git a/x/axelarcork/types/proposal.go b/x/axelarcork/types/proposal.go index bddd0c3b4..1484ba705 100644 --- a/x/axelarcork/types/proposal.go +++ b/x/axelarcork/types/proposal.go @@ -42,28 +42,20 @@ func init() { // This PR was later reverted, but RegisterProposalTypeCodec was still left out. Not sure if // this was intentional or not. govtypesv1beta1.RegisterProposalType(ProposalTypeAddManagedCellarIDs) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&AddAxelarManagedCellarIDsProposal{}, "sommelier/AddAxelarManagedCellarIDsProposal", nil) govtypesv1beta1.RegisterProposalType(ProposalTypeRemoveManagedCellarIDs) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&RemoveAxelarManagedCellarIDsProposal{}, "sommelier/RemoveAxelarManagedCellarIDsProposal", nil) govtypesv1beta1.RegisterProposalType(ProposalTypeScheduledCork) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&AxelarScheduledCorkProposal{}, "sommelier/AxelarScheduledCorkProposal", nil) govtypesv1beta1.RegisterProposalType(ProposalTypeAddChainConfiguration) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&AddChainConfigurationProposal{}, "sommelier/AddAxelarChainConfigurationProposal", nil) govtypesv1beta1.RegisterProposalType(ProposalTypeRemoveChainConfiguration) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&RemoveChainConfigurationProposal{}, "sommelier/RemoveAxelarChainConfigurationProposal", nil) govtypesv1beta1.RegisterProposalType(ProposalTypeCommunitySpend) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&AxelarCommunityPoolSpendProposal{}, "sommelier/AxelarCommunitySpendProposal", nil) govtypesv1beta1.RegisterProposalType(ProposalTypeUpgradeAxelarProxyContract) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&UpgradeAxelarProxyContractProposal{}, "sommelier/UpgradeAxelarProxyContractProposal", nil) govtypesv1beta1.RegisterProposalType(ProposalTypeCancelAxelarProxyContractUpgrade) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&CancelAxelarProxyContractUpgradeProposal{}, "sommelier/CancelAxelarProxyContractUpgradeProposal", nil) } func NewAddAxelarManagedCellarIDsProposal(title string, description string, chainID uint64, cellarIds *CellarIDSet, publisherDomain string) *AddAxelarManagedCellarIDsProposal { diff --git a/x/axelarcork/types/proposal.pb.go b/x/axelarcork/types/proposal.pb.go index 2a78fdabb..55e8ac907 100644 --- a/x/axelarcork/types/proposal.pb.go +++ b/x/axelarcork/types/proposal.pb.go @@ -7,7 +7,7 @@ import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/axelarcork/types/query.pb.go b/x/axelarcork/types/query.pb.go index 2387f2dea..4711a6b97 100644 --- a/x/axelarcork/types/query.pb.go +++ b/x/axelarcork/types/query.pb.go @@ -6,9 +6,10 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + 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" @@ -1314,87 +1315,88 @@ func init() { func init() { proto.RegisterFile("axelarcork/v1/query.proto", fileDescriptor_7d10e4f1065c484f) } var fileDescriptor_7d10e4f1065c484f = []byte{ - // 1270 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x98, 0x4d, 0x6f, 0xdc, 0x54, - 0x17, 0xc7, 0xe3, 0x3c, 0x69, 0x1f, 0x72, 0xd3, 0xa6, 0xd1, 0x69, 0x4a, 0x1b, 0x87, 0x4e, 0x12, - 0xe7, 0xb5, 0x69, 0x67, 0x9c, 0x4c, 0x5a, 0x12, 0xa8, 0x04, 0x4d, 0x26, 0x12, 0x0c, 0x85, 0x52, - 0x1c, 0xa1, 0xa2, 0x22, 0x64, 0x39, 0xf6, 0xc5, 0x31, 0x71, 0xec, 0xa9, 0xed, 0x49, 0x32, 0x8a, - 0xb2, 0x80, 0x25, 0x2b, 0x04, 0xac, 0xf9, 0x00, 0xec, 0x40, 0x62, 0x01, 0xac, 0xd8, 0x55, 0xac, - 0x2a, 0xb1, 0x61, 0x85, 0x50, 0xd2, 0x0f, 0x82, 0x7c, 0x7d, 0x3c, 0xf1, 0xeb, 0x8c, 0xa7, 0xdd, - 0x65, 0xee, 0x79, 0xfb, 0x9d, 0x3b, 0xc7, 0xc7, 0xff, 0x09, 0x19, 0x53, 0x0e, 0xa9, 0xa9, 0x38, - 0xaa, 0xed, 0xec, 0x8a, 0xfb, 0xcb, 0xe2, 0x93, 0x26, 0x75, 0x5a, 0x95, 0x86, 0x63, 0x7b, 0x36, - 0x5c, 0x3c, 0x33, 0x55, 0xf6, 0x97, 0xf9, 0x51, 0xdd, 0xd6, 0x6d, 0x66, 0x11, 0xfd, 0xbf, 0x02, - 0x27, 0xfe, 0x35, 0xdd, 0xb6, 0x75, 0x93, 0x8a, 0x4a, 0xc3, 0x10, 0x15, 0xcb, 0xb2, 0x3d, 0xc5, - 0x33, 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db, 0xe7, 0xd9, 0xbf, 0xa1, 0x56, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xdc, 0xe2, - 0x5d, 0x80, 0x23, 0x13, 0x00, 0x00, + // 1290 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x98, 0x4b, 0x6f, 0xdc, 0x54, + 0x14, 0xc7, 0xe3, 0x90, 0x16, 0x72, 0xd3, 0x47, 0x74, 0x9a, 0xd2, 0xc6, 0xa1, 0x93, 0xc4, 0x79, + 0x36, 0x34, 0xe3, 0x64, 0xd2, 0x92, 0x50, 0x5e, 0x4d, 0x26, 0x08, 0x86, 0x42, 0x55, 0x1c, 0x50, + 0xab, 0x22, 0x64, 0x39, 0xf6, 0xc5, 0x31, 0xf1, 0xd8, 0x53, 0xdb, 0x93, 0x66, 0x14, 0xb2, 0x80, + 0x15, 0x3b, 0x90, 0x58, 0x20, 0xd6, 0x7c, 0x01, 0x56, 0x20, 0xb1, 0x00, 0x56, 0xa8, 0x3b, 0x2a, + 0xb1, 0x61, 0x85, 0x50, 0x82, 0x84, 0xd8, 0xf1, 0x11, 0x90, 0xed, 0xe3, 0xf1, 0x7b, 0xc6, 0xd3, + 0xee, 0xe2, 0x7b, 0x5e, 0xbf, 0x73, 0xe7, 0xde, 0xe3, 0xbf, 0x43, 0x46, 0xa5, 0x7d, 0xaa, 0x4b, + 0x96, 0x6c, 0x5a, 0xbb, 0xfc, 0xde, 0x32, 0x7f, 0xbf, 0x49, 0xad, 0x56, 0xb9, 0x61, 0x99, 0x8e, + 0x09, 0xa7, 0x43, 0x53, 0x79, 0x6f, 0x99, 0x1d, 0x51, 0x4d, 0xd5, 0xf4, 0x2c, 0xbc, 0xfb, 0x97, + 0xef, 0xc4, 0x3e, 0xa7, 0x9a, 0xa6, 0xaa, 0x53, 0x5e, 0x6a, 0x68, 0xbc, 0x64, 0x18, 0xa6, 0x23, + 0x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, 0xb5, 0xc4, 0x2e, 0x14, + 0x71, 0x45, 0xd8, 0x6b, 0x21, 0xec, 0x02, 0xcc, 0xe7, 0xc2, 0xda, 0x41, 0xb4, 0x7f, 0x68, 0xe1, + 0x17, 0x26, 0xa9, 0xd7, 0xa2, 0xea, 0x06, 0x96, 0x3a, 0x12, 0x64, 0x08, 0x29, 0x76, 0xb9, 0x87, + 0x08, 0x44, 0x7f, 0x25, 0x44, 0xaf, 0xc0, 0x52, 0x01, 0xf4, 0x98, 0xd0, 0x82, 0x7f, 0x19, 0x7c, + 0x07, 0x75, 0x10, 0x3b, 0xf0, 0x42, 0xf7, 0xad, 0xcc, 0x92, 0x61, 0xec, 0x6a, 0xcf, 0x71, 0xd8, + 0xd4, 0x7b, 0x61, 0x53, 0x35, 0x78, 0xa3, 0xe8, 0xef, 0xe1, 0x9e, 0xa0, 0x68, 0x77, 0xfc, 0x41, + 0xf4, 0xe9, 0x10, 0x7e, 0x0c, 0x6e, 0x43, 0x5a, 0x25, 0x65, 0xdf, 0x86, 0x5c, 0x69, 0x96, 0x7d, + 0x1b, 0xf2, 0xc5, 0x17, 0x77, 0x23, 0x6c, 0xe8, 0x1a, 0xac, 0xf4, 0xd2, 0x90, 0xa6, 0xf0, 0x07, + 0x9a, 0x72, 0x08, 0xdf, 0x30, 0xe4, 0x6c, 0x42, 0xae, 0x40, 0xf6, 0xdc, 0x48, 0xaa, 0x34, 0x76, + 0xb6, 0x9b, 0x1b, 0x42, 0xae, 0x86, 0x90, 0x57, 0x60, 0x21, 0xff, 0xca, 0x9a, 0xd6, 0xae, 0x68, + 0xf9, 0x2a, 0xc7, 0x67, 0xfb, 0x9a, 0x21, 0xc3, 0x49, 0x29, 0x05, 0x5d, 0xaa, 0xb6, 0xcf, 0xfc, + 0x5c, 0x57, 0x3f, 0xc4, 0xab, 0x84, 0x78, 0x73, 0x30, 0x53, 0x08, 0x0f, 0x7e, 0x60, 0x02, 0x91, + 0x97, 0x96, 0x58, 0x90, 0x3d,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 0xa9, 0xb2, 0xb7, 0xca, 0xef, + 0x47, 0x4b, 0x39, 0xad, 0x06, 0xb5, 0xb7, 0x4f, 0x7a, 0xff, 0xcc, 0x5a, 0xf9, 0x3f, 0x00, 0x00, + 0xff, 0xff, 0xdd, 0x40, 0xa8, 0xee, 0x86, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/axelarcork/types/tx.pb.go b/x/axelarcork/types/tx.pb.go index 840ef50a4..db6936305 100644 --- a/x/axelarcork/types/tx.pb.go +++ b/x/axelarcork/types/tx.pb.go @@ -7,9 +7,10 @@ import ( context "context" fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + 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" @@ -571,46 +572,48 @@ func init() { func init() { proto.RegisterFile("axelarcork/v1/tx.proto", fileDescriptor_7efa2af5736321fb) } var fileDescriptor_7efa2af5736321fb = []byte{ - // 618 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xcd, 0x6e, 0xd3, 0x4c, - 0x14, 0xcd, 0xd4, 0x69, 0xbf, 0x2f, 0xd3, 0x82, 0x90, 0x81, 0x92, 0x9a, 0xd6, 0xb4, 0x16, 0x8b, - 0xd0, 0x82, 0x47, 0x09, 0x02, 0xd6, 0x4d, 0x16, 0x50, 0x89, 0x48, 0xc8, 0x88, 0x0d, 0x9b, 0x30, - 0xb1, 0x6f, 0x27, 0x26, 0xb6, 0xc7, 0x78, 0x26, 0x51, 0xf2, 0x04, 0x2c, 0xd8, 0xf0, 0x06, 0x2c, - 0xd8, 0xf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0x7b, 0xa5, 0x46, 0xdf, 0x64, 0x06, 0x00, 0x00, + // 650 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x3f, 0x6f, 0xd3, 0x40, + 0x14, 0xcf, 0x35, 0x69, 0x21, 0x97, 0x82, 0x90, 0x81, 0x36, 0x35, 0xad, 0x69, 0x23, 0x86, 0x90, + 0x82, 0x4f, 0x29, 0x02, 0x24, 0xb6, 0x36, 0x03, 0x20, 0x11, 0x09, 0x05, 0xb1, 0xb0, 0x84, 0x8b, + 0xfd, 0x7a, 0x31, 0xb1, 0x7d, 0xc1, 0x77, 0x89, 0x92, 0x0d, 0xf1, 0x09, 0x18, 0x18, 0xf8, 0x10, + 0x48, 0xf4, 0x63, 0x74, 0xec, 0xc8, 0x80, 0x10, 0x6a, 0x87, 0x7e, 0x0d, 0xe4, 0xf3, 0x55, 0x8d, + 0x9b, 0x34, 0xf2, 0x82, 0xc4, 0x76, 0xf7, 0x7e, 0xef, 0xde, 0xfb, 0xfd, 0xde, 0x1f, 0x1b, 0xaf, + 0xd0, 0x11, 0xf8, 0x34, 0x72, 0x78, 0xd4, 0x23, 0xc3, 0x3a, 0x91, 0x23, 0xbb, 0x1f, 0x71, 0xc9, + 0x8d, 0x6b, 0xe7, 0x76, 0x7b, 0x58, 0x37, 0x2d, 0x87, 0x8b, 0x80, 0x0b, 0xd2, 0xa1, 0x02, 0xc8, + 0xb0, 0xde, 0x01, 0x49, 0xeb, 0xc4, 0xe1, 0x5e, 0x98, 0xb8, 0x9b, 0xab, 0x1a, 0x0f, 0x04, 0x8b, + 0xc3, 0x04, 0x82, 0x69, 0xc0, 0x4a, 0xc7, 0x9f, 0x88, 0x9a, 0xe0, 0xb7, 0x18, 0x67, 0x5c, 0x1d, + 0x49, 0x7c, 0x4a, 0xac, 0x95, 0x03, 0x84, 0xd7, 0x9b, 0x82, 0xbd, 0x71, 0xba, 0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a3, 0x36, 0xfd, 0xf2, 0xb2, 0x01, 0x33, 0xb7, 0x33, + 0xf9, 0xea, 0x3c, 0x3e, 0xbe, 0x99, 0x14, 0xf6, 0x4c, 0xad, 0xab, 0x34, 0xcd, 0x60, 0x7a, 0xc9, + 0x54, 0x98, 0xb5, 0x2c, 0xae, 0x49, 0x36, 0x73, 0xf1, 0xd3, 0xe9, 0x41, 0x0d, 0xed, 0xbd, 0x3a, + 0x3c, 0xb6, 0xd0, 0xd1, 0xb1, 0x85, 0xfe, 0x1c, 0x5b, 0xe8, 0xcb, 0x89, 0x95, 0x3b, 0x3a, 0xb1, + 0x72, 0x3f, 0x4f, 0xac, 0xdc, 0xbb, 0x1d, 0xe6, 0xc9, 0xee, 0xa0, 0x63, 0x3b, 0x3c, 0x20, 0x7d, + 0x60, 0x6c, 0xfc, 0x61, 0x48, 0x04, 0x0f, 0x02, 0xf0, 0x3d, 0x88, 0xc8, 0xf0, 0x29, 0x19, 0x4d, + 0xfc, 0x3c, 0x88, 0x1c, 0xf7, 0x41, 0x74, 0x96, 0xd4, 0xdf, 0xe2, 0xd1, 0xdf, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x95, 0x59, 0x36, 0x0d, 0xc5, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/cellarfees/keeper/keeper.go b/x/cellarfees/keeper/keeper.go index 2d1c22f3a..8a966f209 100644 --- a/x/cellarfees/keeper/keeper.go +++ b/x/cellarfees/keeper/keeper.go @@ -5,7 +5,7 @@ import ( "math/big" "cosmossdk.io/math" - "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" diff --git a/x/cellarfees/keeper/keeper_test.go b/x/cellarfees/keeper/keeper_test.go index 69aa2b2f4..90ac9bea9 100644 --- a/x/cellarfees/keeper/keeper_test.go +++ b/x/cellarfees/keeper/keeper_test.go @@ -14,12 +14,12 @@ import ( "github.com/peggyjv/sommelier/v7/app/params" cellarfeestestutil "github.com/peggyjv/sommelier/v7/x/cellarfees/testutil" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmtime "github.com/cometbft/cometbft/types/time" moduletestutil "github.com/peggyjv/sommelier/v7/testutil" cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" cellarfeestypesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) var ( diff --git a/x/cellarfees/module.go b/x/cellarfees/module.go index 01bb1bec0..bc3c931d8 100644 --- a/x/cellarfees/module.go +++ b/x/cellarfees/module.go @@ -3,8 +3,8 @@ package cellarfees import ( "context" "encoding/json" - "math/rand" + abci "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" @@ -17,7 +17,6 @@ import ( "github.com/peggyjv/sommelier/v7/x/cellarfees/types" typesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" ) var ( @@ -106,17 +105,9 @@ func (AppModule) Name() string { return types.ModuleName } // RegisterInvariants performs a no-op. func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {} -// Route returns the message routing key for the cellarfees module. -func (am AppModule) Route() sdk.Route { return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) } - // QuerierRoute returns the cellarfees module's querier route name. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns a nil Querier. -func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { - return nil -} - // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 1 @@ -170,10 +161,5 @@ func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedPro return nil } -// RandomizedParams creates randomized cellarfees param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []sim.ParamChange { - return nil -} - // RegisterStoreDecoder registers a decoder for cellarfees module's types func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) {} diff --git a/x/cellarfees/types/v1/cellarfees.pb.go b/x/cellarfees/types/v1/cellarfees.pb.go index 2dd2a5f80..428fbf619 100644 --- a/x/cellarfees/types/v1/cellarfees.pb.go +++ b/x/cellarfees/types/v1/cellarfees.pb.go @@ -6,7 +6,7 @@ package v1 import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/cellarfees/types/v1/genesis.pb.go b/x/cellarfees/types/v1/genesis.pb.go index 9c9c6f6f7..03f711064 100644 --- a/x/cellarfees/types/v1/genesis.pb.go +++ b/x/cellarfees/types/v1/genesis.pb.go @@ -7,7 +7,7 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/cellarfees/types/v1/params.pb.go b/x/cellarfees/types/v1/params.pb.go index 145770448..e77afb0ff 100644 --- a/x/cellarfees/types/v1/params.pb.go +++ b/x/cellarfees/types/v1/params.pb.go @@ -7,7 +7,7 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/cellarfees/types/v1/query.pb.go b/x/cellarfees/types/v1/query.pb.go index 1f1f8a7dd..788633d29 100644 --- a/x/cellarfees/types/v1/query.pb.go +++ b/x/cellarfees/types/v1/query.pb.go @@ -8,8 +8,8 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + 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/cellarfees/types/v2/cellarfees.pb.go b/x/cellarfees/types/v2/cellarfees.pb.go index cbb6e33a9..06a19d364 100644 --- a/x/cellarfees/types/v2/cellarfees.pb.go +++ b/x/cellarfees/types/v2/cellarfees.pb.go @@ -8,7 +8,7 @@ import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -25,6 +25,8 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Collin: This type should never be saved to state in case of indeterminism around how +// Go interprets floating point numbers. This is only meant to be used for query results. type FeeTokenBalance struct { Balance types.Coin `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance"` UsdValue float64 `protobuf:"fixed64,2,opt,name=usd_value,json=usdValue,proto3" json:"usd_value,omitempty"` diff --git a/x/cellarfees/types/v2/genesis.pb.go b/x/cellarfees/types/v2/genesis.pb.go index 09f70f160..8c6d715d4 100644 --- a/x/cellarfees/types/v2/genesis.pb.go +++ b/x/cellarfees/types/v2/genesis.pb.go @@ -7,7 +7,7 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/cellarfees/types/v2/params.pb.go b/x/cellarfees/types/v2/params.pb.go index ae6a75111..0c5afab6d 100644 --- a/x/cellarfees/types/v2/params.pb.go +++ b/x/cellarfees/types/v2/params.pb.go @@ -7,7 +7,7 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/cellarfees/types/v2/query.pb.go b/x/cellarfees/types/v2/query.pb.go index 588c30566..873e8d16c 100644 --- a/x/cellarfees/types/v2/query.pb.go +++ b/x/cellarfees/types/v2/query.pb.go @@ -7,9 +7,10 @@ import ( context "context" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + 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" @@ -529,51 +530,53 @@ func init() { func init() { proto.RegisterFile("cellarfees/v2/query.proto", fileDescriptor_43b5cfd9b5e06b70) } var fileDescriptor_43b5cfd9b5e06b70 = []byte{ - // 700 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x95, 0xbf, 0x6f, 0xd3, 0x4e, - 0x18, 0xc6, 0xe3, 0x6f, 0xbf, 0xfd, 0xc1, 0x05, 0x44, 0x39, 0x52, 0xd1, 0x9a, 0xe0, 0x34, 0x56, - 0x05, 0xa5, 0xa5, 0xbe, 0xca, 0x51, 0x45, 0x05, 0x0b, 0xcd, 0x80, 0x04, 0x02, 0x51, 0x02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x0a, 0x5e, 0xce, 0x44, 0xdb, 0x06, 0xb0, 0xc2, 0xa8, 0xd7, 0x4a, 0x02, 0x89, 0x3f, 0x2b, 0xa8, - 0x90, 0x36, 0x16, 0x2f, 0x8d, 0xe0, 0x9d, 0x70, 0x2e, 0x8f, 0xa4, 0x95, 0x98, 0x37, 0x05, 0xe6, - 0x1a, 0xae, 0xfc, 0x03, 0x26, 0x79, 0x23, 0xde, 0x04, 0xbb, 0xd5, 0x07, 0x7b, 0x87, 0x9a, 0xb2, - 0x7f, 0xa8, 0x29, 0x3f, 0x0f, 0x35, 0xe5, 0xfd, 0x91, 0x96, 0xdb, 0x3f, 0xd2, 0x72, 0xdf, 0x8f, - 0xb4, 0xdc, 0xb3, 0xb5, 0xbe, 0xb7, 0xa9, 0x0f, 0xb6, 0xdd, 0x7d, 0xd9, 0xe9, 0x33, 0xe8, 0x5c, - 0x27, 0xaf, 0xfb, 0x5d, 0xc4, 0xdb, 0x95, 0x74, 0xcc, 0xad, 0x09, 0xf1, 0x07, 0x56, 0xf9, 0x1d, - 0x00, 0x00, 0xff, 0xff, 0x21, 0x3f, 0x46, 0xc0, 0x5c, 0x07, 0x00, 0x00, + // 723 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x95, 0x4f, 0x6f, 0xd3, 0x48, + 0x18, 0xc6, 0xe3, 0xed, 0xf6, 0xcf, 0x4e, 0x76, 0xb5, 0x65, 0x48, 0x45, 0xeb, 0x06, 0xa7, 0xb1, + 0x10, 0x6a, 0xd3, 0xd6, 0x53, 0x1c, 0x55, 0x54, 0x48, 0x48, 0x6d, 0x0e, 0x48, 0x20, 0x10, 0x25, + 0x70, 0xe0, 0xcf, 0xc1, 0x9a, 0x26, 0x53, 0x13, 0x62, 0x7b, 0x5c, 0x8f, 0x63, 0x88, 0x10, 0x97, + 0x9e, 0x10, 0x27, 0x24, 0x3e, 0x02, 0x57, 0x0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0x6f, 0x97, 0x10, 0xc3, 0x0f, + 0x07, 0x18, 0x71, 0x54, 0xe1, 0x07, 0x09, 0x14, 0xd2, 0x66, 0xc3, 0xca, 0x08, 0x00, 0x31, 0xec, + 0xf2, 0x48, 0x5a, 0xc1, 0xba, 0x99, 0xb0, 0xae, 0xc3, 0xea, 0x1f, 0xb0, 0xa2, 0xe7, 0xfc, 0xa0, + 0x78, 0x51, 0xbb, 0x7d, 0x70, 0xac, 0x48, 0x87, 0xc7, 0x8a, 0xf4, 0xed, 0x58, 0x91, 0x5e, 0x9f, + 0x28, 0xb9, 0xc3, 0x13, 0x25, 0xf7, 0xe5, 0x44, 0xc9, 0x3d, 0x5c, 0xef, 0x3b, 0x6c, 0x5d, 0x62, + 0x9a, 0xdd, 0x27, 0x41, 0x9f, 0x41, 0x70, 0x19, 0x3d, 0xeb, 0x77, 0xe1, 0x87, 0x2f, 0x0a, 0xf4, + 0x9d, 0x09, 0xfe, 0xff, 0x56, 0xfd, 0x19, 0x00, 0x00, 0xff, 0xff, 0xe9, 0xe7, 0xa8, 0xd7, 0x98, + 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/cork/client/cli/tx_test.go b/x/cork/client/cli/tx_test.go index 4e8a4b008..137992119 100644 --- a/x/cork/client/cli/tx_test.go +++ b/x/cork/client/cli/tx_test.go @@ -4,7 +4,6 @@ import ( "os" "testing" - "github.com/cosmos/cosmos-sdk/simapp/params" types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" "github.com/cosmos/cosmos-sdk/testutil" @@ -12,7 +11,7 @@ import ( ) func TestParseAddManagedCellarsProposal(t *testing.T) { - encodingConfig := params.MakeTestEncodingConfig() + encodingConfig := testutil.TestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -40,7 +39,7 @@ func TestParseAddManagedCellarsProposal(t *testing.T) { } func TestParseRemoveManagedCellarsProposal(t *testing.T) { - encodingConfig := params.MakeTestEncodingConfig() + encodingConfig := testutil.TestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -66,7 +65,7 @@ func TestParseRemoveManagedCellarsProposal(t *testing.T) { } func TestParseSubmitScheduledCorkProposal(t *testing.T) { - encodingConfig := params.MakeTestEncodingConfig() + encodingConfig := testutil.TestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { diff --git a/x/cork/keeper/keeper.go b/x/cork/keeper/keeper.go index 80a932be6..b96ec3382 100644 --- a/x/cork/keeper/keeper.go +++ b/x/cork/keeper/keeper.go @@ -5,6 +5,7 @@ import ( "encoding/binary" "sort" + "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" @@ -12,7 +13,6 @@ import ( "github.com/ethereum/go-ethereum/common" corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" - "github.com/tendermint/tendermint/libs/log" ) const corkVoteThresholdStr = "0.67" diff --git a/x/cork/keeper/keeper_test.go b/x/cork/keeper/keeper_test.go index c7d4e2139..a3ed909d2 100644 --- a/x/cork/keeper/keeper_test.go +++ b/x/cork/keeper/keeper_test.go @@ -3,6 +3,8 @@ package keeper import ( "testing" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmtime "github.com/cometbft/cometbft/types/time" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/testutil" @@ -16,8 +18,6 @@ import ( corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) var ( diff --git a/x/cork/keeper/setup_unit_test.go b/x/cork/keeper/setup_unit_test.go index f97e5bb9f..8b3f140be 100644 --- a/x/cork/keeper/setup_unit_test.go +++ b/x/cork/keeper/setup_unit_test.go @@ -18,10 +18,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + tmdb "github.com/cometbft/cometbft-db" + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmdb "github.com/tendermint/tm-db" ) type mocksForCork struct { diff --git a/x/cork/keeper/test_common.go b/x/cork/keeper/test_common.go index 98bde4a97..17d86091d 100644 --- a/x/cork/keeper/test_common.go +++ b/x/cork/keeper/test_common.go @@ -7,6 +7,9 @@ import ( "cosmossdk.io/math" + dbm "github.com/cometbft/cometbft-db" + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -29,7 +32,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/capability" "github.com/cosmos/cosmos-sdk/x/crisis" "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" @@ -38,14 +40,12 @@ 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" "github.com/cosmos/cosmos-sdk/x/params" paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - paramsproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" "github.com/cosmos/cosmos-sdk/x/slashing" slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" @@ -63,9 +63,6 @@ import ( pubsubkeeper "github.com/peggyjv/sommelier/v7/x/pubsub/keeper" pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - dbm "github.com/tendermint/tm-db" ) var ( @@ -79,7 +76,7 @@ var ( mint.AppModuleBasic{}, distribution.AppModuleBasic{}, gov.NewAppModuleBasic( - []govclient.ProposalHandler{paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler}, + []govclient.ProposalHandler{paramsclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler}, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, @@ -277,11 +274,11 @@ func CreateTestEnv(t *testing.T) TestInput { accountKeeper := authkeeper.NewAccountKeeper( marshaler, - keyAcc, // target store - getSubspace(paramsKeeper, authtypes.ModuleName), + keyAcc, // target store authtypes.ProtoBaseAccount, // prototype maccPerms, "stake", + govtypes.ModuleName, ) blockedAddr := make(map[string]bool, len(maccPerms)) @@ -293,15 +290,15 @@ func CreateTestEnv(t *testing.T) TestInput { marshaler, keyBank, accountKeeper, - getSubspace(paramsKeeper, banktypes.ModuleName), blockedAddr, + govtypes.ModuleName, ) bankKeeper.SetParams(ctx, banktypes.Params{DefaultSendEnabled: true}) - stakingKeeper := stakingkeeper.NewKeeper(marshaler, keyStaking, accountKeeper, bankKeeper, getSubspace(paramsKeeper, stakingtypes.ModuleName)) + stakingKeeper := stakingkeeper.NewKeeper(marshaler, keyStaking, accountKeeper, bankKeeper, govtypes.ModuleName) stakingKeeper.SetParams(ctx, TestingStakeParams) - distKeeper := distrkeeper.NewKeeper(marshaler, keyDistro, getSubspace(paramsKeeper, distrtypes.ModuleName), accountKeeper, bankKeeper, stakingKeeper, authtypes.FeeCollectorName) + distKeeper := distrkeeper.NewKeeper(marshaler, keyDistro, accountKeeper, bankKeeper, stakingKeeper, authtypes.FeeCollectorName, govtypes.ModuleName) distKeeper.SetParams(ctx, distrtypes.DefaultParams()) // set genesis items required for distribution @@ -335,25 +332,26 @@ func CreateTestEnv(t *testing.T) TestInput { require.NotNil(t, moduleAcct) // Load default wasm config - - govRouter := govtypesv1beta1.NewRouter(). - AddRoute(paramsproposal.RouterKey, params.NewParamChangeProposalHandler(paramsKeeper)). - AddRoute(govtypes.RouterKey, govtypesv1beta1.ProposalHandler) - + router := baseapp.NewMsgServiceRouter() govKeeper := govkeeper.NewKeeper( - marshaler, keyGov, getSubspace(paramsKeeper, govtypes.ModuleName).WithKeyTable(govtypesv1.ParamKeyTable()), accountKeeper, bankKeeper, stakingKeeper, govRouter, baseapp.NewMsgServiceRouter(), govtypes.DefaultConfig(), + marshaler, + keyGov, + accountKeeper, + bankKeeper, + stakingKeeper, + router, + govtypes.DefaultConfig(), + govtypes.ModuleName, ) govKeeper.SetProposalID(ctx, govtypesv1beta1.DefaultStartingProposalID) - govKeeper.SetDepositParams(ctx, govtypesv1.DefaultDepositParams()) - govKeeper.SetVotingParams(ctx, govtypesv1.DefaultVotingParams()) - govKeeper.SetTallyParams(ctx, govtypesv1.DefaultTallyParams()) slashingKeeper := slashingkeeper.NewKeeper( marshaler, + cdc, keySlashing, - &stakingKeeper, - getSubspace(paramsKeeper, slashingtypes.ModuleName).WithKeyTable(slashingtypes.ParamKeyTable()), + stakingKeeper, + govtypes.ModuleName, ) gravityKeeper := gravitykeeper.NewKeeper( @@ -378,7 +376,7 @@ func CreateTestEnv(t *testing.T) TestInput { gravityKeeper, ) - stakingKeeper = *stakingKeeper.SetHooks( + stakingKeeper.SetHooks( stakingtypes.NewMultiStakingHooks( distKeeper.Hooks(), slashingKeeper.Hooks(), @@ -402,10 +400,10 @@ func CreateTestEnv(t *testing.T) TestInput { GravityKeeper: gravityKeeper, AccountKeeper: accountKeeper, BankKeeper: bankKeeper, - StakingKeeper: stakingKeeper, + StakingKeeper: *stakingKeeper, SlashingKeeper: slashingKeeper, DistKeeper: distKeeper, - GovKeeper: govKeeper, + GovKeeper: *govKeeper, Context: ctx, Marshaler: marshaler, LegacyAmino: cdc, diff --git a/x/cork/mock/mocks.go b/x/cork/mock/mocks.go index b0e2f8a87..8a68bb047 100644 --- a/x/cork/mock/mocks.go +++ b/x/cork/mock/mocks.go @@ -8,13 +8,13 @@ import ( reflect "reflect" math "cosmossdk.io/math" + bytes "github.com/cometbft/cometbft/libs/bytes" types "github.com/cosmos/cosmos-sdk/types" types0 "github.com/cosmos/cosmos-sdk/x/staking/types" common "github.com/ethereum/go-ethereum/common" gomock "github.com/golang/mock/gomock" types1 "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" types2 "github.com/peggyjv/sommelier/v7/x/pubsub/types" - bytes "github.com/tendermint/tendermint/libs/bytes" ) // MockStakingKeeper is a mock of StakingKeeper interface. diff --git a/x/cork/mock/sdk_mocks.go b/x/cork/mock/sdk_mocks.go index cdb846600..2c81079d5 100644 --- a/x/cork/mock/sdk_mocks.go +++ b/x/cork/mock/sdk_mocks.go @@ -14,11 +14,11 @@ package mock import ( reflect "reflect" + crypto "github.com/cometbft/cometbft/proto/tendermint/crypto" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" gomock "github.com/golang/mock/gomock" - crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" ) // MockDelegationI is a mock of DelegationI interface. diff --git a/x/cork/module.go b/x/cork/module.go index bf434cc09..7a78ac82b 100644 --- a/x/cork/module.go +++ b/x/cork/module.go @@ -4,8 +4,8 @@ import ( "context" "encoding/json" "fmt" - "math/rand" + abci "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" @@ -18,7 +18,6 @@ import ( corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" ) var ( @@ -97,19 +96,9 @@ func (AppModule) Name() string { return corktypes.ModuleName } // RegisterInvariants performs a no-op. func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} -// Route returns the message routing key for the cork module. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(corktypes.RouterKey, NewHandler(am.keeper)) -} - // QuerierRoute returns the cork module's querier route name. func (AppModule) QuerierRoute() string { return corktypes.QuerierRoute } -// LegacyQuerierHandler returns a nil Querier. -func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { - return nil -} - // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 2 @@ -169,11 +158,6 @@ func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedPro return nil } -// RandomizedParams creates randomized cork param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []sim.ParamChange { - return nil -} - // RegisterStoreDecoder registers a decoder for cork module's types func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { } diff --git a/x/cork/testutil/expected_keepers_mocks.go b/x/cork/testutil/expected_keepers_mocks.go index 97fd6d846..d2e86a7c7 100644 --- a/x/cork/testutil/expected_keepers_mocks.go +++ b/x/cork/testutil/expected_keepers_mocks.go @@ -8,13 +8,13 @@ import ( reflect "reflect" math "cosmossdk.io/math" + bytes "github.com/cometbft/cometbft/libs/bytes" types "github.com/cosmos/cosmos-sdk/types" types0 "github.com/cosmos/cosmos-sdk/x/staking/types" common "github.com/ethereum/go-ethereum/common" gomock "github.com/golang/mock/gomock" types1 "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" types2 "github.com/peggyjv/sommelier/v7/x/pubsub/types" - bytes "github.com/tendermint/tendermint/libs/bytes" ) // MockStakingKeeper is a mock of StakingKeeper interface. diff --git a/x/cork/testutil/staking_types.go b/x/cork/testutil/staking_types.go index c2b7536e3..3d0a8a9fc 100644 --- a/x/cork/testutil/staking_types.go +++ b/x/cork/testutil/staking_types.go @@ -7,11 +7,11 @@ package mock_types import ( reflect "reflect" + crypto "github.com/cometbft/cometbft/proto/tendermint/crypto" types "github.com/cosmos/cosmos-sdk/crypto/types" types0 "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/x/staking/types" gomock "github.com/golang/mock/gomock" - crypto "github.com/tendermint/tendermint/proto/tendermint/crypto" ) // MockDelegationI is a mock of DelegationI interface. diff --git a/x/cork/types/expected_keepers.go b/x/cork/types/expected_keepers.go index b0312d245..f0c52473c 100644 --- a/x/cork/types/expected_keepers.go +++ b/x/cork/types/expected_keepers.go @@ -5,12 +5,12 @@ package types import ( "cosmossdk.io/math" + tmbytes "github.com/cometbft/cometbft/libs/bytes" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/common" gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" - tmbytes "github.com/tendermint/tendermint/libs/bytes" ) // StakingKeeper defines the expected staking keeper methods diff --git a/x/cork/types/v1/cork.go b/x/cork/types/v1/cork.go index 650d88f27..a5b0f5602 100644 --- a/x/cork/types/v1/cork.go +++ b/x/cork/types/v1/cork.go @@ -3,10 +3,10 @@ package v1 import ( "bytes" + tmbytes "github.com/cometbft/cometbft/libs/bytes" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" - tmbytes "github.com/tendermint/tendermint/libs/bytes" ) func (c *Cork) InvalidationScope() tmbytes.HexBytes { diff --git a/x/cork/types/v1/proposal.go b/x/cork/types/v1/proposal.go index 705559d11..ac70c4a00 100644 --- a/x/cork/types/v1/proposal.go +++ b/x/cork/types/v1/proposal.go @@ -17,10 +17,8 @@ var _ govtypes.Content = &RemoveManagedCellarIDsProposal{} func init() { govtypes.RegisterProposalType(ProposalTypeAddManagedCellarIDs) - govtypes.ModuleCdc.RegisterConcrete(&AddManagedCellarIDsProposal{}, "sommelier/AddManagedCellarIDsProposal", nil) govtypes.RegisterProposalType(ProposalTypeRemoveManagedCellarIDs) - govtypes.ModuleCdc.RegisterConcrete(&RemoveManagedCellarIDsProposal{}, "sommelier/RemoveManagedCellarIDsProposal", nil) } diff --git a/x/cork/types/v2/cork.go b/x/cork/types/v2/cork.go index 42ed2329f..99120a85b 100644 --- a/x/cork/types/v2/cork.go +++ b/x/cork/types/v2/cork.go @@ -5,12 +5,12 @@ import ( "fmt" errorsmod "cosmossdk.io/errors" + tmbytes "github.com/cometbft/cometbft/libs/bytes" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" - tmbytes "github.com/tendermint/tendermint/libs/bytes" ) func (c *Cork) InvalidationScope() tmbytes.HexBytes { diff --git a/x/cork/types/v2/cork.pb.go b/x/cork/types/v2/cork.pb.go index f633ea290..bea9f1fe0 100644 --- a/x/cork/types/v2/cork.pb.go +++ b/x/cork/types/v2/cork.pb.go @@ -5,7 +5,8 @@ package v2 import ( fmt "fmt" - 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" @@ -266,31 +267,31 @@ func init() { func init() { proto.RegisterFile("cork/v2/cork.proto", fileDescriptor_1219f78116b242b2) } var fileDescriptor_1219f78116b242b2 = []byte{ - // 373 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xcf, 0x8e, 0xda, 0x30, - 0x10, 0x87, 0x31, 0x44, 0x2d, 0x31, 0x50, 0x55, 0x46, 0xa8, 0x51, 0x55, 0xa5, 0x90, 0x13, 0xa7, - 0x58, 0x4a, 0xa5, 0xf6, 0xdc, 0xa6, 0x87, 0x72, 0xab, 0xc2, 0xad, 0x97, 0xc8, 0xd8, 0xa3, 0x24, - 0x8d, 0xc1, 0x91, 0x63, 0xa2, 0xe5, 0xbc, 0x2f, 0xb0, 0x6f, 0xb0, 0xaf, 0xb3, 0x47, 0x8e, 0x7b, - 0x5c, 0xc1, 0x8b, 0xac, 0x62, 0xfe, 0xbd, 0xc0, 0x9e, 0x32, 0xf9, 0x7d, 0x9a, 0x99, 0xcf, 0xd2, - 0x60, 0xc2, 0x95, 0x2e, 0x69, 0x13, 0xd1, 0xf6, 0x1b, 0x56, 0x5a, 0x19, 0x45, 0xde, 0xdb, 0xba, - 0x89, 0x02, 0x8d, 0x9d, 0x58, 0xe9, 0x92, 0x44, 0x78, 0x02, 0x1b, 0xae, 0x04, 0x88, 0x94, 0xab, - 0x8d, 0xd1, 0x8c, 0x9b, 0x94, 0x33, 0x29, 0x3d, 0x34, 0x45, 0xf3, 0x61, 0x32, 0x3e, 0xc3, 0xf8, - 0xcc, 0x62, 0x26, 0x25, 0xf9, 0x8e, 0x3f, 0x19, 0xa6, 0x33, 0x30, 0xb7, 0x16, 0x26, 0x84, 0x86, - 0xba, 0xf6, 0xba, 0x53, 0x34, 0x77, 0x93, 0xc9, 0x09, 0x5f, 0x9a, 0x7e, 0x9e, 0x60, 0x70, 0x8f, - 0xf0, 0x68, 0xc9, 0x73, 0x10, 0x5b, 0xd9, 0x4e, 0xd4, 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0xbb, 0x0a, 0x6a, - 0xda, 0x44, 0xab, 0x77, 0xf6, 0x2e, 0xbe, 0xbd, 0x06, 0x00, 0x00, 0xff, 0xff, 0x31, 0x07, 0x9d, - 0x0f, 0x2d, 0x02, 0x00, 0x00, + // 383 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xbf, 0xae, 0xd3, 0x30, + 0x14, 0xc6, 0xeb, 0x36, 0x82, 0x1b, 0xf7, 0x5e, 0x84, 0x7c, 0xa9, 0x88, 0x2a, 0x14, 0xda, 0x4c, + 0x9d, 0x62, 0x29, 0x48, 0x30, 0x43, 0x18, 0xe8, 0x86, 0xd2, 0x8d, 0x25, 0x72, 0xed, 0x23, 0x27, + 0xc4, 0xad, 0x23, 0xc7, 0x8d, 0xe8, 0xcc, 0x0b, 0xf0, 0x06, 0xbc, 0x0e, 0x63, 0x47, 0x46, 0xd4, + 0xbe, 0x08, 0x8a, 0xd3, 0x3f, 0x2f, 0x70, 0x27, 0x7f, 0xfe, 0x7e, 0x3a, 0xe7, 0x7c, 0x47, 0x3a, + 0x98, 0x70, 0x6d, 0x2a, 0xda, 0x26, 0xb4, 0x7b, 0xe3, 0xda, 0x68, 0xab, 0xc9, 0x73, 0xa7, 0xdb, + 0x64, 0xfa, 0x4a, 0x6a, 0xa9, 0x9d, 0x47, 0x3b, 0xd5, 0xe3, 0xc8, 0x60, 0x2f, 0xd5, 0xa6, 0x22, + 0x09, 0x9e, 0xc0, 0x96, 0x6b, 0x01, 0x22, 0xe7, 0x7a, 0x6b, 0x0d, 0xe3, 0x36, 0xe7, 0x4c, 0xa9, + 0x00, 0xcd, 0xd0, 0xe2, 0x3e, 0x7b, 0x3c, 0xc3, 0xf4, 0xcc, 0x52, 0xa6, 0x14, 0x79, 0x8f, 0x5f, + 0x5b, 0x66, 0x24, 0xd8, 0x5b, 0x09, 0x13, 0xc2, 0x40, 0xd3, 0x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x8e, + 0xb9, 0xde, 0xd0, 0x1a, 0xa4, 0xdc, 0x7f, 0x6f, 0x69, 0xa3, 0x37, 0x1b, 0x50, 0x25, 0x18, 0xda, + 0x7e, 0xa0, 0x3f, 0xdc, 0x8d, 0x50, 0xbb, 0xaf, 0xa1, 0xa1, 0x6d, 0xb2, 0x7e, 0xe6, 0xce, 0xe1, + 0xdd, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xec, 0x4a, 0x8b, 0x73, 0x43, 0x02, 0x00, 0x00, } func (m *Cork) Marshal() (dAtA []byte, err error) { diff --git a/x/cork/types/v2/genesis.pb.go b/x/cork/types/v2/genesis.pb.go index 72512ad85..549ed728d 100644 --- a/x/cork/types/v2/genesis.pb.go +++ b/x/cork/types/v2/genesis.pb.go @@ -7,7 +7,7 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/cork/types/v2/proposal.go b/x/cork/types/v2/proposal.go index 53ca8ab99..5f238aeef 100644 --- a/x/cork/types/v2/proposal.go +++ b/x/cork/types/v2/proposal.go @@ -30,13 +30,10 @@ func init() { // This PR was later reverted, but RegisterProposalTypeCodec was still left out. Not sure if // this was intentional or not. govtypesv1beta1.RegisterProposalType(ProposalTypeAddManagedCellarIDs) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&AddManagedCellarIDsProposal{}, "sommelier/v2/AddManagedCellarIDsProposal", nil) govtypesv1beta1.RegisterProposalType(ProposalTypeRemoveManagedCellarIDs) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&RemoveManagedCellarIDsProposal{}, "sommelier/v2/RemoveManagedCellarIDsProposal", nil) govtypesv1beta1.RegisterProposalType(ProposalTypeScheduledCork) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&ScheduledCorkProposal{}, "sommelier/v2/ScheduledCorkProposal", nil) } func NewAddManagedCellarIDsProposal(title string, description string, cellarIds *CellarIDSet, publisherDomain string) *AddManagedCellarIDsProposal { diff --git a/x/cork/types/v2/proposal.pb.go b/x/cork/types/v2/proposal.pb.go index 3082bae69..06498bdce 100644 --- a/x/cork/types/v2/proposal.pb.go +++ b/x/cork/types/v2/proposal.pb.go @@ -5,7 +5,8 @@ package v2 import ( fmt "fmt" - 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" @@ -491,37 +492,37 @@ func init() { func init() { proto.RegisterFile("cork/v2/proposal.proto", fileDescriptor_e01dea5e2496e85f) } var fileDescriptor_e01dea5e2496e85f = []byte{ - // 465 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xc1, 0x6a, 0x13, 0x41, - 0x18, 0xce, 0xb4, 0x69, 0x4b, 0x26, 0x82, 0x32, 0x34, 0xba, 0x28, 0x2e, 0x71, 0x0f, 0x92, 0x5e, - 0x76, 0x20, 0x05, 0x7b, 0xae, 0xc9, 0xc1, 0x08, 0x42, 0x49, 0x0f, 0x82, 0x97, 0x65, 0x32, 0xf3, - 0xb3, 0x3b, 0xcd, 0xec, 0xce, 0x32, 0x33, 0x59, 0xec, 0x1b, 0x78, 0x11, 0x7c, 0x00, 0x5f, 0xc3, - 0x37, 0xf0, 0xe0, 0xb1, 0x47, 0x8f, 0x92, 0xbc, 0x88, 0x74, 0x76, 0x53, 0x52, 0x91, 0x1e, 0xaa, - 0x94, 0x1e, 0xff, 0xef, 0xfb, 0xf7, 0xdf, 0xef, 0xfb, 0xfe, 0x99, 0xc1, 0x8f, 0xb9, 0x36, 0x73, - 0x5a, 0x0d, 0x69, 0x69, 0x74, 0xa9, 0x2d, 0x53, 0x71, 0x69, 0xb4, 0xd3, 0x64, 0xef, 0x12,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f9, 0x3f, 0xa7, 0xf4, 0x02, 0x3f, 0x98, 0x29, 0xcd, 0xe7, 0x49, - 0x06, 0x32, 0xcd, 0x9c, 0xcf, 0xa9, 0x3d, 0xed, 0x7a, 0xec, 0x8d, 0x87, 0xc8, 0x2b, 0xfc, 0xc4, - 0x31, 0x93, 0x82, 0x4b, 0xb8, 0x2e, 0x9c, 0x61, 0xdc, 0x25, 0x4c, 0x08, 0x03, 0xd6, 0x36, 0xf2, - 0x7a, 0x35, 0x3d, 0x6a, 0xd8, 0xe3, 0x9a, 0x24, 0x47, 0x38, 0xb8, 0xfa, 0x80, 0x33, 0xa5, 0x12, - 0x7f, 0xe3, 0x92, 0x33, 0xab, 0x8b, 0xe6, 0x18, 0xf4, 0xd6, 0xfc, 0x88, 0x29, 0x75, 0x72, 0xc9, - 0xbe, 0xb5, 0xba, 0x88, 0x3e, 0x6d, 0xe1, 0xfe, 0x5f, 0x5d, 0xfe, 0x8f, 0xec, 0xef, 0xa1, 0xe1, - 0xcd, 0x85, 0xef, 0x5e, 0x5b, 0xf8, 0xeb, 0xc9, 0x8f, 0x65, 0x88, 0x2e, 0x96, 0x21, 0xfa, 0xb5, - 0x0c, 0xd1, 0x97, 0x55, 0xd8, 0xba, 0x58, 0x85, 0xad, 0x9f, 0xab, 0xb0, 0xf5, 0x81, 0xa6, 0xd2, - 0x65, 0x8b, 0x59, 0xcc, 0x75, 0x4e, 0x4b, 0x48, 0xd3, 0xf3, 0xb3, 0x8a, 0x5a, 0x9d, 0xe7, 0xa0, - 0x24, 0x18, 0x5a, 0x1d, 0xd1, 0x8f, 0xfe, 0x99, 0xa3, 0xee, 0xbc, 0x04, 0x4b, 0xab, 0xe1, 0x6c, - 0xd7, 0xab, 0x39, 0xfc, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xda, 0xa2, 0x0d, 0x25, 0x27, 0x05, 0x00, - 0x00, + // 476 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00,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, 0xfe, 0x0c, 0xba, 0x1b, 0x7e, 0xc4, 0x95, 0x3a, 0x5b, 0xb3, 0x6f, 0x0c, 0xe6, 0xfd, 0x8f, + 0x3b, 0xb4, 0xf7, 0x47, 0x97, 0xff, 0x22, 0xfb, 0x7b, 0x68, 0x78, 0x7b, 0xe1, 0xfb, 0x37, 0x16, + 0xfe, 0x6a, 0xf2, 0x7d, 0x19, 0x90, 0xab, 0x65, 0x40, 0x7e, 0x2e, 0x03, 0xf2, 0x79, 0x15, 0x34, + 0xae, 0x56, 0x41, 0xe3, 0xc7, 0x2a, 0x68, 0xbc, 0x67, 0x89, 0xb4, 0xe9, 0x62, 0x16, 0xc6, 0x98, + 0xb1, 0x02, 0x92, 0xe4, 0xf2, 0xa2, 0x64, 0x06, 0xb3, 0x0c, 0x94, 0x04, 0xcd, 0xca, 0x13, 0xf6, + 0xc1, 0x5d, 0x7e, 0xcc, 0x5e, 0x16, 0x60, 0x58, 0x39, 0x9c, 0xed, 0x3b, 0x35, 0xc7, 0xbf, 0x02, + 0x00, 0x00, 0xff, 0xff, 0x32, 0x3b, 0xce, 0xe8, 0x3d, 0x05, 0x00, 0x00, } func (m *AddManagedCellarIDsProposal) Marshal() (dAtA []byte, err error) { diff --git a/x/cork/types/v2/query.pb.go b/x/cork/types/v2/query.pb.go index 9c93bf38b..230681772 100644 --- a/x/cork/types/v2/query.pb.go +++ b/x/cork/types/v2/query.pb.go @@ -6,9 +6,10 @@ package v2 import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + 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" @@ -732,55 +733,56 @@ func init() { func init() { proto.RegisterFile("cork/v2/query.proto", fileDescriptor_5f2ffa9107b7d7f7) } var fileDescriptor_5f2ffa9107b7d7f7 = []byte{ - // 760 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0xcf, 0x4e, 0x13, 0x51, - 0x14, 0xc6, 0x3b, 0x08, 0x98, 0x9e, 0x22, 0x98, 0xc3, 0xff, 0x01, 0xa6, 0x74, 0x40, 0x69, 0x10, - 0x7a, 0xb1, 0x84, 0xb0, 0xb6, 0xb0, 0xb0, 0xd1, 0xa8, 0xd4, 0x8d, 0x71, 0xd3, 0xb4, 0x9d, 0x9b, - 0xe9, 0xd8, 0x3f, 0xb7, 0xcc, 0x4c, 0x1b, 0x1a, 0x42, 0x62, 0x58, 0xbb, 0x30, 0xf1, 0x11, 0x5c, - 0x99, 0xf8, 0x20, 0x2c, 0x89, 0x6e, 0x5c, 0x19, 0x03, 0x3e, 0x88, 0xe9, 0x9d, 0x3b, 0xc3, 0x4c, - 0x3b, 0x6d, 0x91, 0x5d, 0x7b, 0xce, 0x77, 0xbf, 0xef, 0x37, 0xd3, 0x7b, 0x4e, 0x0a, 0xd3, 0x25, - 0x66, 0x56, 0x48, 0x2b, 0x4d, 0x8e, 0x9b, 0xd4, 0x6c, 0xa7, 0x1a, 0x26, 0xb3, 0x19, 0xde, 0xef, - 0x14, 0x53, 0xad, 0xb4, 0x3c, 0xa3, 0x33, 0x9d, 0xf1, 0x1a, 0xe9, 0x7c, 0x72, 0xda, 0xf2, 0xb2, - 0xce, 0x98, 0x5e, 0xa5, 0xa4, 0xd0, 0x30, 0x48, 0xa1, 0x5e, 0x67, 0x76, 0xc1, 0x36, 0x58, 0xdd, - 0x12, 0xdd, 0x59, 0xd7, 0x51, 0xa7, 0x75, 0x6a, 0x19, 0x6e, 0x19, 0xdd, 0x32, 0xf7, 0xe6, 0x35, - 0x75, 0x06, 0xf0, 0xa8, 0x13, 0xfb, 0xa6, 0x60, 0x16, 0x6a, 0x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 0x8b, 0xa9, 0x12, 0xab, - 0x91, 0x06, 0xd5, 0xf5, 0xf6, 0x87, 0x96, 0xcf, 0xac, 0xb5, 0x4f, 0x4e, 0x1c, 0x47, 0xbb, 0xdd, - 0xa0, 0x16, 0x69, 0xa5, 0x8b, 0xe3, 0xfc, 0xcf, 0xc9, 0xee, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x3d, 0x0d, 0xef, 0x6c, 0x1b, 0x09, 0x00, 0x00, + // 784 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4d, 0x4f, 0x13, 0x5d, + 0x14, 0xee, 0xf0, 0x02, 0x6f, 0x7a, 0xca, 0x0b, 0x6f, 0x2e, 0xdf, 0x53, 0x98, 0xd2, 0x81, 0x40, + 0x53, 0xa1, 0x17, 0x4a, 0x0c, 0x89, 0x3b, 0x0b, 0x0b, 0x1b, 0x0d, 0x4a, 0xdd, 0x18, 0x37, 0x4d, + 0xdb, 0xb9, 0x99, 0x8e, 0xfd, 0xb8, 0xc3, 0xcc, 0xb4, 0xb1, 0x21, 0x6c, 0x4c, 0x8c, 0x2e, 0x35, + 0xfe, 0x09, 0x57, 0xc6, 0x9f, 0xc1, 0x92, 0x44, 0x13, 0x5d, 0x19, 0x03, 0x26, 0xfe, 0x0d, 0x33, + 0x33, 0x77, 0x3e, 0x3b, 0x6d, 0x91, 0x1d, 0x73, 0xce, 0x73, 0x9f, 0xe7, 0xb9, 0x97, 0x73, 0x9e, + 0x14, 0x66, 0x6b, 0x54, 0x6b, 0xe0, 0x6e, 0x1e, 0x9f, 0x76, 0x88, 0xd6, 0xcb, 0xa9, 0x1a, 0x35, + 0x28, 0xfa, 0xd7, 0x2c, 0xe6, 0xba, 0x79, 0x7e, 0x4e, 0xa6, 0x32, 0xb5, 0x6a, 0xd8, 0xfc, 0xcb, + 0x6e, 0xf3, 0x2b, 0x32, 0xa5, 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1a, 0x65, 0xcd, 0x4e, 0x12, 0xdb, 0xc9, + 0x6b, 0x0e, 0xfe, 0x0f, 0x47, 0x14, 0x1a, 0xa8, 0xe4, 0xce, 0x6a, 0x7a, 0x08, 0x82, 0x99, 0xd9, + 0xf6, 0xcc, 0xa4, 0x51, 0x6a, 0x84, 0x99, 0x42, 0xf1, 0xe2, 0x4a, 0xe0, 0x2e, 0xaf, 0x04, 0xee, + 0xe7, 0x95, 0xc0, 0xbd, 0xbb, 0x16, 0x62, 0x97, 0xd7, 0x42, 0xec, 0xfb, 0xb5, 0x10, 0x7b, 0x8e, + 0x65, 0xc5, 0xa8, 0x77, 0xaa, 0xb9, 0x1a, 0x6d, 0x61, 0x95, 0xc8, 0x72, 0xef, 0x45, 0xd7, 0x47, + 0xd6, 0x3d, 0xc0, 0x2f, 0x6d, 0x46, 0xa3, 0xa7, 0x12, 0x1d, 0x77, 0xf3, 0xd5, 0x49, 0xeb, 0x47, + 0xcc, 0xfe, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x64, 0xd7, 0x0b, 0x60, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/cork/types/v2/tx.pb.go b/x/cork/types/v2/tx.pb.go index 198a7e830..afe049234 100644 --- a/x/cork/types/v2/tx.pb.go +++ b/x/cork/types/v2/tx.pb.go @@ -6,8 +6,10 @@ package v2 import ( context "context" fmt "fmt" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "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" @@ -144,25 +146,28 @@ func init() { func init() { proto.RegisterFile("cork/v2/tx.proto", fileDescriptor_271bdc677f232222) } var fileDescriptor_271bdc677f232222 = []byte{ - // 280 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x31, 0x4e, 0xc3, 0x30, - 0x18, 0x85, 0xeb, 0xb4, 0x2a, 0xaa, 0x5b, 0x10, 0xf2, 0x50, 0xa2, 0x0e, 0x26, 0xed, 0x14, 0x96, - 0x58, 0x0a, 0x03, 0x3b, 0x2c, 0x30, 0x74, 0x20, 0x2c, 0x88, 0x05, 0x29, 0xc9, 0x2f, 0xc7, 0x24, - 0xa9, 0x43, 0xec, 0x58, 0xed, 0x2d, 0x38, 0x16, 0x63, 0x47, 0x46, 0x94, 0x5c, 0x04, 0xd5, 0x14, - 0x84, 0x04, 0x8c, 0xfe, 0xde, 0x27, 0x3f, 0xfb, 0xe1, 0xe3, 0x44, 0xd6, 0x39, 0x33, 0x21, 0xd3, - 0xeb, 0xa0, 0xaa, 0xa5, 0x96, 0xe4, 0x60, 0x47, 0x02, 0x13, 0xce, 0xc8, 0x57, 0x64, 0x81, 0x0d, - 0x17, 0x06, 0x4f, 0x97, 0x8a, 0xdf, 0x25, 0x19, 0xa4, 0x4d, 0x01, 0x57, 0xb2, 0xce, 0x23, 0x78, - 0x6e, 0x40, 0x69, 0x32, 0xc7, 0x83, 0x9d, 0xe7, 0x22, 0x0f, 0xf9, 0xe3, 0xf0, 0x30, 0xd8, 0xdf, - 0x12, 0x58, 0xc7, 0x46, 0x64, 0x8e, 0x27, 0x71, 0x21, 0x93, 0xfc, 0x31, 0x03, 0xc1, 0x33, 0xed, - 0x3a, 0x1e, 0xf2, 0x07, 0xd1, 0xd8, 0xb2, 0x6b, 0x8b, 0xc8, 0x14, 0x0f, 0x95, 0xe0, 0x2b, 0xa8, - 0xdd, 0xbe, 0x87, 0xfc, 0x51, 0xb4, 0x3f, 0x2d, 0xce, 0xf0, 0xc9, 0xaf, 0x5e, 0x55, 0xc9, 0x95, - 0x02, 0x72, 0x84, 0x1d, 0x91, 0xda, 0xda, 0x51, 0xe4, 0x88, 0x34, 0xbc, 0xc7, 0xfd, 0xa5, 0xe2, - 0xe4, 0x16, 0x4f, 0x7e, 0xea, 0xe4, 0xf4, 0xfb, 0x45, 0x7f, 0x7f, 0x60, 0xe6, 0xfd, 0x2f, 0x7c, - 0x36, 0x5d, 0xde, 0xbc, 0xb6, 0x14, 0x6d, 0x5b, 0x8a, 0xde, 0x5b, 0x8a, 0x5e, 0x3a, 0xda, 0xdb, - 0x76, 0xb4, 0xf7, 0xd6, 0xd1, 0xde, 0x03, 0xe3, 0x42, 0x67, 0x4d, 0x1c, 0x24, 0xb2, 0x64, 0x15, - 0x70, 0xbe, 0x79, 0x32, 0x4c, 0xc9, 0xb2, 0x84, 0x42, 0x40, 0xcd, 0xcc, 0x05, 0x5b, 0xdb, 0x11, - 0x99, 0xde, 0x54, 0xa0, 0x98, 0x09, 0xe3, 0xa1, 0x9d, 0xf3, 0xfc, 0x23, 0x00, 0x00, 0xff, 0xff, - 0xcf, 0x1c, 0xa9, 0x14, 0x7f, 0x01, 0x00, 0x00, + // 329 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xb1, 0x4e, 0x3a, 0x41, + 0x10, 0xc6, 0x59, 0xe0, 0xcf, 0x3f, 0x2c, 0x68, 0xcc, 0xc6, 0x00, 0xb9, 0xe2, 0x3c, 0xa8, 0x90, + 0xe2, 0x26, 0x9e, 0x85, 0x89, 0xa5, 0x36, 0x5a, 0x50, 0x78, 0x76, 0x36, 0x24, 0x1c, 0x9b, 0xbd, + 0x13, 0x8e, 0x39, 0x6f, 0x97, 0x0d, 0x74, 0x46, 0x5f, 0xc0, 0x47, 0xe1, 0x31, 0x2c, 0x29, 0x2d, + 0x0d, 0x14, 0xbc, 0x86, 0xb9, 0xe5, 0x34, 0x26, 0x6a, 0xb5, 0x33, 0xbf, 0xef, 0xcb, 0xce, 0xb7, + 0x3b, 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de, 0xd7, 0x36, 0x79, 0xd9, 0xd8, 0x85, 0xd5, + 0xc6, 0x2e, 0xbc, 0x6d, 0xec, 0xc2, 0x1d, 0x88, 0x48, 0x85, 0xb3, 0xa1, 0x1b, 0x60, 0x0c, 0x09, + 0x17, 0x62, 0x71, 0xaf, 0x41, 0x62, 0x1c, 0xf3, 0x49, 0xc4, 0x53, 0xd0, 0x67, 0x30, 0x37, 0x8b, + 0x00, 0xb5, 0x48, 0xb8, 0x04, 0xed, 0x0d, 0x2b, 0xe6, 0x8f, 0x4f, 0x3f, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x8d, 0x47, 0x50, 0xb6, 0xc3, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/incentives/keeper/keeper.go b/x/incentives/keeper/keeper.go index cdb574f32..dd812b80d 100644 --- a/x/incentives/keeper/keeper.go +++ b/x/incentives/keeper/keeper.go @@ -1,12 +1,12 @@ package keeper import ( + "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" "github.com/peggyjv/sommelier/v7/x/incentives/types" - "github.com/tendermint/tendermint/libs/log" ) // Keeper of the incentives store diff --git a/x/incentives/keeper/keeper_test.go b/x/incentives/keeper/keeper_test.go index f1810f1ce..c04092516 100644 --- a/x/incentives/keeper/keeper_test.go +++ b/x/incentives/keeper/keeper_test.go @@ -3,6 +3,8 @@ package keeper import ( "testing" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmtime "github.com/cometbft/cometbft/types/time" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" @@ -14,8 +16,6 @@ import ( incentivestestutil "github.com/peggyjv/sommelier/v7/x/incentives/testutil" incentivesTypes "github.com/peggyjv/sommelier/v7/x/incentives/types" "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" ) type KeeperTestSuite struct { diff --git a/x/incentives/module.go b/x/incentives/module.go index 174d17a36..cd936b454 100644 --- a/x/incentives/module.go +++ b/x/incentives/module.go @@ -3,8 +3,8 @@ package incentives import ( "context" "encoding/json" - "math/rand" + abci "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" @@ -16,7 +16,6 @@ import ( "github.com/peggyjv/sommelier/v7/x/incentives/keeper" "github.com/peggyjv/sommelier/v7/x/incentives/types" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" ) var ( @@ -102,17 +101,9 @@ func (AppModule) Name() string { return types.ModuleName } // RegisterInvariants performs a no-op. func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} -// Route returns the message routing key for the incentives module. -func (am AppModule) Route() sdk.Route { return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) } - // QuerierRoute returns the incentives module's querier route name. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns a nil Querier. -func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { - return nil -} - // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 1 @@ -166,11 +157,6 @@ func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedPro return nil } -// RandomizedParams creates randomized distribution param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []sim.ParamChange { - return nil -} - // RegisterStoreDecoder registers a decoder for distribution module's types func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { } diff --git a/x/incentives/types/genesis.pb.go b/x/incentives/types/genesis.pb.go index 2a02bb252..42b1b63c0 100644 --- a/x/incentives/types/genesis.pb.go +++ b/x/incentives/types/genesis.pb.go @@ -7,7 +7,7 @@ import ( fmt "fmt" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/incentives/types/query.pb.go b/x/incentives/types/query.pb.go index 06e3d68ad..258e630d7 100644 --- a/x/incentives/types/query.pb.go +++ b/x/incentives/types/query.pb.go @@ -6,9 +6,10 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + 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" @@ -204,29 +205,30 @@ func init() { func init() { proto.RegisterFile("incentives/v1/query.proto", fileDescriptor_a3d66b0ba5a24e28) } var fileDescriptor_a3d66b0ba5a24e28 = []byte{ - // 347 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0x3f, 0x4f, 0x3a, 0x31, - 0x1c, 0xc6, 0xef, 0x7e, 0x7f, 0x88, 0x96, 0x18, 0xb1, 0x62, 0xa2, 0x27, 0x29, 0x72, 0x21, 0xd1, - 0xe9, 0x1a, 0x60, 0x70, 0x96, 0xd1, 0x38, 0x20, 0x9b, 0x6e, 0x85, 0x34, 0xb5, 0x86, 0x6b, 0xcb, - 0xb5, 0x5c, 0xbc, 0xc1, 0xc5, 0x57, 0x60, 0xe2, 0x9b, 0x62, 0x24, 0x71, 0x71, 0x32, 0x06, 0x7c, - 0x13, 0x6e, 0x86, 0xde, 0x11, 0x38, 0x15, 0xb7, 0x6f, 0xbe, 0xcf, 0x93, 0xcf, 0xf3, 0x7d, 0x5a, - 0x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16, 0xe7, 0x42, 0xf4, 0x13, 0x78, 0x59, 0xcd, 0xab, 0xae, 0xd5, 0xb3, - 0xd4, 0xba, 0x4d, 0x45, 0xb0, 0xb2, 0x36, 0x95, 0xa8, 0xa4, 0x7d, 0x31, 0x9e, 0x22, 0x77, 0x32, - 0x45, 0xee, 0xdb, 0x14, 0xb9, 0x8f, 0x33, 0xe4, 0x4c, 0x66, 0xc8, 0x79, 0x99, 0x21, 0xe7, 0xba, - 0xc9, 0xb8, 0xb9, 0x19, 0xf5, 0x82, 0xbe, 0x0c, 0xb1, 0xa2, 0x8c, 0x25, 0xb7, 0xf1, 0x0a, 0x29, - 0x3e, 0xc5, 0x77, 0xab, 0x38, 0x93, 0x28, 0xaa, 0x7b, 0x05, 0xfb, 0xd7, 0xad, 0xcf, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x40, 0x67, 0xa9, 0x51, 0x68, 0x02, 0x00, 0x00, + // 366 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xc1, 0x4e, 0xea, 0x40, + 0x18, 0x85, 0x5b, 0xee, 0xbd, 0xe4, 0xde, 0x21, 0x37, 0xe2, 0x88, 0x89, 0x56, 0x32, 0x48, 0xe3, + 0x42, 0x8d, 0xe9, 0x04, 0x58, 0xb8, 0x96, 0xa5, 0x71, 0x81, 0xec, 0x74, 0x57, 0xc8, 0x64, 0x1c, + 0x43, 0x67, 0x86, 0xce, 0xd0, 0xd8, 0x2d, 0x71, 0xe1, 0xd2, 0xc4, 0x17, 0xf1, 0x31, 0x58, 0x92, + 0xb8, 0x71, 0x65, 0x0c, 0x98, 0xf8, 0x1a, 0x86, 0xb6, 0x58, 0x8a, 0xe2, 0xee, 0xef, 0x7f, 0x4e, + 0xbe, 0xf3, 0x9f, 0x0e, 0xd8, 0x66, 0xbc, 0x4b, 0xb8, 0x66, 0x01, 0x51, 0x38, 0xa8, 0xe1, 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xe0, 0xef, 0xfc, 0x68, 0x88, 0xbe, 0xa3, 0xa7, 0x05, 0xad, 0xca, + 0x4a, 0x3d, 0x89, 0x3e, 0x48, 0xa3, 0x11, 0x2c, 0xaf, 0x8c, 0x76, 0x65, 0xd8, 0x3c, 0x1b, 0x4d, + 0x90, 0x39, 0x9e, 0x20, 0xf3, 0x75, 0x82, 0xcc, 0xfb, 0x29, 0x32, 0xc6, 0x53, 0x64, 0x3c, 0x4f, + 0x91, 0x71, 0x59, 0xa7, 0x4c, 0x5f, 0x0d, 0x3a, 0x4e, 0x57, 0x78, 0x58, 0x12, 0x4a, 0xc3, 0xeb, + 0x60, 0x81, 0x14, 0x1c, 0xe3, 0x9b, 0x45, 0x9c, 0x0e, 0x25, 0x51, 0x9d, 0x7c, 0xf4, 0xec, 0x8d, + 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x50, 0x18, 0x71, 0xef, 0x90, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/pubsub/keeper/keeper.go b/x/pubsub/keeper/keeper.go index c3a0a4883..826c3f4a7 100644 --- a/x/pubsub/keeper/keeper.go +++ b/x/pubsub/keeper/keeper.go @@ -5,7 +5,7 @@ import ( "fmt" "sort" - "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" diff --git a/x/pubsub/module.go b/x/pubsub/module.go index eac7d793c..3b4120e2f 100644 --- a/x/pubsub/module.go +++ b/x/pubsub/module.go @@ -4,12 +4,11 @@ import ( "context" "encoding/json" "fmt" - "math/rand" "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" @@ -112,19 +111,9 @@ func (AppModule) Name() string { return types.ModuleName } // RegisterInvariants performs a no-op. func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} -// Route returns the module's message routing key. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -} - // QuerierRoute returns the module's query routing key. func (AppModule) QuerierRoute() string { return types.QuerierRoute } -// LegacyQuerierHandler returns a nil Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return nil -} - // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 1 } @@ -177,10 +166,5 @@ func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedPro return nil } -// RandomizedParams creates randomized param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []sim.ParamChange { - return nil -} - // RegisterStoreDecoder registers a decoder for the module's types func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) {} diff --git a/x/pubsub/types/genesis.pb.go b/x/pubsub/types/genesis.pb.go index af050e42c..5b9601392 100644 --- a/x/pubsub/types/genesis.pb.go +++ b/x/pubsub/types/genesis.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/pubsub/types/params.pb.go b/x/pubsub/types/params.pb.go index b0dad2270..d2108c66a 100644 --- a/x/pubsub/types/params.pb.go +++ b/x/pubsub/types/params.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/pubsub/types/proposal.go b/x/pubsub/types/proposal.go index 89bb990e8..d085f85d1 100644 --- a/x/pubsub/types/proposal.go +++ b/x/pubsub/types/proposal.go @@ -28,16 +28,12 @@ func init() { // This PR was later reverted, but RegisterProposalTypeCodec was still left out. Not sure if // this was intentional or not. govtypesv1beta1.RegisterProposalType(ProposalTypeAddPublisher) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&AddPublisherProposal{}, "sommelier/AddPublisherProposal", nil) govtypesv1beta1.RegisterProposalType(ProposalTypeRemovePublisher) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&RemovePublisherProposal{}, "sommelier/RemovePublisherProposal", nil) govtypesv1beta1.RegisterProposalType(ProposalTypeAddDefaultSubscription) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&AddDefaultSubscriptionProposal{}, "sommelier/AddDefaultSubscriptionProposal", nil) govtypesv1beta1.RegisterProposalType(ProposalTypeRemoveDefaultSubscription) - govtypesv1beta1.ModuleCdc.RegisterConcrete(&RemoveDefaultSubscriptionProposal{}, "sommelier/RemoveDefaultSubscriptionProposal", nil) } ////////////////////////// diff --git a/x/pubsub/types/pubsub.pb.go b/x/pubsub/types/pubsub.pb.go index 267ed4806..bf0719fa6 100644 --- a/x/pubsub/types/pubsub.pb.go +++ b/x/pubsub/types/pubsub.pb.go @@ -5,7 +5,8 @@ package types import ( fmt "fmt" - 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" @@ -1033,49 +1034,50 @@ func init() { func init() { proto.RegisterFile("pubsub/v1/pubsub.proto", fileDescriptor_3164155f25b3675d) } var fileDescriptor_3164155f25b3675d = []byte{ - // 669 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0xcd, 0xe6, 0xb3, 0x19, 0x44, 0xeb, 0x6e, 0xab, 0xd6, 0x08, 0x61, 0x8a, 0x39, 0xd0, 0x16, - 0x88, 0x29, 0x1c, 0x7a, 0x36, 0xe4, 0xd0, 0x48, 0xa1, 0x54, 0x49, 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fb, 0x70, - 0xeb, 0xd3, 0xa9, 0x86, 0x4e, 0x4e, 0x35, 0xf4, 0xed, 0x54, 0x43, 0x6f, 0x06, 0x5a, 0xe6, 0x64, - 0xa0, 0x65, 0xbe, 0x0c, 0xb4, 0xcc, 0x41, 0xe5, 0xc8, 0x15, 0x9d, 0xc0, 0xae, 0xb4, 0x59, 0xd7, - 0xf0, 0xc8, 0xd1, 0xd1, 0xf1, 0xf3, 0xbe, 0xc1, 0x59, 0xb7, 0x4b, 0xa8, 0x4b, 0x7c, 0xa3, 0xbf, - 0x69, 0xbc, 0x94, 0x3f, 0x39, 0x86, 0x38, 0xf6, 0x08, 0xb7, 0x8b, 0xe1, 0xbf, 0xce, 0x83, 0xef, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x01, 0xf6, 0x8b, 0x39, 0x05, 0x09, 0x00, 0x00, + // 682 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x6e, 0xd3, 0x4e, + 0x10, 0xce, 0xe6, 0x6f, 0x33, 0x3f, 0xfd, 0x5a, 0x77, 0x5b, 0xb5, 0x06, 0x84, 0x29, 0xe6, 0x40, + 0x5b, 0x20, 0xa6, 0x70, 0xe8, 0xd9, 0x90, 0x43, 0x23, 0x85, 0x52, 0x25, 0x6d, 0x11, 0xbd, 0x44, + 0x76, 0xbc, 0x4d, 0x8c, 0x36, 0x59, 0xcb, 0xbb, 0x0e, 0xf4, 0xce, 0x19, 0x71, 0xe1, 0x21, 0x90, + 0x90, 0xb8, 0xf1, 0x0c, 0x1c, 0xcb, 0x0d, 0x89, 0x0b, 0x6a, 0x5f, 0x04, 0xc5, 0x5e, 0x27, 0xb6, + 0x9a, 0x16, 0x10, 0x04, 0xb8, 0xed, 0xcc, 0xec, 0x7e, 0xf3, 0xcd, 0x37, 0x33, 0xb2, 0x61, 0xc9, + 0x0b, 0x6c, 0x1e, 0xd8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b, 0x11, 0xea, 0x12, 0xdf, 0x18, 0x6c, 0x1a, 0x2f, 0xe4, + 0xaf, 0x8f, 0x21, 0x8e, 0x3c, 0xc2, 0xed, 0x62, 0xf8, 0x83, 0x73, 0xff, 0x5b, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xd6, 0x93, 0x68, 0xb1, 0x1b, 0x09, 0x00, 0x00, } func (m *Publisher) Marshal() (dAtA []byte, err error) { diff --git a/x/pubsub/types/query.pb.go b/x/pubsub/types/query.pb.go index 8da9dd243..9d477c93d 100644 --- a/x/pubsub/types/query.pb.go +++ b/x/pubsub/types/query.pb.go @@ -8,8 +8,8 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + 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" @@ -1566,88 +1566,89 @@ func init() { func init() { proto.RegisterFile("pubsub/v1/query.proto", fileDescriptor_1eae429cdae9f3b6) } var fileDescriptor_1eae429cdae9f3b6 = []byte{ - // 1285 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0x16, 0xa8, 0x94, 0x57, 0xa9, 0x49, 0x5e, 0x9d, 0x92, 0x6e, 0x1a, 0x27, 0x99, 0x8a, - 0x7c, 0x35, 0xf5, 0x92, 0xd0, 0x2a, 0xfd, 0x02, 0xa9, 0x51, 0xa0, 0x1f, 0x94, 0x92, 0x26, 0xa8, - 0xa0, 0x82, 0x64, 0xad, 0xe3, 0xc5, 0x59, 0x64, 0x7b, 0x1d, 0xef, 0xda, 0x4a, 0x54, 0x22, 0x04, - 0x12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32, 0x2e, 0x8a, 0x83, 0x87, - 0xf2, 0xd7, 0x78, 0x92, 0xec, 0x80, 0x5d, 0xfc, 0x5a, 0x83, 0x81, 0x84, 0xc6, 0x46, 0x79, 0xc8, - 0x30, 0x1f, 0xac, 0x9b, 0x09, 0xc1, 0x9a, 0xe6, 0xb0, 0x26, 0x71, 0x3c, 0x03, 0x16, 0xfe, 0x18, - 0x60, 0x88, 0xba, 0x23, 0x8d, 0x21, 0x25, 0xd9, 0xd3, 0x18, 0xd2, 0x62, 0x9c, 0xbd, 0xcd, 0x31, - 0x2c, 0xe1, 0x15, 0x21, 0x86, 0x98, 0x1a, 0x35, 0x9e, 0xa4, 0xe7, 0xfa, 0x2e, 0x7e, 0xab, 0xc1, - 0x60, 0x52, 0x7a, 0x63, 0x97, 0xb8, 0x61, 0x7e, 0x2e, 0x74, 0xb5, 0x21, 0x70, 0x33, 0x1c, 0x1c, - 0xc3, 0x89, 0x2c, 0x70, 0xf8, 0x8b, 0x06, 0xe7, 0xa4, 0x4a, 0x1c, 0x2f, 0x26, 0x83, 0x75, 0xd1, - 0xf4, 0xfa, 0xbc, 0x9a, 0x31, 0x41, 0x5c, 0xe4, 0x10, 0xe7, 0x71, 0x4e, 0x08, 0xb1, 0x1d, 0x1c, - 0x2d, 0xc6, 0xc1, 0x3e, 0xd5, 0x20, 0x27, 0x12, 0x51, 0x38, 0x25, 0x2d, 0x9a, 0x0e, 0xa9, 0xa3, - 0x4f, 0x67, 0xda, 0x11, 0xba, 0x75, 0x8e, 0xee, 0x03, 0x7c, 0xbf, 0x7b, 0x85, 0x05, 0xf3, 0x58, - 0x50, 0xff, 0xe1, 0xb5, 0x07, 0x73, 0x74, 0x17, 0x7f, 0xd2, 0x92, 0x2f, 0x64, 0x1a, 0xcc, 0x98, - 0x85, 0x2b, 0xcc, 0xf1, 0x4c, 0xb6, 0x21, 0x31, 0x28, 0x70, 0x06, 0x33, 0x38, 0xa5, 0xc6, 0x00, - 0x5f, 0x68, 0x30, 0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9, 0x29, 0x29, 0x9a, 0x9b, 0xbf, - 0x6a, 0xf4, 0x37, 0xa1, 0x40, 0x08, 0xe3, 0x5c, 0x12, 0xb0, 0xfc, 0x71, 0xa1, 0x5f, 0x54, 0xb2, - 0x55, 0x2a, 0x56, 0xa1, 0x76, 0x17, 0x5c, 0x5b, 0xa8, 0x6f, 0x44, 0x8f, 0x01, 0x54, 0x01, 0x24, - 0xd7, 0x37, 0xdd, 0xde, 0x17, 0x19, 0xfa, 0x46, 0x08, 0x7f, 0xf9, 0xce, 0xb3, 0xbd, 0xbc, 0xf6, - 0x7c, 0x2f, 0xaf, 0xbd, 0xd8, 0xcb, 0x6b, 0xdf, 0xed, 0xe7, 0xfb, 0x9e, 0xef, 0xe7, 0xfb, 0xfe, - 0xd8, 0xcf, 0xf7, 0x3d, 0x2e, 0x54, 0x6c, 0x6f, 0xb3, 0x55, 0x2a, 0x6c, 0x38, 0x35, 0xa3, 0x61, - 0x55, 0x2a, 0x3b, 0x5f, 0xb4, 0x63, 0x7e, 0xdb, 0x4b, 0xc6, 0x76, 0xe0, 0xdc, 0xdb, 0x69, 0x58, - 0x6e, 0xe9, 0x24, 0xff, 0xc3, 0xff, 0xad, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x86, 0x16, 0x16, - 0x32, 0xa4, 0x18, 0x00, 0x00, + // 1305 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcf, 0x6f, 0x1b, 0xd5, + 0x13, 0xcf, 0xf6, 0xfb, 0x25, 0x52, 0xa6, 0x52, 0x93, 0x4c, 0x9d, 0x92, 0x6c, 0x1a, 0x27, 0x79, + 0x88, 0xfc, 0x6a, 0xe2, 0x25, 0x69, 0xaa, 0xb4, 0xb4, 0x02, 0x61, 0x85, 0xb6, 0x29, 0xa5, 0xa4, + 0x89, 0x04, 0xa5, 0x45, 0xb2, 0xd6, 0xf1, 0xe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 0x6f, 0x93, 0xda, + 0x75, 0xab, 0x66, 0x1b, 0xa8, 0x41, 0xaf, 0xe7, 0x71, 0x58, 0x99, 0x50, 0x66, 0xce, 0x2e, 0x0d, + 0xe6, 0x02, 0xd6, 0x39, 0x4f, 0x35, 0xff, 0xff, 0x27, 0xbf, 0x8e, 0xf7, 0x6c, 0x90, 0x1a, 0xcb, + 0xc3, 0x90, 0x67, 0xa7, 0x59, 0xac, 0x98, 0xf6, 0xb6, 0xd1, 0x20, 0x07, 0x38, 0x0b, 0x03, 0x75, + 0x5f, 0x56, 0x28, 0x59, 0x55, 0xdd, 0xac, 0xb9, 0x36, 0xfb, 0x36, 0xfa, 0x03, 0xf9, 0xaa, 0x2b, + 0x66, 0x77, 0xe1, 0x42, 0xd4, 0x06, 0xc1, 0x59, 0x82, 0xbe, 0x40, 0x99, 0x10, 0x65, 0xc2, 0x88, + 0x82, 0x0b, 0x5c, 0x8d, 0x0d, 0x47, 0xad, 0x05, 0x9c, 0xdf, 0x82, 0xe7, 0x63, 0x27, 0xe4, 0x68, + 0x19, 0x20, 0xb0, 0x70, 0xc4, 0xfd, 0x7f, 0x89, 0x9e, 0x42, 0x7a, 0xec, 0x16, 0xb9, 0xda, 0x6c, + 0x16, 0xed, 0xad, 0x86, 0x59, 0xe4, 0xec, 0x17, 0x00, 0xed, 0x40, 0x58, 0xd0, 0x4b, 0xa5, 0x86, + 0x61, 0xdb, 0xc4, 0x7f, 0x90, 0x9f, 0xbc, 0xe6, 0x1d, 0xb0, 0x75, 0x42, 0x16, 0x36, 0x44, 0xc8, + 0xae, 0x00, 0x70, 0x7d, 0x8a, 0xc1, 0x50, 0x08, 0x59, 0xe8, 0x4a, 0x48, 0x91, 0x8d, 0xc4, 0x2c, + 0x06, 0x61, 0xd8, 0x84, 0xe1, 0xf8, 0x11, 0x79, 0x5b, 0x81, 0xb3, 0xdc, 0x88, 0x1f, 0x88, 0x04, + 0x77, 0x61, 0x4d, 0xc6, 0x60, 0xc2, 0x35,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, 0xaa, 0xf7, 0xf0, 0xae, 0x24, 0x55, 0xb9, 0xf2, 0xfa, 0x57, 0x81, 0x69, 0xc9, 0x0d, 0x00, + 0x65, 0x18, 0x24, 0xf4, 0xcf, 0x97, 0xbb, 0xb9, 0x7a, 0x92, 0xa2, 0x3c, 0x62, 0x1f, 0xed, 0xa1, + 0xa2, 0xae, 0xfa, 0x83, 0x42, 0xbf, 0x38, 0x0a, 0x66, 0x6a, 0x9c, 0x8b, 0xa2, 0x4e, 0xde, 0x53, + 0xd4, 0x4b, 0x52, 0xba, 0xf2, 0xb9, 0x2b, 0xdc, 0x05, 0x04, 0x0f, 0x18, 0x8c, 0x45, 0xa2, 0xe5, + 0x02, 0x65, 0x50, 0x25, 0x8f, 0x45, 0x9d, 0xf6, 0x15, 0x99, 0xb1, 0x48, 0xc8, 0x21, 0x7f, 0xfb, + 0xc9, 0x41, 0x56, 0x79, 0x7a, 0x90, 0x55, 0x7e, 0x3b, 0xc8, 0x2a, 0x9f, 0x1f, 0x66, 0x7b, 0x9e, + 0x1e, 0x66, 0x7b, 0x7e, 0x39, 0xcc, 0xf6, 0x3c, 0xcc, 0x95, 0x4d, 0x67, 0xbb, 0x59, 0xcc, 0x6d, + 0x59, 0x55, 0xad, 0x6e, 0x94, 0xcb, 0x7b, 0x1f, 0xb4, 0x42, 0x76, 0x5b, 0x2b, 0xda, 0xae, 0x6f, + 0xdc, 0xd9, 0xab, 0x1b, 0x76, 0xb1, 0xd7, 0xfd, 0x2b, 0xc2, 0xe5, 0xff, 0x02, 0x00, 0x00, 0xff, + 0xff, 0xa5, 0x87, 0xa4, 0xe1, 0x16, 0x19, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/pubsub/types/tx.pb.go b/x/pubsub/types/tx.pb.go index c20f0646d..0975322c1 100644 --- a/x/pubsub/types/tx.pb.go +++ b/x/pubsub/types/tx.pb.go @@ -6,8 +6,11 @@ package types import ( context "context" fmt "fmt" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/query" + _ "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" @@ -679,43 +682,47 @@ func init() { func init() { proto.RegisterFile("pubsub/v1/tx.proto", fileDescriptor_de188e882df4c8a7) } var fileDescriptor_de188e882df4c8a7 = []byte{ - // 574 bytes of a gzipped FileDescriptorProto + // 635 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x95, 0xcf, 0x6e, 0xd3, 0x40, - 0x10, 0xc6, 0xeb, 0x54, 0x54, 0xea, 0x20, 0x48, 0x58, 0xd4, 0x10, 0xdc, 0xd6, 0x0d, 0x2e, 0xd0, - 0x94, 0x82, 0xad, 0x16, 0x21, 0xce, 0x45, 0x20, 0xb5, 0x87, 0x48, 0x28, 0x5c, 0x10, 0x87, 0x46, - 0x71, 0xbc, 0x72, 0x5c, 0xd5, 0x7f, 0xf0, 0xda, 0x56, 0x7b, 0xe0, 0xc0, 0x03, 0x20, 0x21, 0x9e, - 0x8a, 0x63, 0x8f, 0x9c, 0x10, 0x4a, 0x5e, 0x04, 0xc9, 0x9e, 0xc4, 0xde, 0x78, 0x6d, 0xe7, 0x98, - 0xd9, 0x6f, 0xf7, 0xfb, 0xed, 0x37, 0xb3, 0x31, 0x10, 0x3f, 0x32, 0x58, 0x64, 0xe8, 0xf1, 0xb1, - 0x1e, 0x5e, 0x6b, 0x7e, 0xe0, 0x85, 0x1e, 0xd9, 0x4c, 0x6b, 0x5a, 0x7c, 0x2c, 0xb7, 0xb3, 0x65, - 0x2c, 0x26, 0x12, 0xf5, 0x02, 0x1e, 0xf7, 0x99, 0x35, 0xa0, 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0x83, 0x03, 0x71, 0xa3, 0x4f, 0x99, 0x41, 0x99, 0x62, 0x30, 0x32, 0x49, 0x31, 0x18, 0xf1, 0x73, + 0xc4, 0x07, 0x84, 0x12, 0xea, 0x3d, 0x2a, 0x93, 0x27, 0x1e, 0xad, 0x04, 0xa7, 0xf1, 0x33, 0xfc, + 0x78, 0x8d, 0x1f, 0x73, 0xe1, 0x62, 0x7b, 0x38, 0x59, 0xf5, 0x1e, 0xfc, 0xc5, 0xc6, 0x17, 0x78, + 0xd8, 0x66, 0xa4, 0x83, 0x0d, 0x3a, 0xc0, 0xef, 0x5d, 0xf5, 0x5c, 0x67, 0xa7, 0xd8, 0xee, 0xe0, + 0x0b, 0x17, 0x33, 0x07, 0xed, 0x41, 0xd9, 0x9a, 0xc6, 0xba, 0x1a, 0x35, 0x7a, 0xba, 0x59, 0x15, + 0xea, 0x42, 0x73, 0xb5, 0x53, 0x9a, 0xc5, 0xdf, 0x7a, 0x61, 0x54, 0x81, 0x15, 0xa6, 0x13, 0x13, + 0xdb, 0xd5, 0xa2, 0x97, 0xc0, 0xdf, 0x5e, 0xaf, 0x7d, 0xbb, 0xb9, 0x6a, 0xf1, 0x97, 0xc6, 0x26, + 0x88, 0x49, 0x62, 0xcc, 0xa2, 0x26, 0xc3, 0x0d, 0x17, 0x36, 0xda, 0x8c, 0x1c, 0x69, 0xda, 0x07, + 0x57, 0x65, 0x7d, 0x5b, 0x57, 0x03, 0x90, 0x97, 0x00, 0x6c, 0x16, 0xf4, 0x10, 0xd6, 0x0e, 0xd7, + 0xe5, 0x99, 0x53, 0x72, 0x68, 0x47, 0x28, 0x31, 0x1f, 0x94, 0x08, 0xd5, 0xb8, 0x2c, 0x47, 0xb2, + 0x42, 0xc0, 0x71, 0xaa, 0xe7, 0x80, 0x02, 0xb1, 0x6e, 0x4f, 0xd3, 0x6c, 0xcc, 0x18, 0x37, 0xe8, + 0x5e, 0xb0, 0x72, 0xe4, 0x2f, 0xe4, 0xa3, 0xd9, 0x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5f, 0x23, + 0x4a, 0x84, 0x8a, 0x9f, 0xff, 0x74, 0x51, 0x1a, 0x97, 0x20, 0x80, 0xe2, 0xb7, 0x0f, 0xed, 0xc6, + 0xe8, 0x92, 0xaf, 0x9e, 0xd8, 0x5c, 0x9c, 0xc8, 0x85, 0x2c, 0x58, 0x4f, 0xbc, 0x28, 0xa8, 0x95, + 0xe9, 0x72, 0x54, 0x6e, 0x3f, 0x57, 0x2e, 0x57, 0x3c, 0x83, 0xfb, 0x09, 0x53, 0x8e, 0x9a, 0x19, + 0xce, 0x47, 0xd5, 0xf6, 0x72, 0x64, 0x72, 0x2d, 0x06, 0x95, 0xe4, 0x69, 0x44, 0xfb, 0xd9, 0x8d, + 0x88, 0x2a, 0x3e, 0xcb, 0x97, 0xec, 0x8b, 0x8a, 0xcb, 0x5f, 0x6f, 0xae, 0x5a, 0xc2, 0x9b, 0xe3, + 0x3f, 0x23, 0x49, 0xb8, 0x1e, 0x49, 0xc2, 0xbf, 0x91, 0x24, 0xfc, 0x1c, 0x4b, 0x85, 0xeb, 0xb1, + 0x54, 0xf8, 0x3b, 0x96, 0x0a, 0x9f, 0x64, 0xa2, 0x3b, 0xa7, 0xae, 0x2a, 0xf7, 0xa9, 0xa1, 0x58, + 0x98, 0x90, 0xe1, 0xd9, 0x40, 0x61, 0xd4, 0x30, 0xf0, 0xb9, 0x8e, 0x6d, 0x65, 0xf0, 0x4a, 0xb9, + 0xe4, 0xbf, 0x79, 0xc5, 0x19, 0x5a, 0x98, 0xa9, 0x2b, 0xde, 0x0f, 0xfd, 0xc5, 0x6d, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x41, 0xdc, 0xa9, 0x81, 0x55, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From d8bdaeb545a8b28804f13aff9117f332c33cd09e Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Fri, 31 May 2024 14:41:45 +0100 Subject: [PATCH 28/32] Create funding.json --- funding.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 funding.json diff --git a/funding.json b/funding.json new file mode 100644 index 000000000..5ca9a9604 --- /dev/null +++ b/funding.json @@ -0,0 +1,5 @@ +{ + "opRetro": { + "projectId": "0x8315a83faff360eb7288ffbfec2694372880dd58f48e38bf4785b3bb1fbd5f1a" + } +} From cec0a521bff793c6f01ce05429214113b22a588c Mon Sep 17 00:00:00 2001 From: Collin Date: Thu, 18 Jul 2024 14:06:51 -0500 Subject: [PATCH 29/32] Collin/update prost build (#307) * Fix prost build after upgrade to using buf * Update somm_proto and prost build --- prost_build/README.md | 5 + prost_build/src/main.rs | 4 + somm_proto/src/prost/auction.v1.rs | 4 + somm_proto/src/prost/axelarcork.v1.rs | 4 +- somm_proto/src/prost/cork.v2.rs | 4 +- somm_proto/src/prost/cosmos.msg.v1.rs | 1 + somm_proto/src/prost/cosmos.query.v1.rs | 1 + somm_proto/src/prost/cosmos_proto.rs | 1 + somm_proto/src/prost/pubsub.v1.rs | 2 +- third_party/proto/README.md | 4 + third_party/proto/cosmos/msg/v1/msg.proto | 30 ++ third_party/proto/cosmos/query/v1/query.proto | 35 ++ third_party/proto/cosmos_proto/cosmos.proto | 16 + third_party/proto/gogoproto/gogo.proto | 145 +++++++ .../proto/google/api/annotations.proto | 31 ++ third_party/proto/google/api/http.proto | 375 ++++++++++++++++++ third_party/proto/google/api/httpbody.proto | 77 ++++ third_party/proto/google/protobuf/any.proto | 158 ++++++++ 18 files changed, 892 insertions(+), 5 deletions(-) create mode 100644 prost_build/README.md create mode 100644 somm_proto/src/prost/cosmos.msg.v1.rs create mode 100644 somm_proto/src/prost/cosmos.query.v1.rs create mode 100644 somm_proto/src/prost/cosmos_proto.rs create mode 100644 third_party/proto/README.md create mode 100644 third_party/proto/cosmos/msg/v1/msg.proto create mode 100644 third_party/proto/cosmos/query/v1/query.proto create mode 100644 third_party/proto/cosmos_proto/cosmos.proto create mode 100644 third_party/proto/gogoproto/gogo.proto create mode 100644 third_party/proto/google/api/annotations.proto create mode 100644 third_party/proto/google/api/http.proto create mode 100644 third_party/proto/google/api/httpbody.proto create mode 100644 third_party/proto/google/protobuf/any.proto diff --git a/prost_build/README.md b/prost_build/README.md new file mode 100644 index 000000000..da7af4c77 --- /dev/null +++ b/prost_build/README.md @@ -0,0 +1,5 @@ +# Rust Proto Bindings Build + +## Notes + +For some reason, the `type_attribute` config method is not working the the `CellarIdSet` type, therefore whenever `prost_build` gets run, we have to manually add the `serde::Deserialize` and `serde::Serialize` attributes to it. diff --git a/prost_build/src/main.rs b/prost_build/src/main.rs index b498088bb..8da985d1a 100644 --- a/prost_build/src/main.rs +++ b/prost_build/src/main.rs @@ -102,6 +102,10 @@ fn compile_protos(out_dir: &Path, tmp_dir: &Path) { config .type_attribute("ScheduledCorkProposal", "#[derive(serde::Deserialize, serde::Serialize)]") .type_attribute("AxelarScheduledCorkProposal", "#[derive(serde::Deserialize, serde::Serialize)]") + .type_attribute("AddPublisherProposal", "#[derive(serde::Deserialize, serde::Serialize)]") + .type_attribute("AddManagedCellarIDsProposalWithDeposit", "#[derive(serde::Deserialize, serde::Serialize)]") + .type_attribute("AddAxelarManagedCellarIDsProposalWithDeposit", "#[derive(serde::Deserialize, serde::Serialize)]") + .type_attribute("axelar_cork::CellarIdSet", "#[derive(serde::Deserialize, serde::Serialize)]") .compile_protos(&protos, &proto_include_paths) .unwrap(); diff --git a/somm_proto/src/prost/auction.v1.rs b/somm_proto/src/prost/auction.v1.rs index d41ec1296..176c0816c 100644 --- a/somm_proto/src/prost/auction.v1.rs +++ b/somm_proto/src/prost/auction.v1.rs @@ -177,6 +177,10 @@ pub struct Params { pub auction_price_decrease_acceleration_rate: ::prost::alloc::string::String, #[prost(uint64, tag = "6")] pub minimum_auction_height: u64, + /// value between 0 and 1 the determines the % of somm received from bids that + /// gets burned + #[prost(string, tag = "7")] + pub somm_burn_ratio: ::prost::alloc::string::String, } #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} diff --git a/somm_proto/src/prost/axelarcork.v1.rs b/somm_proto/src/prost/axelarcork.v1.rs index 99cb3b45e..9ae1078b5 100644 --- a/somm_proto/src/prost/axelarcork.v1.rs +++ b/somm_proto/src/prost/axelarcork.v1.rs @@ -46,7 +46,7 @@ pub struct AxelarCorkResults { #[prost(message, repeated, tag = "1")] pub cork_results: ::prost::alloc::vec::Vec, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] pub struct CellarIdSet { #[prost(uint64, tag = "1")] pub chain_id: u64, @@ -768,7 +768,7 @@ pub struct AddAxelarManagedCellarIDsProposal { pub publisher_domain: ::prost::alloc::string::String, } /// AddAxelarManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] pub struct AddAxelarManagedCellarIDsProposalWithDeposit { #[prost(string, tag = "1")] pub title: ::prost::alloc::string::String, diff --git a/somm_proto/src/prost/cork.v2.rs b/somm_proto/src/prost/cork.v2.rs index efce9d4a6..33cb48e6d 100644 --- a/somm_proto/src/prost/cork.v2.rs +++ b/somm_proto/src/prost/cork.v2.rs @@ -29,7 +29,7 @@ pub struct CorkResult { #[prost(string, tag = "4")] pub approval_percentage: ::prost::alloc::string::String, } -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] pub struct CellarIdSet { #[prost(string, repeated, tag = "1")] pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, @@ -402,7 +402,7 @@ pub struct AddManagedCellarIDsProposal { pub publisher_domain: ::prost::alloc::string::String, } /// AddManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] pub struct AddManagedCellarIDsProposalWithDeposit { #[prost(string, tag = "1")] pub title: ::prost::alloc::string::String, diff --git a/somm_proto/src/prost/cosmos.msg.v1.rs b/somm_proto/src/prost/cosmos.msg.v1.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/somm_proto/src/prost/cosmos.msg.v1.rs @@ -0,0 +1 @@ + diff --git a/somm_proto/src/prost/cosmos.query.v1.rs b/somm_proto/src/prost/cosmos.query.v1.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/somm_proto/src/prost/cosmos.query.v1.rs @@ -0,0 +1 @@ + diff --git a/somm_proto/src/prost/cosmos_proto.rs b/somm_proto/src/prost/cosmos_proto.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/somm_proto/src/prost/cosmos_proto.rs @@ -0,0 +1 @@ + diff --git a/somm_proto/src/prost/pubsub.v1.rs b/somm_proto/src/prost/pubsub.v1.rs index c002d481b..cfa5dac15 100644 --- a/somm_proto/src/prost/pubsub.v1.rs +++ b/somm_proto/src/prost/pubsub.v1.rs @@ -77,7 +77,7 @@ pub struct DefaultSubscription { } /// governance proposal to add a publisher, with domain, adress, and ca_cert the same as the Publisher type /// proof URL expected in the format: https:///
/cacert.pem and serving cacert.pem matching ca_cert -#[derive(Clone, PartialEq, ::prost::Message)] +#[derive(serde::Deserialize, serde::Serialize, Clone, PartialEq, ::prost::Message)] pub struct AddPublisherProposal { #[prost(string, tag = "1")] pub title: ::prost::alloc::string::String, diff --git a/third_party/proto/README.md b/third_party/proto/README.md new file mode 100644 index 000000000..876d29ab0 --- /dev/null +++ b/third_party/proto/README.md @@ -0,0 +1,4 @@ +# Third party vendored protos + +The primary proto generation now uses buf and the buf schema registry, but some of these vendored protos are still necessary because the Rust code generator, found under `prost_build` in the root directory, needs them. + diff --git a/third_party/proto/cosmos/msg/v1/msg.proto b/third_party/proto/cosmos/msg/v1/msg.proto new file mode 100644 index 000000000..853efa1f7 --- /dev/null +++ b/third_party/proto/cosmos/msg/v1/msg.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; + +package cosmos.msg.v1; + +import "google/protobuf/descriptor.proto"; + +// TODO(fdymylja): once we fully migrate to protov2 the go_package needs to be updated. +// We need this right now because gogoproto codegen needs to import the extension. +option go_package = "github.com/cosmos/cosmos-sdk/types/msgservice"; + +extend google.protobuf.ServiceOptions { + // service indicates that the service is a Msg service and that requests + // must be transported via blockchain transactions rather than gRPC. + // Tooling can use this annotation to distinguish between Msg services and + // other types of services via reflection. + bool service = 11110000; +} + +extend google.protobuf.MessageOptions { + // signer must be used in cosmos messages in order + // to signal to external clients which fields in a + // given cosmos message must be filled with signer + // information (address). + // The field must be the protobuf name of the message + // field extended with this MessageOption. + // The field must either be of string kind, or of message + // kind in case the signer information is contained within + // a message inside the cosmos message. + repeated string signer = 11110000; +} diff --git a/third_party/proto/cosmos/query/v1/query.proto b/third_party/proto/cosmos/query/v1/query.proto new file mode 100644 index 000000000..86801e03d --- /dev/null +++ b/third_party/proto/cosmos/query/v1/query.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package cosmos.query.v1; + +import "google/protobuf/descriptor.proto"; + +// TODO: once we fully migrate to protov2 the go_package needs to be updated. +// We need this right now because gogoproto codegen needs to import the extension. +option go_package = "github.com/cosmos/cosmos-sdk/types/query"; + +extend google.protobuf.MethodOptions { + // module_query_safe is set to true when the query is safe to be called from + // within the state machine, for example from another module's Keeper, via + // ADR-033 calls or from CosmWasm contracts. + // Concretely, it means that the query is: + // 1. deterministic: given a block height, returns the exact same response + // upon multiple calls; and doesn't introduce any state-machine-breaking + // changes across SDK patch version. + // 2. consumes gas correctly. + // + // If you are a module developer and want to add this annotation to one of + // your own queries, please make sure that the corresponding query: + // 1. is deterministic and won't introduce state-machine-breaking changes + // without a coordinated upgrade path, + // 2. has its gas tracked, to avoid the attack vector where no gas is + // accounted for on potentially high-computation queries. + // + // For queries that potentially consume a large amount of gas (for example + // those with pagination, if the pagination field is incorrectly set), we + // also recommend adding Protobuf comments to warn module developers + // consuming these queries. + // + // When set to true, the query can safely be called + bool module_query_safe = 11110001; +} diff --git a/third_party/proto/cosmos_proto/cosmos.proto b/third_party/proto/cosmos_proto/cosmos.proto new file mode 100644 index 000000000..15e190dfc --- /dev/null +++ b/third_party/proto/cosmos_proto/cosmos.proto @@ -0,0 +1,16 @@ +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 new file mode 100644 index 000000000..6342ee9fc --- /dev/null +++ b/third_party/proto/gogoproto/gogo.proto @@ -0,0 +1,145 @@ +// 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 new file mode 100644 index 000000000..1bb611187 --- /dev/null +++ b/third_party/proto/google/api/annotations.proto @@ -0,0 +1,31 @@ +// Copyright 2015 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/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 new file mode 100644 index 000000000..f9d53e085 --- /dev/null +++ b/third_party/proto/google/api/http.proto @@ -0,0 +1,375 @@ +// Copyright 2015 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 parameters 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; +} + +// # gRPC Transcoding +// +// gRPC Transcoding is a feature for mapping between a gRPC method and one or +// more HTTP REST endpoints. It allows developers to build a single API service +// that supports both gRPC APIs and REST APIs. Many systems, including [Google +// APIs](https://github.com/googleapis/googleapis), +// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC +// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), +// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature +// and use it for large scale production services. +// +// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies +// how different portions of the gRPC request message are mapped to the URL +// path, URL query parameters, and HTTP request body. It also controls how the +// gRPC response message is mapped to the HTTP response body. `HttpRule` is +// typically specified as an `google.api.http` annotation on the gRPC method. +// +// Each mapping specifies a URL path template and an HTTP method. The path +// template may refer to one or more fields in the gRPC request message, as long +// as each field is a non-repeated field with a primitive (non-message) type. +// The path template controls how fields of the request message are mapped to +// the URL path. +// +// Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/{name=messages/*}" +// }; +// } +// } +// message GetMessageRequest { +// string name = 1; // Mapped to URL path. +// } +// message Message { +// string text = 1; // The resource content. +// } +// +// This enables an HTTP REST to gRPC mapping as below: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` +// +// Any fields in the request message which are not bound by the path template +// automatically become HTTP query parameters if there is no HTTP request body. +// For example: +// +// 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 URL path. +// int64 revision = 2; // Mapped to URL query parameter `revision`. +// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. +// } +// +// This enables a HTTP JSON to RPC mapping as below: +// +// HTTP | gRPC +// -----|----- +// `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 URL query parameters must have a +// primitive type or a repeated primitive type or a non-repeated message type. +// In the case of a repeated type, the parameter can be repeated in the URL +// as `...?param=A¶m=B`. In the case of a message type, each field of the +// message is mapped to a separate parameter, such as +// `...?foo.a=A&foo.b=B&foo.c=C`. +// +// For HTTP methods that 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) = { +// patch: "/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 | gRPC +// -----|----- +// `PATCH /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) = { +// patch: "/v1/messages/{message_id}" +// body: "*" +// }; +// } +// } +// message Message { +// string message_id = 1; +// string text = 2; +// } +// +// +// The following HTTP JSON to RPC mapping is enabled: +// +// HTTP | gRPC +// -----|----- +// `PATCH /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 when +// 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 | gRPC +// -----|----- +// `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 +// +// 1. Leaf request fields (recursive expansion nested messages in the request +// message) are classified into three categories: +// - Fields referred by the path template. They are passed via the URL path. +// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP +// request body. +// - All other fields are passed via the URL query parameters, and the +// parameter name is the field path in the request message. A repeated +// field can be represented as multiple query parameters under the same +// name. +// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields +// are passed via URL path and HTTP request body. +// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all +// fields are passed via URL path and URL query parameters. +// +// ### Path template syntax +// +// Template = "/" Segments [ Verb ] ; +// Segments = Segment { "/" Segment } ; +// Segment = "*" | "**" | LITERAL | Variable ; +// Variable = "{" FieldPath [ "=" Segments ] "}" ; +// FieldPath = IDENT { "." IDENT } ; +// Verb = ":" LITERAL ; +// +// The syntax `*` matches a single URL path segment. The syntax `**` matches +// zero or more URL path segments, which must be the last part of the URL path +// except the `Verb`. +// +// 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=*}`. +// +// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` +// contains any reserved character, such characters should be percent-encoded +// before the matching. +// +// If a variable contains exactly one path segment, such as `"{var}"` or +// `"{var=*}"`, when such a variable is expanded into a URL path on the client +// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The +// server side does the reverse decoding. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{var}`. +// +// If a variable contains multiple path segments, such as `"{var=foo/*}"` +// or `"{var=**}"`, when such a variable is expanded into a URL path on the +// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. +// The server side does the reverse decoding, except "%2F" and "%2f" are left +// unchanged. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{+var}`. +// +// ## Using gRPC API Service Configuration +// +// gRPC API Service Configuration (service config) is a configuration language +// for configuring a gRPC service to become a user-facing product. The +// service config is simply the YAML representation of the `google.api.Service` +// proto message. +// +// As an alternative to annotating your proto file, you can configure gRPC +// transcoding in your service config YAML files. You do this by specifying a +// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same +// effect as the proto annotation. This can be particularly useful if you +// have a proto that is reused in multiple services. Note that any transcoding +// specified in the service config will override any matching transcoding +// configuration in the proto. +// +// Example: +// +// http: +// rules: +// # Selects a gRPC method and applies HttpRule to it. +// - selector: example.v1.Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// ## Special notes +// +// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the +// proto to JSON conversion must follow the [proto3 +// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). +// +// While the single segment variable follows the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String +// Expansion, the multi segment variable **does not** follow RFC 6570 Section +// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion +// does not expand special characters like `?` and `#`, which would lead +// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding +// for multi segment variables. +// +// The path variables **must not** refer to any repeated or mapped field, +// because client libraries are not capable of handling such variable expansion. +// +// The path variables **must not** capture the leading "/" character. The reason +// is that the most common use case "{var}" does not capture the leading "/" +// character. For consistency, all path variables must share the same behavior. +// +// Repeated message fields must not be mapped to URL query parameters, because +// no client library can support such complicated mapping. +// +// If an API needs to use a JSON array for request or response body, it can map +// the request or response body to a repeated field. However, some gRPC +// Transcoding implementations may not support this feature. +message HttpRule { + // Selects a method 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 { + // Maps to HTTP GET. Used for listing and getting information about + // resources. + string get = 2; + + // Maps to HTTP PUT. Used for replacing a resource. + string put = 3; + + // Maps to HTTP POST. Used for creating a resource or performing an action. + string post = 4; + + // Maps to HTTP DELETE. Used for deleting a resource. + string delete = 5; + + // Maps to HTTP PATCH. 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 request + // body, or `*` for mapping all request fields not captured by the path + // pattern to the HTTP body, or omitted for not having any HTTP request body. + // + // NOTE: the referred field must be present at the top-level of the request + // message type. + string body = 7; + + // Optional. The name of the response field whose value is mapped to the HTTP + // response body. When omitted, the entire response message will be used + // as the HTTP response body. + // + // NOTE: The referred field must be present at the top-level of the response + // message type. + 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 new file mode 100644 index 000000000..e0f2c2938 --- /dev/null +++ b/third_party/proto/google/api/httpbody.proto @@ -0,0 +1,77 @@ +// Copyright 2015 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; +} diff --git a/third_party/proto/google/protobuf/any.proto b/third_party/proto/google/protobuf/any.proto new file mode 100644 index 000000000..cc1e5a386 --- /dev/null +++ b/third_party/proto/google/protobuf/any.proto @@ -0,0 +1,158 @@ +// 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; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "google.golang.org/protobuf/types/known/anypb"; +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 := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// +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; +} From 782430041b97cb04b85493ed0f9a47a5c36e828a Mon Sep 17 00:00:00 2001 From: Collin Date: Fri, 19 Jul 2024 13:16:47 -0500 Subject: [PATCH 30/32] Fix unit tests and more SDK v0.47 upgrade changes (#304) * Fix unit tests * Add autocli query service * Linting fixes * Fix more linting errors * Fix incentives test --- app/app.go | 14 ++++++++++++-- integration_tests/auction_test.go | 6 ------ integration_tests/incentives_test.go | 23 ++++++++++++++++------- integration_tests/setup_test.go | 2 -- x/auction/client/cli/tx_test.go | 6 +++--- x/auction/module.go | 2 +- x/axelarcork/client/cli/tx_test.go | 17 +++++++++-------- x/axelarcork/module.go | 2 +- x/cellarfees/module.go | 2 +- x/cork/client/cli/tx_test.go | 7 ++++--- x/cork/module.go | 2 +- x/incentives/module.go | 2 +- x/pubsub/module.go | 2 +- 13 files changed, 50 insertions(+), 37 deletions(-) diff --git a/app/app.go b/app/app.go index e3f92289e..a4e8aa9ea 100644 --- a/app/app.go +++ b/app/app.go @@ -9,6 +9,8 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" tmjson "github.com/cometbft/cometbft/libs/json" @@ -20,6 +22,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" + runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -63,7 +66,6 @@ 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" @@ -744,6 +746,14 @@ func NewSommelierApp( app.MountTransientStores(tkeys) app.MountMemoryStores(memKeys) + 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) @@ -966,7 +976,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(minttypes.ModuleName) paramsKeeper.Subspace(distrtypes.ModuleName) paramsKeeper.Subspace(slashingtypes.ModuleName) - paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypesv1.ParamKeyTable()) + paramsKeeper.Subspace(govtypes.ModuleName) paramsKeeper.Subspace(crisistypes.ModuleName) paramsKeeper.Subspace(ibctransfertypes.ModuleName) paramsKeeper.Subspace(icaexported.ModuleName) diff --git a/integration_tests/auction_test.go b/integration_tests/auction_test.go index 37e379bfc..f5c5d7361 100644 --- a/integration_tests/auction_test.go +++ b/integration_tests/auction_test.go @@ -276,12 +276,6 @@ func (s *IntegrationTestSuite) TestAuction() { endedAuctionResponse, err := auctionQueryClient.QueryEndedAuction(context.Background(), &types.QueryEndedAuctionRequest{AuctionId: uint32(1)}) s.Require().NoError(err) - node, err = orchClientCtx.GetNode() - s.Require().NoError(err) - status, err = node.Status(context.Background()) - s.Require().NoError(err) - currentBlockHeight = status.SyncInfo.LatestBlockHeight - expectedEndedAuction := types.Auction{ Id: uint32(1), StartingTokensForSale: sdk.NewCoin("gravity0x3506424f91fd33084466f402d5d97f05f8e3b4af", sdk.NewInt(5000000000)), diff --git a/integration_tests/incentives_test.go b/integration_tests/incentives_test.go index ccbb9abfb..e15c84725 100644 --- a/integration_tests/incentives_test.go +++ b/integration_tests/incentives_test.go @@ -210,13 +210,16 @@ func (s *IntegrationTestSuite) queryValidatorRewards(ctx context.Context, valOpe return rewardsRes.Rewards.Rewards.AmountOf(params.BaseCoinUnit) } -func (s *IntegrationTestSuite) getCurrentHeight(clientCtx *client.Context) int64 { +func (s *IntegrationTestSuite) getCurrentHeight(clientCtx *client.Context) (int64, error) { node, err := clientCtx.GetNode() - s.Require().NoError(err) + if err != nil { + return 0, err + } status, err := node.Status(context.Background()) - s.Require().NoError(err) - - return status.SyncInfo.LatestBlockHeight + if err != nil { + return 0, err + } + return status.SyncInfo.LatestBlockHeight, nil } func (s *IntegrationTestSuite) getRewardAmountAndHeight(ctx context.Context, distQueryClient disttypes.QueryClient, operatorAddress string, clientCtx *client.Context) (sdk.Dec, int64) { @@ -224,9 +227,15 @@ func (s *IntegrationTestSuite) getRewardAmountAndHeight(ctx context.Context, dis var height int64 s.Require().Eventually(func() bool { - initialHeight := s.getCurrentHeight(clientCtx) + initialHeight, err := s.getCurrentHeight(clientCtx) + if err != nil { + return false + } amount = s.queryValidatorRewards(ctx, operatorAddress, distQueryClient) - height = s.getCurrentHeight(clientCtx) + height, err = s.getCurrentHeight(clientCtx) + if err != nil { + return false + } return initialHeight == height }, time.Second*30, time.Second*1, "failed to reliably determine height of reward sample") diff --git a/integration_tests/setup_test.go b/integration_tests/setup_test.go index 842fcb458..77a135161 100644 --- a/integration_tests/setup_test.go +++ b/integration_tests/setup_test.go @@ -403,8 +403,6 @@ func (s *IntegrationTestSuite) initGenesis() { distGenState := disttypes.DefaultGenesisState() s.Require().NoError(cdc.UnmarshalJSON(appGenState[minttypes.ModuleName], &mintGenState)) distGenState.Params.CommunityTax = sdk.ZeroDec() - distGenState.Params.BaseProposerReward = sdk.ZeroDec() - distGenState.Params.BonusProposerReward = sdk.ZeroDec() distGenState.FeePool.CommunityPool = sdk.NewDecCoins(sdk.NewDecCoin(params.BaseCoinUnit, sdk.NewInt(1000000000))) bz, err = cdc.MarshalJSON(distGenState) s.Require().NoError(err) diff --git a/x/auction/client/cli/tx_test.go b/x/auction/client/cli/tx_test.go index f8cb53574..8a39b04f2 100644 --- a/x/auction/client/cli/tx_test.go +++ b/x/auction/client/cli/tx_test.go @@ -5,15 +5,15 @@ import ( "os" "testing" - "github.com/cosmos/cosmos-sdk/testutil" "github.com/peggyjv/sommelier/v7/x/auction/types" "github.com/cosmos/cosmos-sdk/testutil" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/stretchr/testify/require" ) func TestParseSetTokenPricesProposal(t *testing.T) { - encodingConfig := testutil.TestEncodingConfig() + encodingConfig := moduletestutil.MakeTestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -33,7 +33,7 @@ func TestParseSetTokenPricesProposal(t *testing.T) { require.Equal(t, "My token proposal", proposal.Title) require.Equal(t, "Contains a usomm price update", proposal.Description) - require.Equal(t, "denom:\"usomm\" exponent:\"6\" usd_price:\"4200000000000000000\" ", proposal.TokenPrices[0].String()) + require.Equal(t, "denom:\"usomm\" exponent:6 usd_price:\"4200000000000000000\" ", proposal.TokenPrices[0].String()) require.Equal(t, "10000usomm", proposal.Deposit) } diff --git a/x/auction/module.go b/x/auction/module.go index 141146637..c189e1976 100644 --- a/x/auction/module.go +++ b/x/auction/module.go @@ -151,7 +151,7 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { // ProposalContents returns all the distribution content functions used to // simulate governance proposals. -func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent { +func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedProposalMsg { return nil } diff --git a/x/axelarcork/client/cli/tx_test.go b/x/axelarcork/client/cli/tx_test.go index 087ba52f3..fff2e355c 100644 --- a/x/axelarcork/client/cli/tx_test.go +++ b/x/axelarcork/client/cli/tx_test.go @@ -8,11 +8,12 @@ import ( "github.com/peggyjv/sommelier/v7/x/axelarcork/types" "github.com/cosmos/cosmos-sdk/testutil" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/stretchr/testify/require" ) func TestParseAddManagedCellarsProposal(t *testing.T) { - encodingConfig := testutil.TestEncodingConfig() + encodingConfig := moduletestutil.MakeTestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -42,7 +43,7 @@ func TestParseAddManagedCellarsProposal(t *testing.T) { } func TestParseRemoveManagedCellarsProposal(t *testing.T) { - encodingConfig := testutil.TestEncodingConfig() + encodingConfig := moduletestutil.MakeTestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -70,7 +71,7 @@ func TestParseRemoveManagedCellarsProposal(t *testing.T) { } func TestParseSubmitScheduledCorkProposal(t *testing.T) { - encodingConfig := testutil.TestEncodingConfig() + encodingConfig := moduletestutil.MakeTestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -103,7 +104,7 @@ func TestParseSubmitScheduledCorkProposal(t *testing.T) { } func TestParseAxelarCommunityPoolSpendProposal(t *testing.T) { - encodingConfig := testutil.TestEncodingConfig() + encodingConfig := moduletestutil.MakeTestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -132,7 +133,7 @@ func TestParseAxelarCommunityPoolSpendProposal(t *testing.T) { } func TestParseAddChainConfigurationProposal(t *testing.T) { - encodingConfig := testutil.TestEncodingConfig() + encodingConfig := moduletestutil.MakeTestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -171,7 +172,7 @@ func TestParseAddChainConfigurationProposal(t *testing.T) { } func TestParseRemoveChainConfigurationProposal(t *testing.T) { - encodingConfig := testutil.TestEncodingConfig() + encodingConfig := moduletestutil.MakeTestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -196,7 +197,7 @@ func TestParseRemoveChainConfigurationProposal(t *testing.T) { } func TestParseUpgradeAxelarProxyContractProposal(t *testing.T) { - encodingConfig := testutil.TestEncodingConfig() + encodingConfig := moduletestutil.MakeTestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -223,7 +224,7 @@ func TestParseUpgradeAxelarProxyContractProposal(t *testing.T) { } func TestParseCancelAxelarProxyContractUpgradeProposal(t *testing.T) { - encodingConfig := testutil.TestEncodingConfig() + encodingConfig := moduletestutil.MakeTestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { diff --git a/x/axelarcork/module.go b/x/axelarcork/module.go index 52fae1689..f98a39cc3 100644 --- a/x/axelarcork/module.go +++ b/x/axelarcork/module.go @@ -147,7 +147,7 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { // ProposalContents returns all the cork content functions used to // simulate governance proposals. -func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent { +func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedProposalMsg { return nil } diff --git a/x/cellarfees/module.go b/x/cellarfees/module.go index bc3c931d8..7e35a42e4 100644 --- a/x/cellarfees/module.go +++ b/x/cellarfees/module.go @@ -157,7 +157,7 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) {} // ProposalContents returns all the cellarfees content functions used to // simulate governance proposals. -func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent { +func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedProposalMsg { return nil } diff --git a/x/cork/client/cli/tx_test.go b/x/cork/client/cli/tx_test.go index 137992119..03fd98290 100644 --- a/x/cork/client/cli/tx_test.go +++ b/x/cork/client/cli/tx_test.go @@ -7,11 +7,12 @@ import ( types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" "github.com/cosmos/cosmos-sdk/testutil" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/stretchr/testify/require" ) func TestParseAddManagedCellarsProposal(t *testing.T) { - encodingConfig := testutil.TestEncodingConfig() + encodingConfig := moduletestutil.MakeTestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -39,7 +40,7 @@ func TestParseAddManagedCellarsProposal(t *testing.T) { } func TestParseRemoveManagedCellarsProposal(t *testing.T) { - encodingConfig := testutil.TestEncodingConfig() + encodingConfig := moduletestutil.MakeTestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { @@ -65,7 +66,7 @@ func TestParseRemoveManagedCellarsProposal(t *testing.T) { } func TestParseSubmitScheduledCorkProposal(t *testing.T) { - encodingConfig := testutil.TestEncodingConfig() + encodingConfig := moduletestutil.MakeTestEncodingConfig() okJSON := testutil.WriteToNewTempFile(t, ` { diff --git a/x/cork/module.go b/x/cork/module.go index 7a78ac82b..d31123b75 100644 --- a/x/cork/module.go +++ b/x/cork/module.go @@ -154,7 +154,7 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { // ProposalContents returns all the cork content functions used to // simulate governance proposals. -func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent { +func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedProposalMsg { return nil } diff --git a/x/incentives/module.go b/x/incentives/module.go index cd936b454..7a3065551 100644 --- a/x/incentives/module.go +++ b/x/incentives/module.go @@ -153,7 +153,7 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { // ProposalContents returns all the distribution content functions used to // simulate governance proposals. -func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent { +func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedProposalMsg { return nil } diff --git a/x/pubsub/module.go b/x/pubsub/module.go index 3b4120e2f..6ff586d49 100644 --- a/x/pubsub/module.go +++ b/x/pubsub/module.go @@ -162,7 +162,7 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) {} // ProposalContents returns all the content functions used to // simulate governance proposals. -func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedProposalContent { +func (am AppModule) ProposalContents(_ module.SimulationState) []sim.WeightedProposalMsg { return nil } From da767649e43fbbbd2ddeb7f4f5aedaf28e4e30fb Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Fri, 19 Jul 2024 20:17:25 +0200 Subject: [PATCH 31/32] Update README.md (#302) Shift to custom discord link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7e8281dde..4adc7173f 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ For more information you can check out the [Sommelier Documentation](https://som We have active, helpful communities on Twitter, Discord, and Telegram. * [Twitter](https://twitter.com/sommfinance) -* [Discord](https://discord.gg/gZzaPmDzUq) +* [Discord](https://discord.gg/sommfinance) * [Telegram](https://t.me/getsomm) ## Sommelier From 9421fa7a45db8041437f370f7a101e17ee92e64d Mon Sep 17 00:00:00 2001 From: Chill Validation <92176880+chillyvee@users.noreply.github.com> Date: Sat, 20 Jul 2024 05:06:51 +0900 Subject: [PATCH 32/32] More Happy Function Name Spelling (#259)