diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 13523f806..ef35eed21 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -125,6 +125,7 @@ jobs: "Auction", "CellarFees", "Incentives", + "ValidatorIncentives", "Pubsub", "Addresses", ] diff --git a/Makefile b/Makefile index 314f45e1e..da6b73e79 100644 --- a/Makefile +++ b/Makefile @@ -388,6 +388,9 @@ e2e_cellarfees_test: e2e_clean_slate e2e_incentives_test: e2e_clean_slate @E2E_SKIP_CLEANUP=true integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestIncentives || make -s fail +e2e_validator_incentives_test: e2e_clean_slate + @E2E_SKIP_CLEANUP=true integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestValidatorIncentives || make -s fail + e2e_pubsub_test: e2e_clean_slate @E2E_SKIP_CLEANUP=true integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestPubsub || make -s fail diff --git a/app/app.go b/app/app.go index 5b1350e28..3b6b2f899 100644 --- a/app/app.go +++ b/app/app.go @@ -101,36 +101,37 @@ import ( 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" - 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" - "github.com/peggyjv/sommelier/v7/x/addresses" - addresseskeeper "github.com/peggyjv/sommelier/v7/x/addresses/keeper" - addressestypes "github.com/peggyjv/sommelier/v7/x/addresses/types" - "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" - auctiontypes "github.com/peggyjv/sommelier/v7/x/auction/types" - "github.com/peggyjv/sommelier/v7/x/axelarcork" - axelarcorkclient "github.com/peggyjv/sommelier/v7/x/axelarcork/client" - axelarcorkkeeper "github.com/peggyjv/sommelier/v7/x/axelarcork/keeper" - axelarcorktypes "github.com/peggyjv/sommelier/v7/x/axelarcork/types" - "github.com/peggyjv/sommelier/v7/x/cellarfees" - cellarfeeskeeper "github.com/peggyjv/sommelier/v7/x/cellarfees/keeper" - cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" - "github.com/peggyjv/sommelier/v7/x/cork" - corkclient "github.com/peggyjv/sommelier/v7/x/cork/client" - corkkeeper "github.com/peggyjv/sommelier/v7/x/cork/keeper" - corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" - "github.com/peggyjv/sommelier/v7/x/incentives" - incentiveskeeper "github.com/peggyjv/sommelier/v7/x/incentives/keeper" - incentivestypes "github.com/peggyjv/sommelier/v7/x/incentives/types" - "github.com/peggyjv/sommelier/v7/x/pubsub" - pubsubclient "github.com/peggyjv/sommelier/v7/x/pubsub/client" - pubsubkeeper "github.com/peggyjv/sommelier/v7/x/pubsub/keeper" - pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" + "github.com/peggyjv/gravity-bridge/module/v5/x/gravity" + gravityclient "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/client" + gravitykeeper "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/keeper" + gravitytypes "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/types" + appParams "github.com/peggyjv/sommelier/v8/app/params" + v8 "github.com/peggyjv/sommelier/v8/app/upgrades/v8" + "github.com/peggyjv/sommelier/v8/x/addresses" + addresseskeeper "github.com/peggyjv/sommelier/v8/x/addresses/keeper" + addressestypes "github.com/peggyjv/sommelier/v8/x/addresses/types" + "github.com/peggyjv/sommelier/v8/x/auction" + auctionclient "github.com/peggyjv/sommelier/v8/x/auction/client" + auctionkeeper "github.com/peggyjv/sommelier/v8/x/auction/keeper" + auctiontypes "github.com/peggyjv/sommelier/v8/x/auction/types" + "github.com/peggyjv/sommelier/v8/x/axelarcork" + axelarcorkclient "github.com/peggyjv/sommelier/v8/x/axelarcork/client" + axelarcorkkeeper "github.com/peggyjv/sommelier/v8/x/axelarcork/keeper" + axelarcorktypes "github.com/peggyjv/sommelier/v8/x/axelarcork/types" + "github.com/peggyjv/sommelier/v8/x/cellarfees" + cellarfeeskeeper "github.com/peggyjv/sommelier/v8/x/cellarfees/keeper" + cellarfeestypes "github.com/peggyjv/sommelier/v8/x/cellarfees/types" + "github.com/peggyjv/sommelier/v8/x/cork" + corkclient "github.com/peggyjv/sommelier/v8/x/cork/client" + corkkeeper "github.com/peggyjv/sommelier/v8/x/cork/keeper" + corktypes "github.com/peggyjv/sommelier/v8/x/cork/types" + "github.com/peggyjv/sommelier/v8/x/incentives" + incentiveskeeper "github.com/peggyjv/sommelier/v8/x/incentives/keeper" + incentivestypes "github.com/peggyjv/sommelier/v8/x/incentives/types" + "github.com/peggyjv/sommelier/v8/x/pubsub" + pubsubclient "github.com/peggyjv/sommelier/v8/x/pubsub/client" + pubsubkeeper "github.com/peggyjv/sommelier/v8/x/pubsub/keeper" + pubsubtypes "github.com/peggyjv/sommelier/v8/x/pubsub/types" "github.com/rakyll/statik/fs" // unnamed import of statik for swagger UI support @@ -519,11 +520,7 @@ func NewSommelierApp( ) app.IncentivesKeeper = incentiveskeeper.NewKeeper( - appCodec, keys[incentivestypes.StoreKey], app.GetSubspace(incentivestypes.ModuleName), app.DistrKeeper, app.BankKeeper, app.MintKeeper, - ) - - app.IncentivesKeeper = incentiveskeeper.NewKeeper( - appCodec, keys[incentivestypes.StoreKey], app.GetSubspace(incentivestypes.ModuleName), app.DistrKeeper, app.BankKeeper, app.MintKeeper, + appCodec, keys[incentivestypes.StoreKey], app.GetSubspace(incentivestypes.ModuleName), app.DistrKeeper, app.BankKeeper, app.MintKeeper, app.StakingKeeper, ) app.GravityKeeper = *app.GravityKeeper.SetHooks( @@ -1025,7 +1022,11 @@ func (app *SommelierApp) setupUpgradeStoreLoaders() { var storeUpgrades *storetypes.StoreUpgrades = nil - // TODO: Add v8 store loader when writing upgrade handler + if upgradeInfo.Name == v8.UpgradeName { + storeUpgrades = &storetypes.StoreUpgrades{ + Added: []string{addressestypes.ModuleName}, + } + } if storeUpgrades != nil { app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, storeUpgrades)) @@ -1033,5 +1034,12 @@ func (app *SommelierApp) setupUpgradeStoreLoaders() { } func (app *SommelierApp) setupUpgradeHandlers() { - // TODO: Add v8 upgrade handler + // TODO: Add v8 upgrade handle + app.UpgradeKeeper.SetUpgradeHandler( + v8.UpgradeName, + v8.CreateUpgradeHandler( + app.mm, + app.configurator, + ), + ) } diff --git a/app/app_test.go b/app/app_test.go index 66c3dd63f..a6e132440 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -19,7 +19,7 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - appparams "github.com/peggyjv/sommelier/v7/app/params" + appparams "github.com/peggyjv/sommelier/v8/app/params" "github.com/stretchr/testify/require" ) diff --git a/app/encoding.go b/app/encoding.go index 4aedb707c..ec4f4720f 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -2,7 +2,7 @@ package app import ( "github.com/cosmos/cosmos-sdk/std" - "github.com/peggyjv/sommelier/v7/app/params" + "github.com/peggyjv/sommelier/v8/app/params" ) // MakeEncodingConfig creates an EncodingConfig for testing. This function diff --git a/app/upgrades/v4/upgrades.go b/app/upgrades/v4/upgrades.go index 81d8cd376..e199ffbd6 100644 --- a/app/upgrades/v4/upgrades.go +++ b/app/upgrades/v4/upgrades.go @@ -8,9 +8,9 @@ import ( authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/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/v5/x/gravity/types" + cellarfeestypes "github.com/peggyjv/sommelier/v8/x/cellarfees/types" + corktypes "github.com/peggyjv/sommelier/v8/x/cork/types" ) func CreateUpgradeHandler( diff --git a/app/upgrades/v5/upgrades.go b/app/upgrades/v5/upgrades.go index 06c07b64c..3f87df741 100644 --- a/app/upgrades/v5/upgrades.go +++ b/app/upgrades/v5/upgrades.go @@ -6,9 +6,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" - appparams "github.com/peggyjv/sommelier/v7/app/params" - incentiveskeeper "github.com/peggyjv/sommelier/v7/x/incentives/keeper" - incentivestypes "github.com/peggyjv/sommelier/v7/x/incentives/types" + appparams "github.com/peggyjv/sommelier/v8/app/params" + incentiveskeeper "github.com/peggyjv/sommelier/v8/x/incentives/keeper" + incentivestypes "github.com/peggyjv/sommelier/v8/x/incentives/types" ) func CreateUpgradeHandler( diff --git a/app/upgrades/v7/upgrades.go b/app/upgrades/v7/upgrades.go index 2fe2f005f..a1b88e4e9 100644 --- a/app/upgrades/v7/upgrades.go +++ b/app/upgrades/v7/upgrades.go @@ -13,16 +13,16 @@ import ( 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" - 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/v2" - pubsubkeeper "github.com/peggyjv/sommelier/v7/x/pubsub/keeper" - pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" + auctionkeeper "github.com/peggyjv/sommelier/v8/x/auction/keeper" + auctiontypes "github.com/peggyjv/sommelier/v8/x/auction/types" + axelarcorkkeeper "github.com/peggyjv/sommelier/v8/x/axelarcork/keeper" + axelarcorktypes "github.com/peggyjv/sommelier/v8/x/axelarcork/types" + cellarfeeskeeper "github.com/peggyjv/sommelier/v8/x/cellarfees/keeper" + cellarfeestypes "github.com/peggyjv/sommelier/v8/x/cellarfees/types" + corkkeeper "github.com/peggyjv/sommelier/v8/x/cork/keeper" + corktypes "github.com/peggyjv/sommelier/v8/x/cork/types/v2" + pubsubkeeper "github.com/peggyjv/sommelier/v8/x/pubsub/keeper" + pubsubtypes "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) func CreateUpgradeHandler( diff --git a/app/upgrades/v8/README.md b/app/upgrades/v8/README.md new file mode 100644 index 000000000..87fb93c57 --- /dev/null +++ b/app/upgrades/v8/README.md @@ -0,0 +1,12 @@ +# v8 upgrade + +This upgrade moves Sommelier to major version 8. + +## Summary of changes + +* Add the addresses module for mapping cosmos/evm addresses +* Update the cellarfees module to start fee auctions based on the accrued USD value of a particular denom +* Update the auction module to allow a portion of SOMM proceeds earned by auctions to be burned +* Upgrade the gravity module to v5 +* Update the incentives module to support validator-specific rewards subsidized by the community pool +* Adds additional events to x/cork and x/axelarcork to allow tooling to more easily track the status of corks diff --git a/app/upgrades/v8/constants.go b/app/upgrades/v8/constants.go new file mode 100644 index 000000000..990912f02 --- /dev/null +++ b/app/upgrades/v8/constants.go @@ -0,0 +1,5 @@ +package v8 + +const ( + UpgradeName = "v8" +) diff --git a/app/upgrades/v8/upgrades.go b/app/upgrades/v8/upgrades.go new file mode 100644 index 000000000..b4ca0f7de --- /dev/null +++ b/app/upgrades/v8/upgrades.go @@ -0,0 +1,18 @@ +package v8 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" +) + +func CreateUpgradeHandler( + mm *module.Manager, + configurator module.Configurator, +) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { + ctx.Logger().Info("v8 upgrade: entering handler and running migrations") + + return mm.RunMigrations(ctx, configurator, vm) + } +} diff --git a/cmd/sommelier/cmd/root.go b/cmd/sommelier/cmd/root.go index d670a94ad..ee5dd8969 100644 --- a/cmd/sommelier/cmd/root.go +++ b/cmd/sommelier/cmd/root.go @@ -27,9 +27,9 @@ import ( "github.com/spf13/cast" "github.com/spf13/cobra" - bridgecmd "github.com/peggyjv/gravity-bridge/module/v4/cmd/gravity/cmd" - "github.com/peggyjv/sommelier/v7/app" - "github.com/peggyjv/sommelier/v7/app/params" + bridgecmd "github.com/peggyjv/gravity-bridge/module/v5/cmd/gravity/cmd" + "github.com/peggyjv/sommelier/v8/app" + "github.com/peggyjv/sommelier/v8/app/params" ) // NewRootCmd creates a new root command for simd. It is called once in the diff --git a/cmd/sommelier/main.go b/cmd/sommelier/main.go index 529ac90e6..0ed67995b 100644 --- a/cmd/sommelier/main.go +++ b/cmd/sommelier/main.go @@ -5,8 +5,8 @@ import ( "github.com/cosmos/cosmos-sdk/server" scmd "github.com/cosmos/cosmos-sdk/server/cmd" - "github.com/peggyjv/sommelier/v7/app" - "github.com/peggyjv/sommelier/v7/cmd/sommelier/cmd" + "github.com/peggyjv/sommelier/v8/app" + "github.com/peggyjv/sommelier/v8/cmd/sommelier/cmd" ) func main() { diff --git a/go.mod b/go.mod index 74b49009d..a3f7faaf4 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/peggyjv/sommelier/v7 +module github.com/peggyjv/sommelier/v8 go 1.22 @@ -11,9 +11,9 @@ require ( github.com/cometbft/cometbft v0.37.5 github.com/cometbft/cometbft-db v0.11.0 github.com/cosmos/cosmos-proto v1.0.0-beta.5 - github.com/cosmos/cosmos-sdk v0.47.13 + github.com/cosmos/cosmos-sdk v0.47.14 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/gogoproto v1.4.10 + github.com/cosmos/gogoproto v1.7.0 github.com/cosmos/ibc-go/v7 v7.8.0 github.com/ethereum/go-ethereum v1.10.22 github.com/gogo/protobuf v1.3.2 @@ -23,7 +23,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.2-0.20240507144821-c36490e18116 + github.com/peggyjv/gravity-bridge/module/v5 v5.0.0-20241023135054-397d3b1298c8 github.com/rakyll/statik v0.1.7 github.com/regen-network/cosmos-proto v0.3.1 github.com/spf13/cast v1.6.0 @@ -43,7 +43,7 @@ require ( cloud.google.com/go/storage v1.36.0 // 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/log v1.4.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 @@ -173,7 +173,7 @@ require ( github.com/rjeczalik/notify v0.9.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/rs/zerolog v1.33.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 @@ -209,7 +209,7 @@ require ( golang.org/x/net v0.23.0 // indirect golang.org/x/oauth2 v0.16.0 // indirect golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.18.0 // indirect + golang.org/x/sys v0.22.0 // indirect golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect diff --git a/go.sum b/go.sum index 5911a923a..ee2014482 100644 --- a/go.sum +++ b/go.sum @@ -529,8 +529,8 @@ cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98ok 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/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= 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= @@ -749,8 +749,8 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= -github.com/cosmos/cosmos-sdk v0.47.13 h1:9d57rl2ilSgc8a6u1JAulqNX/E5w8lbqbRe3NON3Jb4= -github.com/cosmos/cosmos-sdk v0.47.13/go.mod h1:pYMzhTfKFn9AJB5X64Epwe9NgYk0y3v7XN8Ks5xqWoo= +github.com/cosmos/cosmos-sdk v0.47.14 h1:vD9JyIdlbVaXMOE/BLamViQvylfUq0E0FpqdPVv/fWw= +github.com/cosmos/cosmos-sdk v0.47.14/go.mod h1:GrDj/zd9Tiuy8ZpG9PbUbhghCVU7lwyH0GS7CpxHpyM= 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= @@ -1412,8 +1412,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.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/peggyjv/gravity-bridge/module/v5 v5.0.0-20241023135054-397d3b1298c8 h1:jj4hxYu473+F19IQU1L11lyLOgqnUKMSNJX2kKtWdbk= +github.com/peggyjv/gravity-bridge/module/v5 v5.0.0-20241023135054-397d3b1298c8/go.mod h1:/vcYmGnfzHn2d7Ptxq1PLLC3gpuMJz46r2tZXFSCC6k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= 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= @@ -1505,8 +1505,8 @@ github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= 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/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.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= @@ -2003,8 +2003,8 @@ 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/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.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.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= diff --git a/integration_tests/addresses_test.go b/integration_tests/addresses_test.go index e6688590c..b19faeae4 100644 --- a/integration_tests/addresses_test.go +++ b/integration_tests/addresses_test.go @@ -5,7 +5,7 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/peggyjv/sommelier/v7/x/addresses/types" + "github.com/peggyjv/sommelier/v8/x/addresses/types" ) func (s *IntegrationTestSuite) TestAddresses() { diff --git a/integration_tests/auction_test.go b/integration_tests/auction_test.go index 6e15a4218..525716d49 100644 --- a/integration_tests/auction_test.go +++ b/integration_tests/auction_test.go @@ -8,8 +8,8 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/peggyjv/sommelier/v7/x/auction/types" - cellarfees "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + "github.com/peggyjv/sommelier/v8/x/auction/types" + cellarfees "github.com/peggyjv/sommelier/v8/x/cellarfees/types" ) func (s *IntegrationTestSuite) TestAuction() { diff --git a/integration_tests/axelarcork_test.go b/integration_tests/axelarcork_test.go index 7f3c994c5..6afa094e7 100644 --- a/integration_tests/axelarcork_test.go +++ b/integration_tests/axelarcork_test.go @@ -16,8 +16,8 @@ import ( govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "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" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" + pubsubtypes "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) func (s *IntegrationTestSuite) TestAxelarCork() { diff --git a/integration_tests/cellarfees_test.go b/integration_tests/cellarfees_test.go index 042e7c47d..b014f696b 100644 --- a/integration_tests/cellarfees_test.go +++ b/integration_tests/cellarfees_test.go @@ -11,9 +11,9 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" 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" - cellarfeestypesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" + auctiontypes "github.com/peggyjv/sommelier/v8/x/auction/types" + cellarfeestypes "github.com/peggyjv/sommelier/v8/x/cellarfees/types" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2" ) func (s *IntegrationTestSuite) TestCellarFees() { diff --git a/integration_tests/chain.go b/integration_tests/chain.go index 0b30848b0..6d0095b59 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/v2" + corktypes "github.com/peggyjv/sommelier/v8/x/cork/types/v2" tmrand "github.com/cometbft/cometbft/libs/rand" rpchttp "github.com/cometbft/cometbft/rpc/client/http" @@ -42,10 +42,10 @@ import ( 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" + gravityclient "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/client" + gravitytypes "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/types" + "github.com/peggyjv/sommelier/v8/app" + "github.com/peggyjv/sommelier/v8/app/params" ) const ( diff --git a/integration_tests/ethereum.go b/integration_tests/ethereum.go index 38cd72838..d59b734c3 100644 --- a/integration_tests/ethereum.go +++ b/integration_tests/ethereum.go @@ -16,7 +16,7 @@ import ( ethereumtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" - gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" + gravitytypes "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/types" ) type EthereumConfig struct { diff --git a/integration_tests/genesis.go b/integration_tests/genesis.go index 421ecbcf8..2360ee631 100644 --- a/integration_tests/genesis.go +++ b/integration_tests/genesis.go @@ -12,6 +12,8 @@ import ( 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" + "github.com/peggyjv/sommelier/v8/app/params" + incentivestypes "github.com/peggyjv/sommelier/v8/x/incentives/types" ) func getGenDoc(path string) (*tmtypes.GenesisDoc, error) { @@ -108,3 +110,17 @@ func addGenesisAccount(path, moniker, amountStr string, accAddr sdk.AccAddress) genDoc.AppState = appStateJSON return genutil.ExportGenesisFile(genDoc, genFile) } + +func (s *IntegrationTestSuite) setIncentivesGenState(appGenState map[string]json.RawMessage) error { + incentivesGenState := incentivestypes.DefaultGenesisState() + err := cdc.UnmarshalJSON(appGenState[incentivestypes.ModuleName], &incentivesGenState) + if err != nil { + return fmt.Errorf("failed to unmarshal incentives genesis state: %w", err) + } + + incentivesGenState.Params.ValidatorIncentivesCutoffHeight = 0 + incentivesGenState.Params.ValidatorMaxDistributionPerBlock = sdk.NewCoin(params.BaseCoinUnit, sdk.NewInt(0)) + + appGenState[incentivestypes.ModuleName] = cdc.MustMarshalJSON(&incentivesGenState) + return nil +} diff --git a/integration_tests/incentives_test.go b/integration_tests/incentives_test.go index e15c84725..95e2129b7 100644 --- a/integration_tests/incentives_test.go +++ b/integration_tests/incentives_test.go @@ -13,8 +13,8 @@ import ( minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" paramsproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/peggyjv/sommelier/v7/app/params" - incentivestypes "github.com/peggyjv/sommelier/v7/x/incentives/types" + "github.com/peggyjv/sommelier/v8/app/params" + incentivestypes "github.com/peggyjv/sommelier/v8/x/incentives/types" ) func (s *IntegrationTestSuite) TestIncentives() { @@ -241,3 +241,249 @@ func (s *IntegrationTestSuite) getRewardAmountAndHeight(ctx context.Context, dis return amount, height } + +func (s *IntegrationTestSuite) TestValidatorIncentives() { + validator := s.chain.validators[0] + proposer := s.chain.proposer + proposerCtx, err := s.chain.clientContext("tcp://localhost:26657", proposer.keyring, "proposer", proposer.address()) + s.Require().NoError(err) + orch := s.chain.orchestrators[0] + orchClientCtx, err := s.chain.clientContext("tcp://localhost:26657", orch.keyring, "orch", orch.address()) + s.Require().NoError(err) + ctx := context.Background() + + s.T().Log("Getting the initial community pool balance") + queryClient := disttypes.NewQueryClient(proposerCtx) + queryRes, err := queryClient.CommunityPool(ctx, &disttypes.QueryCommunityPoolRequest{}) + s.Require().NoError(err) + s.T().Logf("Initial community pool balance: %s", queryRes.Pool.String()) + initialCommunityPool := queryRes.Pool + + // Wait for outstanding rewards to equal 4000000usomm. Current theory is these initial rewards come from + // the genesis delegation tx fees. + s.T().Log("Waiting for outstanding rewards to equal 4000000usomm") + initialRewards := disttypes.ValidatorOutstandingRewards{ + Rewards: sdk.DecCoins{ + sdk.DecCoin{ + Denom: params.BaseCoinUnit, + Amount: sdk.NewDec(4000000), + }, + }, + } + s.Require().Eventually(func() bool { + rewards, err := s.getValidatorOutstandingRewards(validator) + s.Require().NoError(err) + return rewards.Rewards.AmountOf(params.BaseCoinUnit).Equal(initialRewards.Rewards.AmountOf(params.BaseCoinUnit)) + }, time.Second*30, time.Second*1, "outstanding rewards did not reach 4000000usomm") + + // Submit proposal to enable validator incentives + s.T().Log("Submitting proposal to enable validator incentives") + cutoffHeight := 100 + proposal := paramsproposal.ParameterChangeProposal{ + Title: "Enable validator incentives", + Description: "Enable validator incentives", + Changes: []paramsproposal.ParamChange{ + { + Subspace: "incentives", + Key: "ValidatorIncentivesCutoffHeight", + Value: fmt.Sprintf("\"%d\"", cutoffHeight), + }, + { + Subspace: "incentives", + Key: "ValidatorMaxDistributionPerBlock", + Value: fmt.Sprintf("{\"denom\":\"%s\",\"amount\":\"%d\"}", params.BaseCoinUnit, 1000000), + }, + }, + } + + proposalMsg, err := govtypesv1beta1.NewMsgSubmitProposal( + &proposal, + sdk.Coins{ + { + Denom: testDenom, + Amount: stakeAmount.Quo(sdk.NewInt(2)), + }, + }, + proposer.address(), + ) + s.Require().NoError(err) + submitProposalResponse, err := s.chain.sendMsgs(*proposerCtx, proposalMsg) + s.Require().NoError(err) + s.Require().Zero(submitProposalResponse.Code, "raw log: %s", submitProposalResponse.RawLog) + + s.T().Log("Checking proposal was submitted correctly") + govQueryClient := govtypesv1beta1.NewQueryClient(orchClientCtx) + s.Require().Eventually(func() bool { + proposalsQueryResponse, err := govQueryClient.Proposals(context.Background(), &govtypesv1beta1.QueryProposalsRequest{}) + if err != nil { + s.T().Logf("error querying proposals: %e", err) + return false + } + + 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") + + return true + }, time.Second*30, time.Second*5, "proposal submission was never found") + + s.T().Log("Vote for proposal") + for _, val := range s.chain.validators { + kr, err := val.keyring() + s.Require().NoError(err) + localClientCtx, err := s.chain.clientContext("tcp://localhost:26657", &kr, "val", val.address()) + s.Require().NoError(err) + + voteMsg := govtypesv1beta1.NewMsgVote(val.address(), 1, govtypesv1beta1.OptionYes) + voteResponse, err := s.chain.sendMsgs(*localClientCtx, voteMsg) + s.Require().NoError(err) + s.Require().Zero(voteResponse.Code, "Vote error: %s", voteResponse.RawLog) + } + + // Wait for proposal to be approved + s.T().Log("Waiting for proposal to be approved") + s.Require().Eventually(func() bool { + proposalQueryResponse, _ := govQueryClient.Proposal(context.Background(), &govtypesv1beta1.QueryProposalRequest{ProposalId: 1}) + return govtypesv1beta1.StatusPassed == proposalQueryResponse.Proposal.Status + }, time.Second*30, time.Second*5, "proposal was never accepted") + s.T().Log("proposal approved!") + + // Wait for a few blocks to pass to allow the validator rewards to increase + s.T().Log("Waiting for a few blocks to pass") + s.waitForBlocks(10) + + // Get the updated outstanding rewards for the validator + s.T().Log("Getting updated validator rewards") + currentRewards2, err := s.getValidatorOutstandingRewards(validator) + s.Require().NoError(err) + + // Check if the validator's outstanding rewards have increased + s.T().Logf("Initial rewards: %s, updated rewards: %s", initialRewards.Rewards, currentRewards2.Rewards) + s.Require().True(currentRewards2.Rewards.AmountOf(params.BaseCoinUnit).GT(initialRewards.Rewards.AmountOf(params.BaseCoinUnit)), + "Expected validator rewards to increase, got initial: %s, updated: %s", initialRewards.Rewards, currentRewards2.Rewards) + + s.T().Logf("Validator rewards increased from %s to %s", initialRewards.Rewards, currentRewards2.Rewards) + + s.T().Logf("Waiting to see validator rewards cut off at height %d", cutoffHeight) + s.waitUntilHeight(int64(cutoffHeight)) + + s.T().Log("Getting current validator rewards") + currentRewards, err := s.getValidatorOutstandingRewards(validator) + s.Require().NoError(err) + + s.T().Logf("Current rewards: %s", currentRewards.Rewards) + + s.T().Log("Waiting for a few blocks to pass") + s.waitForBlocks(10) + + s.T().Log("Getting updated validator rewards") + currentRewards2, err = s.getValidatorOutstandingRewards(validator) + s.Require().NoError(err) + + s.T().Logf("Current rewards: %s", currentRewards2.Rewards) + s.Require().Equal(currentRewards.Rewards, currentRewards2.Rewards, "Expected validator rewards to remain constant after cutoff height") + s.T().Log("Validator rewards ended!") + + s.T().Log("Getting sum of all validator rewards") + totalRewards := sdk.DecCoins{} + for _, val := range s.chain.validators { + rewards, err := s.getValidatorOutstandingRewards(val) + s.Require().NoError(err) + totalRewards = totalRewards.Add(rewards.Rewards...) + } + s.T().Logf("Total rewards: %s", totalRewards) + + s.T().Log("Getting community pool balance") + queryRes, err = queryClient.CommunityPool(ctx, &disttypes.QueryCommunityPoolRequest{}) + s.Require().NoError(err) + s.T().Logf("Community pool balance: %s", queryRes.Pool.String()) + + // Subtract the initial rewards and the tx fees from the total rewards to get the incentive rewards + s.T().Log("Total incentive rewards is current rewards minus initial rewards minus tx fees from the proposal submission and votes") + totalIncentiveRewards := totalRewards.Sub(initialRewards.Rewards.MulDec(sdk.NewDec(4))).Sub(sdk.DecCoins{ + { + Denom: testDenom, + Amount: sdk.NewDec(246913560), + }, + }.MulDec(sdk.NewDec(5))) + s.T().Logf("Total incentive rewards: %s", totalIncentiveRewards) + + s.T().Log("Checking that the total incentive rewards are equal to the community pool balance") + s.T().Logf("Initial community pool: %s, updated community pool: %s", initialCommunityPool, queryRes.Pool) + s.Require().Equal(totalIncentiveRewards, initialCommunityPool.Sub(queryRes.Pool), "Expected sum of all validator rewards to be equal to the change in community pool balance") +} + +func (s *IntegrationTestSuite) getValidatorOutstandingRewards(val *validator) (disttypes.ValidatorOutstandingRewards, error) { + ctx := context.Background() + kb, err := val.keyring() + s.Require().NoError(err) + clientCtx, err := s.chain.clientContext("tcp://localhost:26657", &kb, "val", val.address()) + s.Require().NoError(err) + queryClient := disttypes.NewQueryClient(clientCtx) + resp, err := queryClient.ValidatorOutstandingRewards( + ctx, + &disttypes.QueryValidatorOutstandingRewardsRequest{ + ValidatorAddress: val.validatorAddress().String(), + }, + ) + if err != nil { + return disttypes.ValidatorOutstandingRewards{}, err + } + return resp.Rewards, nil +} + +func (s *IntegrationTestSuite) waitForBlocks(numBlocks int64) error { + validator := s.chain.validators[0] + kb, err := validator.keyring() + s.Require().NoError(err) + clientCtx, err := s.chain.clientContext("tcp://localhost:26657", &kb, "val", validator.address()) + s.Require().NoError(err) + + initialHeight, err := s.getCurrentHeight(clientCtx) + s.Require().NoError(err) + targetHeight := initialHeight + numBlocks + + for { + height, err := s.getCurrentHeight(clientCtx) + if err != nil { + return err + } + + if height >= targetHeight { + break + } + + time.Sleep(time.Second) + } + + return nil +} + +func (s *IntegrationTestSuite) waitUntilHeight(height int64) error { + validator := s.chain.validators[0] + kb, err := validator.keyring() + s.Require().NoError(err) + clientCtx, err := s.chain.clientContext("tcp://localhost:26657", &kb, "val", validator.address()) + s.Require().NoError(err) + + errorsTotal := 0 + for { + if errorsTotal > 5 { + return fmt.Errorf("failed to get to height %d: too many errors", height) + } + + currentHeight, err := s.getCurrentHeight(clientCtx) + if err != nil { + errorsTotal++ + continue + } + + if currentHeight >= height { + break + } + + time.Sleep(time.Second * 3) + } + + return nil +} diff --git a/integration_tests/pubsub_test.go b/integration_tests/pubsub_test.go index 7188611c1..4be0d0a67 100644 --- a/integration_tests/pubsub_test.go +++ b/integration_tests/pubsub_test.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/peggyjv/sommelier/v7/x/pubsub/types" + "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) func (s *IntegrationTestSuite) TestPubsub() { diff --git a/integration_tests/scheduled_cork_test.go b/integration_tests/scheduled_cork_test.go index 6497fb416..f7b592f0e 100644 --- a/integration_tests/scheduled_cork_test.go +++ b/integration_tests/scheduled_cork_test.go @@ -15,9 +15,9 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" - gbtypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" - types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" - pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" + gbtypes "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/types" + types "github.com/peggyjv/sommelier/v8/x/cork/types/v2" + pubsubtypes "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) func (s *IntegrationTestSuite) TestScheduledCork() { diff --git a/integration_tests/setup_test.go b/integration_tests/setup_test.go index 20aa3243c..7bb74b488 100644 --- a/integration_tests/setup_test.go +++ b/integration_tests/setup_test.go @@ -16,16 +16,16 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" - "github.com/peggyjv/sommelier/v7/app/params" - addressestypes "github.com/peggyjv/sommelier/v7/x/addresses/types" - 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" + gravitytypes "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/types" + "github.com/peggyjv/sommelier/v8/app/params" + addressestypes "github.com/peggyjv/sommelier/v8/x/addresses/types" + auctiontypes "github.com/peggyjv/sommelier/v8/x/auction/types" + axelarcorktypes "github.com/peggyjv/sommelier/v8/x/axelarcork/types" + cellarfeestypes "github.com/peggyjv/sommelier/v8/x/cellarfees/types" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2" + corktypesunversioned "github.com/peggyjv/sommelier/v8/x/cork/types" + corktypes "github.com/peggyjv/sommelier/v8/x/cork/types/v2" + pubsubtypes "github.com/peggyjv/sommelier/v8/x/pubsub/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" @@ -534,11 +534,8 @@ func (s *IntegrationTestSuite) initGenesis() { s.Require().NoError(err) appGenState[gravitytypes.ModuleName] = bz - // incentivesGenState := incentivestypes.DefaultGenesisState() - // s.Require().NoError(cdc.UnmarshalJSON(appGenState[gravitytypes.ModuleName], &gravityGenState)) - // bz, err = cdc.MarshalJSON(&incentivesGenState) - // s.Require().NoError(err) - // appGenState[incentivestypes.ModuleName] = bz + // set incentives gen state + s.Require().NoError(s.setIncentivesGenState(appGenState)) // serialize genesis state bz, err = json.MarshalIndent(appGenState, "", " ") diff --git a/integration_tests/validator.go b/integration_tests/validator.go index 1aa613292..e541a23e2 100644 --- a/integration_tests/validator.go +++ b/integration_tests/validator.go @@ -26,8 +26,8 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" - gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" - "github.com/peggyjv/sommelier/v7/app" + gravitytypes "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/types" + "github.com/peggyjv/sommelier/v8/app" ) type validator struct { diff --git a/proto/addresses/v1/addresses.proto b/proto/addresses/v1/addresses.proto index d5c0dce41..a7e1ea20f 100644 --- a/proto/addresses/v1/addresses.proto +++ b/proto/addresses/v1/addresses.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package addresses.v1; -option go_package = "github.com/peggyjv/sommelier/v7/x/addresses/types"; +option go_package = "github.com/peggyjv/sommelier/v8/x/addresses/types"; message AddressMapping { string cosmos_address = 1; diff --git a/proto/addresses/v1/genesis.proto b/proto/addresses/v1/genesis.proto index 429874f5f..95b7ab00d 100644 --- a/proto/addresses/v1/genesis.proto +++ b/proto/addresses/v1/genesis.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package addresses.v1; -option go_package = "github.com/peggyjv/sommelier/v7/x/addresses/types"; +option go_package = "github.com/peggyjv/sommelier/v8/x/addresses/types"; import "addresses/v1/addresses.proto"; import "gogoproto/gogo.proto"; diff --git a/proto/addresses/v1/query.proto b/proto/addresses/v1/query.proto index f85fe6179..de3b10514 100644 --- a/proto/addresses/v1/query.proto +++ b/proto/addresses/v1/query.proto @@ -9,7 +9,7 @@ import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "cosmos/query/v1/query.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/addresses/types"; +option go_package = "github.com/peggyjv/sommelier/v8/x/addresses/types"; service Query { rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { diff --git a/proto/addresses/v1/tx.proto b/proto/addresses/v1/tx.proto index fe5c9733f..d095c1f5f 100644 --- a/proto/addresses/v1/tx.proto +++ b/proto/addresses/v1/tx.proto @@ -3,7 +3,7 @@ package addresses.v1; import "cosmos/msg/v1/msg.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/addresses/types"; +option go_package = "github.com/peggyjv/sommelier/v8/x/addresses/types"; service Msg { option (cosmos.msg.v1.service) = true; diff --git a/proto/auction/v1/auction.proto b/proto/auction/v1/auction.proto index e44a516da..2da24dd67 100644 --- a/proto/auction/v1/auction.proto +++ b/proto/auction/v1/auction.proto @@ -5,7 +5,7 @@ import "cosmos/base/v1beta1/coin.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/auction/types"; +option go_package = "github.com/peggyjv/sommelier/v8/x/auction/types"; message Auction { uint32 id = 1; diff --git a/proto/auction/v1/genesis.proto b/proto/auction/v1/genesis.proto index 689d85ab3..aa0193d1a 100644 --- a/proto/auction/v1/genesis.proto +++ b/proto/auction/v1/genesis.proto @@ -5,7 +5,7 @@ import "auction/v1/tx.proto"; import "auction/v1/auction.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/auction/types"; +option go_package = "github.com/peggyjv/sommelier/v8/x/auction/types"; message GenesisState { Params params = 1 [ (gogoproto.nullable) = false ]; diff --git a/proto/auction/v1/proposal.proto b/proto/auction/v1/proposal.proto index 4b7d4b97e..a9d568f8f 100644 --- a/proto/auction/v1/proposal.proto +++ b/proto/auction/v1/proposal.proto @@ -5,7 +5,7 @@ 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"; +option go_package = "github.com/peggyjv/sommelier/v8/x/auction/types"; message SetTokenPricesProposal { string title = 1; diff --git a/proto/auction/v1/query.proto b/proto/auction/v1/query.proto index 9e8441c92..6f2c466db 100644 --- a/proto/auction/v1/query.proto +++ b/proto/auction/v1/query.proto @@ -9,7 +9,7 @@ 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"; +option go_package = "github.com/peggyjv/sommelier/v8/x/auction/types"; service Query { rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { diff --git a/proto/auction/v1/tx.proto b/proto/auction/v1/tx.proto index 18acb8783..637d8df35 100644 --- a/proto/auction/v1/tx.proto +++ b/proto/auction/v1/tx.proto @@ -7,7 +7,7 @@ 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"; +option go_package = "github.com/peggyjv/sommelier/v8/x/auction/types"; service Msg { option (cosmos.msg.v1.service) = true; diff --git a/proto/axelarcork/v1/axelarcork.proto b/proto/axelarcork/v1/axelarcork.proto index 25892bf71..32f89b85f 100644 --- a/proto/axelarcork/v1/axelarcork.proto +++ b/proto/axelarcork/v1/axelarcork.proto @@ -4,7 +4,7 @@ package axelarcork.v1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/axelarcork/types"; +option go_package = "github.com/peggyjv/sommelier/v8/x/axelarcork/types"; message AxelarCork { // call body containing the ABI encoded bytes to send to the contract @@ -76,7 +76,7 @@ message AxelarUpgradeData { } // Represents a cork that has received enough votes to be executed -message WinningAxelarCork { +message WinningAxelarCork { AxelarCork cork = 1; uint64 block_height = 2; } diff --git a/proto/axelarcork/v1/event.proto b/proto/axelarcork/v1/event.proto index 85e716a5f..33d2e2153 100644 --- a/proto/axelarcork/v1/event.proto +++ b/proto/axelarcork/v1/event.proto @@ -3,7 +3,7 @@ package axelarcork.v1; import "gogoproto/gogo.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/axelarcork/types"; +option go_package = "github.com/peggyjv/sommelier/v8/x/axelarcork/types"; message ScheduleCorkEvent { string signer = 1; diff --git a/proto/axelarcork/v1/genesis.proto b/proto/axelarcork/v1/genesis.proto index c10a3ef33..acbf103e0 100644 --- a/proto/axelarcork/v1/genesis.proto +++ b/proto/axelarcork/v1/genesis.proto @@ -4,7 +4,7 @@ package axelarcork.v1; import "axelarcork/v1/axelarcork.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/axelarcork/types"; +option go_package = "github.com/peggyjv/sommelier/v8/x/axelarcork/types"; // GenesisState - all cork state that must be provided at genesis message GenesisState { diff --git a/proto/axelarcork/v1/proposal.proto b/proto/axelarcork/v1/proposal.proto index b131e5b4d..15194570d 100644 --- a/proto/axelarcork/v1/proposal.proto +++ b/proto/axelarcork/v1/proposal.proto @@ -5,7 +5,7 @@ import "axelarcork/v1/axelarcork.proto"; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/axelarcork/types"; +option go_package = "github.com/peggyjv/sommelier/v8/x/axelarcork/types"; message AddAxelarManagedCellarIDsProposal { string title = 1; diff --git a/proto/axelarcork/v1/query.proto b/proto/axelarcork/v1/query.proto index 94f20e6ed..08b9c5fe6 100644 --- a/proto/axelarcork/v1/query.proto +++ b/proto/axelarcork/v1/query.proto @@ -7,7 +7,7 @@ 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"; +option go_package = "github.com/peggyjv/sommelier/v8/x/axelarcork/types"; // Query defines the gRPC query service for the cork module. service Query { diff --git a/proto/axelarcork/v1/tx.proto b/proto/axelarcork/v1/tx.proto index f58674b90..45ad5b958 100644 --- a/proto/axelarcork/v1/tx.proto +++ b/proto/axelarcork/v1/tx.proto @@ -6,7 +6,7 @@ import "cosmos/msg/v1/msg.proto"; import "axelarcork/v1/axelarcork.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/axelarcork/types"; +option go_package = "github.com/peggyjv/sommelier/v8/x/axelarcork/types"; // MsgService defines the msgs that the cork module handles service Msg { diff --git a/proto/cellarfees/v1/cellarfees.proto b/proto/cellarfees/v1/cellarfees.proto index cacb50905..7d8df320a 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/v1"; +option go_package = "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v1"; message FeeAccrualCounter { string denom = 1; diff --git a/proto/cellarfees/v1/genesis.proto b/proto/cellarfees/v1/genesis.proto index bb09cbb3f..a0716911c 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/v1"; +option go_package = "github.com/peggyjv/sommelier/v8/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 56bb6e2ea..1ea5df80e 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/v1"; +option go_package = "github.com/peggyjv/sommelier/v8/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 ead312ce9..b7cca0d6a 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/v1"; +option go_package = "github.com/peggyjv/sommelier/v8/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 index 7f56b8702..448376860 100644 --- a/proto/cellarfees/v2/cellarfees.proto +++ b/proto/cellarfees/v2/cellarfees.proto @@ -4,7 +4,7 @@ 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"; +option go_package = "github.com/peggyjv/sommelier/v8/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. diff --git a/proto/cellarfees/v2/genesis.proto b/proto/cellarfees/v2/genesis.proto index 9e53c362f..91b8feaee 100644 --- a/proto/cellarfees/v2/genesis.proto +++ b/proto/cellarfees/v2/genesis.proto @@ -4,7 +4,7 @@ package cellarfees.v2; import "gogoproto/gogo.proto"; import "cellarfees/v2/params.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2"; +option go_package = "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2"; // GenesisState defines the cellarfees module's genesis state. message GenesisState { diff --git a/proto/cellarfees/v2/params.proto b/proto/cellarfees/v2/params.proto index 4d5f31fa9..25db77a48 100644 --- a/proto/cellarfees/v2/params.proto +++ b/proto/cellarfees/v2/params.proto @@ -3,7 +3,7 @@ package cellarfees.v2; import "gogoproto/gogo.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2"; +option go_package = "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2"; // Params defines the parameters for the module. message Params { diff --git a/proto/cellarfees/v2/query.proto b/proto/cellarfees/v2/query.proto index 07916ad0c..2c5ad5ad4 100644 --- a/proto/cellarfees/v2/query.proto +++ b/proto/cellarfees/v2/query.proto @@ -7,7 +7,7 @@ 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"; +option go_package = "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2"; service Query { rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { @@ -34,7 +34,7 @@ service Query { 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}"; @@ -69,7 +69,7 @@ message QueryAPYResponse { message QueryFeeTokenBalancesRequest {} message QueryFeeTokenBalancesResponse { - repeated FeeTokenBalance balances = 1; + repeated FeeTokenBalance balances = 1; } message QueryFeeTokenBalanceRequest { @@ -77,5 +77,5 @@ message QueryFeeTokenBalanceRequest { } message QueryFeeTokenBalanceResponse { - FeeTokenBalance balance = 1; + FeeTokenBalance balance = 1; } diff --git a/proto/cork/v2/cork.proto b/proto/cork/v2/cork.proto index 5f0d56658..463d969e0 100644 --- a/proto/cork/v2/cork.proto +++ b/proto/cork/v2/cork.proto @@ -3,7 +3,7 @@ package cork.v2; import "gogoproto/gogo.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/cork/types/v2"; +option go_package = "github.com/peggyjv/sommelier/v8/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 f0bd5af8a..8142de813 100644 --- a/proto/cork/v2/genesis.proto +++ b/proto/cork/v2/genesis.proto @@ -4,7 +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/v2"; +option go_package = "github.com/peggyjv/sommelier/v8/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 d67e31612..e88dc04e0 100644 --- a/proto/cork/v2/proposal.proto +++ b/proto/cork/v2/proposal.proto @@ -4,7 +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/v2"; +option go_package = "github.com/peggyjv/sommelier/v8/x/cork/types/v2"; message AddManagedCellarIDsProposal { string title = 1; diff --git a/proto/cork/v2/query.proto b/proto/cork/v2/query.proto index f9442fa3a..d33de20b4 100644 --- a/proto/cork/v2/query.proto +++ b/proto/cork/v2/query.proto @@ -7,7 +7,7 @@ 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"; +option go_package = "github.com/peggyjv/sommelier/v8/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 9f9e11f61..69ae7f8ea 100644 --- a/proto/cork/v2/tx.proto +++ b/proto/cork/v2/tx.proto @@ -5,7 +5,7 @@ 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"; +option go_package = "github.com/peggyjv/sommelier/v8/x/cork/types/v2"; // MsgService defines the msgs that the cork module handles service Msg { diff --git a/proto/incentives/v1/genesis.proto b/proto/incentives/v1/genesis.proto index 66a332344..70a2e504c 100644 --- a/proto/incentives/v1/genesis.proto +++ b/proto/incentives/v1/genesis.proto @@ -4,7 +4,7 @@ package incentives.v1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/incentives/types"; +option go_package = "github.com/peggyjv/sommelier/v8/x/incentives/types"; message GenesisState { Params params = 1 [ (gogoproto.nullable) = false ]; @@ -18,4 +18,12 @@ message Params { // IncentivesCutoffHeight defines the block height after which the incentives module will stop sending coins to the distribution module from // the community pool uint64 incentives_cutoff_height = 2; + // ValidatorMaxDistributionPerBlock defines the maximum coins to be sent directly to voters in the last block from the community pool every block. Leftover coins remain in the community pool. + cosmos.base.v1beta1.Coin validator_max_distribution_per_block = 3 [(gogoproto.nullable) = false]; + // ValidatorIncentivesCutoffHeight defines the block height after which the validator incentives will be stopped + uint64 validator_incentives_cutoff_height = 4; + // ValidatorIncentivesMaxFraction defines the maximum fraction of the validator distribution per block that can be sent to a single validator + string validator_incentives_max_fraction = 5 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + // ValidatorIncentivesSetSizeLimit defines the max number of validators to apportion the validator distribution per block to + uint64 validator_incentives_set_size_limit = 6; } diff --git a/proto/incentives/v1/query.proto b/proto/incentives/v1/query.proto index 04b80042b..ea2a87b64 100644 --- a/proto/incentives/v1/query.proto +++ b/proto/incentives/v1/query.proto @@ -6,7 +6,7 @@ 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"; +option go_package = "github.com/peggyjv/sommelier/v8/x/incentives/types"; // Query defines the gRPC query service for the cork module. service Query { diff --git a/proto/pubsub/v1/genesis.proto b/proto/pubsub/v1/genesis.proto index 41e4f4393..5c9b954c5 100644 --- a/proto/pubsub/v1/genesis.proto +++ b/proto/pubsub/v1/genesis.proto @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto"; import "pubsub/v1/params.proto"; import "pubsub/v1/pubsub.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/pubsub/types"; +option go_package = "github.com/peggyjv/sommelier/v8/x/pubsub/types"; // GenesisState defines the pubsub module's genesis state. message GenesisState { diff --git a/proto/pubsub/v1/params.proto b/proto/pubsub/v1/params.proto index 13aa57eec..305dd4d54 100644 --- a/proto/pubsub/v1/params.proto +++ b/proto/pubsub/v1/params.proto @@ -3,7 +3,7 @@ package pubsub.v1; import "gogoproto/gogo.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/pubsub/types"; +option go_package = "github.com/peggyjv/sommelier/v8/x/pubsub/types"; // Params defines the parameters for the module. message Params { diff --git a/proto/pubsub/v1/pubsub.proto b/proto/pubsub/v1/pubsub.proto index 0f5a71bc9..eb47c0aba 100644 --- a/proto/pubsub/v1/pubsub.proto +++ b/proto/pubsub/v1/pubsub.proto @@ -3,7 +3,7 @@ package pubsub.v1; import "gogoproto/gogo.proto"; -option go_package = "github.com/peggyjv/sommelier/v7/x/pubsub/types"; +option go_package = "github.com/peggyjv/sommelier/v8/x/pubsub/types"; // represents a publisher, which are added via governance message Publisher { diff --git a/proto/pubsub/v1/query.proto b/proto/pubsub/v1/query.proto index b63cb2ba3..bb8fdf35e 100644 --- a/proto/pubsub/v1/query.proto +++ b/proto/pubsub/v1/query.proto @@ -8,7 +8,7 @@ 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"; +option go_package = "github.com/peggyjv/sommelier/v8/x/pubsub/types"; service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { diff --git a/proto/pubsub/v1/tx.proto b/proto/pubsub/v1/tx.proto index a3f48d5fe..2ca532727 100644 --- a/proto/pubsub/v1/tx.proto +++ b/proto/pubsub/v1/tx.proto @@ -6,11 +6,11 @@ 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"; +option go_package = "github.com/peggyjv/sommelier/v8/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); diff --git a/x/addresses/client/cli/query.go b/x/addresses/client/cli/query.go index d2992d3fc..9d3e89aed 100644 --- a/x/addresses/client/cli/query.go +++ b/x/addresses/client/cli/query.go @@ -14,7 +14,7 @@ import ( // "github.com/cosmos/cosmos-sdk/client/flags" // sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/addresses/types" + "github.com/peggyjv/sommelier/v8/x/addresses/types" ) // GetQueryCmd returns the cli query commands for this module diff --git a/x/addresses/client/cli/tx.go b/x/addresses/client/cli/tx.go index 211a19b3d..f5c152307 100644 --- a/x/addresses/client/cli/tx.go +++ b/x/addresses/client/cli/tx.go @@ -13,7 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/version" // "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/peggyjv/sommelier/v7/x/addresses/types" + "github.com/peggyjv/sommelier/v8/x/addresses/types" ) // GetTxCmd returns the transaction commands for this module diff --git a/x/addresses/keeper/genesis.go b/x/addresses/keeper/genesis.go index 849ad6e33..9e32ca093 100644 --- a/x/addresses/keeper/genesis.go +++ b/x/addresses/keeper/genesis.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/peggyjv/sommelier/v7/x/addresses/types" + "github.com/peggyjv/sommelier/v8/x/addresses/types" ) // InitGenesis initializes the module's state from a provided genesis diff --git a/x/addresses/keeper/genesis_test.go b/x/addresses/keeper/genesis_test.go index 67ff6d902..e4e752b4f 100644 --- a/x/addresses/keeper/genesis_test.go +++ b/x/addresses/keeper/genesis_test.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/peggyjv/sommelier/v7/x/addresses/types" + "github.com/peggyjv/sommelier/v8/x/addresses/types" ) func (suite *KeeperTestSuite) TestImportExportGenesis() { diff --git a/x/addresses/keeper/keeper.go b/x/addresses/keeper/keeper.go index c798e086d..7969956ac 100644 --- a/x/addresses/keeper/keeper.go +++ b/x/addresses/keeper/keeper.go @@ -10,7 +10,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/peggyjv/sommelier/v7/x/addresses/types" + "github.com/peggyjv/sommelier/v8/x/addresses/types" ) type ( diff --git a/x/addresses/keeper/keeper_test.go b/x/addresses/keeper/keeper_test.go index 9a4b8f34d..001b6d7c2 100644 --- a/x/addresses/keeper/keeper_test.go +++ b/x/addresses/keeper/keeper_test.go @@ -12,8 +12,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - moduletestutil "github.com/peggyjv/sommelier/v7/testutil" - "github.com/peggyjv/sommelier/v7/x/addresses/types" + moduletestutil "github.com/peggyjv/sommelier/v8/testutil" + "github.com/peggyjv/sommelier/v8/x/addresses/types" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmtime "github.com/cometbft/cometbft/types/time" diff --git a/x/addresses/keeper/msg_server.go b/x/addresses/keeper/msg_server.go index 4007b0b1e..079c1a4fe 100644 --- a/x/addresses/keeper/msg_server.go +++ b/x/addresses/keeper/msg_server.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/peggyjv/sommelier/v7/x/addresses/types" + "github.com/peggyjv/sommelier/v8/x/addresses/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/x/addresses/keeper/msg_server_test.go b/x/addresses/keeper/msg_server_test.go index 9f363b369..4dff58722 100644 --- a/x/addresses/keeper/msg_server_test.go +++ b/x/addresses/keeper/msg_server_test.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/peggyjv/sommelier/v7/x/addresses/types" + "github.com/peggyjv/sommelier/v8/x/addresses/types" ) func (suite *KeeperTestSuite) TestHappyPathsForMsgServer() { diff --git a/x/addresses/keeper/query_server.go b/x/addresses/keeper/query_server.go index db931d1ef..fed2ae9fe 100644 --- a/x/addresses/keeper/query_server.go +++ b/x/addresses/keeper/query_server.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/bech32" "github.com/cosmos/cosmos-sdk/types/query" "github.com/ethereum/go-ethereum/common" - "github.com/peggyjv/sommelier/v7/x/addresses/types" + "github.com/peggyjv/sommelier/v8/x/addresses/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/x/addresses/keeper/query_server_test.go b/x/addresses/keeper/query_server_test.go index 2367c2b0f..59e208e8c 100644 --- a/x/addresses/keeper/query_server_test.go +++ b/x/addresses/keeper/query_server_test.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" "github.com/ethereum/go-ethereum/common" - "github.com/peggyjv/sommelier/v7/x/addresses/types" + "github.com/peggyjv/sommelier/v8/x/addresses/types" ) // Happy path test for query server functions diff --git a/x/addresses/module.go b/x/addresses/module.go index cc2edc9ab..c8f6a0da7 100644 --- a/x/addresses/module.go +++ b/x/addresses/module.go @@ -16,9 +16,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" sim "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/peggyjv/sommelier/v7/x/addresses/client/cli" - "github.com/peggyjv/sommelier/v7/x/addresses/keeper" - "github.com/peggyjv/sommelier/v7/x/addresses/types" + "github.com/peggyjv/sommelier/v8/x/addresses/client/cli" + "github.com/peggyjv/sommelier/v8/x/addresses/keeper" + "github.com/peggyjv/sommelier/v8/x/addresses/types" ) var ( diff --git a/x/addresses/types/addresses.pb.go b/x/addresses/types/addresses.pb.go index fa24cd7ab..49c903444 100644 --- a/x/addresses/types/addresses.pb.go +++ b/x/addresses/types/addresses.pb.go @@ -91,9 +91,9 @@ var fileDescriptor_f62edfd8f2ffb6f4 = []byte{ 0xc9, 0xfb, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x0c, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x0b, 0x52, 0xd3, 0xd3, 0x2b, 0xb3, 0xca, 0xf4, - 0x8b, 0xf3, 0x73, 0x73, 0x53, 0x73, 0x32, 0x53, 0x8b, 0xf4, 0xcb, 0xcc, 0xf5, 0x2b, 0x10, 0x8e, + 0x8b, 0xf3, 0x73, 0x73, 0x53, 0x73, 0x32, 0x53, 0x8b, 0xf4, 0xcb, 0x2c, 0xf4, 0x2b, 0x10, 0x8e, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0xbb, 0xdd, 0x18, 0x10, 0x00, 0x00, 0xff, - 0xff, 0x88, 0x59, 0xca, 0xf1, 0xdb, 0x00, 0x00, 0x00, + 0xff, 0x84, 0xc9, 0x9d, 0xe1, 0xdb, 0x00, 0x00, 0x00, } func (m *AddressMapping) Marshal() (dAtA []byte, err error) { diff --git a/x/addresses/types/genesis.pb.go b/x/addresses/types/genesis.pb.go index d4b76da4d..de0569d15 100644 --- a/x/addresses/types/genesis.pb.go +++ b/x/addresses/types/genesis.pb.go @@ -123,7 +123,7 @@ var fileDescriptor_b55f1bec9bbe9669 = []byte{ // 269 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0x31, 0x4b, 0xc3, 0x40, 0x1c, 0xc5, 0x73, 0x2a, 0x41, 0xd2, 0x82, 0x12, 0x3a, 0x94, 0x10, 0xce, 0xd2, 0xa9, 0x53, 0x8e, - 0xc4, 0xc1, 0x59, 0x97, 0x0e, 0x22, 0x48, 0xdd, 0x5c, 0xe4, 0x6a, 0xff, 0x9c, 0x27, 0x4d, 0xfe, + 0xc4, 0xc5, 0x55, 0x97, 0x0e, 0x22, 0x48, 0xdd, 0x5c, 0xe4, 0x6a, 0xff, 0x9c, 0x27, 0x4d, 0xfe, 0x47, 0xfe, 0x67, 0xb0, 0x9f, 0xc1, 0xc5, 0x8f, 0xd5, 0xb1, 0xa3, 0x93, 0x48, 0xf2, 0x45, 0xc4, 0xe4, 0xb0, 0xcd, 0xf6, 0xde, 0xbd, 0xdf, 0xe3, 0xdd, 0x5d, 0x10, 0xc9, 0xd5, 0xaa, 0x04, 0x22, 0x20, 0x51, 0xa5, 0x42, 0x41, 0x01, 0xa4, 0x29, 0x31, 0x25, 0x5a, 0x0c, 0x87, 0xff, 0x59, 0x52, @@ -137,7 +137,7 @@ var fileDescriptor_b55f1bec9bbe9669 = []byte{ 0xce, 0x3e, 0x1b, 0xee, 0xed, 0x1a, 0xee, 0x7d, 0x35, 0xdc, 0x7b, 0x4c, 0x95, 0xb6, 0x2f, 0x6f, 0xcb, 0xe4, 0x19, 0x73, 0x61, 0x40, 0xa9, 0xcd, 0x6b, 0x25, 0x08, 0xf3, 0x1c, 0xd6, 0x1a, 0x4a, 0x51, 0x5d, 0x89, 0xf7, 0xfd, 0xc7, 0x08, 0xbb, 0x31, 0x40, 0x4b, 0xbf, 0x7d, 0xeb, 0xe5, 0x6f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x37, 0x46, 0xa8, 0x48, 0x69, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x3b, 0xd6, 0xff, 0x58, 0x69, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/addresses/types/query.pb.go b/x/addresses/types/query.pb.go index 19a761cb2..ae7c091b2 100644 --- a/x/addresses/types/query.pb.go +++ b/x/addresses/types/query.pb.go @@ -427,7 +427,7 @@ var fileDescriptor_ebe10bad8a6f145d = []byte{ // 618 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x4f, 0x6b, 0x13, 0x41, 0x18, 0xc6, 0x33, 0xd1, 0x16, 0x7c, 0xe3, 0x3f, 0xc6, 0x1c, 0xc2, 0x36, 0x6c, 0xe2, 0x82, 0x6d, - 0x1a, 0x65, 0x87, 0x44, 0x4b, 0x45, 0x3c, 0x68, 0x8a, 0x14, 0xd1, 0x40, 0xcd, 0xc1, 0x83, 0x97, + 0x1a, 0x65, 0x87, 0x44, 0x8b, 0x45, 0x3c, 0x68, 0x8a, 0x14, 0xd1, 0x40, 0xcd, 0xc1, 0x83, 0x97, 0x32, 0x69, 0x87, 0x71, 0xb5, 0xbb, 0xb3, 0xc9, 0x6c, 0x16, 0x43, 0x29, 0x82, 0x27, 0x8f, 0x82, 0x5f, 0xc1, 0x0f, 0xe0, 0xc9, 0xcf, 0xd0, 0x63, 0xc1, 0x83, 0x9e, 0x44, 0x12, 0xd1, 0xbb, 0x9f, 0x40, 0xb2, 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 0x93, 0x57, 0x31, 0x4b, 0x6f, 0xe8, 0x32, 0xd9, 0x5d, 0x0c, 0x5e, 0x94, 0x9b, 0x7f, 0x02, 0x00, 0x00, - 0xff, 0xff, 0x2e, 0xfa, 0x78, 0x5a, 0x32, 0x07, 0x00, 0x00, + 0xff, 0xff, 0x22, 0x6a, 0x2f, 0x4a, 0x32, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/addresses/types/tx.pb.go b/x/addresses/types/tx.pb.go index a189e6aaf..591f5b78b 100644 --- a/x/addresses/types/tx.pb.go +++ b/x/addresses/types/tx.pb.go @@ -224,9 +224,9 @@ var fileDescriptor_dbc33d4b2b06ba95 = []byte{ 0x79, 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x61, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x41, 0x6a, 0x7a, 0x7a, 0x65, 0x56, 0x99, 0x7e, - 0x71, 0x7e, 0x6e, 0x6e, 0x6a, 0x4e, 0x66, 0x6a, 0x91, 0x7e, 0x99, 0xb9, 0x7e, 0x85, 0x3e, 0x22, + 0x71, 0x7e, 0x6e, 0x6e, 0x6a, 0x4e, 0x66, 0x6a, 0x91, 0x7e, 0x99, 0x85, 0x7e, 0x85, 0x3e, 0x22, 0xf1, 0x94, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x93, 0x85, 0x31, 0x20, 0x00, 0x00, 0xff, - 0xff, 0xc4, 0xe4, 0x89, 0xa0, 0x56, 0x02, 0x00, 0x00, + 0xff, 0xc8, 0x74, 0xde, 0xb0, 0x56, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/auction/client/cli/query.go b/x/auction/client/cli/query.go index a2a4f0fcc..1039e13aa 100644 --- a/x/auction/client/cli/query.go +++ b/x/auction/client/cli/query.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/peggyjv/sommelier/v7/x/auction/types" + "github.com/peggyjv/sommelier/v8/x/auction/types" "github.com/spf13/cobra" ) diff --git a/x/auction/client/cli/tx.go b/x/auction/client/cli/tx.go index f4890e1cc..7f2d1253f 100644 --- a/x/auction/client/cli/tx.go +++ b/x/auction/client/cli/tx.go @@ -13,7 +13,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - types "github.com/peggyjv/sommelier/v7/x/auction/types" + types "github.com/peggyjv/sommelier/v8/x/auction/types" "github.com/spf13/cobra" ) diff --git a/x/auction/client/cli/tx_test.go b/x/auction/client/cli/tx_test.go index 8a39b04f2..5df660870 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/peggyjv/sommelier/v7/x/auction/types" + "github.com/peggyjv/sommelier/v8/x/auction/types" "github.com/cosmos/cosmos-sdk/testutil" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" diff --git a/x/auction/client/proposal_handler.go b/x/auction/client/proposal_handler.go index 63c1dd960..48262a2ac 100644 --- a/x/auction/client/proposal_handler.go +++ b/x/auction/client/proposal_handler.go @@ -2,7 +2,7 @@ package client import ( govclient "github.com/cosmos/cosmos-sdk/x/gov/client" - "github.com/peggyjv/sommelier/v7/x/auction/client/cli" + "github.com/peggyjv/sommelier/v8/x/auction/client/cli" ) var ( diff --git a/x/auction/handler.go b/x/auction/handler.go index e64486a35..299585c55 100644 --- a/x/auction/handler.go +++ b/x/auction/handler.go @@ -7,8 +7,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/auction/keeper" - "github.com/peggyjv/sommelier/v7/x/auction/types" + "github.com/peggyjv/sommelier/v8/x/auction/keeper" + "github.com/peggyjv/sommelier/v8/x/auction/types" ) // NewHandler returns a handler for "auction" type messages. diff --git a/x/auction/keeper/abci.go b/x/auction/keeper/abci.go index 72b131807..50226cd38 100644 --- a/x/auction/keeper/abci.go +++ b/x/auction/keeper/abci.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/auction/types" + "github.com/peggyjv/sommelier/v8/x/auction/types" ) // BeginBlocker is called at the beginning of every block diff --git a/x/auction/keeper/abci_test.go b/x/auction/keeper/abci_test.go index cded4f12d..72f5c0806 100644 --- a/x/auction/keeper/abci_test.go +++ b/x/auction/keeper/abci_test.go @@ -3,8 +3,8 @@ 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" - auctionTypes "github.com/peggyjv/sommelier/v7/x/auction/types" + "github.com/peggyjv/sommelier/v8/app/params" + auctionTypes "github.com/peggyjv/sommelier/v8/x/auction/types" ) // Tests abci diff --git a/x/auction/keeper/genesis.go b/x/auction/keeper/genesis.go index 0dc713871..b34261d24 100644 --- a/x/auction/keeper/genesis.go +++ b/x/auction/keeper/genesis.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/auction/types" + "github.com/peggyjv/sommelier/v8/x/auction/types" ) // InitGenesis initializes the module's state from a provided genesis diff --git a/x/auction/keeper/genesis_test.go b/x/auction/keeper/genesis_test.go index 30ee99656..a5f8d83cd 100644 --- a/x/auction/keeper/genesis_test.go +++ b/x/auction/keeper/genesis_test.go @@ -3,8 +3,8 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/app/params" - auctionTypes "github.com/peggyjv/sommelier/v7/x/auction/types" + "github.com/peggyjv/sommelier/v8/app/params" + auctionTypes "github.com/peggyjv/sommelier/v8/x/auction/types" ) // Tests Importing of as empty a genesis as possible diff --git a/x/auction/keeper/keeper.go b/x/auction/keeper/keeper.go index 3b8f06929..346c44408 100644 --- a/x/auction/keeper/keeper.go +++ b/x/auction/keeper/keeper.go @@ -14,8 +14,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" 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/peggyjv/sommelier/v8/app/params" + "github.com/peggyjv/sommelier/v8/x/auction/types" ) // Keeper of the auction store diff --git a/x/auction/keeper/keeper_test.go b/x/auction/keeper/keeper_test.go index e8f561393..f1a559ac0 100644 --- a/x/auction/keeper/keeper_test.go +++ b/x/auction/keeper/keeper_test.go @@ -13,15 +13,15 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/app/params" - moduletestutil "github.com/peggyjv/sommelier/v7/testutil" - auctionTypes "github.com/peggyjv/sommelier/v7/x/auction/types" + "github.com/peggyjv/sommelier/v8/app/params" + moduletestutil "github.com/peggyjv/sommelier/v8/testutil" + auctionTypes "github.com/peggyjv/sommelier/v8/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" + auctiontestutil "github.com/peggyjv/sommelier/v8/x/auction/testutil" ) var ( diff --git a/x/auction/keeper/migrations.go b/x/auction/keeper/migrations.go new file mode 100644 index 000000000..a76c5d7cc --- /dev/null +++ b/x/auction/keeper/migrations.go @@ -0,0 +1,21 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + v1 "github.com/peggyjv/sommelier/v8/x/auction/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.MigrateParamStore(ctx, m.keeper.paramSpace) +} diff --git a/x/auction/keeper/msg_server.go b/x/auction/keeper/msg_server.go index 3853aba1d..885b09689 100644 --- a/x/auction/keeper/msg_server.go +++ b/x/auction/keeper/msg_server.go @@ -7,8 +7,8 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/app/params" - "github.com/peggyjv/sommelier/v7/x/auction/types" + "github.com/peggyjv/sommelier/v8/app/params" + "github.com/peggyjv/sommelier/v8/x/auction/types" ) var _ types.MsgServer = Keeper{} diff --git a/x/auction/keeper/msg_server_test.go b/x/auction/keeper/msg_server_test.go index 1c39b2029..998954f69 100644 --- a/x/auction/keeper/msg_server_test.go +++ b/x/auction/keeper/msg_server_test.go @@ -8,8 +8,8 @@ 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/v8/app/params" + auctionTypes "github.com/peggyjv/sommelier/v8/x/auction/types" ) type runsBeforeWrapper func() diff --git a/x/auction/keeper/proposal_handler.go b/x/auction/keeper/proposal_handler.go index 03dda6cda..423064142 100644 --- a/x/auction/keeper/proposal_handler.go +++ b/x/auction/keeper/proposal_handler.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/auction/types" + "github.com/peggyjv/sommelier/v8/x/auction/types" ) // HandleSetTokenPricesProposal is a handler for executing a passed community token price update proposal diff --git a/x/auction/keeper/proposal_handler_test.go b/x/auction/keeper/proposal_handler_test.go index 82a0580ef..40f070442 100644 --- a/x/auction/keeper/proposal_handler_test.go +++ b/x/auction/keeper/proposal_handler_test.go @@ -7,8 +7,8 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" govTypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/peggyjv/sommelier/v7/app/params" - auctionTypes "github.com/peggyjv/sommelier/v7/x/auction/types" + "github.com/peggyjv/sommelier/v8/app/params" + auctionTypes "github.com/peggyjv/sommelier/v8/x/auction/types" ) // Happy path test for proposal handler diff --git a/x/auction/keeper/query_server.go b/x/auction/keeper/query_server.go index 2d8d20e71..c3c98a6d7 100644 --- a/x/auction/keeper/query_server.go +++ b/x/auction/keeper/query_server.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" - "github.com/peggyjv/sommelier/v7/x/auction/types" + "github.com/peggyjv/sommelier/v8/x/auction/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/x/auction/keeper/query_server_test.go b/x/auction/keeper/query_server_test.go index 2700d15f9..7b0e18f2c 100644 --- a/x/auction/keeper/query_server_test.go +++ b/x/auction/keeper/query_server_test.go @@ -6,8 +6,8 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/peggyjv/sommelier/v7/app/params" - auctionTypes "github.com/peggyjv/sommelier/v7/x/auction/types" + "github.com/peggyjv/sommelier/v8/app/params" + auctionTypes "github.com/peggyjv/sommelier/v8/x/auction/types" ) // Happy path test for query server functions diff --git a/x/auction/keeper/sdk_module_mocks_test.go b/x/auction/keeper/sdk_module_mocks_test.go index b2710eeb0..74f73d1b9 100644 --- a/x/auction/keeper/sdk_module_mocks_test.go +++ b/x/auction/keeper/sdk_module_mocks_test.go @@ -4,7 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - auctionTypes "github.com/peggyjv/sommelier/v7/x/auction/types" + auctionTypes "github.com/peggyjv/sommelier/v8/x/auction/types" ) func (suite *KeeperTestSuite) mockGetModuleAccount(ctx sdk.Context) { diff --git a/x/auction/migrations/v1/store.go b/x/auction/migrations/v1/store.go new file mode 100644 index 000000000..617c57a4a --- /dev/null +++ b/x/auction/migrations/v1/store.go @@ -0,0 +1,18 @@ +package v1 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + "github.com/peggyjv/sommelier/v8/x/auction/types" +) + +func MigrateParamStore(ctx sdk.Context, subspace paramstypes.Subspace) error { + ctx.Logger().Info("auction v1 to v2: Migrating params") + + if !subspace.Has(ctx, types.KeyAuctionBurnRate) { + subspace.Set(ctx, types.KeyAuctionBurnRate, types.DefaultParams().AuctionBurnRate) + } + + ctx.Logger().Info("auction v1 to v2: Params migration complete") + return nil +} diff --git a/x/auction/migrations/v1/types/auction.pb.go b/x/auction/migrations/v1/types/auction.pb.go new file mode 100644 index 000000000..77b7bc5db --- /dev/null +++ b/x/auction/migrations/v1/types/auction.pb.go @@ -0,0 +1,1917 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: auction/v1/auction.proto + +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" + _ "github.com/regen-network/cosmos-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 Auction struct { + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + StartingTokensForSale types.Coin `protobuf:"bytes,2,opt,name=starting_tokens_for_sale,json=startingTokensForSale,proto3" json:"starting_tokens_for_sale"` + StartBlock uint64 `protobuf:"varint,3,opt,name=start_block,json=startBlock,proto3" json:"start_block,omitempty"` + EndBlock uint64 `protobuf:"varint,4,opt,name=end_block,json=endBlock,proto3" json:"end_block,omitempty"` + InitialPriceDecreaseRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=initial_price_decrease_rate,json=initialPriceDecreaseRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"initial_price_decrease_rate"` + CurrentPriceDecreaseRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=current_price_decrease_rate,json=currentPriceDecreaseRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"current_price_decrease_rate"` + PriceDecreaseBlockInterval uint64 `protobuf:"varint,7,opt,name=price_decrease_block_interval,json=priceDecreaseBlockInterval,proto3" json:"price_decrease_block_interval,omitempty"` + InitialUnitPriceInUsomm github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,8,opt,name=initial_unit_price_in_usomm,json=initialUnitPriceInUsomm,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"initial_unit_price_in_usomm"` + CurrentUnitPriceInUsomm github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,9,opt,name=current_unit_price_in_usomm,json=currentUnitPriceInUsomm,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"current_unit_price_in_usomm"` + RemainingTokensForSale types.Coin `protobuf:"bytes,10,opt,name=remaining_tokens_for_sale,json=remainingTokensForSale,proto3" json:"remaining_tokens_for_sale"` + FundingModuleAccount string `protobuf:"bytes,11,opt,name=funding_module_account,json=fundingModuleAccount,proto3" json:"funding_module_account,omitempty"` + ProceedsModuleAccount string `protobuf:"bytes,12,opt,name=proceeds_module_account,json=proceedsModuleAccount,proto3" json:"proceeds_module_account,omitempty"` +} + +func (m *Auction) Reset() { *m = Auction{} } +func (m *Auction) String() string { return proto.CompactTextString(m) } +func (*Auction) ProtoMessage() {} +func (*Auction) Descriptor() ([]byte, []int) { + return fileDescriptor_efe336ece9e41ddd, []int{0} +} +func (m *Auction) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Auction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Auction.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 *Auction) XXX_Merge(src proto.Message) { + xxx_messageInfo_Auction.Merge(m, src) +} +func (m *Auction) XXX_Size() int { + return m.Size() +} +func (m *Auction) XXX_DiscardUnknown() { + xxx_messageInfo_Auction.DiscardUnknown(m) +} + +var xxx_messageInfo_Auction proto.InternalMessageInfo + +func (m *Auction) GetId() uint32 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Auction) GetStartingTokensForSale() types.Coin { + if m != nil { + return m.StartingTokensForSale + } + return types.Coin{} +} + +func (m *Auction) GetStartBlock() uint64 { + if m != nil { + return m.StartBlock + } + return 0 +} + +func (m *Auction) GetEndBlock() uint64 { + if m != nil { + return m.EndBlock + } + return 0 +} + +func (m *Auction) GetPriceDecreaseBlockInterval() uint64 { + if m != nil { + return m.PriceDecreaseBlockInterval + } + return 0 +} + +func (m *Auction) GetRemainingTokensForSale() types.Coin { + if m != nil { + return m.RemainingTokensForSale + } + return types.Coin{} +} + +func (m *Auction) GetFundingModuleAccount() string { + if m != nil { + return m.FundingModuleAccount + } + return "" +} + +func (m *Auction) GetProceedsModuleAccount() string { + if m != nil { + return m.ProceedsModuleAccount + } + return "" +} + +type Bid struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + AuctionId uint32 `protobuf:"varint,2,opt,name=auction_id,json=auctionId,proto3" json:"auction_id,omitempty"` + Bidder string `protobuf:"bytes,3,opt,name=bidder,proto3" json:"bidder,omitempty"` + MaxBidInUsomm types.Coin `protobuf:"bytes,4,opt,name=max_bid_in_usomm,json=maxBidInUsomm,proto3" json:"max_bid_in_usomm"` + SaleTokenMinimumAmount types.Coin `protobuf:"bytes,5,opt,name=sale_token_minimum_amount,json=saleTokenMinimumAmount,proto3" json:"sale_token_minimum_amount"` + TotalFulfilledSaleTokens types.Coin `protobuf:"bytes,6,opt,name=total_fulfilled_sale_tokens,json=totalFulfilledSaleTokens,proto3" json:"total_fulfilled_sale_tokens"` + SaleTokenUnitPriceInUsomm github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=sale_token_unit_price_in_usomm,json=saleTokenUnitPriceInUsomm,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"sale_token_unit_price_in_usomm"` + TotalUsommPaid types.Coin `protobuf:"bytes,8,opt,name=total_usomm_paid,json=totalUsommPaid,proto3" json:"total_usomm_paid"` + BlockHeight uint64 `protobuf:"varint,9,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` +} + +func (m *Bid) Reset() { *m = Bid{} } +func (m *Bid) String() string { return proto.CompactTextString(m) } +func (*Bid) ProtoMessage() {} +func (*Bid) Descriptor() ([]byte, []int) { + return fileDescriptor_efe336ece9e41ddd, []int{1} +} +func (m *Bid) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Bid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Bid.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 *Bid) XXX_Merge(src proto.Message) { + xxx_messageInfo_Bid.Merge(m, src) +} +func (m *Bid) XXX_Size() int { + return m.Size() +} +func (m *Bid) XXX_DiscardUnknown() { + xxx_messageInfo_Bid.DiscardUnknown(m) +} + +var xxx_messageInfo_Bid proto.InternalMessageInfo + +func (m *Bid) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Bid) GetAuctionId() uint32 { + if m != nil { + return m.AuctionId + } + return 0 +} + +func (m *Bid) GetBidder() string { + if m != nil { + return m.Bidder + } + return "" +} + +func (m *Bid) GetMaxBidInUsomm() types.Coin { + if m != nil { + return m.MaxBidInUsomm + } + return types.Coin{} +} + +func (m *Bid) GetSaleTokenMinimumAmount() types.Coin { + if m != nil { + return m.SaleTokenMinimumAmount + } + return types.Coin{} +} + +func (m *Bid) GetTotalFulfilledSaleTokens() types.Coin { + if m != nil { + return m.TotalFulfilledSaleTokens + } + return types.Coin{} +} + +func (m *Bid) GetTotalUsommPaid() types.Coin { + if m != nil { + return m.TotalUsommPaid + } + return types.Coin{} +} + +func (m *Bid) GetBlockHeight() uint64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +// USD price is the value for one non-fractional token (smallest unit of the token * 10^exponent) +type TokenPrice struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Exponent uint64 `protobuf:"varint,2,opt,name=exponent,proto3" json:"exponent,omitempty"` + UsdPrice github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=usd_price,json=usdPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"usd_price"` + LastUpdatedBlock uint64 `protobuf:"varint,4,opt,name=last_updated_block,json=lastUpdatedBlock,proto3" json:"last_updated_block,omitempty"` +} + +func (m *TokenPrice) Reset() { *m = TokenPrice{} } +func (m *TokenPrice) String() string { return proto.CompactTextString(m) } +func (*TokenPrice) ProtoMessage() {} +func (*TokenPrice) Descriptor() ([]byte, []int) { + return fileDescriptor_efe336ece9e41ddd, []int{2} +} +func (m *TokenPrice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TokenPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TokenPrice.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 *TokenPrice) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenPrice.Merge(m, src) +} +func (m *TokenPrice) XXX_Size() int { + return m.Size() +} +func (m *TokenPrice) XXX_DiscardUnknown() { + xxx_messageInfo_TokenPrice.DiscardUnknown(m) +} + +var xxx_messageInfo_TokenPrice proto.InternalMessageInfo + +func (m *TokenPrice) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *TokenPrice) GetExponent() uint64 { + if m != nil { + return m.Exponent + } + return 0 +} + +func (m *TokenPrice) GetLastUpdatedBlock() uint64 { + if m != nil { + return m.LastUpdatedBlock + } + return 0 +} + +type ProposedTokenPrice struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Exponent uint64 `protobuf:"varint,2,opt,name=exponent,proto3" json:"exponent,omitempty"` + UsdPrice github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=usd_price,json=usdPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"usd_price"` +} + +func (m *ProposedTokenPrice) Reset() { *m = ProposedTokenPrice{} } +func (m *ProposedTokenPrice) String() string { return proto.CompactTextString(m) } +func (*ProposedTokenPrice) ProtoMessage() {} +func (*ProposedTokenPrice) Descriptor() ([]byte, []int) { + return fileDescriptor_efe336ece9e41ddd, []int{3} +} +func (m *ProposedTokenPrice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProposedTokenPrice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProposedTokenPrice.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 *ProposedTokenPrice) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProposedTokenPrice.Merge(m, src) +} +func (m *ProposedTokenPrice) XXX_Size() int { + return m.Size() +} +func (m *ProposedTokenPrice) XXX_DiscardUnknown() { + xxx_messageInfo_ProposedTokenPrice.DiscardUnknown(m) +} + +var xxx_messageInfo_ProposedTokenPrice proto.InternalMessageInfo + +func (m *ProposedTokenPrice) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *ProposedTokenPrice) GetExponent() uint64 { + if m != nil { + return m.Exponent + } + return 0 +} + +func init() { + proto.RegisterType((*Auction)(nil), "auction.v1.Auction") + proto.RegisterType((*Bid)(nil), "auction.v1.Bid") + proto.RegisterType((*TokenPrice)(nil), "auction.v1.TokenPrice") + proto.RegisterType((*ProposedTokenPrice)(nil), "auction.v1.ProposedTokenPrice") +} + +func init() { proto.RegisterFile("auction/v1/auction.proto", fileDescriptor_efe336ece9e41ddd) } + +var fileDescriptor_efe336ece9e41ddd = []byte{ + // 799 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x41, 0x6f, 0xdb, 0x36, + 0x14, 0xb6, 0x52, 0xc7, 0xb1, 0xe9, 0xa6, 0x08, 0x88, 0x34, 0x95, 0x1d, 0x54, 0xf1, 0x7c, 0x18, + 0x7c, 0xd8, 0x2c, 0x78, 0x1b, 0xb6, 0xb3, 0xbd, 0xa2, 0xa8, 0x31, 0x14, 0x08, 0xd4, 0x05, 0x18, + 0x7a, 0x18, 0x41, 0x8b, 0xcf, 0x0e, 0x17, 0x89, 0xd4, 0x44, 0xca, 0x70, 0xff, 0xc5, 0x80, 0xfd, + 0x94, 0x9d, 0xf6, 0x0f, 0x7a, 0xec, 0x71, 0xd8, 0xa1, 0x18, 0x92, 0x3f, 0xb1, 0xe3, 0x20, 0x92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 0x73, 0x4e, 0x39, 0xc3, 0x9f, 0xa1, 0x87, 0x76, 0xd9, 0x2f, 0x81, 0x2f, 0x2e, 0xb5, 0xd9, + 0x9d, 0x7a, 0xd4, 0x36, 0xb1, 0x17, 0x26, 0xd4, 0xff, 0xd3, 0x43, 0xc8, 0xd4, 0x61, 0x6a, 0xc0, + 0xc7, 0x68, 0x9f, 0x81, 0x90, 0xa9, 0x99, 0x9f, 0x56, 0x64, 0x0f, 0xb8, 0x8b, 0x9a, 0xb0, 0xca, + 0xa4, 0x00, 0xa1, 0xcd, 0x00, 0x95, 0xb7, 0xa7, 0x3b, 0xe3, 0x1f, 0x50, 0xab, 0x50, 0xcc, 0xba, + 0x62, 0x47, 0xe8, 0x7f, 0x9b, 0xd1, 0x2c, 0x14, 0xb3, 0xf2, 0x5f, 0x20, 0x9c, 0x50, 0xa5, 0x49, + 0x91, 0x31, 0xaa, 0xe1, 0xee, 0x85, 0x7d, 0x54, 0x22, 0x17, 0x16, 0x30, 0xf7, 0x53, 0xff, 0x77, + 0x0f, 0xe1, 0xf3, 0x5c, 0x66, 0x52, 0x01, 0xfb, 0x64, 0x7a, 0x98, 0x4c, 0xdf, 0x5e, 0x07, 0xde, + 0xbb, 0xeb, 0xc0, 0xfb, 0xe7, 0x3a, 0xf0, 0x7e, 0xbb, 0x09, 0x6a, 0xef, 0x6e, 0x82, 0xda, 0x5f, + 0x37, 0x41, 0xed, 0x75, 0xb8, 0xc6, 0x95, 0xc1, 0x62, 0xf1, 0xe6, 0x97, 0x65, 0x58, 0xfe, 0x57, + 0x90, 0x70, 0xc8, 0xc3, 0xe5, 0x77, 0xe1, 0xaa, 0xfa, 0x54, 0x5b, 0xe2, 0x59, 0xc3, 0x7c, 0x54, + 0xbf, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x68, 0x28, 0x79, 0x9e, 0xcd, 0x07, 0x00, 0x00, +} + +func (m *Auction) 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 *Auction) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Auction) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ProceedsModuleAccount) > 0 { + i -= len(m.ProceedsModuleAccount) + copy(dAtA[i:], m.ProceedsModuleAccount) + i = encodeVarintAuction(dAtA, i, uint64(len(m.ProceedsModuleAccount))) + i-- + dAtA[i] = 0x62 + } + if len(m.FundingModuleAccount) > 0 { + i -= len(m.FundingModuleAccount) + copy(dAtA[i:], m.FundingModuleAccount) + i = encodeVarintAuction(dAtA, i, uint64(len(m.FundingModuleAccount))) + i-- + dAtA[i] = 0x5a + } + { + size, err := m.RemainingTokensForSale.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAuction(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + { + size := m.CurrentUnitPriceInUsomm.Size() + i -= size + if _, err := m.CurrentUnitPriceInUsomm.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAuction(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + { + size := m.InitialUnitPriceInUsomm.Size() + i -= size + if _, err := m.InitialUnitPriceInUsomm.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAuction(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + if m.PriceDecreaseBlockInterval != 0 { + i = encodeVarintAuction(dAtA, i, uint64(m.PriceDecreaseBlockInterval)) + i-- + dAtA[i] = 0x38 + } + { + size := m.CurrentPriceDecreaseRate.Size() + i -= size + if _, err := m.CurrentPriceDecreaseRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAuction(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.InitialPriceDecreaseRate.Size() + i -= size + if _, err := m.InitialPriceDecreaseRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAuction(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.EndBlock != 0 { + i = encodeVarintAuction(dAtA, i, uint64(m.EndBlock)) + i-- + dAtA[i] = 0x20 + } + if m.StartBlock != 0 { + i = encodeVarintAuction(dAtA, i, uint64(m.StartBlock)) + i-- + dAtA[i] = 0x18 + } + { + size, err := m.StartingTokensForSale.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAuction(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.Id != 0 { + i = encodeVarintAuction(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Bid) 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 *Bid) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Bid) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockHeight != 0 { + i = encodeVarintAuction(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x48 + } + { + size, err := m.TotalUsommPaid.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAuction(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + { + size := m.SaleTokenUnitPriceInUsomm.Size() + i -= size + if _, err := m.SaleTokenUnitPriceInUsomm.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAuction(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size, err := m.TotalFulfilledSaleTokens.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAuction(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size, err := m.SaleTokenMinimumAmount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAuction(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + { + size, err := m.MaxBidInUsomm.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAuction(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + if len(m.Bidder) > 0 { + i -= len(m.Bidder) + copy(dAtA[i:], m.Bidder) + i = encodeVarintAuction(dAtA, i, uint64(len(m.Bidder))) + i-- + dAtA[i] = 0x1a + } + if m.AuctionId != 0 { + i = encodeVarintAuction(dAtA, i, uint64(m.AuctionId)) + i-- + dAtA[i] = 0x10 + } + if m.Id != 0 { + i = encodeVarintAuction(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *TokenPrice) 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 *TokenPrice) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TokenPrice) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LastUpdatedBlock != 0 { + i = encodeVarintAuction(dAtA, i, uint64(m.LastUpdatedBlock)) + i-- + dAtA[i] = 0x20 + } + { + size := m.UsdPrice.Size() + i -= size + if _, err := m.UsdPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAuction(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Exponent != 0 { + i = encodeVarintAuction(dAtA, i, uint64(m.Exponent)) + i-- + dAtA[i] = 0x10 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintAuction(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ProposedTokenPrice) 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 *ProposedTokenPrice) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProposedTokenPrice) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.UsdPrice.Size() + i -= size + if _, err := m.UsdPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintAuction(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Exponent != 0 { + i = encodeVarintAuction(dAtA, i, uint64(m.Exponent)) + i-- + dAtA[i] = 0x10 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintAuction(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintAuction(dAtA []byte, offset int, v uint64) int { + offset -= sovAuction(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Auction) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovAuction(uint64(m.Id)) + } + l = m.StartingTokensForSale.Size() + n += 1 + l + sovAuction(uint64(l)) + if m.StartBlock != 0 { + n += 1 + sovAuction(uint64(m.StartBlock)) + } + if m.EndBlock != 0 { + n += 1 + sovAuction(uint64(m.EndBlock)) + } + l = m.InitialPriceDecreaseRate.Size() + n += 1 + l + sovAuction(uint64(l)) + l = m.CurrentPriceDecreaseRate.Size() + n += 1 + l + sovAuction(uint64(l)) + if m.PriceDecreaseBlockInterval != 0 { + n += 1 + sovAuction(uint64(m.PriceDecreaseBlockInterval)) + } + l = m.InitialUnitPriceInUsomm.Size() + n += 1 + l + sovAuction(uint64(l)) + l = m.CurrentUnitPriceInUsomm.Size() + n += 1 + l + sovAuction(uint64(l)) + l = m.RemainingTokensForSale.Size() + n += 1 + l + sovAuction(uint64(l)) + l = len(m.FundingModuleAccount) + if l > 0 { + n += 1 + l + sovAuction(uint64(l)) + } + l = len(m.ProceedsModuleAccount) + if l > 0 { + n += 1 + l + sovAuction(uint64(l)) + } + return n +} + +func (m *Bid) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovAuction(uint64(m.Id)) + } + if m.AuctionId != 0 { + n += 1 + sovAuction(uint64(m.AuctionId)) + } + l = len(m.Bidder) + if l > 0 { + n += 1 + l + sovAuction(uint64(l)) + } + l = m.MaxBidInUsomm.Size() + n += 1 + l + sovAuction(uint64(l)) + l = m.SaleTokenMinimumAmount.Size() + n += 1 + l + sovAuction(uint64(l)) + l = m.TotalFulfilledSaleTokens.Size() + n += 1 + l + sovAuction(uint64(l)) + l = m.SaleTokenUnitPriceInUsomm.Size() + n += 1 + l + sovAuction(uint64(l)) + l = m.TotalUsommPaid.Size() + n += 1 + l + sovAuction(uint64(l)) + if m.BlockHeight != 0 { + n += 1 + sovAuction(uint64(m.BlockHeight)) + } + return n +} + +func (m *TokenPrice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovAuction(uint64(l)) + } + if m.Exponent != 0 { + n += 1 + sovAuction(uint64(m.Exponent)) + } + l = m.UsdPrice.Size() + n += 1 + l + sovAuction(uint64(l)) + if m.LastUpdatedBlock != 0 { + n += 1 + sovAuction(uint64(m.LastUpdatedBlock)) + } + return n +} + +func (m *ProposedTokenPrice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovAuction(uint64(l)) + } + if m.Exponent != 0 { + n += 1 + sovAuction(uint64(m.Exponent)) + } + l = m.UsdPrice.Size() + n += 1 + l + sovAuction(uint64(l)) + return n +} + +func sovAuction(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAuction(x uint64) (n int) { + return sovAuction(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Auction) 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 ErrIntOverflowAuction + } + 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: Auction: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Auction: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartingTokensForSale", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuction + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StartingTokensForSale.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StartBlock", wireType) + } + m.StartBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StartBlock |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EndBlock", wireType) + } + m.EndBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EndBlock |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + 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 ErrIntOverflowAuction + } + 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 ErrInvalidLengthAuction + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialPriceDecreaseRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentPriceDecreaseRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + 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 ErrInvalidLengthAuction + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CurrentPriceDecreaseRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + 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 ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PriceDecreaseBlockInterval |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialUnitPriceInUsomm", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + 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 ErrInvalidLengthAuction + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialUnitPriceInUsomm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentUnitPriceInUsomm", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + 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 ErrInvalidLengthAuction + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CurrentUnitPriceInUsomm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemainingTokensForSale", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuction + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RemainingTokensForSale.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FundingModuleAccount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + 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 ErrInvalidLengthAuction + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FundingModuleAccount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProceedsModuleAccount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + 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 ErrInvalidLengthAuction + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProceedsModuleAccount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuction(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuction + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Bid) 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 ErrIntOverflowAuction + } + 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: Bid: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Bid: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AuctionId", wireType) + } + m.AuctionId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AuctionId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bidder", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + 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 ErrInvalidLengthAuction + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bidder = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxBidInUsomm", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuction + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaxBidInUsomm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SaleTokenMinimumAmount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuction + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SaleTokenMinimumAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalFulfilledSaleTokens", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuction + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalFulfilledSaleTokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SaleTokenUnitPriceInUsomm", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + 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 ErrInvalidLengthAuction + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SaleTokenUnitPriceInUsomm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalUsommPaid", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAuction + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalUsommPaid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + 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 ErrIntOverflowAuction + } + 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 := skipAuction(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuction + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TokenPrice) 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 ErrIntOverflowAuction + } + 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: TokenPrice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TokenPrice: 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 ErrIntOverflowAuction + } + 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 ErrInvalidLengthAuction + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exponent", wireType) + } + m.Exponent = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Exponent |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UsdPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + 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 ErrInvalidLengthAuction + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.UsdPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastUpdatedBlock", wireType) + } + m.LastUpdatedBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastUpdatedBlock |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipAuction(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuction + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProposedTokenPrice) 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 ErrIntOverflowAuction + } + 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: ProposedTokenPrice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProposedTokenPrice: 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 ErrIntOverflowAuction + } + 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 ErrInvalidLengthAuction + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exponent", wireType) + } + m.Exponent = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Exponent |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UsdPrice", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuction + } + 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 ErrInvalidLengthAuction + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuction + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.UsdPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuction(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuction + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAuction(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, ErrIntOverflowAuction + } + 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, ErrIntOverflowAuction + } + 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, ErrIntOverflowAuction + } + 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, ErrInvalidLengthAuction + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAuction + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAuction + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAuction = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAuction = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAuction = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/auction/migrations/v1/types/errors.go b/x/auction/migrations/v1/types/errors.go new file mode 100644 index 000000000..7fc6155bc --- /dev/null +++ b/x/auction/migrations/v1/types/errors.go @@ -0,0 +1,55 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" +) + +// x/auction module sentinel errors +var ( + ErrCouldNotFindSaleTokenPrice = errorsmod.Register(ModuleName, 2, "could not find sale token price, need to resubmit token prices and try again") + ErrCouldNotFindSommTokenPrice = errorsmod.Register(ModuleName, 3, "could not find usomm token price, need to resubmit token prices and try again") + ErrLastSaleTokenPriceTooOld = errorsmod.Register(ModuleName, 4, "last sale token price update too long ago, need to resubmit token prices and try again") + ErrLastSommTokenPriceTooOld = errorsmod.Register(ModuleName, 5, "last usomm token price update too long ago, need to resubmit token prices and try again") + ErrAuctionStartingAmountMustBePositve = errorsmod.Register(ModuleName, 6, "minimum auction sale token starting amount must be a positive amount of coins") + ErrCannotAuctionUsomm = errorsmod.Register(ModuleName, 7, "auctioning usomm for usomm is pointless") + ErrInvalidInitialDecreaseRate = errorsmod.Register(ModuleName, 8, "initial price decrease rate must be a float less than one and greater than zero") + ErrInvalidBlockDecreaseInterval = errorsmod.Register(ModuleName, 9, "price decrease block interval cannot be 0") + ErrUnauthorizedFundingModule = errorsmod.Register(ModuleName, 10, "unauthorized funding module account") + ErrUnauthorizedProceedsModule = errorsmod.Register(ModuleName, 11, "unauthorized proceeds module account") + ErrCannotStartTwoAuctionsForSameDenomSimultaneously = errorsmod.Register(ModuleName, 12, "auction for this denom is currently ongoing, cannot create another auction for the same denom until completed") + ErrConvertingStringToDec = errorsmod.Register(ModuleName, 13, "could not convert string to dec") + ErrAuctionNotFound = errorsmod.Register(ModuleName, 14, "auction not found") + ErrBidAuctionDenomMismatch = errorsmod.Register(ModuleName, 15, "auction denom different from bid requested denom") + ErrAuctionEnded = errorsmod.Register(ModuleName, 16, "auction ended") + ErrInsufficientBid = errorsmod.Register(ModuleName, 17, "max bid amount is too small to purchase minimum sale tokens requested") + ErrMinimumPurchaseAmountLargerThanTokensRemaining = errorsmod.Register(ModuleName, 18, "minimum purchase amount is larger then the number of tokens remaining for sale") + ErrAuctionIDMustBeNonZero = errorsmod.Register(ModuleName, 19, "auction IDs must be non-zero") + ErrInvalidStartBlock = errorsmod.Register(ModuleName, 20, "start block cannot be 0") + ErrInvalidCurrentDecreaseRate = errorsmod.Register(ModuleName, 21, "current price decrease rate must be a float less than one and greater than zero") + ErrPriceMustBePositive = errorsmod.Register(ModuleName, 22, "price must be positive") + ErrDenomCannotBeEmpty = errorsmod.Register(ModuleName, 23, "denom cannot be empty") + ErrInvalidLastUpdatedBlock = errorsmod.Register(ModuleName, 24, "last updated block cannot be 0") + 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") + 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'") + 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") + ErrTokenPriceProposalMustHaveAtLeastOnePrice = errorsmod.Register(ModuleName, 36, "list of proposed token prices must be non-zero") + ErrBidFulfilledSaleTokenAmountMustBeNonNegative = errorsmod.Register(ModuleName, 37, "total sale token fulfilled amount must be non-negative") + ErrBidPaymentCannotBeNegative = errorsmod.Register(ModuleName, 38, "total amount paid in usomm cannot be negative") + ErrBidAmountIsTooSmall = errorsmod.Register(ModuleName, 39, "bid is below minimum amount") + ErrMinimumBidParam = errorsmod.Register(ModuleName, 40, "invalid minimum bid param") + ErrInvalidAuctionMaxBlockAgeParam = errorsmod.Register(ModuleName, 41, "invalid auction max block age param") + ErrInvalidAuctionPriceDecreaseAccelerationRateParam = errorsmod.Register(ModuleName, 42, "invalid auction price decrease acceleration rate param") + 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/migrations/v1/types/genesis.pb.go b/x/auction/migrations/v1/types/genesis.pb.go new file mode 100644 index 000000000..17d9f3a50 --- /dev/null +++ b/x/auction/migrations/v1/types/genesis.pb.go @@ -0,0 +1,951 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: auction/v1/genesis.proto + +package types + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + 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 GenesisState struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + Auctions []*Auction `protobuf:"bytes,2,rep,name=auctions,proto3" json:"auctions,omitempty"` + Bids []*Bid `protobuf:"bytes,3,rep,name=bids,proto3" json:"bids,omitempty"` + TokenPrices []*TokenPrice `protobuf:"bytes,4,rep,name=token_prices,json=tokenPrices,proto3" json:"token_prices,omitempty"` + LastAuctionId uint32 `protobuf:"varint,5,opt,name=last_auction_id,json=lastAuctionId,proto3" json:"last_auction_id,omitempty"` + LastBidId uint64 `protobuf:"varint,6,opt,name=last_bid_id,json=lastBidId,proto3" json:"last_bid_id,omitempty"` +} + +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_a762e9d6ba7af420, []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 (m *GenesisState) GetAuctions() []*Auction { + if m != nil { + return m.Auctions + } + return nil +} + +func (m *GenesisState) GetBids() []*Bid { + if m != nil { + return m.Bids + } + return nil +} + +func (m *GenesisState) GetTokenPrices() []*TokenPrice { + if m != nil { + return m.TokenPrices + } + return nil +} + +func (m *GenesisState) GetLastAuctionId() uint32 { + if m != nil { + return m.LastAuctionId + } + return 0 +} + +func (m *GenesisState) GetLastBidId() uint64 { + if m != nil { + return m.LastBidId + } + return 0 +} + +type Params struct { + PriceMaxBlockAge uint64 `protobuf:"varint,1,opt,name=price_max_block_age,json=priceMaxBlockAge,proto3" json:"price_max_block_age,omitempty"` + MinimumBidInUsomm uint64 `protobuf:"varint,2,opt,name=minimum_bid_in_usomm,json=minimumBidInUsomm,proto3" json:"minimum_bid_in_usomm,omitempty"` + 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{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_a762e9d6ba7af420, []int{1} +} +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) GetPriceMaxBlockAge() uint64 { + if m != nil { + return m.PriceMaxBlockAge + } + return 0 +} + +func (m *Params) GetMinimumBidInUsomm() uint64 { + if m != nil { + return m.MinimumBidInUsomm + } + return 0 +} + +func (m *Params) GetAuctionMaxBlockAge() uint64 { + if m != nil { + return m.AuctionMaxBlockAge + } + 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") +} + +func init() { proto.RegisterFile("auction/v1/genesis.proto", fileDescriptor_a762e9d6ba7af420) } + +var fileDescriptor_a762e9d6ba7af420 = []byte{ + // 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, 0xdd, 0x34, 0xf0, 0xc6, 0x14, 0x26, 0x91, 0x55, 0x03, 0x4d, + 0xb9, 0x2c, 0x61, 0x03, 0x09, 0x71, 0x6c, 0x34, 0x09, 0x7a, 0x40, 0x9a, 0x32, 0xc6, 0x81, 0x4b, + 0xe4, 0xc6, 0x4f, 0xa9, 0x69, 0x12, 0x47, 0xb1, 0x53, 0x75, 0x5f, 0x80, 0x33, 0x57, 0xbe, 0xd1, + 0x0e, 0x1c, 0x76, 0x44, 0x1c, 0x26, 0xd4, 0x7e, 0x11, 0x64, 0xc7, 0x19, 0xe1, 0xc8, 0x29, 0x4f, + 0xfe, 0xff, 0xde, 0xf3, 0x7b, 0xff, 0x17, 0x23, 0x87, 0xd4, 0x89, 0x64, 0xbc, 0x08, 0x16, 0xa7, + 0x41, 0x0a, 0x05, 0x08, 0x26, 0xfc, 0xb2, 0xe2, 0x92, 0x63, 0x64, 0x14, 0x7f, 0x71, 0x7a, 0xb0, + 0xdb, 0xa1, 0xe4, 0xb2, 0x01, 0x0e, 0xba, 0xa9, 0x2d, 0xdb, 0x28, 0x7b, 0x29, 0x4f, 0xb9, 0x0e, + 0x03, 0x15, 0x35, 0xa7, 0x47, 0xdf, 0x37, 0xd0, 0xd6, 0xbb, 0xe6, 0x8a, 0x4b, 0x49, 0x24, 0xe0, + 0x97, 0x68, 0x50, 0x92, 0x8a, 0xe4, 0xc2, 0xb1, 0x46, 0x96, 0x37, 0x3c, 0xc3, 0xfe, 0xdf, 0x2b, + 0xfd, 0x0b, 0xad, 0x84, 0xf6, 0xcd,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04, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x6a, 0xcf, 0xe9, 0xa9, 0x03, 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 + if m.LastBidId != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.LastBidId)) + i-- + dAtA[i] = 0x30 + } + if m.LastAuctionId != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.LastAuctionId)) + i-- + dAtA[i] = 0x28 + } + 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 = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Bids) > 0 { + for iNdEx := len(m.Bids) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Bids[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Auctions) > 0 { + for iNdEx := len(m.Auctions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Auctions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + 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 (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 + if m.MinimumAuctionHeight != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.MinimumAuctionHeight)) + i-- + dAtA[i] = 0x30 + } + { + size := m.AuctionPriceDecreaseAccelerationRate.Size() + i -= size + if _, err := m.AuctionPriceDecreaseAccelerationRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.AuctionMaxBlockAge != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.AuctionMaxBlockAge)) + i-- + dAtA[i] = 0x20 + } + { + size := m.MinimumSaleTokensUsdValue.Size() + i -= size + if _, err := m.MinimumSaleTokensUsdValue.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.MinimumBidInUsomm != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.MinimumBidInUsomm)) + i-- + dAtA[i] = 0x10 + } + if m.PriceMaxBlockAge != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.PriceMaxBlockAge)) + i-- + dAtA[i] = 0x8 + } + 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)) + if len(m.Auctions) > 0 { + for _, e := range m.Auctions { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.Bids) > 0 { + for _, e := range m.Bids { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.TokenPrices) > 0 { + for _, e := range m.TokenPrices { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.LastAuctionId != 0 { + n += 1 + sovGenesis(uint64(m.LastAuctionId)) + } + if m.LastBidId != 0 { + n += 1 + sovGenesis(uint64(m.LastBidId)) + } + return n +} + +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PriceMaxBlockAge != 0 { + n += 1 + sovGenesis(uint64(m.PriceMaxBlockAge)) + } + if m.MinimumBidInUsomm != 0 { + n += 1 + sovGenesis(uint64(m.MinimumBidInUsomm)) + } + l = m.MinimumSaleTokensUsdValue.Size() + n += 1 + l + sovGenesis(uint64(l)) + if m.AuctionMaxBlockAge != 0 { + n += 1 + sovGenesis(uint64(m.AuctionMaxBlockAge)) + } + l = m.AuctionPriceDecreaseAccelerationRate.Size() + n += 1 + l + sovGenesis(uint64(l)) + if m.MinimumAuctionHeight != 0 { + n += 1 + sovGenesis(uint64(m.MinimumAuctionHeight)) + } + 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 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Auctions", 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 + } + m.Auctions = append(m.Auctions, &Auction{}) + if err := m.Auctions[len(m.Auctions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bids", 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 + } + m.Bids = append(m.Bids, &Bid{}) + if err := m.Bids[len(m.Bids)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + 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 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 + } + m.TokenPrices = append(m.TokenPrices, &TokenPrice{}) + if err := m.TokenPrices[len(m.TokenPrices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastAuctionId", wireType) + } + m.LastAuctionId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastAuctionId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LastBidId", wireType) + } + m.LastBidId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LastBidId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 (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 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: 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 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceMaxBlockAge", wireType) + } + m.PriceMaxBlockAge = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PriceMaxBlockAge |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinimumBidInUsomm", wireType) + } + m.MinimumBidInUsomm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinimumBidInUsomm |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinimumSaleTokensUsdValue", 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.MinimumSaleTokensUsdValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AuctionMaxBlockAge", wireType) + } + m.AuctionMaxBlockAge = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AuctionMaxBlockAge |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuctionPriceDecreaseAccelerationRate", 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.AuctionPriceDecreaseAccelerationRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + 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:]) + 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/auction/migrations/v1/types/keys.go b/x/auction/migrations/v1/types/keys.go new file mode 100644 index 000000000..cb0756d25 --- /dev/null +++ b/x/auction/migrations/v1/types/keys.go @@ -0,0 +1,105 @@ +package types + +import ( + "encoding/binary" +) + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "auction" + + // StoreKey is the store key string for auction + StoreKey = ModuleName + + // RouterKey is the message route for auction + RouterKey = ModuleName + + // QuerierRoute is the querier route for auction + QuerierRoute = ModuleName +) + +// Keys for auction store, with -> +const ( + _ = byte(iota) + + // + ActiveAuctionsPrefix + + // + EndedAuctionsPrefix + + // + BidsByAuctionPrefix + + // + TokenPricesPrefix + + // + LastAuctionIDKey + + // + LastBidIDKey +) + +// GetActiveAuctionsPrefix returns the key prefix for active auctions +func GetActiveAuctionsPrefix() []byte { + return []byte{ActiveAuctionsPrefix} +} + +// GetActiveAuctionKey returns the key for an active auction +func GetActiveAuctionKey(id uint32) []byte { + b := make([]byte, 4) + binary.BigEndian.PutUint32(b, id) + return append(GetActiveAuctionsPrefix(), b...) +} + +// GetEndedAuctionsPrefix returns the key prefix for ended auctions +func GetEndedAuctionsPrefix() []byte { + return []byte{EndedAuctionsPrefix} +} + +// GetEndedAuctionsKey returns the key for an ended auction +func GetEndedAuctionKey(id uint32) []byte { + b := make([]byte, 4) + binary.BigEndian.PutUint32(b, id) + return append(GetEndedAuctionsPrefix(), b...) +} + +// GetBidsByAuctionPrefix returns the key prefix for bids +func GetBidsByAuctionPrefix() []byte { + return []byte{BidsByAuctionPrefix} +} + +// GetBidsByAuctionIDPrefix returns the bids for an auction id +func GetBidsByAuctionIDPrefix(auctionID uint32) []byte { + b := make([]byte, 4) + binary.BigEndian.PutUint32(b, auctionID) + return append(GetBidsByAuctionPrefix(), b...) +} + +// GetBidKey returns the bid for an auction and bid id +func GetBidKey(auctionID uint32, bidID uint64) []byte { + b := make([]byte, 8) + binary.BigEndian.PutUint64(b, bidID) + return append(GetBidsByAuctionIDPrefix(auctionID), b...) +} + +// GetTokenPricesPrefix returns the key prefix for token prices +func GetTokenPricesPrefix() []byte { + return []byte{TokenPricesPrefix} +} + +// GetTokenPriceKey returns the key for a token price +func GetTokenPriceKey(denom string) []byte { + return append(GetTokenPricesPrefix(), []byte(denom)...) +} + +// GetLastAuctionIDKey returns the key prefix for the last stored auction id +func GetLastAuctionIDKey() []byte { + return []byte{LastAuctionIDKey} +} + +// GetLastBidIDKey returns the key prefix for the last stored bid id +func GetLastBidIDKey() []byte { + return []byte{LastBidIDKey} +} diff --git a/x/auction/migrations/v1/types/params.go b/x/auction/migrations/v1/types/params.go new file mode 100644 index 000000000..5d06e4159 --- /dev/null +++ b/x/auction/migrations/v1/types/params.go @@ -0,0 +1,141 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +// Parameter keys +var ( + KeyPriceMaxBlockAge = []byte("PriceMaxBlockAge") + KeyMinimumBidInUsomm = []byte("MinimumBidInUsomm") + KeyMinimumSaleTokensUSDValue = []byte("MinimumSaleTokensUSDValue") + KeyAuctionMaxBlockAge = []byte("AuctionMaxBlockAge") + KeyAuctionPriceDecreaseAccelerationRate = []byte("AuctionPriceDecreaseAccelerationRate") + KeyMinimumAuctionHeight = []byte("MinimumAuctionHeight") +) + +var _ paramtypes.ParamSet = &Params{} + +// ParamKeyTable returns the parameter key table. +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +// DefaultParams returns default auction parameters +func DefaultParams() Params { + return Params{ + PriceMaxBlockAge: 806400, // roughly eight weeks based on 6 second blocks + MinimumBidInUsomm: 1000000, // 1 somm + 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 + } +} + +// ParamSetPairs returns the parameter set pairs. +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair(KeyPriceMaxBlockAge, &p.PriceMaxBlockAge, validatePriceMaxBlockAge), + paramtypes.NewParamSetPair(KeyMinimumBidInUsomm, &p.MinimumBidInUsomm, validateMinimumBidInUsomm), + paramtypes.NewParamSetPair(KeyMinimumSaleTokensUSDValue, &p.MinimumSaleTokensUsdValue, validateMinimumSaleTokensUSDValue), + paramtypes.NewParamSetPair(KeyAuctionMaxBlockAge, &p.AuctionMaxBlockAge, validateAuctionMaxBlockAge), + paramtypes.NewParamSetPair(KeyAuctionPriceDecreaseAccelerationRate, &p.AuctionPriceDecreaseAccelerationRate, validateAuctionPriceDecreaseAccelerationRate), + paramtypes.NewParamSetPair(KeyMinimumAuctionHeight, &p.MinimumAuctionHeight, validateMinimumAuctionHeight), + } +} + +// ValidateBasic performs basic validation on auction parameters. +func (p *Params) ValidateBasic() error { + if err := validatePriceMaxBlockAge(p.PriceMaxBlockAge); err != nil { + return err + } + + if err := validateMinimumBidInUsomm(p.MinimumBidInUsomm); err != nil { + return err + } + + if err := validateMinimumSaleTokensUSDValue(p.MinimumSaleTokensUsdValue); err != nil { + return err + } + + if err := validateAuctionMaxBlockAge(p.AuctionMaxBlockAge); err != nil { + return err + } + + if err := validateAuctionPriceDecreaseAccelerationRate(p.AuctionPriceDecreaseAccelerationRate); err != nil { + return err + } + + return nil +} + +func validatePriceMaxBlockAge(i interface{}) error { + priceMaxBlockAge, ok := i.(uint64) + if !ok { + return errorsmod.Wrapf(ErrInvalidPriceMaxBlockAgeParameterType, "type: %T", i) + } + + if priceMaxBlockAge == 0 { + return errorsmod.Wrapf(ErrTokenPriceMaxBlockAgeMustBePositive, "value: %d", priceMaxBlockAge) + } + + return nil +} + +func validateMinimumBidInUsomm(i interface{}) error { + _, ok := i.(uint64) + if !ok { + return errorsmod.Wrapf(ErrMinimumBidParam, "invalid minimum bid in usomm parameter type: %T", i) + } + + return nil +} + +func validateMinimumSaleTokensUSDValue(i interface{}) error { + minimumSaleTokensUsdValue, ok := i.(sdk.Dec) + if !ok { + return errorsmod.Wrapf(ErrInvalidMinimumSaleTokensUSDValue, "invalid minimum sale tokens USD value parameter type: %T", i) + } + + if minimumSaleTokensUsdValue.LT(sdk.MustNewDecFromStr("1.0")) { + // Setting this to a minimum of 1.0 USD to ensure we can realistically charge a non-fractional usomm value + return errorsmod.Wrapf(ErrInvalidMinimumSaleTokensUSDValue, "minimum sale tokens USD value must be at least 1.0") + } + + return nil +} + +func validateAuctionMaxBlockAge(i interface{}) error { + _, ok := i.(uint64) + if !ok { + return errorsmod.Wrapf(ErrInvalidAuctionMaxBlockAgeParam, "invalid auction max block age parameter type: %T", i) + } + + return nil +} + +func validateAuctionPriceDecreaseAccelerationRate(i interface{}) error { + auctionPriceDecreaseAccelerationRate, ok := i.(sdk.Dec) + if !ok { + return errorsmod.Wrapf(ErrInvalidAuctionPriceDecreaseAccelerationRateParam, "invalid auction price decrease acceleration rate parameter type: %T", i) + } + + if auctionPriceDecreaseAccelerationRate.LT(sdk.MustNewDecFromStr("0")) || auctionPriceDecreaseAccelerationRate.GT(sdk.MustNewDecFromStr("1.0")) { + // Acceleration rates could in theory be more than 100% if need be, but we are establishing this as a bound for now + return errorsmod.Wrapf(ErrInvalidAuctionPriceDecreaseAccelerationRateParam, "auction price decrease acceleration rate must be between 0 and 1 inclusive (0%% to 100%%)") + } + + 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/auction/module.go b/x/auction/module.go index 9cdd0fb2b..0638d78ee 100644 --- a/x/auction/module.go +++ b/x/auction/module.go @@ -3,6 +3,7 @@ package auction import ( "context" "encoding/json" + "fmt" abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" @@ -12,9 +13,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" sim "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/peggyjv/sommelier/v7/x/auction/client/cli" - "github.com/peggyjv/sommelier/v7/x/auction/keeper" - "github.com/peggyjv/sommelier/v7/x/auction/types" + "github.com/peggyjv/sommelier/v8/x/auction/client/cli" + "github.com/peggyjv/sommelier/v8/x/auction/keeper" + "github.com/peggyjv/sommelier/v8/x/auction/types" "github.com/spf13/cobra" ) @@ -103,7 +104,7 @@ func (AppModule) QuerierRoute() string { return types.QuerierRoute } // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { - return 1 + return 2 } func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation { @@ -114,6 +115,12 @@ 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) + + // Register the migration handler for version 1 to 2 + migrator := keeper.NewMigrator(am.keeper) + if err := cfg.RegisterMigration(types.ModuleName, 1, migrator.Migrate1to2); err != nil { + panic(fmt.Sprintf("failed to migrate x/auction from version 1 to 2: %v", err)) + } } // InitGenesis performs genesis initialization for the auction module. diff --git a/x/auction/types/auction.go b/x/auction/types/auction.go index cd18017a2..108c5431d 100644 --- a/x/auction/types/auction.go +++ b/x/auction/types/auction.go @@ -4,7 +4,7 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/peggyjv/sommelier/v7/app/params" + "github.com/peggyjv/sommelier/v8/app/params" ) func (a *Auction) ValidateBasic() error { diff --git a/x/auction/types/auction.pb.go b/x/auction/types/auction.pb.go index ecda636bd..ef9f2629e 100644 --- a/x/auction/types/auction.pb.go +++ b/x/auction/types/auction.pb.go @@ -356,57 +356,57 @@ func init() { func init() { proto.RegisterFile("auction/v1/auction.proto", fileDescriptor_efe336ece9e41ddd) } var fileDescriptor_efe336ece9e41ddd = []byte{ - // 799 bytes of a gzipped FileDescriptorProto + // 800 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x41, 0x6f, 0xdb, 0x36, 0x14, 0xb6, 0x52, 0xc7, 0xb1, 0xe9, 0xa6, 0x08, 0x88, 0x34, 0x95, 0x1d, 0x54, 0xf1, 0x7c, 0x18, - 0x7c, 0xd8, 0x2c, 0x78, 0x1b, 0xb6, 0xb3, 0xbd, 0xa2, 0xa8, 0x31, 0x14, 0x08, 0xd4, 0x05, 0x18, - 0x7a, 0x18, 0x41, 0x8b, 0xcf, 0x0e, 0x17, 0x89, 0xd4, 0x44, 0xca, 0x70, 0xff, 0xc5, 0x80, 0xfd, - 0x94, 0x9d, 0xf6, 0x0f, 0x7a, 0xec, 0x71, 0xd8, 0xa1, 0x18, 0x92, 0x3f, 0xb1, 0xe3, 0x20, 0x92, - 0x6a, 0x9c, 0xc6, 0x07, 0xcf, 0xa7, 0x9e, 0x2c, 0xbe, 0x4f, 0xef, 0xfb, 0xde, 0xfb, 0xfc, 0x1e, - 0x85, 0x7c, 0x5a, 0xc4, 0x9a, 0x4b, 0x11, 0x2e, 0x47, 0xa1, 0x7b, 0x1c, 0x66, 0xb9, 0xd4, 0x12, - 0xa3, 0xea, 0xb8, 0x1c, 0x75, 0x83, 0x58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a, 0x73, 0xca, 0x19, 0xfe, 0x0c, 0x3d, 0xb4, 0xcb, 0x7e, 0x09, 0x7c, 0x71, 0xa9, 0xcd, + 0xee, 0xd4, 0xa3, 0xb6, 0x89, 0xbd, 0x30, 0xa1, 0xfe, 0x9f, 0x1e, 0x42, 0xa6, 0x0e, 0x53, 0x03, + 0x3e, 0x46, 0xfb, 0x0c, 0x84, 0x4c, 0xcd, 0xfc, 0xb4, 0x22, 0x7b, 0xc0, 0x5d, 0xd4, 0x84, 0x55, + 0x26, 0x05, 0x08, 0x6d, 0x06, 0xa8, 0xbc, 0x3d, 0xdd, 0x19, 0xff, 0x80, 0x5a, 0x85, 0x62, 0xd6, + 0x15, 0x3b, 0x42, 0xff, 0xdb, 0x8c, 0x66, 0xa1, 0x98, 0x95, 0xff, 0x02, 0xe1, 0x84, 0x2a, 0x4d, + 0x8a, 0x8c, 0x51, 0x0d, 0x77, 0x2f, 0xec, 0xa3, 0x12, 0xb9, 0xb0, 0x80, 0xb9, 0x9f, 0xfa, 0xbf, + 0x7b, 0x08, 0x9f, 0xe7, 0x32, 0x93, 0x0a, 0xd8, 0x27, 0xd3, 0xc3, 0x64, 0xfa, 0xf6, 0x3a, 0xf0, + 0xde, 0x5d, 0x07, 0xde, 0x3f, 0xd7, 0x81, 0xf7, 0xdb, 0x4d, 0x50, 0x7b, 0x77, 0x13, 0xd4, 0xfe, + 0xba, 0x09, 0x6a, 0xaf, 0xc3, 0x35, 0xae, 0x0c, 0x16, 0x8b, 0x37, 0xbf, 0x2c, 0xc3, 0xf2, 0xbf, + 0x82, 0x84, 0x43, 0x1e, 0x2e, 0xbf, 0x0b, 0x57, 0xd5, 0xa7, 0xda, 0x12, 0xcf, 0x1a, 0xe6, 0xa3, + 0xfa, 0xf5, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x77, 0x47, 0x22, 0x7c, 0xcd, 0x07, 0x00, 0x00, } func (m *Auction) Marshal() (dAtA []byte, err error) { diff --git a/x/auction/types/auction_test.go b/x/auction/types/auction_test.go index 220c86f1e..a472a2c15 100644 --- a/x/auction/types/auction_test.go +++ b/x/auction/types/auction_test.go @@ -6,7 +6,7 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/peggyjv/sommelier/v7/app/params" + "github.com/peggyjv/sommelier/v8/app/params" "github.com/stretchr/testify/require" ) diff --git a/x/auction/types/genesis.pb.go b/x/auction/types/genesis.pb.go index 19859016e..c7cea4311 100644 --- a/x/auction/types/genesis.pb.go +++ b/x/auction/types/genesis.pb.go @@ -190,39 +190,39 @@ var fileDescriptor_a762e9d6ba7af420 = []byte{ // 560 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0x4d, 0x6f, 0xd3, 0x40, 0x10, 0x8d, 0x13, 0x13, 0xe8, 0xa6, 0x55, 0xe8, 0xa6, 0x54, 0xa6, 0x12, 0x6e, 0x54, 0x50, 0xe5, - 0x4b, 0x6d, 0x52, 0x90, 0x10, 0xc7, 0x58, 0x95, 0x20, 0x07, 0xa4, 0xca, 0xa5, 0x1c, 0x7a, 0xb1, - 0xd6, 0xf6, 0xc8, 0x59, 0xe2, 0x2f, 0x79, 0xd7, 0x51, 0xfa, 0x07, 0x38, 0x73, 0xe5, 0x1f, 0xf0, - 0x53, 0x7a, 0xec, 0x11, 0x71, 0xa8, 0x50, 0xf2, 0x47, 0xd0, 0xae, 0xd7, 0xc5, 0x1c, 0xe1, 0xe4, - 0xd1, 0xbe, 0x37, 0x6f, 0xdf, 0xbc, 0xf1, 0x22, 0x83, 0x54, 0x21, 0xa7, 0x79, 0xe6, 0x2c, 0x27, - 0x4e, 0x0c, 0x19, 0x30, 0xca, 0xec, 0xa2, 0xcc, 0x79, 0x8e, 0x91, 0x42, 0xec, 0xe5, 0xe4, 0x60, - 0xd4, 0x62, 0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0a, 0xed, 0x36, - 0xec, 0xa0, 0x2a, 0x95, 0xcd, 0x87, 0xff, 0x65, 0x73, 0xa8, 0x84, 0xdc, 0xaa, 0x94, 0x8e, 0xdc, - 0xd9, 0xcd, 0xda, 0xd4, 0x6e, 0xd7, 0xa6, 0xf6, 0x6b, 0x6d, 0x6a, 0x5f, 0x37, 0x66, 0xe7, 0x76, - 0x63, 0x76, 0x7e, 0x6c, 0xcc, 0xce, 0x95, 0xd3, 0x92, 0x2c, 0x20, 0x8e, 0xaf, 0x3f, 0x2f, 0x1d, - 0xb1, 0x72, 0x48, 0x28, 0x94, 0xce, 0xf2, 0x8d, 0xb3, 0x6a, 0xde, 0x69, 0xad, 0x1f, 0xf4, 0xe5, - 0xc3, 0x7c, 0xf5, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x5c, 0x26, 0xc1, 0x05, 0x04, 0x00, 0x00, + 0x4b, 0x6d, 0x52, 0x38, 0xc0, 0x31, 0x56, 0x25, 0xc8, 0x01, 0xa9, 0x72, 0x29, 0x87, 0x5e, 0xac, + 0xb5, 0x3d, 0x72, 0x96, 0xf8, 0x4b, 0xde, 0x75, 0x94, 0xfe, 0x01, 0xce, 0x5c, 0xf9, 0x07, 0xfc, + 0x94, 0x1e, 0x7b, 0x44, 0x1c, 0x2a, 0x94, 0xfc, 0x11, 0xb4, 0xeb, 0x75, 0x31, 0x47, 0x38, 0x79, + 0xb4, 0xef, 0xcd, 0xdb, 0x37, 0x6f, 0xbc, 0xc8, 0x20, 0x55, 0xc8, 0x69, 0x9e, 0x39, 0xcb, 0x89, + 0x13, 0x43, 0x06, 0x8c, 0x32, 0xbb, 0x28, 0x73, 0x9e, 0x63, 0xa4, 0x10, 0x7b, 0x39, 0x39, 0x18, + 0xb5, 0x58, 0x7c, 0x55, 0x13, 0x0e, 0xda, 0xad, 0x0d, 0xb7, 0x46, 0xf6, 0xe2, 0x3c, 0xce, 0x65, + 0xe9, 0x88, 0xaa, 0x3e, 0x3d, 0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 0xb3, 0x36, 0xb5, 0xdb, 0xb5, 0xa9, 0xfd, 0x5a, 0x9b, 0xda, 0xd7, 0x8d, 0xd9, 0xb9, 0xdd, + 0x98, 0x9d, 0x1f, 0x1b, 0xb3, 0x73, 0xe5, 0xb4, 0x24, 0x0b, 0x88, 0xe3, 0xeb, 0xcf, 0x4b, 0x47, + 0xac, 0x1c, 0x12, 0x0a, 0xa5, 0xb3, 0x7c, 0xe3, 0xac, 0x9a, 0x77, 0x5a, 0xeb, 0x07, 0x7d, 0xf9, + 0x30, 0x5f, 0xfd, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xd0, 0x33, 0x7d, 0x23, 0x05, 0x04, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/auction/types/msgs.go b/x/auction/types/msgs.go index 0f5827a62..381e159eb 100644 --- a/x/auction/types/msgs.go +++ b/x/auction/types/msgs.go @@ -4,7 +4,7 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/peggyjv/sommelier/v7/app/params" + "github.com/peggyjv/sommelier/v8/app/params" ) var ( diff --git a/x/auction/types/proposal.pb.go b/x/auction/types/proposal.pb.go index 111e70711..316ecab1e 100644 --- a/x/auction/types/proposal.pb.go +++ b/x/auction/types/proposal.pb.go @@ -163,7 +163,7 @@ var fileDescriptor_b838951ecd76ffbc = []byte{ // 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, + 0x0b, 0x2b, 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, @@ -178,8 +178,8 @@ var fileDescriptor_b838951ecd76ffbc = []byte{ 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, + 0x4c, 0xd1, 0xc6, 0x80, 0x5d, 0x1c, 0x57, 0x15, 0x5d, 0xfd, 0x06, 0x00, 0x00, 0xff, 0xff, 0x0d, + 0x13, 0xd2, 0x9b, 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 e21782a1f..90b6ca441 100644 --- a/x/auction/types/query.pb.go +++ b/x/auction/types/query.pb.go @@ -855,65 +855,65 @@ func init() { func init() { proto.RegisterFile("auction/v1/query.proto", fileDescriptor_73c48d70714d6628) } var fileDescriptor_73c48d70714d6628 = []byte{ - // 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, 0x4d, 0x75, 0xc7, 0x71, 0x03, 0x3d, 0xcc, 0xf7, 0x31, 0xba,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14, 0xf2, 0x11, 0x7f, - 0x8b, 0x54, 0x82, 0x70, 0xb5, 0xed, 0x85, 0xcb, 0x38, 0x93, 0x85, 0xec, 0x29, 0x32, 0x9b, 0x48, - 0x90, 0xfe, 0xad, 0x2e, 0x15, 0x6a, 0xa6, 0x3f, 0xcb, 0x2f, 0xd0, 0x3b, 0x72, 0x21, 0xd4, 0xdb, - 0x26, 0x4f, 0x67, 0xf4, 0x92, 0xb6, 0x8d, 0x13, 0xac, 0x70, 0x41, 0xbf, 0x71, 0x49, 0xc8, 0x6c, - 0x54, 0x17, 0x86, 0xa4, 0x92, 0xb1, 0x5b, 0x50, 0xb2, 0xbb, 0x8b, 0xee, 0x2c, 0x3f, 0x1e, 0x1b, - 0x8f, 0xa1, 0xd4, 0x57, 0x4f, 0xfe, 0xf9, 0x7d, 0x5d, 0xfa, 0xee, 0x8f, 0xbf, 0xcf, 0xca, 0x0a, - 0x54, 0xa9, 0xef, 0x76, 0xbb, 0xec, 0xc0, 0x66, 0x3d, 0x9a, 0x79, 0x6a, 0x62, 0x83, 0x86, 0xdf, - 0x24, 0x7c, 0x00, 0x72, 0x9e, 0x03, 0x2b, 0x05, 0x09, 0x91, 0x83, 0xcb, 0xab, 0xd3, 0xd2, 0x10, - 0xe8, 0x3d, 0x0e, 0xf4, 0x06, 0x34, 0xc4, 0x40, 0x7a, 0xb4, 0xb3, 0x9d, 0x38, 0x00, 0x3d, 0xe2, - 0x3f, 0x89, 0x63, 0xf8, 0x45, 0x22, 0xcf, 0x15, 0xec, 0x05, 0x6a, 0x05, 0x79, 0x81, 0xbd, 0xcb, - 0x2b, 0x53, 0xb2, 0x90, 0xf1, 0x5d, 0xce, 0xb8, 0x09, 0x75, 0x31, 0x23, 0x0b, 0x37, 0x8e, 0x41, - 0xfc, 0x49, 0xc2, 0x47, 0x33, 0xef, 0xde, 0x30, 0xa5, 0x47, 0xe9, 0x54, 0xd7, 0xa6, 0xe6, 0x21, - 0x68, 0x83, 0x83, 0xae, 0xc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x20, 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, + // 923 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xc7, 0xe3, 0x6c, 0x5b, 0x76, 0x27, 0xa0, 0x85, 0xb7, 0xa5, 0xb4, 0x6e, 0xf0, 0x82, 0x37, + 0x6d, 0xa1, 0x02, 0xcf, 0x26, 0x05, 0x95, 0x82, 0x00, 0x35, 0x12, 0x54, 0xe5, 0x97, 0x4a, 0x04, + 0x17, 0x2e, 0x91, 0x1d, 0x8f, 0x8c, 0xa1, 0xb1, 0xdd, 0xd8, 0x89, 0x88, 0xaa, 0x5e, 0x38, 0xf5, + 0x02, 0xaa, 0x54, 0x89, 0x03, 0xe2, 0x80, 0x10, 0x7f, 0x00, 0x7f, 0x46, 0x8f, 0x95, 0xb8, 0x70, + 0xaa, 0x50, 0x8b, 0xc4, 0xbf, 0x81, 0x6c, 0x3f, 0x7b, 0xec, 0x78, 0x92, 0xb4, 0x65, 0x6f, 0xf5, + 0xbc, 0x37, 0xef, 0xfb, 0x99, 0xf7, 0x26, 0xdf, 0x29, 0x59, 0xd0, 0xfb, 0x9d, 0xc0, 0x76, 0x1d, + 0x3a, 0xa8, 0xd3, 0x83, 0x3e, 0xeb, 0x0d, 0x35, 0xaf, 0xe7, 0x06, 0x2e, 0x10, 0x5c, 0xd7, 0x06, + 0x75, 0x79, 0xde, 0x72, 0x2d, 0x37, 0x5a, 0xa6, 0xe1, 0x5f, 0x71, 0x86, 0x5c, 0xb5, 0x5c, 0xd7, + 0xda, 0x67, 0x54, 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0x46, 0x55, 0x74, 0xa6, 0xb4, 0xed, 0x9f, 0x91, 0x65, + 0x61, 0x14, 0xb5, 0x28, 0xb9, 0x8b, 0x75, 0xc2, 0x01, 0xdc, 0x19, 0x27, 0x96, 0x26, 0xa9, 0xb6, + 0x80, 0x3c, 0x11, 0x83, 0x4f, 0x08, 0xe1, 0xb7, 0x01, 0xe1, 0x57, 0x35, 0xbc, 0x65, 0xe1, 0xd5, + 0xd1, 0xe2, 0x3b, 0x85, 0x57, 0x47, 0xdb, 0xd3, 0x2d, 0x86, 0x7b, 0x71, 0xc8, 0x99, 0xfd, 0xea, + 0x2f, 0x12, 0x9e, 0x6c, 0x44, 0xeb, 0x96, 0xe8, 0xf0, 0x69, 0x8e, 0xae, 0x1c, 0xd1, 0xad, 0x4d, + 0xa5, 0x8b, 0xd5, 0x04, 0x78, 0x3b, 0xe4, 0x7e, 0x44, 0xd7, 0xb4, 0xcd, 0xe4, 0xfc, 0xcf, 0x93, + 0x39, 0xc3, 0x36, 0x93, 0x89, 0xcf, 0xb4, 0x66, 0x0d, 0xdb, 0xdc, 0x35, 0x47, 0x2e, 0x43, 0x79, + 0xf4, 0x32, 0xbc, 0x49, 0x9e, 0xe5, 0x85, 0xf0, 0x70, 0x2f, 0x93, 0x3b, 0x06, 0x96, 0xa9, 0x34, + 0xee, 0x67, 0xcf, 0x15, 0x66, 0x85, 0x31, 0xf5, 0x58, 0xc2, 0x51, 0x34, 0x6d, 0xd3, 0x6f, 0x0e, + 0x6f, 0x74, 0x01, 0x47, 0x26, 0x55, 0xfe, 0x9f, 0x93, 0x3a, 0x49, 0x26, 0x35, 0x82, 0x82, 0x87, + 0x79, 0x44, 0x66, 0x0c, 0xdb, 0x4c, 0xa6, 0x54, 0x38, 0x4d, 0x14, 0x7c, 0xd2, 0xd3, 0xd1, 0xc8, + 0x42, 0x44, 0xf4, 0x85, 0xfb, 0x2d, 0x73, 0xf6, 0x7a, 0x76, 0x27, 0xc1, 0x87, 0x79, 0x32, 0x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0x5a, 0x76, 0xf0, 0x75, + 0xdf, 0xd0, 0x3a, 0x6e, 0x97, 0x7a, 0xcc, 0xb2, 0x86, 0xdf, 0x0c, 0x32, 0xf5, 0x06, 0x6f, 0xd1, + 0xef, 0xd2, 0xa2, 0xc1, 0xd0, 0x63, 0xbe, 0x31, 0x17, 0xfd, 0xb7, 0xbc, 0xf1, 0x5f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xae, 0xa0, 0x39, 0x31, 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 b507eda55..5cb49d230 100644 --- a/x/auction/types/tx.pb.go +++ b/x/auction/types/tx.pb.go @@ -151,34 +151,34 @@ func init() { func init() { proto.RegisterFile("auction/v1/tx.proto", fileDescriptor_a60fe804de30894a) } var fileDescriptor_a60fe804de30894a = []byte{ - // 423 bytes of a gzipped FileDescriptorProto + // 422 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, 0xaa, 0xe4, 0x4e, 0x22, 0x3d, 0x3a, 0x9d, - 0x3a, 0xd8, 0xca, 0x31, 0x20, 0xd8, 0x08, 0x0b, 0x37, 0x1c, 0x43, 0x80, 0xa5, 0x42, 0xb2, 0xf2, - 0xc7, 0x32, 0x86, 0xda, 0x0e, 0x67, 0x27, 0x4a, 0x37, 0xc4, 0x27, 0xe0, 0xa3, 0xf4, 0x63, 0x74, - 0xec, 0xc8, 0x84, 0xd0, 0xdd, 0xd0, 0x8f, 0x01, 0x72, 0xe2, 0x40, 0x91, 0x40, 0xea, 0x96, 0xf7, - 0xfb, 0xf3, 0xf2, 0xde, 0xef, 0x19, 0xee, 0xa7, 0x55, 0x6e, 0x85, 0x56, 0xa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d, 0x75, 0x2e, 0x74, 0x0a, 0x27, 0x26, 0x3d, + 0x63, 0xd4, 0xea, 0x8f, 0x4c, 0x51, 0x29, 0x94, 0x90, 0x95, 0xa4, 0xa9, 0xd4, 0x95, 0xb2, 0xc1, + 0xce, 0xed, 0x5a, 0x1e, 0xba, 0x0e, 0x6f, 0x5c, 0x83, 0x55, 0xe7, 0x7f, 0xde, 0xda, 0x9f, 0x8d, + 0xbf, 0x5c, 0x5f, 0x9c, 0xf8, 0x91, 0x8f, 0x9f, 0xc2, 0x83, 0xbf, 0x03, 0x30, 0xa5, 0x56, 0x86, + 0xa1, 0x47, 0x70, 0x98, 0xf9, 0xd5, 0xc7, 0x8b, 0x7b, 0xf8, 0xcf, 0xdd, 0xb0, 0x53, 0x39, 0x6e, + 0xf1, 0x0e, 0x0e, 0x57, 0x86, 0xa3, 0x57, 0x70, 0xf4, 0xdb, 0x8e, 0x8e, 0x6e, 0x2a, 0xff, 0x91, + 0xec, 0x74, 0xf6, 0x7f, 0x41, 0xf7, 0xe7, 0xe9, 0xdd, 0xcf, 0xd7, 0x17, 0x27, 0x20, 0x5e, 0x5e, + 0x6e, 0x42, 0x70, 0xb5, 0x09, 0xc1, 0x8f, 0x4d, 0x08, 0xbe, 0x6e, 0xc3, 0xc1, 0xd5, 0x36, 0x1c, + 0x7c, 0xdb, 0x86, 0x83, 0x53, 0xc2, 0x85, 0x7d, 0x5f, 0x65, 0x38, 0xd7, 0x92, 0x94, 0x8c, 0xf3, + 0xf3, 0x0f, 0x35, 0x71, 0xa1, 0xb1, 0x33, 0xc1, 0xd6, 0xa4, 0x7e, 0x42, 0x9a, 0xfe, 0x3d, 0x11, + 0x7b, 0x5e, 0x32, 0x93, 0xed, 0xb6, 0xc7, 0x7e, 0xfc, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x46, + 0xe1, 0x66, 0x93, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/axelarcork/client/cli/query.go b/x/axelarcork/client/cli/query.go index 94e8781f9..b960e3ab9 100644 --- a/x/axelarcork/client/cli/query.go +++ b/x/axelarcork/client/cli/query.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/peggyjv/sommelier/v7/x/axelarcork/types" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" "github.com/spf13/cobra" ) @@ -297,7 +297,7 @@ func queryScheduledCorksByID() *cobra.Command { func queryCorkResult() *cobra.Command { cmd := &cobra.Command{ - Use: "cork-result [chain-id] [cork-id]", + Use: "cork-result [cork-id] [chain-id]", Aliases: []string{"cr"}, Args: cobra.ExactArgs(2), Short: "query cork result from the chain", diff --git a/x/axelarcork/client/cli/tx.go b/x/axelarcork/client/cli/tx.go index df7fd59cc..d0546c92a 100644 --- a/x/axelarcork/client/cli/tx.go +++ b/x/axelarcork/client/cli/tx.go @@ -14,8 +14,8 @@ 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/axelarcork/types" - pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" + types "github.com/peggyjv/sommelier/v8/x/axelarcork/types" + pubsubtypes "github.com/peggyjv/sommelier/v8/x/pubsub/types" "github.com/spf13/cobra" ) diff --git a/x/axelarcork/client/cli/tx_test.go b/x/axelarcork/client/cli/tx_test.go index fff2e355c..7b049cf6c 100644 --- a/x/axelarcork/client/cli/tx_test.go +++ b/x/axelarcork/client/cli/tx_test.go @@ -5,7 +5,7 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/axelarcork/types" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" "github.com/cosmos/cosmos-sdk/testutil" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" diff --git a/x/axelarcork/client/cli/util.go b/x/axelarcork/client/cli/util.go index 9a9f2b651..575d9e9e6 100644 --- a/x/axelarcork/client/cli/util.go +++ b/x/axelarcork/client/cli/util.go @@ -4,7 +4,7 @@ import ( "os" "github.com/cosmos/cosmos-sdk/codec" - "github.com/peggyjv/sommelier/v7/x/axelarcork/types" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" ) // ParseCommunityPoolSpendProposal reads and parses a CommunityPoolEthereumSpendProposalForCLI from a file. diff --git a/x/axelarcork/client/proposal_handler.go b/x/axelarcork/client/proposal_handler.go index 4416bac98..37a488272 100644 --- a/x/axelarcork/client/proposal_handler.go +++ b/x/axelarcork/client/proposal_handler.go @@ -2,7 +2,7 @@ package client import ( govclient "github.com/cosmos/cosmos-sdk/x/gov/client" - "github.com/peggyjv/sommelier/v7/x/axelarcork/client/cli" + "github.com/peggyjv/sommelier/v8/x/axelarcork/client/cli" ) var ( diff --git a/x/axelarcork/handler.go b/x/axelarcork/handler.go index 57e8f68dd..ca52ffe23 100644 --- a/x/axelarcork/handler.go +++ b/x/axelarcork/handler.go @@ -6,8 +6,8 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/peggyjv/sommelier/v7/x/axelarcork/keeper" - "github.com/peggyjv/sommelier/v7/x/axelarcork/types" + "github.com/peggyjv/sommelier/v8/x/axelarcork/keeper" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" ) // NewHandler returns a handler for "axelarcork" type messages. diff --git a/x/axelarcork/ibc_middleware.go b/x/axelarcork/ibc_middleware.go index 61aebcbe4..18d5c0f46 100644 --- a/x/axelarcork/ibc_middleware.go +++ b/x/axelarcork/ibc_middleware.go @@ -7,7 +7,7 @@ import ( "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" + "github.com/peggyjv/sommelier/v8/x/axelarcork/keeper" ) var _ porttypes.Middleware = &IBCMiddleware{} diff --git a/x/axelarcork/keeper/abci.go b/x/axelarcork/keeper/abci.go index 3382cb05d..73f24f24b 100644 --- a/x/axelarcork/keeper/abci.go +++ b/x/axelarcork/keeper/abci.go @@ -1,12 +1,13 @@ package keeper import ( + "encoding/hex" "fmt" "github.com/ethereum/go-ethereum/common" distributionTypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/peggyjv/sommelier/v7/x/axelarcork/types" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -33,6 +34,18 @@ func (k Keeper) EndBlocker(ctx sdk.Context) { "chain id", config.Id) for _, c := range winningScheduledVotes { k.SetWinningAxelarCork(ctx, config.Id, uint64(ctx.BlockHeight()), c) + + ctx.EventManager().EmitEvents( + sdk.Events{ + sdk.NewEvent( + types.EventTypeAxelarCorkApproved, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + sdk.NewAttribute(types.AttributeKeyCork, c.String()), + sdk.NewAttribute(types.AttributeKeyBlockHeight, fmt.Sprintf("%d", ctx.BlockHeight())), + sdk.NewAttribute(types.AttributeKeyCorkID, hex.EncodeToString(c.IDHash(uint64(ctx.BlockHeight())))), + ), + }, + ) } } diff --git a/x/axelarcork/keeper/chain_config.go b/x/axelarcork/keeper/chain_config.go index e9e9763cc..7e1067087 100644 --- a/x/axelarcork/keeper/chain_config.go +++ b/x/axelarcork/keeper/chain_config.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/axelarcork/types" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" ) func (k Keeper) GetChainConfigurationByID(ctx sdk.Context, chainID uint64) (types.ChainConfiguration, bool) { diff --git a/x/axelarcork/keeper/genesis.go b/x/axelarcork/keeper/genesis.go index 141e584ab..55e044191 100644 --- a/x/axelarcork/keeper/genesis.go +++ b/x/axelarcork/keeper/genesis.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/peggyjv/sommelier/v7/x/axelarcork/types" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" ) // InitGenesis initialize default parameters diff --git a/x/axelarcork/keeper/keeper.go b/x/axelarcork/keeper/keeper.go index 35d75b304..9fbfde874 100644 --- a/x/axelarcork/keeper/keeper.go +++ b/x/axelarcork/keeper/keeper.go @@ -19,7 +19,7 @@ import ( 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/peggyjv/sommelier/v8/x/axelarcork/types" ) var _ porttypes.ICS4Wrapper = &Keeper{} diff --git a/x/axelarcork/keeper/keeper_test.go b/x/axelarcork/keeper/keeper_test.go index a999f6b65..1aa3c0a5b 100644 --- a/x/axelarcork/keeper/keeper_test.go +++ b/x/axelarcork/keeper/keeper_test.go @@ -4,7 +4,7 @@ import ( "encoding/hex" "testing" - "github.com/peggyjv/sommelier/v7/x/axelarcork/tests/mocks" + "github.com/peggyjv/sommelier/v8/x/axelarcork/tests/mocks" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmtime "github.com/cometbft/cometbft/types/time" @@ -17,8 +17,8 @@ import ( paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" "github.com/ethereum/go-ethereum/common" "github.com/golang/mock/gomock" - moduletestutil "github.com/peggyjv/sommelier/v7/testutil" - "github.com/peggyjv/sommelier/v7/x/axelarcork/types" + moduletestutil "github.com/peggyjv/sommelier/v8/testutil" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" "github.com/stretchr/testify/suite" ) diff --git a/x/axelarcork/keeper/msg_server.go b/x/axelarcork/keeper/msg_server.go index 1fbee4faa..08b2866ad 100644 --- a/x/axelarcork/keeper/msg_server.go +++ b/x/axelarcork/keeper/msg_server.go @@ -16,7 +16,7 @@ import ( 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" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" ) var _ types.MsgServer = Keeper{} @@ -131,6 +131,15 @@ func (k Keeper) RelayCork(c context.Context, msg *types.MsgRelayAxelarCorkReques return nil, err } + ctx.EventManager().EmitEvents( + sdk.Events{ + sdk.NewEvent(types.EventTypeAxelarCorkRelayCalled, + sdk.NewAttribute(types.AttributeKeyCork, cork.String()), + sdk.NewAttribute(types.AttributeKeyDeadline, fmt.Sprintf("%d", cork.Deadline)), + ), + }, + ) + return &types.MsgRelayAxelarCorkResponse{}, nil } diff --git a/x/axelarcork/keeper/packet.go b/x/axelarcork/keeper/packet.go index 582abc483..9d5b95e78 100644 --- a/x/axelarcork/keeper/packet.go +++ b/x/axelarcork/keeper/packet.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/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" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" ) func (k Keeper) ValidateAxelarPacket(ctx sdk.Context, sourceChannel string, data []byte) error { diff --git a/x/axelarcork/keeper/proposal_handler.go b/x/axelarcork/keeper/proposal_handler.go index 07e120209..5ae5f1030 100644 --- a/x/axelarcork/keeper/proposal_handler.go +++ b/x/axelarcork/keeper/proposal_handler.go @@ -12,8 +12,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/axelarcork/types" - pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" + pubsubtypes "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) func NewAxelarSubscriptionID(chainID uint64, address common.Address) string { diff --git a/x/axelarcork/keeper/query_server.go b/x/axelarcork/keeper/query_server.go index 469d4dac2..d24a96aae 100644 --- a/x/axelarcork/keeper/query_server.go +++ b/x/axelarcork/keeper/query_server.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/axelarcork/types" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/x/axelarcork/keeper/query_server_test.go b/x/axelarcork/keeper/query_server_test.go index cdacc89a1..7b9e07f13 100644 --- a/x/axelarcork/keeper/query_server_test.go +++ b/x/axelarcork/keeper/query_server_test.go @@ -6,7 +6,7 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/axelarcork/types" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" ) const TestEVMChainID = 2 diff --git a/x/axelarcork/keeper/setup_unit_test.go b/x/axelarcork/keeper/setup_unit_test.go index bd21dc7b1..7966821cc 100644 --- a/x/axelarcork/keeper/setup_unit_test.go +++ b/x/axelarcork/keeper/setup_unit_test.go @@ -4,8 +4,8 @@ import ( "reflect" "testing" - "github.com/peggyjv/sommelier/v7/x/axelarcork/tests/mocks" - "github.com/peggyjv/sommelier/v7/x/axelarcork/types" + "github.com/peggyjv/sommelier/v8/x/axelarcork/tests/mocks" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" tmdb "github.com/cometbft/cometbft-db" "github.com/cometbft/cometbft/libs/log" diff --git a/x/axelarcork/module.go b/x/axelarcork/module.go index dfdc019d9..29ab3403b 100644 --- a/x/axelarcork/module.go +++ b/x/axelarcork/module.go @@ -12,9 +12,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" sim "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/peggyjv/sommelier/v7/x/axelarcork/client/cli" - "github.com/peggyjv/sommelier/v7/x/axelarcork/keeper" - "github.com/peggyjv/sommelier/v7/x/axelarcork/types" + "github.com/peggyjv/sommelier/v8/x/axelarcork/client/cli" + "github.com/peggyjv/sommelier/v8/x/axelarcork/keeper" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" "github.com/spf13/cobra" ) diff --git a/x/axelarcork/module_test.go b/x/axelarcork/module_test.go index e46f1b02e..5523cd040 100644 --- a/x/axelarcork/module_test.go +++ b/x/axelarcork/module_test.go @@ -8,8 +8,8 @@ import ( 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" + "github.com/peggyjv/sommelier/v8/x/axelarcork/tests" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" "github.com/stretchr/testify/require" ) diff --git a/x/axelarcork/tests/mocks/expected_keepers_mocks.go b/x/axelarcork/tests/mocks/expected_keepers_mocks.go index 8c0e716d1..6bbe3f86e 100644 --- a/x/axelarcork/tests/mocks/expected_keepers_mocks.go +++ b/x/axelarcork/tests/mocks/expected_keepers_mocks.go @@ -20,7 +20,7 @@ import ( 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" + types8 "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) // MockAccountKeeper is a mock of AccountKeeper interface. diff --git a/x/axelarcork/tests/setup.go b/x/axelarcork/tests/setup.go index 7ec3b31e1..477b129c8 100644 --- a/x/axelarcork/tests/setup.go +++ b/x/axelarcork/tests/setup.go @@ -16,10 +16,10 @@ import ( paramstypes "github.com/cosmos/cosmos-sdk/x/params/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/peggyjv/sommelier/v8/x/axelarcork" + "github.com/peggyjv/sommelier/v8/x/axelarcork/keeper" + "github.com/peggyjv/sommelier/v8/x/axelarcork/tests/mocks" + "github.com/peggyjv/sommelier/v8/x/axelarcork/types" "github.com/stretchr/testify/require" ) diff --git a/x/axelarcork/types/axelarcork.pb.go b/x/axelarcork/types/axelarcork.pb.go index 4ba413828..01dcf42ae 100644 --- a/x/axelarcork/types/axelarcork.pb.go +++ b/x/axelarcork/types/axelarcork.pb.go @@ -685,7 +685,7 @@ var fileDescriptor_f8790c2a041a4f43 = []byte{ // 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, + 0xe6, 0xd0, 0x5d, 0x12, 0x24, 0x84, 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, @@ -730,7 +730,7 @@ var fileDescriptor_f8790c2a041a4f43 = []byte{ 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, + 0x02, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x72, 0x0f, 0x3c, 0x4c, 0x06, 0x00, 0x00, } func (m *AxelarCork) Marshal() (dAtA []byte, err error) { diff --git a/x/axelarcork/types/event.pb.go b/x/axelarcork/types/event.pb.go index f8292c034..319254b94 100644 --- a/x/axelarcork/types/event.pb.go +++ b/x/axelarcork/types/event.pb.go @@ -109,7 +109,7 @@ var fileDescriptor_568389573c9d22fd = []byte{ // 264 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0xbf, 0x4e, 0xc3, 0x30, 0x10, 0xc6, 0x6b, 0x08, 0x85, 0x1a, 0x18, 0xb0, 0x10, 0x4a, 0x11, 0xb2, 0x0a, 0x53, 0xa7, 0x58, - 0x85, 0x81, 0x1d, 0x84, 0x04, 0x12, 0x53, 0xd9, 0x58, 0xaa, 0xfc, 0x39, 0x39, 0x26, 0x4e, 0x2e, + 0x85, 0x85, 0x19, 0x84, 0x04, 0x12, 0x53, 0xd9, 0x58, 0xaa, 0xfc, 0x39, 0x39, 0x26, 0x4e, 0x2e, 0x72, 0x5c, 0xab, 0x7d, 0x0b, 0x76, 0x5e, 0x88, 0xb1, 0x23, 0x23, 0x4a, 0x5e, 0x04, 0xc5, 0x20, 0x95, 0xed, 0xfb, 0x7e, 0x3f, 0xcb, 0xa7, 0x3b, 0x3a, 0x8e, 0x57, 0xa0, 0x63, 0x93, 0xa2, 0x29, 0x84, 0x9b, 0x09, 0x70, 0x50, 0xd9, 0xa8, 0x36, 0x68, 0x91, 0x1d, 0x6f, 0x55, 0xe4, 0x66, 0xe7, @@ -123,7 +123,7 @@ var fileDescriptor_568389573c9d22fd = []byte{ 0xd8, 0x74, 0x7c, 0xf0, 0xd5, 0xf1, 0xc1, 0xeb, 0xb5, 0x54, 0x36, 0x5f, 0x26, 0x51, 0x8a, 0xa5, 0xa8, 0x41, 0xca, 0xf5, 0x9b, 0x13, 0x0d, 0x96, 0x25, 0x68, 0x05, 0x46, 0xb8, 0x5b, 0xb1, 0x12, 0xff, 0x2e, 0x63, 0xd7, 0x35, 0x34, 0xc9, 0xd0, 0xaf, 0x7c, 0xf3, 0x13, 0x00, 0x00, 0xff, 0xff, - 0x1a, 0x10, 0x35, 0x2f, 0x34, 0x01, 0x00, 0x00, + 0xa1, 0x0b, 0x93, 0x26, 0x34, 0x01, 0x00, 0x00, } func (m *ScheduleCorkEvent) Marshal() (dAtA []byte, err error) { diff --git a/x/axelarcork/types/events.go b/x/axelarcork/types/events.go new file mode 100644 index 000000000..bf52b8f13 --- /dev/null +++ b/x/axelarcork/types/events.go @@ -0,0 +1,14 @@ +package types + +// axelarcork module event types +const ( + EventTypeAxelarCorkApproved = "axelar_cork_approved" + EventTypeAxelarCorkRelayCalled = "axelar_cork_relay_called" + + AttributeKeyCork = "cork" + AttributeKeyBlockHeight = "block_height" + AttributeKeyCorkID = "cork_id" + AttributeKeyDeadline = "deadline" + + AttributeValueCategory = ModuleName +) diff --git a/x/axelarcork/types/expected_keepers.go b/x/axelarcork/types/expected_keepers.go index e278028d2..ab18cd2c6 100644 --- a/x/axelarcork/types/expected_keepers.go +++ b/x/axelarcork/types/expected_keepers.go @@ -17,7 +17,7 @@ import ( 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" + pubsubtypes "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) // AccountKeeper defines the expected account keeper. diff --git a/x/axelarcork/types/genesis.pb.go b/x/axelarcork/types/genesis.pb.go index a74f12d44..3910b345f 100644 --- a/x/axelarcork/types/genesis.pb.go +++ b/x/axelarcork/types/genesis.pb.go @@ -216,46 +216,46 @@ func init() { func init() { proto.RegisterFile("axelarcork/v1/genesis.proto", fileDescriptor_8d754a1cfeef5947) } var fileDescriptor_8d754a1cfeef5947 = []byte{ - // 623 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0xd1, 0x4e, 0xdb, 0x3c, - 0x1c, 0xc5, 0xdb, 0xaf, 0xa5, 0x05, 0x97, 0x8f, 0x0e, 0x97, 0x6d, 0x51, 0x91, 0xd2, 0x2a, 0x93, - 0x26, 0x2e, 0xb6, 0x46, 0xb0, 0x0b, 0xb4, 0xdd, 0xd1, 0xa2, 0x4d, 0x48, 0x08, 0x21, 0xb3, 0xdd, - 0x6c, 0x17, 0x91, 0xe3, 0x78, 0x69, 0x86, 0x13, 0x47, 0xb6, 0x53, 0xc1, 0x5b, 0xec, 0x15, 0xf6, - 0x16, 0x7b, 0x04, 0x2e, 0xb9, 0xdc, 0x55, 0x35, 0xc1, 0x1b, 0xf4, 0x09, 0xa6, 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// 624 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0xdf, 0x4e, 0xdb, 0x3e, + 0x1c, 0xc5, 0xdb, 0x5f, 0x4b, 0x0b, 0x2e, 0x3f, 0x3a, 0x5c, 0xb6, 0x45, 0x45, 0x4a, 0xab, 0x4c, + 0x9a, 0xb8, 0xd8, 0x1a, 0xc1, 0x2e, 0xf6, 0xe7, 0x8e, 0x16, 0x6d, 0x42, 0x42, 0x08, 0x99, 0xed, + 0x66, 0xbb, 0x88, 0x1c, 0xc7, 0x4b, 0x33, 0x9c, 0x38, 0xb2, 0x9d, 0x0a, 0xde, 0x62, 0xaf, 0xb0, + 0xb7, 0xd8, 0x23, 0x70, 0xc9, 0xe5, 0xae, 0xaa, 0x09, 0xde, 0xa0, 0x4f, 0x30, 0xc5, 0x4e, 0x69, + 0x9b, 0xb1, 0xbb, 0xf8, 0x9c, 0xcf, 0x39, 0x4e, 0xe2, 0xaf, 0x0c, 0x76, 0xf1, 0x25, 0x65, 0x58, + 0x10, 0x2e, 0x2e, 0xdc, 0xc9, 0xbe, 0x1b, 0xd2, 0x84, 0xca, 0x48, 0x0e, 0x52, 0xc1, 0x15, 0x87, + 0xff, 0x2f, 0xcc, 0xc1, 0x64, 0xbf, 0x6b, 0xaf, 0xb2, 0x4b, 0xa6, 0xc6, 0xbb, 0x3b, 0x21, 0x0f, + 0xb9, 0x7e, 0x74, 0xf3, 0x27, 0xa3, 0x3a, 0x3f, 0xea, 0x60, 0xf3, 0x83, 0xa9, 0x3d, 0x57, 0x58, + 0x51, 0xf8, 0x12, 0x34, 0x52, 0x2c, 0x70, 0x2c, 0xad, 0x6a, 0xbf, 0xba, 0xd7, 0x3a, 0x78, 0x3c, + 0x58, 0xd9, 0x66, 0x70, 0xa6, 0x4d, 0x54, 0x40, 0xf0, 0x0b, 0xd8, 0x21, 0x63, 0x1c, 0x25, 0x1e, + 0xe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, 0xea, 0x47, 0x23, + 0x0e, 0xb5, 0x36, 0x3c, 0xb9, 0xbe, 0xb5, 0xab, 0x37, 0xb7, 0x76, 0xf5, 0xf7, 0xad, 0x5d, 0xfd, + 0x7e, 0x67, 0x57, 0x6e, 0xee, 0xec, 0xca, 0xaf, 0x3b, 0xbb, 0xf2, 0xf9, 0x20, 0x8c, 0xd4, 0x38, + 0xf3, 0x07, 0x84, 0xc7, 0x6e, 0x4a, 0xc3, 0xf0, 0xea, 0xdb, 0xc4, 0x95, 0x3c, 0x8e, 0x29, 0x8b, + 0xa8, 0x70, 0x27, 0x6f, 0xdc, 0xcb, 0xa5, 0x2b, 0xc4, 0x55, 0x57, 0x29, 0x95, 0x7e, 0x43, 0xdf, + 0x19, 0xaf, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x32, 0x2c, 0xc1, 0xdf, 0x97, 0x04, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/axelarcork/types/proposal.go b/x/axelarcork/types/proposal.go index 1484ba705..7b32e841d 100644 --- a/x/axelarcork/types/proposal.go +++ b/x/axelarcork/types/proposal.go @@ -9,7 +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" + pubsubtypes "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) const ( diff --git a/x/axelarcork/types/proposal.pb.go b/x/axelarcork/types/proposal.pb.go index 55e8ac907..2559d1c18 100644 --- a/x/axelarcork/types/proposal.pb.go +++ b/x/axelarcork/types/proposal.pb.go @@ -1242,64 +1242,64 @@ func init() { proto.RegisterFile("axelarcork/v1/proposal.proto", fileDescriptor_ var fileDescriptor_5ffc5027adef0afd = []byte{ // 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, 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, + 0x14, 0xf6, 0xa4, 0xce, 0x0f, 0x8f, 0x53, 0x92, 0x6e, 0x53, 0x70, 0x43, 0xeb, 0x75, 0x56, 0xa8, + 0x72, 0xa1, 0xec, 0x2a, 0xae, 0x44, 0x4b, 0x6e, 0xf1, 0x46, 0x88, 0xa0, 0x22, 0x45, 0x8e, 0x10, + 0x12, 0x17, 0x6b, 0xbc, 0x33, 0xac, 0xa7, 0x99, 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, 0xc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, 0xee, 0xe8, 0xa4, 0x94, 0xfb, 0xed, 0xa4, - 0x94, 0xfb, 0xb2, 0xea, 0xd1, 0xb8, 0xd5, 0x6e, 0x5a, 0x2e, 0x0f, 0xec, 0x90, 0x78, 0x5e, 0xf7, - 0x69, 0xc7, 0x8e, 0x78, 0x10, 0x10, 0x9f, 0x12, 0x61, 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, + 0x25, 0x42, 0xe2, 0xec, 0xbf, 0x00, 0x79, 0x66, 0xed, 0xec, 0x26, 0x4d, 0x52, 0x48, 0xad, 0x0a, + 0x6e, 0x9e, 0xf7, 0xbd, 0xdd, 0xf9, 0xbe, 0x6f, 0xde, 0xbe, 0x37, 0x86, 0x77, 0xd0, 0x3e, 0x61, + 0x48, 0x7a, 0x42, 0xee, 0x39, 0xdd, 0x75, 0x27, 0x94, 0x22, 0x14, 0x11, 0x62, 0x76, 0x28, 0x45, + 0x2c, 0x8c, 0xeb, 0x27, 0xa8, 0xdd, 0x5d, 0x5f, 0x2d, 0x67, 0x93, 0x53, 0xa0, 0x4a, 0x5f, 0x5d, + 0xf1, 0x85, 0x2f, 0xd4, 0x4f, 0x67, 0xf4, 0x2b, 0x89, 0x96, 0x3d, 0x11, 0x05, 0x22, 0x72, 0x5a, + 0x28, 0x22, 0x4e, 0x77, 0xbd, 0x45, 0x62, 0xb4, 0xee, 0x78, 0x82, 0x72, 0x8d, 0x5b, 0xbf, 0x03, + 0xb8, 0xb6, 0x89, 0xf1, 0xa6, 0x7a, 0xdb, 0xa7, 0x88, 0x23, 0x9f, 0x60, 0x97, 0x30, 0x86, 0xe4, + 0xf6, 0x56, 0xb4, 0x93, 0x10, 0x32, 0x56, 0xe0, 0x6c, 0x4c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xff, + 0x81, 0x2c, 0x76, 0x31, 0xdd, 0x0d, 0x00, 0x00, } func (m *AddAxelarManagedCellarIDsProposal) Marshal() (dAtA []byte, err error) { diff --git a/x/axelarcork/types/query.pb.go b/x/axelarcork/types/query.pb.go index 4c71c01b3..ee96388a9 100644 --- a/x/axelarcork/types/query.pb.go +++ b/x/axelarcork/types/query.pb.go @@ -1394,9 +1394,9 @@ var fileDescriptor_7d10e4f1065c484f = []byte{ 0xbb, 0xe3, 0x20, 0xcc, 0xd7, 0x7f, 0xdc, 0xeb, 0x61, 0x53, 0xd7, 0x61, 0xed, 0x71, 0x9b, 0xda, 0x78, 0xfb, 0xe1, 0x51, 0x89, 0x79, 0x74, 0x54, 0x62, 0xfe, 0x3a, 0x2a, 0x31, 0x5f, 0x1e, 0x97, 0xfa, 0x1e, 0x1d, 0x97, 0xfa, 0xfe, 0x38, 0x2e, 0xf5, 0xdd, 0xab, 0xa8, 0x9a, 0xb3, 0xd3, 0xdc, - 0x2e, 0xcb, 0x66, 0x9d, 0x6f, 0x50, 0x55, 0x6d, 0x7d, 0xbc, 0x17, 0xa9, 0xb2, 0xb7, 0xca, 0xef, + 0x2e, 0xcb, 0x66, 0x9d, 0x6f, 0x50, 0x55, 0x6d, 0x7d, 0xbc, 0x17, 0xa9, 0xb2, 0xb7, 0xc6, 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, + 0xff, 0xff, 0x66, 0x5b, 0x0e, 0xe7, 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 101a0d2ba..64424e340 100644 --- a/x/axelarcork/types/tx.pb.go +++ b/x/axelarcork/types/tx.pb.go @@ -575,7 +575,7 @@ var fileDescriptor_7efa2af5736321fb = []byte{ // 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, + 0x82, 0x4f, 0x29, 0x02, 0x21, 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, @@ -613,7 +613,7 @@ var fileDescriptor_7efa2af5736321fb = []byte{ 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, + 0xff, 0xff, 0x2e, 0x42, 0x90, 0x04, 0xc5, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/cellarfees/client/cli/query.go b/x/cellarfees/client/cli/query.go index 7d025c7a9..6a49d201e 100644 --- a/x/cellarfees/client/cli/query.go +++ b/x/cellarfees/client/cli/query.go @@ -9,8 +9,8 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" - cellarfeestypesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" + cellarfeestypes "github.com/peggyjv/sommelier/v8/x/cellarfees/types" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2" ) // GetQueryCmd returns the cli query commands for this module diff --git a/x/cellarfees/client/cli/tx.go b/x/cellarfees/client/cli/tx.go index 486775ab8..125592eb4 100644 --- a/x/cellarfees/client/cli/tx.go +++ b/x/cellarfees/client/cli/tx.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" // "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + "github.com/peggyjv/sommelier/v8/x/cellarfees/types" ) var ( diff --git a/x/cellarfees/handler.go b/x/cellarfees/handler.go index dbd0119bf..f8fec48dd 100644 --- a/x/cellarfees/handler.go +++ b/x/cellarfees/handler.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/peggyjv/sommelier/v7/x/cellarfees/keeper" + "github.com/peggyjv/sommelier/v8/x/cellarfees/keeper" ) // NewHandler returns a handler for "cellarfees" type messages. diff --git a/x/cellarfees/keeper/abci.go b/x/cellarfees/keeper/abci.go index fa55c20bf..4824e87b6 100644 --- a/x/cellarfees/keeper/abci.go +++ b/x/cellarfees/keeper/abci.go @@ -3,8 +3,8 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - paramstypes "github.com/peggyjv/sommelier/v7/app/params" - "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + paramstypes "github.com/peggyjv/sommelier/v8/app/params" + "github.com/peggyjv/sommelier/v8/x/cellarfees/types" ) // BeginBlocker emits rewards each block they are available by sending them to the distribution module's fee collector diff --git a/x/cellarfees/keeper/abci_test.go b/x/cellarfees/keeper/abci_test.go index d10cd0951..3075f5a15 100644 --- a/x/cellarfees/keeper/abci_test.go +++ b/x/cellarfees/keeper/abci_test.go @@ -3,10 +3,10 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/golang/mock/gomock" - 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" - cellarfeestypesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" + appParams "github.com/peggyjv/sommelier/v8/app/params" + auctiontypes "github.com/peggyjv/sommelier/v8/x/auction/types" + cellarfeestypes "github.com/peggyjv/sommelier/v8/x/cellarfees/types" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2" ) func (suite *KeeperTestSuite) TestBeginBlockerZeroRewardsBalance() { diff --git a/x/cellarfees/keeper/auction.go b/x/cellarfees/keeper/auction.go index 111b0cd4c..40e1efc54 100644 --- a/x/cellarfees/keeper/auction.go +++ b/x/cellarfees/keeper/auction.go @@ -2,8 +2,8 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - auctiontypes "github.com/peggyjv/sommelier/v7/x/auction/types" - "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + auctiontypes "github.com/peggyjv/sommelier/v8/x/auction/types" + "github.com/peggyjv/sommelier/v8/x/cellarfees/types" ) // Attempts to start an auction for the provided denom diff --git a/x/cellarfees/keeper/auction_test.go b/x/cellarfees/keeper/auction_test.go index 6c52cb4ff..ccc19dafe 100644 --- a/x/cellarfees/keeper/auction_test.go +++ b/x/cellarfees/keeper/auction_test.go @@ -3,9 +3,9 @@ package keeper 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" - cellarfeestypesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" + auctionTypes "github.com/peggyjv/sommelier/v8/x/auction/types" + cellarfeestypes "github.com/peggyjv/sommelier/v8/x/cellarfees/types" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2" ) const feeDenom = "testdenom" diff --git a/x/cellarfees/keeper/cellarfees.go b/x/cellarfees/keeper/cellarfees.go index 399d039f9..43d5c0125 100644 --- a/x/cellarfees/keeper/cellarfees.go +++ b/x/cellarfees/keeper/cellarfees.go @@ -4,9 +4,9 @@ import ( "cosmossdk.io/math" 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" + "github.com/peggyjv/sommelier/v8/app/params" + auctiontypes "github.com/peggyjv/sommelier/v8/x/auction/types" + "github.com/peggyjv/sommelier/v8/x/cellarfees/types" ) // Getter for module account that holds the fee pool funds diff --git a/x/cellarfees/keeper/cellarfees_test.go b/x/cellarfees/keeper/cellarfees_test.go index a65d4fc2d..17a45613f 100644 --- a/x/cellarfees/keeper/cellarfees_test.go +++ b/x/cellarfees/keeper/cellarfees_test.go @@ -3,10 +3,10 @@ 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" + "github.com/peggyjv/sommelier/v8/app/params" + auctiontypes "github.com/peggyjv/sommelier/v8/x/auction/types" + cellarfeestypes "github.com/peggyjv/sommelier/v8/x/cellarfees/types" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2" ) func (suite *KeeperTestSuite) TestGetFeesAccount() { @@ -48,6 +48,7 @@ func (suite *KeeperTestSuite) TestGetBalanceUsdValue() { ctx, cellarfeesKeeper := suite.ctx, suite.cellarfeesKeeper require := suite.Require() + // Test case 1: Non-zero exponent balance := sdk.NewCoin("testdenom", sdk.NewInt(1000000)) usdPrice := sdk.NewDec(100) tokenPrice := auctiontypes.TokenPrice{ @@ -59,6 +60,19 @@ func (suite *KeeperTestSuite) TestGetBalanceUsdValue() { usdValue := cellarfeesKeeper.GetBalanceUsdValue(ctx, balance, tokenPrice) require.Equal(expectedUsdValue, usdValue) + + // Test case 2: Zero exponent + zeroExponentBalance := sdk.NewCoin("zerodenom", sdk.NewInt(500)) + zeroExponentUsdPrice := sdk.NewDec(50) + zeroExponentTokenPrice := auctiontypes.TokenPrice{ + Exponent: 0, + UsdPrice: zeroExponentUsdPrice, + } + + expectedZeroExponentUsdValue := zeroExponentUsdPrice.Mul(sdk.NewDecFromInt(zeroExponentBalance.Amount)) + zeroExponentUsdValue := cellarfeesKeeper.GetBalanceUsdValue(ctx, zeroExponentBalance, zeroExponentTokenPrice) + + require.Equal(expectedZeroExponentUsdValue, zeroExponentUsdValue) } func (suite *KeeperTestSuite) TestGetEmission() { diff --git a/x/cellarfees/keeper/genesis.go b/x/cellarfees/keeper/genesis.go index ea5d2c020..e89aaa89d 100644 --- a/x/cellarfees/keeper/genesis.go +++ b/x/cellarfees/keeper/genesis.go @@ -4,8 +4,8 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" - types "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" + cellarfeestypes "github.com/peggyjv/sommelier/v8/x/cellarfees/types" + types "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2" ) // InitGenesis initializes the module's state from a provided genesis diff --git a/x/cellarfees/keeper/genesis_test.go b/x/cellarfees/keeper/genesis_test.go index dfce65b31..40135728e 100644 --- a/x/cellarfees/keeper/genesis_test.go +++ b/x/cellarfees/keeper/genesis_test.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - cellarfeestypesv2 "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2" ) func (suite *KeeperTestSuite) TestImportingEmptyGenesis() { diff --git a/x/cellarfees/keeper/keeper.go b/x/cellarfees/keeper/keeper.go index 8a966f209..c24be7a2b 100644 --- a/x/cellarfees/keeper/keeper.go +++ b/x/cellarfees/keeper/keeper.go @@ -11,9 +11,9 @@ 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" - "github.com/peggyjv/sommelier/v7/app/params" - cellarfeestypes "github.com/peggyjv/sommelier/v7/x/cellarfees/types" - types "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" + "github.com/peggyjv/sommelier/v8/app/params" + cellarfeestypes "github.com/peggyjv/sommelier/v8/x/cellarfees/types" + types "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2" ) type Keeper struct { diff --git a/x/cellarfees/keeper/keeper_test.go b/x/cellarfees/keeper/keeper_test.go index 90ac9bea9..4aae49875 100644 --- a/x/cellarfees/keeper/keeper_test.go +++ b/x/cellarfees/keeper/keeper_test.go @@ -11,14 +11,14 @@ import ( minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" "github.com/golang/mock/gomock" - "github.com/peggyjv/sommelier/v7/app/params" - cellarfeestestutil "github.com/peggyjv/sommelier/v7/x/cellarfees/testutil" + "github.com/peggyjv/sommelier/v8/app/params" + cellarfeestestutil "github.com/peggyjv/sommelier/v8/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" + moduletestutil "github.com/peggyjv/sommelier/v8/testutil" + cellarfeestypes "github.com/peggyjv/sommelier/v8/x/cellarfees/types" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2" "github.com/stretchr/testify/suite" ) diff --git a/x/cellarfees/keeper/migrations.go b/x/cellarfees/keeper/migrations.go new file mode 100644 index 000000000..96f2c04f5 --- /dev/null +++ b/x/cellarfees/keeper/migrations.go @@ -0,0 +1,21 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + v1 "github.com/peggyjv/sommelier/v8/x/cellarfees/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, m.keeper.paramSpace) +} diff --git a/x/cellarfees/keeper/query_server.go b/x/cellarfees/keeper/query_server.go index 18a3e701e..6f58ac61b 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" - types "github.com/peggyjv/sommelier/v7/x/cellarfees/types/v2" + types "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/x/cellarfees/keeper/query_server_test.go b/x/cellarfees/keeper/query_server_test.go index 277f0b68f..65dd9d425 100644 --- a/x/cellarfees/keeper/query_server_test.go +++ b/x/cellarfees/keeper/query_server_test.go @@ -5,10 +5,10 @@ import ( 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" - 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" + "github.com/peggyjv/sommelier/v8/app/params" + auctiontypes "github.com/peggyjv/sommelier/v8/x/auction/types" + cellarfeestypes "github.com/peggyjv/sommelier/v8/x/cellarfees/types" + cellarfeestypesv2 "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/x/cellarfees/migrations/v1/keeper/abci.go b/x/cellarfees/migrations/v1/keeper/abci.go new file mode 100644 index 000000000..b1cfb18fd --- /dev/null +++ b/x/cellarfees/migrations/v1/keeper/abci.go @@ -0,0 +1,52 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/peggyjv/sommelier/v8/app/params" +) + +// 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) { + + // 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) + + // Handle reward emissions + moduleAccount := k.GetFeesAccount(ctx) + remainingRewardsSupply := k.bankKeeper.GetBalance(ctx, moduleAccount.GetAddress(), params.BaseCoinUnit).Amount + + if remainingRewardsSupply.IsZero() { + return + } + + emission := k.GetEmission(ctx, remainingRewardsSupply) + + // Send to fee collector for distribution + 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) {} diff --git a/x/cellarfees/migrations/v1/keeper/auction.go b/x/cellarfees/migrations/v1/keeper/auction.go new file mode 100644 index 000000000..b3d302621 --- /dev/null +++ b/x/cellarfees/migrations/v1/keeper/auction.go @@ -0,0 +1,50 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + auctiontypes "github.com/peggyjv/sommelier/v8/x/auction/types" + "github.com/peggyjv/sommelier/v8/x/cellarfees/types" +) + +// Attempts to start an auction for the provided denom +func (k Keeper) beginAuction(ctx sdk.Context, denom string) (started 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 { + 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) + return false + } + + err := k.auctionKeeper.BeginAuction( + ctx, + balance, + cellarfeesParams.InitialPriceDecreaseRate, + cellarfeesParams.PriceDecreaseBlockInterval, + types.ModuleName, + types.ModuleName, + ) + if err != nil { + switch err { + case auctiontypes.ErrUnauthorizedFundingModule: + panic("Attempted to start an auction with an unauthorized funding module") + case auctiontypes.ErrUnauthorizedProceedsModule: + panic("Attempted to start an auction with an unauthorized proceeds module") + default: + k.Logger(ctx).Error(err.Error()) + } + + return false + } + + return true +} diff --git a/x/cellarfees/migrations/v1/keeper/cellarfees.go b/x/cellarfees/migrations/v1/keeper/cellarfees.go new file mode 100644 index 000000000..4c386e9e0 --- /dev/null +++ b/x/cellarfees/migrations/v1/keeper/cellarfees.go @@ -0,0 +1,40 @@ +package keeper + +import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/peggyjv/sommelier/v8/app/params" + "github.com/peggyjv/sommelier/v8/x/cellarfees/types" +) + +// Getter for module account that holds the fee pool funds +func (k Keeper) GetFeesAccount(ctx sdk.Context) authtypes.ModuleAccountI { + return k.accountKeeper.GetModuleAccount(ctx, types.ModuleName) +} + +func (k Keeper) GetEmission(ctx sdk.Context, remainingRewardsSupply math.Int) sdk.Coins { + previousSupplyPeak := k.GetLastRewardSupplyPeak(ctx) + cellarfeesParams := k.GetParams(ctx) + + var emissionAmount math.Int + if remainingRewardsSupply.GT(previousSupplyPeak) { + k.SetLastRewardSupplyPeak(ctx, remainingRewardsSupply) + emissionAmount = remainingRewardsSupply.Quo(sdk.NewInt(int64(cellarfeesParams.RewardEmissionPeriod))) + } else { + emissionAmount = previousSupplyPeak.Quo(sdk.NewInt(int64(cellarfeesParams.RewardEmissionPeriod))) + } + + // Emission should be at least 1usomm and at most the remaining reward supply + if emissionAmount.IsZero() { + emissionAmount = sdk.OneInt() + } else if emissionAmount.GTE(remainingRewardsSupply) { + // We zero out the previous peak value here to avoid doing it every block. We set the final emission + // to the remaining supply here even though it's potentially redundant because it's less code than + // having another check where we would also have to zero out the prevoius peak supply. + k.SetLastRewardSupplyPeak(ctx, sdk.ZeroInt()) + emissionAmount = remainingRewardsSupply + } + + return sdk.NewCoins(sdk.NewCoin(params.BaseCoinUnit, emissionAmount)) +} diff --git a/x/cellarfees/migrations/v1/keeper/genesis.go b/x/cellarfees/migrations/v1/keeper/genesis.go new file mode 100644 index 000000000..31d798cce --- /dev/null +++ b/x/cellarfees/migrations/v1/keeper/genesis.go @@ -0,0 +1,31 @@ +package keeper + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + v1types "github.com/peggyjv/sommelier/v8/x/cellarfees/migrations/v1/types" + "github.com/peggyjv/sommelier/v8/x/cellarfees/types" +) + +// InitGenesis initializes the module's state from a provided genesis +// state. +func (k Keeper) InitGenesis(ctx sdk.Context, gs v1types.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)) + } +} + +// ExportGenesis returns the module's exported genesis. +func (k Keeper) ExportGenesis(ctx sdk.Context) v1types.GenesisState { + return v1types.GenesisState{ + Params: k.GetParams(ctx), + FeeAccrualCounters: k.GetFeeAccrualCounters(ctx), + LastRewardSupplyPeak: k.GetLastRewardSupplyPeak(ctx), + } +} diff --git a/x/cellarfees/migrations/v1/keeper/hooks.go b/x/cellarfees/migrations/v1/keeper/hooks.go new file mode 100644 index 000000000..684efd229 --- /dev/null +++ b/x/cellarfees/migrations/v1/keeper/hooks.go @@ -0,0 +1,76 @@ +package keeper + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/common" + gravitytypes "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/types" + "github.com/peggyjv/sommelier/v8/app/params" + "github.com/peggyjv/sommelier/v8/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/migrations/v1/keeper/keeper.go b/x/cellarfees/migrations/v1/keeper/keeper.go new file mode 100644 index 000000000..258c8255e --- /dev/null +++ b/x/cellarfees/migrations/v1/keeper/keeper.go @@ -0,0 +1,145 @@ +package keeper + +import ( + "fmt" + "math/big" + "sort" + "strings" + + "cosmossdk.io/math" + "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/v8/app/params" + v1types "github.com/peggyjv/sommelier/v8/x/cellarfees/migrations/v1/types" +) + +type Keeper struct { + cdc codec.BinaryCodec + storeKey storetypes.StoreKey + paramSpace paramtypes.Subspace + accountKeeper v1types.AccountKeeper + bankKeeper v1types.BankKeeper + mintKeeper v1types.MintKeeper + corkKeeper v1types.CorkKeeper + gravityKeeper v1types.GravityKeeper + auctionKeeper v1types.AuctionKeeper +} + +func NewKeeper( + cdc codec.BinaryCodec, + storeKey storetypes.StoreKey, + paramSpace paramtypes.Subspace, + accountKeeper v1types.AccountKeeper, + bankKeeper v1types.BankKeeper, + mintKeeper v1types.MintKeeper, + corkKeeper v1types.CorkKeeper, + gravityKeeper v1types.GravityKeeper, + auctionKeeper v1types.AuctionKeeper, +) Keeper { + if !paramSpace.HasKeyTable() { + paramSpace = paramSpace.WithKeyTable(v1types.ParamKeyTable()) + } + + return Keeper{ + cdc: cdc, + storeKey: storeKey, + paramSpace: paramSpace, + accountKeeper: accountKeeper, + 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", v1types.ModuleName)) +} + +//////////// +// Params // +//////////// + +func (k Keeper) GetParams(ctx sdk.Context) v1types.Params { + var p v1types.Params + k.paramSpace.GetParamSet(ctx, &p) + return p +} + +func (k Keeper) SetParams(ctx sdk.Context, params v1types.Params) { + k.paramSpace.SetParamSet(ctx, ¶ms) +} + +//////////////////////////////// +// Last highest reward supply // +//////////////////////////////// + +func (k Keeper) GetLastRewardSupplyPeak(ctx sdk.Context) math.Int { + store := ctx.KVStore(k.storeKey) + b := store.Get(v1types.GetLastRewardSupplyPeakKey()) + if b == nil { + panic("Last highest reward supply should not have been nil") + } + var amount big.Int + return sdk.NewIntFromBigInt((&amount).SetBytes(b)) +} + +func (k Keeper) SetLastRewardSupplyPeak(ctx sdk.Context, amount math.Int) { + store := ctx.KVStore(k.storeKey) + b := amount.BigInt().Bytes() + store.Set(v1types.GetLastRewardSupplyPeakKey(), b) +} + +////////////////////////// +// Fee accrual counters // +////////////////////////// + +func (k Keeper) GetFeeAccrualCounters(ctx sdk.Context) (counters v1types.FeeAccrualCounters) { + store := ctx.KVStore(k.storeKey) + b := store.Get(v1types.GetFeeAccrualCountersKey()) + if b == nil { + panic("Fee accrual counters is nil, it should have been set by InitGenesis") + } + if len(b) == 0 { + return v1types.DefaultFeeAccrualCounters() + } + + k.cdc.MustUnmarshal(b, &counters) + return +} + +func (k Keeper) SetFeeAccrualCounters(ctx sdk.Context, counters v1types.FeeAccrualCounters) { + store := ctx.KVStore(k.storeKey) + counterSlice := make([]v1types.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(v1types.GetFeeAccrualCountersKey(), b) +} + +//////////// +// APY // +//////////// + +func (k Keeper) GetAPY(ctx sdk.Context) sdk.Dec { + remainingRewardsSupply := k.bankKeeper.GetBalance(ctx, k.GetFeesAccount(ctx).GetAddress(), params.BaseCoinUnit).Amount + if remainingRewardsSupply.IsZero() { + return sdk.ZeroDec() + } + + mintParams := k.mintKeeper.GetParams(ctx) + bondedRatio := k.mintKeeper.BondedRatio(ctx) + totalCoins := k.mintKeeper.StakingTokenSupply(ctx) + emission := k.GetEmission(ctx, remainingRewardsSupply) + annualRewards := emission.AmountOf(params.BaseCoinUnit).Mul(sdk.NewInt(int64(mintParams.BlocksPerYear))) + + return sdk.NewDecFromInt(annualRewards).Quo(sdk.NewDecFromInt(totalCoins)).Quo(bondedRatio) +} diff --git a/x/cellarfees/migrations/v1/keeper/query_server.go b/x/cellarfees/migrations/v1/keeper/query_server.go new file mode 100644 index 000000000..eb808b6cc --- /dev/null +++ b/x/cellarfees/migrations/v1/keeper/query_server.go @@ -0,0 +1,54 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/peggyjv/sommelier/v8/x/cellarfees/migrations/v1/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +var _ types.QueryServer = Keeper{} + +func (k Keeper) QueryParams(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + return &types.QueryParamsResponse{ + Params: k.GetParams(sdk.UnwrapSDKContext(c)), + }, nil +} + +func (k Keeper) QueryModuleAccounts(c context.Context, req *types.QueryModuleAccountsRequest) (*types.QueryModuleAccountsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + return &types.QueryModuleAccountsResponse{ + FeesAddress: k.GetFeesAccount(sdk.UnwrapSDKContext(c)).GetAddress().String(), + }, nil +} + +func (k Keeper) QueryLastRewardSupplyPeak(c context.Context, req *types.QueryLastRewardSupplyPeakRequest) (*types.QueryLastRewardSupplyPeakResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + return &types.QueryLastRewardSupplyPeakResponse{LastRewardSupplyPeak: k.GetLastRewardSupplyPeak(sdk.UnwrapSDKContext(c))}, nil +} + +func (k Keeper) QueryFeeAccrualCounters(c context.Context, req *types.QueryFeeAccrualCountersRequest) (*types.QueryFeeAccrualCountersResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + return &types.QueryFeeAccrualCountersResponse{FeeAccrualCounters: k.GetFeeAccrualCounters(sdk.UnwrapSDKContext(c))}, nil +} + +func (k Keeper) QueryAPY(c context.Context, _ *types.QueryAPYRequest) (*types.QueryAPYResponse, error) { + return &types.QueryAPYResponse{ + Apy: k.GetAPY(sdk.UnwrapSDKContext(c)).String(), + }, nil +} diff --git a/x/cellarfees/migrations/v1/store.go b/x/cellarfees/migrations/v1/store.go new file mode 100644 index 000000000..1d4e8cd79 --- /dev/null +++ b/x/cellarfees/migrations/v1/store.go @@ -0,0 +1,68 @@ +package v1 + +import ( + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/store/prefix" + 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/v8/x/cellarfees/migrations/v1/types" + "github.com/peggyjv/sommelier/v8/x/cellarfees/types" + v2types "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2" +) + +func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec, paramSubspace paramstypes.Subspace) error { + ctx.Logger().Info("cellarfees v1 to v2: Beginning store migration") + + store := ctx.KVStore(storeKey) + err := migrateParamStore(ctx, paramSubspace) + if err != nil { + return err + } + + migrateCellarfeesFeeAccrualCounters(ctx, store) + + ctx.Logger().Info("cellarfees v1 to v2: Store migration complete") + + return nil +} + +func migrateParamStore(ctx sdk.Context, subspace paramstypes.Subspace) error { + ctx.Logger().Info("cellarfees v1 to v2: Migrating params") + + oldParamSet := &v1types.Params{} + subspace.GetParamSet(ctx, oldParamSet) + + newParamSet := &v2types.Params{} + newParamSet.AuctionThresholdUsdValue = v2types.DefaultParams().AuctionThresholdUsdValue + newParamSet.AuctionInterval = oldParamSet.AuctionInterval + newParamSet.InitialPriceDecreaseRate = oldParamSet.InitialPriceDecreaseRate + newParamSet.PriceDecreaseBlockInterval = oldParamSet.PriceDecreaseBlockInterval + newParamSet.RewardEmissionPeriod = oldParamSet.RewardEmissionPeriod + + err := newParamSet.ValidateBasic() + if err != nil { + return err + } + + // (Collin): Does this actually delete the old FeeAccrualCounters key? Does it matter? + subspace.SetParamSet(ctx, newParamSet) + + ctx.Logger().Info("cellarfees v1 to v2: Params migration complete") + return nil +} + +// Removes the old FeeAccrualCounters state +func migrateCellarfeesFeeAccrualCounters(ctx sdk.Context, store sdk.KVStore) { + ctx.Logger().Info("cellarfees v1 to v2: Migrating FeeAccrualCounters") + + prefixStore := prefix.NewStore(store, []byte{types.FeeAccrualCountersKey}) + iter := prefixStore.Iterator(nil, nil) + defer iter.Close() + + for ; iter.Valid(); iter.Next() { + prefixStore.Delete(iter.Key()) + } + + ctx.Logger().Info("cellarfees v1 to v2: FeeAccrualCounters migration complete") +} diff --git a/x/cellarfees/migrations/v1/types/cellarfees.go b/x/cellarfees/migrations/v1/types/cellarfees.go new file mode 100644 index 000000000..59e54f938 --- /dev/null +++ b/x/cellarfees/migrations/v1/types/cellarfees.go @@ -0,0 +1,68 @@ +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/migrations/v1/types/cellarfees.pb.go b/x/cellarfees/migrations/v1/types/cellarfees.pb.go new file mode 100644 index 000000000..61e7010ab --- /dev/null +++ b/x/cellarfees/migrations/v1/types/cellarfees.pb.go @@ -0,0 +1,536 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cellarfees/v1/cellarfees.proto + +package types + +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/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 FeeAccrualCounter struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` +} + +func (m *FeeAccrualCounter) Reset() { *m = FeeAccrualCounter{} } +func (m *FeeAccrualCounter) String() string { return proto.CompactTextString(m) } +func (*FeeAccrualCounter) ProtoMessage() {} +func (*FeeAccrualCounter) Descriptor() ([]byte, []int) { + return fileDescriptor_34c89ca12b610c1b, []int{0} +} +func (m *FeeAccrualCounter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FeeAccrualCounter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FeeAccrualCounter.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 *FeeAccrualCounter) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeeAccrualCounter.Merge(m, src) +} +func (m *FeeAccrualCounter) XXX_Size() int { + return m.Size() +} +func (m *FeeAccrualCounter) XXX_DiscardUnknown() { + xxx_messageInfo_FeeAccrualCounter.DiscardUnknown(m) +} + +var xxx_messageInfo_FeeAccrualCounter proto.InternalMessageInfo + +func (m *FeeAccrualCounter) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *FeeAccrualCounter) GetCount() uint64 { + if m != nil { + return m.Count + } + return 0 +} + +type FeeAccrualCounters struct { + Counters []FeeAccrualCounter `protobuf:"bytes,1,rep,name=counters,proto3" json:"counters"` +} + +func (m *FeeAccrualCounters) Reset() { *m = FeeAccrualCounters{} } +func (m *FeeAccrualCounters) String() string { return proto.CompactTextString(m) } +func (*FeeAccrualCounters) ProtoMessage() {} +func (*FeeAccrualCounters) Descriptor() ([]byte, []int) { + return fileDescriptor_34c89ca12b610c1b, []int{1} +} +func (m *FeeAccrualCounters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FeeAccrualCounters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FeeAccrualCounters.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 *FeeAccrualCounters) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeeAccrualCounters.Merge(m, src) +} +func (m *FeeAccrualCounters) XXX_Size() int { + return m.Size() +} +func (m *FeeAccrualCounters) XXX_DiscardUnknown() { + xxx_messageInfo_FeeAccrualCounters.DiscardUnknown(m) +} + +var xxx_messageInfo_FeeAccrualCounters proto.InternalMessageInfo + +func (m *FeeAccrualCounters) GetCounters() []FeeAccrualCounter { + if m != nil { + return m.Counters + } + return nil +} + +func init() { + proto.RegisterType((*FeeAccrualCounter)(nil), "cellarfees.v1.FeeAccrualCounter") + proto.RegisterType((*FeeAccrualCounters)(nil), "cellarfees.v1.FeeAccrualCounters") +} + +func init() { proto.RegisterFile("cellarfees/v1/cellarfees.proto", fileDescriptor_34c89ca12b610c1b) } + +var fileDescriptor_34c89ca12b610c1b = []byte{ + // 233 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0x4e, 0xcd, 0xc9, + 0x49, 0x2c, 0x4a, 0x4b, 0x4d, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 0x47, 0xf0, 0xf4, 0x0a, 0x8a, 0xf2, + 0x4b, 0xf2, 0x85, 0x78, 0x91, 0x44, 0xca, 0x0c, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x32, + 0xfa, 0x20, 0x16, 0x44, 0x91, 0x92, 0x3d, 0x97, 0xa0, 0x5b, 0x6a, 0xaa, 0x63, 0x72, 0x72, 0x51, + 0x69, 0x62, 0x8e, 0x73, 0x7e, 0x69, 0x5e, 0x49, 0x6a, 0x91, 0x90, 0x08, 0x17, 0x6b, 0x4a, 0x6a, + 0x5e, 0x7e, 0xae, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x84, 0x03, 0x12, 0x4d, 0x06, 0x29, + 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, + 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, +} + +func (m *FeeAccrualCounter) 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 *FeeAccrualCounter) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FeeAccrualCounter) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Count != 0 { + i = encodeVarintCellarfees(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x10 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintCellarfees(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FeeAccrualCounters) 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 *FeeAccrualCounters) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FeeAccrualCounters) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Counters) > 0 { + for iNdEx := len(m.Counters) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Counters[iNdEx].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 *FeeAccrualCounter) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovCellarfees(uint64(l)) + } + if m.Count != 0 { + n += 1 + sovCellarfees(uint64(m.Count)) + } + return n +} + +func (m *FeeAccrualCounters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Counters) > 0 { + for _, e := range m.Counters { + l = e.Size() + n += 1 + l + sovCellarfees(uint64(l)) + } + } + 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 *FeeAccrualCounter) 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: FeeAccrualCounter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeeAccrualCounter: 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 ErrIntOverflowCellarfees + } + 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 ErrInvalidLengthCellarfees + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCellarfees + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + m.Count = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCellarfees + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Count |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 (m *FeeAccrualCounters) 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: FeeAccrualCounters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeeAccrualCounters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Counters", 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 + } + m.Counters = append(m.Counters, FeeAccrualCounter{}) + if err := m.Counters[len(m.Counters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + 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/migrations/v1/types/codec.go b/x/cellarfees/migrations/v1/types/codec.go new file mode 100644 index 000000000..5454a5be6 --- /dev/null +++ b/x/cellarfees/migrations/v1/types/codec.go @@ -0,0 +1,18 @@ +package types + +import ( + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" +) + +func RegisterInterfaces(registry codectypes.InterfaceRegistry) { + registry.RegisterImplementations( + (*sdk.Msg)(nil), + ) + registry.RegisterImplementations( + (*govtypesv1beta1.Content)(nil), + ) + + //msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/x/cellarfees/migrations/v1/types/errors.go b/x/cellarfees/migrations/v1/types/errors.go new file mode 100644 index 000000000..a2fa9199e --- /dev/null +++ b/x/cellarfees/migrations/v1/types/errors.go @@ -0,0 +1,11 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" +) + +// x/cellarfees module sentinel errors +var ( + ErrInvalidFeeAccrualAuctionThreshold = errorsmod.Register(ModuleName, 2, "invalid fee accrual auction threshold") + ErrInvalidFeeAccrualCounters = errorsmod.Register(ModuleName, 6, "invalid fee accrual counters") +) diff --git a/x/cellarfees/migrations/v1/types/events.go b/x/cellarfees/migrations/v1/types/events.go new file mode 100644 index 000000000..62a45fddd --- /dev/null +++ b/x/cellarfees/migrations/v1/types/events.go @@ -0,0 +1,14 @@ +package types + +// cellarfees module event types +const ( + EventTypeFeeAccrual = "fee_accrual" + + AttributeKeyCellar = "cellar" + AttributeKeyTokenContract = "token_contract" + AttributeKeyDenom = "denom" + AttributeKeyAmount = "amount" + AttributeKeyCount = "count" + + AttributeValueCategory = ModuleName +) diff --git a/x/cellarfees/migrations/v1/types/expected_keepers.go b/x/cellarfees/migrations/v1/types/expected_keepers.go new file mode 100644 index 000000000..13fb71584 --- /dev/null +++ b/x/cellarfees/migrations/v1/types/expected_keepers.go @@ -0,0 +1,61 @@ +package types + +import ( + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + "github.com/ethereum/go-ethereum/common" + auctiontypes "github.com/peggyjv/sommelier/v8/x/auction/types" +) + +// AccountKeeper defines the expected account keeper. +type AccountKeeper interface { + GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI + + GetModuleAddress(name string) sdk.AccAddress + GetModuleAccount(ctx sdk.Context, name string) types.ModuleAccountI +} + +// BankKeeper defines the expected interface needed to retrieve account balances. +type BankKeeper interface { + GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin + LockedCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + + SendCoinsFromModuleToModule(ctx sdk.Context, senderModule string, recipientModule string, amt sdk.Coins) error + SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error + + BlockedAddr(addr sdk.AccAddress) bool +} + +// CorkKeeper defines the minimum interface needed to check registered Cellars +type CorkKeeper interface { + GetCellarIDs(ctx sdk.Context) (cellars []common.Address) + 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 + BeginAuction(ctx sdk.Context, + startingTokensForSale sdk.Coin, + initialPriceDecreaseRate sdk.Dec, + priceDecreaseBlockInterval uint64, + fundingModuleAccount string, + proceedsModuleAccount string) error +} + +// MintKeeper defines the expected mint keeper methods +type MintKeeper interface { + GetParams(ctx sdk.Context) minttypes.Params + StakingTokenSupply(ctx sdk.Context) math.Int + BondedRatio(ctx sdk.Context) sdk.Dec +} diff --git a/x/cellarfees/migrations/v1/types/genesis.go b/x/cellarfees/migrations/v1/types/genesis.go new file mode 100644 index 000000000..5e8c6ad5d --- /dev/null +++ b/x/cellarfees/migrations/v1/types/genesis.go @@ -0,0 +1,45 @@ +package types + +import ( + "sort" + + sdk "github.com/cosmos/cosmos-sdk/types" + types "github.com/peggyjv/sommelier/v8/x/cellarfees/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 types.ErrInvalidLastRewardSupplyPeak.Wrap("last reward supply peak cannot be less than zero!") + } + + return nil +} diff --git a/x/cellarfees/migrations/v1/types/genesis.pb.go b/x/cellarfees/migrations/v1/types/genesis.pb.go new file mode 100644 index 000000000..5c23e81b9 --- /dev/null +++ b/x/cellarfees/migrations/v1/types/genesis.pb.go @@ -0,0 +1,430 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cellarfees/v1/genesis.proto + +package types + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + 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"` + FeeAccrualCounters FeeAccrualCounters `protobuf:"bytes,2,opt,name=fee_accrual_counters,json=feeAccrualCounters,proto3" json:"fee_accrual_counters"` + 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_856aa03b4cb6eca9, []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 (m *GenesisState) GetFeeAccrualCounters() FeeAccrualCounters { + if m != nil { + return m.FeeAccrualCounters + } + return FeeAccrualCounters{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "cellarfees.v1.GenesisState") +} + +func init() { proto.RegisterFile("cellarfees/v1/genesis.proto", fileDescriptor_856aa03b4cb6eca9) } + +var fileDescriptor_856aa03b4cb6eca9 = []byte{ + // 326 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, + 0x7e, 0x63, 0xbf, 0x75, 0x84, 0x77, 0xbe, 0x80, 0xbb, 0x2e, 0xec, 0xfc, 0x9f, 0x2f, 0x6b, 0x5e, + 0xaf, 0xa8, 0x86, 0x0f, 0x41, 0x65, 0x04, 0x10, 0x53, 0xc6, 0x74, 0x4a, 0x45, 0xcc, 0x64, 0x3a, + 0xb5, 0xa0, 0x4d, 0xb5, 0xe4, 0x88, 0xd3, 0x5f, 0xc4, 0x0d, 0xc0, 0x55, 0xde, 0xbc, 0x2e, 0x8a, + 0x05, 0x17, 0x8e, 0xfe, 0x24, 0x21, 0x04, 0xc7, 0x82, 0x1a, 0x1b, 0x6b, 0x78, 0xa1, 0x7a, 0x18, + 0x9b, 0x54, 0x29, 0x31, 0x8b, 0x15, 0xd0, 0x49, 0xf5, 0x5f, 0xdd, 0x6f, 0xec, 0x75, 0xf0, 0xe6, + 0xe9, 0xe7, 0xb2, 0x76, 0xce, 0xc7, 0xf6, 0x29, 0x1d, 0x60, 0x26, 0x13, 0xc2, 0xa4, 0x49, 0xa4, + 0x29, 0x8e, 0x0b, 0x33, 0x9c, 0x10, 0x3b, 0x53, 0x60, 0xf0, 0xdd, 0xd4, 0xf6, 0x2a, 0x1b, 0xae, + 0xe7, 0xb4, 0xbe, 0xc3, 0xba, 0x40, 0x27, 0x9d, 0xfb, 0xf9, 0x0a, 0xf9, 0x8b, 0x15, 0xf2, 0xbf, + 0x56, 0xc8, 0x7f, 0x5f, 0x23, 0x6f, 0xb1, 0x46, 0xde, 0xc7, 0x1a, 0x79, 0x8f, 0xad, 0x2d, 0x57, + 0x01, 0xe7, 0xb3, 0xe7, 0x8c, 0x18, 0x99, 0x24, 0x20, 0xc6, 0xa0, 0x49, 0x76, 0x49, 0x5e, 0xb7, + 0xb6, 0x9a, 0xcf, 0x19, 0x94, 0xdd, 0x72, 0xdb, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x93, + 0x0c, 0xf6, 0xdc, 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.FeeAccrualCounters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + 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.FeeAccrualCounters.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 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeAccrualCounters", 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.FeeAccrualCounters.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/migrations/v1/types/keys.go b/x/cellarfees/migrations/v1/types/keys.go new file mode 100644 index 000000000..3495e8bc0 --- /dev/null +++ b/x/cellarfees/migrations/v1/types/keys.go @@ -0,0 +1,36 @@ +package types + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "cellarfees" + + // StoreKey is the store key string for cellarfees + StoreKey = ModuleName + + // RouterKey is the message route for cellarfees + RouterKey = ModuleName + + // QuerierRoute is the querier route for cellarfees + QuerierRoute = ModuleName +) + +const ( + // Store keys + _ = byte(iota) + + // key for storing the reward supply after the latest increase + LastRewardSupplyPeakKey + + // key for storing fee accrual counts + FeeAccrualCountersKey +) + +// GetLastRewardSupplyPeakKey returns the key prefix +func GetLastRewardSupplyPeakKey() []byte { + return []byte{LastRewardSupplyPeakKey} +} + +// GetFeeAccrualCountersKey returns the key prefix +func GetFeeAccrualCountersKey() []byte { + return []byte{FeeAccrualCountersKey} +} diff --git a/x/cellarfees/migrations/v1/types/params.go b/x/cellarfees/migrations/v1/types/params.go new file mode 100644 index 000000000..7cc7f6eba --- /dev/null +++ b/x/cellarfees/migrations/v1/types/params.go @@ -0,0 +1,154 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "gopkg.in/yaml.v2" + + types "github.com/peggyjv/sommelier/v8/x/cellarfees/types" +) + +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. + // This value was determined experimentally. It is the initial rate at which it takes ~48 hours for the unit + // price to hit 0 usomm, assuming a decrease acceleration rate of 0.001. + DefaultInitialPriceDecreaseRate string = "0.0000648" + // Blocks between each auction price decrease + DefaultPriceDecreaseBlockInterval uint64 = 10 + // Blocks between each auction + DefaultAuctionInterval uint64 = 15000 +) + +// Parameter keys +var ( + KeyFeeAccrualAuctionThreshold = []byte("FeeAccrualAuctionThreshold") + KeyRewardEmissionPeriod = []byte("RewardEmissionPeriod") + KeyInitialPriceDecreaseRate = []byte("InitialPriceDecreaseRate") + KeyPriceDecreaseBlockInterval = []byte("PriceDecreaseBlockInterval") + KeyAuctionInterval = []byte("AuctionInterval") +) + +var _ paramtypes.ParamSet = &Params{} + +// ParamKeyTable returns the parameter key table. +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +// DefaultParams returns default cellarfees parameters +func DefaultParams() Params { + return Params{ + FeeAccrualAuctionThreshold: DefaultFeeAccrualAuctionThreshold, + RewardEmissionPeriod: DefaultRewardEmissionPeriod, + InitialPriceDecreaseRate: sdk.MustNewDecFromStr(DefaultInitialPriceDecreaseRate), + PriceDecreaseBlockInterval: DefaultPriceDecreaseBlockInterval, + AuctionInterval: DefaultAuctionInterval, + } +} + +// 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), + } +} + +// 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 + } + if err := validateInitialPriceDecreaseRate(p.InitialPriceDecreaseRate); err != nil { + return err + } + if err := validatePriceDecreaseBlockInterval(p.PriceDecreaseBlockInterval); err != nil { + return err + } + 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(types.ErrInvalidRewardEmissionPeriod, "reward emission period: %T", i) + } + + if emissionPeriod == 0 { + return errorsmod.Wrapf(types.ErrInvalidRewardEmissionPeriod, "reward emission period cannot be zero") + } + + return nil +} + +func validateInitialPriceDecreaseRate(i interface{}) error { + rate, ok := i.(sdk.Dec) + if !ok { + return errorsmod.Wrapf(types.ErrInvalidInitialPriceDecreaseRate, "initial price decrease rate: %T", i) + } + + if rate == sdk.ZeroDec() { + return errorsmod.Wrapf(types.ErrInvalidInitialPriceDecreaseRate, "initial price decrease rate cannot be zero, must be 0 < x < 1") + } + + if rate == sdk.OneDec() { + return errorsmod.Wrapf(types.ErrInvalidInitialPriceDecreaseRate, "initial price decrease rate cannot be one, must be 0 < x < 1") + } + + return nil +} + +func validatePriceDecreaseBlockInterval(i interface{}) error { + interval, ok := i.(uint64) + if !ok { + return errorsmod.Wrapf(types.ErrInvalidPriceDecreaseBlockInterval, "price decrease block interval: %T", i) + } + + if interval == 0 { + return errorsmod.Wrapf(types.ErrInvalidPriceDecreaseBlockInterval, "price decrease block interval cannot be zero") + } + + return nil +} + +func validateAuctionInterval(i interface{}) error { + interval, ok := i.(uint64) + if !ok { + return errorsmod.Wrapf(types.ErrInvalidAuctionInterval, "auction interval: %T", i) + } + + if interval == 0 { + return errorsmod.Wrapf(types.ErrInvalidAuctionInterval, "auction interval cannot be zero") + } + + return nil +} + +// String implements the String interface +func (p Params) String() string { + out, _ := yaml.Marshal(p) + return string(out) +} diff --git a/x/cellarfees/migrations/v1/types/params.pb.go b/x/cellarfees/migrations/v1/types/params.pb.go new file mode 100644 index 000000000..a3e6e5469 --- /dev/null +++ b/x/cellarfees/migrations/v1/types/params.pb.go @@ -0,0 +1,471 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cellarfees/v1/params.proto + +package types + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + 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 { + // The number of fee accruals after which an auction should be started + FeeAccrualAuctionThreshold uint64 `protobuf:"varint,1,opt,name=fee_accrual_auction_threshold,json=feeAccrualAuctionThreshold,proto3" json:"fee_accrual_auction_threshold,omitempty"` + // 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"` +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_f3220ed6f8663c98, []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) GetFeeAccrualAuctionThreshold() uint64 { + if m != nil { + return m.FeeAccrualAuctionThreshold + } + return 0 +} + +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.v1.Params") +} + +func init() { proto.RegisterFile("cellarfees/v1/params.proto", fileDescriptor_f3220ed6f8663c98) } + +var fileDescriptor_f3220ed6f8663c98 = []byte{ + // 366 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, 0xb5, 0x21, 0x40, 0x3b, 0x67, 0xda, 0x39, 0x72, 0xbf, 0x21, + 0xdc, 0x4b, 0xe7, 0x40, 0xc2, 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, 0x15, 0xb3, 0xbb, 0x8b, + 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3d, 0x4d, 0xb2, 0xdd, 0xfe, 0x01, 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 + 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 + } + if m.FeeAccrualAuctionThreshold != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.FeeAccrualAuctionThreshold)) + i-- + dAtA[i] = 0x8 + } + 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.FeeAccrualAuctionThreshold != 0 { + n += 1 + sovParams(uint64(m.FeeAccrualAuctionThreshold)) + } + 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)) + } + 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 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeAccrualAuctionThreshold", wireType) + } + m.FeeAccrualAuctionThreshold = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeeAccrualAuctionThreshold |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 + } + } + 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/migrations/v1/types/query.pb.go b/x/cellarfees/migrations/v1/types/query.pb.go new file mode 100644 index 000000000..d9c3a281b --- /dev/null +++ b/x/cellarfees/migrations/v1/types/query.pb.go @@ -0,0 +1,1851 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cellarfees/v1/query.proto + +package types + +import ( + context "context" + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + _ "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_6f4742d3026cf20c, []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_6f4742d3026cf20c, []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_6f4742d3026cf20c, []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_6f4742d3026cf20c, []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_6f4742d3026cf20c, []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_6f4742d3026cf20c, []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 QueryFeeAccrualCountersRequest struct { +} + +func (m *QueryFeeAccrualCountersRequest) Reset() { *m = QueryFeeAccrualCountersRequest{} } +func (m *QueryFeeAccrualCountersRequest) String() string { return proto.CompactTextString(m) } +func (*QueryFeeAccrualCountersRequest) ProtoMessage() {} +func (*QueryFeeAccrualCountersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_6f4742d3026cf20c, []int{6} +} +func (m *QueryFeeAccrualCountersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeeAccrualCountersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeeAccrualCountersRequest.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 *QueryFeeAccrualCountersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeeAccrualCountersRequest.Merge(m, src) +} +func (m *QueryFeeAccrualCountersRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryFeeAccrualCountersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeeAccrualCountersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeeAccrualCountersRequest proto.InternalMessageInfo + +type QueryFeeAccrualCountersResponse struct { + FeeAccrualCounters FeeAccrualCounters `protobuf:"bytes,1,opt,name=fee_accrual_counters,json=feeAccrualCounters,proto3" json:"fee_accrual_counters"` +} + +func (m *QueryFeeAccrualCountersResponse) Reset() { *m = QueryFeeAccrualCountersResponse{} } +func (m *QueryFeeAccrualCountersResponse) String() string { return proto.CompactTextString(m) } +func (*QueryFeeAccrualCountersResponse) ProtoMessage() {} +func (*QueryFeeAccrualCountersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_6f4742d3026cf20c, []int{7} +} +func (m *QueryFeeAccrualCountersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryFeeAccrualCountersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryFeeAccrualCountersResponse.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 *QueryFeeAccrualCountersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryFeeAccrualCountersResponse.Merge(m, src) +} +func (m *QueryFeeAccrualCountersResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryFeeAccrualCountersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryFeeAccrualCountersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryFeeAccrualCountersResponse proto.InternalMessageInfo + +func (m *QueryFeeAccrualCountersResponse) GetFeeAccrualCounters() FeeAccrualCounters { + if m != nil { + return m.FeeAccrualCounters + } + return FeeAccrualCounters{} +} + +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_6f4742d3026cf20c, []int{8} +} +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_6f4742d3026cf20c, []int{9} +} +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 "" +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "cellarfees.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "cellarfees.v1.QueryParamsResponse") + proto.RegisterType((*QueryModuleAccountsRequest)(nil), "cellarfees.v1.QueryModuleAccountsRequest") + proto.RegisterType((*QueryModuleAccountsResponse)(nil), "cellarfees.v1.QueryModuleAccountsResponse") + proto.RegisterType((*QueryLastRewardSupplyPeakRequest)(nil), "cellarfees.v1.QueryLastRewardSupplyPeakRequest") + proto.RegisterType((*QueryLastRewardSupplyPeakResponse)(nil), "cellarfees.v1.QueryLastRewardSupplyPeakResponse") + proto.RegisterType((*QueryFeeAccrualCountersRequest)(nil), "cellarfees.v1.QueryFeeAccrualCountersRequest") + proto.RegisterType((*QueryFeeAccrualCountersResponse)(nil), "cellarfees.v1.QueryFeeAccrualCountersResponse") + proto.RegisterType((*QueryAPYRequest)(nil), "cellarfees.v1.QueryAPYRequest") + proto.RegisterType((*QueryAPYResponse)(nil), "cellarfees.v1.QueryAPYResponse") +} + +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, 0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d, 0x95, 0x25, 0x49, 0xd4, 0xef, + 0x7e, 0xfc, 0xf9, 0xf7, 0xeb, 0x7f, 0x55, 0x58, 0x46, 0x9c, 0xba, 0x2e, 0x71, 0xfa, 0xc4, 0x47, + 0x69, 0xd5, 0x87, 0xdf, 0x14, 0xd9, 0xdf, 0xc5, 0x56, 0xc1, 0x7b, 0x69, 0x21, 0xa9, 0xbd, 0x54, + 0x77, 0xd7, 0xb1, 0x4a, 0xae, 0xba, 0xe0, 0xda, 0x85, 0x3b, 0x99, 0x5c, 0xae, 0x78, 0x31, 0x3e, + 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, +} + +// 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) + QueryFeeAccrualCounters(ctx context.Context, in *QueryFeeAccrualCountersRequest, opts ...grpc.CallOption) (*QueryFeeAccrualCountersResponse, error) + QueryAPY(ctx context.Context, in *QueryAPYRequest, opts ...grpc.CallOption) (*QueryAPYResponse, 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.v1.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.v1.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.v1.Query/QueryLastRewardSupplyPeak", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) QueryFeeAccrualCounters(ctx context.Context, in *QueryFeeAccrualCountersRequest, opts ...grpc.CallOption) (*QueryFeeAccrualCountersResponse, error) { + out := new(QueryFeeAccrualCountersResponse) + err := c.cc.Invoke(ctx, "/cellarfees.v1.Query/QueryFeeAccrualCounters", 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.v1.Query/QueryAPY", 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) + QueryFeeAccrualCounters(context.Context, *QueryFeeAccrualCountersRequest) (*QueryFeeAccrualCountersResponse, error) + QueryAPY(context.Context, *QueryAPYRequest) (*QueryAPYResponse, 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) QueryFeeAccrualCounters(ctx context.Context, req *QueryFeeAccrualCountersRequest) (*QueryFeeAccrualCountersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryFeeAccrualCounters not implemented") +} +func (*UnimplementedQueryServer) QueryAPY(ctx context.Context, req *QueryAPYRequest) (*QueryAPYResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryAPY 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.v1.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.v1.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.v1.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_QueryFeeAccrualCounters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryFeeAccrualCountersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryFeeAccrualCounters(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cellarfees.v1.Query/QueryFeeAccrualCounters", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryFeeAccrualCounters(ctx, req.(*QueryFeeAccrualCountersRequest)) + } + 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.v1.Query/QueryAPY", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryAPY(ctx, req.(*QueryAPYRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cellarfees.v1.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: "QueryFeeAccrualCounters", + Handler: _Query_QueryFeeAccrualCounters_Handler, + }, + { + MethodName: "QueryAPY", + Handler: _Query_QueryAPY_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cellarfees/v1/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 *QueryFeeAccrualCountersRequest) 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 *QueryFeeAccrualCountersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeeAccrualCountersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryFeeAccrualCountersResponse) 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 *QueryFeeAccrualCountersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryFeeAccrualCountersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.FeeAccrualCounters.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 *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 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 *QueryFeeAccrualCountersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryFeeAccrualCountersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.FeeAccrualCounters.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 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 *QueryFeeAccrualCountersRequest) 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: QueryFeeAccrualCountersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeeAccrualCountersRequest: 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 *QueryFeeAccrualCountersResponse) 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: QueryFeeAccrualCountersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryFeeAccrualCountersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeAccrualCounters", 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.FeeAccrualCounters.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 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/migrations/v1/types/query.pb.gw.go b/x/cellarfees/migrations/v1/types/query.pb.gw.go new file mode 100644 index 000000000..009be4f05 --- /dev/null +++ b/x/cellarfees/migrations/v1/types/query.pb.gw.go @@ -0,0 +1,413 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: cellarfees/v1/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +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_QueryFeeAccrualCounters_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryFeeAccrualCountersRequest + var metadata runtime.ServerMetadata + + msg, err := client.QueryFeeAccrualCounters(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QueryFeeAccrualCounters_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryFeeAccrualCountersRequest + var metadata runtime.ServerMetadata + + msg, err := server.QueryFeeAccrualCounters(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 + +} + +// 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_QueryFeeAccrualCounters_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_QueryFeeAccrualCounters_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_QueryFeeAccrualCounters_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()...) + + }) + + 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_QueryFeeAccrualCounters_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_QueryFeeAccrualCounters_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_QueryFeeAccrualCounters_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()...) + + }) + + return nil +} + +var ( + pattern_Query_QueryParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "cellarfees", "v1", "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", "v1", "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", "v1", "last_reward_supply_peak"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_QueryFeeAccrualCounters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "cellarfees", "v1", "fee_accrual_counters"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_QueryAPY_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sommelier", "cellarfees", "v1", "apy"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_QueryParams_0 = runtime.ForwardResponseMessage + + forward_Query_QueryModuleAccounts_0 = runtime.ForwardResponseMessage + + forward_Query_QueryLastRewardSupplyPeak_0 = runtime.ForwardResponseMessage + + forward_Query_QueryFeeAccrualCounters_0 = runtime.ForwardResponseMessage + + forward_Query_QueryAPY_0 = runtime.ForwardResponseMessage +) diff --git a/x/cellarfees/module.go b/x/cellarfees/module.go index 7e35a42e4..6ca4e66a1 100644 --- a/x/cellarfees/module.go +++ b/x/cellarfees/module.go @@ -3,6 +3,7 @@ package cellarfees import ( "context" "encoding/json" + "fmt" abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" @@ -12,10 +13,10 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" sim "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/grpc-ecosystem/grpc-gateway/runtime" - "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/peggyjv/sommelier/v8/x/cellarfees/client/cli" + "github.com/peggyjv/sommelier/v8/x/cellarfees/keeper" + "github.com/peggyjv/sommelier/v8/x/cellarfees/types" + typesv2 "github.com/peggyjv/sommelier/v8/x/cellarfees/types/v2" "github.com/spf13/cobra" ) @@ -110,7 +111,7 @@ func (AppModule) QuerierRoute() string { return types.QuerierRoute } // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { - return 1 + return 2 } func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation { @@ -121,6 +122,11 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.We func (am AppModule) RegisterServices(cfg module.Configurator) { //types.RegisterMsgServer(cfg.MsgServer(), am.keeper) typesv2.RegisterQueryServer(cfg.QueryServer(), am.keeper) + + migrator := keeper.NewMigrator(am.keeper) + if err := cfg.RegisterMigration(types.ModuleName, 1, migrator.Migrate1to2); err != nil { + panic(fmt.Sprintf("failed to migrate x/cellarfees from version 1 to 2: %v", err)) + } } // InitGenesis performs genesis initialization for the cellarfees module. diff --git a/x/cellarfees/testutil/expected_keepers_mocks.go b/x/cellarfees/testutil/expected_keepers_mocks.go index 3ea8d6a1f..2e8f1c833 100644 --- a/x/cellarfees/testutil/expected_keepers_mocks.go +++ b/x/cellarfees/testutil/expected_keepers_mocks.go @@ -14,7 +14,7 @@ import ( types2 "github.com/cosmos/cosmos-sdk/x/mint/types" common "github.com/ethereum/go-ethereum/common" gomock "github.com/golang/mock/gomock" - types3 "github.com/peggyjv/sommelier/v7/x/auction/types" + types3 "github.com/peggyjv/sommelier/v8/x/auction/types" ) // MockAccountKeeper is a mock of AccountKeeper interface. diff --git a/x/cellarfees/types/errors.go b/x/cellarfees/types/errors.go index 8e587e9b1..2a1910f0d 100644 --- a/x/cellarfees/types/errors.go +++ b/x/cellarfees/types/errors.go @@ -6,11 +6,11 @@ import ( // x/cellarfees module sentinel errors var ( - ErrInvalidFeeAccrualAuctionThreshold = errorsmod.Register(ModuleName, 2, "invalid fee accrual auction threshold") + // Codes 2 and 6 were deleted during v2 module upgrade + ErrInvalidRewardEmissionPeriod = errorsmod.Register(ModuleName, 3, "invalid reward emission period") ErrInvalidInitialPriceDecreaseRate = errorsmod.Register(ModuleName, 4, "invalid initial price decrease rate") ErrInvalidPriceDecreaseBlockInterval = errorsmod.Register(ModuleName, 5, "invalid price decrease block interval") - 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 e1935a0bf..2e226bacf 100644 --- a/x/cellarfees/types/expected_keepers.go +++ b/x/cellarfees/types/expected_keepers.go @@ -7,7 +7,7 @@ import ( 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" + auctiontypes "github.com/peggyjv/sommelier/v8/x/auction/types" ) // AccountKeeper defines the expected account keeper. diff --git a/x/cellarfees/types/v1/cellarfees.pb.go b/x/cellarfees/types/v1/cellarfees.pb.go index 428fbf619..88c642733 100644 --- a/x/cellarfees/types/v1/cellarfees.pb.go +++ b/x/cellarfees/types/v1/cellarfees.pb.go @@ -140,9 +140,9 @@ var fileDescriptor_34c89ca12b610c1b = []byte{ 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, + 0xce, 0xcf, 0xcd, 0x4d, 0xcd, 0xc9, 0x4c, 0x2d, 0xd2, 0x2f, 0xb3, 0xd0, 0xaf, 0x40, 0x0a, 0x0d, 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, + 0xff, 0x11, 0x83, 0xae, 0x3d, 0x39, 0x01, 0x00, 0x00, } func (m *FeeAccrualCounter) Marshal() (dAtA []byte, err error) { diff --git a/x/cellarfees/types/v1/genesis.pb.go b/x/cellarfees/types/v1/genesis.pb.go index 03f711064..ea6bf9918 100644 --- a/x/cellarfees/types/v1/genesis.pb.go +++ b/x/cellarfees/types/v1/genesis.pb.go @@ -88,25 +88,25 @@ var fileDescriptor_856aa03b4cb6eca9 = []byte{ // 328 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0xd0, 0x31, 0x4f, 0x32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9, 0xf3, 0x25, 0xf2, 0xbf, + 0x96, 0xc8, 0x7f, 0x5f, 0x21, 0x6f, 0xbe, 0x42, 0xde, 0xc7, 0x0a, 0x79, 0x8f, 0x17, 0x1b, 0xae, + 0x02, 0xce, 0xa7, 0xcf, 0x19, 0x31, 0x32, 0x49, 0x40, 0x8c, 0x40, 0x93, 0xec, 0x92, 0xbc, 0x6e, + 0x6c, 0x35, 0x9f, 0x43, 0xb2, 0x66, 0xbf, 0xec, 0xf6, 0xdb, 0xfa, 0x0e, 0x00, 0x00, 0xff, 0xff, + 0x80, 0xfd, 0x88, 0x2e, 0xdf, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/cellarfees/types/v1/params.pb.go b/x/cellarfees/types/v1/params.pb.go index e77afb0ff..fa750dd24 100644 --- a/x/cellarfees/types/v1/params.pb.go +++ b/x/cellarfees/types/v1/params.pb.go @@ -109,7 +109,7 @@ var fileDescriptor_f3220ed6f8663c98 = []byte{ // 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, 0xa8, 0x08, 0xde, 0x36, 0xe6, 0xc1, 0x93, 0x63, 0x78, 0xf2, 0x12, 0xb2, 0xf4, 0x59, + 0xb0, 0x61, 0xa8, 0x20, 0xde, 0x36, 0xe6, 0xc1, 0x93, 0x63, 0x78, 0xf2, 0x12, 0xb2, 0xf4, 0x59, 0x17, 0x97, 0x2e, 0x25, 0xc9, 0xaa, 0xfb, 0x16, 0x1e, 0x3d, 0xfa, 0x71, 0x76, 0xdc, 0x51, 0x3c, 0x0c, 0xd9, 0xfc, 0x20, 0xd2, 0xb4, 0xd3, 0xe1, 0xa9, 0x25, 0xff, 0xdf, 0xef, 0x09, 0xff, 0x3c, 0x4e, 0x8d, 0x02, 0xe7, 0x44, 0x0e, 0x01, 0x14, 0x4a, 0x5b, 0x28, 0x21, 0x92, 0xc4, 0x2a, 0x48, @@ -129,7 +129,7 @@ var fileDescriptor_f3220ed6f8663c98 = []byte{ 0xbe, 0xbd, 0x58, 0xf9, 0xf6, 0xe7, 0xca, 0xb7, 0x5f, 0xd6, 0xbe, 0xb5, 0x58, 0xfb, 0xd6, 0xfb, 0xda, 0xb7, 0x1e, 0x2e, 0xb7, 0xfa, 0x24, 0x10, 0x45, 0xb3, 0xc7, 0x14, 0x29, 0x11, 0xc7, 0xc0, 0x19, 0x48, 0x94, 0x5e, 0xa1, 0x67, 0xb4, 0xb5, 0x63, 0xd3, 0x0f, 0xa5, 0xad, 0x41, 0xc5, 0xac, - 0xef, 0xfc, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xb0, 0x3a, 0x33, 0x01, 0x02, 0x00, 0x00, + 0xef, 0xfc, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x46, 0x6c, 0xb2, 0x6c, 0x01, 0x02, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/cellarfees/types/v1/query.pb.go b/x/cellarfees/types/v1/query.pb.go index 782936e6f..a4848c905 100644 --- a/x/cellarfees/types/v1/query.pb.go +++ b/x/cellarfees/types/v1/query.pb.go @@ -440,45 +440,45 @@ func init() { proto.RegisterFile("cellarfees/v1/query.proto", fileDescriptor_6f4 var fileDescriptor_6f4742d3026cf20c = []byte{ // 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, -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x87, 0xd5, 0x4c, 0xe4, 0x8c, 0x2f, 0x01, 0xfe, 0x50, + 0xc0, 0x66, 0x46, 0x39, 0x61, 0x25, 0x8d, 0x23, 0xb3, 0xe6, 0xaa, 0xb1, 0xaa, 0x5d, 0x42, 0xef, + 0x0b, 0x68, 0x04, 0x2b, 0x99, 0xd0, 0x69, 0x9f, 0x04, 0x1c, 0x80, 0x2b, 0x93, 0xf2, 0x42, 0x2d, + 0x2d, 0x72, 0x5a, 0x74, 0xb5, 0x98, 0xa9, 0x4b, 0x86, 0x6d, 0xc1, 0xa0, 0xc1, 0x42, 0x26, 0x03, + 0x66, 0x51, 0xf3, 0xc5, 0xf1, 0x48, 0x53, 0x4e, 0x46, 0x9a, 0xf2, 0x77, 0xa4, 0x29, 0x5f, 0xc7, + 0x5a, 0xee, 0x64, 0xac, 0xe5, 0x7e, 0x8f, 0xb5, 0xdc, 0xeb, 0xfd, 0x99, 0xab, 0x83, 0x11, 0xdb, + 0x8e, 0xde, 0x0e, 0x67, 0x26, 0x0d, 0x0f, 0xd0, 0xfb, 0xd9, 0x71, 0xe2, 0x2a, 0x41, 0xc3, 0xda, + 0xd1, 0x9a, 0xb8, 0xad, 0xf7, 0xfe, 0x07, 0x00, 0x00, 0xff, 0xff, 0xfb, 0xa0, 0xe6, 0x64, 0x49, 0x06, 0x00, 0x00, } diff --git a/x/cellarfees/types/v2/cellarfees.pb.go b/x/cellarfees/types/v2/cellarfees.pb.go index 06a19d364..32647afdd 100644 --- a/x/cellarfees/types/v2/cellarfees.pb.go +++ b/x/cellarfees/types/v2/cellarfees.pb.go @@ -89,7 +89,7 @@ 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, 0x44, 0x44, 0x08, 0x16, 0xeb, 0x0a, 0xe3, 0x62, 0xb5, 0xd5, 0x5c, - 0x36, 0x22, 0x62, 0x1b, 0xc1, 0x56, 0x58, 0xc4, 0xc2, 0x46, 0x26, 0xb3, 0xd7, 0x71, 0x74, 0x92, + 0x36, 0x22, 0x68, 0x1b, 0xc1, 0x56, 0x58, 0xc4, 0xc2, 0x46, 0x26, 0xb3, 0xd7, 0x71, 0x74, 0x92, 0x1b, 0x32, 0xc9, 0xe0, 0xbe, 0x85, 0x8f, 0xb5, 0xe5, 0x96, 0x56, 0x22, 0xc9, 0x8b, 0x48, 0x12, 0xc5, 0xed, 0xbe, 0x7b, 0x38, 0x7c, 0x70, 0x6e, 0xc8, 0x15, 0x5a, 0x2b, 0xcb, 0x67, 0x44, 0x07, 0x3e, 0x86, 0xff, 0x4b, 0x14, 0x25, 0x55, 0x14, 0x1d, 0x6e, 0x24, 0x3e, 0x1e, 0x73, 0x45, 0x2e, @@ -102,7 +102,7 @@ var fileDescriptor_f9a743a746b9d1be = []byte{ 0xf6, 0xdd, 0x70, 0xf6, 0xd1, 0xf2, 0x60, 0xdd, 0xf2, 0xe0, 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, + 0xc5, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8c, 0x0c, 0xc7, 0xb9, 0x29, 0x01, 0x00, 0x00, } func (m *FeeTokenBalance) Marshal() (dAtA []byte, err error) { diff --git a/x/cellarfees/types/v2/genesis.go b/x/cellarfees/types/v2/genesis.go index 67b93be09..a8f78d28a 100644 --- a/x/cellarfees/types/v2/genesis.go +++ b/x/cellarfees/types/v2/genesis.go @@ -2,7 +2,7 @@ package v2 import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/cellarfees/types" + "github.com/peggyjv/sommelier/v8/x/cellarfees/types" ) const DefaultParamspace = types.ModuleName diff --git a/x/cellarfees/types/v2/genesis.pb.go b/x/cellarfees/types/v2/genesis.pb.go index 8c6d715d4..093a57644 100644 --- a/x/cellarfees/types/v2/genesis.pb.go +++ b/x/cellarfees/types/v2/genesis.pb.go @@ -77,25 +77,26 @@ func init() { func init() { proto.RegisterFile("cellarfees/v2/genesis.proto", fileDescriptor_95cfe5fde263fa24) } var fileDescriptor_95cfe5fde263fa24 = []byte{ - // 288 bytes of a gzipped FileDescriptorProto + // 289 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0x41, 0x4b, 0xc3, 0x30, 0x18, 0x86, 0x1b, 0x37, 0x86, 0x56, 0x05, 0x19, 0x13, 0xc7, 0x84, 0x6c, 0x78, 0x90, 0x5d, 0x4c, - 0xa0, 0x43, 0xbc, 0xef, 0x22, 0x7a, 0x71, 0x6c, 0x37, 0x2f, 0x25, 0xeb, 0x3e, 0x63, 0x6d, 0xbb, - 0x84, 0x24, 0xab, 0xf6, 0x5f, 0xf8, 0x53, 0xfc, 0x19, 0x3b, 0xee, 0x28, 0x1e, 0x86, 0xb4, 0x7f, - 0x44, 0x9a, 0x16, 0xdc, 0x4e, 0xdf, 0x07, 0xef, 0xc3, 0xf3, 0xc2, 0xeb, 0x5e, 0x06, 0x10, 0xc7, - 0x4c, 0xbd, 0x00, 0x68, 0x9a, 0x7a, 0x94, 0xc3, 0x12, 0x74, 0xa8, 0x89, 0x54, 0xc2, 0x88, 0xf6, - 0xe9, 0x7f, 0x48, 0x52, 0xaf, 0xd7, 0xe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 0xad, 0x6d, 0x66, 0x65, 0x13, 0x60, 0xd1, 0x63, 0xf3, 0xf0, 0xe0, 0xac, + 0x31, 0x7e, 0x5a, 0xe7, 0x18, 0x6d, 0x72, 0x8c, 0x7e, 0x73, 0x8c, 0x3e, 0x0b, 0xec, 0x6c, 0x0a, + 0xec, 0x7c, 0x17, 0xd8, 0x79, 0xbe, 0xdd, 0xb1, 0x4b, 0xe0, 0x3c, 0x7b, 0x4b, 0xa9, 0x16, 0x49, + 0x02, 0x71, 0x08, 0x8a, 0xa6, 0x77, 0xf4, 0x83, 0xee, 0x4c, 0x61, 0xdb, 0x68, 0xea, 0xcd, 0x5b, + 0x76, 0x8a, 0xd1, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbe, 0xb1, 0x78, 0xba, 0x6a, 0x01, 0x00, + 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/cellarfees/types/v2/params.go b/x/cellarfees/types/v2/params.go index cecf3300e..2630e3b78 100644 --- a/x/cellarfees/types/v2/params.go +++ b/x/cellarfees/types/v2/params.go @@ -4,7 +4,7 @@ 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" + "github.com/peggyjv/sommelier/v8/x/cellarfees/types" "gopkg.in/yaml.v2" ) diff --git a/x/cellarfees/types/v2/params.pb.go b/x/cellarfees/types/v2/params.pb.go index 0c5afab6d..408a0816f 100644 --- a/x/cellarfees/types/v2/params.pb.go +++ b/x/cellarfees/types/v2/params.pb.go @@ -102,7 +102,7 @@ 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, + 0x0e, 0xb3, 0x20, 0xdb, 0x60, 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, @@ -123,7 +123,7 @@ var fileDescriptor_270f377f75209ba6 = []byte{ 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, + 0x05, 0x00, 0x00, 0xff, 0xff, 0x38, 0xca, 0x4e, 0xb2, 0x33, 0x02, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/cellarfees/types/v2/query.pb.go b/x/cellarfees/types/v2/query.pb.go index 88d832eb6..dca1c0a2b 100644 --- a/x/cellarfees/types/v2/query.pb.go +++ b/x/cellarfees/types/v2/query.pb.go @@ -530,53 +530,53 @@ func init() { func init() { proto.RegisterFile("cellarfees/v2/query.proto", fileDescriptor_43b5cfd9b5e06b70) } var fileDescriptor_43b5cfd9b5e06b70 = []byte{ - // 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, 0x0e, 0xf0, 0x01, 0xb8, 0xf7, 0x82, 0x54, 0x89, 0x0b, - 0xe2, 0x50, 0xa1, 0x16, 0x89, 0xaf, 0x81, 0x3c, 0x1e, 0xc7, 0x49, 0xb0, 0x4b, 0x38, 0xc5, 0x7e, - 0xdf, 0xc7, 0xef, 0xf3, 0x1b, 0x7b, 0x9e, 0x09, 0x98, 0x6b, 0x10, 0xcb, 0xc2, 0xde, 0x2e, 0x21, - 0x0c, 0x05, 0x3a, 0xda, 0xeb, 0x10, 0xaf, 0xab, 0xb9, 0x1e, 0xf5, 0x29, 0xfc, 0x2f, 0x69, 0x69, - 0x81, 0x2e, 0x17, 0x4c, 0x6a, 0x52, 0xde, 0x41, 0xe1, 0x55, 0x24, 0x92, 0x8b, 0x26, 0xa5, 0xa6, - 0x45, 0x10, 0x76, 0x5b, 0x08, 0x3b, 0x0e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0x31, 0x83, 0xfb, 0x18, 0x2e, 0xa5, 0x39, 0xa5, 0x26, 0x41, 0xae, 0x8c, 0x22, 0x15, - 0x70, 0xeb, 0x09, 0x5c, 0x05, 0x2e, 0x66, 0xc2, 0xd9, 0xfc, 0x69, 0x03, 0xc7, 0x34, 0x1f, 0x25, - 0x30, 0x97, 0x19, 0x03, 0x88, 0xd2, 0x00, 0x4e, 0x49, 0x95, 0xbc, 0x36, 0xfa, 0x03, 0x82, 0xfb, - 0x6a, 0xc2, 0xad, 0xc3, 0xb5, 0x4c, 0xee, 0x8c, 0x14, 0xc2, 0x00, 0x4c, 0xc5, 0x31, 0x81, 0x4a, - 0x9a, 0x79, 0x12, 0x29, 0xb9, 0x94, 0xd9, 0x17, 0x2c, 0x4b, 0x09, 0x8b, 0x02, 0x8b, 0x99, 0x2c, - 0xd8, 0xed, 0xc2, 0x77, 0x12, 0x98, 0x49, 0x4d, 0x16, 0x5c, 0x4e, 0x73, 0xc9, 0xc8, 0xa7, 0xbc, - 0x32, 0x9a, 0x58, 0xf0, 0x6d, 0x24, 0x7c, 0xab, 0x70, 0x39, 0x93, 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, + // 722 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x95, 0xcf, 0x6e, 0xd3, 0x4a, + 0x14, 0xc6, 0xe3, 0xdb, 0xdb, 0x3f, 0x77, 0x72, 0x11, 0x65, 0x48, 0x45, 0xeb, 0x06, 0xa7, 0xb1, + 0x10, 0x6a, 0xd3, 0xd6, 0x53, 0x1c, 0x55, 0xaa, 0x90, 0x90, 0xda, 0x2c, 0x90, 0x40, 0x20, 0x4a, + 0x60, 0xc1, 0x9f, 0x85, 0x35, 0x4d, 0xa6, 0x26, 0xc4, 0xf6, 0xb8, 0x1e, 0xc7, 0x10, 0x21, 0x36, + 0x5d, 0x21, 0x56, 0x48, 0x3c, 0x02, 0x5b, 0x16, 0xf0, 0x00, 0xec, 0xbb, 0x41, 0xaa, 0xc4, 0x06, + 0xb1, 0xa8, 0x50, 0x8b, 0xc4, 0x6b, 0x20, 0x8f, 0xc7, 0x71, 0x12, 0xec, 0x12, 0x56, 0xb1, 0xcf, + 0xf9, 0x7c, 0xbe, 0xdf, 0xd8, 0xf3, 0x4d, 0xc0, 0x5c, 0x83, 0x58, 0x16, 0xf6, 0x76, 0x09, 0x61, + 0x28, 0xd0, 0xd1, 0x5e, 0x87, 0x78, 0x5d, 0xcd, 0xf5, 0xa8, 0x4f, 0xe1, 0x99, 0xa4, 0xa5, 0x05, + 0xba, 0x5c, 0x30, 0xa9, 0x49, 0x79, 0x07, 0x85, 0x57, 0x91, 0x48, 0x2e, 0x9a, 0x94, 0x9a, 0x16, + 0x41, 0xd8, 0x6d, 0x21, 0xec, 0x38, 0xd4, 0xc7, 0x7e, 0x8b, 0x3a, 0x4c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, 0x4d, 0x82, 0x5c, 0x19, 0x45, 0x2a, 0xe0, + 0xd6, 0x13, 0xb8, 0x0a, 0x5c, 0xcc, 0x84, 0xb3, 0xf9, 0xd3, 0x06, 0x8e, 0x69, 0x3e, 0x49, 0x60, + 0x2e, 0x33, 0x06, 0x10, 0xa5, 0x01, 0x9c, 0x92, 0x2a, 0x79, 0x6d, 0xf4, 0x07, 0x04, 0xf7, 0xb5, + 0x84, 0x5b, 0x87, 0x6b, 0x99, 0xdc, 0x19, 0x29, 0x84, 0x01, 0x98, 0x8a, 0x63, 0x02, 0x95, 0x34, + 0xf3, 0x24, 0x52, 0x72, 0x29, 0xb3, 0x2f, 0x58, 0x96, 0x12, 0x16, 0x05, 0x16, 0x33, 0x59, 0xb0, + 0xdb, 0x85, 0xef, 0x25, 0x30, 0x93, 0x9a, 0x2c, 0xb8, 0x9c, 0xe6, 0x92, 0x91, 0x4f, 0x79, 0x65, + 0x34, 0xb1, 0xe0, 0xdb, 0x48, 0xf8, 0x56, 0xe1, 0x72, 0x26, 0xdf, 0x2e, 0x21, 0x86, 0x1f, 0x0e, + 0x30, 0xe2, 0xa8, 0xc2, 0x8f, 0x12, 0x28, 0xa4, 0xcd, 0x86, 0x95, 0x11, 0x00, 0x62, 0xd8, 0xe5, + 0x91, 0xb4, 0x82, 0x75, 0x33, 0x61, 0x5d, 0x87, 0xd5, 0xbf, 0x60, 0x45, 0x2f, 0xf8, 0x41, 0xf1, + 0xb2, 0x76, 0xe7, 0xe0, 0x58, 0x91, 0x0e, 0x8f, 0x15, 0xe9, 0xfb, 0xb1, 0x22, 0xbd, 0x39, 0x51, + 0x72, 0x87, 0x27, 0x4a, 0xee, 0xeb, 0x89, 0x92, 0x7b, 0xb4, 0xde, 0x77, 0xd8, 0xba, 0xc4, 0x34, + 0xbb, 0x4f, 0x83, 0x3e, 0x83, 0x60, 0x03, 0x3d, 0xef, 0x77, 0xe1, 0x87, 0x2f, 0x0a, 0xf4, 0x9d, + 0x09, 0xfe, 0xff, 0x56, 0xfd, 0x15, 0x00, 0x00, 0xff, 0xff, 0x56, 0x3b, 0x20, 0x88, 0x98, 0x07, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/cork/client/cli/query.go b/x/cork/client/cli/query.go index 34b8bdaed..b8dedc72d 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" - types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" + types "github.com/peggyjv/sommelier/v8/x/cork/types/v2" "github.com/spf13/cobra" ) @@ -227,7 +227,7 @@ func queryScheduledCorksByID() *cobra.Command { func queryCorkResult() *cobra.Command { cmd := &cobra.Command{ - Use: "cork-result", + Use: "cork-result [cork-id]", Aliases: []string{"cr"}, Args: cobra.ExactArgs(1), Short: "query cork result from the chain", diff --git a/x/cork/client/cli/tx.go b/x/cork/client/cli/tx.go index 4ed2660f0..ce3e48ae5 100644 --- a/x/cork/client/cli/tx.go +++ b/x/cork/client/cli/tx.go @@ -11,8 +11,8 @@ 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/v2" - pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" + types "github.com/peggyjv/sommelier/v8/x/cork/types/v2" + pubsubtypes "github.com/peggyjv/sommelier/v8/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 03fd98290..a2583989c 100644 --- a/x/cork/client/cli/tx_test.go +++ b/x/cork/client/cli/tx_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" + types "github.com/peggyjv/sommelier/v8/x/cork/types/v2" "github.com/cosmos/cosmos-sdk/testutil" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" diff --git a/x/cork/client/proposal_handler.go b/x/cork/client/proposal_handler.go index 6771b94bb..d60170f08 100644 --- a/x/cork/client/proposal_handler.go +++ b/x/cork/client/proposal_handler.go @@ -2,7 +2,7 @@ package client import ( govclient "github.com/cosmos/cosmos-sdk/x/gov/client" - "github.com/peggyjv/sommelier/v7/x/cork/client/cli" + "github.com/peggyjv/sommelier/v8/x/cork/client/cli" ) var ( diff --git a/x/cork/handler.go b/x/cork/handler.go index cabe49972..5cbd1d5bd 100644 --- a/x/cork/handler.go +++ b/x/cork/handler.go @@ -7,8 +7,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/cork/keeper" - types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" + "github.com/peggyjv/sommelier/v8/x/cork/keeper" + types "github.com/peggyjv/sommelier/v8/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 8c7c3d28e..014b58338 100644 --- a/x/cork/keeper/abci.go +++ b/x/cork/keeper/abci.go @@ -1,34 +1,50 @@ package keeper import ( + "encoding/hex" "fmt" "github.com/ethereum/go-ethereum/common" sdk "github.com/cosmos/cosmos-sdk/types" - gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" - types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" + gravitytypes "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/types" + "github.com/peggyjv/sommelier/v8/x/cork/types" + v2types "github.com/peggyjv/sommelier/v8/x/cork/types/v2" ) // BeginBlocker is called at the beginning of every block func (k Keeper) BeginBlocker(ctx sdk.Context) {} -func (k Keeper) submitContractCall(ctx sdk.Context, cork types.Cork) { +func (k Keeper) submitContractCall(ctx sdk.Context, cork v2types.Cork) { k.Logger(ctx).Info("setting outgoing tx for contract call", "address", cork.TargetContractAddress, "encoded contract call", cork.EncodedContractCall) // increment invalidation nonce invalidationNonce := k.IncrementInvalidationNonce(ctx) + invalidationScope := cork.InvalidationScope() // submit contract call to bridge k.gravityKeeper.CreateContractCallTx( ctx, invalidationNonce, - cork.InvalidationScope(), + invalidationScope, common.HexToAddress(cork.TargetContractAddress), cork.EncodedContractCall, []gravitytypes.ERC20Token{}, // tokens are always zero []gravitytypes.ERC20Token{}, ) + + ctx.EventManager().EmitEvents( + sdk.Events{ + sdk.NewEvent(types.EventTypeSubmittedContractCall, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + sdk.NewAttribute(types.AttributeKeyCork, cork.String()), + sdk.NewAttribute(types.AttributeKeyBlockHeight, fmt.Sprintf("%d", ctx.BlockHeight())), + sdk.NewAttribute(types.AttributeKeyCorkID, hex.EncodeToString(cork.IDHash(uint64(ctx.BlockHeight())))), + sdk.NewAttribute(gravitytypes.AttributeKeyContractCallInvalidationScope, fmt.Sprint(invalidationScope)), + sdk.NewAttribute(gravitytypes.AttributeKeyContractCallInvalidationNonce, fmt.Sprint(invalidationNonce)), + ), + }, + ) } // EndBlocker defines the oracle logic that executes at the end of every block: diff --git a/x/cork/keeper/genesis.go b/x/cork/keeper/genesis.go index 4d1e67e1a..cf95f26a1 100644 --- a/x/cork/keeper/genesis.go +++ b/x/cork/keeper/genesis.go @@ -4,7 +4,7 @@ import ( "sort" sdk "github.com/cosmos/cosmos-sdk/types" - types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" + types "github.com/peggyjv/sommelier/v8/x/cork/types/v2" ) // InitGenesis initialize default parameters diff --git a/x/cork/keeper/hooks.go b/x/cork/keeper/hooks.go index ecd2c8999..5a8705aec 100644 --- a/x/cork/keeper/hooks.go +++ b/x/cork/keeper/hooks.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - gravitytypes "github.com/peggyjv/gravity-bridge/module/v4/x/gravity/types" + gravitytypes "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/types" ) type Hooks struct { diff --git a/x/cork/keeper/keeper.go b/x/cork/keeper/keeper.go index 5222263bf..bec372b63 100644 --- a/x/cork/keeper/keeper.go +++ b/x/cork/keeper/keeper.go @@ -11,8 +11,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "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" + corktypes "github.com/peggyjv/sommelier/v8/x/cork/types" + types "github.com/peggyjv/sommelier/v8/x/cork/types/v2" ) const corkVoteThresholdStr = "0.67" diff --git a/x/cork/keeper/keeper_test.go b/x/cork/keeper/keeper_test.go index a3ed909d2..ceede221f 100644 --- a/x/cork/keeper/keeper_test.go +++ b/x/cork/keeper/keeper_test.go @@ -13,10 +13,10 @@ import ( paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" "github.com/ethereum/go-ethereum/common" "github.com/golang/mock/gomock" - moduletestutil "github.com/peggyjv/sommelier/v7/testutil" - corktestutil "github.com/peggyjv/sommelier/v7/x/cork/testutil" - corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" - types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" + moduletestutil "github.com/peggyjv/sommelier/v8/testutil" + corktestutil "github.com/peggyjv/sommelier/v8/x/cork/testutil" + corktypes "github.com/peggyjv/sommelier/v8/x/cork/types" + types "github.com/peggyjv/sommelier/v8/x/cork/types/v2" "github.com/stretchr/testify/suite" ) diff --git a/x/cork/keeper/migrations.go b/x/cork/keeper/migrations.go index a22ae6fd3..6d5e11994 100644 --- a/x/cork/keeper/migrations.go +++ b/x/cork/keeper/migrations.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - v1 "github.com/peggyjv/sommelier/v7/x/cork/migrations/v1" + v1 "github.com/peggyjv/sommelier/v8/x/cork/migrations/v1" ) // Migrator is a struct for handling in-place store migrations. diff --git a/x/cork/keeper/msg_server.go b/x/cork/keeper/msg_server.go index 0fe1493c8..58df95046 100644 --- a/x/cork/keeper/msg_server.go +++ b/x/cork/keeper/msg_server.go @@ -9,8 +9,9 @@ import ( 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" - types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" + gravitytypes "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/types" + corktypes "github.com/peggyjv/sommelier/v8/x/cork/types" + types "github.com/peggyjv/sommelier/v8/x/cork/types/v2" ) var _ types.MsgServer = Keeper{} @@ -42,6 +43,10 @@ func (k Keeper) ScheduleCork(c context.Context, msg *types.MsgScheduleCorkReques corkID := k.SetScheduledCork(ctx, msg.BlockHeight, validatorAddr, *msg.Cork) k.IncrementValidatorCorkCount(ctx, validatorAddr) + invalidationScope := msg.Cork.InvalidationScope() + // If the vote succeeds, the current invalidation nonce will be incremented + invalidationNonce := k.GetLatestInvalidationNonce(ctx) + 1 + ctx.EventManager().EmitEvents( sdk.Events{ sdk.NewEvent( @@ -50,10 +55,14 @@ func (k Keeper) ScheduleCork(c context.Context, msg *types.MsgScheduleCorkReques ), sdk.NewEvent( corktypes.EventTypeCork, + sdk.NewAttribute(sdk.AttributeKeyModule, corktypes.AttributeValueCategory), 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)), + sdk.NewAttribute(corktypes.AttributeKeyCorkID, hex.EncodeToString(corkID)), + sdk.NewAttribute(gravitytypes.AttributeKeyContractCallInvalidationScope, fmt.Sprint(invalidationScope)), + sdk.NewAttribute(gravitytypes.AttributeKeyContractCallInvalidationNonce, fmt.Sprint(invalidationNonce)), ), }, ) diff --git a/x/cork/keeper/proposal_handler.go b/x/cork/keeper/proposal_handler.go index ba392dae7..7ef8f3bd3 100644 --- a/x/cork/keeper/proposal_handler.go +++ b/x/cork/keeper/proposal_handler.go @@ -6,9 +6,9 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" "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" - pubsubtypes "github.com/peggyjv/sommelier/v7/x/pubsub/types" + corktypes "github.com/peggyjv/sommelier/v8/x/cork/types" + types "github.com/peggyjv/sommelier/v8/x/cork/types/v2" + pubsubtypes "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) func NewEthereumSubscriptionID(address common.Address) string { diff --git a/x/cork/keeper/query_server.go b/x/cork/keeper/query_server.go index bfcee58f7..0a4854cf8 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" - types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" + types "github.com/peggyjv/sommelier/v8/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 c6ad085dd..dd8ca4a30 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" - types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" + types "github.com/peggyjv/sommelier/v8/x/cork/types/v2" ) func (suite *KeeperTestSuite) TestQueriesHappyPath() { diff --git a/x/cork/keeper/setup_unit_test.go b/x/cork/keeper/setup_unit_test.go index 8b3f140be..947d17569 100644 --- a/x/cork/keeper/setup_unit_test.go +++ b/x/cork/keeper/setup_unit_test.go @@ -13,8 +13,8 @@ import ( "github.com/golang/mock/gomock" - "github.com/peggyjv/sommelier/v7/x/cork/mock" - "github.com/peggyjv/sommelier/v7/x/cork/types" + "github.com/peggyjv/sommelier/v8/x/cork/mock" + "github.com/peggyjv/sommelier/v8/x/cork/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/x/cork/keeper/test_common.go b/x/cork/keeper/test_common.go index 17d86091d..87b79bc0e 100644 --- a/x/cork/keeper/test_common.go +++ b/x/cork/keeper/test_common.go @@ -55,13 +55,13 @@ import ( "github.com/cosmos/cosmos-sdk/x/upgrade" upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" gethcommon "github.com/ethereum/go-ethereum/common" - "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" - 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/peggyjv/gravity-bridge/module/v5/x/gravity" + gravitykeeper "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/keeper" + gravitytypes "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/types" + corktypes "github.com/peggyjv/sommelier/v8/x/cork/types" + types "github.com/peggyjv/sommelier/v8/x/cork/types/v2" + pubsubkeeper "github.com/peggyjv/sommelier/v8/x/pubsub/keeper" + pubsubtypes "github.com/peggyjv/sommelier/v8/x/pubsub/types" "github.com/stretchr/testify/require" ) diff --git a/x/cork/migrations/v1/store.go b/x/cork/migrations/v1/store.go index afb19937d..d73bacb09 100644 --- a/x/cork/migrations/v1/store.go +++ b/x/cork/migrations/v1/store.go @@ -9,9 +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" - 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" + corktypes "github.com/peggyjv/sommelier/v8/x/cork/types" + v1types "github.com/peggyjv/sommelier/v8/x/cork/types/v1" + types "github.com/peggyjv/sommelier/v8/x/cork/types/v2" ) func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error { diff --git a/x/cork/mock/mocks.go b/x/cork/mock/mocks.go index 8a68bb047..8aa36c497 100644 --- a/x/cork/mock/mocks.go +++ b/x/cork/mock/mocks.go @@ -13,8 +13,8 @@ import ( 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" + types1 "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/types" + types2 "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) // MockStakingKeeper is a mock of StakingKeeper interface. diff --git a/x/cork/module.go b/x/cork/module.go index 1c809b3ad..31bac68b1 100644 --- a/x/cork/module.go +++ b/x/cork/module.go @@ -13,10 +13,10 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" sim "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/grpc-ecosystem/grpc-gateway/runtime" - "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" - types "github.com/peggyjv/sommelier/v7/x/cork/types/v2" + "github.com/peggyjv/sommelier/v8/x/cork/client/cli" + "github.com/peggyjv/sommelier/v8/x/cork/keeper" + corktypes "github.com/peggyjv/sommelier/v8/x/cork/types" + types "github.com/peggyjv/sommelier/v8/x/cork/types/v2" "github.com/spf13/cobra" ) diff --git a/x/cork/testutil/expected_keepers_mocks.go b/x/cork/testutil/expected_keepers_mocks.go index d2e86a7c7..c64201924 100644 --- a/x/cork/testutil/expected_keepers_mocks.go +++ b/x/cork/testutil/expected_keepers_mocks.go @@ -13,8 +13,8 @@ import ( 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" + types1 "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/types" + types2 "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) // MockStakingKeeper is a mock of StakingKeeper interface. diff --git a/x/cork/types/events.go b/x/cork/types/events.go index 901e9c2b0..40ea874fd 100644 --- a/x/cork/types/events.go +++ b/x/cork/types/events.go @@ -2,8 +2,9 @@ package types // cork module event types const ( - EventTypeCork = "cork" - EventTypeCommitPeriod = "commit_period" + EventTypeCork = "cork" + EventTypeCommitPeriod = "commit_period" + EventTypeSubmittedContractCall = "submitted_contract_call" AttributeKeySigner = "signer" AttributeKeyValidator = "validator" @@ -12,6 +13,7 @@ const ( AttributeKeyCommitPeriodStart = "commit_period_start" AttributeKeyCommitPeriodEnd = "commit_period_end" AttributeKeyBlockHeight = "block_height" + AttributeKeyCorkID = "cork_id" AttributeValueCategory = ModuleName ) diff --git a/x/cork/types/expected_keepers.go b/x/cork/types/expected_keepers.go index f0c52473c..abca2ab89 100644 --- a/x/cork/types/expected_keepers.go +++ b/x/cork/types/expected_keepers.go @@ -9,8 +9,8 @@ import ( 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" + gravitytypes "github.com/peggyjv/gravity-bridge/module/v5/x/gravity/types" + pubsubtypes "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) // StakingKeeper defines the expected staking keeper methods diff --git a/x/cork/types/v1/cork.go b/x/cork/types/v1/cork.go index a5b0f5602..96805bc8e 100644 --- a/x/cork/types/v1/cork.go +++ b/x/cork/types/v1/cork.go @@ -6,7 +6,7 @@ import ( 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" + corktypes "github.com/peggyjv/sommelier/v8/x/cork/types" ) func (c *Cork) InvalidationScope() tmbytes.HexBytes { diff --git a/x/cork/types/v1/genesis.go b/x/cork/types/v1/genesis.go index 400badbe6..bab4fa58a 100644 --- a/x/cork/types/v1/genesis.go +++ b/x/cork/types/v1/genesis.go @@ -1,6 +1,6 @@ package v1 -import corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" +import corktypes "github.com/peggyjv/sommelier/v8/x/cork/types" const DefaultParamspace = corktypes.ModuleName diff --git a/x/cork/types/v1/msgs.go b/x/cork/types/v1/msgs.go index 435d9f5a9..234cdc580 100644 --- a/x/cork/types/v1/msgs.go +++ b/x/cork/types/v1/msgs.go @@ -5,7 +5,7 @@ import ( 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" + corktypes "github.com/peggyjv/sommelier/v8/x/cork/types" ) var ( diff --git a/x/cork/types/v1/proposal.go b/x/cork/types/v1/proposal.go index ac70c4a00..324f638ec 100644 --- a/x/cork/types/v1/proposal.go +++ b/x/cork/types/v1/proposal.go @@ -4,7 +4,7 @@ import ( "fmt" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - corktypes "github.com/peggyjv/sommelier/v7/x/cork/types" + corktypes "github.com/peggyjv/sommelier/v8/x/cork/types" ) const ( diff --git a/x/cork/types/v2/cork.go b/x/cork/types/v2/cork.go index 99120a85b..35e9ff6b8 100644 --- a/x/cork/types/v2/cork.go +++ b/x/cork/types/v2/cork.go @@ -10,7 +10,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" + corktypes "github.com/peggyjv/sommelier/v8/x/cork/types" ) 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 bea9f1fe0..8040a7de3 100644 --- a/x/cork/types/v2/cork.pb.go +++ b/x/cork/types/v2/cork.pb.go @@ -270,28 +270,28 @@ var fileDescriptor_1219f78116b242b2 = []byte{ // 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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 0x2c, 0x79, 0x89, 0x47, 0xa5, 0x68, 0x02, 0x34, 0x1b, 0x2d, + 0xfc, 0xac, 0x93, 0x9f, 0x96, 0x7f, 0x8e, 0x21, 0x3a, 0x1c, 0x43, 0xf4, 0xef, 0x18, 0xa2, 0x5f, + 0xa7, 0x70, 0x70, 0x38, 0x85, 0x83, 0xbf, 0xa7, 0x70, 0xf0, 0x8d, 0xca, 0xd2, 0x16, 0xbb, 0x75, + 0xcc, 0xf5, 0x86, 0xd6, 0x20, 0xe5, 0xfe, 0x7b, 0x4b, 0x1b, 0xbd, 0xd9, 0x80, 0x2a, 0xc1, 0xd0, + 0xf6, 0x03, 0xfd, 0xe1, 0x6e, 0x84, 0xda, 0x7d, 0x0d, 0x0d, 0x6d, 0x93, 0xf5, 0x33, 0x77, 0x0e, + 0xef, 0xfe, 0x07, 0x00, 0x00, 0xff, 0xff, 0xf3, 0x25, 0xd0, 0x91, 0x43, 0x02, 0x00, 0x00, } func (m *Cork) Marshal() (dAtA []byte, err error) { diff --git a/x/cork/types/v2/genesis.go b/x/cork/types/v2/genesis.go index b6d51675e..eab446a23 100644 --- a/x/cork/types/v2/genesis.go +++ b/x/cork/types/v2/genesis.go @@ -1,6 +1,6 @@ package v2 -import types "github.com/peggyjv/sommelier/v7/x/cork/types" +import types "github.com/peggyjv/sommelier/v8/x/cork/types" const DefaultParamspace = types.ModuleName diff --git a/x/cork/types/v2/genesis.pb.go b/x/cork/types/v2/genesis.pb.go index 549ed728d..fb7c45a31 100644 --- a/x/cork/types/v2/genesis.pb.go +++ b/x/cork/types/v2/genesis.pb.go @@ -160,7 +160,7 @@ var fileDescriptor_41a8de26c4f93490 = []byte{ // 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, - 0x5c, 0xe2, 0x95, 0x8c, 0x00, 0xc1, 0x05, 0x29, 0xad, 0x54, 0xe5, 0x82, 0x2a, 0x07, 0x71, 0xe0, + 0x5c, 0xe2, 0x95, 0x8c, 0x40, 0xc0, 0x05, 0x29, 0xad, 0x54, 0xe5, 0x82, 0x2a, 0x07, 0x71, 0xe0, 0x62, 0x6d, 0xed, 0x91, 0x63, 0x62, 0x7b, 0xad, 0x9d, 0x8d, 0x95, 0xbc, 0x05, 0x8f, 0xc0, 0x1b, 0xf0, 0x1a, 0x3d, 0xf6, 0x88, 0x38, 0x44, 0x28, 0x79, 0x03, 0x9e, 0x00, 0xed, 0xda, 0x0e, 0xe1, 0xb4, 0xb3, 0xff, 0x37, 0xff, 0xec, 0xcc, 0x68, 0xc9, 0x45, 0x28, 0xe4, 0x82, 0x95, 0x1e, 0x8b, @@ -185,7 +185,7 @@ var fileDescriptor_41a8de26c4f93490 = []byte{ 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, + 0x98, 0x10, 0x84, 0x3e, 0x72, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/cork/types/v2/msgs.go b/x/cork/types/v2/msgs.go index 09cb67800..f397929e2 100644 --- a/x/cork/types/v2/msgs.go +++ b/x/cork/types/v2/msgs.go @@ -7,7 +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" + types "github.com/peggyjv/sommelier/v8/x/cork/types" ) var ( diff --git a/x/cork/types/v2/proposal.go b/x/cork/types/v2/proposal.go index 5f238aeef..24e3bd3a9 100644 --- a/x/cork/types/v2/proposal.go +++ b/x/cork/types/v2/proposal.go @@ -7,8 +7,8 @@ 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" + types "github.com/peggyjv/sommelier/v8/x/cork/types" + pubsubtypes "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) const ( diff --git a/x/cork/types/v2/proposal.pb.go b/x/cork/types/v2/proposal.pb.go index 06498bdce..855d4e242 100644 --- a/x/cork/types/v2/proposal.pb.go +++ b/x/cork/types/v2/proposal.pb.go @@ -493,36 +493,36 @@ func init() { proto.RegisterFile("cork/v2/proposal.proto", fileDescriptor_e01dea var fileDescriptor_e01dea5e2496e85f = []byte{ // 476 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xc1, 0x6a, 0xdb, 0x40, - 0x10, 0xf5, 0x26, 0x4e, 0x82, 0xd7, 0x85, 0x16, 0x61, 0xb7, 0x22, 0xa5, 0xc2, 0xf5, 0xa1, 0x38, - 0x17, 0x2d, 0x38, 0xd0, 0x9c, 0x53, 0xfb, 0x50, 0x17, 0x0a, 0xc1, 0x39, 0x14, 0x7a, 0x11, 0x6b, - 0xed, 0x20, 0x6d, 0xbc, 0xd2, 0x88, 0xdd, 0xb5, 0x68, 0xfe, 0xa0, 0x97, 0x42, 0x3f, 0xa0, 0xbf, - 0xd1, 0x3f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x62, 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, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0xcd, 0xb6, 0x69, 0xab, 0x6c, 0x90, 0x40, 0x56, 0x02, 0x56, 0x11, 0x56, 0xc8, 0x01, 0xa5, + 0x17, 0xaf, 0x94, 0x4a, 0xc0, 0xb5, 0x24, 0x07, 0x82, 0x84, 0x54, 0xa5, 0x07, 0x24, 0x2e, 0xd6, + 0xc6, 0x3b, 0xb2, 0xb7, 0x59, 0x7b, 0xac, 0xdd, 0x8d, 0x45, 0xff, 0x80, 0x0b, 0x12, 0x1f, 0xc0, + 0x6f, 0xf0, 0x07, 0x1c, 0x38, 0xf6, 0xc8, 0x11, 0x25, 0x3f, 0x82, 0xb2, 0x76, 0xaa, 0x14, 0xa1, + 0x1e, 0x0a, 0x42, 0xbd, 0xed, 0xbc, 0x37, 0x1e, 0xbf, 0xf7, 0xc6, 0x5e, 0xfa, 0x30, 0x46, 0x3d, + 0x67, 0xe5, 0x90, 0x15, 0x1a, 0x0b, 0x34, 0x5c, 0x85, 0x85, 0x46, 0x8b, 0xde, 0xc1, 0x1a, 0x0f, + 0xcb, 0xe1, 0xa1, 0xb7, 0x69, 0x70, 0x80, 0x23, 0x0f, 0x3b, 0x09, 0x26, 0xe8, 0x8e, 0x6c, 0x7d, + 0xaa, 0xd0, 0xfe, 0x57, 0x42, 0x1f, 0x9f, 0x08, 0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0xba, 0x9c, + 0x9a, 0xd3, 0xb6, 0xc3, 0x5e, 0x3b, 0xc8, 0x7b, 0x4e, 0x1f, 0x59, 0xae, 0x13, 0xb0, 0x51, 0x8c, + 0xb9, 0xd5, 0x3c, 0xb6, 0x11, 0x17, 0x42, 0x83, 0x31, 0xb5, 0xbc, 0x6e, 0x45, 0x8f, 0x6a, 0xf6, + 0xa4, 0x22, 0xbd, 0x17, 0xd4, 0xbf, 0x7a, 0x20, 0xe6, 0x4a, 0x45, 0xee, 0x8f, 0x8b, 0xce, 0x0d, + 0xe6, 0xf5, 0x67, 0xd0, 0xdd, 0xf0, 0x23, 0xae, 0xd4, 0xe9, 0x9a, 0x7d, 0x63, 0x30, 0xef, 0x7f, + 0xdc, 0xa1, 0xbd, 0x3f, 0xba, 0xfc, 0x17, 0xd9, 0xdf, 0x41, 0xc3, 0xdb, 0x0b, 0xdf, 0xbf, 0xb6, + 0xf0, 0x57, 0x93, 0xef, 0xcb, 0x80, 0x5c, 0x2e, 0x03, 0xf2, 0x73, 0x19, 0x90, 0xcf, 0xab, 0xa0, + 0x71, 0xb9, 0x0a, 0x1a, 0x3f, 0x56, 0x41, 0xe3, 0x3d, 0x4b, 0xa4, 0x4d, 0x17, 0xb3, 0x30, 0xc6, + 0x8c, 0x15, 0x90, 0x24, 0x17, 0xe7, 0x25, 0x33, 0x98, 0x65, 0xa0, 0x24, 0x68, 0x56, 0xbe, 0x64, + 0x1f, 0xdc, 0xe5, 0xc7, 0xec, 0x45, 0x01, 0x86, 0x95, 0xc3, 0xd9, 0xbe, 0x53, 0x73, 0xfc, 0x2b, + 0x00, 0x00, 0xff, 0xff, 0x2d, 0x54, 0x95, 0x0a, 0x3d, 0x05, 0x00, 0x00, } func (m *AddManagedCellarIDsProposal) Marshal() (dAtA []byte, err error) { diff --git a/x/cork/types/v2/proposal_test.go b/x/cork/types/v2/proposal_test.go index 5862f0723..ef0adb895 100644 --- a/x/cork/types/v2/proposal_test.go +++ b/x/cork/types/v2/proposal_test.go @@ -4,7 +4,7 @@ import ( "testing" errorsmod "cosmossdk.io/errors" - types "github.com/peggyjv/sommelier/v7/x/cork/types" + types "github.com/peggyjv/sommelier/v8/x/cork/types" "github.com/stretchr/testify/require" ) diff --git a/x/cork/types/v2/query.pb.go b/x/cork/types/v2/query.pb.go index 89999d5b0..d4e2ad7fc 100644 --- a/x/cork/types/v2/query.pb.go +++ b/x/cork/types/v2/query.pb.go @@ -733,56 +733,57 @@ func init() { func init() { proto.RegisterFile("cork/v2/query.proto", fileDescriptor_5f2ffa9107b7d7f7) } var fileDescriptor_5f2ffa9107b7d7f7 = []byte{ - // 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, 0x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 0x83, 0x01, 0xcc, 0xd2, - 0x9e, 0x67, 0x69, 0x13, 0x6d, 0x44, 0x2d, 0x13, 0xd5, 0x1a, 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, + // 785 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4d, 0x4f, 0xdb, 0x4a, + 0x14, 0x8d, 0x79, 0xc0, 0x53, 0x6e, 0x78, 0xf0, 0x34, 0x7c, 0x3b, 0xe0, 0x10, 0x83, 0x20, 0xca, + 0x83, 0x0c, 0x04, 0x3d, 0x51, 0x75, 0xd7, 0xc0, 0xa2, 0x51, 0x2b, 0x5a, 0xd2, 0x4d, 0xd5, 0x4d, + 0x94, 0xc4, 0x23, 0xc7, 0xcd, 0xc7, 0x18, 0xdb, 0x89, 0x1a, 0x21, 0x36, 0x95, 0xaa, 0x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, 0xee, 0x8d, 0x7e, 0xeb, 0x72, 0xb5, 0x17, 0xb8, 0x0b, 0x3e, 0xf3, 0x7f, 0x9d, 0xa3, + 0x0f, 0x1c, 0x5b, 0xc4, 0xfe, 0x4c, 0x41, 0x5b, 0xc3, 0xed, 0xb9, 0x39, 0xc5, 0x67, 0x46, 0x03, + 0x99, 0xfd, 0xbb, 0x9e, 0x7d, 0x8c, 0x76, 0x6e, 0x66, 0x5f, 0x91, 0xf0, 0x99, 0x22, 0x9d, 0xa3, + 0xd7, 0x1c, 0xcc, 0x84, 0x82, 0x01, 0x85, 0x57, 0x25, 0x9c, 0x63, 0xfc, 0xda, 0x60, 0x00, 0xb3, + 0xb4, 0xe7, 0x59, 0xda, 0x44, 0x1b, 0x51, 0xcb, 0x44, 0xb5, 0x46, 0x59, 0xb3, 0x93, 0xc4, 0x76, + 0xf2, 0x8a, 0x83, 0x7f, 0xc3, 0x11, 0x85, 0x06, 0x2a, 0xb9, 0xb3, 0x9a, 0x1e, 0x82, 0x60, 0x66, + 0xb6, 0x3d, 0x33, 0x69, 0x94, 0x1a, 0x61, 0xa6, 0x50, 0xbc, 0xb8, 0x12, 0xb8, 0xcb, 0x2b, 0x81, + 0xfb, 0x71, 0x25, 0x70, 0x6f, 0xaf, 0x85, 0xd8, 0xe5, 0xb5, 0x10, 0xfb, 0x76, 0x2d, 0xc4, 0x9e, + 0x61, 0x59, 0x31, 0xea, 0x9d, 0x6a, 0xae, 0x46, 0x5b, 0x58, 0x25, 0xb2, 0xdc, 0x7b, 0xde, 0xf5, + 0x91, 0x75, 0xef, 0xe0, 0x17, 0x36, 0xa3, 0xd1, 0x53, 0x89, 0x8e, 0xbb, 0xf9, 0xea, 0xa4, 0xf5, + 0x23, 0x66, 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x0b, 0x8c, 0xe9, 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 87dbddc9b..c4b59a8f7 100644 --- a/x/cork/types/v2/tx.pb.go +++ b/x/cork/types/v2/tx.pb.go @@ -149,25 +149,25 @@ var fileDescriptor_271bdc677f232222 = []byte{ // 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, 0xf4, 0x20, 0xc0, 0x74, 0x0c, 0xda, 0x03, 0x35, 0x77, 0x93, 0x14, 0x15, 0xb2, 0xff, 0x19, - 0x71, 0xb5, 0x67, 0xb1, 0x4f, 0xc9, 0x00, 0x23, 0x5a, 0xcd, 0x00, 0x65, 0x8c, 0x12, 0x62, 0x29, - 0x40, 0x9f, 0x64, 0x47, 0x2e, 0x1c, 0x0a, 0x14, 0x68, 0x4a, 0xc8, 0xaa, 0x1d, 0xed, 0x3c, 0x13, - 0xda, 0xe8, 0x4b, 0x71, 0x1b, 0x84, 0x7c, 0x34, 0x9b, 0xf0, 0x4b, 0x4c, 0xc7, 0x3e, 0x7f, 0x98, - 0x71, 0xa9, 0x58, 0x9b, 0x96, 0xb3, 0x7b, 0x5b, 0xc4, 0x21, 0xdd, 0x9a, 0xb7, 0xe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x23, 0x6f, 0x40, 0x4b, 0x7d, 0x29, 0xd8, 0x0d, 0xad, 0x7f, 0xb7, 0xb3, 0xa3, 0xaf, + 0x78, 0xbf, 0xbf, 0xc6, 0x72, 0xfe, 0x36, 0xec, 0x26, 0x59, 0xff, 0x1e, 0xb7, 0xcb, 0x1e, 0xb9, + 0xb8, 0x7e, 0x5d, 0xdb, 0x64, 0xb5, 0xb6, 0xc9, 0xfb, 0xda, 0x26, 0x2f, 0x1b, 0xbb, 0xb0, 0xda, + 0xd8, 0x85, 0xb7, 0x8d, 0x5d, 0xb8, 0x03, 0x11, 0xa9, 0x70, 0x36, 0x74, 0x03, 0x8c, 0x21, 0xe1, + 0x42, 0x2c, 0xee, 0x35, 0x48, 0x8c, 0x63, 0x3e, 0x89, 0x78, 0x0a, 0xfa, 0x0c, 0xe6, 0x66, 0x11, + 0xa0, 0x16, 0x09, 0x97, 0xa0, 0xbd, 0x61, 0xc5, 0xfc, 0xf1, 0xe9, 0x47, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x92, 0x28, 0x0b, 0x54, 0xc3, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/incentives/client/cli/query.go b/x/incentives/client/cli/query.go index b6e1a5765..0ece68baa 100644 --- a/x/incentives/client/cli/query.go +++ b/x/incentives/client/cli/query.go @@ -5,7 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/peggyjv/sommelier/v7/x/incentives/types" + "github.com/peggyjv/sommelier/v8/x/incentives/types" "github.com/spf13/cobra" ) diff --git a/x/incentives/handler.go b/x/incentives/handler.go index d4f80f7d2..c1241f3a4 100644 --- a/x/incentives/handler.go +++ b/x/incentives/handler.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/peggyjv/sommelier/v7/x/incentives/keeper" + "github.com/peggyjv/sommelier/v8/x/incentives/keeper" ) // NewHandler returns a handler for "incentive" type messages. diff --git a/x/incentives/keeper/abci.go b/x/incentives/keeper/abci.go index 345259bc2..2290da606 100644 --- a/x/incentives/keeper/abci.go +++ b/x/incentives/keeper/abci.go @@ -1,13 +1,48 @@ package keeper import ( + abci "github.com/cometbft/cometbft/abci/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" sdk "github.com/cosmos/cosmos-sdk/types" ) -func (k Keeper) BeginBlocker(ctx sdk.Context) {} +// BeginBlocker defines distribution rewards for validators +// +// 1) Subtract the total distribution from the community pool +// 2) Get a list of qualifying validators sorted by descending power +// 3) Allocate tokens to qualifying validators proportionally to their power with a cap +// 4) Add the remaining coins back to the community pool +func (k Keeper) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) { + incentivesParams := k.GetParamSet(ctx) + if uint64(ctx.BlockHeight()) >= incentivesParams.ValidatorIncentivesCutoffHeight || incentivesParams.ValidatorMaxDistributionPerBlock.IsZero() { + return + } + + // Rewards come from the community pool + totalDistribution := sdk.NewDecCoinsFromCoins(incentivesParams.ValidatorMaxDistributionPerBlock) + feePool := k.DistributionKeeper.GetFeePool(ctx) + newPool, negative := feePool.CommunityPool.SafeSub(totalDistribution) + if negative { + k.Logger(ctx).Error("Insufficient coins in community to distribute to validators", "community pool", feePool.CommunityPool) + return + } + + // Get a list of qualifying validators sorted by descending power + valInfos := k.getValidatorInfos(ctx, req) + sortedValInfos := sortValidatorInfosByPower(valInfos) + qualifyingVoters := truncateVoters(sortedValInfos, incentivesParams.ValidatorIncentivesSetSizeLimit) + + // Allocate tokens to qualifying validators proportionally to their power with a cap + totalPower := getTotalPower(&qualifyingVoters) + remaining := k.AllocateTokens(ctx, totalPower, totalDistribution, qualifyingVoters, incentivesParams.ValidatorIncentivesMaxFraction) + + // Add the remaining coins back to the community pool + newPool = newPool.Add(remaining...) + feePool.CommunityPool = newPool + k.DistributionKeeper.SetFeePool(ctx, feePool) +} // EndBlocker defines Distribution of incentives to stakers // diff --git a/x/incentives/keeper/abci_test.go b/x/incentives/keeper/abci_test.go index 39d1745f3..381de4b11 100644 --- a/x/incentives/keeper/abci_test.go +++ b/x/incentives/keeper/abci_test.go @@ -1,10 +1,12 @@ package keeper import ( + abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" distributionTypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/peggyjv/sommelier/v7/app/params" - incentivesTypes "github.com/peggyjv/sommelier/v7/x/incentives/types" + "github.com/golang/mock/gomock" + "github.com/peggyjv/sommelier/v8/app/params" + incentivesTypes "github.com/peggyjv/sommelier/v8/x/incentives/types" ) func (suite *KeeperTestSuite) TestEndBlockerIncentivesDisabledDoesNothing() { @@ -17,20 +19,20 @@ func (suite *KeeperTestSuite) TestEndBlockerIncentivesDisabledDoesNothing() { // By not mocking any other calls, the test will panic and fail if an unmocked keeper function is called, // implying that the function isn't exiting early as designed. - require.NotPanics(func() { incentivesKeeper.BeginBlocker(ctx) }) + require.NotPanics(func() { incentivesKeeper.BeginBlocker(ctx, abci.RequestBeginBlock{}) }) require.NotPanics(func() { incentivesKeeper.EndBlocker(ctx) }) incentivesParams.DistributionPerBlock = sdk.NewCoin(params.BaseCoinUnit, sdk.OneInt()) incentivesKeeper.SetParams(ctx, incentivesParams) - require.NotPanics(func() { incentivesKeeper.BeginBlocker(ctx) }) + require.NotPanics(func() { incentivesKeeper.BeginBlocker(ctx, abci.RequestBeginBlock{}) }) require.NotPanics(func() { incentivesKeeper.EndBlocker(ctx) }) incentivesParams.DistributionPerBlock = sdk.NewCoin(params.BaseCoinUnit, sdk.ZeroInt()) incentivesParams.IncentivesCutoffHeight = 1500 incentivesKeeper.SetParams(ctx, incentivesParams) - require.NotPanics(func() { incentivesKeeper.BeginBlocker(ctx) }) + require.NotPanics(func() { incentivesKeeper.BeginBlocker(ctx, abci.RequestBeginBlock{}) }) require.NotPanics(func() { incentivesKeeper.EndBlocker(ctx) }) } @@ -53,6 +55,112 @@ func (suite *KeeperTestSuite) TestEndBlockerInsufficientCommunityPoolBalance() { // By not mocking the bank SendModuleToModule call, the test will panic and fail if the community pool balance // check branch isn't taken as intended. - require.NotPanics(func() { incentivesKeeper.BeginBlocker(ctx) }) + require.NotPanics(func() { incentivesKeeper.BeginBlocker(ctx, abci.RequestBeginBlock{}) }) require.NotPanics(func() { incentivesKeeper.EndBlocker(ctx) }) } + +func (suite *KeeperTestSuite) TestBeginBlockerIncentivesDisabled() { + ctx, incentivesKeeper := suite.ctx, suite.incentivesKeeper + require := suite.Require() + + incentivesParams := incentivesTypes.DefaultParams() + incentivesParams.ValidatorIncentivesCutoffHeight = 100 + incentivesParams.ValidatorMaxDistributionPerBlock = sdk.NewCoin(params.BaseCoinUnit, sdk.NewInt(1000)) + incentivesKeeper.SetParams(ctx, incentivesParams) + + // Set block height above cutoff + ctx = ctx.WithBlockHeight(101) + + // By not mocking any other calls, the test will panic and fail if an unmocked keeper function is called, + // implying that the function isn't exiting early as designed. + require.NotPanics(func() { incentivesKeeper.BeginBlocker(ctx, abci.RequestBeginBlock{}) }) + + incentivesParams.ValidatorIncentivesCutoffHeight = 200 + incentivesParams.ValidatorMaxDistributionPerBlock = sdk.NewCoin(params.BaseCoinUnit, sdk.ZeroInt()) + incentivesKeeper.SetParams(ctx, incentivesParams) + + require.NotPanics(func() { incentivesKeeper.BeginBlocker(ctx, abci.RequestBeginBlock{}) }) +} + +func (suite *KeeperTestSuite) TestBeginBlockerInsufficientCommunityPoolBalance() { + ctx, incentivesKeeper := suite.ctx, suite.incentivesKeeper + require := suite.Require() + + incentivesParams := incentivesTypes.DefaultParams() + incentivesParams.ValidatorIncentivesCutoffHeight = 100 + incentivesParams.ValidatorMaxDistributionPerBlock = sdk.NewCoin(params.BaseCoinUnit, sdk.NewInt(1000)) + incentivesKeeper.SetParams(ctx, incentivesParams) + + // Set block height below cutoff + ctx = ctx.WithBlockHeight(99) + + // Mock insufficient community pool balance + pool := distributionTypes.FeePool{ + CommunityPool: sdk.NewDecCoins(sdk.NewDecCoin(params.BaseCoinUnit, sdk.NewInt(999))), + } + suite.distributionKeeper.EXPECT().GetFeePool(ctx).Return(pool) + + // By not mocking any further calls, the test will panic and fail if the community pool balance + // check branch isn't taken as intended. + require.NotPanics(func() { incentivesKeeper.BeginBlocker(ctx, abci.RequestBeginBlock{}) }) +} + +func (suite *KeeperTestSuite) TestBeginBlockerSuccess() { + ctx, incentivesKeeper := suite.ctx, suite.incentivesKeeper + require := suite.Require() + + incentivesParams := incentivesTypes.DefaultParams() + incentivesParams.ValidatorIncentivesCutoffHeight = 100 + incentivesParams.ValidatorMaxDistributionPerBlock = sdk.NewCoin(params.BaseCoinUnit, sdk.NewInt(1000)) + incentivesKeeper.SetParams(ctx, incentivesParams) + + // Set block height below cutoff + ctx = ctx.WithBlockHeight(99) + + // Mock sufficient community pool balance + pool := distributionTypes.FeePool{ + CommunityPool: sdk.NewDecCoins(sdk.NewDecCoin(params.BaseCoinUnit, sdk.NewInt(2000))), + } + suite.distributionKeeper.EXPECT().GetFeePool(ctx).Return(pool) + + // Mock validators + validators := suite.getMockValidators() + validator1, validator2 := validators[0], validators[1] + + consAddr1, err := validator1.GetConsAddr() + require.NoError(err) + consAddr2, err := validator2.GetConsAddr() + require.NoError(err) + + // Mock RequestBeginBlock + req := abci.RequestBeginBlock{ + LastCommitInfo: abci.CommitInfo{ + Votes: []abci.VoteInfo{ + {Validator: abci.Validator{Address: consAddr1, Power: 10}, SignedLastBlock: true}, + {Validator: abci.Validator{Address: consAddr2, Power: 20}, SignedLastBlock: true}, + }, + }, + } + + // Mock StakingKeeper expectations + suite.stakingKeeper.EXPECT().ValidatorByConsAddr(ctx, consAddr1).Return(validator1) + suite.stakingKeeper.EXPECT().ValidatorByConsAddr(ctx, consAddr2).Return(validator2) + + // Mock DistributionKeeper expectations for AllocateTokens + suite.distributionKeeper.EXPECT().GetValidatorCurrentRewards(ctx, validator1.GetOperator()).Return(distributionTypes.ValidatorCurrentRewards{Rewards: sdk.DecCoins{}}) + suite.distributionKeeper.EXPECT().SetValidatorCurrentRewards(ctx, validator1.GetOperator(), gomock.Any()) + suite.distributionKeeper.EXPECT().GetValidatorOutstandingRewards(ctx, validator1.GetOperator()).Return(distributionTypes.ValidatorOutstandingRewards{Rewards: sdk.DecCoins{}}) + suite.distributionKeeper.EXPECT().SetValidatorOutstandingRewards(ctx, validator1.GetOperator(), gomock.Any()) + + suite.distributionKeeper.EXPECT().GetValidatorCurrentRewards(ctx, validator2.GetOperator()).Return(distributionTypes.ValidatorCurrentRewards{Rewards: sdk.DecCoins{}}) + suite.distributionKeeper.EXPECT().SetValidatorCurrentRewards(ctx, validator2.GetOperator(), gomock.Any()) + suite.distributionKeeper.EXPECT().GetValidatorOutstandingRewards(ctx, validator2.GetOperator()).Return(distributionTypes.ValidatorOutstandingRewards{Rewards: sdk.DecCoins{}}) + suite.distributionKeeper.EXPECT().SetValidatorOutstandingRewards(ctx, validator2.GetOperator(), gomock.Any()) + + // Mock setting the updated fee pool + suite.distributionKeeper.EXPECT().SetFeePool(ctx, gomock.Any()) + + require.NotPanics(func() { incentivesKeeper.BeginBlocker(ctx, req) }) + + // You can add more specific assertions here if needed, such as checking emitted events +} diff --git a/x/incentives/keeper/genesis.go b/x/incentives/keeper/genesis.go index c02fd6849..3b9dfd361 100644 --- a/x/incentives/keeper/genesis.go +++ b/x/incentives/keeper/genesis.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/incentives/types" + "github.com/peggyjv/sommelier/v8/x/incentives/types" ) // InitGenesis initialize default parameters diff --git a/x/incentives/keeper/incentives.go b/x/incentives/keeper/incentives.go new file mode 100644 index 000000000..faecfa1c6 --- /dev/null +++ b/x/incentives/keeper/incentives.go @@ -0,0 +1,117 @@ +package keeper + +import ( + "sort" + + "cosmossdk.io/math" + + abci "github.com/cometbft/cometbft/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/peggyjv/sommelier/v8/x/incentives/types" +) + +type ValidatorInfo struct { + Validator stakingtypes.ValidatorI + Power int64 +} + +// sortValidatorInfosByPower sorts the validator information by power in descending order +func sortValidatorInfosByPower(valInfos []ValidatorInfo) []ValidatorInfo { + sort.Slice(valInfos, func(i, j int) bool { + return valInfos[i].Power > valInfos[j].Power + }) + + return valInfos +} + +// GetTotalPower returns the total power of the passed in validatorInfos +func getTotalPower(valInfos *[]ValidatorInfo) int64 { + totalPower := int64(0) + for _, valInfo := range *valInfos { + totalPower += valInfo.Power + } + + return totalPower +} + +// getValidatorInfos returns the validator information for the voters in the last block +func (k Keeper) getValidatorInfos(ctx sdk.Context, req abci.RequestBeginBlock) []ValidatorInfo { + validatorInfos := []ValidatorInfo{} + for _, vote := range req.LastCommitInfo.GetVotes() { + if !vote.SignedLastBlock { + continue + } + + validator := k.StakingKeeper.ValidatorByConsAddr(ctx, vote.Validator.Address) + validatorInfos = append(validatorInfos, ValidatorInfo{ + Validator: validator, + Power: vote.Validator.Power, + }) + } + return validatorInfos +} + +// truncateVoters returns the first maxSize validatorInfos +func truncateVoters(validatorInfos []ValidatorInfo, maxSize uint64) []ValidatorInfo { + if len(validatorInfos) > int(maxSize) { + return validatorInfos[:maxSize] + } + + return validatorInfos +} + +// AllocateTokens performs reward distribution to the provided validators proportionally to their power with a cap +func (k Keeper) AllocateTokens(ctx sdk.Context, totalPreviousPower int64, totalDistribution sdk.DecCoins, qualifyingVoters []ValidatorInfo, maxFraction sdk.Dec) sdk.DecCoins { + remaining := totalDistribution + + for _, valInfo := range qualifyingVoters { + validator := valInfo.Validator + powerFraction := math.LegacyNewDec(valInfo.Power).QuoInt64(totalPreviousPower) + + // Cap at the max fraction + if powerFraction.GT(maxFraction) { + powerFraction = maxFraction + } + + reward := totalDistribution.MulDecTruncate(powerFraction) + + k.AllocateTokensToValidator(ctx, validator, reward) + remaining = remaining.Sub(reward) + } + + // Only emit the total distribution reward event if there are qualifying voters + if len(qualifyingVoters) > 0 { + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeTotalValidatorIncentivesRewards, + sdk.NewAttribute(sdk.AttributeKeyAmount, totalDistribution.Sub(remaining).String()), + ), + ) + } + + return remaining +} + +// AllocateTokensToValidator allocates tokens to a particular validator. +// All tokens go to the validator. +func (k Keeper) AllocateTokensToValidator(ctx sdk.Context, val stakingtypes.ValidatorI, tokens sdk.DecCoins) { + // Update validator rewards + ctx.EventManager().EmitEvent( + sdk.NewEvent( + types.EventTypeValidatorIncentivesReward, + sdk.NewAttribute(sdk.AttributeKeyAmount, tokens.String()), + sdk.NewAttribute(types.AttributeKeyValidator, val.GetOperator().String()), + ), + ) + + // Update current rewards + currentRewards := k.DistributionKeeper.GetValidatorCurrentRewards(ctx, val.GetOperator()) + currentRewards.Rewards = currentRewards.Rewards.Add(tokens...) + k.DistributionKeeper.SetValidatorCurrentRewards(ctx, val.GetOperator(), currentRewards) + + // Update outstanding rewards + outstanding := k.DistributionKeeper.GetValidatorOutstandingRewards(ctx, val.GetOperator()) + outstanding.Rewards = outstanding.Rewards.Add(tokens...) + k.DistributionKeeper.SetValidatorOutstandingRewards(ctx, val.GetOperator(), outstanding) +} diff --git a/x/incentives/keeper/incentives_test.go b/x/incentives/keeper/incentives_test.go new file mode 100644 index 000000000..b2b1de65c --- /dev/null +++ b/x/incentives/keeper/incentives_test.go @@ -0,0 +1,366 @@ +package keeper + +import ( + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + ccrypto "github.com/cosmos/cosmos-sdk/crypto/types" + sdk "github.com/cosmos/cosmos-sdk/types" + distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/peggyjv/sommelier/v8/x/incentives/types" +) + +var ( + // ConsPrivKeys generate ed25519 ConsPrivKeys to be used for validator operator keys + ConsPrivKeys = []ccrypto.PrivKey{ + ed25519.GenPrivKey(), + ed25519.GenPrivKey(), + ed25519.GenPrivKey(), + ed25519.GenPrivKey(), + ed25519.GenPrivKey(), + } + + // ConsPubKeys holds the consensus public keys to be used for validator operator keys + ConsPubKeys = []ccrypto.PubKey{ + ConsPrivKeys[0].PubKey(), + ConsPrivKeys[1].PubKey(), + ConsPrivKeys[2].PubKey(), + ConsPrivKeys[3].PubKey(), + ConsPrivKeys[4].PubKey(), + } +) + +func (suite *KeeperTestSuite) getMockValidators() []*stakingtypes.Validator { + validator1, err := stakingtypes.NewValidator(sdk.ValAddress([]byte("val1val1val1val1val1")), ConsPubKeys[0], stakingtypes.Description{}) + suite.Require().NoError(err) + validator2, err := stakingtypes.NewValidator(sdk.ValAddress([]byte("val2val2val2val2val2")), ConsPubKeys[1], stakingtypes.Description{}) + suite.Require().NoError(err) + validator3, err := stakingtypes.NewValidator(sdk.ValAddress([]byte("val3val3val3val3val3")), ConsPubKeys[2], stakingtypes.Description{}) + suite.Require().NoError(err) + return []*stakingtypes.Validator{&validator1, &validator2, &validator3} +} + +func (suite *KeeperTestSuite) TestGetValidatorInfos() { + ctx, incentivesKeeper := suite.ctx, suite.incentivesKeeper + + // Create mock validators + validators := suite.getMockValidators() + validator1, validator2, validator3 := validators[0], validators[1], validators[2] + + consAddr1, err := validator1.GetConsAddr() + suite.Require().NoError(err) + consAddr2, err := validator2.GetConsAddr() + suite.Require().NoError(err) + consAddr3, err := validator3.GetConsAddr() + suite.Require().NoError(err) + + // Create mock RequestBeginBlock + req := abci.RequestBeginBlock{ + LastCommitInfo: abci.CommitInfo{ + Votes: []abci.VoteInfo{ + { + Validator: abci.Validator{Address: consAddr1, Power: 10}, + SignedLastBlock: true, + }, + { + Validator: abci.Validator{Address: consAddr2, Power: 20}, + SignedLastBlock: true, + }, + { + Validator: abci.Validator{Address: consAddr3, Power: 30}, + SignedLastBlock: false, + }, + }, + }, + } + + // Set up expectations for the mock StakingKeeper + suite.stakingKeeper.EXPECT().ValidatorByConsAddr(ctx, consAddr1).Return(validator1) + suite.stakingKeeper.EXPECT().ValidatorByConsAddr(ctx, consAddr2).Return(validator2) + + // Call the function being tested + validatorInfos := incentivesKeeper.getValidatorInfos(ctx, req) + + // Assert the results + suite.Require().Len(validatorInfos, 2) + suite.Require().Equal(validator1, validatorInfos[0].Validator) + suite.Require().Equal(int64(10), validatorInfos[0].Power) + suite.Require().Equal(validator2, validatorInfos[1].Validator) + suite.Require().Equal(int64(20), validatorInfos[1].Power) +} + +func (suite *KeeperTestSuite) TestGetValidatorInfosNoSigners() { + ctx, incentivesKeeper := suite.ctx, suite.incentivesKeeper + + // Create mock RequestBeginBlock with no signers + req := abci.RequestBeginBlock{ + LastCommitInfo: abci.CommitInfo{ + Votes: []abci.VoteInfo{ + { + Validator: abci.Validator{Address: []byte("val1"), Power: 10}, + SignedLastBlock: false, + }, + { + Validator: abci.Validator{Address: []byte("val2"), Power: 20}, + SignedLastBlock: false, + }, + }, + }, + } + + // Call the function being tested + validatorInfos := incentivesKeeper.getValidatorInfos(ctx, req) + + // Assert the results + suite.Require().Len(validatorInfos, 0) +} + +func (suite *KeeperTestSuite) TestSortValidatorInfosByPower() { + // Create a slice of ValidatorInfo with unsorted power + valInfos := []ValidatorInfo{ + {Power: 30}, + {Power: 10}, + {Power: 50}, + {Power: 20}, + {Power: 40}, + } + + // Sort the validator infos + sortedValInfos := sortValidatorInfosByPower(valInfos) + + // Assert the results + suite.Require().Len(sortedValInfos, 5) + suite.Require().Equal(int64(50), sortedValInfos[0].Power) + suite.Require().Equal(int64(40), sortedValInfos[1].Power) + suite.Require().Equal(int64(30), sortedValInfos[2].Power) + suite.Require().Equal(int64(20), sortedValInfos[3].Power) + suite.Require().Equal(int64(10), sortedValInfos[4].Power) +} + +func (suite *KeeperTestSuite) TestTruncateVoters() { + // Create a slice of ValidatorInfo + valInfos := []ValidatorInfo{ + {Power: 30}, + {Power: 10}, + {Power: 50}, + {Power: 20}, + {Power: 40}, + } + + // Get the truncated voters + truncatedVoters := truncateVoters(valInfos, 3) + + // Assert the results + suite.Require().Len(truncatedVoters, 3) + suite.Require().Equal(int64(30), truncatedVoters[0].Power) + suite.Require().Equal(int64(10), truncatedVoters[1].Power) + suite.Require().Equal(int64(50), truncatedVoters[2].Power) +} + +func (suite *KeeperTestSuite) TestSortValidatorInfosByPowerEmptySlice() { + // Create an empty slice of ValidatorInfo + var valInfos []ValidatorInfo + + // Sort the validator infos + sortedValInfos := sortValidatorInfosByPower(valInfos) + + // Assert the results + suite.Require().Len(sortedValInfos, 0) +} + +func (suite *KeeperTestSuite) TestGetTotalPower() { + // Create a slice of ValidatorInfo + valInfos := []ValidatorInfo{ + {Power: 30}, + {Power: 10}, + {Power: 50}, + {Power: 20}, + {Power: 40}, + } + + // Get the total power + totalPower := getTotalPower(&valInfos) + + // Assert the result + suite.Require().Equal(int64(150), totalPower) +} + +func (suite *KeeperTestSuite) TestGetTotalPowerEmptySlice() { + // Create an empty slice of ValidatorInfo + var valInfos []ValidatorInfo + + // Get the total power + totalPower := getTotalPower(&valInfos) + + // Assert the result + suite.Require().Equal(int64(0), totalPower) +} + +func (suite *KeeperTestSuite) TestAllocateTokensToValidator() { + ctx, incentivesKeeper := suite.ctx, suite.incentivesKeeper + + // Create a mock validator + valAddr := sdk.ValAddress([]byte("validatorvalidatorva")) + validator, err := stakingtypes.NewValidator(valAddr, ConsPubKeys[0], stakingtypes.Description{}) + suite.Require().NoError(err) + + // Create mock tokens to allocate + tokens := sdk.NewDecCoins(sdk.NewDecCoin("usom", sdk.NewInt(100))) + + // Set up expectations for the mock DistributionKeeper + currentRewards := distributiontypes.ValidatorCurrentRewards{Rewards: sdk.DecCoins{}} + outstandingRewards := distributiontypes.ValidatorOutstandingRewards{Rewards: sdk.DecCoins{}} + + suite.distributionKeeper.EXPECT(). + GetValidatorCurrentRewards(ctx, valAddr). + Return(currentRewards) + suite.distributionKeeper.EXPECT(). + SetValidatorCurrentRewards(ctx, valAddr, distributiontypes.ValidatorCurrentRewards{Rewards: tokens}) + suite.distributionKeeper.EXPECT(). + GetValidatorOutstandingRewards(ctx, valAddr). + Return(outstandingRewards) + suite.distributionKeeper.EXPECT(). + SetValidatorOutstandingRewards(ctx, valAddr, distributiontypes.ValidatorOutstandingRewards{Rewards: tokens}) + + // Call the function being tested + incentivesKeeper.AllocateTokensToValidator(ctx, validator, tokens) + + // Verify that the event was emitted + events := ctx.EventManager().Events() + suite.Require().Len(events, 1) + event := events[0] + suite.Require().Equal(types.EventTypeValidatorIncentivesReward, event.Type) + suite.Require().Len(event.Attributes, 2) + suite.Require().Equal(sdk.AttributeKeyAmount, event.Attributes[0].Key) + suite.Require().Equal(tokens.String(), event.Attributes[0].Value) + suite.Require().Equal(types.AttributeKeyValidator, event.Attributes[1].Key) + suite.Require().Equal(valAddr.String(), event.Attributes[1].Value) +} + +func (suite *KeeperTestSuite) TestAllocateTokensToValidatorWithExistingRewards() { + ctx, incentivesKeeper := suite.ctx, suite.incentivesKeeper + + // Create a mock validator + valAddr := sdk.ValAddress([]byte("validatorvalidatorva")) + validator, err := stakingtypes.NewValidator(valAddr, ConsPubKeys[0], stakingtypes.Description{}) + suite.Require().NoError(err) + + // Create mock tokens to allocate + existingRewards := sdk.NewDecCoins(sdk.NewDecCoin("usom", sdk.NewInt(50))) + newTokens := sdk.NewDecCoins(sdk.NewDecCoin("usom", sdk.NewInt(100))) + expectedTotalRewards := existingRewards.Add(newTokens...) + + // Set up expectations for the mock DistributionKeeper + currentRewards := distributiontypes.ValidatorCurrentRewards{Rewards: existingRewards} + outstandingRewards := distributiontypes.ValidatorOutstandingRewards{Rewards: existingRewards} + + suite.distributionKeeper.EXPECT(). + GetValidatorCurrentRewards(ctx, valAddr). + Return(currentRewards) + suite.distributionKeeper.EXPECT(). + SetValidatorCurrentRewards(ctx, valAddr, distributiontypes.ValidatorCurrentRewards{Rewards: expectedTotalRewards}) + suite.distributionKeeper.EXPECT(). + GetValidatorOutstandingRewards(ctx, valAddr). + Return(outstandingRewards) + suite.distributionKeeper.EXPECT(). + SetValidatorOutstandingRewards(ctx, valAddr, distributiontypes.ValidatorOutstandingRewards{Rewards: expectedTotalRewards}) + + // Call the function being tested + incentivesKeeper.AllocateTokensToValidator(ctx, validator, newTokens) + + // Verify that the event was emitted + events := ctx.EventManager().Events() + suite.Require().Len(events, 1) + event := events[0] + suite.Require().Equal(types.EventTypeValidatorIncentivesReward, event.Type) + suite.Require().Len(event.Attributes, 2) + suite.Require().Equal(sdk.AttributeKeyAmount, event.Attributes[0].Key) + suite.Require().Equal(newTokens.String(), event.Attributes[0].Value) + suite.Require().Equal(types.AttributeKeyValidator, event.Attributes[1].Key) + suite.Require().Equal(valAddr.String(), event.Attributes[1].Value) +} + +func (suite *KeeperTestSuite) TestAllocateTokens() { + ctx, incentivesKeeper := suite.ctx, suite.incentivesKeeper + + // Create mock validators + validators := suite.getMockValidators() + validator1, validator2, validator3 := validators[0], validators[1], validators[2] + + // Set up qualifying voters + qualifyingVoters := []ValidatorInfo{ + {Validator: validator1, Power: 30}, + {Validator: validator2, Power: 20}, + {Validator: validator3, Power: 10}, + } + + totalPreviousPower := int64(60) + totalDistribution := sdk.NewDecCoins(sdk.NewDecCoin("usom", sdk.NewInt(100))) + maxFraction := sdk.NewDecWithPrec(5, 1) // 0.5 + + // Set up expectations for the mock DistributionKeeper + totalExpectedRewards := sdk.NewDecCoins() + for _, voter := range qualifyingVoters { + powerFraction := sdk.NewDecFromInt(sdk.NewInt(voter.Power)).QuoInt64(totalPreviousPower) + expectedReward := totalDistribution.MulDecTruncate(powerFraction) + if powerFraction.GT(maxFraction) { + expectedReward = totalDistribution.MulDecTruncate(maxFraction) + } + + totalExpectedRewards = totalExpectedRewards.Add(expectedReward...) + + suite.distributionKeeper.EXPECT(). + GetValidatorCurrentRewards(ctx, voter.Validator.GetOperator()). + Return(distributiontypes.ValidatorCurrentRewards{Rewards: sdk.DecCoins{}}) + suite.distributionKeeper.EXPECT(). + SetValidatorCurrentRewards(ctx, voter.Validator.GetOperator(), distributiontypes.ValidatorCurrentRewards{Rewards: expectedReward}) + suite.distributionKeeper.EXPECT(). + GetValidatorOutstandingRewards(ctx, voter.Validator.GetOperator()). + Return(distributiontypes.ValidatorOutstandingRewards{Rewards: sdk.DecCoins{}}) + suite.distributionKeeper.EXPECT(). + SetValidatorOutstandingRewards(ctx, voter.Validator.GetOperator(), distributiontypes.ValidatorOutstandingRewards{Rewards: expectedReward}) + } + + // Call the function being tested + remaining := incentivesKeeper.AllocateTokens(ctx, totalPreviousPower, totalDistribution, qualifyingVoters, maxFraction) + + // Verify that the sum of remaining and distributed rewards equals totalDistribution + totalAllocated := remaining.Add(totalExpectedRewards...) + suite.Require().Equal(totalDistribution, totalAllocated, "Sum of remaining and distributed rewards should equal total distribution") + + // Verify that events were emitted + totalEvents := len(qualifyingVoters) + 1 // One event for each validator plus one for the total distribution + events := ctx.EventManager().Events() + suite.Require().Len(events, totalEvents) + for i, event := range events { + if i == totalEvents-1 { + suite.Require().Equal(types.EventTypeTotalValidatorIncentivesRewards, event.Type) + suite.Require().Equal(totalDistribution.Sub(remaining).String(), event.Attributes[0].Value) + continue + } else { + suite.Require().Equal(types.EventTypeValidatorIncentivesReward, event.Type) + suite.Require().Len(event.Attributes, 2) + suite.Require().Equal(sdk.AttributeKeyAmount, event.Attributes[0].Key) + suite.Require().Equal(types.AttributeKeyValidator, event.Attributes[1].Key) + suite.Require().Equal(qualifyingVoters[i].Validator.GetOperator().String(), event.Attributes[1].Value) + } + } +} + +func (suite *KeeperTestSuite) TestAllocateTokensNoQualifyingVoters() { + ctx, incentivesKeeper := suite.ctx, suite.incentivesKeeper + + totalPreviousPower := int64(100) + totalDistribution := sdk.NewDecCoins(sdk.NewDecCoin("usom", sdk.NewInt(100))) + maxFraction := sdk.NewDecWithPrec(5, 1) // 0.5 + + // Call the function being tested with empty qualifyingVoters + remaining := incentivesKeeper.AllocateTokens(ctx, totalPreviousPower, totalDistribution, []ValidatorInfo{}, maxFraction) + + // Verify that all tokens remain unallocated + suite.Require().Equal(totalDistribution, remaining, "All tokens should remain unallocated when there are no qualifying voters") + + // Verify that no events were emitted + events := ctx.EventManager().Events() + suite.Require().Len(events, 0, "No events should be emitted when there are no qualifying voters") +} diff --git a/x/incentives/keeper/keeper.go b/x/incentives/keeper/keeper.go index dd812b80d..c5289ef39 100644 --- a/x/incentives/keeper/keeper.go +++ b/x/incentives/keeper/keeper.go @@ -6,7 +6,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" - "github.com/peggyjv/sommelier/v7/x/incentives/types" + "github.com/peggyjv/sommelier/v8/x/incentives/types" ) // Keeper of the incentives store @@ -17,6 +17,7 @@ type Keeper struct { DistributionKeeper types.DistributionKeeper BankKeeper types.BankKeeper MintKeeper types.MintKeeper + StakingKeeper types.StakingKeeper } func NewKeeper( @@ -26,6 +27,7 @@ func NewKeeper( distributionKeeper types.DistributionKeeper, bankKeeper types.BankKeeper, mintKeeper types.MintKeeper, + stakingKeeper types.StakingKeeper, ) Keeper { if !paramSpace.HasKeyTable() { paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) @@ -38,6 +40,7 @@ func NewKeeper( DistributionKeeper: distributionKeeper, BankKeeper: bankKeeper, MintKeeper: mintKeeper, + StakingKeeper: stakingKeeper, } } diff --git a/x/incentives/keeper/keeper_test.go b/x/incentives/keeper/keeper_test.go index c04092516..e2cf2f036 100644 --- a/x/incentives/keeper/keeper_test.go +++ b/x/incentives/keeper/keeper_test.go @@ -11,10 +11,10 @@ import ( mintTypes "github.com/cosmos/cosmos-sdk/x/mint/types" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" "github.com/golang/mock/gomock" - "github.com/peggyjv/sommelier/v7/app/params" - moduletestutil "github.com/peggyjv/sommelier/v7/testutil" - incentivestestutil "github.com/peggyjv/sommelier/v7/x/incentives/testutil" - incentivesTypes "github.com/peggyjv/sommelier/v7/x/incentives/types" + "github.com/peggyjv/sommelier/v8/app/params" + moduletestutil "github.com/peggyjv/sommelier/v8/testutil" + incentivestestutil "github.com/peggyjv/sommelier/v8/x/incentives/testutil" + incentivesTypes "github.com/peggyjv/sommelier/v8/x/incentives/types" "github.com/stretchr/testify/suite" ) @@ -26,6 +26,7 @@ type KeeperTestSuite struct { distributionKeeper *incentivestestutil.MockDistributionKeeper bankKeeper *incentivestestutil.MockBankKeeper mintKeeper *incentivestestutil.MockMintKeeper + stakingKeeper *incentivestestutil.MockStakingKeeper encCfg moduletestutil.TestEncodingConfig } @@ -44,6 +45,7 @@ func (suite *KeeperTestSuite) SetupTest() { suite.distributionKeeper = incentivestestutil.NewMockDistributionKeeper(ctrl) suite.bankKeeper = incentivestestutil.NewMockBankKeeper(ctrl) suite.mintKeeper = incentivestestutil.NewMockMintKeeper(ctrl) + suite.stakingKeeper = incentivestestutil.NewMockStakingKeeper(ctrl) suite.ctx = ctx params := paramskeeper.NewKeeper( @@ -64,6 +66,7 @@ func (suite *KeeperTestSuite) SetupTest() { suite.distributionKeeper, suite.bankKeeper, suite.mintKeeper, + suite.stakingKeeper, ) suite.encCfg = encCfg @@ -93,10 +96,10 @@ func (suite *KeeperTestSuite) TestGetAPY() { require.Equal(sdk.ZeroDec(), incentivesKeeper.GetAPY(ctx)) // incentives enabled - incentivesKeeper.SetParams(ctx, incentivesTypes.Params{ - DistributionPerBlock: distributionPerBlock, - IncentivesCutoffHeight: 1000, - }) + params := incentivesKeeper.GetParamSet(ctx) + params.DistributionPerBlock = distributionPerBlock + params.IncentivesCutoffHeight = 1000 + incentivesKeeper.SetParams(ctx, params) expected := sdk.NewDecFromInt(distributionPerBlock.Amount.Mul(sdk.NewInt(int64(blocksPerYear)))).Quo(sdk.NewDecFromInt(stakingTotalSupply).Mul(bondedRatio)) require.Equal(expected, incentivesKeeper.GetAPY(ctx)) } diff --git a/x/incentives/keeper/migrations.go b/x/incentives/keeper/migrations.go new file mode 100644 index 000000000..3e6245faa --- /dev/null +++ b/x/incentives/keeper/migrations.go @@ -0,0 +1,26 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/peggyjv/sommelier/v8/x/incentives/types" +) + +// 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 { + currentParams := m.keeper.GetParamSet(ctx) + params := types.DefaultParams() + params.IncentivesCutoffHeight = currentParams.IncentivesCutoffHeight + params.DistributionPerBlock = currentParams.DistributionPerBlock + m.keeper.paramSpace.SetParamSet(ctx, ¶ms) + return nil +} diff --git a/x/incentives/keeper/query_server.go b/x/incentives/keeper/query_server.go index 2b528abfd..3ac3d6712 100644 --- a/x/incentives/keeper/query_server.go +++ b/x/incentives/keeper/query_server.go @@ -4,7 +4,7 @@ import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/incentives/types" + "github.com/peggyjv/sommelier/v8/x/incentives/types" ) var _ types.QueryServer = Keeper{} diff --git a/x/incentives/keeper/query_server_test.go b/x/incentives/keeper/query_server_test.go index 6a9dcdfaa..d9eb0711c 100644 --- a/x/incentives/keeper/query_server_test.go +++ b/x/incentives/keeper/query_server_test.go @@ -1,8 +1,8 @@ package keeper import ( - "github.com/peggyjv/sommelier/v7/app/params" - "github.com/peggyjv/sommelier/v7/x/incentives/types" + "github.com/peggyjv/sommelier/v8/app/params" + "github.com/peggyjv/sommelier/v8/x/incentives/types" sdk "github.com/cosmos/cosmos-sdk/types" mintTypes "github.com/cosmos/cosmos-sdk/x/mint/types" diff --git a/x/incentives/module.go b/x/incentives/module.go index bc102a26c..8dbae73bf 100644 --- a/x/incentives/module.go +++ b/x/incentives/module.go @@ -3,6 +3,7 @@ package incentives import ( "context" "encoding/json" + "fmt" abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" @@ -12,9 +13,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" sim "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/peggyjv/sommelier/v7/x/incentives/client/cli" - "github.com/peggyjv/sommelier/v7/x/incentives/keeper" - "github.com/peggyjv/sommelier/v7/x/incentives/types" + "github.com/peggyjv/sommelier/v8/x/incentives/client/cli" + "github.com/peggyjv/sommelier/v8/x/incentives/keeper" + "github.com/peggyjv/sommelier/v8/x/incentives/types" "github.com/spf13/cobra" ) @@ -106,7 +107,7 @@ func (AppModule) QuerierRoute() string { return types.QuerierRoute } // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { - return 1 + return 2 } func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation { @@ -116,6 +117,11 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.We // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), am.keeper) + + migrator := keeper.NewMigrator(am.keeper) + if err := cfg.RegisterMigration(types.ModuleName, 1, migrator.Migrate1to2); err != nil { + panic(fmt.Sprintf("failed to migrate x/incentives from version 1 to 2: %v", err)) + } } // InitGenesis performs genesis initialization for the incentives module. @@ -135,8 +141,8 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // BeginBlock returns the begin blocker for the incentives module. -func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { - am.keeper.BeginBlocker(ctx) +func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { + am.keeper.BeginBlocker(ctx, req) } // EndBlock returns the end blocker for the incentives module. diff --git a/x/incentives/testutil/expected_keepers_mocks.go b/x/incentives/testutil/expected_keepers_mocks.go index 4f6cad0ad..c87ea1611 100644 --- a/x/incentives/testutil/expected_keepers_mocks.go +++ b/x/incentives/testutil/expected_keepers_mocks.go @@ -7,9 +7,11 @@ package mock_types import ( reflect "reflect" + math "cosmossdk.io/math" types "github.com/cosmos/cosmos-sdk/types" types0 "github.com/cosmos/cosmos-sdk/x/distribution/types" types1 "github.com/cosmos/cosmos-sdk/x/mint/types" + types2 "github.com/cosmos/cosmos-sdk/x/staking/types" gomock "github.com/golang/mock/gomock" ) @@ -50,6 +52,48 @@ func (mr *MockDistributionKeeperMockRecorder) GetFeePool(ctx interface{}) *gomoc return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFeePool", reflect.TypeOf((*MockDistributionKeeper)(nil).GetFeePool), ctx) } +// GetValidatorAccumulatedCommission mocks base method. +func (m *MockDistributionKeeper) GetValidatorAccumulatedCommission(ctx types.Context, valAddr types.ValAddress) types0.ValidatorAccumulatedCommission { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetValidatorAccumulatedCommission", ctx, valAddr) + ret0, _ := ret[0].(types0.ValidatorAccumulatedCommission) + return ret0 +} + +// GetValidatorAccumulatedCommission indicates an expected call of GetValidatorAccumulatedCommission. +func (mr *MockDistributionKeeperMockRecorder) GetValidatorAccumulatedCommission(ctx, valAddr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidatorAccumulatedCommission", reflect.TypeOf((*MockDistributionKeeper)(nil).GetValidatorAccumulatedCommission), ctx, valAddr) +} + +// GetValidatorCurrentRewards mocks base method. +func (m *MockDistributionKeeper) GetValidatorCurrentRewards(ctx types.Context, valAddr types.ValAddress) types0.ValidatorCurrentRewards { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetValidatorCurrentRewards", ctx, valAddr) + ret0, _ := ret[0].(types0.ValidatorCurrentRewards) + return ret0 +} + +// GetValidatorCurrentRewards indicates an expected call of GetValidatorCurrentRewards. +func (mr *MockDistributionKeeperMockRecorder) GetValidatorCurrentRewards(ctx, valAddr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidatorCurrentRewards", reflect.TypeOf((*MockDistributionKeeper)(nil).GetValidatorCurrentRewards), ctx, valAddr) +} + +// GetValidatorOutstandingRewards mocks base method. +func (m *MockDistributionKeeper) GetValidatorOutstandingRewards(ctx types.Context, valAddr types.ValAddress) types0.ValidatorOutstandingRewards { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetValidatorOutstandingRewards", ctx, valAddr) + ret0, _ := ret[0].(types0.ValidatorOutstandingRewards) + return ret0 +} + +// GetValidatorOutstandingRewards indicates an expected call of GetValidatorOutstandingRewards. +func (mr *MockDistributionKeeperMockRecorder) GetValidatorOutstandingRewards(ctx, valAddr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidatorOutstandingRewards", reflect.TypeOf((*MockDistributionKeeper)(nil).GetValidatorOutstandingRewards), ctx, valAddr) +} + // SetFeePool mocks base method. func (m *MockDistributionKeeper) SetFeePool(ctx types.Context, feePool types0.FeePool) { m.ctrl.T.Helper() @@ -62,6 +106,42 @@ func (mr *MockDistributionKeeperMockRecorder) SetFeePool(ctx, feePool interface{ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetFeePool", reflect.TypeOf((*MockDistributionKeeper)(nil).SetFeePool), ctx, feePool) } +// SetValidatorAccumulatedCommission mocks base method. +func (m *MockDistributionKeeper) SetValidatorAccumulatedCommission(ctx types.Context, valAddr types.ValAddress, commission types0.ValidatorAccumulatedCommission) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetValidatorAccumulatedCommission", ctx, valAddr, commission) +} + +// SetValidatorAccumulatedCommission indicates an expected call of SetValidatorAccumulatedCommission. +func (mr *MockDistributionKeeperMockRecorder) SetValidatorAccumulatedCommission(ctx, valAddr, commission interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetValidatorAccumulatedCommission", reflect.TypeOf((*MockDistributionKeeper)(nil).SetValidatorAccumulatedCommission), ctx, valAddr, commission) +} + +// SetValidatorCurrentRewards mocks base method. +func (m *MockDistributionKeeper) SetValidatorCurrentRewards(ctx types.Context, valAddr types.ValAddress, rewards types0.ValidatorCurrentRewards) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetValidatorCurrentRewards", ctx, valAddr, rewards) +} + +// SetValidatorCurrentRewards indicates an expected call of SetValidatorCurrentRewards. +func (mr *MockDistributionKeeperMockRecorder) SetValidatorCurrentRewards(ctx, valAddr, rewards interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetValidatorCurrentRewards", reflect.TypeOf((*MockDistributionKeeper)(nil).SetValidatorCurrentRewards), ctx, valAddr, rewards) +} + +// SetValidatorOutstandingRewards mocks base method. +func (m *MockDistributionKeeper) SetValidatorOutstandingRewards(ctx types.Context, valAddr types.ValAddress, rewards types0.ValidatorOutstandingRewards) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetValidatorOutstandingRewards", ctx, valAddr, rewards) +} + +// SetValidatorOutstandingRewards indicates an expected call of SetValidatorOutstandingRewards. +func (mr *MockDistributionKeeperMockRecorder) SetValidatorOutstandingRewards(ctx, valAddr, rewards interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetValidatorOutstandingRewards", reflect.TypeOf((*MockDistributionKeeper)(nil).SetValidatorOutstandingRewards), ctx, valAddr, rewards) +} + // MockBankKeeper is a mock of BankKeeper interface. type MockBankKeeper struct { ctrl *gomock.Controller @@ -249,10 +329,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 } @@ -261,3 +341,40 @@ func (mr *MockMintKeeperMockRecorder) StakingTokenSupply(ctx interface{}) *gomoc mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StakingTokenSupply", reflect.TypeOf((*MockMintKeeper)(nil).StakingTokenSupply), ctx) } + +// MockStakingKeeper is a mock of StakingKeeper interface. +type MockStakingKeeper struct { + ctrl *gomock.Controller + recorder *MockStakingKeeperMockRecorder +} + +// MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper. +type MockStakingKeeperMockRecorder struct { + mock *MockStakingKeeper +} + +// NewMockStakingKeeper creates a new mock instance. +func NewMockStakingKeeper(ctrl *gomock.Controller) *MockStakingKeeper { + mock := &MockStakingKeeper{ctrl: ctrl} + mock.recorder = &MockStakingKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperMockRecorder { + return m.recorder +} + +// ValidatorByConsAddr mocks base method. +func (m *MockStakingKeeper) ValidatorByConsAddr(ctx types.Context, consAddr types.ConsAddress) types2.ValidatorI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ValidatorByConsAddr", ctx, consAddr) + ret0, _ := ret[0].(types2.ValidatorI) + return ret0 +} + +// ValidatorByConsAddr indicates an expected call of ValidatorByConsAddr. +func (mr *MockStakingKeeperMockRecorder) ValidatorByConsAddr(ctx, consAddr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorByConsAddr", reflect.TypeOf((*MockStakingKeeper)(nil).ValidatorByConsAddr), ctx, consAddr) +} diff --git a/x/incentives/types/errors.go b/x/incentives/types/errors.go index c59b21c9d..4677d4971 100644 --- a/x/incentives/types/errors.go +++ b/x/incentives/types/errors.go @@ -5,5 +5,8 @@ import ( ) var ( - ErrInvalidDistributionPerBlock = errorsmod.Register(ModuleName, 1, "invalid distribution per block") + ErrInvalidDistributionPerBlock = errorsmod.Register(ModuleName, 1, "invalid distribution per block") + ErrInvalidValidatorMaxDistributionPerBlock = errorsmod.Register(ModuleName, 2, "invalid validator distribution per block") + ErrInvalidValidatorIncentivesMaxFraction = errorsmod.Register(ModuleName, 3, "invalid validator incentives max fraction") + ErrInvalidValidatorIncentivesSetSizeLimit = errorsmod.Register(ModuleName, 4, "invalid validator incentives set size limit") ) diff --git a/x/incentives/types/events.go b/x/incentives/types/events.go new file mode 100644 index 000000000..09cecfb71 --- /dev/null +++ b/x/incentives/types/events.go @@ -0,0 +1,8 @@ +package types + +const ( + EventTypeValidatorIncentivesReward = "validator_incentives_reward" + EventTypeTotalValidatorIncentivesRewards = "total_validator_incentives_rewards" + + AttributeKeyValidator = "validator" +) diff --git a/x/incentives/types/expected_keepers.go b/x/incentives/types/expected_keepers.go index b270094f7..7c4bdc901 100644 --- a/x/incentives/types/expected_keepers.go +++ b/x/incentives/types/expected_keepers.go @@ -1,4 +1,4 @@ -//go:generate mockgen -destination=../testutil/expected_keepers_mocks.go -package=keeper github.com/peggyjv/sommelier/v7/x/incentives/types AccountKeeper,DistributionKeeper,BankKeeper,MintKeeper +//go:generate mockgen -destination=../testutil/expected_keepers_mocks.go -package=keeper github.com/peggyjv/sommelier/v8/x/incentives/types AccountKeeper,DistributionKeeper,BankKeeper,MintKeeper package types @@ -7,12 +7,19 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) // DistributionKeeper defines the expected distribution keeper methods type DistributionKeeper interface { GetFeePool(ctx sdk.Context) (feePool distributiontypes.FeePool) SetFeePool(ctx sdk.Context, feePool distributiontypes.FeePool) + GetValidatorOutstandingRewards(ctx sdk.Context, valAddr sdk.ValAddress) (rewards distributiontypes.ValidatorOutstandingRewards) + SetValidatorOutstandingRewards(ctx sdk.Context, valAddr sdk.ValAddress, rewards distributiontypes.ValidatorOutstandingRewards) + GetValidatorCurrentRewards(ctx sdk.Context, valAddr sdk.ValAddress) (rewards distributiontypes.ValidatorCurrentRewards) + SetValidatorCurrentRewards(ctx sdk.Context, valAddr sdk.ValAddress, rewards distributiontypes.ValidatorCurrentRewards) + GetValidatorAccumulatedCommission(ctx sdk.Context, valAddr sdk.ValAddress) (commission distributiontypes.ValidatorAccumulatedCommission) + SetValidatorAccumulatedCommission(ctx sdk.Context, valAddr sdk.ValAddress, commission distributiontypes.ValidatorAccumulatedCommission) } // BankKeeper defines the expected interface needed to retrieve account balances. @@ -35,3 +42,7 @@ type MintKeeper interface { StakingTokenSupply(ctx sdk.Context) math.Int BondedRatio(ctx sdk.Context) sdk.Dec } + +type StakingKeeper interface { + ValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) stakingtypes.ValidatorI +} diff --git a/x/incentives/types/genesis.pb.go b/x/incentives/types/genesis.pb.go index 42b1b63c0..79f9c87fc 100644 --- a/x/incentives/types/genesis.pb.go +++ b/x/incentives/types/genesis.pb.go @@ -5,6 +5,7 @@ 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/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -75,6 +76,14 @@ type Params struct { // IncentivesCutoffHeight defines the block height after which the incentives module will stop sending coins to the distribution module from // the community pool IncentivesCutoffHeight uint64 `protobuf:"varint,2,opt,name=incentives_cutoff_height,json=incentivesCutoffHeight,proto3" json:"incentives_cutoff_height,omitempty"` + // ValidatorMaxDistributionPerBlock defines the maximum coins to be sent directly to voters in the last block from the community pool every block. Leftover coins remain in the community pool. + ValidatorMaxDistributionPerBlock types.Coin `protobuf:"bytes,3,opt,name=validator_max_distribution_per_block,json=validatorMaxDistributionPerBlock,proto3" json:"validator_max_distribution_per_block"` + // ValidatorIncentivesCutoffHeight defines the block height after which the validator incentives will be stopped + ValidatorIncentivesCutoffHeight uint64 `protobuf:"varint,4,opt,name=validator_incentives_cutoff_height,json=validatorIncentivesCutoffHeight,proto3" json:"validator_incentives_cutoff_height,omitempty"` + // ValidatorIncentivesMaxFraction defines the maximum fraction of the validator distribution per block that can be sent to a single validator + ValidatorIncentivesMaxFraction github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=validator_incentives_max_fraction,json=validatorIncentivesMaxFraction,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"validator_incentives_max_fraction"` + // ValidatorIncentivesSetSizeLimit defines the max number of validators to apportion the validator distribution per block to + ValidatorIncentivesSetSizeLimit uint64 `protobuf:"varint,6,opt,name=validator_incentives_set_size_limit,json=validatorIncentivesSetSizeLimit,proto3" json:"validator_incentives_set_size_limit,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -124,6 +133,27 @@ func (m *Params) GetIncentivesCutoffHeight() uint64 { return 0 } +func (m *Params) GetValidatorMaxDistributionPerBlock() types.Coin { + if m != nil { + return m.ValidatorMaxDistributionPerBlock + } + return types.Coin{} +} + +func (m *Params) GetValidatorIncentivesCutoffHeight() uint64 { + if m != nil { + return m.ValidatorIncentivesCutoffHeight + } + return 0 +} + +func (m *Params) GetValidatorIncentivesSetSizeLimit() uint64 { + if m != nil { + return m.ValidatorIncentivesSetSizeLimit + } + return 0 +} + func init() { proto.RegisterType((*GenesisState)(nil), "incentives.v1.GenesisState") proto.RegisterType((*Params)(nil), "incentives.v1.Params") @@ -132,27 +162,35 @@ func init() { func init() { proto.RegisterFile("incentives/v1/genesis.proto", fileDescriptor_179cfb82d3e2b395) } var fileDescriptor_179cfb82d3e2b395 = []byte{ - // 309 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0xd0, 0xb1, 0x4f, 0x3a, 0x31, - 0x14, 0x07, 0xf0, 0xeb, 0x2f, 0x84, 0xe1, 0x7e, 0xba, 0x5c, 0x90, 0x20, 0x26, 0x95, 0x30, 0x31, - 0xb5, 0x39, 0x18, 0x74, 0x86, 0x41, 0x07, 0x07, 0x82, 0x71, 0x71, 0xb9, 0xdc, 0xd5, 0x47, 0xa9, - 0x72, 0x7d, 0x97, 0xb6, 0x34, 0xf2, 0x5f, 0xb8, 0xfa, 0x1f, 0x31, 0x32, 0x3a, 0x19, 0x03, 0xff, - 0x88, 0xe1, 0xee, 0x12, 0x70, 0x6b, 0xf2, 0x79, 0xef, 0xdb, 0x6f, 0x5e, 0x78, 0xa5, 0xb4, 0x00, - 0xed, 0x94, 0x07, 0xcb, 0x7d, 0xcc, 0x25, 0x68, 0xb0, 0xca, 0xb2, 0xc2, 0xa0, 0xc3, 0xe8, 0xfc, - 0x88, 0xcc, 0xc7, 0xdd, 0x96, 0x44, 0x89, 0xa5, 0xf0, 0xc3, 0xab, 0x1a, 0xea, 0x52, 0x81, 0x36, - 0x47, 0xcb, 0xb3, 0xd4, 0x02, 0xf7, 0x71, 0x06, 0x2e, 0x8d, 0xb9, 0x40, 0xa5, 0x2b, 0xef, 0x4f, - 0xc2, 0xb3, 0xbb, 0x2a, 0xf5, 0xd1, 0xa5, 0x0e, 0xa2, 0x51, 0xd8, 0x2c, 0x52, 0x93, 0xe6, 0xb6, - 0x43, 0x7a, 0x64, 0xf0, 0x7f, 0x78, 0xc1, 0xfe, 0xfc, 0xc2, 0xa6, 0x25, 0x8e, 0x1b, 0x9b, 0xef, - 0xeb, 0x60, 0x56, 0x8f, 0xf6, 0x3f, 0x49, 0xd8, 0xac, 0x20, 0x7a, 0x0a, 0xdb, 0x2f, 0xca, 0x3a, - 0xa3, 0xb2, 0x95, 0x53, 0xa8, 0x93, 0x02, 0x4c, 0x92, 0x2d, 0x51, 0xbc, 0xd5, 0x79, 0x97, 0xac, - 0x2a, 0xc4, 0x0e, 0x85, 0x58, 0x5d, 0x88, 0x4d, 0x50, 0xe9, 0x3a, 0xb3, 0x75, 0xba, 0x3e, 0x05, - 0x33, 0x3e, 0x2c, 0x47, 0xb7, 0x61, 0xe7, 0xd8, 0x23, 0x11, 0x2b, 0x87, 0xf3, 0x79, 0xb2, 0x00, - 0x25, 0x17, 0xae, 0xf3, 0xaf, 0x47, 0x06, 0x8d, 0x59, 0xfb, 0xe8, 0x93, 0x92, 0xef, 0x4b, 0x1d, - 0x3f, 0x6c, 0x76, 0x94, 0x6c, 0x77, 0x94, 0xfc, 0xec, 0x28, 0xf9, 0xd8, 0xd3, 0x60, 0xbb, 0xa7, - 0xc1, 0xd7, 0x9e, 0x06, 0xcf, 0x43, 0xa9, 0xdc, 0x62, 0x95, 0x31, 0x81, 0x39, 0x2f, 0x40, 0xca, - 0xf5, 0xab, 0xe7, 0x16, 0xf3, 0x1c, 0x96, 0x0a, 0x0c, 0xf7, 0x37, 0xfc, 0x9d, 0x9f, 0x9c, 0xdf, - 0xad, 0x0b, 0xb0, 0x59, 0xb3, 0xbc, 0xda, 0xe8, 0x37, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x68, 0x83, - 0x05, 0x99, 0x01, 0x00, 0x00, + // 441 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xcb, 0x6a, 0xdb, 0x40, + 0x14, 0x86, 0xad, 0xd6, 0x35, 0x74, 0xda, 0x6e, 0x44, 0x1a, 0xd4, 0x14, 0x64, 0xd7, 0x2d, 0xc5, + 0x9b, 0xce, 0xe0, 0x64, 0x93, 0xb5, 0x1d, 0x7a, 0xa1, 0x0e, 0x04, 0x9b, 0x6e, 0xba, 0x19, 0x46, + 0xe3, 0x63, 0xf9, 0x34, 0x96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 0x6c, 0xef, 0x16, 0xe4, 0xfe, 0x41, 0x2b, 0xff, 0x79, 0xcf, 0xfe, 0x05, 0x00, 0x00, 0xff, + 0xff, 0x89, 0x15, 0x21, 0xdd, 0x20, 0x03, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -208,6 +246,36 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.ValidatorIncentivesSetSizeLimit != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.ValidatorIncentivesSetSizeLimit)) + i-- + dAtA[i] = 0x30 + } + { + size := m.ValidatorIncentivesMaxFraction.Size() + i -= size + if _, err := m.ValidatorIncentivesMaxFraction.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.ValidatorIncentivesCutoffHeight != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.ValidatorIncentivesCutoffHeight)) + i-- + dAtA[i] = 0x20 + } + { + size, err := m.ValidatorMaxDistributionPerBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a if m.IncentivesCutoffHeight != 0 { i = encodeVarintGenesis(dAtA, i, uint64(m.IncentivesCutoffHeight)) i-- @@ -259,6 +327,16 @@ func (m *Params) Size() (n int) { if m.IncentivesCutoffHeight != 0 { n += 1 + sovGenesis(uint64(m.IncentivesCutoffHeight)) } + l = m.ValidatorMaxDistributionPerBlock.Size() + n += 1 + l + sovGenesis(uint64(l)) + if m.ValidatorIncentivesCutoffHeight != 0 { + n += 1 + sovGenesis(uint64(m.ValidatorIncentivesCutoffHeight)) + } + l = m.ValidatorIncentivesMaxFraction.Size() + n += 1 + l + sovGenesis(uint64(l)) + if m.ValidatorIncentivesSetSizeLimit != 0 { + n += 1 + sovGenesis(uint64(m.ValidatorIncentivesSetSizeLimit)) + } return n } @@ -432,6 +510,111 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorMaxDistributionPerBlock", 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.ValidatorMaxDistributionPerBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIncentivesCutoffHeight", wireType) + } + m.ValidatorIncentivesCutoffHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValidatorIncentivesCutoffHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIncentivesMaxFraction", 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.ValidatorIncentivesMaxFraction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIncentivesSetSizeLimit", wireType) + } + m.ValidatorIncentivesSetSizeLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValidatorIncentivesSetSizeLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/incentives/types/params.go b/x/incentives/types/params.go index f434d5744..ff47ee5f0 100644 --- a/x/incentives/types/params.go +++ b/x/incentives/types/params.go @@ -4,13 +4,17 @@ 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/app/params" + "github.com/peggyjv/sommelier/v8/app/params" ) // Parameter keys var ( - KeyDistributionPerBlock = []byte("DistributionPerBlock") - KeyIncentivesCutoffHeight = []byte("IncentivesCutoffHeight") + KeyDistributionPerBlock = []byte("DistributionPerBlock") + KeyIncentivesCutoffHeight = []byte("IncentivesCutoffHeight") + KeyValidatorMaxDistributionPerBlock = []byte("ValidatorMaxDistributionPerBlock") + KeyValidatorIncentivesCutoffHeight = []byte("ValidatorIncentivesCutoffHeight") + KeyValidatorIncentivesMaxFraction = []byte("ValidatorIncentivesMaxFraction") + KeyValidatorIncentivesSetSizeLimit = []byte("ValidatorIncentivesSetSizeLimit") ) var _ paramtypes.ParamSet = &Params{} @@ -25,7 +29,11 @@ func DefaultParams() Params { return Params{ DistributionPerBlock: sdk.NewCoin(params.BaseCoinUnit, sdk.ZeroInt()), // Anything lower than or equal to current height is "off" - IncentivesCutoffHeight: 0, + IncentivesCutoffHeight: 0, + ValidatorMaxDistributionPerBlock: sdk.NewCoin(params.BaseCoinUnit, sdk.ZeroInt()), + ValidatorIncentivesCutoffHeight: 0, + ValidatorIncentivesMaxFraction: sdk.MustNewDecFromStr("0.1"), + ValidatorIncentivesSetSizeLimit: 50, } } @@ -34,6 +42,10 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ paramtypes.NewParamSetPair(KeyDistributionPerBlock, &p.DistributionPerBlock, validateDistributionPerBlock), paramtypes.NewParamSetPair(KeyIncentivesCutoffHeight, &p.IncentivesCutoffHeight, validateIncentivesCutoffHeight), + paramtypes.NewParamSetPair(KeyValidatorMaxDistributionPerBlock, &p.ValidatorMaxDistributionPerBlock, validateValidatorMaxDistributionPerBlock), + paramtypes.NewParamSetPair(KeyValidatorIncentivesCutoffHeight, &p.ValidatorIncentivesCutoffHeight, validateValidatorIncentivesCutoffHeight), + paramtypes.NewParamSetPair(KeyValidatorIncentivesMaxFraction, &p.ValidatorIncentivesMaxFraction, validateValidatorIncentivesMaxFraction), + paramtypes.NewParamSetPair(KeyValidatorIncentivesSetSizeLimit, &p.ValidatorIncentivesSetSizeLimit, validateValidatorIncentivesSetSizeLimit), } } @@ -69,3 +81,41 @@ func validateDistributionPerBlock(i interface{}) error { func validateIncentivesCutoffHeight(_ interface{}) error { return nil } + +func validateValidatorMaxDistributionPerBlock(i interface{}) error { + if err := validateDistributionPerBlock(i); err != nil { + return errorsmod.Wrapf(ErrInvalidValidatorMaxDistributionPerBlock, "invalid parameter type: %T", i) + } + + return nil +} + +func validateValidatorIncentivesCutoffHeight(i interface{}) error { + return nil +} + +func validateValidatorIncentivesMaxFraction(i interface{}) error { + dec, ok := i.(sdk.Dec) + if !ok { + return errorsmod.Wrapf(ErrInvalidValidatorIncentivesMaxFraction, "invalid parameter type: %T", i) + } + + if dec.IsNegative() { + return errorsmod.Wrapf(ErrInvalidValidatorIncentivesMaxFraction, "validator incentives max fraction cannot be negative") + } + + if dec.GT(sdk.OneDec()) { + return errorsmod.Wrapf(ErrInvalidValidatorIncentivesMaxFraction, "validator incentives max fraction cannot be greater than one") + } + + return nil +} + +func validateValidatorIncentivesSetSizeLimit(i interface{}) error { + _, ok := i.(uint64) + if !ok { + return errorsmod.Wrapf(ErrInvalidValidatorIncentivesSetSizeLimit, "invalid parameter type: %T", i) + } + + return nil +} diff --git a/x/incentives/types/query.pb.go b/x/incentives/types/query.pb.go index 46f1b1a7f..640f69d2b 100644 --- a/x/incentives/types/query.pb.go +++ b/x/incentives/types/query.pb.go @@ -208,7 +208,7 @@ var fileDescriptor_a3d66b0ba5a24e28 = []byte{ // 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, + 0x42, 0x8d, 0xe9, 0x04, 0xd8, 0xb8, 0x95, 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, 0xfe, @@ -228,7 +228,7 @@ var fileDescriptor_a3d66b0ba5a24e28 = []byte{ 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, + 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x03, 0xd7, 0xe6, 0x90, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/pubsub/client/cli/query.go b/x/pubsub/client/cli/query.go index d178501d4..39f05f2e8 100644 --- a/x/pubsub/client/cli/query.go +++ b/x/pubsub/client/cli/query.go @@ -5,7 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/peggyjv/sommelier/v7/x/pubsub/types" + "github.com/peggyjv/sommelier/v8/x/pubsub/types" "github.com/spf13/cobra" ) diff --git a/x/pubsub/client/cli/tx.go b/x/pubsub/client/cli/tx.go index c0d0233fe..00877d2a9 100644 --- a/x/pubsub/client/cli/tx.go +++ b/x/pubsub/client/cli/tx.go @@ -13,7 +13,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/version" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/peggyjv/sommelier/v7/x/pubsub/types" + "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) // GetTxCmd returns the transaction commands for this module diff --git a/x/pubsub/client/proposal_handler.go b/x/pubsub/client/proposal_handler.go index 5c1e173c4..cd695ce55 100644 --- a/x/pubsub/client/proposal_handler.go +++ b/x/pubsub/client/proposal_handler.go @@ -2,7 +2,7 @@ package client import ( govclient "github.com/cosmos/cosmos-sdk/x/gov/client" - "github.com/peggyjv/sommelier/v7/x/pubsub/client/cli" + "github.com/peggyjv/sommelier/v8/x/pubsub/client/cli" ) var ( diff --git a/x/pubsub/handler.go b/x/pubsub/handler.go index 81434a1b8..2a751e52f 100644 --- a/x/pubsub/handler.go +++ b/x/pubsub/handler.go @@ -7,8 +7,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" govtypesv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/peggyjv/sommelier/v7/x/pubsub/keeper" - "github.com/peggyjv/sommelier/v7/x/pubsub/types" + "github.com/peggyjv/sommelier/v8/x/pubsub/keeper" + "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) // NewHandler returns a handler for "pubsub" type messages diff --git a/x/pubsub/keeper/genesis.go b/x/pubsub/keeper/genesis.go index 935e1b17e..e74fe43a7 100644 --- a/x/pubsub/keeper/genesis.go +++ b/x/pubsub/keeper/genesis.go @@ -4,7 +4,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/pubsub/types" + "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) // InitGenesis initializes the module's state from a provided genesis diff --git a/x/pubsub/keeper/genesis_test.go b/x/pubsub/keeper/genesis_test.go index bc29408aa..c20811eb1 100644 --- a/x/pubsub/keeper/genesis_test.go +++ b/x/pubsub/keeper/genesis_test.go @@ -3,7 +3,7 @@ package keeper import ( "testing" - "github.com/peggyjv/sommelier/v7/x/pubsub/types" + "github.com/peggyjv/sommelier/v8/x/pubsub/types" "github.com/stretchr/testify/require" ) diff --git a/x/pubsub/keeper/keeper.go b/x/pubsub/keeper/keeper.go index 826c3f4a7..60a69777e 100644 --- a/x/pubsub/keeper/keeper.go +++ b/x/pubsub/keeper/keeper.go @@ -12,7 +12,7 @@ import ( 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" + "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) type Keeper struct { diff --git a/x/pubsub/keeper/msg_server.go b/x/pubsub/keeper/msg_server.go index 295c7a777..3bb7818de 100644 --- a/x/pubsub/keeper/msg_server.go +++ b/x/pubsub/keeper/msg_server.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/peggyjv/sommelier/v7/x/pubsub/types" + "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) var _ types.MsgServer = Keeper{} diff --git a/x/pubsub/keeper/proposal_handler.go b/x/pubsub/keeper/proposal_handler.go index fc70e6a52..bb9e17f15 100644 --- a/x/pubsub/keeper/proposal_handler.go +++ b/x/pubsub/keeper/proposal_handler.go @@ -4,7 +4,7 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/peggyjv/sommelier/v7/x/pubsub/types" + "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) // HandleAddPublisherProposal is a handler for executing a passed community publisher addition proposal diff --git a/x/pubsub/keeper/query_server.go b/x/pubsub/keeper/query_server.go index 21dbcbadc..d5c56451d 100644 --- a/x/pubsub/keeper/query_server.go +++ b/x/pubsub/keeper/query_server.go @@ -5,7 +5,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/peggyjv/sommelier/v7/x/pubsub/types" + "github.com/peggyjv/sommelier/v8/x/pubsub/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/x/pubsub/module.go b/x/pubsub/module.go index 6ff586d49..3d25fea7d 100644 --- a/x/pubsub/module.go +++ b/x/pubsub/module.go @@ -16,9 +16,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" sim "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/peggyjv/sommelier/v7/x/pubsub/client/cli" - "github.com/peggyjv/sommelier/v7/x/pubsub/keeper" - "github.com/peggyjv/sommelier/v7/x/pubsub/types" + "github.com/peggyjv/sommelier/v8/x/pubsub/client/cli" + "github.com/peggyjv/sommelier/v8/x/pubsub/keeper" + "github.com/peggyjv/sommelier/v8/x/pubsub/types" ) var ( diff --git a/x/pubsub/types/genesis.pb.go b/x/pubsub/types/genesis.pb.go index 5b9601392..7b04761dd 100644 --- a/x/pubsub/types/genesis.pb.go +++ b/x/pubsub/types/genesis.pb.go @@ -118,26 +118,26 @@ var fileDescriptor_0c358cacca624823 = []byte{ // 342 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x41, 0x4f, 0xe2, 0x40, 0x18, 0x86, 0xdb, 0x85, 0x25, 0xd9, 0x61, 0x0f, 0xcb, 0x04, 0xd6, 0x06, 0x93, 0x91, 0x78, 0xe2, - 0xd4, 0x09, 0x68, 0xc2, 0x9d, 0x98, 0xa0, 0x9e, 0x4c, 0x7b, 0xf3, 0x42, 0x3a, 0x30, 0x96, 0x31, - 0xb4, 0x33, 0xe9, 0x37, 0x6d, 0xe4, 0x5f, 0x78, 0xf4, 0x27, 0x71, 0xe4, 0xe8, 0xc9, 0x18, 0xf8, - 0x23, 0x86, 0x69, 0x2d, 0x55, 0xb9, 0x35, 0xef, 0xfb, 0x3e, 0xcf, 0xd7, 0x64, 0xd0, 0x89, 0x4a, - 0x19, 0xa4, 0x8c, 0x66, 0x03, 0x1a, 0xf2, 0x98, 0x83, 0x00, 0x57, 0x25, 0x52, 0x4b, 0xfc, 0x27, - 0x2f, 0xdc, 0x6c, 0xd0, 0x6d, 0x87, 0x32, 0x94, 0x26, 0xa5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00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/pubsub/types/params.pb.go b/x/pubsub/types/params.pb.go index d2108c66a..77af6480e 100644 --- a/x/pubsub/types/params.pb.go +++ b/x/pubsub/types/params.pb.go @@ -74,9 +74,9 @@ var fileDescriptor_e023d277dcf562c9 = []byte{ 0x0b, 0xe4, 0x19, 0x9c, 0x3c, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x2f, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0xbf, 0x20, 0x35, 0x3d, 0xbd, - 0x32, 0xab, 0x4c, 0xbf, 0x38, 0x3f, 0x37, 0x37, 0x35, 0x27, 0x33, 0xb5, 0x48, 0xbf, 0xcc, 0x5c, + 0x32, 0xab, 0x4c, 0xbf, 0x38, 0x3f, 0x37, 0x37, 0x35, 0x27, 0x33, 0xb5, 0x48, 0xbf, 0xcc, 0x42, 0xbf, 0x42, 0x1f, 0xea, 0x88, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0x05, 0xc6, 0x80, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xce, 0x64, 0xc5, 0x61, 0x9b, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0x6f, 0xd0, 0x82, 0x9b, 0x00, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/pubsub/types/pubsub.pb.go b/x/pubsub/types/pubsub.pb.go index bf0719fa6..0fb898e92 100644 --- a/x/pubsub/types/pubsub.pb.go +++ b/x/pubsub/types/pubsub.pb.go @@ -1037,47 +1037,47 @@ var fileDescriptor_3164155f25b3675d = []byte{ // 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, 0xc6, 0x60, 0xc3, 0x88, 0x4e, 0x15, 0xcf, 0x67, 0x82, 0xe1, 0xb2, 0xb4, - 0x06, 0x1b, 0x97, 0x17, 0x3b, 0xac, 0xc3, 0x42, 0xaf, 0x31, 0x3c, 0x45, 0x17, 0xf4, 0x7d, 0x28, - 0xef, 0x04, 0x36, 0x75, 0x79, 0x97, 0xf8, 0x58, 0x85, 0x92, 0xe5, 0x38, 0x3e, 0xe1, 0x5c, 0x45, - 0x2b, 0x68, 0xb5, 0xdc, 0x88, 0x4d, 0xbc, 0x04, 0x45, 0x87, 0xf5, 0x2c, 0xb7, 0xaf, 0x66, 0xc3, - 0x80, 0xb4, 0xf0, 0x32, 0x94, 0xda, 0x56, 0xab, 0x4d, 0x7c, 0xa1, 0xe6, 0xa2, 0x40, 0xdb, 0x7a, - 0x48, 0x7c, 0xa1, 0x1f, 0x00, 0x34, 0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0xf6, 0x8e, 0x5a, 0x19, 0xa9, 0x59, 0x91, 0xf9, 0x1f, 0x85, + 0xf1, 0x86, 0xbc, 0x17, 0x91, 0xa6, 0x34, 0x24, 0x9d, 0x8f, 0x49, 0x53, 0xba, 0xeb, 0x53, 0xbc, + 0x05, 0x0b, 0x16, 0xa5, 0xec, 0x39, 0x71, 0x5a, 0x7c, 0x24, 0x0c, 0x57, 0x0b, 0x21, 0xf2, 0xe5, + 0x04, 0xb2, 0x19, 0xdd, 0x1a, 0xab, 0xc7, 0x1b, 0xd8, 0x3a, 0xe5, 0xc3, 0x37, 0x60, 0x3e, 0xc6, + 0x93, 0x5a, 0x12, 0xae, 0x16, 0x57, 0x72, 0xab, 0xe5, 0x86, 0x22, 0x03, 0x66, 0xec, 0xd7, 0xdf, + 0x20, 0x50, 0xc6, 0x8f, 0x7f, 0x56, 0xb2, 0x5b, 0x80, 0xc7, 0x94, 0xe3, 0x6c, 0x52, 0xb4, 0xf9, + 0x71, 0x44, 0xa6, 0x9b, 0xa8, 0x70, 0x6e, 0xa2, 0xc2, 0xba, 0x0b, 0x0b, 0x55, 0x72, 0x60, 0x05, + 0x54, 0x34, 0x13, 0x29, 0xa7, 0xd1, 0x4c, 0xfd, 0x03, 0x82, 0x45, 0xd3, 0x71, 0x46, 0x73, 0xb3, + 0xed, 0x33, 0x8f, 0x71, 0x8b, 0xe2, 0x45, 0x28, 0x08, 0x57, 0x50, 0x22, 0x53, 0x44, 0x06, 0x5e, + 0x81, 0xff, 0x1c, 0x32, 0x4a, 0x25, 0x41, 0x93, 0xae, 0xc4, 0x4a, 0xe4, 0x52, 0x2b, 0x91, 0x98, + 0xf5, 0x7c, 0x7a, 0xd6, 0x2f, 0x41, 0xd9, 0xf3, 0x19, 0x3b, 0x08, 0xc7, 0xa3, 0x10, 0xc6, 0x66, + 0x42, 0xc7, 0x70, 0x3e, 0x12, 0x8b, 0x50, 0x4c, 0x6d, 0xd2, 0x17, 0x04, 0x57, 0x26, 0x11, 0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2b, 0x1d, 0x57, 0x74, 0x03, 0xbb, 0xd2, 0x66, 0x3d, 0xc3, 0x23, 0x9d, + 0xce, 0xe1, 0xb3, 0x81, 0xc1, 0x59, 0xaf, 0x47, 0xa8, 0x4b, 0x7c, 0x63, 0x70, 0xdf, 0x78, 0x21, + 0x7f, 0x7d, 0x0c, 0x71, 0xe8, 0x11, 0x6e, 0x17, 0xc3, 0x1f, 0x9c, 0xbb, 0xdf, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x1f, 0x98, 0x7d, 0x52, 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 76ad699c7..89293d434 100644 --- a/x/pubsub/types/query.pb.go +++ b/x/pubsub/types/query.pb.go @@ -1568,87 +1568,87 @@ func init() { proto.RegisterFile("pubsub/v1/query.proto", fileDescriptor_1eae429 var fileDescriptor_1eae429cdae9f3b6 = []byte{ // 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, + 0x13, 0xcf, 0xf6, 0xfb, 0xa5, 0x52, 0xa6, 0x52, 0x93, 0x4c, 0x9d, 0x92, 0x6c, 0x1a, 0x27, 0x79, + 0x88, 0xfc, 0x6a, 0xe2, 0x25, 0x69, 0xaa, 0xa4, 0xb4, 0x02, 0x61, 0x85, 0xb6, 0x29, 0xa5, 0xa4, 0x89, 0x04, 0xa5, 0x45, 0xb2, 0xd6, 0xf1, 0xe2, 0x2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93, 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, 0xfa, 0x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0xb6, 0x0c, 0xe7, 0xb8, 0x11, 0x3f, 0x10, 0x09, + 0xee, 0xc2, 0x9a, 0x8c, 0xc1, 0xb8, 0x6b, 0xf4, 0x6d, 0xbd, 0x62, 0x96, 0x74, 0xc7, 0x6a, 0x08, + 0x1c, 0xbf, 0x07, 0x13, 0x1d, 0x74, 0x4e, 0x8a, 0x60, 0x07, 0x46, 0xda, 0x5f, 0x77, 0xad, 0xe6, + 0x18, 0x35, 0xe7, 0xf8, 0xf9, 0x88, 0x53, 0xd0, 0x47, 0x86, 0xeb, 0x47, 0x45, 0x59, 0x30, 0x4b, + 0x43, 0x67, 0x5c, 0xcd, 0xf3, 0x61, 0xf1, 0x5a, 0x89, 0x19, 0x70, 0x49, 0xec, 0x92, 0xb8, 0xbc, + 0x1e, 0xf6, 0x69, 0xba, 0x67, 0xf4, 0x82, 0xaa, 0x28, 0xb7, 0xe8, 0x36, 0xc7, 0xe3, 0x09, 0x58, + 0x56, 0xec, 0x26, 0x88, 0xeb, 0x36, 0x8c, 0x26, 0x9c, 0x13, 0x8e, 0x5b, 0x30, 0x10, 0xc5, 0xe1, + 0x47, 0xb6, 0x13, 0x90, 0xfe, 0x08, 0x10, 0x9b, 0x3d, 0x84, 0x79, 0xa1, 0xa7, 0x3c, 0x97, 0x78, + 0x31, 0xec, 0xa2, 0x0b, 0xec, 0x41, 0x4e, 0xd6, 0xf6, 0xb3, 0xa6, 0xf5, 0x0e, 0xcc, 0x25, 0xb8, + 0xde, 0x0c, 0x3f, 0xf8, 0xaa, 0xcf, 0x4a, 0x90, 0x20, 0x8a, 0x30, 0x41, 0x76, 0x13, 0xe3, 0x15, + 0x35, 0xfc, 0xac, 0x29, 0xb5, 0x28, 0x67, 0x78, 0xb5, 0xb4, 0x97, 0xc3, 0xf1, 0x1a, 0x94, 0x7c, + 0x49, 0x98, 0x94, 0x8b, 0x71, 0xbf, 0xc4, 0xf0, 0x36, 0x84, 0xcc, 0xb7, 0x17, 0xc5, 0x88, 0xb0, +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f2, 0xcc, 0x28, 0x8e, 0x68, 0xb6, 0x55, 0xad, 0x1a, 0x15, + 0xd3, 0x68, 0x68, 0xd1, 0xc5, 0x00, 0xbf, 0x52, 0xe0, 0x7c, 0xfb, 0x27, 0x06, 0xc7, 0x63, 0xc6, + 0x23, 0xb3, 0xb9, 0x3a, 0xd1, 0x41, 0x83, 0x10, 0xbc, 0xca, 0x11, 0x2c, 0xe1, 0xa2, 0x18, 0x41, + 0x30, 0x08, 0x6b, 0x8f, 0xa3, 0xb5, 0xb0, 0x8f, 0x9f, 0x28, 0xd0, 0x17, 0x99, 0xb6, 0x31, 0xd9, + 0x6f, 0x10, 0x19, 0xd6, 0x49, 0x85, 0xb0, 0xcd, 0x71, 0x6c, 0x13, 0x38, 0x96, 0x82, 0x0d, 0xbf, + 0xf6, 0x81, 0xf0, 0x62, 0x89, 0x03, 0x89, 0x4d, 0xf0, 0x71, 0x20, 0xf1, 0xd9, 0x9c, 0xe5, 0x39, + 0x90, 0x65, 0xbc, 0x2a, 0x04, 0x12, 0x9a, 0x50, 0xb5, 0xc7, 0xf1, 0x5e, 0xbf, 0x8f, 0x9f, 0x29, + 0xd0, 0x1f, 0x1d, 0xc7, 0xb1, 0x83, 0xf3, 0x20, 0x52, 0x2f, 0x74, 0xd4, 0x21, 0x84, 0xf3, 0x1c, + 0x21, 0xc3, 0xf1, 0x34, 0x84, 0xf8, 0x9d, 0x02, 0xc3, 0x89, 0x23, 0x3a, 0x5e, 0x8e, 0x7a, 0xec, + 0x30, 0xec, 0xab, 0x73, 0x72, 0xca, 0x84, 0x73, 0x99, 0xe3, 0x9c, 0xc3, 0x59, 0x21, 0xce, 0x96, + 0x7f, 0xbf, 0x10, 0x46, 0xfc, 0xa3, 0x02, 0x19, 0xd1, 0x88, 0x85, 0x93, 0x89, 0x89, 0xd4, 0x36, + 0x08, 0xa9, 0x53, 0xa9, 0x7a, 0x04, 0xf1, 0x01, 0x87, 0xf8, 0x26, 0xbe, 0xd1, 0x39, 0xe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, 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, + 0xdc, 0xd9, 0xab, 0x1b, 0x76, 0xf1, 0xac, 0xfb, 0x57, 0x84, 0x2b, 0xff, 0x05, 0x00, 0x00, 0xff, + 0xff, 0x6c, 0x8c, 0xb1, 0x02, 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 2f4829fb7..7b5d297d7 100644 --- a/x/pubsub/types/tx.pb.go +++ b/x/pubsub/types/tx.pb.go @@ -685,7 +685,7 @@ var fileDescriptor_de188e882df4c8a7 = []byte{ // 635 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x95, 0xcf, 0x6e, 0xd3, 0x40, 0x10, 0xc6, 0xe3, 0x54, 0xad, 0xd4, 0xa9, 0x20, 0x61, 0xa1, 0x69, 0x70, 0x5a, 0x37, 0xa4, 0x40, - 0xd3, 0x14, 0x6c, 0xb5, 0x08, 0x21, 0x71, 0x2b, 0x02, 0xa9, 0x3d, 0x44, 0x42, 0xe1, 0x82, 0x38, + 0xd3, 0x14, 0x6c, 0xb5, 0x08, 0x09, 0x71, 0x2b, 0x02, 0xa9, 0x3d, 0x44, 0x42, 0xe1, 0x82, 0x38, 0x10, 0xc5, 0xf1, 0x6a, 0xeb, 0x52, 0x7b, 0x5d, 0xaf, 0x1d, 0x35, 0x37, 0xc4, 0x91, 0x03, 0xe2, 0xcc, 0x85, 0x57, 0xe8, 0x63, 0x70, 0xec, 0x91, 0x23, 0x4a, 0x84, 0xfa, 0x1a, 0x55, 0xec, 0x4d, 0x6c, 0xc7, 0x7f, 0xe2, 0x9b, 0x3d, 0x3b, 0xbb, 0xdf, 0x6f, 0xbe, 0x99, 0xb5, 0x01, 0x59, 0xae, @@ -722,7 +722,7 @@ var fileDescriptor_de188e882df4c8a7 = []byte{ 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, + 0x00, 0xff, 0xff, 0x88, 0xd7, 0xbc, 0x62, 0x55, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used.