diff --git a/.gitignore b/.gitignore index 6704566..f5696df 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,7 @@ dist # TernJS port file .tern-port + +mnemonic.txt +pool.json +pool1.json \ No newline at end of file diff --git a/app/app.go b/app/app.go index 5b7221f..07d9d04 100644 --- a/app/app.go +++ b/app/app.go @@ -110,6 +110,10 @@ import ( stimuluskeeper "github.com/cosmic-horizon/qwoyn/x/stimulus/keeper" stimulustypes "github.com/cosmic-horizon/qwoyn/x/stimulus/types" + aquifer "github.com/cosmic-horizon/qwoyn/x/aquifer" + aquiferkeeper "github.com/cosmic-horizon/qwoyn/x/aquifer/keeper" + aquifertypes "github.com/cosmic-horizon/qwoyn/x/aquifer/types" + "github.com/cosmic-horizon/qwoyn/x/game" gamekeeper "github.com/cosmic-horizon/qwoyn/x/game/keeper" gametypes "github.com/cosmic-horizon/qwoyn/x/game/types" @@ -205,6 +209,7 @@ var ( vesting.AppModuleBasic{}, wasm.AppModuleBasic{}, stimulus.AppModuleBasic{}, + aquifer.AppModuleBasic{}, game.AppModuleBasic{}, ica.AppModuleBasic{}, intertx.AppModule{}, @@ -223,6 +228,7 @@ var ( wasm.ModuleName: {authtypes.Burner}, gametypes.ModuleName: {authtypes.Minter, authtypes.Burner}, stimulustypes.OutpostFundingPoolName: nil, + aquifertypes.ModuleName: nil, } ) @@ -283,11 +289,13 @@ type App struct { ScopedTransferKeeper capabilitykeeper.ScopedKeeper ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper ScopedInterTxKeeper capabilitykeeper.ScopedKeeper + ScopedAquiferKeeper capabilitykeeper.ScopedKeeper WasmKeeper wasm.Keeper scopedWasmKeeper capabilitykeeper.ScopedKeeper StimulusKeeper stimuluskeeper.Keeper + AquiferKeeper aquiferkeeper.Keeper GameKeeper gamekeeper.Keeper // mm is the module manager @@ -329,6 +337,7 @@ func New( icahosttypes.StoreKey, wasm.StoreKey, stimulustypes.StoreKey, + aquifertypes.StoreKey, gametypes.StoreKey, ) tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) @@ -360,6 +369,7 @@ func New( app.ScopedICAControllerKeeper = app.CapabilityKeeper.ScopeToModule(icacontrollertypes.SubModuleName) app.ScopedInterTxKeeper = app.CapabilityKeeper.ScopeToModule(intertxtypes.ModuleName) app.scopedWasmKeeper = app.CapabilityKeeper.ScopeToModule(wasm.ModuleName) + app.ScopedAquiferKeeper = app.CapabilityKeeper.ScopeToModule(aquifertypes.ModuleName) // add keepers app.AccountKeeper = authkeeper.NewAccountKeeper( @@ -451,7 +461,19 @@ func New( interTxModule := intertx.NewAppModule(appCodec, app.InterTxKeeper) interTxIBCModule := intertx.NewIBCModule(app.InterTxKeeper) - icaControllerIBCModule := icacontroller.NewIBCModule(app.ICAControllerKeeper, interTxIBCModule) + app.AquiferKeeper = *aquiferkeeper.NewKeeper( + appCodec, + keys[aquifertypes.StoreKey], + app.GetSubspace(aquifertypes.ModuleName), + app.AccountKeeper, + app.BankKeeper, + app.GameKeeper, + app.ICAControllerKeeper, + app.TransferKeeper, + app.ScopedAquiferKeeper, + ) + aquiferModule := aquifer.NewAppModule(appCodec, app.AquiferKeeper, app.AccountKeeper, app.BankKeeper) + aquiferIBCModule := aquifer.NewIBCModule(app.AquiferKeeper) icaModule := ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper) icaHostIBCModule := icahost.NewIBCModule(app.ICAHostKeeper) @@ -499,9 +521,13 @@ func New( if len(enabledProposals) != 0 { govRouter.AddRoute(wasm.RouterKey, wasm.NewWasmProposalHandler(app.WasmKeeper, enabledProposals)) } + + icaControllerIBCModule := icacontroller.NewIBCModule(app.ICAControllerKeeper, aquiferIBCModule) + // Create static IBC router, add transfer route, then set and seal it ibcRouter := porttypes.NewRouter() - ibcRouter.AddRoute(intertxtypes.ModuleName, icaControllerIBCModule) + ibcRouter.AddRoute(aquifertypes.ModuleName, icaControllerIBCModule) + ibcRouter.AddRoute(intertxtypes.ModuleName, interTxIBCModule) ibcRouter.AddRoute(icacontrollertypes.SubModuleName, icaControllerIBCModule) ibcRouter.AddRoute(icahosttypes.SubModuleName, icaHostIBCModule) ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferIBCModule) @@ -527,13 +553,13 @@ func New( app.StimulusKeeper = *stimuluskeeper.NewKeeper( appCodec, keys[stimulustypes.StoreKey], - keys[stimulustypes.MemStoreKey], app.GetSubspace(stimulustypes.ModuleName), app.AccountKeeper, app.BankKeeper, app.GameKeeper, app.MintKeeper, ) + /**** Module Options ****/ // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment @@ -569,6 +595,7 @@ func New( interTxModule, wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), stimulus.NewAppModule(appCodec, app.StimulusKeeper, app.AccountKeeper, app.BankKeeper), + aquiferModule, game.NewAppModule(appCodec, app.GameKeeper, app.AccountKeeper, app.BankKeeper), ) @@ -590,6 +617,7 @@ func New( authz.ModuleName, wasm.ModuleName, stimulustypes.ModuleName, + aquifertypes.ModuleName, gametypes.ModuleName, intertxtypes.ModuleName, ) @@ -606,6 +634,7 @@ func New( authz.ModuleName, wasm.ModuleName, stimulustypes.ModuleName, + aquifertypes.ModuleName, gametypes.ModuleName, intertxtypes.ModuleName, ) @@ -637,6 +666,7 @@ func New( authz.ModuleName, wasm.ModuleName, stimulustypes.ModuleName, + aquifertypes.ModuleName, gametypes.ModuleName, intertxtypes.ModuleName, ) @@ -663,6 +693,7 @@ func New( transferModule, wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), stimulus.NewAppModule(appCodec, app.StimulusKeeper, app.AccountKeeper, app.BankKeeper), + aquiferModule, game.NewAppModule(appCodec, app.GameKeeper, app.AccountKeeper, app.BankKeeper), ) app.sm.RegisterStoreDecoders() @@ -751,6 +782,9 @@ func (app *App) LoadHeight(height int64) error { func (app *App) ModuleAccountAddrs() map[string]bool { modAccAddrs := make(map[string]bool) for acc := range maccPerms { + if acc == aquifertypes.ModuleName { + continue + } modAccAddrs[authtypes.NewModuleAddress(acc).String()] = true } @@ -875,6 +909,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(ibchost.ModuleName) paramsKeeper.Subspace(icahosttypes.SubModuleName) paramsKeeper.Subspace(stimulustypes.ModuleName) + paramsKeeper.Subspace(aquifertypes.ModuleName) paramsKeeper.Subspace(gametypes.ModuleName) paramsKeeper.Subspace(wasm.ModuleName) diff --git a/go.mod b/go.mod index cbf8547..10b5966 100644 --- a/go.mod +++ b/go.mod @@ -6,11 +6,13 @@ require ( github.com/99designs/keyring v1.1.6 // indirect github.com/CosmWasm/wasmd v0.28.0 github.com/CosmWasm/wasmvm v1.0.0 // indirect - github.com/cosmos/cosmos-sdk v0.45.9 - github.com/cosmos/ibc-go/v3 v3.0.0 + github.com/confio/ics23/go v0.7.0 // indirect + github.com/cosmos/cosmos-sdk v0.45.10 + github.com/cosmos/ibc-go/v3 v3.4.0 github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac // indirect github.com/gogo/protobuf v1.3.3 github.com/golang/protobuf v1.5.2 + github.com/golangci/golangci-lint v1.48.0 // indirect github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect @@ -19,13 +21,14 @@ require ( github.com/regen-network/cosmos-proto v0.3.1 // indirect github.com/spf13/cast v1.5.0 github.com/spf13/cobra v1.5.0 - github.com/spf13/viper v1.12.0 // indirect + github.com/spf13/pflag v1.0.5 + github.com/spf13/viper v1.13.0 github.com/stretchr/testify v1.8.0 - github.com/tendermint/tendermint v0.34.21 + github.com/tendermint/tendermint v0.34.22 github.com/tendermint/tm-db v0.6.7 google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b - google.golang.org/grpc v1.48.0 - google.golang.org/protobuf v1.28.0 + google.golang.org/grpc v1.50.0 + google.golang.org/protobuf v1.28.1 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index e206d72..43f65a4 100644 --- a/go.sum +++ b/go.sum @@ -54,6 +54,7 @@ cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLq cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/firestore v1.6.0/go.mod h1:afJwI0vaXwAG54kI7A//lP/lSPDkQORQuMkv56TxEPU= cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= @@ -77,16 +78,20 @@ contrib.go.opencensus.io/resource v0.1.1/go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcig dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-beta.2 h1:/BZRNzm8N4K4eWfK28dL4yescorxtO7YG1yun8fy+pI= filippo.io/edwards25519 v1.0.0-beta.2/go.mod h1:X+pm78QAUPtFLi1z9PYIlS/bdDnvbCOGKtZ+ACWEf7o= +gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= git.apache.org/thrift.git v0.12.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8/go.mod h1:CzsSbkDixRphAF5hS6wbMKq0eI6ccJRb7/A0M6JBnwg= github.com/AkihiroSuda/containerd-fuse-overlayfs v1.0.0/go.mod h1:0mMDvQFeLbbn1Wy8P2j3hwFhqBq+FKn8OZPno8WLmp8= +github.com/Antonboom/errname v0.1.5/go.mod h1:DugbBstvPFQbv/5uLcRRzfrNqKE9tVdVCqWCLp6Cifo= github.com/Antonboom/errname v0.1.6/go.mod h1:7lz79JAnuoMNDAWE9MeeIr1/c/VpSUWatBv2FH9NYpI= github.com/Antonboom/errname v0.1.7/go.mod h1:g0ONh16msHIPgJSGsecu1G/dcF2hlYR/0SddnIAGavU= +github.com/Antonboom/nilnil v0.1.0/go.mod h1:PhHLvRPSghY5Y7mX4TW+BHZQYo1A8flE5H20D3IPZBo= github.com/Antonboom/nilnil v0.1.1/go.mod h1:L1jBqoWM7AOeTD+tSquifKSesRHs4ZdaxvZR+xdJEaI= github.com/Azure/azure-amqp-common-go/v2 v2.1.0/go.mod h1:R8rea+gJRuJR6QxTir/XuEd+YuKoUiazDC/N96FiDEU= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= @@ -208,6 +213,7 @@ github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwT github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg= github.com/Microsoft/hcsshim v0.9.2/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= github.com/Microsoft/hcsshim v0.9.3/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= +github.com/Microsoft/hcsshim v0.9.4/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= github.com/Microsoft/hcsshim/test v0.0.0-20200826032352-301c83a30e7c/go.mod h1:30A5igQ91GEmhYJF8TaRP79pMBOYynRsyOByfVV0dU4= github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= @@ -227,6 +233,7 @@ github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:H github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= @@ -241,7 +248,10 @@ github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= +github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= +github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= github.com/alecthomas/kingpin v2.2.6+incompatible/go.mod h1:59OFYbFVLKQKq+mqrL6Rw5bR0c3ACQaawgXx0QYndlE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -274,11 +284,15 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo= github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= +github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/ashanbrown/forbidigo v1.2.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= github.com/ashanbrown/forbidigo v1.3.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= +github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= @@ -321,6 +335,7 @@ github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb/go.mod h1:PkYb9DJNAw github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blizzy78/varnamelen v0.3.0/go.mod h1:hbwRdBvoBqxk34XyQ6HA0UH3G0/1TKuv5AC4eaBT0Ec= github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bombsimon/wsl/v2 v2.0.0/go.mod h1:mf25kr/SqFEPhhcxW1+7pxzGlW+hIl/hYTKY95VwV8U= @@ -328,7 +343,10 @@ github.com/bombsimon/wsl/v2 v2.2.0/go.mod h1:Azh8c3XGEJl9LyX0/sFC+CKMc7Ssgua0g+6 github.com/bombsimon/wsl/v3 v3.0.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/bombsimon/wsl/v3 v3.1.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= +github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= +github.com/breml/bidichk v0.1.1/go.mod h1:zbfeitpevDUGI7V91Uzzuwrn4Vls8MoBMrwtt78jmso= github.com/breml/bidichk v0.2.3/go.mod h1:8u2C6DnAy0g2cEq+k/A2+tr9O1s+vHGxWn0LTc70T2A= github.com/breml/errchkjson v0.3.0/go.mod h1:9Cogkyv9gcT8HREpzi3TiqBxCqDzo8awa92zSDFcofU= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= @@ -358,7 +376,9 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bufbuild/buf v1.4.0/go.mod h1:mwHG7klTHnX+rM/ym8LXGl7vYpVmnwT96xWoRB4H5QI= github.com/bufbuild/buf v1.7.0/go.mod h1:Go40fMAF46PnPLC7jJgTQhAI95pmC0+VtxFKVC0qLq0= +github.com/bufbuild/buf v1.8.0/go.mod h1:tBzKkd1fzCcBV6KKSO7zo3rlhk3o1YQ0F2tQKSC2aNU= github.com/bufbuild/connect-go v0.2.0/go.mod h1:4efZ2eXFENwd4p7tuLaL9m0qtTsCOzuBvrohvRGevDM= +github.com/bufbuild/connect-go v0.4.0/go.mod h1:ZEtBnQ7J/m7bvWOW+H8T/+hKQCzPVfhhhICuvtcnjlI= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= @@ -387,7 +407,9 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charithe/durationcheck v0.0.9/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= +github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af/go.mod h1:Qjyv4H3//PWVzTeCezG2b9IRn6myJxJSr4TD/xo6ojU= github.com/chavacava/garif v0.0.0-20220316182200-5cad0b5181d4/go.mod h1:W8EnPSQ8Nv4fUjc/v1/8tHFqhuOJXnRub0dTfuAQktU= +github.com/chavacava/garif v0.0.0-20220630083739-93517212f375/go.mod h1:4m1Rv7xfuwWPNKXlThldNuJvutYM6J95wNuuVmn55To= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= @@ -465,6 +487,7 @@ github.com/containerd/containerd v1.5.8/go.mod h1:YdFSv5bTFLpG2HIYmfqDpSYYTDX+mc github.com/containerd/containerd v1.6.1/go.mod h1:1nJz5xCZPusx6jJU8Frfct988y0NpumIq9ODB0kLtoE= github.com/containerd/containerd v1.6.3-0.20220401172941-5ff8fce1fcc6/go.mod h1:WSt2SnDLAGWlu+Vl+EWay37seZLKqgRt6XLjIMy8SYM= github.com/containerd/containerd v1.6.6/go.mod h1:ZoP1geJldzCVY3Tonoz7b1IXk8rIX0Nltt5QE4OMNk0= +github.com/containerd/containerd v1.6.8/go.mod h1:By6p5KqPK0/7/CgO/A6t/Gz+CUYUu2zf1hUaaymVXB0= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= @@ -569,6 +592,8 @@ github.com/cosmos/cosmos-sdk v0.45.6 h1:bnYLOcDp0cKWMLeUTTJIttq6xxRep52ulPxXC3BC github.com/cosmos/cosmos-sdk v0.45.6/go.mod h1:bPeeVMEtVvH3y3xAGHVbK+/CZlpaazzh77hG8ZrcJpI= github.com/cosmos/cosmos-sdk v0.45.9 h1:Z4s1EZL/mfM8uSSZr8WmyEbWp4hqbWVI5sAIFR432KY= github.com/cosmos/cosmos-sdk v0.45.9/go.mod h1:Z5M4TX7PsHNHlF/1XanI2DIpORQ+Q/st7oaeufEjnvU= +github.com/cosmos/cosmos-sdk v0.45.10 h1:YRf1N6C7OFCc8FJ5wuhcnDDySJNDn5DxSscVgbeXgz4= +github.com/cosmos/cosmos-sdk v0.45.10/go.mod h1:CbfWNs4PuxxsvRD/snQuSBDwIhtsD7rIDTVQyYMKTa0= github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 h1:iKclrn3YEOwk4jQHT2ulgzuXyxmzmPczUalMwW4XH9k= github.com/cosmos/cosmos-sdk/ics23/go v0.8.0/go.mod h1:2a4dBq88TUoqoWAU5eu0lGvpFP3wWDPgdHPargtyw30= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= @@ -582,6 +607,8 @@ github.com/cosmos/iavl v0.19.3 h1:cESO0OwTTxQm5rmyESKW+zESheDUYI7CcZDWWDwnuxg= github.com/cosmos/iavl v0.19.3/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= github.com/cosmos/ibc-go/v3 v3.0.0 h1:XUNplHVS51Q2gMnTFsFsH9QJ7flsovMamnltKbEgPQ4= github.com/cosmos/ibc-go/v3 v3.0.0/go.mod h1:Mb+1NXiPOLd+CPFlOC6BKeAUaxXlhuWenMmRiUiSmwY= +github.com/cosmos/ibc-go/v3 v3.4.0 h1:ha3cqEG36pqMWqA1D+kxDWBTZXpeFMd/aZIQF7I0xro= +github.com/cosmos/ibc-go/v3 v3.4.0/go.mod h1:VwB/vWu4ysT5DN2aF78d17LYmx3omSAdq6gpKvM7XRA= github.com/cosmos/interchain-accounts v0.1.0 h1:QmuwNsf1Hxl3P5GSGt7Z+JeuHPiZw4Z34R/038P5T6s= github.com/cosmos/interchain-accounts v0.1.0/go.mod h1:Fv6LXDs+0ng4mIDVWwEJMXbAIMxY4kiq+A7Bw1Fb9AY= github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= @@ -598,12 +625,14 @@ github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cristalhq/acmd v0.7.0/go.mod h1:LG5oa43pE/BbxtfMoImHCQN++0Su7dzipdgBjMCBVDQ= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= +github.com/daixiang0/gci v0.2.9/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= github.com/daixiang0/gci v0.3.3/go.mod h1:1Xr2bxnQbDxCqqulUOv8qpGqkgRw9RSCGGjEC2LjF8o= github.com/daixiang0/gci v0.6.2/go.mod h1:EpVfrztufwVgQRXjnX4zuNinEpLj5OmMjtu/+MB0V0c= github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= @@ -619,6 +648,7 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= +github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= @@ -699,6 +729,7 @@ github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPO github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/esimonov/ifshort v1.0.3/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= @@ -730,6 +761,7 @@ github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIg github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= @@ -749,6 +781,7 @@ github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwV github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= +github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E= github.com/fzipp/gocyclo v0.5.1/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= @@ -766,7 +799,14 @@ github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aev github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-critic/go-critic v0.4.1/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E68facVDK23g= github.com/go-critic/go-critic v0.4.3/go.mod h1:j4O3D4RoIwRqlZw5jJpx0BNfXWWbpcJoKu5cYSe4YmQ= +github.com/go-critic/go-critic v0.6.1/go.mod h1:SdNCfU0yF3UBjtaZGw6586/WocupMOJuiqgom5DsQxM= github.com/go-critic/go-critic v0.6.3/go.mod h1:c6b3ZP1MQ7o6lPR7Rv3lEf7pYQUmAcx8ABHgdZCQt/k= +github.com/go-critic/go-critic v0.6.4/go.mod h1:qL5SOlk7NtY6sJPoVCTKDIgzNOxHkkkOCVDyi9wJe1U= +github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= +github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= +github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= +github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= +github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -781,6 +821,8 @@ github.com/go-kit/log v0.2.0 h1:7i2K3eKTos3Vc0enKCfnVcgHh2olr/MyfboYq7cAcFw= github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= +github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= @@ -797,6 +839,7 @@ github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= @@ -812,6 +855,8 @@ github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dp github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= +github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= @@ -830,9 +875,11 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= +github.com/go-toolsmith/astcopy v1.0.1/go.mod h1:4TcEdbElGc9twQEYpVo/aieIXfHhiuLh4aLAck6dO7Y= github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= github.com/go-toolsmith/astequal v1.0.1/go.mod h1:4oGA3EZXTVItV/ipGiOx7NWkY5veFfcsOJVS2YxltLw= +github.com/go-toolsmith/astequal v1.0.2/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg= github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= @@ -929,6 +976,7 @@ github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d/go.mod h1:ozx7R9S github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= github.com/golangci/golangci-lint v1.23.7/go.mod h1:g/38bxfhp4rI7zeWSxcdIeHTQGS58TCak8FYcyCmavQ= github.com/golangci/golangci-lint v1.27.0/go.mod h1:+eZALfxIuthdrHPtfM7w/R3POJLjHDfJJw8XZl9xOng= +github.com/golangci/golangci-lint v1.43.0/go.mod h1:VIFlUqidx5ggxDfQagdvd9E67UjMXtTHBkBQ7sHoC5Q= github.com/golangci/golangci-lint v1.46.2/go.mod h1:3DkdHnxn9eoTTrpT2gB0TEv8KSziuoqe9FitgQLHvAY= github.com/golangci/golangci-lint v1.48.0/go.mod h1:5N+oxduCho+7yuccW69upg/O7cxjfR/d+IQeiNxGmKM= github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= @@ -1034,11 +1082,13 @@ github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2c github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gookit/color v1.2.4/go.mod h1:AhIE+pS6D4Ql0SQWbBeXPHw7gY0/sjHoA4s/n1KB7xg= +github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ= github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= github.com/gookit/color v1.5.1/go.mod h1:wZFzea4X8qN6vHOSP2apMb4/+w/orMznEzYsIHPaqKM= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= +github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254/go.mod h1:M9mZEtGIsR1oDaZagNPNG9iq9n2HrhZ17dsXk73V3Lw= github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/goreleaser/goreleaser v0.136.0/go.mod h1:wiKrPUeSNh6Wu8nUHxZydSOVQ/OZvOaO7DTtFqie904= github.com/goreleaser/nfpm v1.2.1/go.mod h1:TtWrABZozuLOttX2uDlYyECfQX7x5XYkVxhjYcR6G9w= @@ -1068,6 +1118,7 @@ github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/o github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= +github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= @@ -1191,9 +1242,12 @@ github.com/improbable-eng/grpc-web v0.14.1 h1:NrN4PY71A6tAz2sKDvC5JCauENWp0ykG8O github.com/improbable-eng/grpc-web v0.14.1/go.mod h1:zEjGHa8DAlkoOXmswrNvhUGEYQA9UI7DhrGeHR1DMGU= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/informalsystems/tm-load-test v1.0.0/go.mod h1:WVaSKaQdfZK3v0C74EMzn7//+3aeCZF8wkIKBz2/M74= github.com/intel/goresctrl v0.2.0/go.mod h1:+CZdzouYFn5EsxgqAQTEzMfwKwuc0fVdMrT9FCCAVRQ= github.com/ishidawataru/sctp v0.0.0-20191218070446-00ab2ac2db07/go.mod h1:co9pwDoBCm1kGxawmb4sPq0cSIOOWNPT4KnHotMP1Zg= github.com/ishidawataru/sctp v0.0.0-20210226210310-f2269e66cdee/go.mod h1:co9pwDoBCm1kGxawmb4sPq0cSIOOWNPT4KnHotMP1Zg= @@ -1212,6 +1266,7 @@ github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSl github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= github.com/jhump/protocompile v0.0.0-20220216033700-d705409f108f/go.mod h1:qr2b5kx4HbFS7/g4uYO5qv9ei8303JMsC7ESbYiqr2Q= +github.com/jhump/protocompile v0.0.0-20220812162104-d108583e055d/go.mod h1:qr2b5kx4HbFS7/g4uYO5qv9ei8303JMsC7ESbYiqr2Q= github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= github.com/jhump/protoreflect v1.9.0 h1:npqHz788dryJiR/l6K/RUQAyh2SwV91+d1dnh4RjO9w= github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= @@ -1259,7 +1314,9 @@ github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSg github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/julz/importas v0.0.0-20210419104244-841f0c0fe66d/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= +github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= @@ -1300,6 +1357,7 @@ github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kulti/thelper v0.4.0/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= github.com/kulti/thelper v0.6.2/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= github.com/kunwardeep/paralleltest v1.0.3/go.mod h1:vLydzomDFpk7yu5UX02RmP0H8QfRPOV/oFhWN85Mjb4= @@ -1307,7 +1365,9 @@ github.com/kunwardeep/paralleltest v1.0.6/go.mod h1:Y0Y0XISdZM5IKm3TREQMZ6iteqn1 github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= +github.com/ldez/gomoddirectives v0.2.2/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= +github.com/ldez/tagliatelle v0.2.0/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= github.com/ldez/tagliatelle v0.3.1/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= @@ -1320,6 +1380,7 @@ github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk= github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= @@ -1360,8 +1421,11 @@ github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= @@ -1375,6 +1439,8 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -1394,7 +1460,9 @@ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182aff github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= +github.com/mgechev/revive v1.1.2/go.mod h1:bnXsMr+ZTH09V5rssEI+jHAZ4z+ZdyhgO/zsy3EhK+0= github.com/mgechev/revive v1.2.1/go.mod h1:+Ro3wqY4vakcYNtkBWdZC7dBg1xSB6sp054wWwmeFm0= +github.com/mgechev/revive v1.2.3/go.mod h1:iAWlQishqCuj4yhV24FTnKSXGpbAA+0SckXB8GQMX/Q= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= @@ -1406,6 +1474,8 @@ github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WT github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= +github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -1457,6 +1527,7 @@ github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2/go.mod h1:TjQg8pa4iejrUr github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1510,10 +1581,12 @@ github.com/neilotoole/errgroup v0.1.5/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C github.com/networkplumbing/go-nft v0.2.0/go.mod h1:HnnM+tYvlGAsMU7yoYwXEVLLiDW9gdMmb5HoGcwpuQs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nishanths/exhaustive v0.2.3/go.mod h1:bhIX678Nx8inLM9PbpvK1yv6oGtoP8BfaIeMzgBNKvc= github.com/nishanths/exhaustive v0.7.11/go.mod h1:gX+MP7DWMKJmNa1HfMozK+u04hQd3na9i0hyqf3/dOI= github.com/nishanths/exhaustive v0.8.1/go.mod h1:qj+zJJUgJ76tR92+25+03oYUhzF4R7/2Wk7fGTfCHmg= github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= +github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE= github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= @@ -1559,10 +1632,12 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= +github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -1648,6 +1723,8 @@ github.com/pelletier/go-toml/v2 v2.0.0/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZO github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.0.2 h1:+jQXlF3scKIcSEKkdHzXhCTDLPFi5r1wnK6yPS+49Gw= github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI= +github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= +github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= @@ -1656,6 +1733,9 @@ github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= +github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= +github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= +github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= @@ -1674,7 +1754,9 @@ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qR github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/polyfloyd/go-errorlint v0.0.0-20210722154253-910bb7978349/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw= github.com/polyfloyd/go-errorlint v1.0.0/go.mod h1:KZy4xxPJyy88/gldCe5OdW6OQRtNO3EZE7hXzmnebgA= +github.com/polyfloyd/go-errorlint v1.0.2/go.mod h1:APVvOesVSAnne5SClsPxPdfvZTVDojXh1/G3qb5wjGI= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= @@ -1746,12 +1828,16 @@ github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3 github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= github.com/quasilyte/go-ruleguard v0.1.2-0.20200318202121-b00d7a75d3d8/go.mod h1:CGFX09Ci3pq9QZdj86B+VGIdNj4VyCo2iPOGS9esB/k= github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= +github.com/quasilyte/go-ruleguard v0.3.13/go.mod h1:Ul8wwdqR6kBVOCt2dipDBkE+T6vAV/iixkrKuRTN1oQ= github.com/quasilyte/go-ruleguard v0.3.16-0.20220213074421-6aa060fab41a/go.mod h1:VMX+OnnSw4LicdiEGtRSD/1X8kW7GuEscjYNr4cOIT4= +github.com/quasilyte/go-ruleguard v0.3.17/go.mod h1:sST5PvaR7yb/Az5ksX8oc88usJ4EGjmJv7cK7y3jyig= github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.10/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/go-ruleguard/dsl v0.3.16/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/go-ruleguard/dsl v0.3.19/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/go-ruleguard/dsl v0.3.21/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20210428214800-545e0d2e0bf7/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5/go.mod h1:wSEyW6O61xRV6zb6My3HxrQ5/8ke7NE2OayqCHa3xRM= github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= @@ -1761,6 +1847,8 @@ github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Ung github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/cosmos-proto v0.3.1 h1:rV7iM4SSFAagvy8RiyhiACbWEGotmqzywPxOvwMdxcg= github.com/regen-network/cosmos-proto v0.3.1/go.mod h1:jO0sVX6a1B36nmE8C9xBFXpNwWejXC7QqCOnH3O0+YM= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= @@ -1776,6 +1864,7 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= @@ -1793,6 +1882,8 @@ github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvf github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= +github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/ryancurrah/gomodguard v1.0.4/go.mod h1:9T/Cfuxs5StfsocWr4WzDL36HqnX0fVb9d5fSEaLhoE= github.com/ryancurrah/gomodguard v1.1.0/go.mod h1:4O8tr7hBODaGE6VIhfJDHcwzh5GUccKSJBU0UMXJFVM= github.com/ryancurrah/gomodguard v1.2.3/go.mod h1:rYbA/4Tg5c54mV1sv4sQTP5WOPBcoLtnBZ7/TEhXAbg= @@ -1801,6 +1892,7 @@ github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0K github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= +github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE= github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= github.com/sagikazarmark/crypt v0.5.0/go.mod h1:l+nzl7KWh51rpzp2h7t4MZWyiEWdhNpOAnclKvg+mdA= @@ -1809,6 +1901,8 @@ github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0 github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= +github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= +github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sashamelentyev/usestdlibvars v1.8.0/go.mod h1:BFt7b5mSVHaaa26ZupiNRV2ODViQBxZZVhtAxAJRrjs= github.com/sassoftware/go-rpmutils v0.0.0-20190420191620-a8f1baeba37b/go.mod h1:am+Fp8Bt506lA3Rk3QCmSqmYmLMnPDhdDUcosQCAx+I= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= @@ -1821,8 +1915,10 @@ github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod github.com/securego/gosec v0.0.0-20200103095621-79fbf3af8d83/go.mod h1:vvbZ2Ae7AzSq3/kywjUDxSNq2SJ27RxCz2un0H3ePqE= github.com/securego/gosec v0.0.0-20200401082031-e946c8c39989/go.mod h1:i9l/TNj+yDFh9SZXUTvspXTjbFXgZGP/UvhU1S65A4A= github.com/securego/gosec/v2 v2.3.0/go.mod h1:UzeVyUXbxukhLeHKV3VVqo7HdoQR9MrRfFmZYotn8ME= +github.com/securego/gosec/v2 v2.9.1/go.mod h1:oDcDLcatOJxkCGaCaq8lua1jTnYf6Sou4wdiJ1n4iHc= github.com/securego/gosec/v2 v2.11.0/go.mod h1:SX8bptShuG8reGC0XS09+a4H2BoWSJi+fscA+Pulbpo= github.com/securego/gosec/v2 v2.12.0/go.mod h1:iTpT+eKTw59bSgklBHlSnH5O2tNygHMDxfvMubA4i7I= +github.com/securego/gosec/v2 v2.13.1/go.mod h1:EO1sImBMBWFjOTFzMWfTRrZW6M15gm60ljzrmy/wtHo= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= @@ -1830,6 +1926,7 @@ github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002/go.mod h1:/yeG0My github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/gopsutil/v3 v3.21.10/go.mod h1:t75NhzCZ/dYyPQjyQmrAYP6c8+LCdFANeBMdLPCNnew= github.com/shirou/gopsutil/v3 v3.22.4/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM= github.com/shirou/gopsutil/v3 v3.22.6/go.mod h1:EdIubSnZhbAvBS1yJ7Xi+AShB/hxwLHOMz4MCYz7yMs= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= @@ -1848,6 +1945,7 @@ github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= github.com/sivchari/nosnakecase v1.7.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= +github.com/sivchari/tenv v1.4.7/go.mod h1:5nF+bITvkebQVanjU6IuMbvIot/7ReNsUV7I5NbprB0= github.com/sivchari/tenv v1.5.0/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/sivchari/tenv v1.7.0/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -1906,12 +2004,15 @@ github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfD github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= +github.com/spf13/viper v1.9.0/go.mod h1:+i6ajR7OX2XaiBkrcZJFK21htRk7eDeLg7+O6bhUPP4= github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= +github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= @@ -1951,7 +2052,10 @@ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69 github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= github.com/subosito/gotenv v1.4.0 h1:yAzM1+SmVcz5R4tXGsNMu1jUl2aOJXoiWUCEwwnGrvs= github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= +github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= +github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/sylvia7788/contextcheck v1.0.4/go.mod h1:vuPKJMQ7MQ91ZTqfdyreNKwZjyUg6KO+IebVyQDedZQ= +github.com/sylvia7788/contextcheck v1.0.6/go.mod h1:9XDxwvxyuKD+8N+a7Gs7bfWLityh5t70g/GjdEt2N2M= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -1975,6 +2079,8 @@ github.com/tendermint/tendermint v0.34.19/go.mod h1:R5+wgIwSxMdKQcmOaeudL0Cjkr3H github.com/tendermint/tendermint v0.34.20/go.mod h1:KtOwCLYJcsS1ymtAfnjjAtXfXClbqcqjdqzFt2Em1Ac= github.com/tendermint/tendermint v0.34.21 h1:UiGGnBFHVrZhoQVQ7EfwSOLuCtarqCSsRf8VrklqB7s= github.com/tendermint/tendermint v0.34.21/go.mod h1:XDvfg6U7grcFTDx7VkzxnhazQ/bspGJAn4DZ6DcLLjQ= +github.com/tendermint/tendermint v0.34.22 h1:XMhtC8s8QqJO4l/dn+TkQvevTRSow3Vixjclr41o+2Q= +github.com/tendermint/tendermint v0.34.22/go.mod h1:YpP5vBEAKUT4g6oyfjKgFeZmdB/GjkJAxfF+cgmJg6Y= github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= github.com/tendermint/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8= @@ -1996,17 +2102,21 @@ github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLD github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0= github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= +github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= +github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tomarrell/wrapcheck/v2 v2.4.0/go.mod h1:68bQ/eJg55BROaRTbMjC7vuhL2OgfoG8bLp9ZyoBfyY= github.com/tomarrell/wrapcheck/v2 v2.6.1/go.mod h1:Eo+Opt6pyMW1b6cNllOcDSSoHO0aTJ+iF6BfCUbHltA= github.com/tomarrell/wrapcheck/v2 v2.6.2/go.mod h1:ao7l5p0aOlUNJKI0qVwB4Yjlqutd0IvAB9Rdwyilxvg= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= github.com/tommy-muehle/go-mnd v1.1.1/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= +github.com/tommy-muehle/go-mnd/v2 v2.4.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/tommy-muehle/go-mnd/v2 v2.5.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/tonistiigi/fsutil v0.0.0-20201103201449-0834f99b7b85/go.mod h1:a7cilN64dG941IOXfhJhlH0qB92hxJ9A1ewrdUmJ6xo= github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274/go.mod h1:oPAfvw32vlUJSjyDcQ3Bu0nb2ON2B+G0dtVN/SZNJiA= @@ -2079,6 +2189,7 @@ github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1z github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= +github.com/yeya24/promlinter v0.1.0/go.mod h1:rs5vtZzeBHqqMwXqFScncpCF6u06lezhZepno9AB1Oc= github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= @@ -2145,6 +2256,7 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.2 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0/go.mod h1:vEhqr0m4eTc+DWxfsXoXue2GBgV2uUwVznkGIHW/e5w= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.33.0/go.mod h1:y/SlJpJQPd2UzfBCj0E9Flk9FDCtTyqUmaCB41qFrWI= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0/go.mod h1:fk1+icoN47ytLSgkoWHLJrtVTSQ+HgmkNgPTKrk/Nsc= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.29.0/go.mod h1:vHItvsnJtp7ES++nFLLFBzUWny7fJQSvTlxFcqQGUr4= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= @@ -2153,6 +2265,7 @@ go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVj go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= go.opentelemetry.io/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM= +go.opentelemetry.io/otel v1.9.0/go.mod h1:np4EoPGzoPs3O67xUVNoPPcmSvsfOxNlNA4F4AC+0Eo= go.opentelemetry.io/otel/exporters/jaeger v1.4.1/go.mod h1:ZW7vkOu9nC1CxsD8bHNHCia5JUbwP39vxgd1q4Z5rCI= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.3.0/go.mod h1:VpP4/RMn8bv8gNo9uK7/IMY4mtWLELsS+JIP0inH0h4= @@ -2177,6 +2290,7 @@ go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKu go.opentelemetry.io/otel/trace v1.4.0/go.mod h1:uc3eRsqDfWs9R7b92xbQbU42/eTNz4N+gLP8qJCi4aE= go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4= +go.opentelemetry.io/otel/trace v1.9.0/go.mod h1:2737Q0MuG8q1uILYm2YYVkAyLtOofiTNGg6VODnOiPo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.11.0/go.mod h1:QpEjXPrNQzrFDZgoTo49dgHR9RYRSrg3NAKnUGl9YpQ= go.opentelemetry.io/proto/otlp v0.12.0/go.mod h1:TsIjwGWIx5VFYv9KGVlOpxoBl5Dy+63SUguV7GGvlSQ= @@ -2185,6 +2299,7 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= @@ -2201,6 +2316,7 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +go.uber.org/zap v1.22.0/go.mod h1:H4siCOZOrAolnUPJEkfaSjDqyP+BDS0DdDWzwcgt3+U= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= gocloud.dev v0.19.0/go.mod h1:SmKwiR8YwIMMJvQBKLsC3fHNyMwXLw3PMDO+VVteJMI= golang.org/x/build v0.0.0-20190314133821-5284462c4bec/go.mod h1:atTaCNAy0f16Ah5aV1gMSwgiKVHwu/JncqDpuRr7lS4= @@ -2252,6 +2368,8 @@ golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrb golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2261,6 +2379,7 @@ golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxT golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= @@ -2271,10 +2390,21 @@ golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8H golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -2380,6 +2510,7 @@ golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211208012354-db4efeb81f4b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -2395,6 +2526,8 @@ golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220726230323-06994584191e h1:wOQNKh1uuDGRnmgF0jDxh7ctgGy/3P4rYWQRVJD4/Yg= golang.org/x/net v0.0.0-20220726230323-06994584191e/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM= +golang.org/x/net v0.0.0-20220812174116-3211cb980234 h1:RDqmgfe7SvlMWoqC3xwQ2blLO3fcWcxMa3eBLRdRW7E= +golang.org/x/net v0.0.0-20220812174116-3211cb980234/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -2436,6 +2569,7 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2537,6 +2671,7 @@ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210313202042-bd2e13477e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2557,17 +2692,21 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210915083310-ed5796bab164/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211031064116-611d5d643895/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2598,6 +2737,10 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220727055044-e65921a090b8 h1:dyU22nBWzrmTQxtNrr4dzVOvaw35nUYE279vF9UmsI8= golang.org/x/sys v0.0.0-20220727055044-e65921a090b8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220818161305-2296e01440c6 h1:Sx/u41w+OwrInGdEckYmEuU5gHoGSL4QbDz3S9s6j4U= +golang.org/x/sys v0.0.0-20220818161305-2296e01440c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -2665,6 +2808,7 @@ golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -2733,10 +2877,14 @@ golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201118003311-bd56c0adb394/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210104081019-d8d6ddbec6ee/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -2748,6 +2896,7 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.6/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= @@ -2768,9 +2917,13 @@ golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNq gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= +gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= +gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= @@ -2916,6 +3069,7 @@ google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= @@ -2960,6 +3114,8 @@ google.golang.org/protobuf v1.27.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2981,11 +3137,14 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.56.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.63.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI= gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= @@ -3031,6 +3190,8 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +honnef.co/go/tools v0.2.1/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= honnef.co/go/tools v0.3.1/go.mod h1:vlRD9XErLMGT+mDuofSr0mMMquscM/1nQqtRSsh6m70= honnef.co/go/tools v0.3.3/go.mod h1:jzwdWgg7Jdq75wlfblQxO4neNaFFSvgc1tD5Wv8U0Yw= k8s.io/api v0.0.0-20180904230853-4e7be11eab3f/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= @@ -3114,11 +3275,13 @@ modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= +mvdan.cc/gofumpt v0.1.1/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= mvdan.cc/gofumpt v0.3.1/go.mod h1:w3ymliuxvzVx8DAutBnVyDqYb1Niy/yCJt/lk821YCE= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7/go.mod h1:HGC5lll35J70Y5v7vCGb9oLhHoScFwkHDJm/05RdSTc= +mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5/go.mod h1:b8RRCBm0eeiWR8cfN88xeq2G5SG3VKGO+5UPWi5FSOY= mvdan.cc/unparam v0.0.0-20220706161116-678bad134442/go.mod h1:F/Cxw/6mVrNKqrR2YjFf5CaW0Bw4RL8RfbEf4GRggJk= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= diff --git a/hermes/config.toml b/hermes/config.toml new file mode 100644 index 0000000..caecada --- /dev/null +++ b/hermes/config.toml @@ -0,0 +1,132 @@ +# The global section has parameters that apply globally to the relayer operation. +[global] + +# Specify the verbosity for the relayer logging output. Default: 'info' +# Valid options are 'error', 'warn', 'info', 'debug', 'trace'. +log_level = 'trace' + + +# Specify the mode to be used by the relayer. [Required] +[mode] + +# Specify the client mode. +[mode.clients] + +# Whether or not to enable the client workers. [Required] +enabled = true + +# Whether or not to enable periodic refresh of clients. [Default: true] +# Note: Even if this is disabled, clients will be refreshed automatically if +# there is activity on a connection or channel they are involved with. +refresh = true + +# Whether or not to enable misbehaviour detection for clients. [Default: false] +misbehaviour = true + +# Specify the connections mode. +[mode.connections] + +# Whether or not to enable the connection workers for handshake completion. [Required] +enabled = true + +# Specify the channels mode. +[mode.channels] + +# Whether or not to enable the channel workers for handshake completion. [Required] +enabled = true + +# Specify the packets mode. +[mode.packets] + +# Whether or not to enable the packet workers. [Required] +enabled = true + +# Parametrize the periodic packet clearing feature. +# Interval (in number of blocks) at which pending packets +# should be eagerly cleared. A value of '0' will disable +# periodic packet clearing. [Default: 100] +clear_interval = 100 + +# Whether or not to clear packets on start. [Default: false] +clear_on_start = true + +# Toggle the transaction confirmation mechanism. +# The tx confirmation mechanism periodically queries the `/tx_search` RPC +# endpoint to check that previously-submitted transactions +# (to any chain in this config file) have delivered successfully. +# Experimental feature. Affects telemetry if set to false. +# [Default: true] +tx_confirmation = true + +# The REST section defines parameters for Hermes' built-in RESTful API. +# https://hermes.informal.systems/rest.html +[rest] + +# Whether or not to enable the REST service. Default: false +enabled = true + +# Specify the IPv4/6 host over which the built-in HTTP server will serve the RESTful +# API requests. Default: 127.0.0.1 +host = '127.0.0.1' + +# Specify the port over which the built-in HTTP server will serve the restful API +# requests. Default: 3000 +port = 3000 + + +# The telemetry section defines parameters for Hermes' built-in telemetry capabilities. +# https://hermes.informal.systems/telemetry.html +[telemetry] + +# Whether or not to enable the telemetry service. Default: false +enabled = false + +# Specify the IPv4/6 host over which the built-in HTTP server will serve the metrics +# gathered by the telemetry service. Default: 127.0.0.1 +host = '127.0.0.1' + +# Specify the port over which the built-in HTTP server will serve the metrics gathered +# by the telemetry service. Default: 3001 +port = 3001 + +[[chains]] +id = 'osmo-test' +rpc_addr = 'http://127.0.0.1:16657' +grpc_addr = 'http://127.0.0.1:9092' +websocket_addr = 'ws://127.0.0.1:16657/websocket' +rpc_timeout = '10s' +account_prefix = 'osmo' +key_name = 'osmosis' +store_prefix = 'ibc' +default_gas = 100000 +max_gas = 3000000 +gas_price = { price = 0.005, denom = 'stake' } +gas_adjustment = 0.1 +max_msg_num = 30 +max_tx_size = 2097152 +clock_drift = '5s' +max_block_time = '10s' +trusting_period = '13days' +trust_threshold = { numerator = '1', denominator = '3' } +address_type = { derivation = 'cosmos' } + +[[chains]] +id = 'qwoyn-1' +rpc_addr = 'http://127.0.0.1:26657' +grpc_addr = 'http://127.0.0.1:9090' +websocket_addr = 'ws://127.0.0.1:26657/websocket' +rpc_timeout = '10s' +account_prefix = 'qwoyn' +key_name = 'qwoyn' +store_prefix = 'ibc' +default_gas = 100000 +max_gas = 3000000 +gas_price = { price = 0.001, denom = 'stake' } +gas_adjustment = 0.1 +max_msg_num = 30 +max_tx_size = 2097152 +clock_drift = '5s' +max_block_time = '10s' +trusting_period = '13days' +trust_threshold = { numerator = '1', denominator = '3' } +address_type = { derivation = 'cosmos' } \ No newline at end of file diff --git a/osmosis/balancer/balancerPool.pb.go b/osmosis/balancer/balancerPool.pb.go new file mode 100644 index 0000000..d612d6c --- /dev/null +++ b/osmosis/balancer/balancerPool.pb.go @@ -0,0 +1,1515 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: osmosis/gamm/pool-models/balancer/balancerPool.proto + +// this is a legacy package that requires additional migration logic +// in order to use the correct packge. Decision made to use legacy package path +// until clear steps for migration logic and the unknowns for state breaking are +// investigated for changing proto package. + +package balancer + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types1 "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/x/auth/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + _ "github.com/gogo/protobuf/types" + github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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 + +// Parameters for changing the weights in a balancer pool smoothly from +// a start weight and end weight over a period of time. +// Currently, the only smooth change supported is linear changing between +// the two weights, but more types may be added in the future. +// When these parameters are set, the weight w(t) for pool time `t` is the +// following: +// +// t <= start_time: w(t) = initial_pool_weights +// start_time < t <= start_time + duration: +// w(t) = initial_pool_weights + (t - start_time) * +// (target_pool_weights - initial_pool_weights) / (duration) +// t > start_time + duration: w(t) = target_pool_weights +type SmoothWeightChangeParams struct { + // The start time for beginning the weight change. + // If a parameter change / pool instantiation leaves this blank, + // it should be generated by the state_machine as the current time. + StartTime time.Time `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" yaml:"start_time"` + // Duration for the weights to change over + Duration time.Duration `protobuf:"bytes,2,opt,name=duration,proto3,stdduration" json:"duration,omitempty" yaml:"duration"` + // The initial pool weights. These are copied from the pool's settings + // at the time of weight change instantiation. + // The amount PoolAsset.token.amount field is ignored if present, + // future type refactorings should just have a type with the denom & weight + // here. + InitialPoolWeights []PoolAsset `protobuf:"bytes,3,rep,name=initial_pool_weights,json=initialPoolWeights,proto3" json:"initial_pool_weights" yaml:"initial_pool_weights"` + // The target pool weights. The pool weights will change linearly with respect + // to time between start_time, and start_time + duration. The amount + // PoolAsset.token.amount field is ignored if present, future type + // refactorings should just have a type with the denom & weight here. + TargetPoolWeights []PoolAsset `protobuf:"bytes,4,rep,name=target_pool_weights,json=targetPoolWeights,proto3" json:"target_pool_weights" yaml:"target_pool_weights"` +} + +func (m *SmoothWeightChangeParams) Reset() { *m = SmoothWeightChangeParams{} } +func (m *SmoothWeightChangeParams) String() string { return proto.CompactTextString(m) } +func (*SmoothWeightChangeParams) ProtoMessage() {} +func (*SmoothWeightChangeParams) Descriptor() ([]byte, []int) { + return fileDescriptor_7e991f749f68c2a4, []int{0} +} +func (m *SmoothWeightChangeParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SmoothWeightChangeParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SmoothWeightChangeParams.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 *SmoothWeightChangeParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_SmoothWeightChangeParams.Merge(m, src) +} +func (m *SmoothWeightChangeParams) XXX_Size() int { + return m.Size() +} +func (m *SmoothWeightChangeParams) XXX_DiscardUnknown() { + xxx_messageInfo_SmoothWeightChangeParams.DiscardUnknown(m) +} + +var xxx_messageInfo_SmoothWeightChangeParams proto.InternalMessageInfo + +func (m *SmoothWeightChangeParams) GetStartTime() time.Time { + if m != nil { + return m.StartTime + } + return time.Time{} +} + +func (m *SmoothWeightChangeParams) GetDuration() time.Duration { + if m != nil { + return m.Duration + } + return 0 +} + +func (m *SmoothWeightChangeParams) GetInitialPoolWeights() []PoolAsset { + if m != nil { + return m.InitialPoolWeights + } + return nil +} + +func (m *SmoothWeightChangeParams) GetTargetPoolWeights() []PoolAsset { + if m != nil { + return m.TargetPoolWeights + } + return nil +} + +// PoolParams defined the parameters that will be managed by the pool +// governance in the future. This params are not managed by the chain +// governance. Instead they will be managed by the token holders of the pool. +// The pool's token holders are specified in future_pool_governor. +type PoolParams struct { + SwapFee github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=swap_fee,json=swapFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"swap_fee" yaml:"swap_fee"` + ExitFee github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=exit_fee,json=exitFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"exit_fee" yaml:"exit_fee"` + SmoothWeightChangeParams *SmoothWeightChangeParams `protobuf:"bytes,3,opt,name=smooth_weight_change_params,json=smoothWeightChangeParams,proto3" json:"smooth_weight_change_params,omitempty" yaml:"smooth_weight_change_params"` +} + +func (m *PoolParams) Reset() { *m = PoolParams{} } +func (m *PoolParams) String() string { return proto.CompactTextString(m) } +func (*PoolParams) ProtoMessage() {} +func (*PoolParams) Descriptor() ([]byte, []int) { + return fileDescriptor_7e991f749f68c2a4, []int{1} +} +func (m *PoolParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PoolParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PoolParams.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 *PoolParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_PoolParams.Merge(m, src) +} +func (m *PoolParams) XXX_Size() int { + return m.Size() +} +func (m *PoolParams) XXX_DiscardUnknown() { + xxx_messageInfo_PoolParams.DiscardUnknown(m) +} + +var xxx_messageInfo_PoolParams proto.InternalMessageInfo + +func (m *PoolParams) GetSmoothWeightChangeParams() *SmoothWeightChangeParams { + if m != nil { + return m.SmoothWeightChangeParams + } + return nil +} + +// Pool asset is an internal struct that combines the amount of the +// token in the pool, and its balancer weight. +// This is an awkward packaging of data, +// and should be revisited in a future state migration. +type PoolAsset struct { + // Coins we are talking about, + // the denomination must be unique amongst all PoolAssets for this pool. + Token types1.Coin `protobuf:"bytes,1,opt,name=token,proto3" json:"token" yaml:"token"` + // Weight that is not normalized. This weight must be less than 2^50 + Weight github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=weight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"weight" yaml:"weight"` +} + +func (m *PoolAsset) Reset() { *m = PoolAsset{} } +func (m *PoolAsset) String() string { return proto.CompactTextString(m) } +func (*PoolAsset) ProtoMessage() {} +func (*PoolAsset) Descriptor() ([]byte, []int) { + return fileDescriptor_7e991f749f68c2a4, []int{2} +} +func (m *PoolAsset) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PoolAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PoolAsset.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 *PoolAsset) XXX_Merge(src proto.Message) { + xxx_messageInfo_PoolAsset.Merge(m, src) +} +func (m *PoolAsset) XXX_Size() int { + return m.Size() +} +func (m *PoolAsset) XXX_DiscardUnknown() { + xxx_messageInfo_PoolAsset.DiscardUnknown(m) +} + +var xxx_messageInfo_PoolAsset proto.InternalMessageInfo + +func (m *PoolAsset) GetToken() types1.Coin { + if m != nil { + return m.Token + } + return types1.Coin{} +} + +type Pool struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + PoolParams PoolParams `protobuf:"bytes,3,opt,name=pool_params,json=poolParams,proto3" json:"pool_params" yaml:"balancer_pool_params"` + // This string specifies who will govern the pool in the future. + // Valid forms of this are: + // {token name},{duration} + // {duration} + // where {token name} if specified is the token which determines the + // governor, and if not specified is the LP token for this pool.duration is + // a time specified as 0w,1w,2w, etc. which specifies how long the token + // would need to be locked up to count in governance. 0w means no lockup. + // TODO: Further improve these docs + FuturePoolGovernor string `protobuf:"bytes,4,opt,name=future_pool_governor,json=futurePoolGovernor,proto3" json:"future_pool_governor,omitempty" yaml:"future_pool_governor"` + // sum of all LP tokens sent out + TotalShares types1.Coin `protobuf:"bytes,5,opt,name=total_shares,json=totalShares,proto3" json:"total_shares" yaml:"total_shares"` + // These are assumed to be sorted by denomiation. + // They contain the pool asset and the information about the weight + PoolAssets []PoolAsset `protobuf:"bytes,6,rep,name=pool_assets,json=poolAssets,proto3" json:"pool_assets" yaml:"pool_assets"` + // sum of all non-normalized pool weights + TotalWeight github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=total_weight,json=totalWeight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"total_weight" yaml:"total_weight"` +} + +func (m *Pool) Reset() { *m = Pool{} } +func (*Pool) ProtoMessage() {} +func (*Pool) Descriptor() ([]byte, []int) { + return fileDescriptor_7e991f749f68c2a4, []int{3} +} +func (m *Pool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Pool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Pool.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 *Pool) XXX_Merge(src proto.Message) { + xxx_messageInfo_Pool.Merge(m, src) +} +func (m *Pool) XXX_Size() int { + return m.Size() +} +func (m *Pool) XXX_DiscardUnknown() { + xxx_messageInfo_Pool.DiscardUnknown(m) +} + +var xxx_messageInfo_Pool proto.InternalMessageInfo + +func init() { + proto.RegisterType((*SmoothWeightChangeParams)(nil), "osmosis.gamm.v1beta1.SmoothWeightChangeParams") + proto.RegisterType((*PoolParams)(nil), "osmosis.gamm.v1beta1.PoolParams") + proto.RegisterType((*PoolAsset)(nil), "osmosis.gamm.v1beta1.PoolAsset") + proto.RegisterType((*Pool)(nil), "osmosis.gamm.v1beta1.Pool") +} + +func init() { + proto.RegisterFile("osmosis/gamm/pool-models/balancer/balancerPool.proto", fileDescriptor_7e991f749f68c2a4) +} + +var fileDescriptor_7e991f749f68c2a4 = []byte{ + // 831 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4f, 0x4f, 0xe3, 0x46, + 0x14, 0x8f, 0x93, 0x40, 0x96, 0xc9, 0x76, 0x2b, 0x66, 0x73, 0x30, 0x41, 0x8d, 0xd1, 0x54, 0xaa, + 0x56, 0xd5, 0xc6, 0x56, 0x76, 0x7b, 0xda, 0xcb, 0x6a, 0x03, 0xb4, 0xe2, 0x46, 0x4d, 0x25, 0x4a, + 0x85, 0x64, 0x4d, 0x92, 0x89, 0x6d, 0x61, 0x7b, 0x2c, 0xcf, 0x24, 0xc0, 0x37, 0xe8, 0x91, 0x23, + 0xbd, 0x71, 0xef, 0xb5, 0xfd, 0x0e, 0xa8, 0xbd, 0x70, 0xac, 0x7a, 0x70, 0x2b, 0xe8, 0xa9, 0xc7, + 0x7c, 0x82, 0x6a, 0xfe, 0x38, 0x09, 0x34, 0x51, 0x41, 0x3d, 0x65, 0xde, 0x9b, 0xf7, 0x7e, 0xef, + 0xf7, 0xde, 0xfb, 0x8d, 0x03, 0xbe, 0xa0, 0x2c, 0xa6, 0x2c, 0x64, 0x8e, 0x8f, 0xe3, 0xd8, 0x49, + 0x29, 0x8d, 0xda, 0x31, 0x1d, 0x90, 0x88, 0x39, 0x3d, 0x1c, 0xe1, 0xa4, 0x4f, 0xb2, 0xe9, 0x61, + 0x9f, 0xd2, 0xc8, 0x4e, 0x33, 0xca, 0x29, 0x6c, 0xe8, 0x2c, 0x5b, 0x64, 0xd9, 0xe3, 0x4e, 0x8f, + 0x70, 0xdc, 0x69, 0x6e, 0xf4, 0xa5, 0xdb, 0x93, 0x31, 0x8e, 0x32, 0x54, 0x42, 0xb3, 0xe1, 0x53, + 0x9f, 0x2a, 0xbf, 0x38, 0x69, 0x6f, 0xcb, 0xa7, 0xd4, 0x8f, 0x88, 0x23, 0xad, 0xde, 0x68, 0xe8, + 0x0c, 0x46, 0x19, 0xe6, 0x21, 0x4d, 0xf4, 0xbd, 0xf5, 0xf0, 0x9e, 0x87, 0x31, 0x61, 0x1c, 0xc7, + 0x69, 0x01, 0xa0, 0x8a, 0x38, 0x78, 0xc4, 0x03, 0x47, 0xd3, 0x90, 0xc6, 0x83, 0xfb, 0x1e, 0x66, + 0x64, 0x7a, 0xdf, 0xa7, 0xa1, 0x2e, 0x80, 0x7e, 0xad, 0x00, 0xf3, 0x20, 0xa6, 0x94, 0x07, 0x87, + 0x24, 0xf4, 0x03, 0xbe, 0x1d, 0xe0, 0xc4, 0x27, 0xfb, 0x38, 0xc3, 0x31, 0x83, 0xdf, 0x02, 0xc0, + 0x38, 0xce, 0xb8, 0x27, 0xaa, 0x9a, 0xc6, 0x96, 0xf1, 0xaa, 0xfe, 0xa6, 0x69, 0x2b, 0x4a, 0x76, + 0x41, 0xc9, 0xfe, 0xa6, 0xa0, 0xd4, 0xfd, 0xe4, 0x3a, 0xb7, 0x4a, 0x93, 0xdc, 0x5a, 0x3f, 0xc7, + 0x71, 0xf4, 0x0e, 0xcd, 0x72, 0xd1, 0xc5, 0x1f, 0x96, 0xe1, 0xae, 0x49, 0x87, 0x08, 0x87, 0x01, + 0x78, 0x56, 0x74, 0x6a, 0x96, 0x25, 0xee, 0xc6, 0xbf, 0x70, 0x77, 0x74, 0x40, 0xb7, 0x23, 0x60, + 0xff, 0xce, 0x2d, 0x58, 0xa4, 0xbc, 0xa6, 0x71, 0xc8, 0x49, 0x9c, 0xf2, 0xf3, 0x49, 0x6e, 0x7d, + 0xac, 0x8a, 0x15, 0x77, 0xe8, 0x52, 0x94, 0x9a, 0xa2, 0xc3, 0x31, 0x68, 0x84, 0x49, 0xc8, 0x43, + 0x1c, 0x79, 0x62, 0xb7, 0xde, 0xa9, 0x6c, 0x93, 0x99, 0x95, 0xad, 0xca, 0xab, 0xfa, 0x1b, 0xcb, + 0x5e, 0xb4, 0x47, 0x5b, 0x2c, 0xfa, 0x03, 0x63, 0x84, 0x77, 0x3f, 0xd5, 0x2d, 0x6d, 0xaa, 0x2a, + 0x8b, 0xa0, 0x90, 0x0b, 0xb5, 0x5b, 0xa4, 0xa9, 0x31, 0x32, 0xc8, 0xc0, 0x4b, 0x8e, 0x33, 0x9f, + 0xf0, 0xfb, 0x65, 0xab, 0x8f, 0x2b, 0x8b, 0x74, 0xd9, 0xa6, 0x2a, 0xbb, 0x00, 0x09, 0xb9, 0xeb, + 0xca, 0x3b, 0x57, 0x14, 0xfd, 0x55, 0x06, 0x40, 0xd8, 0x7a, 0x7f, 0xc7, 0xe0, 0x19, 0x3b, 0xc5, + 0xa9, 0x37, 0x24, 0x6a, 0x7b, 0x6b, 0xdd, 0x0f, 0x02, 0xf7, 0xf7, 0xdc, 0xfa, 0xcc, 0x0f, 0x79, + 0x30, 0xea, 0xd9, 0x7d, 0x1a, 0x6b, 0x99, 0xea, 0x9f, 0x36, 0x1b, 0x9c, 0x38, 0xfc, 0x3c, 0x25, + 0xcc, 0xde, 0x21, 0xfd, 0xd9, 0x78, 0x0b, 0x1c, 0xe4, 0xd6, 0xc4, 0xf1, 0x4b, 0x42, 0x04, 0x3a, + 0x39, 0x0b, 0xb9, 0x44, 0x2f, 0xff, 0x3f, 0xf4, 0x02, 0x07, 0xb9, 0x35, 0x71, 0x14, 0xe8, 0x3f, + 0x18, 0x60, 0x93, 0x49, 0x61, 0xea, 0x8e, 0xbd, 0xbe, 0x94, 0xa6, 0x97, 0xca, 0xde, 0xcc, 0x8a, + 0x54, 0x8d, 0xbd, 0x78, 0x90, 0xcb, 0x14, 0xdd, 0xfd, 0xfc, 0x3a, 0xb7, 0x8c, 0x49, 0x6e, 0x21, + 0xdd, 0xd5, 0xf2, 0x02, 0xc8, 0x35, 0xd9, 0x12, 0x14, 0xf4, 0xa3, 0x01, 0xd6, 0xa6, 0xbb, 0x82, + 0xbb, 0x60, 0x85, 0xd3, 0x13, 0x92, 0xe8, 0x07, 0xb2, 0x61, 0xeb, 0x77, 0x2f, 0x9e, 0xdc, 0x94, + 0xd1, 0x36, 0x0d, 0x93, 0x6e, 0x43, 0x6f, 0xf5, 0xb9, 0xde, 0xaa, 0xc8, 0x42, 0xae, 0xca, 0x86, + 0x87, 0x60, 0x55, 0xf1, 0xd0, 0xc3, 0x7c, 0xff, 0x84, 0x61, 0xee, 0x25, 0x7c, 0x92, 0x5b, 0x1f, + 0x29, 0x58, 0x85, 0x82, 0x5c, 0x0d, 0x87, 0x7e, 0xae, 0x82, 0xaa, 0x60, 0x0b, 0x5f, 0x83, 0x1a, + 0x1e, 0x0c, 0x32, 0xc2, 0x98, 0x56, 0x03, 0x9c, 0xe4, 0xd6, 0x0b, 0x95, 0xa4, 0x2f, 0x90, 0x5b, + 0x84, 0xc0, 0x17, 0xa0, 0x1c, 0x0e, 0x24, 0x97, 0xaa, 0x5b, 0x0e, 0x07, 0x70, 0x08, 0xea, 0x52, + 0x7f, 0xf7, 0xe6, 0xbf, 0xb5, 0x5c, 0xc8, 0x7a, 0xe2, 0x0f, 0x1e, 0x50, 0xf1, 0x29, 0xf5, 0xe6, + 0xb0, 0x90, 0x0b, 0xd2, 0x99, 0x68, 0xbf, 0x06, 0x8d, 0xe1, 0x88, 0x8f, 0x32, 0xa2, 0x42, 0x7c, + 0x3a, 0x26, 0x59, 0x42, 0x33, 0xb3, 0x2a, 0x29, 0x5b, 0x33, 0xa8, 0x45, 0x51, 0xc8, 0x85, 0xca, + 0x2d, 0x18, 0x7c, 0xa5, 0x9d, 0xf0, 0x08, 0x3c, 0xe7, 0x94, 0xe3, 0xc8, 0x63, 0x01, 0xce, 0x08, + 0x33, 0x57, 0xfe, 0x6b, 0x51, 0x9b, 0x9a, 0xf4, 0xcb, 0x62, 0x51, 0xb3, 0x64, 0xe4, 0xd6, 0xa5, + 0x79, 0x20, 0x2d, 0x78, 0xac, 0xa7, 0x82, 0x85, 0x14, 0x98, 0xb9, 0xfa, 0xb8, 0xe7, 0xdd, 0xd4, + 0xf8, 0x50, 0xe1, 0xcf, 0x21, 0xe8, 0x59, 0xc8, 0x30, 0x06, 0x83, 0x82, 0xb8, 0x56, 0x46, 0x4d, + 0xce, 0x60, 0xf7, 0xc9, 0xca, 0xb8, 0xd7, 0x47, 0xa1, 0x0f, 0xd5, 0x87, 0x92, 0xf7, 0xbb, 0xf5, + 0xef, 0xaf, 0xac, 0xd2, 0xe5, 0x95, 0x55, 0xfa, 0xe5, 0xa7, 0xf6, 0x8a, 0x20, 0xba, 0xd7, 0x3d, + 0xba, 0xbe, 0x6d, 0x19, 0x37, 0xb7, 0x2d, 0xe3, 0xcf, 0xdb, 0x96, 0x71, 0x71, 0xd7, 0x2a, 0xdd, + 0xdc, 0xb5, 0x4a, 0xbf, 0xdd, 0xb5, 0x4a, 0xdf, 0xbd, 0x9f, 0x2b, 0xac, 0x3b, 0x6d, 0x47, 0xb8, + 0xc7, 0x0a, 0xc3, 0x19, 0x77, 0xde, 0x3a, 0x67, 0xcb, 0xff, 0x50, 0x7b, 0xab, 0xf2, 0x23, 0xff, + 0xf6, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9d, 0xba, 0x2b, 0xb9, 0x7c, 0x07, 0x00, 0x00, +} + +func (m *SmoothWeightChangeParams) 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 *SmoothWeightChangeParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SmoothWeightChangeParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TargetPoolWeights) > 0 { + for iNdEx := len(m.TargetPoolWeights) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TargetPoolWeights[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.InitialPoolWeights) > 0 { + for iNdEx := len(m.InitialPoolWeights) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.InitialPoolWeights[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintBalancerPool(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x12 + n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintBalancerPool(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *PoolParams) 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 *PoolParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PoolParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SmoothWeightChangeParams != nil { + { + size, err := m.SmoothWeightChangeParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + { + size := m.ExitFee.Size() + i -= size + if _, err := m.ExitFee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.SwapFee.Size() + i -= size + if _, err := m.SwapFee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *PoolAsset) 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 *PoolAsset) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PoolAsset) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Weight.Size() + i -= size + if _, err := m.Weight.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Pool) 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 *Pool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.TotalWeight.Size() + i -= size + if _, err := m.TotalWeight.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + if len(m.PoolAssets) > 0 { + for iNdEx := len(m.PoolAssets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PoolAssets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + { + size, err := m.TotalShares.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.FuturePoolGovernor) > 0 { + i -= len(m.FuturePoolGovernor) + copy(dAtA[i:], m.FuturePoolGovernor) + i = encodeVarintBalancerPool(dAtA, i, uint64(len(m.FuturePoolGovernor))) + i-- + dAtA[i] = 0x22 + } + { + size, err := m.PoolParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintBalancerPool(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.Id != 0 { + i = encodeVarintBalancerPool(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x10 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintBalancerPool(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintBalancerPool(dAtA []byte, offset int, v uint64) int { + offset -= sovBalancerPool(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *SmoothWeightChangeParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartTime) + n += 1 + l + sovBalancerPool(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) + n += 1 + l + sovBalancerPool(uint64(l)) + if len(m.InitialPoolWeights) > 0 { + for _, e := range m.InitialPoolWeights { + l = e.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + } + } + if len(m.TargetPoolWeights) > 0 { + for _, e := range m.TargetPoolWeights { + l = e.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + } + } + return n +} + +func (m *PoolParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.SwapFee.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + l = m.ExitFee.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + if m.SmoothWeightChangeParams != nil { + l = m.SmoothWeightChangeParams.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + } + return n +} + +func (m *PoolAsset) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Token.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + l = m.Weight.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + return n +} + +func (m *Pool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovBalancerPool(uint64(l)) + } + if m.Id != 0 { + n += 1 + sovBalancerPool(uint64(m.Id)) + } + l = m.PoolParams.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + l = len(m.FuturePoolGovernor) + if l > 0 { + n += 1 + l + sovBalancerPool(uint64(l)) + } + l = m.TotalShares.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + if len(m.PoolAssets) > 0 { + for _, e := range m.PoolAssets { + l = e.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + } + } + l = m.TotalWeight.Size() + n += 1 + l + sovBalancerPool(uint64(l)) + return n +} + +func sovBalancerPool(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozBalancerPool(x uint64) (n int) { + return sovBalancerPool(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SmoothWeightChangeParams) 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 ErrIntOverflowBalancerPool + } + 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: SmoothWeightChangeParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SmoothWeightChangeParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialPoolWeights", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InitialPoolWeights = append(m.InitialPoolWeights, PoolAsset{}) + if err := m.InitialPoolWeights[len(m.InitialPoolWeights)-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 TargetPoolWeights", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TargetPoolWeights = append(m.TargetPoolWeights, PoolAsset{}) + if err := m.TargetPoolWeights[len(m.TargetPoolWeights)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBalancerPool(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBalancerPool + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PoolParams) 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 ErrIntOverflowBalancerPool + } + 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: PoolParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PoolParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SwapFee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + 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 ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SwapFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExitFee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + 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 ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ExitFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SmoothWeightChangeParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SmoothWeightChangeParams == nil { + m.SmoothWeightChangeParams = &SmoothWeightChangeParams{} + } + if err := m.SmoothWeightChangeParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBalancerPool(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBalancerPool + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PoolAsset) 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 ErrIntOverflowBalancerPool + } + 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: PoolAsset: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PoolAsset: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + 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 ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Weight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBalancerPool(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBalancerPool + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Pool) 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 ErrIntOverflowBalancerPool + } + 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: Pool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Pool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + 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 ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PoolParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FuturePoolGovernor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + 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 ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FuturePoolGovernor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalShares", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalShares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolAssets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PoolAssets = append(m.PoolAssets, PoolAsset{}) + if err := m.PoolAssets[len(m.PoolAssets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalWeight", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBalancerPool + } + 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 ErrInvalidLengthBalancerPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBalancerPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalWeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipBalancerPool(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBalancerPool + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipBalancerPool(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, ErrIntOverflowBalancerPool + } + 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, ErrIntOverflowBalancerPool + } + 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, ErrIntOverflowBalancerPool + } + 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, ErrInvalidLengthBalancerPool + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupBalancerPool + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthBalancerPool + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthBalancerPool = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowBalancerPool = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupBalancerPool = fmt.Errorf("proto: unexpected end of group") +) diff --git a/osmosis/balancer/codec.go b/osmosis/balancer/codec.go new file mode 100644 index 0000000..e9822ea --- /dev/null +++ b/osmosis/balancer/codec.go @@ -0,0 +1,47 @@ +package balancer + +import ( + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" + proto "github.com/gogo/protobuf/proto" +) + +// RegisterLegacyAminoCodec registers the necessary x/gamm interfaces and concrete types +// on the provided LegacyAmino codec. These types are used for Amino JSON serialization. +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&Pool{}, "osmosis/gamm/BalancerPool", nil) + cdc.RegisterConcrete(&MsgCreateBalancerPool{}, "osmosis/gamm/create-balancer-pool", nil) + cdc.RegisterConcrete(&PoolParams{}, "osmosis/gamm/BalancerPoolParams", nil) +} + +func RegisterInterfaces(registry codectypes.InterfaceRegistry) { + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgCreateBalancerPool{}, + ) + registry.RegisterImplementations( + (*proto.Message)(nil), + &PoolParams{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} + +var ( + amino = codec.NewLegacyAmino() + + // ModuleCdc references the global x/bank module codec. Note, the codec should + // ONLY be used in certain instances of tests and for JSON encoding as Amino is + // still used for that purpose. + // + // The actual codec used for serialization should be provided to x/staking and + // defined at the application level. + ModuleCdc = codec.NewAminoCodec(amino) +) + +func init() { + RegisterLegacyAminoCodec(amino) + amino.Seal() +} diff --git a/osmosis/balancer/constants.go b/osmosis/balancer/constants.go new file mode 100644 index 0000000..f11f02e --- /dev/null +++ b/osmosis/balancer/constants.go @@ -0,0 +1,22 @@ +package balancer + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var ( + // Pool creators can specify a weight in [1, MaxUserSpecifiedWeight) + // for every token in the balancer pool. + // + // The weight used in the balancer equation is then creator-specified-weight * GuaranteedWeightPrecision. + // This is done so that LBP's / smooth weight changes can actually happen smoothly, + // without complex precision loss / edge effects. + MaxUserSpecifiedWeight sdk.Int = sdk.NewIntFromUint64(1 << 20) + // Scaling factor for every weight. The pool weight is: + // weight_in_MsgCreateBalancerPool * GuaranteedWeightPrecision + // + // This is done so that smooth weight changes have enough precision to actually be smooth. + GuaranteedWeightPrecision int64 = 1 << 30 + + PoolTypeName string = "Balancer" +) diff --git a/osmosis/balancer/doc.go b/osmosis/balancer/doc.go new file mode 100644 index 0000000..e8b33f8 --- /dev/null +++ b/osmosis/balancer/doc.go @@ -0,0 +1,6 @@ +/* +Package balancer implements weighted constant product AMMs, satisfying the AMM pool interface from +x/gamm/types. Please refer to the specification under /spec for further information, and the +Balancer projects documentation for more details on the mathematical equations. +*/ +package balancer diff --git a/osmosis/balancer/marshal.go b/osmosis/balancer/marshal.go new file mode 100644 index 0000000..c847aff --- /dev/null +++ b/osmosis/balancer/marshal.go @@ -0,0 +1,63 @@ +package balancer + +import ( + "encoding/json" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type balancerPoolPretty struct { + Address sdk.AccAddress `json:"address" yaml:"address"` + Id uint64 `json:"id" yaml:"id"` + PoolParams PoolParams `json:"pool_params" yaml:"pool_params"` + FuturePoolGovernor string `json:"future_pool_governor" yaml:"future_pool_governor"` + TotalWeight sdk.Dec `json:"total_weight" yaml:"total_weight"` + TotalShares sdk.Coin `json:"total_shares" yaml:"total_shares"` + PoolAssets []PoolAsset `json:"pool_assets" yaml:"pool_assets"` +} + +func (p Pool) String() string { + out, err := p.MarshalJSON() + if err != nil { + panic(err) + } + return string(out) +} + +// MarshalJSON returns the JSON representation of a Pool. +func (p Pool) MarshalJSON() ([]byte, error) { + accAddr, err := sdk.AccAddressFromBech32(p.Address) + if err != nil { + return nil, err + } + + decTotalWeight := sdk.NewDecFromInt(p.TotalWeight) + + return json.Marshal(balancerPoolPretty{ + Address: accAddr, + Id: p.Id, + PoolParams: p.PoolParams, + FuturePoolGovernor: p.FuturePoolGovernor, + TotalWeight: decTotalWeight, + TotalShares: p.TotalShares, + PoolAssets: p.PoolAssets, + }) +} + +// UnmarshalJSON unmarshals raw JSON bytes into a Pool. +func (p *Pool) UnmarshalJSON(bz []byte) error { + var alias balancerPoolPretty + if err := json.Unmarshal(bz, &alias); err != nil { + return err + } + + p.Address = alias.Address.String() + p.Id = alias.Id + p.PoolParams = alias.PoolParams + p.FuturePoolGovernor = alias.FuturePoolGovernor + p.TotalWeight = alias.TotalWeight.RoundInt() + p.TotalShares = alias.TotalShares + p.PoolAssets = alias.PoolAssets + + return nil +} diff --git a/osmosis/balancer/msgs.go b/osmosis/balancer/msgs.go new file mode 100644 index 0000000..5b4f6b0 --- /dev/null +++ b/osmosis/balancer/msgs.go @@ -0,0 +1,72 @@ +package balancer + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + TypeMsgCreateBalancerPool = "create_balancer_pool" +) + +var ( + _ sdk.Msg = &MsgCreateBalancerPool{} +) + +func NewMsgCreateBalancerPool( + sender sdk.AccAddress, + poolParams PoolParams, + poolAssets []PoolAsset, + futurePoolGovernor string, +) MsgCreateBalancerPool { + return MsgCreateBalancerPool{ + Sender: sender.String(), + PoolParams: &poolParams, + PoolAssets: poolAssets, + FuturePoolGovernor: futurePoolGovernor, + } +} + +func (msg MsgCreateBalancerPool) Route() string { return "" } +func (msg MsgCreateBalancerPool) Type() string { return TypeMsgCreateBalancerPool } +func (msg MsgCreateBalancerPool) ValidateBasic() error { + + return nil +} + +func (msg MsgCreateBalancerPool) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) +} + +func (msg MsgCreateBalancerPool) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +/// Implement the CreatePoolMsg interface + +func (msg MsgCreateBalancerPool) PoolCreator() sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return sender +} + +func (msg MsgCreateBalancerPool) Validate(ctx sdk.Context) error { + return msg.ValidateBasic() +} + +func (msg MsgCreateBalancerPool) InitialLiquidity() sdk.Coins { + var coins sdk.Coins + for _, asset := range msg.PoolAssets { + coins = append(coins, asset.Token) + } + if coins == nil { + panic("Shouldn't happen") + } + coins = coins.Sort() + return coins +} diff --git a/osmosis/balancer/pool_asset.go b/osmosis/balancer/pool_asset.go new file mode 100644 index 0000000..57968d0 --- /dev/null +++ b/osmosis/balancer/pool_asset.go @@ -0,0 +1,84 @@ +package balancer + +import ( + "fmt" + "sort" + "strings" + + "gopkg.in/yaml.v2" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type poolAssetPretty struct { + Token sdk.Coin `json:"token" yaml:"token"` + Weight sdk.Dec `json:"weight" yaml:"weight"` +} + +// validates a pool asset, to check if it has a valid weight. +func (pa PoolAsset) validateWeight() error { + if pa.Weight.LTE(sdk.ZeroInt()) { + return fmt.Errorf("a token's weight in the pool must be greater than 0") + } + + // TODO: add validation for asset weight overflow: + // https://github.com/osmosis-labs/osmosis/issues/1958 + + return nil +} + +func (pa PoolAsset) prettify() poolAssetPretty { + return poolAssetPretty{ + Weight: sdk.NewDecFromInt(pa.Weight).QuoInt64(GuaranteedWeightPrecision), + Token: pa.Token, + } +} + +// MarshalYAML returns the YAML representation of a PoolAsset. +// This is assumed to not be called on a stand-alone instance, so it removes the first marshalled line. +func (pa PoolAsset) MarshalYAML() (interface{}, error) { + bz, err := yaml.Marshal(pa.prettify()) + if err != nil { + return nil, err + } + s := string(bz) + return s, nil +} + +// sortPoolAssetsOutOfPlaceByDenom sorts pool assets in place, by weight +// Doesn't deep copy the underlying weights, but it does place the assets +// into a new slice. +func sortPoolAssetsOutOfPlaceByDenom(assets []PoolAsset) []PoolAsset { + assets_copy := make([]PoolAsset, len(assets)) + copy(assets_copy, assets) + sortPoolAssetsByDenom(assets_copy) + return assets_copy +} + +// sortPoolAssetsByDenom sorts pool assets in place, by weight. +func sortPoolAssetsByDenom(assets []PoolAsset) { + sort.Slice(assets, func(i, j int) bool { + PoolAssetA := assets[i] + PoolAssetB := assets[j] + + return strings.Compare(PoolAssetA.Token.Denom, PoolAssetB.Token.Denom) == -1 + }) +} + +// poolAssetsCoins returns all the coins corresponding to a slice of pool assets. +func poolAssetsCoins(assets []PoolAsset) sdk.Coins { + coins := sdk.Coins{} + for _, asset := range assets { + coins = coins.Add(asset.Token) + } + return coins +} + +func getPoolAssetByDenom(assets []PoolAsset, denom string) (PoolAsset, bool) { + for _, asset := range assets { + if asset.Token.Denom == denom { + return asset, true + } + } + return PoolAsset{}, false +} diff --git a/osmosis/balancer/pool_params.go b/osmosis/balancer/pool_params.go new file mode 100644 index 0000000..bf3d953 --- /dev/null +++ b/osmosis/balancer/pool_params.go @@ -0,0 +1,26 @@ +package balancer + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func NewPoolParams(swapFee, exitFee sdk.Dec, params *SmoothWeightChangeParams) PoolParams { + return PoolParams{ + SwapFee: swapFee, + ExitFee: exitFee, + SmoothWeightChangeParams: params, + } +} + +func (params PoolParams) Validate(poolWeights []PoolAsset) error { + + return nil +} + +func (params PoolParams) GetPoolSwapFee() sdk.Dec { + return params.SwapFee +} + +func (params PoolParams) GetPoolExitFee() sdk.Dec { + return params.ExitFee +} diff --git a/osmosis/balancer/tx.pb.go b/osmosis/balancer/tx.pb.go new file mode 100644 index 0000000..29c4b5e --- /dev/null +++ b/osmosis/balancer/tx.pb.go @@ -0,0 +1,748 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: osmosis/gamm/pool-models/balancer/tx/tx.proto + +package balancer + +import ( + context "context" + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +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 + +// ===================== MsgCreatePool +type MsgCreateBalancerPool struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` + PoolParams *PoolParams `protobuf:"bytes,2,opt,name=pool_params,json=poolParams,proto3" json:"pool_params,omitempty" yaml:"pool_params"` + PoolAssets []PoolAsset `protobuf:"bytes,3,rep,name=pool_assets,json=poolAssets,proto3" json:"pool_assets"` + FuturePoolGovernor string `protobuf:"bytes,4,opt,name=future_pool_governor,json=futurePoolGovernor,proto3" json:"future_pool_governor,omitempty" yaml:"future_pool_governor"` +} + +func (m *MsgCreateBalancerPool) Reset() { *m = MsgCreateBalancerPool{} } +func (m *MsgCreateBalancerPool) String() string { return proto.CompactTextString(m) } +func (*MsgCreateBalancerPool) ProtoMessage() {} +func (*MsgCreateBalancerPool) Descriptor() ([]byte, []int) { + return fileDescriptor_0647ee155de97433, []int{0} +} +func (m *MsgCreateBalancerPool) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateBalancerPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateBalancerPool.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 *MsgCreateBalancerPool) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateBalancerPool.Merge(m, src) +} +func (m *MsgCreateBalancerPool) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateBalancerPool) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateBalancerPool.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateBalancerPool proto.InternalMessageInfo + +func (m *MsgCreateBalancerPool) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgCreateBalancerPool) GetPoolParams() *PoolParams { + if m != nil { + return m.PoolParams + } + return nil +} + +func (m *MsgCreateBalancerPool) GetPoolAssets() []PoolAsset { + if m != nil { + return m.PoolAssets + } + return nil +} + +func (m *MsgCreateBalancerPool) GetFuturePoolGovernor() string { + if m != nil { + return m.FuturePoolGovernor + } + return "" +} + +// Returns the poolID +type MsgCreateBalancerPoolResponse struct { + PoolID uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` +} + +func (m *MsgCreateBalancerPoolResponse) Reset() { *m = MsgCreateBalancerPoolResponse{} } +func (m *MsgCreateBalancerPoolResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateBalancerPoolResponse) ProtoMessage() {} +func (*MsgCreateBalancerPoolResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0647ee155de97433, []int{1} +} +func (m *MsgCreateBalancerPoolResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateBalancerPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateBalancerPoolResponse.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 *MsgCreateBalancerPoolResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateBalancerPoolResponse.Merge(m, src) +} +func (m *MsgCreateBalancerPoolResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateBalancerPoolResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateBalancerPoolResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateBalancerPoolResponse proto.InternalMessageInfo + +func (m *MsgCreateBalancerPoolResponse) GetPoolID() uint64 { + if m != nil { + return m.PoolID + } + return 0 +} + +func init() { + proto.RegisterType((*MsgCreateBalancerPool)(nil), "osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPool") + proto.RegisterType((*MsgCreateBalancerPoolResponse)(nil), "osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPoolResponse") +} + +func init() { + proto.RegisterFile("osmosis/gamm/pool-models/balancer/tx/tx.proto", fileDescriptor_0647ee155de97433) +} + +var fileDescriptor_0647ee155de97433 = []byte{ + // 427 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xc1, 0x6e, 0xd3, 0x30, + 0x18, 0x80, 0xeb, 0xb5, 0x0a, 0xc2, 0x15, 0x07, 0xac, 0x81, 0xa2, 0x22, 0x92, 0x28, 0x5c, 0xc2, + 0xa1, 0xb6, 0xda, 0x71, 0xe2, 0x32, 0x11, 0x26, 0xa6, 0x1d, 0x26, 0x8d, 0xdc, 0xc6, 0x65, 0x72, + 0x16, 0x13, 0x2a, 0x25, 0x71, 0x64, 0xbb, 0x55, 0x79, 0x0b, 0x9e, 0x80, 0x23, 0xcf, 0xc0, 0x23, + 0xec, 0xb8, 0x23, 0xa7, 0x08, 0xa5, 0x6f, 0xd0, 0x27, 0x40, 0xb6, 0x13, 0x34, 0xa4, 0x4c, 0x20, + 0x71, 0x73, 0x7e, 0x7f, 0xff, 0xf7, 0xff, 0xbf, 0xf3, 0xc3, 0x39, 0x97, 0x25, 0x97, 0x2b, 0x49, + 0x72, 0x5a, 0x96, 0xa4, 0xe6, 0xbc, 0x98, 0x97, 0x3c, 0x63, 0x85, 0x24, 0x29, 0x2d, 0x68, 0x75, + 0xcd, 0x04, 0x51, 0x5b, 0xa2, 0xb6, 0xb8, 0x16, 0x5c, 0x71, 0x14, 0x75, 0x38, 0xd6, 0x38, 0xd6, + 0xb8, 0xa5, 0x71, 0x4f, 0xe3, 0xcd, 0x22, 0x65, 0x8a, 0x2e, 0x66, 0x87, 0x39, 0xcf, 0xb9, 0x49, + 0x22, 0xfa, 0x64, 0xf3, 0x67, 0xaf, 0xfe, 0x5e, 0xae, 0x3f, 0x5c, 0x70, 0x5e, 0xd8, 0xac, 0xf0, + 0xfb, 0x01, 0x7c, 0x72, 0x2e, 0xf3, 0xb7, 0x82, 0x51, 0xc5, 0xe2, 0x3b, 0xf7, 0xe8, 0x25, 0x74, + 0x24, 0xab, 0x32, 0x26, 0x5c, 0x10, 0x80, 0xe8, 0x61, 0xfc, 0x78, 0xdf, 0xf8, 0x8f, 0x3e, 0xd3, + 0xb2, 0x78, 0x1d, 0xda, 0x78, 0x98, 0x74, 0x00, 0xba, 0x84, 0x53, 0x5d, 0xef, 0xaa, 0xa6, 0x82, + 0x96, 0xd2, 0x3d, 0x08, 0x40, 0x34, 0x5d, 0x06, 0xf8, 0x8f, 0x81, 0xba, 0xe6, 0xb1, 0x76, 0x5f, + 0x18, 0x2e, 0x7e, 0xba, 0x6f, 0x7c, 0x64, 0x8d, 0x77, 0xd2, 0xc3, 0x04, 0xd6, 0xbf, 0x19, 0xf4, + 0xae, 0x53, 0x53, 0x29, 0x99, 0x92, 0xee, 0x38, 0x18, 0x47, 0xd3, 0xa5, 0x7f, 0xbf, 0xfa, 0x8d, + 0xe6, 0xe2, 0xc9, 0x4d, 0xe3, 0x8f, 0xac, 0xc7, 0x04, 0x24, 0x7a, 0x0f, 0x0f, 0x3f, 0xae, 0xd5, + 0x5a, 0xb0, 0x2b, 0xa3, 0xcb, 0xf9, 0x86, 0x89, 0x8a, 0x0b, 0x77, 0x62, 0x66, 0xf3, 0xf7, 0x8d, + 0xff, 0xcc, 0x76, 0x32, 0x44, 0x85, 0x09, 0xb2, 0x61, 0x5d, 0xe1, 0xb4, 0x0f, 0x9e, 0xc0, 0xe7, + 0x83, 0x2f, 0x97, 0x30, 0x59, 0xf3, 0x4a, 0x32, 0xf4, 0x02, 0x3e, 0x30, 0x9a, 0x55, 0x66, 0x9e, + 0x70, 0x12, 0xc3, 0xb6, 0xf1, 0x1d, 0x8d, 0x9c, 0x9d, 0x24, 0x8e, 0xbe, 0x3a, 0xcb, 0x96, 0xdf, + 0x00, 0x1c, 0x9f, 0xcb, 0x1c, 0x7d, 0x05, 0x10, 0x0d, 0xfc, 0x85, 0x63, 0xfc, 0xaf, 0x6b, 0x81, + 0x07, 0x9b, 0x99, 0x9d, 0xfe, 0xa7, 0xa0, 0x9f, 0x26, 0xbe, 0xbc, 0x69, 0x3d, 0x70, 0xdb, 0x7a, + 0xe0, 0x67, 0xeb, 0x81, 0x2f, 0x3b, 0x6f, 0x74, 0xbb, 0xf3, 0x46, 0x3f, 0x76, 0xde, 0xe8, 0xc3, + 0x71, 0xbe, 0x52, 0x9f, 0xd6, 0x29, 0xbe, 0xe6, 0x25, 0xe9, 0x8a, 0xcd, 0x0b, 0x9a, 0xca, 0xfe, + 0x83, 0x6c, 0x16, 0x47, 0x64, 0x7b, 0xff, 0x5e, 0xa6, 0x8e, 0xd9, 0xc5, 0xa3, 0x5f, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x09, 0x14, 0x1c, 0x57, 0x32, 0x03, 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 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + CreateBalancerPool(ctx context.Context, in *MsgCreateBalancerPool, opts ...grpc.CallOption) (*MsgCreateBalancerPoolResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateBalancerPool(ctx context.Context, in *MsgCreateBalancerPool, opts ...grpc.CallOption) (*MsgCreateBalancerPoolResponse, error) { + out := new(MsgCreateBalancerPoolResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.poolmodels.balancer.v1beta1.Msg/CreateBalancerPool", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + CreateBalancerPool(context.Context, *MsgCreateBalancerPool) (*MsgCreateBalancerPoolResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateBalancerPool(ctx context.Context, req *MsgCreateBalancerPool) (*MsgCreateBalancerPoolResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBalancerPool not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateBalancerPool_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateBalancerPool) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateBalancerPool(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.poolmodels.balancer.v1beta1.Msg/CreateBalancerPool", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateBalancerPool(ctx, req.(*MsgCreateBalancerPool)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "osmosis.gamm.poolmodels.balancer.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateBalancerPool", + Handler: _Msg_CreateBalancerPool_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "osmosis/gamm/pool-models/balancer/tx/tx.proto", +} + +func (m *MsgCreateBalancerPool) 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 *MsgCreateBalancerPool) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateBalancerPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FuturePoolGovernor) > 0 { + i -= len(m.FuturePoolGovernor) + copy(dAtA[i:], m.FuturePoolGovernor) + i = encodeVarintTx(dAtA, i, uint64(len(m.FuturePoolGovernor))) + i-- + dAtA[i] = 0x22 + } + if len(m.PoolAssets) > 0 { + for iNdEx := len(m.PoolAssets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PoolAssets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.PoolParams != nil { + { + size, err := m.PoolParams.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateBalancerPoolResponse) 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 *MsgCreateBalancerPoolResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateBalancerPoolResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PoolID != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.PoolID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCreateBalancerPool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.PoolParams != nil { + l = m.PoolParams.Size() + n += 1 + l + sovTx(uint64(l)) + } + if len(m.PoolAssets) > 0 { + for _, e := range m.PoolAssets { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.FuturePoolGovernor) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateBalancerPoolResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolID != 0 { + n += 1 + sovTx(uint64(m.PoolID)) + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgCreateBalancerPool) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateBalancerPool: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateBalancerPool: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PoolParams == nil { + m.PoolParams = &PoolParams{} + } + if err := m.PoolParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolAssets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PoolAssets = append(m.PoolAssets, PoolAsset{}) + if err := m.PoolAssets[len(m.PoolAssets)-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 FuturePoolGovernor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FuturePoolGovernor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateBalancerPoolResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateBalancerPoolResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateBalancerPoolResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolID", wireType) + } + m.PoolID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/proto/aquifer/genesis.proto b/proto/aquifer/genesis.proto new file mode 100644 index 0000000..f315152 --- /dev/null +++ b/proto/aquifer/genesis.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package cosmichorizon.qwoyn.aquifer; + +import "gogoproto/gogo.proto"; +import "aquifer/params.proto"; + +option go_package = "github.com/cosmic-horizon/qwoyn/x/aquifer/types"; + +// GenesisState defines the aquifer module's genesis state. +message GenesisState { + Params params = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/aquifer/params.proto b/proto/aquifer/params.proto new file mode 100644 index 0000000..a20532b --- /dev/null +++ b/proto/aquifer/params.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; +package cosmichorizon.qwoyn.aquifer; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmic-horizon/qwoyn/x/aquifer/types"; + +// Params defines the parameters for the module. +message Params { + option (gogoproto.goproto_stringer) = false; + + string maintainer = 1; + string deposit_token = 2; // axlUSDC.osmo + string allocation_token = 3; // qwoyn + uint64 vesting_duration = 4; // 1 year in seconds + uint64 deposit_end_time = 5; + string init_liquidity_price = 6 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // price without considering decimal + string discount = 7 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // discount from initial liquidity price + bool liquidity_bootstrapping = 8; // broadcasted ICA tx to bootstrap Osmosis LP + bool liquidity_bootstrapped = 9; // set as true once Osmosis liquidity created + string ica_connection_id = 10; +} diff --git a/proto/aquifer/query.proto b/proto/aquifer/query.proto new file mode 100644 index 0000000..f736b31 --- /dev/null +++ b/proto/aquifer/query.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +package cosmichorizon.qwoyn.aquifer; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "aquifer/params.proto"; + +option go_package = "github.com/cosmic-horizon/qwoyn/x/aquifer/types"; + +// Query defines the gRPC querier service. +service Query { + // Parameters queries the parameters of the module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmichorizon/qwoyn/aquifer/params"; + } +} + +// QueryParamsRequest is request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + // params holds all the parameters of this module. + Params params = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/aquifer/tx.proto b/proto/aquifer/tx.proto new file mode 100644 index 0000000..693cb05 --- /dev/null +++ b/proto/aquifer/tx.proto @@ -0,0 +1,83 @@ +syntax = "proto3"; +package cosmichorizon.qwoyn.aquifer; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmic-horizon/qwoyn/x/aquifer/types"; + +// Msg defines the Msg service. +service Msg { + rpc PutAllocationToken(MsgPutAllocationToken) returns (MsgPutAllocationTokenResponse); + rpc TakeOutAllocationToken(MsgTakeOutAllocationToken) returns (MsgTakeOutAllocationTokenResponse); + rpc BuyAllocationToken(MsgBuyAllocationToken) returns (MsgBuyAllocationTokenResponse); + rpc SetDepositEndTime(MsgSetDepositEndTime) returns (MsgSetDepositEndTimeResponse); + rpc InitICA(MsgInitICA) returns (MsgInitICAResponse); + rpc ExecTransfer(MsgExecTransfer) returns (MsgExecTransferResponse); + rpc ExecAddLiquidity(MsgExecAddLiquidity) returns (MsgExecAddLiquidityResponse); +} + +message MsgPutAllocationToken { + string sender = 1; + cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.nullable) = false ]; +} +message MsgPutAllocationTokenResponse {} + +message MsgTakeOutAllocationToken { + string sender = 1; + cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.nullable) = false ]; +} +message MsgTakeOutAllocationTokenResponse {} + +message MsgBuyAllocationToken { + string sender = 1; + cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.nullable) = false ]; +} +message MsgBuyAllocationTokenResponse {} + +message MsgSetDepositEndTime { + string sender = 1; + uint64 end_time = 2; +} +message MsgSetDepositEndTimeResponse {} + +message MsgInitICA { + string sender = 1; + string connection_id = 2; +} +message MsgInitICAResponse {} + +message MsgExecTransfer { + string sender = 1; + uint64 timeout_nano_second = 2; + string transfer_channel_id = 3; +} +message MsgExecTransferResponse {} + +message MsgExecAddLiquidity { + string sender = 1; + bytes msg = 2 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/cosmic-horizon/qwoyn/osmosis/balancer.MsgCreateBalancerPool" + ]; +} +message MsgExecAddLiquidityResponse {} + +message EventPutAllocationToken { + string sender = 1; + string amount = 2; +} + +message EventTakeOutAllocationToken { + string sender = 1; + string amount = 2; +} + +message EventBuyAllocationToken { + string sender = 1; + string amount = 2; +} + +message EventSetDepositEndTime { + uint64 time = 1; +} \ No newline at end of file diff --git a/proto/intertx/tx.proto b/proto/intertx/tx.proto index e3da593..adf6e7a 100644 --- a/proto/intertx/tx.proto +++ b/proto/intertx/tx.proto @@ -19,7 +19,7 @@ message MsgRegisterAccount { // owner is the address of the interchain account owner. string owner = 1; - // connection_id is the connection id string (i.e. channel-5). + // connection_id is the connection id string string connection_id = 2; // version is the application version string. For example, this could be an diff --git a/scripts/aquifer/test.sh b/scripts/aquifer/test.sh new file mode 100644 index 0000000..fdae857 --- /dev/null +++ b/scripts/aquifer/test.sh @@ -0,0 +1,73 @@ +#!/bin/sh + +# hermes 0.13.0-rc.0 +hermes -c ./hermes/config.toml keys restore qwoyn-1 -m "weather leader certain hard busy blouse click patient balcony return elephant hire mule gather danger curious visual boy estate army marine cinnamon snake flight" +hermes -c ./hermes/config.toml keys restore osmo-test -m "weather leader certain hard busy blouse click patient balcony return elephant hire mule gather danger curious visual boy estate army marine cinnamon snake flight" + +hermes -c ./hermes/config.toml create connection osmo-test qwoyn-1 +hermes -c ./hermes/config.toml start +hermes -c ./hermes/config.toml create channel osmo-test qwoyn-1 --port-a transfer --port-b transfer + +qwoynd keys show -a user1 --keyring-backend=test +qwoyn1h9krsew6kpg9huzcqgmgmns0n48jx9yd5vr0n5 +osmosisd keys show -a user1 --keyring-backend=test +osmo1h9krsew6kpg9huzcqgmgmns0n48jx9ydph3pz8 + +qwoynd q ibc channel channels +- channel_id: channel-0 + connection_hops: + - connection-1 + counterparty: + channel_id: channel-0 + +osmosisd tx ibc-transfer transfer transfer channel-0 qwoyn1h9krsew6kpg9huzcqgmgmns0n48jx9yd5vr0n5 1000000stake --chain-id=osmo-test --from=user1 --keyring-backend=test -y --broadcast-mode=block --node=http://localhost:16657 +qwoynd query bank balances qwoyn1h9krsew6kpg9huzcqgmgmns0n48jx9yd5vr0n5 +- amount: "1000000" + denom: ibc/C053D637CCA2A2BA030E2C5EE1B28A16F71CCB0E45E8BE52766DC1B241B77878 + +IBC_OSMO=ibc/C053D637CCA2A2BA030E2C5EE1B28A16F71CCB0E45E8BE52766DC1B241B77878 +qwoynd tx aquifer put-allocation-token 100000000uqwoyn --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block +qwoynd tx aquifer set-deposit-endtime $(($(date -u +%s) + 300)) --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block +qwoynd tx aquifer buy-allocation-token 100000000stake --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block +qwoynd tx aquifer buy-allocation-token 200000$IBC_OSMO --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block +qwoynd tx aquifer init-ica connection-1 --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block + +qwoynd query intertx ica aquifer connection-1 +interchain_account_address: osmo12pfj79vt84pmxrwjc6sh4pawq8ltz028xprne80rgqzvxtj2tryq6zke9y + +qwoynd query aquifer params +qwoynd tx aquifer exec-transfer channel-0 60000000000 --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block +osmosisd tx bank send user1 osmo12pfj79vt84pmxrwjc6sh4pawq8ltz028xprne80rgqzvxtj2tryq6zke9y 1000000stake,10000000000uosmo --chain-id=osmo-test --keyring-backend=test -y --broadcast-mode=block --node=http://localhost:16657 +qwoynd tx ibc-transfer transfer transfer channel-0 osmo12pfj79vt84pmxrwjc6sh4pawq8ltz028xprne80rgqzvxtj2tryq6zke9y 100000000uqwoyn --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block +osmosisd query bank balances osmo12pfj79vt84pmxrwjc6sh4pawq8ltz028xprne80rgqzvxtj2tryq6zke9y --node=http://localhost:16657 + +qwoynd tx aquifer exec-add-liquidity --pool-file="pool.json" --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block +osmosisd query gamm pools --node=http://localhost:16657 + +osmosisd tx gamm create-pool --pool-file=pool1.json --from=user1 --keyring-backend=test -y --broadcast-mode=block --node=http://localhost:16657 --chain-id=osmo-test + +osmosisd query interchain-accounts host params --node=http://0.0.0.0:16657 +# allow_messages: +# - /osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPool +# host_enabled: true + +pool.json +``` +{ + "weights": "5ibc/D67FFE08041F9BD3378C0003A785C90577F4DD2AED6713C78680D663FA9CAEE2,5stake", + "initial-deposit": "1000ibc/D67FFE08041F9BD3378C0003A785C90577F4DD2AED6713C78680D663FA9CAEE2,1000stake", + "swap-fee": "0.01", + "exit-fee": "0.01", + "future-governor": "168h" +} +``` +pool1.json +``` +{ + "weights": "5stake,5uosmo", + "initial-deposit": "1000stake,1000uosmo", + "swap-fee": "0.01", + "exit-fee": "0.01", + "future-governor": "168h" +} +``` diff --git a/start.sh b/start.sh index 9664914..354ba07 100644 --- a/start.sh +++ b/start.sh @@ -2,10 +2,15 @@ rm -rf ~/.qwoynd +echo "weather leader certain hard busy blouse click patient balcony return elephant hire mule gather danger curious visual boy estate army marine cinnamon snake flight" > mnemonic.txt; + # Build genesis qwoynd init --chain-id=qwoyn-1 test qwoynd keys add validator --keyring-backend="test" +qwoynd keys add user1 --recover --keyring-backend=test < mnemonic.txt; + qwoynd add-genesis-account $(qwoynd keys show validator -a --keyring-backend="test") 1000000000000uqwoyn,1000000000000ucoho,1000000000000stake +qwoynd add-genesis-account $(qwoynd keys show user1 -a --keyring-backend="test") 1000000000000uqwoyn,1000000000000ucoho,1000000000000stake qwoynd gentx validator 100000000stake --keyring-backend="test" --chain-id=qwoyn-1 qwoynd collect-gentxs diff --git a/start_osmosis.sh b/start_osmosis.sh new file mode 100644 index 0000000..5278dcb --- /dev/null +++ b/start_osmosis.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +# osmosis version v13.1.0 +rm -rf $HOME/.osmosisd/ + +cd $HOME + +chain_id=osmo-test + +echo "weather leader certain hard busy blouse click patient balcony return elephant hire mule gather danger curious visual boy estate army marine cinnamon snake flight" > mnemonic.txt; + +osmosisd init --chain-id=$chain_id osmo-test --home=$HOME/.osmosisd +osmosisd keys add validator --keyring-backend=test --home=$HOME/.osmosisd +osmosisd keys add user1 --recover --keyring-backend=test < mnemonic.txt; +osmosisd add-genesis-account $(osmosisd keys show validator -a --keyring-backend=test --home=$HOME/.osmosisd) 100000000000stake,100000000000uosmo --home=$HOME/.osmosisd +osmosisd add-genesis-account $(osmosisd keys show user1 -a --keyring-backend=test --home=$HOME/.osmosisd) 10000000stake,100000000000uosmo --home=$HOME/.osmosisd +osmosisd gentx validator 500000000stake --keyring-backend=test --home=$HOME/.osmosisd --chain-id=$chain_id +osmosisd collect-gentxs --home=$HOME/.osmosisd + +sed -i -e 's#"localhost:6060"#"localhost:6061"#g' $HOME/.osmosisd/config/config.toml +sed -i -e 's#"tcp://0.0.0.0:26656"#"tcp://0.0.0.0:16656"#g' $HOME/.osmosisd/config/config.toml +sed -i -e 's#"tcp://127.0.0.1:26657"#"tcp://127.0.0.1:16657"#g' $HOME/.osmosisd/config/config.toml +sed -i -e 's#"0.0.0.0:9091"#"0.0.0.0:9093"#g' $HOME/.osmosisd/config/app.toml +sed -i -e 's#"0.0.0.0:9090"#"0.0.0.0:9092"#g' $HOME/.osmosisd/config/app.toml +sed -i -e 's#"0.0.0.0:8080"#"0.0.0.0:8081"#g' $HOME/.osmosisd/config/app.toml +sed -i -e 's#"0.0.0.0:1317"#"0.0.0.0:1316"#g' $HOME/.osmosisd/config/app.toml +sed -i -r "325s/.*/ \"allow_messages\": \[\"\/osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPool\"\]/" $HOME/.osmosisd/config/genesis.json + +osmosisd start --home=$HOME/.osmosisd + + diff --git a/x/aquifer/client/cli/flags.go b/x/aquifer/client/cli/flags.go new file mode 100644 index 0000000..b518be5 --- /dev/null +++ b/x/aquifer/client/cli/flags.go @@ -0,0 +1,81 @@ +package cli + +import ( + "bytes" + "encoding/json" + "fmt" + "os" + + "github.com/spf13/pflag" + flag "github.com/spf13/pflag" +) + +const ( + FlagPoolFile = "pool-file" +) + +func FlagSetCreatePool() *flag.FlagSet { + fs := flag.NewFlagSet("", flag.ContinueOnError) + + fs.String(FlagPoolFile, "", "Pool json file path (if this path is given, other create pool flags should not be used)") + + return fs +} + +func parseCreateBalancerPoolFlags(fs *pflag.FlagSet) (*createBalancerPoolInputs, error) { + pool := &createBalancerPoolInputs{} + poolFile, _ := fs.GetString(FlagPoolFile) + + if poolFile == "" { + return nil, fmt.Errorf("must pass in a pool json using the --%s flag", FlagPoolFile) + } + + contents, err := os.ReadFile(poolFile) + if err != nil { + return nil, err + } + + // make exception if unknown field exists + err = pool.UnmarshalJSON(contents) + if err != nil { + return nil, err + } + + return pool, nil +} + +type smoothWeightChangeParamsInputs struct { + StartTime string `json:"start-time"` + Duration string `json:"duration"` + TargetPoolWeights string `json:"target-pool-weights"` +} + +type XCreatePoolInputs createBalancerPoolInputs + +type XCreatePoolInputsExceptions struct { + XCreatePoolInputs + Other *string // Other won't raise an error +} + +type createBalancerPoolInputs struct { + Weights string `json:"weights"` + InitialDeposit string `json:"initial-deposit"` + SwapFee string `json:"swap-fee"` + ExitFee string `json:"exit-fee"` + FutureGovernor string `json:"future-governor"` + SmoothWeightChangeParams smoothWeightChangeParamsInputs `json:"lbp-params"` +} + +// UnmarshalJSON should error if there are fields unexpected. +func (release *createBalancerPoolInputs) UnmarshalJSON(data []byte) error { + var createPoolE XCreatePoolInputsExceptions + dec := json.NewDecoder(bytes.NewReader(data)) + dec.DisallowUnknownFields() // Force + + if err := dec.Decode(&createPoolE); err != nil { + return err + } + + *release = createBalancerPoolInputs(createPoolE.XCreatePoolInputs) + return nil +} diff --git a/x/aquifer/client/cli/query.go b/x/aquifer/client/cli/query.go new file mode 100644 index 0000000..daa3596 --- /dev/null +++ b/x/aquifer/client/cli/query.go @@ -0,0 +1,30 @@ +package cli + +import ( + "fmt" + // "strings" + + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" + // "github.com/cosmos/cosmos-sdk/client/flags" + // sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/cosmic-horizon/qwoyn/x/aquifer/types" +) + +// GetQueryCmd returns the cli query commands for this module +func GetQueryCmd(queryRoute string) *cobra.Command { + // Group aquifer queries under a subcommand + cmd := &cobra.Command{ + Use: types.ModuleName, + Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName), + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + cmd.AddCommand(CmdQueryParams()) + + return cmd +} diff --git a/x/aquifer/client/cli/query_params.go b/x/aquifer/client/cli/query_params.go new file mode 100644 index 0000000..faf1d57 --- /dev/null +++ b/x/aquifer/client/cli/query_params.go @@ -0,0 +1,34 @@ +package cli + +import ( + "context" + + "github.com/cosmic-horizon/qwoyn/x/aquifer/types" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" +) + +func CmdQueryParams() *cobra.Command { + cmd := &cobra.Command{ + Use: "params", + Short: "shows the parameters of the module", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.Params(context.Background(), &types.QueryParamsRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/aquifer/client/cli/tx.go b/x/aquifer/client/cli/tx.go new file mode 100644 index 0000000..af24e69 --- /dev/null +++ b/x/aquifer/client/cli/tx.go @@ -0,0 +1,411 @@ +package cli + +import ( + "errors" + "fmt" + "strconv" + "time" + + "github.com/cosmic-horizon/qwoyn/osmosis/balancer" + "github.com/cosmic-horizon/qwoyn/x/aquifer/types" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/version" + "github.com/spf13/cobra" + flag "github.com/spf13/pflag" +) + +var ( + DefaultRelativePacketTimeoutTimestamp = uint64((time.Duration(10) * time.Minute).Nanoseconds()) +) + +// GetTxCmd returns the transaction commands for this module +func GetTxCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: types.ModuleName, + Short: fmt.Sprintf("%s transactions subcommands", types.ModuleName), + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + cmd.AddCommand( + GetCmdPutAllocationToken(), + GetCmdTakeOutAllocationToken(), + GetCmdBuyAllocationToken(), + GetCmdSetDepositEndTime(), + GetCmdInitICA(), + GetCmdExecTransfer(), + GetCmdExecAddLiquidity(), + ) + + return cmd +} + +func GetCmdPutAllocationToken() *cobra.Command { + cmd := &cobra.Command{ + Use: "put-allocation-token [coin] [flags]", + Long: "Put allocation token into aquifer pool", + Args: cobra.ExactArgs(1), + Example: fmt.Sprintf( + `$ %s tx put-allocation-token [coin]`, + version.AppName, + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + coin, err := sdk.ParseCoinNormalized(args[0]) + if err != nil { + return err + } + + msg := types.NewMsgPutAllocationToken( + clientCtx.GetFromAddress(), + coin, + ) + + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +func GetCmdTakeOutAllocationToken() *cobra.Command { + cmd := &cobra.Command{ + Use: "take-out-allocation-token [coin] [flags]", + Long: "Take out allocation token from aquifer pool", + Args: cobra.ExactArgs(1), + Example: fmt.Sprintf( + `$ %s tx take-out-allocation-token [coin]`, + version.AppName, + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + coin, err := sdk.ParseCoinNormalized(args[0]) + if err != nil { + return err + } + + msg := types.NewMsgTakeOutAllocationToken( + clientCtx.GetFromAddress(), + coin, + ) + + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +func GetCmdBuyAllocationToken() *cobra.Command { + cmd := &cobra.Command{ + Use: "buy-allocation-token [coin] [flags]", + Long: "Buy allocation token from aquifer pool", + Args: cobra.ExactArgs(1), + Example: fmt.Sprintf( + `$ %s tx buy-allocation-token [coin]`, + version.AppName, + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + coin, err := sdk.ParseCoinNormalized(args[0]) + if err != nil { + return err + } + + msg := types.NewMsgBuyAllocationToken( + clientCtx.GetFromAddress(), + coin, + ) + + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +func GetCmdSetDepositEndTime() *cobra.Command { + cmd := &cobra.Command{ + Use: "set-deposit-endtime [endTime] [flags]", + Long: "Set deposit end time", + Args: cobra.ExactArgs(1), + Example: fmt.Sprintf( + `$ %s tx set-deposit-endtime [coin]`, + version.AppName, + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + endTime, err := strconv.Atoi(args[0]) + if err != nil { + return err + } + + msg := types.NewMsgSetDepositEndTime( + clientCtx.GetFromAddress(), + uint64(endTime), + ) + + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +func GetCmdInitICA() *cobra.Command { + cmd := &cobra.Command{ + Use: "init-ica [connectionId] [flags]", + Long: "Initialize interchain account", + Args: cobra.ExactArgs(1), + Example: fmt.Sprintf( + `$ %s tx init-ica [connectionId]`, + version.AppName, + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgInitICA( + clientCtx.GetFromAddress(), + args[0], + ) + + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +func GetCmdExecTransfer() *cobra.Command { + cmd := &cobra.Command{ + Use: "exec-transfer [channelId] [timeoutNanoSecond] [flags]", + Long: "Execute ibc transfer to target network", + Args: cobra.ExactArgs(2), + Example: fmt.Sprintf( + `$ %s tx exec-transfer [channelId] [timeoutNanoSecond]`, + version.AppName, + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + timeoutNanoSecond, err := strconv.Atoi(args[1]) + msg := types.NewMsgExecTransfer( + clientCtx.GetFromAddress(), + args[0], + uint64(timeoutNanoSecond), + ) + + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +func GetCmdExecAddLiquidity() *cobra.Command { + cmd := &cobra.Command{ + Use: "exec-add-liquidity [flags]", + Long: "Execute ibc transfer to target network", + Args: cobra.ExactArgs(0), + Example: fmt.Sprintf( + `$ %s tx exec-add-liquidity --pool-file="pool.json" + Sample pool JSON file contents: + { + "weights": "4uatom,4osmo,2uakt", + "initial-deposit": "100uatom,5osmo,20uakt", + "swap-fee": "0.01", + "exit-fee": "0.01", + "future-governor": "168h" +}`, + version.AppName, + ), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + txf := tx.NewFactoryCLI(clientCtx, cmd.Flags()). + WithTxConfig(clientCtx.TxConfig).WithAccountRetriever(clientCtx.AccountRetriever) + var msg sdk.Msg + txf, balancerPoolMsg, err := NewBuildCreateBalancerPoolMsg(clientCtx, txf, cmd.Flags()) + if err != nil { + return err + } + + msg = types.NewMsgExecAddLiquidity(clientCtx.GetFromAddress(), *balancerPoolMsg) + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + cmd.Flags().AddFlagSet(FlagSetCreatePool()) + flags.AddTxFlagsToCmd(cmd) + + _ = cmd.MarkFlagRequired(FlagPoolFile) + + return cmd +} + +func NewBuildCreateBalancerPoolMsg(clientCtx client.Context, txf tx.Factory, fs *flag.FlagSet) (tx.Factory, *balancer.MsgCreateBalancerPool, error) { + pool, err := parseCreateBalancerPoolFlags(fs) + if err != nil { + return txf, nil, fmt.Errorf("failed to parse pool: %w", err) + } + + deposit, err := sdk.ParseCoinsNormalized(pool.InitialDeposit) + if err != nil { + return txf, nil, err + } + + poolAssetCoins, err := sdk.ParseDecCoins(pool.Weights) + if err != nil { + return txf, nil, err + } + + if len(deposit) != len(poolAssetCoins) { + return txf, nil, errors.New("deposit tokens and token weights should have same length") + } + + swapFee, err := sdk.NewDecFromStr(pool.SwapFee) + if err != nil { + return txf, nil, err + } + + exitFee, err := sdk.NewDecFromStr(pool.ExitFee) + if err != nil { + return txf, nil, err + } + + var poolAssets []balancer.PoolAsset + for i := 0; i < len(poolAssetCoins); i++ { + if poolAssetCoins[i].Denom != deposit[i].Denom { + return txf, nil, errors.New("deposit tokens and token weights should have same denom order") + } + + poolAssets = append(poolAssets, balancer.PoolAsset{ + Weight: poolAssetCoins[i].Amount.RoundInt(), + Token: deposit[i], + }) + } + + poolParams := &balancer.PoolParams{ + SwapFee: swapFee, + ExitFee: exitFee, + } + + msg := &balancer.MsgCreateBalancerPool{ + Sender: clientCtx.GetFromAddress().String(), + PoolParams: poolParams, + PoolAssets: poolAssets, + FuturePoolGovernor: pool.FutureGovernor, + } + + if (pool.SmoothWeightChangeParams != smoothWeightChangeParamsInputs{}) { + duration, err := time.ParseDuration(pool.SmoothWeightChangeParams.Duration) + if err != nil { + return txf, nil, fmt.Errorf("could not parse duration: %w", err) + } + + targetPoolAssetCoins, err := sdk.ParseDecCoins(pool.SmoothWeightChangeParams.TargetPoolWeights) + if err != nil { + return txf, nil, err + } + + var targetPoolAssets []balancer.PoolAsset + for i := 0; i < len(targetPoolAssetCoins); i++ { + if targetPoolAssetCoins[i].Denom != poolAssetCoins[i].Denom { + return txf, nil, errors.New("initial pool weights and target pool weights should have same denom order") + } + + targetPoolAssets = append(targetPoolAssets, balancer.PoolAsset{ + Weight: targetPoolAssetCoins[i].Amount.RoundInt(), + Token: deposit[i], + }) + } + + smoothWeightParams := balancer.SmoothWeightChangeParams{ + Duration: duration, + InitialPoolWeights: poolAssets, + TargetPoolWeights: targetPoolAssets, + } + + if pool.SmoothWeightChangeParams.StartTime != "" { + startTime, err := time.Parse(time.RFC3339, pool.SmoothWeightChangeParams.StartTime) + if err != nil { + return txf, nil, fmt.Errorf("could not parse time: %w", err) + } + + smoothWeightParams.StartTime = startTime + } + + msg.PoolParams.SmoothWeightChangeParams = &smoothWeightParams + } + + return txf, msg, nil +} diff --git a/x/aquifer/genesis.go b/x/aquifer/genesis.go new file mode 100644 index 0000000..a6884bd --- /dev/null +++ b/x/aquifer/genesis.go @@ -0,0 +1,21 @@ +package aquifer + +import ( + "github.com/cosmic-horizon/qwoyn/x/aquifer/keeper" + "github.com/cosmic-horizon/qwoyn/x/aquifer/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// InitGenesis initializes the capability module's state from a provided genesis +// state. +func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { + k.SetParams(ctx, genState.Params) +} + +// ExportGenesis returns the capability module's exported genesis. +func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { + genesis := types.DefaultGenesis() + genesis.Params = k.GetParams(ctx) + + return genesis +} diff --git a/x/aquifer/genesis_test.go b/x/aquifer/genesis_test.go new file mode 100644 index 0000000..3b4efe2 --- /dev/null +++ b/x/aquifer/genesis_test.go @@ -0,0 +1,13 @@ +package aquifer_test + +import ( + "testing" + + "github.com/cosmic-horizon/qwoyn/x/aquifer/types" +) + +func TestGenesis(t *testing.T) { + _ = types.GenesisState{ + Params: types.DefaultParams(), + } +} diff --git a/x/aquifer/handler.go b/x/aquifer/handler.go new file mode 100644 index 0000000..af7d01e --- /dev/null +++ b/x/aquifer/handler.go @@ -0,0 +1,23 @@ +package aquifer + +import ( + "fmt" + + "github.com/cosmic-horizon/qwoyn/x/aquifer/keeper" + "github.com/cosmic-horizon/qwoyn/x/aquifer/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// NewHandler ... +func NewHandler(k keeper.Keeper) sdk.Handler { + return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + ctx = ctx.WithEventManager(sdk.NewEventManager()) + _ = ctx + switch msg := msg.(type) { + default: + errMsg := fmt.Sprintf("unrecognized %s message type: %T", types.ModuleName, msg) + return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, errMsg) + } + } +} diff --git a/x/aquifer/keeper/abci.go b/x/aquifer/keeper/abci.go new file mode 100644 index 0000000..6bfc29c --- /dev/null +++ b/x/aquifer/keeper/abci.go @@ -0,0 +1,15 @@ +package keeper + +import ( + "time" + + "github.com/cosmic-horizon/qwoyn/x/aquifer/types" + "github.com/cosmos/cosmos-sdk/telemetry" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// BeginBlocker mints new tokens for the previous block. +func (k Keeper) BeginBlocker(ctx sdk.Context) { + defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) + +} diff --git a/x/aquifer/keeper/abci_test.go b/x/aquifer/keeper/abci_test.go new file mode 100644 index 0000000..a43a7f5 --- /dev/null +++ b/x/aquifer/keeper/abci_test.go @@ -0,0 +1,4 @@ +package keeper_test + +func (suite *KeeperTestSuite) TestBeginBlocker() { +} diff --git a/x/aquifer/keeper/grpc_query.go b/x/aquifer/keeper/grpc_query.go new file mode 100644 index 0000000..fac0fcf --- /dev/null +++ b/x/aquifer/keeper/grpc_query.go @@ -0,0 +1,7 @@ +package keeper + +import ( + "github.com/cosmic-horizon/qwoyn/x/aquifer/types" +) + +var _ types.QueryServer = Keeper{} diff --git a/x/aquifer/keeper/grpc_query_params.go b/x/aquifer/keeper/grpc_query_params.go new file mode 100644 index 0000000..4590850 --- /dev/null +++ b/x/aquifer/keeper/grpc_query_params.go @@ -0,0 +1,19 @@ +package keeper + +import ( + "context" + + "github.com/cosmic-horizon/qwoyn/x/aquifer/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(c) + + return &types.QueryParamsResponse{Params: k.GetParams(ctx)}, nil +} diff --git a/x/aquifer/keeper/keeper.go b/x/aquifer/keeper/keeper.go new file mode 100644 index 0000000..ca11299 --- /dev/null +++ b/x/aquifer/keeper/keeper.go @@ -0,0 +1,67 @@ +package keeper + +import ( + "fmt" + + "github.com/tendermint/tendermint/libs/log" + + "github.com/cosmic-horizon/qwoyn/x/aquifer/types" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" + capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + icacontrollerkeeper "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/controller/keeper" + ibctransferkeeper "github.com/cosmos/ibc-go/v3/modules/apps/transfer/keeper" +) + +type Keeper struct { + cdc codec.BinaryCodec + storeKey sdk.StoreKey + paramstore paramtypes.Subspace + ak types.AccountKeeper + bk types.BankKeeper + gk types.GameKeeper + icaControllerKeeper icacontrollerkeeper.Keeper + TransferKeeper ibctransferkeeper.Keeper + + scopedKeeper capabilitykeeper.ScopedKeeper +} + +func NewKeeper( + cdc codec.BinaryCodec, + storeKey sdk.StoreKey, + ps paramtypes.Subspace, + ak types.AccountKeeper, + bk types.BankKeeper, + gk types.GameKeeper, + iaKeeper icacontrollerkeeper.Keeper, + TransferKeeper ibctransferkeeper.Keeper, + scopedKeeper capabilitykeeper.ScopedKeeper, +) *Keeper { + // set KeyTable if it has not already been set + if !ps.HasKeyTable() { + ps = ps.WithKeyTable(types.ParamKeyTable()) + } + + return &Keeper{ + cdc: cdc, + storeKey: storeKey, + paramstore: ps, + ak: ak, + bk: bk, + gk: gk, + icaControllerKeeper: iaKeeper, + TransferKeeper: TransferKeeper, + scopedKeeper: scopedKeeper, + } +} + +func (k Keeper) Logger(ctx sdk.Context) log.Logger { + return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) +} + +// ClaimCapability claims the channel capability passed via the OnOpenChanInit callback +func (k *Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error { + return k.scopedKeeper.ClaimCapability(ctx, cap, name) +} diff --git a/x/aquifer/keeper/keeper_test.go b/x/aquifer/keeper/keeper_test.go new file mode 100644 index 0000000..0484264 --- /dev/null +++ b/x/aquifer/keeper/keeper_test.go @@ -0,0 +1,35 @@ +package keeper_test + +import ( + "testing" + + simapp "github.com/cosmic-horizon/qwoyn/app" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/suite" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" +) + +const ( + isCheckTx = false +) + +type KeeperTestSuite struct { + suite.Suite + + legacyAmino *codec.LegacyAmino + ctx sdk.Context + app *simapp.App +} + +func (suite *KeeperTestSuite) SetupTest() { + app := simapp.Setup(isCheckTx) + + suite.legacyAmino = app.LegacyAmino() + suite.ctx = app.BaseApp.NewContext(isCheckTx, tmproto.Header{}) + suite.app = app +} + +func TestKeeperSuite(t *testing.T) { + suite.Run(t, new(KeeperTestSuite)) +} diff --git a/x/aquifer/keeper/msg_server.go b/x/aquifer/keeper/msg_server.go new file mode 100644 index 0000000..652673d --- /dev/null +++ b/x/aquifer/keeper/msg_server.go @@ -0,0 +1,269 @@ +package keeper + +import ( + "context" + "time" + + "github.com/cosmic-horizon/qwoyn/x/aquifer/types" + gametypes "github.com/cosmic-horizon/qwoyn/x/game/types" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" + icatypes "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/types" + ibctransfertypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type msgServer struct { + Keeper +} + +// NewMsgServerImpl returns an implementation of the MsgServer interface +// for the provided Keeper. +func NewMsgServerImpl(keeper Keeper) types.MsgServer { + return &msgServer{Keeper: keeper} +} + +var _ types.MsgServer = msgServer{} + +func (m msgServer) PutAllocationToken(goCtx context.Context, msg *types.MsgPutAllocationToken) (*types.MsgPutAllocationTokenResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + params := m.GetParams(ctx) + if msg.Amount.Denom != params.AllocationToken { + return nil, gametypes.ErrInvalidDepositDenom + } + + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return nil, err + } + + err = m.bk.SendCoinsFromAccountToModule(ctx, sender, types.ModuleName, sdk.Coins{msg.Amount}) + if err != nil { + return nil, err + } + + // emit event + err = ctx.EventManager().EmitTypedEvent(&types.EventPutAllocationToken{ + Sender: msg.Sender, + Amount: msg.Amount.String(), + }) + if err != nil { + return nil, err + } + + return &types.MsgPutAllocationTokenResponse{}, nil +} + +func (m msgServer) TakeOutAllocationToken(goCtx context.Context, msg *types.MsgTakeOutAllocationToken) (*types.MsgTakeOutAllocationTokenResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + params := m.GetParams(ctx) + if msg.Amount.Denom != params.AllocationToken { + return nil, gametypes.ErrInvalidDepositDenom + } + + if msg.Sender != params.Maintainer { + return nil, types.ErrNotMaintainer + } + + // check deposit end time + if ctx.BlockTime().Unix() < int64(params.DepositEndTime) { + return nil, types.ErrDepositTimeNotEnded + } + + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return nil, err + } + + err = m.bk.SendCoinsFromModuleToAccount(ctx, types.ModuleName, sender, sdk.Coins{msg.Amount}) + if err != nil { + return nil, err + } + + // emit event + err = ctx.EventManager().EmitTypedEvent(&types.EventTakeOutAllocationToken{ + Sender: msg.Sender, + Amount: msg.Amount.String(), + }) + if err != nil { + return nil, err + } + + return &types.MsgTakeOutAllocationTokenResponse{}, nil +} + +func (m msgServer) BuyAllocationToken(goCtx context.Context, msg *types.MsgBuyAllocationToken) (*types.MsgBuyAllocationTokenResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + params := m.GetParams(ctx) + if msg.Amount.Denom != params.DepositToken { + return nil, gametypes.ErrInvalidDepositDenom + } + + // check deposit end time + if ctx.BlockTime().Unix() > int64(params.DepositEndTime) { + return nil, types.ErrDepositTimeEnded + } + + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return nil, err + } + + err = m.bk.SendCoinsFromAccountToModule(ctx, sender, types.ModuleName, sdk.Coins{msg.Amount}) + if err != nil { + return nil, err + } + + discountedPrice := params.InitLiquidityPrice.Mul(sdk.OneDec().Sub(params.Discount)) + allocationAmount := msg.Amount.Amount.ToDec().Quo(discountedPrice).RoundInt() + allocationCoins := sdk.Coins{sdk.NewCoin(params.AllocationToken, allocationAmount)} + account := m.ak.GetAccount(ctx, sender) + switch account.(type) { + case *authtypes.BaseAccount: + baseVestingAccount := vestingtypes.NewBaseVestingAccount(account.(*authtypes.BaseAccount), allocationCoins, ctx.BlockTime().Unix()+int64(params.VestingDuration)) + m.ak.SetAccount(ctx, vestingtypes.NewDelayedVestingAccountRaw(baseVestingAccount)) + err = m.bk.SendCoinsFromModuleToAccount(ctx, types.ModuleName, sender, allocationCoins) + if err != nil { + return nil, err + } + default: + return nil, types.ErrNotBaseAccount + } + + // emit event + err = ctx.EventManager().EmitTypedEvent(&types.EventBuyAllocationToken{ + Sender: msg.Sender, + Amount: msg.Amount.String(), + }) + if err != nil { + return nil, err + } + + return &types.MsgBuyAllocationTokenResponse{}, nil +} + +func (m msgServer) SetDepositEndTime(goCtx context.Context, msg *types.MsgSetDepositEndTime) (*types.MsgSetDepositEndTimeResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + params := m.GetParams(ctx) + if msg.Sender != params.Maintainer { + return nil, types.ErrNotMaintainer + } + params.DepositEndTime = msg.EndTime + m.SetParams(ctx, params) + + // emit event + err := ctx.EventManager().EmitTypedEvent(&types.EventSetDepositEndTime{ + Time: msg.EndTime, + }) + if err != nil { + return nil, err + } + + return &types.MsgSetDepositEndTimeResponse{}, nil +} + +func (m msgServer) InitICA(goCtx context.Context, msg *types.MsgInitICA) (*types.MsgInitICAResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + params := m.GetParams(ctx) + if msg.Sender != params.Maintainer { + return nil, types.ErrNotMaintainer + } + + params.IcaConnectionId = msg.ConnectionId + m.SetParams(ctx, params) + + if err := m.icaControllerKeeper.RegisterInterchainAccount(ctx, msg.ConnectionId, types.ModuleName); err != nil { + return nil, err + } + + return &types.MsgInitICAResponse{}, nil +} + +func (m msgServer) ExecTransfer(goCtx context.Context, msg *types.MsgExecTransfer) (*types.MsgExecTransferResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + params := m.GetParams(ctx) + if msg.Sender != params.Maintainer { + return nil, types.ErrNotMaintainer + } + + portID, err := icatypes.NewControllerPortID(types.ModuleName) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "could not find account: %s", err) + } + + icaAddr, found := m.icaControllerKeeper.GetInterchainAccountAddress(ctx, params.IcaConnectionId, portID) + if !found { + return nil, status.Errorf(codes.NotFound, "no account found for portID %s", portID) + } + + moduleAddr := authtypes.NewModuleAddress(types.ModuleName) + depositAmount := m.bk.GetBalance(ctx, moduleAddr, params.DepositToken) + + // transfer tokens to Osmosis network + timeoutTimestamp := uint64(ctx.BlockTime().UnixNano()) + msg.TimeoutNanoSecond + _, err = m.TransferKeeper.Transfer(goCtx, ibctransfertypes.NewMsgTransfer( + ibctransfertypes.PortID, + msg.TransferChannelId, + depositAmount, + moduleAddr.String(), + icaAddr, + clienttypes.Height{}, + timeoutTimestamp)) + if err != nil { + return nil, err + } + return &types.MsgExecTransferResponse{}, nil +} + +func (m msgServer) ExecAddLiquidity(goCtx context.Context, msg *types.MsgExecAddLiquidity) (*types.MsgExecAddLiquidityResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + params := m.GetParams(ctx) + if msg.Sender != params.Maintainer { + return nil, types.ErrNotMaintainer + } + + portID, err := icatypes.NewControllerPortID(types.ModuleName) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "could not find account: %s", err) + } + + channelID, found := m.icaControllerKeeper.GetActiveChannelID(ctx, params.IcaConnectionId, portID) + if !found { + return nil, icatypes.ErrActiveChannelNotFound.Wrapf("failed to retrieve active channel for port %s", portID) + } + + chanCap, found := m.scopedKeeper.GetCapability(ctx, host.ChannelCapabilityPath(portID, channelID)) + if !found { + return nil, channeltypes.ErrChannelCapabilityNotFound.Wrap("module does not own channel capability") + } + + addr, found := m.icaControllerKeeper.GetInterchainAccountAddress(ctx, params.IcaConnectionId, portID) + if !found { + return nil, status.Errorf(codes.NotFound, "no account found for portID %s", portID) + } + + msg.Msg.Sender = addr + + data, err := icatypes.SerializeCosmosTx(m.cdc, []sdk.Msg{&msg.Msg}) + if err != nil { + return nil, err + } + + packetData := icatypes.InterchainAccountPacketData{ + Type: icatypes.EXECUTE_TX, + Data: data, + } + + timeoutTimestamp := ctx.BlockTime().Add(time.Minute).UnixNano() + _, err = m.icaControllerKeeper.SendTx(ctx, chanCap, params.IcaConnectionId, portID, packetData, uint64(timeoutTimestamp)) + if err != nil { + return nil, err + } + + return &types.MsgExecAddLiquidityResponse{}, nil +} diff --git a/x/aquifer/keeper/msg_server_test.go b/x/aquifer/keeper/msg_server_test.go new file mode 100644 index 0000000..d25beda --- /dev/null +++ b/x/aquifer/keeper/msg_server_test.go @@ -0,0 +1,389 @@ +package keeper_test + +import ( + "time" + + "github.com/cosmic-horizon/qwoyn/osmosis/balancer" + "github.com/cosmic-horizon/qwoyn/x/aquifer/keeper" + "github.com/cosmic-horizon/qwoyn/x/aquifer/types" + minttypes "github.com/cosmic-horizon/qwoyn/x/mint/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/tendermint/tendermint/crypto/ed25519" +) + +func (suite *KeeperTestSuite) TestMsgServerBuyAllocationToken() { + params := suite.app.AquiferKeeper.GetParams(suite.ctx) + addr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + + for _, tc := range []struct { + desc string + balance sdk.Coins + deposit sdk.Coin + expPass bool + }{ + { + desc: "invalid denom deposit", + balance: sdk.Coins{sdk.NewInt64Coin("badtoken", 100000)}, + deposit: sdk.NewInt64Coin("badtoken", 100000), + expPass: false, + }, + { + desc: "not enough balance", + balance: sdk.Coins{sdk.NewInt64Coin(params.DepositToken, 10000)}, + deposit: sdk.NewInt64Coin(params.DepositToken, 100000), + expPass: false, + }, + { + desc: "successful deposit", + balance: sdk.Coins{sdk.NewInt64Coin(params.DepositToken, 100000)}, + deposit: sdk.NewInt64Coin(params.DepositToken, 100000), + expPass: true, + }, + } { + suite.Run(tc.desc, func() { + suite.SetupTest() + coins := sdk.Coins{sdk.NewInt64Coin(params.AllocationToken, 10000000)} + err := suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, coins) + suite.Require().NoError(err) + err = suite.app.BankKeeper.SendCoinsFromModuleToModule(suite.ctx, minttypes.ModuleName, types.ModuleName, coins) + suite.Require().NoError(err) + + err = suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, tc.balance) + suite.Require().NoError(err) + err = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, addr, tc.balance) + suite.Require().NoError(err) + + msgServer := keeper.NewMsgServerImpl(suite.app.AquiferKeeper) + _, err = msgServer.BuyAllocationToken(sdk.WrapSDKContext(suite.ctx), &types.MsgBuyAllocationToken{ + Sender: addr.String(), + Amount: tc.deposit, + }) + if tc.expPass { + suite.Require().NoError(err) + + // check balance has decreased + balance := suite.app.BankKeeper.GetBalance(suite.ctx, addr, params.DepositToken) + suite.Require().Equal(balance.Amount, tc.balance.Sub(sdk.Coins{tc.deposit}).AmountOf(params.DepositToken)) + + // check module balance has increased + moduleAddr := suite.app.AccountKeeper.GetModuleAddress(types.ModuleName) + balance = suite.app.BankKeeper.GetBalance(suite.ctx, moduleAddr, params.DepositToken) + suite.Require().Equal(balance, tc.deposit) + } else { + suite.Require().Error(err) + } + }) + } +} + +func (suite *KeeperTestSuite) TestMsgServerPutAllocationToken() { + params := suite.app.AquiferKeeper.GetParams(suite.ctx) + addr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + + for _, tc := range []struct { + desc string + balance sdk.Coins + deposit sdk.Coin + expPass bool + }{ + { + desc: "invalid denom deposit", + balance: sdk.Coins{sdk.NewInt64Coin("badtoken", 100000)}, + deposit: sdk.NewInt64Coin("badtoken", 100000), + expPass: false, + }, + { + desc: "not enough balance", + balance: sdk.Coins{sdk.NewInt64Coin(params.AllocationToken, 10000)}, + deposit: sdk.NewInt64Coin(params.AllocationToken, 100000), + expPass: false, + }, + { + desc: "successful deposit", + balance: sdk.Coins{sdk.NewInt64Coin(params.AllocationToken, 100000)}, + deposit: sdk.NewInt64Coin(params.AllocationToken, 100000), + expPass: true, + }, + } { + suite.Run(tc.desc, func() { + suite.SetupTest() + err := suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, tc.balance) + suite.Require().NoError(err) + err = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, addr, tc.balance) + suite.Require().NoError(err) + + msgServer := keeper.NewMsgServerImpl(suite.app.AquiferKeeper) + _, err = msgServer.PutAllocationToken(sdk.WrapSDKContext(suite.ctx), &types.MsgPutAllocationToken{ + Sender: addr.String(), + Amount: tc.deposit, + }) + if tc.expPass { + suite.Require().NoError(err) + + // check balance has decreased + balance := suite.app.BankKeeper.GetBalance(suite.ctx, addr, params.AllocationToken) + suite.Require().Equal(balance.Amount, tc.balance.Sub(sdk.Coins{tc.deposit}).AmountOf(params.AllocationToken)) + + // check module balance has increased + moduleAddr := suite.app.AccountKeeper.GetModuleAddress(types.ModuleName) + balance = suite.app.BankKeeper.GetBalance(suite.ctx, moduleAddr, params.AllocationToken) + suite.Require().Equal(balance, tc.deposit) + } else { + suite.Require().Error(err) + } + }) + } +} + +func (suite *KeeperTestSuite) TestMsgServerTakeOutAllocationToken() { + params := suite.app.AquiferKeeper.GetParams(suite.ctx) + addr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + now := time.Now() + future := now.Add(time.Hour) + + for _, tc := range []struct { + desc string + maintainer string + withdraw sdk.Coin + depositEndTime time.Time + blockTime time.Time + expPass bool + }{ + { + desc: "invalid denom withdraw", + maintainer: addr.String(), + withdraw: sdk.NewInt64Coin("badtoken", 100000), + depositEndTime: now, + blockTime: future, + expPass: false, + }, + { + desc: "not enough balance", + maintainer: addr.String(), + withdraw: sdk.NewInt64Coin(params.AllocationToken, 100000000000), + depositEndTime: now, + blockTime: future, + expPass: false, + }, + { + desc: "not maintainer", + maintainer: "", + withdraw: sdk.NewInt64Coin(params.AllocationToken, 100000000000), + depositEndTime: now, + blockTime: future, + expPass: false, + }, + { + desc: "deposit end time not reached", + maintainer: "", + withdraw: sdk.NewInt64Coin(params.AllocationToken, 100000000000), + depositEndTime: future, + blockTime: now, + expPass: false, + }, + { + desc: "successful withdrawal", + maintainer: addr.String(), + withdraw: sdk.NewInt64Coin(params.AllocationToken, 100000), + depositEndTime: now, + blockTime: future, + expPass: true, + }, + } { + suite.Run(tc.desc, func() { + suite.SetupTest() + params.Maintainer = tc.maintainer + params.DepositEndTime = uint64(tc.depositEndTime.Unix()) + suite.app.AquiferKeeper.SetParams(suite.ctx, params) + suite.ctx = suite.ctx.WithBlockTime(tc.blockTime) + + coins := sdk.Coins{sdk.NewInt64Coin(params.AllocationToken, 100000)} + err := suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, coins) + suite.Require().NoError(err) + err = suite.app.BankKeeper.SendCoinsFromModuleToModule(suite.ctx, minttypes.ModuleName, types.ModuleName, coins) + suite.Require().NoError(err) + + msgServer := keeper.NewMsgServerImpl(suite.app.AquiferKeeper) + _, err = msgServer.TakeOutAllocationToken(sdk.WrapSDKContext(suite.ctx), &types.MsgTakeOutAllocationToken{ + Sender: addr.String(), + Amount: tc.withdraw, + }) + if tc.expPass { + suite.Require().NoError(err) + + // check balance has increased + balance := suite.app.BankKeeper.GetBalance(suite.ctx, addr, params.AllocationToken) + suite.Require().Equal(balance.Amount, tc.withdraw.Amount) + } else { + suite.Require().Error(err) + } + }) + } +} + +func (suite *KeeperTestSuite) TestMsgServerSetDepositEndTime() { + params := suite.app.AquiferKeeper.GetParams(suite.ctx) + addr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + now := time.Now() + future := now.Add(time.Hour) + + for _, tc := range []struct { + desc string + maintainer string + depositEndTime time.Time + expPass bool + }{ + { + desc: "not maintainer", + maintainer: "", + depositEndTime: future, + expPass: false, + }, + { + desc: "successful set", + maintainer: addr.String(), + depositEndTime: future, + expPass: true, + }, + } { + suite.Run(tc.desc, func() { + suite.SetupTest() + params.Maintainer = tc.maintainer + suite.app.AquiferKeeper.SetParams(suite.ctx, params) + + msgServer := keeper.NewMsgServerImpl(suite.app.AquiferKeeper) + _, err := msgServer.SetDepositEndTime(sdk.WrapSDKContext(suite.ctx), &types.MsgSetDepositEndTime{ + Sender: addr.String(), + EndTime: uint64(tc.depositEndTime.Unix()), + }) + if tc.expPass { + suite.Require().NoError(err) + + // check deposit end time changed + params := suite.app.AquiferKeeper.GetParams(suite.ctx) + suite.Require().Equal(params.DepositEndTime, uint64(tc.depositEndTime.Unix())) + } else { + suite.Require().Error(err) + } + }) + } +} + +func (suite *KeeperTestSuite) TestMsgServerInitICA() { + params := suite.app.AquiferKeeper.GetParams(suite.ctx) + addr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + + for _, tc := range []struct { + desc string + maintainer string + expPass bool + }{ + { + desc: "not maintainer", + maintainer: "", + expPass: false, + }, + { + desc: "connection not found", + maintainer: addr.String(), + expPass: false, + }, + } { + suite.Run(tc.desc, func() { + suite.SetupTest() + params.Maintainer = tc.maintainer + suite.app.AquiferKeeper.SetParams(suite.ctx, params) + + msgServer := keeper.NewMsgServerImpl(suite.app.AquiferKeeper) + _, err := msgServer.InitICA(sdk.WrapSDKContext(suite.ctx), &types.MsgInitICA{ + Sender: addr.String(), + ConnectionId: "connection-0", + }) + if tc.expPass { + suite.Require().NoError(err) + } else { + suite.Require().Error(err) + } + }) + } +} + +func (suite *KeeperTestSuite) TestMsgServerExecTransfer() { + params := suite.app.AquiferKeeper.GetParams(suite.ctx) + addr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + + for _, tc := range []struct { + desc string + maintainer string + expPass bool + }{ + { + desc: "not maintainer", + maintainer: "", + expPass: false, + }, + { + desc: "channel not found", + maintainer: addr.String(), + expPass: false, + }, + } { + suite.Run(tc.desc, func() { + suite.SetupTest() + params.Maintainer = tc.maintainer + suite.app.AquiferKeeper.SetParams(suite.ctx, params) + + msgServer := keeper.NewMsgServerImpl(suite.app.AquiferKeeper) + _, err := msgServer.ExecTransfer(sdk.WrapSDKContext(suite.ctx), &types.MsgExecTransfer{ + Sender: addr.String(), + TransferChannelId: "channel-1", + }) + if tc.expPass { + suite.Require().NoError(err) + } else { + suite.Require().Error(err) + } + }) + } +} + +func (suite *KeeperTestSuite) TestMsgServerExecAddLiquidity() { + params := suite.app.AquiferKeeper.GetParams(suite.ctx) + addr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) + + for _, tc := range []struct { + desc string + maintainer string + expPass bool + }{ + { + desc: "not maintainer", + maintainer: "", + expPass: false, + }, + { + desc: "no active channel for this owner", + maintainer: addr.String(), + expPass: false, + }, + } { + suite.Run(tc.desc, func() { + suite.SetupTest() + params.Maintainer = tc.maintainer + suite.app.AquiferKeeper.SetParams(suite.ctx, params) + + msgServer := keeper.NewMsgServerImpl(suite.app.AquiferKeeper) + _, err := msgServer.ExecAddLiquidity(sdk.WrapSDKContext(suite.ctx), &types.MsgExecAddLiquidity{ + Sender: addr.String(), + Msg: balancer.MsgCreateBalancerPool{ + Sender: addr.String(), + }, + }) + if tc.expPass { + suite.Require().NoError(err) + } else { + suite.Require().Error(err) + } + }) + } +} diff --git a/x/aquifer/keeper/params.go b/x/aquifer/keeper/params.go new file mode 100644 index 0000000..4899be7 --- /dev/null +++ b/x/aquifer/keeper/params.go @@ -0,0 +1,17 @@ +package keeper + +import ( + "github.com/cosmic-horizon/qwoyn/x/aquifer/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// GetParams get all parameters as types.Params +func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { + k.paramstore.GetParamSet(ctx, ¶ms) + return +} + +// SetParams set the params +func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { + k.paramstore.SetParamSet(ctx, ¶ms) +} diff --git a/x/aquifer/keeper/params_test.go b/x/aquifer/keeper/params_test.go new file mode 100644 index 0000000..1077619 --- /dev/null +++ b/x/aquifer/keeper/params_test.go @@ -0,0 +1,21 @@ +package keeper_test + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (suite *KeeperTestSuite) TestParamsGetSet() { + params := suite.app.AquiferKeeper.GetParams(suite.ctx) + params.DepositToken = "uusdc" + params.AllocationToken = "nqwoyn" + params.VestingDuration = 86400 + params.DepositEndTime = 10000 + params.InitLiquidityPrice = sdk.NewDecWithPrec(2, 1) + params.LiquidityBootstrapping = true + params.LiquidityBootstrapped = true + params.IcaConnectionId = "connection-1" + + suite.app.AquiferKeeper.SetParams(suite.ctx, params) + newParams := suite.app.AquiferKeeper.GetParams(suite.ctx) + suite.Require().Equal(params, newParams) +} diff --git a/x/aquifer/module.go b/x/aquifer/module.go new file mode 100644 index 0000000..e83d091 --- /dev/null +++ b/x/aquifer/module.go @@ -0,0 +1,172 @@ +package aquifer + +import ( + "encoding/json" + "fmt" + + "github.com/gorilla/mux" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/spf13/cobra" + + abci "github.com/tendermint/tendermint/abci/types" + + "github.com/cosmic-horizon/qwoyn/x/aquifer/client/cli" + "github.com/cosmic-horizon/qwoyn/x/aquifer/keeper" + "github.com/cosmic-horizon/qwoyn/x/aquifer/types" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" +) + +var ( + _ module.AppModule = AppModule{} + _ module.AppModuleBasic = AppModuleBasic{} +) + +// ---------------------------------------------------------------------------- +// AppModuleBasic +// ---------------------------------------------------------------------------- + +// AppModuleBasic implements the AppModuleBasic interface for the capability module. +type AppModuleBasic struct { + cdc codec.BinaryCodec +} + +func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic { + return AppModuleBasic{cdc: cdc} +} + +// Name returns the capability module's name. +func (AppModuleBasic) Name() string { + return types.ModuleName +} + +func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + types.RegisterLegacyAminoCodec(cdc) +} + +// RegisterInterfaces registers the module's interface types +func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { + types.RegisterInterfaces(reg) +} + +// DefaultGenesis returns the capability module's default genesis state. +func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + return cdc.MustMarshalJSON(types.DefaultGenesis()) +} + +// ValidateGenesis performs genesis state validation for the capability module. +func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { + var genState types.GenesisState + if err := cdc.UnmarshalJSON(bz, &genState); err != nil { + return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) + } + return genState.Validate() +} + +// RegisterRESTRoutes registers the capability module's REST service handlers. +func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { +} + +// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { +} + +// GetTxCmd returns the capability module's root tx command. +func (a AppModuleBasic) GetTxCmd() *cobra.Command { + return cli.GetTxCmd() +} + +// GetQueryCmd returns the capability module's root query command. +func (AppModuleBasic) GetQueryCmd() *cobra.Command { + return cli.GetQueryCmd(types.StoreKey) +} + +// ---------------------------------------------------------------------------- +// AppModule +// ---------------------------------------------------------------------------- + +// AppModule implements the AppModule interface for the capability module. +type AppModule struct { + AppModuleBasic + + keeper keeper.Keeper + accountKeeper types.AccountKeeper + bankKeeper types.BankKeeper +} + +func NewAppModule( + cdc codec.Codec, + keeper keeper.Keeper, + accountKeeper types.AccountKeeper, + bankKeeper types.BankKeeper, +) AppModule { + return AppModule{ + AppModuleBasic: NewAppModuleBasic(cdc), + keeper: keeper, + accountKeeper: accountKeeper, + bankKeeper: bankKeeper, + } +} + +// Name returns the capability module's name. +func (am AppModule) Name() string { + return am.AppModuleBasic.Name() +} + +// Route returns the capability module's message routing key. +func (am AppModule) Route() sdk.Route { + return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) +} + +// QuerierRoute returns the capability module's query routing key. +func (AppModule) QuerierRoute() string { return types.QuerierRoute } + +// LegacyQuerierHandler returns the capability module's Querier. +func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { + return nil +} + +// RegisterServices registers a GRPC query service to respond to the +// module-specific GRPC queries. +func (am AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) + types.RegisterQueryServer(cfg.QueryServer(), am.keeper) +} + +// RegisterInvariants registers the capability module's invariants. +func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} + +// InitGenesis performs the capability module's genesis initialization It returns +// no validator updates. +func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate { + var genState types.GenesisState + // Initialize global index to index in genesis state + cdc.MustUnmarshalJSON(gs, &genState) + + InitGenesis(ctx, am.keeper, genState) + + return []abci.ValidatorUpdate{} +} + +// ExportGenesis returns the capability module's exported genesis state as raw JSON bytes. +func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { + genState := ExportGenesis(ctx, am.keeper) + return cdc.MustMarshalJSON(genState) +} + +// ConsensusVersion implements ConsensusVersion. +func (AppModule) ConsensusVersion() uint64 { return 2 } + +// BeginBlock executes all ABCI BeginBlock logic respective to the capability module. +func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { + am.keeper.BeginBlocker(ctx) +} + +// EndBlock executes all ABCI EndBlock logic respective to the capability module. It +// returns no validator updates. +func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { + return []abci.ValidatorUpdate{} +} diff --git a/x/aquifer/module_ibc.go b/x/aquifer/module_ibc.go new file mode 100644 index 0000000..6b51c8c --- /dev/null +++ b/x/aquifer/module_ibc.go @@ -0,0 +1,189 @@ +package aquifer + +import ( + proto "github.com/gogo/protobuf/proto" + + "github.com/cosmic-horizon/qwoyn/osmosis/balancer" + "github.com/cosmic-horizon/qwoyn/x/aquifer/keeper" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + + channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + porttypes "github.com/cosmos/ibc-go/v3/modules/core/05-port/types" + host "github.com/cosmos/ibc-go/v3/modules/core/24-host" + ibcexported "github.com/cosmos/ibc-go/v3/modules/core/exported" +) + +var _ porttypes.IBCModule = IBCModule{} + +// IBCModule implements the ICS26 interface for interchain accounts controller chains +type IBCModule struct { + keeper keeper.Keeper +} + +// NewIBCModule creates a new IBCModule given the keeper +func NewIBCModule(k keeper.Keeper) IBCModule { + return IBCModule{ + keeper: k, + } +} + +// OnChanOpenInit implements the IBCModule interface +func (im IBCModule) OnChanOpenInit( + ctx sdk.Context, + order channeltypes.Order, + connectionHops []string, + portID string, + channelID string, + chanCap *capabilitytypes.Capability, + counterparty channeltypes.Counterparty, + version string, +) error { + return im.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)) +} + +// OnChanOpenTry implements the IBCModule interface +func (im IBCModule) OnChanOpenTry( + ctx sdk.Context, + order channeltypes.Order, + connectionHops []string, + portID, + channelID string, + chanCap *capabilitytypes.Capability, + counterparty channeltypes.Counterparty, + counterpartyVersion string, +) (string, error) { + return "", nil +} + +// OnChanOpenAck implements the IBCModule interface +func (im IBCModule) OnChanOpenAck( + ctx sdk.Context, + portID, + channelID string, + counterpartyChannelID string, + counterpartyVersion string, +) error { + return nil +} + +// OnChanOpenConfirm implements the IBCModule interface +func (im IBCModule) OnChanOpenConfirm( + ctx sdk.Context, + portID, + channelID string, +) error { + return nil +} + +// OnChanCloseInit implements the IBCModule interface +func (im IBCModule) OnChanCloseInit( + ctx sdk.Context, + portID, + channelID string, +) error { + return nil +} + +// OnChanCloseConfirm implements the IBCModule interface +func (im IBCModule) OnChanCloseConfirm( + ctx sdk.Context, + portID, + channelID string, +) error { + return nil +} + +// OnRecvPacket implements the IBCModule interface. A successful acknowledgement +// is returned if the packet data is succesfully decoded and the receive application +// logic returns without error. +func (im IBCModule) OnRecvPacket( + ctx sdk.Context, + packet channeltypes.Packet, + relayer sdk.AccAddress, +) ibcexported.Acknowledgement { + return channeltypes.NewErrorAcknowledgement("cannot receive packet via interchain accounts authentication module") +} + +// OnAcknowledgementPacket implements the IBCModule interface +func (im IBCModule) OnAcknowledgementPacket( + ctx sdk.Context, + packet channeltypes.Packet, + acknowledgement []byte, + relayer sdk.AccAddress, +) error { + var ack channeltypes.Acknowledgement + if err := channeltypes.SubModuleCdc.UnmarshalJSON(acknowledgement, &ack); err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal ICS-27 packet acknowledgement: %v", err) + } + + txMsgData := &sdk.TxMsgData{} + if err := proto.Unmarshal(ack.GetResult(), txMsgData); err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal ICS-27 tx message data: %v", err) + } + + switch len(txMsgData.Data) { + case 0: + // TODO: handle for sdk 0.46.x + return nil + default: + for _, msgData := range txMsgData.Data { + response, err := handleMsgData(ctx, im.keeper, msgData) + if err != nil { + return err + } + + im.keeper.Logger(ctx).Info("message response in ICS-27 packet response", "response", response) + } + return nil + } +} + +// OnTimeoutPacket implements the IBCModule interface. +func (im IBCModule) OnTimeoutPacket( + ctx sdk.Context, + packet channeltypes.Packet, + relayer sdk.AccAddress, +) error { + return nil +} + +// NegotiateAppVersion implements the IBCModule interface +func (im IBCModule) NegotiateAppVersion( + ctx sdk.Context, + order channeltypes.Order, + connectionID string, + portID string, + counterparty channeltypes.Counterparty, + proposedVersion string, +) (string, error) { + return "", nil +} + +func handleMsgData(ctx sdk.Context, k keeper.Keeper, msgData *sdk.MsgData) (string, error) { + switch msgData.MsgType { + case sdk.MsgTypeURL(&banktypes.MsgSend{}): + msgResponse := &banktypes.MsgSendResponse{} + if err := proto.Unmarshal(msgData.Data, msgResponse); err != nil { + return "", sdkerrors.Wrapf(sdkerrors.ErrJSONUnmarshal, "cannot unmarshal send response message: %s", err.Error()) + } + + return msgResponse.String(), nil + case sdk.MsgTypeURL(&balancer.MsgCreateBalancerPool{}): + msgResponse := &balancer.MsgCreateBalancerPoolResponse{} + if err := proto.Unmarshal(msgData.Data, msgResponse); err != nil { + return "", sdkerrors.Wrapf(sdkerrors.ErrJSONUnmarshal, "cannot unmarshal send response message: %s", err.Error()) + } + + params := k.GetParams(ctx) + params.LiquidityBootstrapping = false + params.LiquidityBootstrapped = true + k.SetParams(ctx, params) + + return msgResponse.String(), nil + default: + return "", nil + } +} diff --git a/x/aquifer/module_simulation.go b/x/aquifer/module_simulation.go new file mode 100644 index 0000000..3236e88 --- /dev/null +++ b/x/aquifer/module_simulation.go @@ -0,0 +1,55 @@ +package aquifer + +import ( + "math/rand" + + "github.com/cosmic-horizon/qwoyn/testutil/sample" + aquifersimulation "github.com/cosmic-horizon/qwoyn/x/aquifer/simulation" + "github.com/cosmic-horizon/qwoyn/x/aquifer/types" + "github.com/cosmos/cosmos-sdk/baseapp" + simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/simulation" +) + +// avoid unused import issue +var ( + _ = sample.AccAddress + _ = aquifersimulation.FindAccount + _ = simappparams.StakePerAccount + _ = simulation.MsgEntryKind + _ = baseapp.Paramspace +) + +// GenerateGenesisState creates a randomized GenState of the module +func (AppModule) GenerateGenesisState(simState *module.SimulationState) { + accs := make([]string, len(simState.Accounts)) + for i, acc := range simState.Accounts { + accs[i] = acc.Address.String() + } + genesis := types.GenesisState{} + simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&genesis) +} + +// ProposalContents doesn't return any content functions for governance proposals +func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalContent { + return nil +} + +// RandomizedParams creates randomized param changes for the simulator +func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { + + return []simtypes.ParamChange{} +} + +// RegisterStoreDecoder registers a decoder +func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} + +// WeightedOperations returns the all the gov module operations with their respective weights. +func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { + operations := make([]simtypes.WeightedOperation, 0) + + return operations +} diff --git a/x/aquifer/simulation/simap.go b/x/aquifer/simulation/simap.go new file mode 100644 index 0000000..92c437c --- /dev/null +++ b/x/aquifer/simulation/simap.go @@ -0,0 +1,15 @@ +package simulation + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" +) + +// FindAccount find a specific address from an account list +func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool) { + creator, err := sdk.AccAddressFromBech32(address) + if err != nil { + panic(err) + } + return simtypes.FindAccount(accs, creator) +} diff --git a/x/aquifer/spec/01_state.md b/x/aquifer/spec/01_state.md new file mode 100644 index 0000000..5328c97 --- /dev/null +++ b/x/aquifer/spec/01_state.md @@ -0,0 +1,40 @@ +# State + +## Params + +```protobuf +// Params defines the parameters for the module. +message Params { + option (gogoproto.goproto_stringer) = false; + + string maintainer = 1; + string deposit_token = 2; // axlUSDC.osmo + string allocation_token = 3; // qwoyn + uint64 vesting_duration = 4; // 1 year in seconds + uint64 deposit_end_time = 5; + string init_liquidity_price = 6 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // price without considering decimal + string discount = 7 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // discount from initial liquidity price + bool liquidity_bootstrapping = 8; // broadcasted ICA tx to bootstrap Osmosis LP + bool liquidity_bootstrapped = 9; // set as true once Osmosis liquidity created + string ica_connection_id = 10; +} +``` + +Aquifer module's state is managed as params it is governed by governance. + +- `maintainer` is the maintainer of module to manage deposit end time, remaining QWOYN tokens after deposit period, sending signal to setup ICA, transfer of funds to Osmosis, and send ICA message for liquidity bootstrap. +- `deposit_token` is the token to be raised through the discounted price offering +- `allocation_token` is the token that is allocated in vesting +- `vesting_duration` is the vesting duration of token +- `deposit_end_time` is the time where the deposit period ends +- `init_liquidity_price` is the price for initial liquidity providing on Osmosis +- `discount` is the discount from initial liquidity price for vesting +- `liquidity_bootstrapping` is true when osmosis LP bootstrap ICA transaction is broadcasted and not received finalization message +- `liquidity_bootstrapped` is true when osmosis LP bootstrap ICA transaction has received acknowledgement packet +- `ica_connection_id` is connection id with Osmosis for ICA account used for liquidity bootstrap diff --git a/x/aquifer/spec/02_messages.md b/x/aquifer/spec/02_messages.md new file mode 100644 index 0000000..c2f8f9c --- /dev/null +++ b/x/aquifer/spec/02_messages.md @@ -0,0 +1,130 @@ +# Messages + +In this section we describe the processing of the aquifer module messages and the corresponding updates to the state. + +## MsgPutAllocationToken + +`MsgPutAllocationToken` is a message to put the token to be purchased on the pool. + +```protobuf +message MsgPutAllocationToken { + string sender = 1; + cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.nullable) = false ]; +} +``` + +Steps: + +1. Ensure `msg.Amount.Denom` is correct allocation denom +2. Send tokens from `msg.Sender` to module account +3. Emit `EventPutAllocationToken` event + +## MsgTakeOutAllocationToken + +`MsgTakeOutAllocationToken` is a message to take out remaining tokens from the module after deposit end time. + +```protobuf +message MsgTakeOutAllocationToken { + string sender = 1; + cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.nullable) = false ]; +} +``` + +Steps: + +1. Ensure `msg.Amount.Denom` is correct allocation denom +2. Ensure `msg.Sender` is module maintainer +3. Ensure deposit end time reached +4. Send tokens from module account to `msg.Sender` +5. Emit `EventTakeOutAllocationToken` event + +## MsgBuyAllocationToken + +`MsgBuyAllocationToken` is a message to allocate vesting for allocation token when the account put deposit token. + +```protobuf +message MsgBuyAllocationToken { + string sender = 1; + cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.nullable) = false ]; +} +``` + +Steps: + +1. Ensure `msg.Amount.Denom` is correct deposit denom +2. Ensure deposit end time not reached +3. Send deposit token from `msg.Sender` to module account. +4. Ensure the message is sent from `BaseAccount` type +5. Allocate vesting based on initial liquidity, discount and vesting duration +6. Emit `EventBuyAllocationToken` event + +## MsgSetDepositEndTime + +`MsgSetDepositEndTime` is a message to set deposit end time by maintainer. + +```protobuf +message MsgSetDepositEndTime { + string sender = 1; + uint64 end_time = 2; +} +``` + +Steps: + +1. Ensure `msg.Sender` is maintainer +2. Set deposit end time +3. Emit `EventSetDepositEndTime` event + +## MsgInitICA + +`MsgInitICA` is a message to initiate ICA account for Osmosis liquidity bootstrap. + +```protobuf +message MsgInitICA { + string sender = 1; + string connection_id = 2; +} +``` + +Steps: + +1. Ensure `msg.Sender` is maintainer +2. Set connection id on params +3. Call `RegisterInterchainAccount` through ICA controller keeper as aquifer module as admin + +## MsgExecTransfer + +`MsgExecTransfer` is a message to IBC transfer deposit tokens to Osmosis ICA account. + +```protobuf +message MsgExecTransfer { + string sender = 1; + uint64 timeout_nano_second = 2; + string transfer_channel_id = 3; +} +``` + +Steps: + +1. Ensure `msg.Sender` is maintainer +2. Get ICA address to receive deposit token +3. Execute IBC transfer with `msg.TransferChannelId`, module account deposit token balance and `msg.TimeoutNanoSecond` + +## MsgExecAddLiquidity + +`MsgExecAddLiquidity` is the message to create a new pool on Osmosis with ICA account + +```protobuf +message MsgExecAddLiquidity { + string sender = 1; + bytes msg = 2 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/cosmic-horizon/qwoyn/osmosis/balancer.MsgCreateBalancerPool" + ]; +} +``` + +1. Ensure `msg.Sender` is maintainer +2. Get ICA address to execute pool creation +3. Compose ICA message for create pool +4. Execute ICA transaction through `SendTx` interface of ICA controller keeper diff --git a/x/aquifer/spec/03_events.md b/x/aquifer/spec/03_events.md new file mode 100644 index 0000000..b47f432 --- /dev/null +++ b/x/aquifer/spec/03_events.md @@ -0,0 +1,52 @@ +# Events + +The aquifer module emits the following events: + +### MsgPutAllocationToken + +| Type | Attribute Key | Attribute Value | +| --------------------------------------------------- | ------------- | -------------------------------------------------- | +| message | action | /cosmichorizon.qwoyn.aquifer.MsgPutAllocationToken | +| cosmichorizon.qwoyn.aquifer.EventPutAllocationToken | sender | {sender} | +| cosmichorizon.qwoyn.aquifer.EventPutAllocationToken | amount | {amount} | + +## MsgTakeOutAllocationToken + +| Type | Attribute Key | Attribute Value | +| ------------------------------------------------------- | ------------- | ------------------------------------------------------ | +| message | action | /cosmichorizon.qwoyn.aquifer.MsgTakeOutAllocationToken | +| cosmichorizon.qwoyn.aquifer.EventTakeOutAllocationToken | sender | {sender} | +| cosmichorizon.qwoyn.aquifer.EventTakeOutAllocationToken | amount | {amount} | + +## MsgBuyAllocationToken + +| Type | Attribute Key | Attribute Value | +| --------------------------------------------------- | ------------- | -------------------------------------------------- | +| message | action | /cosmichorizon.qwoyn.aquifer.MsgBuyAllocationToken | +| cosmichorizon.qwoyn.aquifer.EventBuyAllocationToken | sender | {sender} | +| cosmichorizon.qwoyn.aquifer.EventBuyAllocationToken | amount | {amount} | + +## MsgSetDepositEndTime + +| Type | Attribute Key | Attribute Value | +| -------------------------------------------------- | ------------- | ------------------------------------------------- | +| message | action | /cosmichorizon.qwoyn.aquifer.MsgSetDepositEndTime | +| cosmichorizon.qwoyn.aquifer.EventSetDepositEndTime | time | {time} | + +## MsgInitICA + +| Type | Attribute Key | Attribute Value | +| ------- | ------------- | --------------------------------------- | +| message | action | /cosmichorizon.qwoyn.aquifer.MsgInitICA | + +## MsgExecTransfer + +| Type | Attribute Key | Attribute Value | +| ------- | ------------- | -------------------------------------------- | +| message | action | /cosmichorizon.qwoyn.aquifer.MsgExecTransfer | + +## MsgExecAddLiquidity + +| Type | Attribute Key | Attribute Value | +| ------- | ------------- | ------------------------------------------------ | +| message | action | /cosmichorizon.qwoyn.aquifer.MsgExecAddLiquidity | diff --git a/x/aquifer/spec/04_cli_examples.md b/x/aquifer/spec/04_cli_examples.md new file mode 100644 index 0000000..74ce74f --- /dev/null +++ b/x/aquifer/spec/04_cli_examples.md @@ -0,0 +1,27 @@ +# CLI examples for aquifer + +```sh +qwoynd tx aquifer put-allocation-token 100000000uqwoyn --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block +qwoynd tx aquifer set-deposit-endtime $(($(date -u +%s) + 300)) --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block +qwoynd tx aquifer buy-allocation-token 100000000stake --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block +qwoynd tx aquifer buy-allocation-token 200000$IBC_OSMO --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block +qwoynd tx aquifer init-ica connection-1 --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block + +qwoynd query intertx ica aquifer connection-1 +qwoynd query aquifer params +qwoynd tx aquifer exec-transfer channel-0 60000000000 --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block +qwoynd tx aquifer exec-add-liquidity --pool-file="pool.json" --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block +osmosisd query gamm pools --node=http://localhost:16657 +``` + +pool.json + +```json +{ + "weights": "5ibc/D67FFE08041F9BD3378C0003A785C90577F4DD2AED6713C78680D663FA9CAEE2,5stake", + "initial-deposit": "1000ibc/D67FFE08041F9BD3378C0003A785C90577F4DD2AED6713C78680D663FA9CAEE2,1000stake", + "swap-fee": "0.01", + "exit-fee": "0.01", + "future-governor": "168h" +} +``` diff --git a/x/aquifer/spec/05_execution_flow.md b/x/aquifer/spec/05_execution_flow.md new file mode 100644 index 0000000..5541c17 --- /dev/null +++ b/x/aquifer/spec/05_execution_flow.md @@ -0,0 +1,12 @@ +# Execution flow + +1. Maintainer deposit QWOYN token - it's configured on params to put only uqwoyn +2. Maintainer set deposit end date (params) - can be set by gov as well +3. Users swap USDC into vested QWOYN token (vesting duration set on params) +4. Maintainer initiate ICA account +5. Maintainer initiate USDC token transfer to ICA account +6. Maintainer transfer QWOYN token to ICA account via IBC transfer +7. Maintainer transfer OSMO tokens to be used as fee to ICA account for pool creation e.g. 100 OSMO +8. Maintainer initiate USDC/QWOYN liquidity pool creation on Osmosis at predetermined price (USDC/QWOYN pool) + +Here USDC should be the denom directly transferred from Osmosis network, not USDC received from other network e.g. Axelar. diff --git a/x/aquifer/spec/README.md b/x/aquifer/spec/README.md new file mode 100644 index 0000000..6c21ca5 --- /dev/null +++ b/x/aquifer/spec/README.md @@ -0,0 +1,12 @@ +# Aquifer module + +The Qwoyn Aquifer is a revolutionary liquidity bootstrapping tool designed by Qwoyn. This decentralized method utilizes completely on-chain methods to create a liquidity pool for a new token. The Aquifer represents the source of liquidity for this new token, providing a steady flow of liquidity to support its growth. By utilizing The Qwoyn Aquifer, token creators can launch their projects with confidence, knowing that they have access to a reliable and sustainable source of liquidity. The Qwoyn Aquifer is a game-changer for the DeFi space, offering a secure and efficient way to launch new tokens and create a thriving ecosystem. +"Aquifer" - This name is a play on the word "aquarium," which represents a contained ecosystem. In this case, the ecosystem is the liquidity pool, which is created by your module. + +## Contents + +1. **[State](01_state.md)** +2. **[Messages](02_messages.md)** +3. **[Events](03_events.md)** +4. **[Client](04_cli_examples.md)** +5. **[Flow](05_execution_flow.md)** diff --git a/x/aquifer/types/codec.go b/x/aquifer/types/codec.go new file mode 100644 index 0000000..76b4010 --- /dev/null +++ b/x/aquifer/types/codec.go @@ -0,0 +1,39 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +// RegisterLegacyAminoCodec registers the necessary x/distribution interfaces and concrete types +// on the provided LegacyAmino codec. These types are used for Amino JSON serialization. +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { +} + +func RegisterInterfaces(registry types.InterfaceRegistry) { + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgPutAllocationToken{}, + &MsgTakeOutAllocationToken{}, + &MsgBuyAllocationToken{}, + &MsgSetDepositEndTime{}, + &MsgInitICA{}, + &MsgExecAddLiquidity{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} + +var ( + amino = codec.NewLegacyAmino() + ModuleCdc = codec.NewAminoCodec(amino) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + sdk.RegisterLegacyAminoCodec(amino) +} diff --git a/x/aquifer/types/errors.go b/x/aquifer/types/errors.go new file mode 100644 index 0000000..e09af08 --- /dev/null +++ b/x/aquifer/types/errors.go @@ -0,0 +1,15 @@ +package types + +// DONTCOVER + +import ( + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// x/aquifer module sentinel errors +var ( + ErrNotBaseAccount = sdkerrors.Register(ModuleName, 1, "account type should be base account") + ErrDepositTimeEnded = sdkerrors.Register(ModuleName, 2, "deposit time ended") + ErrDepositTimeNotEnded = sdkerrors.Register(ModuleName, 3, "deposit time not ended") + ErrNotMaintainer = sdkerrors.Register(ModuleName, 4, "not a maintainer") +) diff --git a/x/aquifer/types/expected_keepers.go b/x/aquifer/types/expected_keepers.go new file mode 100644 index 0000000..55e242b --- /dev/null +++ b/x/aquifer/types/expected_keepers.go @@ -0,0 +1,35 @@ +package types + +import ( + gametypes "github.com/cosmic-horizon/qwoyn/x/game/types" + minttypes "github.com/cosmic-horizon/qwoyn/x/mint/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +// AccountKeeper defines the expected account keeper +type AccountKeeper interface { + GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI + GetModuleAddress(moduleName string) sdk.AccAddress + SetAccount(ctx sdk.Context, acc types.AccountI) +} + +// BankKeeper defines the expected bank keeper +type BankKeeper interface { + SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin + SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error + SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error +} + +// BankKeeper defines the expected game keeper +type GameKeeper interface { + GetParamSet(ctx sdk.Context) gametypes.Params + SwapFromModule(ctx sdk.Context, moduleName string, amount sdk.Coin) error +} + +// MintKeeper defines the expected mint keeper +type MintKeeper interface { + GetParams(ctx sdk.Context) minttypes.Params +} diff --git a/x/aquifer/types/genesis.go b/x/aquifer/types/genesis.go new file mode 100644 index 0000000..0785224 --- /dev/null +++ b/x/aquifer/types/genesis.go @@ -0,0 +1,17 @@ +package types + +// DefaultIndex is the default capability global index +const DefaultIndex uint64 = 1 + +// DefaultGenesis returns the default Capability genesis state +func DefaultGenesis() *GenesisState { + return &GenesisState{ + Params: DefaultParams(), + } +} + +// Validate performs basic genesis state validation returning an error upon any +// failure. +func (gs GenesisState) Validate() error { + return gs.Params.Validate() +} diff --git a/x/aquifer/types/genesis.pb.go b/x/aquifer/types/genesis.pb.go new file mode 100644 index 0000000..e7ecfd7 --- /dev/null +++ b/x/aquifer/types/genesis.pb.go @@ -0,0 +1,321 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: aquifer/genesis.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 + +// GenesisState defines the aquifer module's genesis state. +type GenesisState struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +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_a9602667c7491cda, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "cosmichorizon.qwoyn.aquifer.GenesisState") +} + +func init() { proto.RegisterFile("aquifer/genesis.proto", fileDescriptor_a9602667c7491cda) } + +var fileDescriptor_a9602667c7491cda = []byte{ + // 202 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4d, 0x2c, 0x2c, 0xcd, + 0x4c, 0x4b, 0x2d, 0xd2, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x92, 0x4e, 0xce, 0x2f, 0xce, 0xcd, 0x4c, 0xce, 0xc8, 0x2f, 0xca, 0xac, 0xca, 0xcf, + 0xd3, 0x2b, 0x2c, 0xcf, 0xaf, 0xcc, 0xd3, 0x83, 0x2a, 0x95, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, + 0xab, 0xd3, 0x07, 0xb1, 0x20, 0x5a, 0xa4, 0x44, 0x60, 0x26, 0x15, 0x24, 0x16, 0x25, 0xe6, 0x42, + 0x0d, 0x52, 0x0a, 0xe4, 0xe2, 0x71, 0x87, 0x98, 0x1c, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0xe4, 0xc8, + 0xc5, 0x06, 0x91, 0x97, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x52, 0xd6, 0xc3, 0x63, 0x93, 0x5e, + 0x00, 0x58, 0xa9, 0x13, 0xcb, 0x89, 0x7b, 0xf2, 0x0c, 0x41, 0x50, 0x8d, 0x4e, 0x9e, 0x27, 0x1e, + 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, + 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x9f, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, + 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0x31, 0x56, 0x17, 0x6a, 0xae, 0x3e, 0xd8, 0x5c, 0xfd, 0x0a, 0x7d, + 0x98, 0x23, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x8e, 0x34, 0x06, 0x04, 0x00, 0x00, + 0xff, 0xff, 0x38, 0xae, 0x08, 0x82, 0x06, 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, 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)) + 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 + 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/aquifer/types/genesis_test.go b/x/aquifer/types/genesis_test.go new file mode 100644 index 0000000..1ee2545 --- /dev/null +++ b/x/aquifer/types/genesis_test.go @@ -0,0 +1,31 @@ +package types_test + +import ( + "testing" + + "github.com/cosmic-horizon/qwoyn/x/aquifer/types" + "github.com/stretchr/testify/require" +) + +func TestGenesisState_Validate(t *testing.T) { + for _, tc := range []struct { + desc string + genState *types.GenesisState + valid bool + }{ + { + desc: "default is valid", + genState: types.DefaultGenesis(), + valid: true, + }, + } { + t.Run(tc.desc, func(t *testing.T) { + err := tc.genState.Validate() + if tc.valid { + require.NoError(t, err) + } else { + require.Error(t, err) + } + }) + } +} diff --git a/x/aquifer/types/keys.go b/x/aquifer/types/keys.go new file mode 100644 index 0000000..64acece --- /dev/null +++ b/x/aquifer/types/keys.go @@ -0,0 +1,19 @@ +package types + +const ( + // ModuleName defines the module name + ModuleName = "aquifer" + + // StoreKey defines the primary module store key + StoreKey = ModuleName + + // RouterKey is the message route for slashing + RouterKey = ModuleName + + // QuerierRoute defines the module's query routing key + QuerierRoute = ModuleName +) + +func KeyPrefix(p string) []byte { + return []byte(p) +} diff --git a/x/aquifer/types/msgs.go b/x/aquifer/types/msgs.go new file mode 100644 index 0000000..a40dc94 --- /dev/null +++ b/x/aquifer/types/msgs.go @@ -0,0 +1,200 @@ +package types + +import ( + "github.com/cosmic-horizon/qwoyn/osmosis/balancer" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgPutAllocationToken{} + +func NewMsgPutAllocationToken(sender sdk.AccAddress, coin sdk.Coin, +) *MsgPutAllocationToken { + return &MsgPutAllocationToken{ + Sender: sender.String(), + Amount: coin, + } +} + +func (msg MsgPutAllocationToken) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address (%s)", err) + } + + return nil +} + +// GetSigners Implements Msg. +func (msg MsgPutAllocationToken) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +var _ sdk.Msg = &MsgTakeOutAllocationToken{} + +func NewMsgTakeOutAllocationToken(sender sdk.AccAddress, coin sdk.Coin, +) *MsgTakeOutAllocationToken { + return &MsgTakeOutAllocationToken{ + Sender: sender.String(), + Amount: coin, + } +} + +func (msg MsgTakeOutAllocationToken) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address (%s)", err) + } + + return nil +} + +// GetSigners Implements Msg. +func (msg MsgTakeOutAllocationToken) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +var _ sdk.Msg = &MsgBuyAllocationToken{} + +func NewMsgBuyAllocationToken(sender sdk.AccAddress, coin sdk.Coin, +) *MsgBuyAllocationToken { + return &MsgBuyAllocationToken{ + Sender: sender.String(), + Amount: coin, + } +} + +func (msg MsgBuyAllocationToken) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address (%s)", err) + } + + return nil +} + +// GetSigners Implements Msg. +func (msg MsgBuyAllocationToken) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +var _ sdk.Msg = &MsgSetDepositEndTime{} + +func NewMsgSetDepositEndTime(sender sdk.AccAddress, endTime uint64) *MsgSetDepositEndTime { + return &MsgSetDepositEndTime{ + Sender: sender.String(), + EndTime: endTime, + } +} + +func (msg MsgSetDepositEndTime) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address (%s)", err) + } + + return nil +} + +// GetSigners Implements Msg. +func (msg MsgSetDepositEndTime) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +var _ sdk.Msg = &MsgInitICA{} + +func NewMsgInitICA(sender sdk.AccAddress, connectionId string) *MsgInitICA { + return &MsgInitICA{ + Sender: sender.String(), + ConnectionId: connectionId, + } +} + +func (msg MsgInitICA) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address (%s)", err) + } + + return nil +} + +// GetSigners Implements Msg. +func (msg MsgInitICA) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +var _ sdk.Msg = &MsgExecTransfer{} + +func NewMsgExecTransfer(sender sdk.AccAddress, channelId string, timeoutNanoSecond uint64) *MsgExecTransfer { + return &MsgExecTransfer{ + Sender: sender.String(), + TransferChannelId: channelId, + TimeoutNanoSecond: timeoutNanoSecond, + } +} + +func (msg MsgExecTransfer) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address (%s)", err) + } + + return nil +} + +// GetSigners Implements Msg. +func (msg MsgExecTransfer) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} + +var _ sdk.Msg = &MsgExecAddLiquidity{} + +func NewMsgExecAddLiquidity(sender sdk.AccAddress, msg balancer.MsgCreateBalancerPool) *MsgExecAddLiquidity { + return &MsgExecAddLiquidity{ + Sender: sender.String(), + Msg: msg, + } +} + +func (msg MsgExecAddLiquidity) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address (%s)", err) + } + + return nil +} + +// GetSigners Implements Msg. +func (msg MsgExecAddLiquidity) GetSigners() []sdk.AccAddress { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + panic(err) + } + return []sdk.AccAddress{sender} +} diff --git a/x/aquifer/types/params.go b/x/aquifer/types/params.go new file mode 100644 index 0000000..366e7a7 --- /dev/null +++ b/x/aquifer/types/params.go @@ -0,0 +1,223 @@ +package types + +import ( + fmt "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + "gopkg.in/yaml.v2" +) + +var ( + KeyMaintainer = []byte("Maintainer") + KeyDepositToken = []byte("DepositToken") + KeyAllocationToken = []byte("AllocationToken") + KeyVestingDuration = []byte("VestingDuration") + KeyDepositEndTime = []byte("DepositEndTime") + KeyInitLiquidityPrice = []byte("InitLiquidityPrice") + KeyDiscount = []byte("Discount") + KeyLiquidityBootstrapping = []byte("LiquidityBootstrapping") + KeyLiquidityBootstrapped = []byte("LiquidityBootstrapped") + KeyIcsAccount = []byte("IcsAccount") +) + +var _ paramtypes.ParamSet = (*Params)(nil) + +// ParamKeyTable the param key table for launch module +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +// NewParams creates a new Params instance +func NewParams( + maintainer string, + depositToken string, + allocationToken string, + vestingDuraiton uint64, + depositEndTime uint64, + initLiquidityPrice sdk.Dec, + discount sdk.Dec, + liquidityBootstrapping bool, + liquidityBootstrapped bool, + icaConnectionId string, +) Params { + return Params{ + Maintainer: maintainer, + DepositToken: depositToken, + AllocationToken: allocationToken, + VestingDuration: vestingDuraiton, + DepositEndTime: depositEndTime, + InitLiquidityPrice: initLiquidityPrice, + Discount: discount, + LiquidityBootstrapping: liquidityBootstrapping, + LiquidityBootstrapped: liquidityBootstrapped, + IcaConnectionId: icaConnectionId, + } +} + +// DefaultParams returns a default set of parameters +func DefaultParams() Params { + return NewParams("", "ibc/C053D637CCA2A2BA030E2C5EE1B28A16F71CCB0E45E8BE52766DC1B241B77878", "uqwoyn", 86400*360, 1679578470, sdk.OneDec(), sdk.NewDecWithPrec(1, 1), false, false, "") + // return NewParams("", "stake", "uqwoyn", 86400*360, 1679578470, sdk.OneDec(), sdk.NewDecWithPrec(1, 1), false, false, "") +} + +// ParamSetPairs get the params.ParamSet +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair(KeyMaintainer, &p.Maintainer, validateMaintainer), + paramtypes.NewParamSetPair(KeyDepositToken, &p.DepositToken, validateDenom), + paramtypes.NewParamSetPair(KeyAllocationToken, &p.AllocationToken, validateDenom), + paramtypes.NewParamSetPair(KeyVestingDuration, &p.VestingDuration, validateVestingDuration), + paramtypes.NewParamSetPair(KeyDepositEndTime, &p.DepositEndTime, validateDepositEndTime), + paramtypes.NewParamSetPair(KeyInitLiquidityPrice, &p.InitLiquidityPrice, validateInitialLiquidityPrice), + paramtypes.NewParamSetPair(KeyDiscount, &p.Discount, validateDiscount), + paramtypes.NewParamSetPair(KeyLiquidityBootstrapping, &p.LiquidityBootstrapping, validateBool), + paramtypes.NewParamSetPair(KeyLiquidityBootstrapped, &p.LiquidityBootstrapped, validateBool), + paramtypes.NewParamSetPair(KeyIcsAccount, &p.IcaConnectionId, validateIcaConnectionId), + } +} + +// Validate validates the set of params +func (p Params) Validate() error { + if err := validateMaintainer(p.Maintainer); err != nil { + return err + } + + if err := validateDenom(p.DepositToken); err != nil { + return err + } + + if err := validateDenom(p.AllocationToken); err != nil { + return err + } + + if err := validateVestingDuration(p.VestingDuration); err != nil { + return err + } + + if err := validateDepositEndTime(p.DepositEndTime); err != nil { + return err + } + + if err := validateDiscount(p.Discount); err != nil { + return err + } + + if err := validateInitialLiquidityPrice(p.InitLiquidityPrice); err != nil { + return err + } + + if err := validateBool(p.LiquidityBootstrapping); err != nil { + return err + } + + if err := validateBool(p.LiquidityBootstrapped); err != nil { + return err + } + + if err := validateIcaConnectionId(p.IcaConnectionId); err != nil { + return err + } + + return nil +} + +// String implements the Stringer interface. +func (p Params) String() string { + out, _ := yaml.Marshal(p) + return string(out) +} + +func validateMaintainer(i interface{}) error { + _, ok := i.(string) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + return nil +} + +func validateDenom(i interface{}) error { + v, ok := i.(string) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if err := sdk.ValidateDenom(v); err != nil { + return err + } + + return nil +} + +func validateVestingDuration(i interface{}) error { + v, ok := i.(uint64) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v == 0 { + return fmt.Errorf("vesting duration should be positive") + } + return nil +} + +func validateDepositEndTime(i interface{}) error { + v, ok := i.(uint64) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v == 0 { + return fmt.Errorf("deposit end time should be positive") + } + return nil +} + +func validateInitialLiquidityPrice(i interface{}) error { + v, ok := i.(sdk.Dec) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if !v.IsPositive() { + return fmt.Errorf("initial liquidity price should be positive") + } + + return nil +} + +func validateDiscount(i interface{}) error { + v, ok := i.(sdk.Dec) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if !v.IsPositive() { + return fmt.Errorf("discount should not be negative") + } + + if v.GTE(sdk.OneDec()) { + return fmt.Errorf("discount should not be more than 100%%") + } + + return nil +} + +func validateBool(i interface{}) error { + _, ok := i.(bool) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + return nil +} + +func validateIcaConnectionId(i interface{}) error { + _, ok := i.(string) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + return nil +} diff --git a/x/aquifer/types/params.pb.go b/x/aquifer/types/params.pb.go new file mode 100644 index 0000000..8b710c5 --- /dev/null +++ b/x/aquifer/types/params.pb.go @@ -0,0 +1,733 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: aquifer/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 { + Maintainer string `protobuf:"bytes,1,opt,name=maintainer,proto3" json:"maintainer,omitempty"` + DepositToken string `protobuf:"bytes,2,opt,name=deposit_token,json=depositToken,proto3" json:"deposit_token,omitempty"` + AllocationToken string `protobuf:"bytes,3,opt,name=allocation_token,json=allocationToken,proto3" json:"allocation_token,omitempty"` + VestingDuration uint64 `protobuf:"varint,4,opt,name=vesting_duration,json=vestingDuration,proto3" json:"vesting_duration,omitempty"` + DepositEndTime uint64 `protobuf:"varint,5,opt,name=deposit_end_time,json=depositEndTime,proto3" json:"deposit_end_time,omitempty"` + InitLiquidityPrice github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=init_liquidity_price,json=initLiquidityPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"init_liquidity_price"` + Discount github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=discount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"discount"` + LiquidityBootstrapping bool `protobuf:"varint,8,opt,name=liquidity_bootstrapping,json=liquidityBootstrapping,proto3" json:"liquidity_bootstrapping,omitempty"` + LiquidityBootstrapped bool `protobuf:"varint,9,opt,name=liquidity_bootstrapped,json=liquidityBootstrapped,proto3" json:"liquidity_bootstrapped,omitempty"` + IcaConnectionId string `protobuf:"bytes,10,opt,name=ica_connection_id,json=icaConnectionId,proto3" json:"ica_connection_id,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_587cd22d4fba9cdf, []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) GetMaintainer() string { + if m != nil { + return m.Maintainer + } + return "" +} + +func (m *Params) GetDepositToken() string { + if m != nil { + return m.DepositToken + } + return "" +} + +func (m *Params) GetAllocationToken() string { + if m != nil { + return m.AllocationToken + } + return "" +} + +func (m *Params) GetVestingDuration() uint64 { + if m != nil { + return m.VestingDuration + } + return 0 +} + +func (m *Params) GetDepositEndTime() uint64 { + if m != nil { + return m.DepositEndTime + } + return 0 +} + +func (m *Params) GetLiquidityBootstrapping() bool { + if m != nil { + return m.LiquidityBootstrapping + } + return false +} + +func (m *Params) GetLiquidityBootstrapped() bool { + if m != nil { + return m.LiquidityBootstrapped + } + return false +} + +func (m *Params) GetIcaConnectionId() string { + if m != nil { + return m.IcaConnectionId + } + return "" +} + +func init() { + proto.RegisterType((*Params)(nil), "cosmichorizon.qwoyn.aquifer.Params") +} + +func init() { proto.RegisterFile("aquifer/params.proto", fileDescriptor_587cd22d4fba9cdf) } + +var fileDescriptor_587cd22d4fba9cdf = []byte{ + // 434 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xc1, 0x6f, 0xd3, 0x30, + 0x14, 0xc6, 0x13, 0x28, 0xa5, 0xb3, 0x80, 0x0d, 0xab, 0x0c, 0x0b, 0xa4, 0xb4, 0x02, 0x09, 0x15, + 0xa4, 0x25, 0x07, 0x84, 0x90, 0x38, 0x96, 0x71, 0x18, 0xe2, 0x30, 0x55, 0x3b, 0x71, 0x09, 0xae, + 0x6d, 0xb2, 0xa7, 0x35, 0x7e, 0xa9, 0xed, 0x00, 0xe5, 0xaf, 0xe0, 0xc8, 0x05, 0x89, 0x3f, 0x67, + 0xc7, 0x1d, 0x11, 0x87, 0x09, 0xb5, 0xff, 0x08, 0x8a, 0xe7, 0x66, 0x13, 0xea, 0x89, 0x53, 0xa2, + 0xdf, 0xfb, 0xbe, 0x2f, 0x76, 0xde, 0x47, 0xfa, 0x7c, 0x5e, 0xc3, 0x47, 0x65, 0xb2, 0x8a, 0x1b, + 0x5e, 0xda, 0xb4, 0x32, 0xe8, 0x90, 0x3e, 0x14, 0x68, 0x4b, 0x10, 0xc7, 0x68, 0xe0, 0x2b, 0xea, + 0x74, 0xfe, 0x19, 0x17, 0x3a, 0x0d, 0xca, 0x07, 0xfd, 0x02, 0x0b, 0xf4, 0xba, 0xac, 0x79, 0xbb, + 0xb0, 0x3c, 0xfa, 0xd1, 0x21, 0xdd, 0x43, 0x9f, 0x41, 0x13, 0x42, 0x4a, 0x0e, 0xda, 0x71, 0xd0, + 0xca, 0xb0, 0x78, 0x18, 0x8f, 0xb6, 0x26, 0x57, 0x08, 0x7d, 0x4c, 0x6e, 0x4b, 0x55, 0xa1, 0x05, + 0x97, 0x3b, 0x3c, 0x51, 0x9a, 0x5d, 0xf3, 0x92, 0x5b, 0x01, 0x1e, 0x35, 0x8c, 0x3e, 0x25, 0x3b, + 0x7c, 0x36, 0x43, 0xc1, 0x1d, 0xa0, 0x0e, 0xba, 0xeb, 0x5e, 0xb7, 0x7d, 0xc9, 0x5b, 0xe9, 0x27, + 0x65, 0x1d, 0xe8, 0x22, 0x97, 0xb5, 0xf1, 0x03, 0xd6, 0x19, 0xc6, 0xa3, 0xce, 0x64, 0x3b, 0xf0, + 0xfd, 0x80, 0xe9, 0x88, 0xec, 0xac, 0x3f, 0xad, 0xb4, 0xcc, 0x1d, 0x94, 0x8a, 0xdd, 0xf0, 0xd2, + 0x3b, 0x81, 0xbf, 0xd1, 0xf2, 0x08, 0x4a, 0x45, 0x3f, 0x90, 0x3e, 0x68, 0x70, 0xf9, 0x0c, 0xe6, + 0x35, 0x48, 0x70, 0x8b, 0xbc, 0x32, 0x20, 0x14, 0xeb, 0x36, 0x67, 0x18, 0xa7, 0xa7, 0xe7, 0x83, + 0xe8, 0xf7, 0xf9, 0xe0, 0x49, 0x01, 0xee, 0xb8, 0x9e, 0xa6, 0x02, 0xcb, 0xac, 0xf9, 0x67, 0x68, + 0xc3, 0x63, 0xcf, 0xca, 0x93, 0xcc, 0x2d, 0x2a, 0x65, 0xd3, 0x7d, 0x25, 0x26, 0xb4, 0xc9, 0x7a, + 0xb7, 0x8e, 0x3a, 0x6c, 0x92, 0xe8, 0x5b, 0xd2, 0x93, 0x60, 0x05, 0xd6, 0xda, 0xb1, 0x9b, 0xff, + 0x95, 0xda, 0xfa, 0xe9, 0x4b, 0x72, 0xff, 0xf2, 0xa0, 0x53, 0x44, 0x67, 0x9d, 0xe1, 0x55, 0x05, + 0xba, 0x60, 0xbd, 0x61, 0x3c, 0xea, 0x4d, 0x76, 0xdb, 0xf1, 0xf8, 0xea, 0x94, 0xbe, 0x20, 0xbb, + 0x9b, 0x8c, 0x4a, 0xb2, 0x2d, 0xef, 0xbb, 0xb7, 0xc1, 0xa7, 0x24, 0x7d, 0x46, 0xee, 0x82, 0xe0, + 0xb9, 0x40, 0xad, 0x95, 0xf0, 0x1b, 0x02, 0xc9, 0xc8, 0xc5, 0x7a, 0x40, 0xf0, 0xd7, 0x2d, 0x3f, + 0x90, 0xaf, 0x3a, 0xdf, 0x7f, 0x0e, 0xa2, 0xf1, 0xc1, 0xe9, 0x32, 0x89, 0xcf, 0x96, 0x49, 0xfc, + 0x67, 0x99, 0xc4, 0xdf, 0x56, 0x49, 0x74, 0xb6, 0x4a, 0xa2, 0x5f, 0xab, 0x24, 0x7a, 0x9f, 0xfd, + 0x73, 0x5b, 0x10, 0x7b, 0xa1, 0x78, 0x99, 0x2f, 0x5e, 0xf6, 0x25, 0x5b, 0x97, 0xd4, 0x5f, 0x7d, + 0xda, 0xf5, 0x8d, 0x7b, 0xfe, 0x37, 0x00, 0x00, 0xff, 0xff, 0x6b, 0x42, 0xa3, 0x29, 0xbc, 0x02, + 0x00, 0x00, +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.IcaConnectionId) > 0 { + i -= len(m.IcaConnectionId) + copy(dAtA[i:], m.IcaConnectionId) + i = encodeVarintParams(dAtA, i, uint64(len(m.IcaConnectionId))) + i-- + dAtA[i] = 0x52 + } + if m.LiquidityBootstrapped { + i-- + if m.LiquidityBootstrapped { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if m.LiquidityBootstrapping { + i-- + if m.LiquidityBootstrapping { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + { + size := m.Discount.Size() + i -= size + if _, err := m.Discount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.InitLiquidityPrice.Size() + i -= size + if _, err := m.InitLiquidityPrice.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + if m.DepositEndTime != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.DepositEndTime)) + i-- + dAtA[i] = 0x28 + } + if m.VestingDuration != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.VestingDuration)) + i-- + dAtA[i] = 0x20 + } + if len(m.AllocationToken) > 0 { + i -= len(m.AllocationToken) + copy(dAtA[i:], m.AllocationToken) + i = encodeVarintParams(dAtA, i, uint64(len(m.AllocationToken))) + i-- + dAtA[i] = 0x1a + } + if len(m.DepositToken) > 0 { + i -= len(m.DepositToken) + copy(dAtA[i:], m.DepositToken) + i = encodeVarintParams(dAtA, i, uint64(len(m.DepositToken))) + i-- + dAtA[i] = 0x12 + } + if len(m.Maintainer) > 0 { + i -= len(m.Maintainer) + copy(dAtA[i:], m.Maintainer) + i = encodeVarintParams(dAtA, i, uint64(len(m.Maintainer))) + i-- + dAtA[i] = 0xa + } + 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 + l = len(m.Maintainer) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } + l = len(m.DepositToken) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } + l = len(m.AllocationToken) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } + if m.VestingDuration != 0 { + n += 1 + sovParams(uint64(m.VestingDuration)) + } + if m.DepositEndTime != 0 { + n += 1 + sovParams(uint64(m.DepositEndTime)) + } + l = m.InitLiquidityPrice.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.Discount.Size() + n += 1 + l + sovParams(uint64(l)) + if m.LiquidityBootstrapping { + n += 2 + } + if m.LiquidityBootstrapped { + n += 2 + } + l = len(m.IcaConnectionId) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Maintainer", 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 + } + m.Maintainer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DepositToken", 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 + } + m.DepositToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllocationToken", 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 + } + m.AllocationToken = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VestingDuration", wireType) + } + m.VestingDuration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VestingDuration |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DepositEndTime", wireType) + } + m.DepositEndTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DepositEndTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitLiquidityPrice", 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.InitLiquidityPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Discount", 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.Discount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LiquidityBootstrapping", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.LiquidityBootstrapping = bool(v != 0) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LiquidityBootstrapped", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.LiquidityBootstrapped = bool(v != 0) + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IcaConnectionId", 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 + } + m.IcaConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/aquifer/types/query.pb.go b/x/aquifer/types/query.pb.go new file mode 100644 index 0000000..68faaca --- /dev/null +++ b/x/aquifer/types/query.pb.go @@ -0,0 +1,538 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: aquifer/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/query" + _ "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 + +// QueryParamsRequest is request type for the Query/Params RPC method. +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_f2a450d9503daabf, []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 + +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params holds all the parameters of this module. + 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_f2a450d9503daabf, []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{} +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "cosmichorizon.qwoyn.aquifer.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "cosmichorizon.qwoyn.aquifer.QueryParamsResponse") +} + +func init() { proto.RegisterFile("aquifer/query.proto", fileDescriptor_f2a450d9503daabf) } + +var fileDescriptor_f2a450d9503daabf = []byte{ + // 310 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x31, 0x4b, 0x33, 0x31, + 0x18, 0xc7, 0x2f, 0x2f, 0xaf, 0x1d, 0xce, 0xed, 0xda, 0x41, 0xaa, 0x9c, 0xd2, 0x22, 0x88, 0x62, + 0x1e, 0x5b, 0x3f, 0x81, 0xdd, 0xdc, 0xb4, 0x93, 0xb8, 0xe5, 0x4a, 0x4c, 0x03, 0x36, 0x4f, 0xee, + 0x92, 0x53, 0xeb, 0xe8, 0x27, 0x10, 0x5c, 0x9c, 0xfd, 0x34, 0x1d, 0x0b, 0x2e, 0x4e, 0x22, 0xad, + 0x1f, 0x44, 0x2e, 0x89, 0xc2, 0x21, 0x14, 0xb7, 0xf0, 0xe4, 0xff, 0xfb, 0xe5, 0x9f, 0x27, 0x6e, + 0xb2, 0xbc, 0x94, 0x57, 0xbc, 0x80, 0xbc, 0xe4, 0xc5, 0x94, 0xea, 0x02, 0x2d, 0x26, 0x9b, 0x23, + 0x34, 0x13, 0x39, 0x1a, 0x63, 0x21, 0xef, 0x51, 0xd1, 0xfc, 0x16, 0xa7, 0x8a, 0x86, 0x60, 0xbb, + 0x25, 0x50, 0xa0, 0xcb, 0x41, 0x75, 0xf2, 0x48, 0x7b, 0x4b, 0x20, 0x8a, 0x6b, 0x0e, 0x4c, 0x4b, + 0x60, 0x4a, 0xa1, 0x65, 0x56, 0xa2, 0x32, 0xe1, 0x76, 0xbf, 0x12, 0xa2, 0x81, 0x8c, 0x19, 0xee, + 0x5f, 0x82, 0x9b, 0x5e, 0xc6, 0x2d, 0xeb, 0x81, 0x66, 0x42, 0x2a, 0x17, 0x0e, 0xd9, 0xd6, 0x77, + 0x23, 0xcd, 0x0a, 0x36, 0x09, 0x86, 0x4e, 0x2b, 0x4e, 0xce, 0x2b, 0xee, 0xcc, 0x0d, 0x87, 0x3c, + 0x2f, 0xb9, 0xb1, 0x9d, 0x8b, 0xb8, 0x59, 0x9b, 0x1a, 0x8d, 0xca, 0xf0, 0xe4, 0x24, 0x6e, 0x78, + 0x78, 0x83, 0xec, 0x90, 0xbd, 0xf5, 0x7e, 0x97, 0xae, 0xf8, 0x10, 0xf5, 0xf0, 0xe0, 0xff, 0xec, + 0x7d, 0x3b, 0x1a, 0x06, 0xb0, 0xff, 0x42, 0xe2, 0x35, 0xa7, 0x4e, 0x9e, 0x49, 0xdc, 0xf0, 0x91, + 0x04, 0x56, 0x7a, 0x7e, 0xf7, 0x6b, 0x1f, 0xfd, 0x1d, 0xf0, 0xd5, 0x3b, 0x07, 0x0f, 0xaf, 0x9f, + 0x4f, 0xff, 0x76, 0x93, 0x2e, 0xd4, 0x48, 0x70, 0x24, 0xd4, 0x57, 0x33, 0x38, 0x9d, 0x2d, 0x52, + 0x32, 0x5f, 0xa4, 0xe4, 0x63, 0x91, 0x92, 0xc7, 0x65, 0x1a, 0xcd, 0x97, 0x69, 0xf4, 0xb6, 0x4c, + 0xa3, 0x4b, 0x10, 0xd2, 0x8e, 0xcb, 0x8c, 0x8e, 0x70, 0x12, 0x44, 0x87, 0x75, 0xd3, 0xdd, 0x8f, + 0xcb, 0x4e, 0x35, 0x37, 0x59, 0xc3, 0xad, 0xf9, 0xf8, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xac, 0x51, + 0xe9, 0x64, 0x10, 0x02, 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 { + // Parameters queries the parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/cosmichorizon.qwoyn.aquifer.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Parameters queries the parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_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).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmichorizon.qwoyn.aquifer.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmichorizon.qwoyn.aquifer.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "aquifer/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 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 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 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/aquifer/types/query.pb.gw.go b/x/aquifer/types/query.pb.gw.go new file mode 100644 index 0000000..3a76a63 --- /dev/null +++ b/x/aquifer/types/query.pb.gw.go @@ -0,0 +1,148 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: aquifer/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/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 + +func request_Query_Params_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.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_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.Params(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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_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.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_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_Params_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_Params_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_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmichorizon", "qwoyn", "aquifer", "params"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage +) diff --git a/x/aquifer/types/tx.pb.go b/x/aquifer/types/tx.pb.go new file mode 100644 index 0000000..670a5dc --- /dev/null +++ b/x/aquifer/types/tx.pb.go @@ -0,0 +1,3700 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: aquifer/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + github_com_cosmic_horizon_qwoyn_osmosis_balancer "github.com/cosmic-horizon/qwoyn/osmosis/balancer" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +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 MsgPutAllocationToken struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` +} + +func (m *MsgPutAllocationToken) Reset() { *m = MsgPutAllocationToken{} } +func (m *MsgPutAllocationToken) String() string { return proto.CompactTextString(m) } +func (*MsgPutAllocationToken) ProtoMessage() {} +func (*MsgPutAllocationToken) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{0} +} +func (m *MsgPutAllocationToken) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPutAllocationToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPutAllocationToken.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 *MsgPutAllocationToken) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPutAllocationToken.Merge(m, src) +} +func (m *MsgPutAllocationToken) XXX_Size() int { + return m.Size() +} +func (m *MsgPutAllocationToken) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPutAllocationToken.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPutAllocationToken proto.InternalMessageInfo + +func (m *MsgPutAllocationToken) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgPutAllocationToken) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +type MsgPutAllocationTokenResponse struct { +} + +func (m *MsgPutAllocationTokenResponse) Reset() { *m = MsgPutAllocationTokenResponse{} } +func (m *MsgPutAllocationTokenResponse) String() string { return proto.CompactTextString(m) } +func (*MsgPutAllocationTokenResponse) ProtoMessage() {} +func (*MsgPutAllocationTokenResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{1} +} +func (m *MsgPutAllocationTokenResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgPutAllocationTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgPutAllocationTokenResponse.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 *MsgPutAllocationTokenResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgPutAllocationTokenResponse.Merge(m, src) +} +func (m *MsgPutAllocationTokenResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgPutAllocationTokenResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgPutAllocationTokenResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgPutAllocationTokenResponse proto.InternalMessageInfo + +type MsgTakeOutAllocationToken struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` +} + +func (m *MsgTakeOutAllocationToken) Reset() { *m = MsgTakeOutAllocationToken{} } +func (m *MsgTakeOutAllocationToken) String() string { return proto.CompactTextString(m) } +func (*MsgTakeOutAllocationToken) ProtoMessage() {} +func (*MsgTakeOutAllocationToken) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{2} +} +func (m *MsgTakeOutAllocationToken) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgTakeOutAllocationToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgTakeOutAllocationToken.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 *MsgTakeOutAllocationToken) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTakeOutAllocationToken.Merge(m, src) +} +func (m *MsgTakeOutAllocationToken) XXX_Size() int { + return m.Size() +} +func (m *MsgTakeOutAllocationToken) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTakeOutAllocationToken.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgTakeOutAllocationToken proto.InternalMessageInfo + +func (m *MsgTakeOutAllocationToken) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgTakeOutAllocationToken) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +type MsgTakeOutAllocationTokenResponse struct { +} + +func (m *MsgTakeOutAllocationTokenResponse) Reset() { *m = MsgTakeOutAllocationTokenResponse{} } +func (m *MsgTakeOutAllocationTokenResponse) String() string { return proto.CompactTextString(m) } +func (*MsgTakeOutAllocationTokenResponse) ProtoMessage() {} +func (*MsgTakeOutAllocationTokenResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{3} +} +func (m *MsgTakeOutAllocationTokenResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgTakeOutAllocationTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgTakeOutAllocationTokenResponse.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 *MsgTakeOutAllocationTokenResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTakeOutAllocationTokenResponse.Merge(m, src) +} +func (m *MsgTakeOutAllocationTokenResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgTakeOutAllocationTokenResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTakeOutAllocationTokenResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgTakeOutAllocationTokenResponse proto.InternalMessageInfo + +type MsgBuyAllocationToken struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` +} + +func (m *MsgBuyAllocationToken) Reset() { *m = MsgBuyAllocationToken{} } +func (m *MsgBuyAllocationToken) String() string { return proto.CompactTextString(m) } +func (*MsgBuyAllocationToken) ProtoMessage() {} +func (*MsgBuyAllocationToken) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{4} +} +func (m *MsgBuyAllocationToken) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBuyAllocationToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBuyAllocationToken.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 *MsgBuyAllocationToken) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBuyAllocationToken.Merge(m, src) +} +func (m *MsgBuyAllocationToken) XXX_Size() int { + return m.Size() +} +func (m *MsgBuyAllocationToken) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBuyAllocationToken.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBuyAllocationToken proto.InternalMessageInfo + +func (m *MsgBuyAllocationToken) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgBuyAllocationToken) GetAmount() types.Coin { + if m != nil { + return m.Amount + } + return types.Coin{} +} + +type MsgBuyAllocationTokenResponse struct { +} + +func (m *MsgBuyAllocationTokenResponse) Reset() { *m = MsgBuyAllocationTokenResponse{} } +func (m *MsgBuyAllocationTokenResponse) String() string { return proto.CompactTextString(m) } +func (*MsgBuyAllocationTokenResponse) ProtoMessage() {} +func (*MsgBuyAllocationTokenResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{5} +} +func (m *MsgBuyAllocationTokenResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgBuyAllocationTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgBuyAllocationTokenResponse.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 *MsgBuyAllocationTokenResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgBuyAllocationTokenResponse.Merge(m, src) +} +func (m *MsgBuyAllocationTokenResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgBuyAllocationTokenResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgBuyAllocationTokenResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgBuyAllocationTokenResponse proto.InternalMessageInfo + +type MsgSetDepositEndTime struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + EndTime uint64 `protobuf:"varint,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` +} + +func (m *MsgSetDepositEndTime) Reset() { *m = MsgSetDepositEndTime{} } +func (m *MsgSetDepositEndTime) String() string { return proto.CompactTextString(m) } +func (*MsgSetDepositEndTime) ProtoMessage() {} +func (*MsgSetDepositEndTime) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{6} +} +func (m *MsgSetDepositEndTime) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSetDepositEndTime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSetDepositEndTime.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 *MsgSetDepositEndTime) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetDepositEndTime.Merge(m, src) +} +func (m *MsgSetDepositEndTime) XXX_Size() int { + return m.Size() +} +func (m *MsgSetDepositEndTime) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetDepositEndTime.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSetDepositEndTime proto.InternalMessageInfo + +func (m *MsgSetDepositEndTime) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgSetDepositEndTime) GetEndTime() uint64 { + if m != nil { + return m.EndTime + } + return 0 +} + +type MsgSetDepositEndTimeResponse struct { +} + +func (m *MsgSetDepositEndTimeResponse) Reset() { *m = MsgSetDepositEndTimeResponse{} } +func (m *MsgSetDepositEndTimeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSetDepositEndTimeResponse) ProtoMessage() {} +func (*MsgSetDepositEndTimeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{7} +} +func (m *MsgSetDepositEndTimeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSetDepositEndTimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSetDepositEndTimeResponse.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 *MsgSetDepositEndTimeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetDepositEndTimeResponse.Merge(m, src) +} +func (m *MsgSetDepositEndTimeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSetDepositEndTimeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetDepositEndTimeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSetDepositEndTimeResponse proto.InternalMessageInfo + +type MsgInitICA struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` +} + +func (m *MsgInitICA) Reset() { *m = MsgInitICA{} } +func (m *MsgInitICA) String() string { return proto.CompactTextString(m) } +func (*MsgInitICA) ProtoMessage() {} +func (*MsgInitICA) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{8} +} +func (m *MsgInitICA) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInitICA) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInitICA.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 *MsgInitICA) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInitICA.Merge(m, src) +} +func (m *MsgInitICA) XXX_Size() int { + return m.Size() +} +func (m *MsgInitICA) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInitICA.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInitICA proto.InternalMessageInfo + +func (m *MsgInitICA) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgInitICA) GetConnectionId() string { + if m != nil { + return m.ConnectionId + } + return "" +} + +type MsgInitICAResponse struct { +} + +func (m *MsgInitICAResponse) Reset() { *m = MsgInitICAResponse{} } +func (m *MsgInitICAResponse) String() string { return proto.CompactTextString(m) } +func (*MsgInitICAResponse) ProtoMessage() {} +func (*MsgInitICAResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{9} +} +func (m *MsgInitICAResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInitICAResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInitICAResponse.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 *MsgInitICAResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInitICAResponse.Merge(m, src) +} +func (m *MsgInitICAResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgInitICAResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInitICAResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInitICAResponse proto.InternalMessageInfo + +type MsgExecTransfer struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + TimeoutNanoSecond uint64 `protobuf:"varint,2,opt,name=timeout_nano_second,json=timeoutNanoSecond,proto3" json:"timeout_nano_second,omitempty"` + TransferChannelId string `protobuf:"bytes,3,opt,name=transfer_channel_id,json=transferChannelId,proto3" json:"transfer_channel_id,omitempty"` +} + +func (m *MsgExecTransfer) Reset() { *m = MsgExecTransfer{} } +func (m *MsgExecTransfer) String() string { return proto.CompactTextString(m) } +func (*MsgExecTransfer) ProtoMessage() {} +func (*MsgExecTransfer) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{10} +} +func (m *MsgExecTransfer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExecTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExecTransfer.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 *MsgExecTransfer) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExecTransfer.Merge(m, src) +} +func (m *MsgExecTransfer) XXX_Size() int { + return m.Size() +} +func (m *MsgExecTransfer) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExecTransfer.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExecTransfer proto.InternalMessageInfo + +func (m *MsgExecTransfer) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgExecTransfer) GetTimeoutNanoSecond() uint64 { + if m != nil { + return m.TimeoutNanoSecond + } + return 0 +} + +func (m *MsgExecTransfer) GetTransferChannelId() string { + if m != nil { + return m.TransferChannelId + } + return "" +} + +type MsgExecTransferResponse struct { +} + +func (m *MsgExecTransferResponse) Reset() { *m = MsgExecTransferResponse{} } +func (m *MsgExecTransferResponse) String() string { return proto.CompactTextString(m) } +func (*MsgExecTransferResponse) ProtoMessage() {} +func (*MsgExecTransferResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{11} +} +func (m *MsgExecTransferResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExecTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExecTransferResponse.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 *MsgExecTransferResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExecTransferResponse.Merge(m, src) +} +func (m *MsgExecTransferResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgExecTransferResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExecTransferResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExecTransferResponse proto.InternalMessageInfo + +type MsgExecAddLiquidity struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Msg github_com_cosmic_horizon_qwoyn_osmosis_balancer.MsgCreateBalancerPool `protobuf:"bytes,2,opt,name=msg,proto3,customtype=github.com/cosmic-horizon/qwoyn/osmosis/balancer.MsgCreateBalancerPool" json:"msg"` +} + +func (m *MsgExecAddLiquidity) Reset() { *m = MsgExecAddLiquidity{} } +func (m *MsgExecAddLiquidity) String() string { return proto.CompactTextString(m) } +func (*MsgExecAddLiquidity) ProtoMessage() {} +func (*MsgExecAddLiquidity) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{12} +} +func (m *MsgExecAddLiquidity) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExecAddLiquidity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExecAddLiquidity.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 *MsgExecAddLiquidity) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExecAddLiquidity.Merge(m, src) +} +func (m *MsgExecAddLiquidity) XXX_Size() int { + return m.Size() +} +func (m *MsgExecAddLiquidity) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExecAddLiquidity.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExecAddLiquidity proto.InternalMessageInfo + +func (m *MsgExecAddLiquidity) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +type MsgExecAddLiquidityResponse struct { +} + +func (m *MsgExecAddLiquidityResponse) Reset() { *m = MsgExecAddLiquidityResponse{} } +func (m *MsgExecAddLiquidityResponse) String() string { return proto.CompactTextString(m) } +func (*MsgExecAddLiquidityResponse) ProtoMessage() {} +func (*MsgExecAddLiquidityResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{13} +} +func (m *MsgExecAddLiquidityResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExecAddLiquidityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExecAddLiquidityResponse.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 *MsgExecAddLiquidityResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExecAddLiquidityResponse.Merge(m, src) +} +func (m *MsgExecAddLiquidityResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgExecAddLiquidityResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExecAddLiquidityResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExecAddLiquidityResponse proto.InternalMessageInfo + +type EventPutAllocationToken struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (m *EventPutAllocationToken) Reset() { *m = EventPutAllocationToken{} } +func (m *EventPutAllocationToken) String() string { return proto.CompactTextString(m) } +func (*EventPutAllocationToken) ProtoMessage() {} +func (*EventPutAllocationToken) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{14} +} +func (m *EventPutAllocationToken) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventPutAllocationToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventPutAllocationToken.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 *EventPutAllocationToken) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventPutAllocationToken.Merge(m, src) +} +func (m *EventPutAllocationToken) XXX_Size() int { + return m.Size() +} +func (m *EventPutAllocationToken) XXX_DiscardUnknown() { + xxx_messageInfo_EventPutAllocationToken.DiscardUnknown(m) +} + +var xxx_messageInfo_EventPutAllocationToken proto.InternalMessageInfo + +func (m *EventPutAllocationToken) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *EventPutAllocationToken) GetAmount() string { + if m != nil { + return m.Amount + } + return "" +} + +type EventTakeOutAllocationToken struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (m *EventTakeOutAllocationToken) Reset() { *m = EventTakeOutAllocationToken{} } +func (m *EventTakeOutAllocationToken) String() string { return proto.CompactTextString(m) } +func (*EventTakeOutAllocationToken) ProtoMessage() {} +func (*EventTakeOutAllocationToken) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{15} +} +func (m *EventTakeOutAllocationToken) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventTakeOutAllocationToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventTakeOutAllocationToken.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 *EventTakeOutAllocationToken) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventTakeOutAllocationToken.Merge(m, src) +} +func (m *EventTakeOutAllocationToken) XXX_Size() int { + return m.Size() +} +func (m *EventTakeOutAllocationToken) XXX_DiscardUnknown() { + xxx_messageInfo_EventTakeOutAllocationToken.DiscardUnknown(m) +} + +var xxx_messageInfo_EventTakeOutAllocationToken proto.InternalMessageInfo + +func (m *EventTakeOutAllocationToken) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *EventTakeOutAllocationToken) GetAmount() string { + if m != nil { + return m.Amount + } + return "" +} + +type EventBuyAllocationToken struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (m *EventBuyAllocationToken) Reset() { *m = EventBuyAllocationToken{} } +func (m *EventBuyAllocationToken) String() string { return proto.CompactTextString(m) } +func (*EventBuyAllocationToken) ProtoMessage() {} +func (*EventBuyAllocationToken) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{16} +} +func (m *EventBuyAllocationToken) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventBuyAllocationToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventBuyAllocationToken.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 *EventBuyAllocationToken) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventBuyAllocationToken.Merge(m, src) +} +func (m *EventBuyAllocationToken) XXX_Size() int { + return m.Size() +} +func (m *EventBuyAllocationToken) XXX_DiscardUnknown() { + xxx_messageInfo_EventBuyAllocationToken.DiscardUnknown(m) +} + +var xxx_messageInfo_EventBuyAllocationToken proto.InternalMessageInfo + +func (m *EventBuyAllocationToken) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *EventBuyAllocationToken) GetAmount() string { + if m != nil { + return m.Amount + } + return "" +} + +type EventSetDepositEndTime struct { + Time uint64 `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"` +} + +func (m *EventSetDepositEndTime) Reset() { *m = EventSetDepositEndTime{} } +func (m *EventSetDepositEndTime) String() string { return proto.CompactTextString(m) } +func (*EventSetDepositEndTime) ProtoMessage() {} +func (*EventSetDepositEndTime) Descriptor() ([]byte, []int) { + return fileDescriptor_29346906793f3475, []int{17} +} +func (m *EventSetDepositEndTime) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventSetDepositEndTime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventSetDepositEndTime.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 *EventSetDepositEndTime) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventSetDepositEndTime.Merge(m, src) +} +func (m *EventSetDepositEndTime) XXX_Size() int { + return m.Size() +} +func (m *EventSetDepositEndTime) XXX_DiscardUnknown() { + xxx_messageInfo_EventSetDepositEndTime.DiscardUnknown(m) +} + +var xxx_messageInfo_EventSetDepositEndTime proto.InternalMessageInfo + +func (m *EventSetDepositEndTime) GetTime() uint64 { + if m != nil { + return m.Time + } + return 0 +} + +func init() { + proto.RegisterType((*MsgPutAllocationToken)(nil), "cosmichorizon.qwoyn.aquifer.MsgPutAllocationToken") + proto.RegisterType((*MsgPutAllocationTokenResponse)(nil), "cosmichorizon.qwoyn.aquifer.MsgPutAllocationTokenResponse") + proto.RegisterType((*MsgTakeOutAllocationToken)(nil), "cosmichorizon.qwoyn.aquifer.MsgTakeOutAllocationToken") + proto.RegisterType((*MsgTakeOutAllocationTokenResponse)(nil), "cosmichorizon.qwoyn.aquifer.MsgTakeOutAllocationTokenResponse") + proto.RegisterType((*MsgBuyAllocationToken)(nil), "cosmichorizon.qwoyn.aquifer.MsgBuyAllocationToken") + proto.RegisterType((*MsgBuyAllocationTokenResponse)(nil), "cosmichorizon.qwoyn.aquifer.MsgBuyAllocationTokenResponse") + proto.RegisterType((*MsgSetDepositEndTime)(nil), "cosmichorizon.qwoyn.aquifer.MsgSetDepositEndTime") + proto.RegisterType((*MsgSetDepositEndTimeResponse)(nil), "cosmichorizon.qwoyn.aquifer.MsgSetDepositEndTimeResponse") + proto.RegisterType((*MsgInitICA)(nil), "cosmichorizon.qwoyn.aquifer.MsgInitICA") + proto.RegisterType((*MsgInitICAResponse)(nil), "cosmichorizon.qwoyn.aquifer.MsgInitICAResponse") + proto.RegisterType((*MsgExecTransfer)(nil), "cosmichorizon.qwoyn.aquifer.MsgExecTransfer") + proto.RegisterType((*MsgExecTransferResponse)(nil), "cosmichorizon.qwoyn.aquifer.MsgExecTransferResponse") + proto.RegisterType((*MsgExecAddLiquidity)(nil), "cosmichorizon.qwoyn.aquifer.MsgExecAddLiquidity") + proto.RegisterType((*MsgExecAddLiquidityResponse)(nil), "cosmichorizon.qwoyn.aquifer.MsgExecAddLiquidityResponse") + proto.RegisterType((*EventPutAllocationToken)(nil), "cosmichorizon.qwoyn.aquifer.EventPutAllocationToken") + proto.RegisterType((*EventTakeOutAllocationToken)(nil), "cosmichorizon.qwoyn.aquifer.EventTakeOutAllocationToken") + proto.RegisterType((*EventBuyAllocationToken)(nil), "cosmichorizon.qwoyn.aquifer.EventBuyAllocationToken") + proto.RegisterType((*EventSetDepositEndTime)(nil), "cosmichorizon.qwoyn.aquifer.EventSetDepositEndTime") +} + +func init() { proto.RegisterFile("aquifer/tx.proto", fileDescriptor_29346906793f3475) } + +var fileDescriptor_29346906793f3475 = []byte{ + // 718 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x4f, 0xdb, 0x4a, + 0x10, 0x8f, 0x1f, 0x08, 0x1e, 0xf3, 0x78, 0x2a, 0x18, 0x1a, 0x88, 0x29, 0x86, 0x9a, 0x43, 0x39, + 0x50, 0xbb, 0xd0, 0xaa, 0xff, 0x0e, 0x95, 0x48, 0x4a, 0xa5, 0x48, 0x35, 0x45, 0x21, 0xa7, 0x5e, + 0x52, 0xc7, 0x5e, 0x9c, 0x15, 0xc9, 0x6e, 0xf0, 0xae, 0x29, 0xe9, 0xa1, 0x52, 0xd5, 0x5e, 0x7a, + 0x2a, 0x1f, 0x8b, 0x23, 0xc7, 0xaa, 0x07, 0x54, 0xc1, 0x17, 0xa9, 0xbc, 0x76, 0x4c, 0x68, 0xec, + 0x1a, 0xf7, 0xc0, 0x6d, 0xb3, 0x33, 0xbf, 0x3f, 0x99, 0x9d, 0x19, 0x19, 0xa6, 0xac, 0x03, 0x1f, + 0xef, 0x21, 0xcf, 0xe0, 0x47, 0x7a, 0xd7, 0xa3, 0x9c, 0xca, 0x0b, 0x36, 0x65, 0x1d, 0x6c, 0xb7, + 0xa8, 0x87, 0x3f, 0x50, 0xa2, 0x1f, 0xbc, 0xa7, 0x3d, 0xa2, 0x47, 0x59, 0x8a, 0x1a, 0x04, 0x29, + 0x33, 0x9a, 0x16, 0x43, 0xc6, 0xe1, 0x7a, 0x13, 0x71, 0x6b, 0xdd, 0xb0, 0x29, 0x26, 0x21, 0x58, + 0x99, 0x75, 0xa9, 0x4b, 0xc5, 0xd1, 0x08, 0x4e, 0xe1, 0xad, 0xd6, 0x82, 0xdb, 0x26, 0x73, 0x77, + 0x7c, 0xbe, 0xd9, 0x6e, 0x53, 0xdb, 0xe2, 0x98, 0x92, 0x3a, 0xdd, 0x47, 0x44, 0x2e, 0xc2, 0x18, + 0x43, 0xc4, 0x41, 0xde, 0xbc, 0xb4, 0x2c, 0xad, 0x4e, 0xd4, 0xa2, 0x5f, 0xf2, 0x13, 0x18, 0xb3, + 0x3a, 0xd4, 0x27, 0x7c, 0xfe, 0x9f, 0x65, 0x69, 0xf5, 0xbf, 0x8d, 0x92, 0x1e, 0xea, 0xea, 0x81, + 0xae, 0x1e, 0xe9, 0xea, 0x15, 0x8a, 0x49, 0x79, 0xf4, 0xe4, 0x6c, 0xa9, 0x50, 0x8b, 0xd2, 0xb5, + 0x25, 0x58, 0x4c, 0x54, 0xaa, 0x21, 0xd6, 0xa5, 0x84, 0x21, 0xad, 0x0d, 0x25, 0x93, 0xb9, 0x75, + 0x6b, 0x1f, 0xbd, 0xb9, 0x01, 0x3b, 0x2b, 0x70, 0x37, 0x55, 0x2d, 0xb6, 0x14, 0x56, 0xa7, 0xec, + 0xf7, 0x6e, 0xa8, 0x3a, 0xc3, 0x4a, 0xb1, 0x95, 0x2a, 0xcc, 0x9a, 0xcc, 0xdd, 0x45, 0xfc, 0x25, + 0xea, 0x52, 0x86, 0xf9, 0x16, 0x71, 0xea, 0xb8, 0x83, 0x52, 0x9d, 0x94, 0xe0, 0x5f, 0x44, 0x9c, + 0x06, 0xc7, 0x1d, 0x24, 0xbc, 0x8c, 0xd6, 0xc6, 0x51, 0x08, 0xd1, 0x54, 0xb8, 0x93, 0x44, 0x35, + 0x20, 0x05, 0x26, 0x73, 0xab, 0x04, 0xf3, 0x6a, 0x65, 0x33, 0x55, 0x60, 0x05, 0xfe, 0xb7, 0x29, + 0x21, 0xc8, 0x0e, 0xbc, 0x36, 0xb0, 0x23, 0x54, 0x26, 0x6a, 0x93, 0x97, 0x97, 0x55, 0x47, 0x9b, + 0x05, 0xf9, 0x92, 0x2a, 0x16, 0xf8, 0x2a, 0xc1, 0x2d, 0x93, 0xb9, 0x5b, 0x47, 0xc8, 0xae, 0x7b, + 0x16, 0x61, 0x7b, 0xc8, 0x4b, 0x95, 0xd1, 0x61, 0x26, 0xf8, 0x0f, 0xd4, 0xe7, 0x0d, 0x62, 0x11, + 0xda, 0x60, 0xc8, 0xa6, 0xc4, 0x89, 0xfe, 0xd2, 0x74, 0x14, 0xda, 0xb6, 0x08, 0xdd, 0x15, 0x01, + 0x91, 0x1f, 0x71, 0x36, 0xec, 0x96, 0x45, 0x08, 0x6a, 0x07, 0xe6, 0x46, 0x04, 0xe9, 0x74, 0x3f, + 0x54, 0x09, 0x23, 0x55, 0x47, 0x2b, 0xc1, 0xdc, 0x6f, 0x56, 0x62, 0x9b, 0xdf, 0x24, 0x98, 0x89, + 0x62, 0x9b, 0x8e, 0xf3, 0x1a, 0x1f, 0xf8, 0xd8, 0xc1, 0xbc, 0x97, 0x6a, 0xf5, 0x1d, 0x8c, 0x74, + 0x98, 0x2b, 0xac, 0x4d, 0x96, 0xb7, 0x83, 0xe7, 0xfd, 0x71, 0xb6, 0xf4, 0xca, 0xc5, 0xbc, 0xe5, + 0x37, 0x75, 0x9b, 0x76, 0x8c, 0x70, 0x7c, 0xef, 0x47, 0xf3, 0x6b, 0x88, 0xf9, 0x35, 0x44, 0x7f, + 0xe0, 0x60, 0x6e, 0xdb, 0x16, 0xb1, 0x91, 0xa7, 0x9b, 0xcc, 0xad, 0x78, 0xc8, 0xe2, 0xa8, 0x1c, + 0xdd, 0xec, 0x50, 0xda, 0xae, 0x05, 0xd4, 0xda, 0x22, 0x2c, 0x24, 0x18, 0x1a, 0x78, 0xb8, 0xb9, + 0xad, 0x43, 0x44, 0x78, 0x8e, 0x71, 0x2e, 0x5e, 0x69, 0xd8, 0x89, 0xb8, 0x1f, 0x4d, 0x58, 0x10, + 0x54, 0x39, 0xc7, 0x31, 0x8d, 0xae, 0xef, 0x2c, 0xc7, 0x28, 0xa5, 0x51, 0xad, 0x41, 0x51, 0x50, + 0x0d, 0x8f, 0x82, 0x0c, 0xa3, 0xa2, 0xdd, 0x25, 0xd1, 0x1b, 0xe2, 0xbc, 0xf1, 0x79, 0x1c, 0x46, + 0x4c, 0xe6, 0xca, 0x5f, 0x24, 0x90, 0x13, 0xca, 0xb2, 0xa1, 0xff, 0x61, 0xa5, 0xea, 0x89, 0xfb, + 0x4a, 0x79, 0x9e, 0x1f, 0xd3, 0x7f, 0x21, 0xf9, 0x58, 0x82, 0x62, 0x4a, 0x49, 0x1f, 0x67, 0xd1, + 0x26, 0xe3, 0x94, 0x17, 0x7f, 0x87, 0x8b, 0x2d, 0x05, 0x95, 0x49, 0x78, 0x96, 0xcc, 0xca, 0x0c, + 0x63, 0xb2, 0x2b, 0x93, 0xbe, 0xdf, 0xe4, 0x4f, 0x12, 0x4c, 0x0f, 0x3f, 0xe9, 0x7a, 0x16, 0xe3, + 0x10, 0x44, 0x79, 0x96, 0x1b, 0x12, 0x7b, 0xb0, 0x61, 0xbc, 0xbf, 0xf5, 0xee, 0x65, 0xb1, 0x44, + 0x89, 0x8a, 0x71, 0xcd, 0xc4, 0x58, 0xc4, 0x83, 0xc9, 0x2b, 0x8b, 0x6f, 0x2d, 0x8b, 0x60, 0x30, + 0x5b, 0x79, 0x94, 0x27, 0x3b, 0xd6, 0xfc, 0x08, 0x53, 0x43, 0x5b, 0xec, 0xc1, 0x75, 0x98, 0x06, + 0x11, 0xca, 0xd3, 0xbc, 0x88, 0xbe, 0x7e, 0xb9, 0x7a, 0x72, 0xae, 0x4a, 0xa7, 0xe7, 0xaa, 0xf4, + 0xf3, 0x5c, 0x95, 0x8e, 0x2f, 0xd4, 0xc2, 0xe9, 0x85, 0x5a, 0xf8, 0x7e, 0xa1, 0x16, 0xde, 0x1a, + 0x59, 0xeb, 0xf1, 0xc8, 0x88, 0x3f, 0x83, 0x7a, 0x5d, 0xc4, 0x9a, 0x63, 0xe2, 0xbb, 0xe5, 0xe1, + 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x81, 0xc5, 0xb6, 0x06, 0x1e, 0x09, 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 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + PutAllocationToken(ctx context.Context, in *MsgPutAllocationToken, opts ...grpc.CallOption) (*MsgPutAllocationTokenResponse, error) + TakeOutAllocationToken(ctx context.Context, in *MsgTakeOutAllocationToken, opts ...grpc.CallOption) (*MsgTakeOutAllocationTokenResponse, error) + BuyAllocationToken(ctx context.Context, in *MsgBuyAllocationToken, opts ...grpc.CallOption) (*MsgBuyAllocationTokenResponse, error) + SetDepositEndTime(ctx context.Context, in *MsgSetDepositEndTime, opts ...grpc.CallOption) (*MsgSetDepositEndTimeResponse, error) + InitICA(ctx context.Context, in *MsgInitICA, opts ...grpc.CallOption) (*MsgInitICAResponse, error) + ExecTransfer(ctx context.Context, in *MsgExecTransfer, opts ...grpc.CallOption) (*MsgExecTransferResponse, error) + ExecAddLiquidity(ctx context.Context, in *MsgExecAddLiquidity, opts ...grpc.CallOption) (*MsgExecAddLiquidityResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) PutAllocationToken(ctx context.Context, in *MsgPutAllocationToken, opts ...grpc.CallOption) (*MsgPutAllocationTokenResponse, error) { + out := new(MsgPutAllocationTokenResponse) + err := c.cc.Invoke(ctx, "/cosmichorizon.qwoyn.aquifer.Msg/PutAllocationToken", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) TakeOutAllocationToken(ctx context.Context, in *MsgTakeOutAllocationToken, opts ...grpc.CallOption) (*MsgTakeOutAllocationTokenResponse, error) { + out := new(MsgTakeOutAllocationTokenResponse) + err := c.cc.Invoke(ctx, "/cosmichorizon.qwoyn.aquifer.Msg/TakeOutAllocationToken", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) BuyAllocationToken(ctx context.Context, in *MsgBuyAllocationToken, opts ...grpc.CallOption) (*MsgBuyAllocationTokenResponse, error) { + out := new(MsgBuyAllocationTokenResponse) + err := c.cc.Invoke(ctx, "/cosmichorizon.qwoyn.aquifer.Msg/BuyAllocationToken", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SetDepositEndTime(ctx context.Context, in *MsgSetDepositEndTime, opts ...grpc.CallOption) (*MsgSetDepositEndTimeResponse, error) { + out := new(MsgSetDepositEndTimeResponse) + err := c.cc.Invoke(ctx, "/cosmichorizon.qwoyn.aquifer.Msg/SetDepositEndTime", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) InitICA(ctx context.Context, in *MsgInitICA, opts ...grpc.CallOption) (*MsgInitICAResponse, error) { + out := new(MsgInitICAResponse) + err := c.cc.Invoke(ctx, "/cosmichorizon.qwoyn.aquifer.Msg/InitICA", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ExecTransfer(ctx context.Context, in *MsgExecTransfer, opts ...grpc.CallOption) (*MsgExecTransferResponse, error) { + out := new(MsgExecTransferResponse) + err := c.cc.Invoke(ctx, "/cosmichorizon.qwoyn.aquifer.Msg/ExecTransfer", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ExecAddLiquidity(ctx context.Context, in *MsgExecAddLiquidity, opts ...grpc.CallOption) (*MsgExecAddLiquidityResponse, error) { + out := new(MsgExecAddLiquidityResponse) + err := c.cc.Invoke(ctx, "/cosmichorizon.qwoyn.aquifer.Msg/ExecAddLiquidity", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + PutAllocationToken(context.Context, *MsgPutAllocationToken) (*MsgPutAllocationTokenResponse, error) + TakeOutAllocationToken(context.Context, *MsgTakeOutAllocationToken) (*MsgTakeOutAllocationTokenResponse, error) + BuyAllocationToken(context.Context, *MsgBuyAllocationToken) (*MsgBuyAllocationTokenResponse, error) + SetDepositEndTime(context.Context, *MsgSetDepositEndTime) (*MsgSetDepositEndTimeResponse, error) + InitICA(context.Context, *MsgInitICA) (*MsgInitICAResponse, error) + ExecTransfer(context.Context, *MsgExecTransfer) (*MsgExecTransferResponse, error) + ExecAddLiquidity(context.Context, *MsgExecAddLiquidity) (*MsgExecAddLiquidityResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) PutAllocationToken(ctx context.Context, req *MsgPutAllocationToken) (*MsgPutAllocationTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PutAllocationToken not implemented") +} +func (*UnimplementedMsgServer) TakeOutAllocationToken(ctx context.Context, req *MsgTakeOutAllocationToken) (*MsgTakeOutAllocationTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TakeOutAllocationToken not implemented") +} +func (*UnimplementedMsgServer) BuyAllocationToken(ctx context.Context, req *MsgBuyAllocationToken) (*MsgBuyAllocationTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BuyAllocationToken not implemented") +} +func (*UnimplementedMsgServer) SetDepositEndTime(ctx context.Context, req *MsgSetDepositEndTime) (*MsgSetDepositEndTimeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetDepositEndTime not implemented") +} +func (*UnimplementedMsgServer) InitICA(ctx context.Context, req *MsgInitICA) (*MsgInitICAResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InitICA not implemented") +} +func (*UnimplementedMsgServer) ExecTransfer(ctx context.Context, req *MsgExecTransfer) (*MsgExecTransferResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExecTransfer not implemented") +} +func (*UnimplementedMsgServer) ExecAddLiquidity(ctx context.Context, req *MsgExecAddLiquidity) (*MsgExecAddLiquidityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExecAddLiquidity not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_PutAllocationToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgPutAllocationToken) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).PutAllocationToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmichorizon.qwoyn.aquifer.Msg/PutAllocationToken", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).PutAllocationToken(ctx, req.(*MsgPutAllocationToken)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_TakeOutAllocationToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgTakeOutAllocationToken) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).TakeOutAllocationToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmichorizon.qwoyn.aquifer.Msg/TakeOutAllocationToken", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).TakeOutAllocationToken(ctx, req.(*MsgTakeOutAllocationToken)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_BuyAllocationToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgBuyAllocationToken) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).BuyAllocationToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmichorizon.qwoyn.aquifer.Msg/BuyAllocationToken", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).BuyAllocationToken(ctx, req.(*MsgBuyAllocationToken)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SetDepositEndTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSetDepositEndTime) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SetDepositEndTime(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmichorizon.qwoyn.aquifer.Msg/SetDepositEndTime", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetDepositEndTime(ctx, req.(*MsgSetDepositEndTime)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_InitICA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgInitICA) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).InitICA(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmichorizon.qwoyn.aquifer.Msg/InitICA", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).InitICA(ctx, req.(*MsgInitICA)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ExecTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgExecTransfer) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ExecTransfer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmichorizon.qwoyn.aquifer.Msg/ExecTransfer", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ExecTransfer(ctx, req.(*MsgExecTransfer)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ExecAddLiquidity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgExecAddLiquidity) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ExecAddLiquidity(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmichorizon.qwoyn.aquifer.Msg/ExecAddLiquidity", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ExecAddLiquidity(ctx, req.(*MsgExecAddLiquidity)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmichorizon.qwoyn.aquifer.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "PutAllocationToken", + Handler: _Msg_PutAllocationToken_Handler, + }, + { + MethodName: "TakeOutAllocationToken", + Handler: _Msg_TakeOutAllocationToken_Handler, + }, + { + MethodName: "BuyAllocationToken", + Handler: _Msg_BuyAllocationToken_Handler, + }, + { + MethodName: "SetDepositEndTime", + Handler: _Msg_SetDepositEndTime_Handler, + }, + { + MethodName: "InitICA", + Handler: _Msg_InitICA_Handler, + }, + { + MethodName: "ExecTransfer", + Handler: _Msg_ExecTransfer_Handler, + }, + { + MethodName: "ExecAddLiquidity", + Handler: _Msg_ExecAddLiquidity_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "aquifer/tx.proto", +} + +func (m *MsgPutAllocationToken) 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 *MsgPutAllocationToken) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPutAllocationToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgPutAllocationTokenResponse) 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 *MsgPutAllocationTokenResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgPutAllocationTokenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgTakeOutAllocationToken) 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 *MsgTakeOutAllocationToken) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgTakeOutAllocationToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgTakeOutAllocationTokenResponse) 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 *MsgTakeOutAllocationTokenResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgTakeOutAllocationTokenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgBuyAllocationToken) 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 *MsgBuyAllocationToken) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBuyAllocationToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgBuyAllocationTokenResponse) 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 *MsgBuyAllocationTokenResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgBuyAllocationTokenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgSetDepositEndTime) 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 *MsgSetDepositEndTime) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetDepositEndTime) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.EndTime != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.EndTime)) + i-- + dAtA[i] = 0x10 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSetDepositEndTimeResponse) 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 *MsgSetDepositEndTimeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetDepositEndTimeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgInitICA) 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 *MsgInitICA) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInitICA) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ConnectionId) > 0 { + i -= len(m.ConnectionId) + copy(dAtA[i:], m.ConnectionId) + i = encodeVarintTx(dAtA, i, uint64(len(m.ConnectionId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgInitICAResponse) 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 *MsgInitICAResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInitICAResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgExecTransfer) 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 *MsgExecTransfer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExecTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TransferChannelId) > 0 { + i -= len(m.TransferChannelId) + copy(dAtA[i:], m.TransferChannelId) + i = encodeVarintTx(dAtA, i, uint64(len(m.TransferChannelId))) + i-- + dAtA[i] = 0x1a + } + if m.TimeoutNanoSecond != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TimeoutNanoSecond)) + i-- + dAtA[i] = 0x10 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgExecTransferResponse) 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 *MsgExecTransferResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExecTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgExecAddLiquidity) 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 *MsgExecAddLiquidity) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExecAddLiquidity) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.Msg.Size() + i -= size + if _, err := m.Msg.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgExecAddLiquidityResponse) 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 *MsgExecAddLiquidityResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExecAddLiquidityResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *EventPutAllocationToken) 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 *EventPutAllocationToken) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventPutAllocationToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintTx(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventTakeOutAllocationToken) 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 *EventTakeOutAllocationToken) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventTakeOutAllocationToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintTx(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventBuyAllocationToken) 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 *EventBuyAllocationToken) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventBuyAllocationToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintTx(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventSetDepositEndTime) 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 *EventSetDepositEndTime) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventSetDepositEndTime) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Time != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Time)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgPutAllocationToken) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgPutAllocationTokenResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgTakeOutAllocationToken) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgTakeOutAllocationTokenResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgBuyAllocationToken) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Amount.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgBuyAllocationTokenResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgSetDepositEndTime) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.EndTime != 0 { + n += 1 + sovTx(uint64(m.EndTime)) + } + return n +} + +func (m *MsgSetDepositEndTimeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgInitICA) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ConnectionId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgInitICAResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgExecTransfer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.TimeoutNanoSecond != 0 { + n += 1 + sovTx(uint64(m.TimeoutNanoSecond)) + } + l = len(m.TransferChannelId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgExecTransferResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgExecAddLiquidity) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Msg.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgExecAddLiquidityResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *EventPutAllocationToken) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *EventTakeOutAllocationToken) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *EventBuyAllocationToken) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *EventSetDepositEndTime) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Time != 0 { + n += 1 + sovTx(uint64(m.Time)) + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgPutAllocationToken) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgPutAllocationToken: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPutAllocationToken: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgPutAllocationTokenResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgPutAllocationTokenResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgPutAllocationTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgTakeOutAllocationToken) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgTakeOutAllocationToken: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgTakeOutAllocationToken: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgTakeOutAllocationTokenResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgTakeOutAllocationTokenResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgTakeOutAllocationTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBuyAllocationToken) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgBuyAllocationToken: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBuyAllocationToken: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgBuyAllocationTokenResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgBuyAllocationTokenResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgBuyAllocationTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSetDepositEndTime) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSetDepositEndTime: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetDepositEndTime: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) + } + m.EndTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EndTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSetDepositEndTimeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSetDepositEndTimeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetDepositEndTimeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInitICA) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgInitICA: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInitICA: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgInitICAResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgInitICAResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInitICAResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExecTransfer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExecTransfer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExecTransfer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutNanoSecond", wireType) + } + m.TimeoutNanoSecond = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TimeoutNanoSecond |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TransferChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TransferChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExecTransferResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExecTransferResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExecTransferResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExecAddLiquidity) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExecAddLiquidity: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExecAddLiquidity: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExecAddLiquidityResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExecAddLiquidityResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExecAddLiquidityResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventPutAllocationToken) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventPutAllocationToken: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventPutAllocationToken: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventTakeOutAllocationToken) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventTakeOutAllocationToken: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventTakeOutAllocationToken: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventBuyAllocationToken) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventBuyAllocationToken: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventBuyAllocationToken: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventSetDepositEndTime) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventSetDepositEndTime: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventSetDepositEndTime: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + } + m.Time = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Time |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/aquifer/types/types.go b/x/aquifer/types/types.go new file mode 100644 index 0000000..ab1254f --- /dev/null +++ b/x/aquifer/types/types.go @@ -0,0 +1 @@ +package types diff --git a/x/game/keeper/abci.go b/x/game/keeper/abci.go index 974624a..0bb574f 100644 --- a/x/game/keeper/abci.go +++ b/x/game/keeper/abci.go @@ -20,14 +20,16 @@ func (k Keeper) EndBlocker(ctx sdk.Context) { if err != nil { continue } - k.DeleteUnbonding(ctx, unbonding) - // emit event - ctx.EventManager().EmitTypedEvent(&types.EventCompleteUnstakeInGameToken{ + err = ctx.EventManager().EmitTypedEvent(&types.EventCompleteUnstakeInGameToken{ User: unbonding.StakerAddress, Amount: unbonding.Amount.String(), CompletionTime: uint64(ctx.BlockTime().Unix()), UnbondingId: unbonding.Id, }) + if err != nil { + continue + } + k.DeleteUnbonding(ctx, unbonding) } } diff --git a/x/game/keeper/grpc_query_test.go b/x/game/keeper/grpc_query_test.go index 0aa8f3d..b6c6e20 100644 --- a/x/game/keeper/grpc_query_test.go +++ b/x/game/keeper/grpc_query_test.go @@ -32,7 +32,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryEstimatedSwapOut() { suite.ctx = suite.ctx.WithBlockTime(now) // get not available liquidity - resp, err := suite.app.GameKeeper.EstimatedSwapOut(sdk.WrapSDKContext(suite.ctx), &types.QueryEstimatedSwapOutRequest{}) + _, err := suite.app.GameKeeper.EstimatedSwapOut(sdk.WrapSDKContext(suite.ctx), &types.QueryEstimatedSwapOutRequest{}) suite.Require().Error(err) // set liquidity @@ -41,7 +41,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryEstimatedSwapOut() { } suite.app.GameKeeper.SetLiquidity(suite.ctx, liquidity) - resp, err = suite.app.GameKeeper.EstimatedSwapOut(sdk.WrapSDKContext(suite.ctx), &types.QueryEstimatedSwapOutRequest{ + resp, err := suite.app.GameKeeper.EstimatedSwapOut(sdk.WrapSDKContext(suite.ctx), &types.QueryEstimatedSwapOutRequest{ Amount: "1000ucoho", }) suite.Require().NoError(err) @@ -59,7 +59,7 @@ func (suite *KeeperTestSuite) TestGRPCQuerySwapRate() { suite.ctx = suite.ctx.WithBlockTime(now) // get not available liquidity - resp, err := suite.app.GameKeeper.SwapRate(sdk.WrapSDKContext(suite.ctx), &types.QuerySwapRateRequest{}) + _, err := suite.app.GameKeeper.SwapRate(sdk.WrapSDKContext(suite.ctx), &types.QuerySwapRateRequest{}) suite.Require().Error(err) // set liquidity @@ -68,7 +68,7 @@ func (suite *KeeperTestSuite) TestGRPCQuerySwapRate() { } suite.app.GameKeeper.SetLiquidity(suite.ctx, liquidity) - resp, err = suite.app.GameKeeper.SwapRate(sdk.WrapSDKContext(suite.ctx), &types.QuerySwapRateRequest{}) + resp, err := suite.app.GameKeeper.SwapRate(sdk.WrapSDKContext(suite.ctx), &types.QuerySwapRateRequest{}) suite.Require().NoError(err) suite.Require().Equal(resp.Rate, sdk.OneDec()) suite.Require().Equal(resp.SrcDenom, "ucoho") diff --git a/x/game/keeper/liquidity.go b/x/game/keeper/liquidity.go index baf5765..f604812 100644 --- a/x/game/keeper/liquidity.go +++ b/x/game/keeper/liquidity.go @@ -91,12 +91,11 @@ func (k Keeper) Swap(ctx sdk.Context, sender sdk.AccAddress, amount sdk.Coin) er } // emit event - ctx.EventManager().EmitTypedEvent(&types.EventSwap{ + return ctx.EventManager().EmitTypedEvent(&types.EventSwap{ Sender: sender.String(), InAmount: amount.String(), OutAmount: tarCoin.String(), }) - return nil } func (k Keeper) SwapFromModule(ctx sdk.Context, moduleName string, amount sdk.Coin) error { @@ -125,10 +124,9 @@ func (k Keeper) SwapFromModule(ctx sdk.Context, moduleName string, amount sdk.Co } // emit event - ctx.EventManager().EmitTypedEvent(&types.EventSwap{ + return ctx.EventManager().EmitTypedEvent(&types.EventSwap{ Sender: moduleName, InAmount: amount.String(), OutAmount: tarCoin.String(), }) - return nil } diff --git a/x/game/keeper/msg_server.go b/x/game/keeper/msg_server.go index ca0adfe..8419217 100644 --- a/x/game/keeper/msg_server.go +++ b/x/game/keeper/msg_server.go @@ -31,10 +31,13 @@ func (m msgServer) TransferModuleOwnership(goCtx context.Context, msg *types.Msg m.SetParamSet(ctx, params) // emit event - ctx.EventManager().EmitTypedEvent(&types.EventTransferModuleOwnership{ + err := ctx.EventManager().EmitTypedEvent(&types.EventTransferModuleOwnership{ OriginOwner: msg.Sender, NewOwner: msg.NewOwner, }) + if err != nil { + return nil, err + } return &types.MsgTransferModuleOwnershipResponse{}, nil } @@ -54,6 +57,9 @@ func (m msgServer) WhitelistNftContracts(goCtx context.Context, msg *types.MsgWh } minterJSON, err := m.WasmViewer.QuerySmart(ctx, contractAddr, []byte(`{"minter": {}}`)) + if err != nil { + return nil, err + } var parsed map[string]string err = json.Unmarshal(minterJSON, &parsed) @@ -66,6 +72,9 @@ func (m msgServer) WhitelistNftContracts(goCtx context.Context, msg *types.MsgWh } contractInfoJSON, err := m.WasmViewer.QuerySmart(ctx, contractAddr, []byte(`{"contract_info": {}}`)) + if err != nil { + return nil, err + } err = json.Unmarshal(contractInfoJSON, &parsed) if err != nil { return nil, err @@ -78,9 +87,12 @@ func (m msgServer) WhitelistNftContracts(goCtx context.Context, msg *types.MsgWh m.SetWhitelistedContract(ctx, contract) // emit event - ctx.EventManager().EmitTypedEvent(&types.EventNftContractAddWhitelist{ + err = ctx.EventManager().EmitTypedEvent(&types.EventNftContractAddWhitelist{ Contract: contract, }) + if err != nil { + return nil, err + } } return &types.MsgWhitelistNftContractsResponse{}, nil } @@ -95,9 +107,12 @@ func (m msgServer) RemoveWhitelistedNftContracts(goCtx context.Context, msg *typ m.DeleteWhitelistedContract(ctx, contract) // emit event - ctx.EventManager().EmitTypedEvent(&types.EventNftContractRemoveWhitelist{ + err := ctx.EventManager().EmitTypedEvent(&types.EventNftContractRemoveWhitelist{ Contract: contract, }) + if err != nil { + return nil, err + } } return &types.MsgRemoveWhitelistedNftContractsResponse{}, nil } @@ -110,11 +125,14 @@ func (m msgServer) DepositNft(goCtx context.Context, msg *types.MsgDepositNft) ( } // emit event - ctx.EventManager().EmitTypedEvent(&types.EventDepositNft{ + err = ctx.EventManager().EmitTypedEvent(&types.EventDepositNft{ Owner: msg.Sender, Contract: msg.Contract, TokenId: msg.TokenId, }) + if err != nil { + return nil, err + } return &types.MsgDepositNftResponse{}, nil } @@ -127,12 +145,15 @@ func (m msgServer) WithdrawUpdatedNft(goCtx context.Context, msg *types.MsgWithd } // emit event - ctx.EventManager().EmitTypedEvent(&types.EventWithdrawNft{ + err = ctx.EventManager().EmitTypedEvent(&types.EventWithdrawNft{ Sender: msg.Sender, Contract: msg.Contract, TokenId: msg.TokenId, ExecMsg: msg.ExecMsg, }) + if err != nil { + return nil, err + } return &types.MsgWithdrawUpdatedNftResponse{}, nil } @@ -157,10 +178,13 @@ func (m msgServer) DepositToken(goCtx context.Context, msg *types.MsgDepositToke m.IncreaseDeposit(ctx, sender, msg.Amount.Amount) // emit event - ctx.EventManager().EmitTypedEvent(&types.EventDepositToken{ + err = ctx.EventManager().EmitTypedEvent(&types.EventDepositToken{ Sender: msg.Sender, Amount: msg.Amount.String(), }) + if err != nil { + return nil, err + } return &types.MsgDepositTokenResponse{}, nil } @@ -182,13 +206,19 @@ func (m msgServer) WithdrawToken(goCtx context.Context, msg *types.MsgWithdrawTo return nil, err } - m.DecreaseDeposit(ctx, sender, msg.Amount.Amount) + err = m.DecreaseDeposit(ctx, sender, msg.Amount.Amount) + if err != nil { + return nil, err + } // emit event - ctx.EventManager().EmitTypedEvent(&types.EventWithdrawToken{ + err = ctx.EventManager().EmitTypedEvent(&types.EventWithdrawToken{ Sender: msg.Sender, Amount: msg.Amount.String(), }) + if err != nil { + return nil, err + } return &types.MsgWithdrawTokenResponse{}, nil } @@ -216,10 +246,13 @@ func (m msgServer) StakeInGameToken(goCtx context.Context, msg *types.MsgStakeIn } // emit event - ctx.EventManager().EmitTypedEvent(&types.EventStakeInGameToken{ + err = ctx.EventManager().EmitTypedEvent(&types.EventStakeInGameToken{ Sender: msg.Sender, Amount: msg.Amount.String(), }) + if err != nil { + return nil, err + } return &types.MsgStakeInGameTokenResponse{}, nil } @@ -258,11 +291,14 @@ func (m msgServer) BeginUnstakeInGameToken(goCtx context.Context, msg *types.Msg }) // emit event - ctx.EventManager().EmitTypedEvent(&types.EventBeginUnstakeInGameToken{ + err = ctx.EventManager().EmitTypedEvent(&types.EventBeginUnstakeInGameToken{ Sender: msg.Sender, Amount: msg.Amount.String(), CompletionTime: uint64(ctx.BlockTime().Add(params.UnstakingTime).Unix()), }) + if err != nil { + return nil, err + } return &types.MsgBeginUnstakeInGameTokenResponse{}, nil } @@ -308,10 +344,13 @@ func (m msgServer) AddLiquidity(goCtx context.Context, msg *types.MsgAddLiquidit } // emit event - ctx.EventManager().EmitTypedEvent(&types.EventAddLiquidity{ + err = ctx.EventManager().EmitTypedEvent(&types.EventAddLiquidity{ Sender: msg.Sender, Amounts: sdk.Coins(msg.Amounts).String(), }) + if err != nil { + return nil, err + } return &types.MsgAddLiquidityResponse{}, nil } @@ -340,10 +379,13 @@ func (m msgServer) RemoveLiquidity(goCtx context.Context, msg *types.MsgRemoveLi } // emit event - ctx.EventManager().EmitTypedEvent(&types.EventRemoveLiquidity{ + err = ctx.EventManager().EmitTypedEvent(&types.EventRemoveLiquidity{ Sender: msg.Sender, Amounts: sdk.Coins(msg.Amounts).String(), }) + if err != nil { + return nil, err + } return &types.MsgRemoveLiquidityResponse{}, nil } diff --git a/x/game/keeper/params_test.go b/x/game/keeper/params_test.go index bc31ee6..e566834 100644 --- a/x/game/keeper/params_test.go +++ b/x/game/keeper/params_test.go @@ -9,10 +9,8 @@ import ( ) func (suite *KeeperTestSuite) TestParamsGetSet() { - params := suite.app.GameKeeper.GetParamSet(suite.ctx) - addr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) - params = types.Params{ + params := types.Params{ Owner: addr.String(), DepositDenom: "stake", StakingInflation: sdk.NewDec(10), diff --git a/x/game/keeper/token.go b/x/game/keeper/token.go index a936ee9..3c74dec 100644 --- a/x/game/keeper/token.go +++ b/x/game/keeper/token.go @@ -140,11 +140,9 @@ func (k Keeper) ClaimInGameStakingReward(ctx sdk.Context, addr sdk.AccAddress) e k.SetDeposit(ctx, deposit) // emit event - ctx.EventManager().EmitTypedEvent(&types.EventClaimInGameStakingReward{ + return ctx.EventManager().EmitTypedEvent(&types.EventClaimInGameStakingReward{ Sender: addr.String(), Amount: rewardAmount.String(), RewardClaimTime: uint64(ctx.BlockTime().Unix()), }) - - return nil } diff --git a/x/game/spec/07_cli_examples.md b/x/game/spec/07_cli_examples.md index 84e2774..66c4489 100644 --- a/x/game/spec/07_cli_examples.md +++ b/x/game/spec/07_cli_examples.md @@ -1,3 +1,5 @@ +# CLI examples for game + ```sh qwoynd query game params qwoynd query game whitelisted-contracts diff --git a/x/intertx/client/cli/query.go b/x/intertx/client/cli/query.go index d50988b..d6b652a 100644 --- a/x/intertx/client/cli/query.go +++ b/x/intertx/client/cli/query.go @@ -28,7 +28,7 @@ func getInterchainAccountCmd() *cobra.Command { Use: "ica [owner-account] [connection-id]", Short: "query the interchain account address", Long: "query the interchain account address associated with the owner address and connection id.", - Example: "qwoynd q intertx ica regen1drn830y2l24pne08t7k7p7z6zms3x8p8zc3u0h channel-5", + Example: "qwoynd q intertx ica aquifer connection-1", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) diff --git a/x/intertx/types/tx.pb.go b/x/intertx/types/tx.pb.go index a67a2e2..cb8da89 100644 --- a/x/intertx/types/tx.pb.go +++ b/x/intertx/types/tx.pb.go @@ -32,7 +32,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MsgRegisterAccount struct { // owner is the address of the interchain account owner. Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - // connection_id is the connection id string (i.e. channel-5). + // connection_id is the connection id string ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` // version is the application version string. For example, this could be an // ICS27 encoded metadata type or an ICS29 encoded metadata type with a nested diff --git a/x/mint/module.go b/x/mint/module.go index 1f027e4..d1314e8 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -71,8 +71,10 @@ func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Rout // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the mint module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) - + err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) + if err != nil { + panic(err) + } } // GetTxCmd returns no root tx command for the mint module. diff --git a/x/stimulus/client/cli/tx.go b/x/stimulus/client/cli/tx.go index a8ef532..d158369 100644 --- a/x/stimulus/client/cli/tx.go +++ b/x/stimulus/client/cli/tx.go @@ -18,11 +18,6 @@ var ( DefaultRelativePacketTimeoutTimestamp = uint64((time.Duration(10) * time.Minute).Nanoseconds()) ) -const ( - flagPacketTimeoutTimestamp = "packet-timeout-timestamp" - listSeparator = "," -) - // GetTxCmd returns the transaction commands for this module func GetTxCmd() *cobra.Command { cmd := &cobra.Command{ diff --git a/x/stimulus/handler.go b/x/stimulus/handler.go index 3ed2c56..140f867 100644 --- a/x/stimulus/handler.go +++ b/x/stimulus/handler.go @@ -13,6 +13,7 @@ import ( func NewHandler(k keeper.Keeper) sdk.Handler { return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { ctx = ctx.WithEventManager(sdk.NewEventManager()) + _ = ctx switch msg := msg.(type) { default: diff --git a/x/stimulus/keeper/abci_test.go b/x/stimulus/keeper/abci_test.go index 71a34d5..fe2c6f3 100644 --- a/x/stimulus/keeper/abci_test.go +++ b/x/stimulus/keeper/abci_test.go @@ -55,6 +55,7 @@ func (suite *KeeperTestSuite) TestBeginBlocker() { Sender: addr.String(), Amounts: tc.liquidity, }) + suite.Require().NoError(err) } if tc.balance.IsPositive() { diff --git a/x/stimulus/keeper/keeper.go b/x/stimulus/keeper/keeper.go index 7de9c29..0b3977d 100644 --- a/x/stimulus/keeper/keeper.go +++ b/x/stimulus/keeper/keeper.go @@ -14,7 +14,6 @@ import ( type Keeper struct { cdc codec.BinaryCodec storeKey sdk.StoreKey - memKey sdk.StoreKey paramstore paramtypes.Subspace ak types.AccountKeeper bk types.BankKeeper @@ -24,8 +23,7 @@ type Keeper struct { func NewKeeper( cdc codec.BinaryCodec, - storeKey, - memKey sdk.StoreKey, + storeKey sdk.StoreKey, ps paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper, @@ -40,7 +38,6 @@ func NewKeeper( return &Keeper{ cdc: cdc, storeKey: storeKey, - memKey: memKey, paramstore: ps, ak: ak, bk: bk, diff --git a/x/stimulus/keeper/msg_server.go b/x/stimulus/keeper/msg_server.go index ac745c9..d3509bb 100644 --- a/x/stimulus/keeper/msg_server.go +++ b/x/stimulus/keeper/msg_server.go @@ -38,10 +38,13 @@ func (m msgServer) DepositIntoOutpostFunding(goCtx context.Context, msg *types.M } // emit event - ctx.EventManager().EmitTypedEvent(&types.EventDepositIntoOutpostFunding{ + err = ctx.EventManager().EmitTypedEvent(&types.EventDepositIntoOutpostFunding{ Sender: msg.Sender, Amount: msg.Amount.String(), }) + if err != nil { + return nil, err + } return &types.MsgDepositIntoOutpostFundingResponse{}, nil } @@ -69,10 +72,13 @@ func (m msgServer) WithdrawFromOutpostFunding(goCtx context.Context, msg *types. } // emit event - ctx.EventManager().EmitTypedEvent(&types.EventWithdrawFromOutpostFunding{ + err = ctx.EventManager().EmitTypedEvent(&types.EventWithdrawFromOutpostFunding{ Sender: msg.Sender, Amount: msg.Amount.String(), }) + if err != nil { + return nil, err + } return &types.MsgWithdrawFromOutpostFundingResponse{}, nil } diff --git a/x/stimulus/keeper/params.go b/x/stimulus/keeper/params.go index 81be85e..e579697 100644 --- a/x/stimulus/keeper/params.go +++ b/x/stimulus/keeper/params.go @@ -6,8 +6,9 @@ import ( ) // GetParams get all parameters as types.Params -func (k Keeper) GetParams(ctx sdk.Context) types.Params { - return types.NewParams() +func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { + k.paramstore.GetParamSet(ctx, ¶ms) + return } // SetParams set the params diff --git a/x/stimulus/keeper/params_test.go b/x/stimulus/keeper/params_test.go index cfba86a..1ae607f 100644 --- a/x/stimulus/keeper/params_test.go +++ b/x/stimulus/keeper/params_test.go @@ -5,9 +5,7 @@ import ( ) func (suite *KeeperTestSuite) TestParamsGetSet() { - params := suite.app.StimulusKeeper.GetParams(suite.ctx) - - params = types.Params{} + params := types.Params{} suite.app.StimulusKeeper.SetParams(suite.ctx, params) newParams := suite.app.StimulusKeeper.GetParams(suite.ctx)