diff --git a/Makefile b/Makefile index e3f4ba2..6a8ba0e 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # modules to build in CI -SUBDIRS = incubator/orm +SUBDIRS = incubator/orm incubator/group test: test-unit diff --git a/incubator/group/.gitignore b/incubator/group/.gitignore new file mode 100644 index 0000000..48b8bf9 --- /dev/null +++ b/incubator/group/.gitignore @@ -0,0 +1 @@ +vendor/ diff --git a/incubator/group/Makefile b/incubator/group/Makefile new file mode 100644 index 0000000..b6a6fdd --- /dev/null +++ b/incubator/group/Makefile @@ -0,0 +1,14 @@ +.PHONY: vendor proto-gen protoc-gen-gocosmos test + +protoc-gen-gocosmos: + @echo "Installing protoc-gen-gocosmos..." + @go install github.com/regen-network/cosmos-proto/protoc-gen-gocosmos + +vendor: + go mod vendor + +proto-gen: vendor + ./protocgen.sh + +test: + @go test -mod=readonly -race ./... \ No newline at end of file diff --git a/incubator/group/README.md b/incubator/group/README.md new file mode 100644 index 0000000..6238547 --- /dev/null +++ b/incubator/group/README.md @@ -0,0 +1,67 @@ +# Group Module + +## Group + +A group is simply an aggregation of accounts with associated weights. It is not +an account and doesn't have a balance. It doesn't in and of itself have any +sort of voting or decision power. It does have an "administrator" which has +the power to add, remove and update members in the group. Note that a +group account could be an administrator of a group. + +## Group Account + +A group account is an account associated with a group and a decision policy. +Group accounts are abstracted from groups because a single group may have +multiple decision policies for different types of actions. Managing group +membership separately from decision policies results in the least overhead +and keeps membership consistent across different policies. The pattern that +is recommended is to have a single master group account for a given group, +and then to create separate group accounts with different decision policies +and delegate the desired permissions to from the master account to +those "sub-accounts" using the `msg_authorization` module. + + +## Decision Policy + +A decision policy is the mechanism by which members of a group can vote on +proposals. + +All decision policies generally would have a minimum and maximum voting window. +The minimum voting window is the minimum amount of time that must pass in order +for a proposal to potentially pass, and it may be set to 0. The maximum voting +window is the maximum time that a proposal may be voted on before it is closed. +Both of these values must be less than a chain-wide max voting window parameter. + +### Threshold decision policy + +A threshold decision policy defines a threshold of yes votes (based on a tally +of voter weights) that must be achieved in order for a proposal to pass. For +this decision policy, abstain and veto are simply treated as no's. + +## Proposal + +Any member of a group can submit a proposal for a group account to decide upon. +A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal +passes as well as any comment associated with the proposal. + +## Voting + +There are four choices to choose while voting - yes, no, abstain and veto. Not +all decision policies will support them. Votes can contain an optional comment. +During the voting window, accounts that have already voted may change their vote. +In the current implementation, the voting window begins as soon as a proposal +is submitted. + +## Executing Proposals + +Proposals will not be automatically executed by the chain in this current design, +but rather a user must submit a `MsgExec` transaction to attempt to execute the +proposal based on the current votes and decision policy. A future upgrade could +automate this propose and have the group account (or a fee granter) pay. + +## Changing Group Membership + +In the current implementation, changing a group's membership (adding or removing members or changing their power) +will cause all existing proposals for group accounts linked to this group +to be invalidated. They will simply fail if someone calls `MsgExec` and will +eventually be garbage collected. diff --git a/incubator/group/codec.go b/incubator/group/codec.go new file mode 100644 index 0000000..91b6230 --- /dev/null +++ b/incubator/group/codec.go @@ -0,0 +1,35 @@ +package group + +import ( + "github.com/cosmos/cosmos-sdk/codec" +) + +type Codec struct { + codec.Marshaler + + // Keep reference to the amino codec to allow backwards compatibility along + // with type, and interface registration. + amino *codec.Codec +} + +func NewCodec(amino *codec.Codec) *Codec { + return &Codec{Marshaler: codec.NewHybridCodec(amino), amino: amino} +} + +// ---------------------------------------------------------------------------- + +// RegisterCodec registers all the necessary crisis module concrete types and +// interfaces with the provided codec reference. +func RegisterCodec(cdc *codec.Codec) { + cdc.RegisterConcrete(MsgCreateGroup{}, "ccosmos-sdk/MsgCreateGroup", nil) +} + +// generic sealed codec to be used throughout module +var ModuleCdc *Codec + +func init() { + ModuleCdc = NewCodec(codec.New()) + RegisterCodec(ModuleCdc.amino) + codec.RegisterCrypto(ModuleCdc.amino) + ModuleCdc.amino.Seal() +} diff --git a/incubator/group/errors.go b/incubator/group/errors.go new file mode 100644 index 0000000..1f51a6d --- /dev/null +++ b/incubator/group/errors.go @@ -0,0 +1,11 @@ +package group + +import sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + +var ( + ErrEmpty = sdkerrors.Register(ModuleName, 1, "value is empty") + ErrDuplicate = sdkerrors.Register(ModuleName, 2, "duplicate value") + ErrMaxLimit = sdkerrors.Register(ModuleName, 3, "limit exceeded") + ErrType = sdkerrors.Register(ModuleName, 4, "invalid type") + ErrInvalid = sdkerrors.Register(ModuleName, 5, "invalid value") +) diff --git a/incubator/group/genesis.go b/incubator/group/genesis.go new file mode 100644 index 0000000..7274204 --- /dev/null +++ b/incubator/group/genesis.go @@ -0,0 +1,28 @@ +package group + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// GenesisState is the state that must be provided at genesis. +type GenesisState struct { + Params Params `json:"params" yaml:"params"` +} + +// NewGenesisState creates a new genesis state with default values. +func NewGenesisState() GenesisState { + return GenesisState{ + Params: DefaultParams(), + } +} + +func (s GenesisState) Validate() error { + return s.Params.Validate() +} + +// ExportGenesis returns a GenesisState for a given context and Keeper. +func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState { + return GenesisState{ + Params: k.getParams(ctx), + } +} diff --git a/incubator/group/go.mod b/incubator/group/go.mod new file mode 100644 index 0000000..32c47d0 --- /dev/null +++ b/incubator/group/go.mod @@ -0,0 +1,21 @@ +module github.com/cosmos/modules/incubator/group + +go 1.13 + +require ( + github.com/cosmos/cosmos-sdk v0.34.4-0.20200211145837-56c586897525 + github.com/cosmos/modules/incubator/orm v0.0.0-20200117100147-88228b5fa693 + github.com/gogo/protobuf v1.3.1 + github.com/gorilla/mux v1.7.3 + github.com/pkg/errors v0.9.1 + github.com/spf13/cobra v0.0.5 + github.com/stretchr/testify v1.4.0 + github.com/tendermint/tendermint v0.33.0 + github.com/tendermint/tm-db v0.4.0 + gopkg.in/yaml.v2 v2.2.8 +) + +replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.2-alpha.regen.1 + +//replace github.com/cosmos/modules/incubator/orm => github.com/regen-network/cosmos-modules/incubator/orm v0.0.0-20200206151518-3155fe39bfb9 +replace github.com/cosmos/modules/incubator/orm => ../orm diff --git a/incubator/group/go.sum b/incubator/group/go.sum new file mode 100644 index 0000000..4794496 --- /dev/null +++ b/incubator/group/go.sum @@ -0,0 +1,396 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/99designs/keyring v1.1.2/go.mod h1:657DQuMrBZRtuL/voxVyiyb6zpMehlm5vLB9Qwrv904= +github.com/99designs/keyring v1.1.4 h1:x0g0zQ9bQKgNsLo0XSXAy1H8Q1RG/td+5OXJt+Ci8b8= +github.com/99designs/keyring v1.1.4/go.mod h1:657DQuMrBZRtuL/voxVyiyb6zpMehlm5vLB9Qwrv904= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/ChainSafe/go-schnorrkel v0.0.0-20200102211924-4bcbc698314f h1:4O1om+UVU+Hfcihr1timk8YNXHxzZWgCo7ofnrZRApw= +github.com/ChainSafe/go-schnorrkel v0.0.0-20200102211924-4bcbc698314f/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/Workiva/go-datastructures v1.0.50/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= +github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d h1:1aAija9gr0Hyv4KfQcRcwlmFIrhkDmIj2dz5bkg/s/8= +github.com/bartekn/go-bip39 v0.0.0-20171116152956-a05967ea095d/go.mod h1:icNx/6QdFblhsEjZehARqbNumymUT/ydwlLojFdv7Sk= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d h1:xG8Pj6Y6J760xwETNmMzmlt38QSwz0BLp1cZ09g27uw= +github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a h1:RQMUrEILyYJEoAT34XS/kLu40vC0+po/UfxrBBA4qZE= +github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= +github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= +github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cosmos/cosmos-sdk v0.34.4-0.20191013030331-92ea174ea6e6/go.mod h1:IGBhkbOK1ebLqMWjtgo99zUxWHsA5IOb6N9CI8nHs0Y= +github.com/cosmos/cosmos-sdk v0.34.4-0.20200211145837-56c586897525 h1:P5jMpO5yXhWRgPnvbe4tMjm7V+ph9mvk8g70crXHA6E= +github.com/cosmos/cosmos-sdk v0.34.4-0.20200211145837-56c586897525/go.mod h1:sCHkjaHbPpynb5BFw0qSZS7U1VCpIN9ra8lNucoo8Ik= +github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU= +github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/ledger-cosmos-go v0.10.3/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= +github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= +github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= +github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= +github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= +github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= +github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a h1:mq+R6XEM6lJX5VlLyZIrUSP8tSuJp82xTK89hvBwJbU= +github.com/dvsekhvalnov/jose2go v0.0.0-20180829124132-7f401d37b68a/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/etcd-io/bbolt v1.3.2/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= +github.com/etcd-io/bbolt v1.3.3 h1:gSJmxrs37LgTqR/oyJBWok6k6SvXEUerFTbltIhXkBM= +github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= +github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= +github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= +github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y= +github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= +github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-kit/kit v0.6.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129 h1:tT8iWCYw4uOem71yYA3htfH+LNopJvcqZQshm56G5L4= +github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f h1:8N8XWLZelZNibkhM1FuF+3Ad3YIbgirjdMiVA0eUkaM= +github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= +github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= +github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= +github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= +github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= +github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= +github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +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/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.5.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= +github.com/pelletier/go-toml v1.6.0 h1:aetoXYr0Tv7xRU/V4B4IZJ2QcbtMUFoNb3ORp7TzIK4= +github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3 h1:9iH4JKXLzFbOAdtqv/a+j8aewx2Y8lAjAydhbaScPF8= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181020173914-7e9e6cabbd39/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0 h1:7etb9YClo3a6HjLzfl6rIQaU+FDfi0VSX39io3aQ+DM= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084 h1:sofwID9zm4tzrgykg80hfFph1mryUeLRsUfoocVVmRY= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= +github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165 h1:nkcn14uNmFEuGCb2mBZbBb24RdNRL08b/wb+xBOYpuk= +github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/regen-network/cosmos-proto v0.1.0 h1:gsV+YO2kMvY430zQn8ioPXRxEJgb/ms0iMPeWo3VEyY= +github.com/regen-network/cosmos-proto v0.1.0/go.mod h1:+r7jN10xXCypD4yBgzKOa+vgLz0riqYMHeDcKekxPvA= +github.com/regen-network/protobuf v1.3.2-alpha.regen.1 h1:YdeZbBS0lG1D13COb7b57+nM/RGgIs8WF9DwitU6EBM= +github.com/regen-network/protobuf v1.3.2-alpha.regen.1/go.mod h1:lye6mqhOn/GCw1zRl3uPD5VP8rC+LPMyTyPAyQV872U= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.1 h1:qgMbHoJbPbw579P+1zVY+6n4nIFuIchaIjzZ/I/Yq8M= +github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.0.0/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/spf13/viper v1.6.2 h1:7aKfF+e8/k68gda3LOjo5RxiUqddoFxVq4BKBPrxk5E= +github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stumble/gorocksdb v0.0.3/go.mod h1:v6IHdFBXk5DJ1K4FZ0xi+eY737quiiBxYtSWXadLybY= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= +github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= +github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= +github.com/tecbot/gorocksdb v0.0.0-20191017175515-d217d93fd4c5 h1:gVwAW5OwaZlDB5/CfqcGFM9p9C+KxvQKyNOltQ8orj0= +github.com/tecbot/gorocksdb v0.0.0-20191017175515-d217d93fd4c5/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= +github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= +github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= +github.com/tendermint/crypto v0.0.0-20190823183015-45b1026d81ae/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= +github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= +github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= +github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso= +github.com/tendermint/go-amino v0.15.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tendermint/go-amino v0.15.1 h1:D2uk35eT4iTsvJd9jWIetzthE5C0/k2QmMFkCN+4JgQ= +github.com/tendermint/go-amino v0.15.1/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tendermint/iavl v0.12.4/go.mod h1:8LHakzt8/0G3/I8FUU0ReNx98S/EP6eyPJkAUvEXT/o= +github.com/tendermint/iavl v0.13.0 h1:r2sINvNFlJsLlLhGoqlqPlREWYkuK26BvMfkBt+XQnA= +github.com/tendermint/iavl v0.13.0/go.mod h1:7nSUPdrsHEZ2nNZa+9gaIrcJciWd1jCQZXtcyARU82k= +github.com/tendermint/tendermint v0.32.1/go.mod h1:jmPDAKuNkev9793/ivn/fTBnfpA9mGBww8MPRNPNxnU= +github.com/tendermint/tendermint v0.32.6/go.mod h1:D2+A3pNjY+Po72X0mTfaXorFhiVI8dh/Zg640FGyGtE= +github.com/tendermint/tendermint v0.33.0 h1:TW1g9sQs3YSqKM8o1+opL3/VmBy4Ke/VKV9MxYpqNbI= +github.com/tendermint/tendermint v0.33.0/go.mod h1:s5UoymnPIY+GcA3mMte4P9gpMP8vS7UH7HBXikT1pHI= +github.com/tendermint/tm-db v0.1.1/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= +github.com/tendermint/tm-db v0.2.0/go.mod h1:0cPKWu2Mou3IlxecH+MEUSYc1Ch537alLe6CpFrKzgw= +github.com/tendermint/tm-db v0.4.0 h1:iPbCcLbf4nwDFhS39Zo1lpdS1X/cT9CkTlUx17FHQgA= +github.com/tendermint/tm-db v0.4.0/go.mod h1:+Cwhgowrf7NBGXmsqFMbwEtbo80XmyrlY5Jsk95JubQ= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= +github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vKV/xzVTO7XPAwm8xbf4w2g= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7 h1:rTIdg5QFRR7XCaK4LCjBiPbx8j4DQRpdYMnGn/bJUEU= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 h1:efeOvDhwQ29Dj3SdAV/MJf8oukgn+8D8WgaCaRMchF8= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20200110213125-a7a6caa82ab2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f h1:2wh8dWY8959cBGQvk1RD+/eQBgRYYDaZ+hT0/zsARoA= +google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.13.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/incubator/group/group.go b/incubator/group/group.go new file mode 100644 index 0000000..55464c5 --- /dev/null +++ b/incubator/group/group.go @@ -0,0 +1,118 @@ +package group + +import ( + "encoding/json" + "fmt" + + "github.com/cosmos/cosmos-sdk/client/context" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/gorilla/mux" + "github.com/spf13/cobra" + "github.com/tendermint/tendermint/abci/types" + abci "github.com/tendermint/tendermint/abci/types" +) + +const ( + // ModuleName is the module name constant used in many places + ModuleName = "group" + + // StoreKey defines the primary module store key + StoreKeyName = ModuleName + + // RouterKey defines the module's message routing key + RouterKey = ModuleName + + // QuerierRoute defines the module's query routing key + QuerierRoute = ModuleName + + DefaultParamspace = ModuleName +) + +type AppModule struct { + keeper Keeper +} + +func NewAppModule(keeper Keeper) AppModule { + return AppModule{ + keeper: keeper, + } +} + +func (a AppModule) Name() string { + return ModuleName +} + +func (a AppModule) RegisterCodec(cdc *codec.Codec) { + RegisterCodec(cdc) +} + +func (a AppModule) DefaultGenesis() json.RawMessage { + return ModuleCdc.MustMarshalJSON(NewGenesisState()) +} + +func (a AppModule) ValidateGenesis(bz json.RawMessage) error { + var data GenesisState + if err := ModuleCdc.UnmarshalJSON(bz, &data); err != nil { + return err + } + return data.Validate() +} + +func (a AppModule) RegisterRESTRoutes(ctx context.CLIContext, r *mux.Router) { + //rest.RegisterRoutes(ctx, r, ModuleCdc, RouterKey) + // todo: what client functions do we want to support? + panic("implement me") +} + +func (a AppModule) GetTxCmd(*codec.Codec) *cobra.Command { + //return cli.GetTxCmd(StoreKey, cdc) + panic("implement me") +} + +func (a AppModule) GetQueryCmd(*codec.Codec) *cobra.Command { + //return cli.GetQueryCmd(StoreKey, cdc) + panic("implement me") +} + +func (a AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []types.ValidatorUpdate { + var genesisState GenesisState + ModuleCdc.MustUnmarshalJSON(data, &genesisState) + if err := genesisState.Validate(); err != nil { + panic(fmt.Sprintf("failed to validate %s genesis state: %s", ModuleName, err)) + } + a.keeper.setParams(ctx, genesisState.Params) + return []abci.ValidatorUpdate{} + +} + +func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage { + gs := ExportGenesis(ctx, a.keeper) + return ModuleCdc.MustMarshalJSON(gs) +} + +func (a AppModule) RegisterInvariants(sdk.InvariantRegistry) { + // todo: anything to check? +} + +func (a AppModule) Route() string { + return RouterKey +} + +func (a AppModule) NewHandler() sdk.Handler { + return NewHandler(a.keeper) +} + +func (a AppModule) QuerierRoute() string { + return QuerierRoute +} + +func (a AppModule) NewQuerierHandler() sdk.Querier { + return NewQuerier(a.keeper) +} + +func (a AppModule) BeginBlock(sdk.Context, types.RequestBeginBlock) {} + +func (a AppModule) EndBlock(sdk.Context, types.RequestEndBlock) []types.ValidatorUpdate { + return nil +} diff --git a/incubator/group/handler.go b/incubator/group/handler.go new file mode 100644 index 0000000..332fbfe --- /dev/null +++ b/incubator/group/handler.go @@ -0,0 +1,50 @@ +package group + +import ( + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/pkg/errors" +) + +func NewHandler(k Keeper) sdk.Handler { + return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { + ctx = ctx.WithEventManager(sdk.NewEventManager()) + switch msg := msg.(type) { + case MsgCreateGroup: + return handleMsgCreateGroup(ctx, k, msg) + //case MsgUpdateGroupMembers: + // return handleMsgUpdateGroupMembers(ctx, k, msg) + //case MsgUpdateGroupAdmin: + // return handleMsgUpdateGroupAdmin(ctx, k, msg) + //case MsgUpdateGroupComment: + // return handleMsgUpdateGroupComment(ctx, k, msg) + default: + return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized group message type: %T", msg) + } + } + +} + +func handleMsgCreateGroup(ctx sdk.Context, k Keeper, msg MsgCreateGroup) (*sdk.Result, error) { + id, err := k.CreateGroup(ctx, msg.Admin, msg.Members, msg.Comment) + if err != nil { + return nil, errors.Wrap(err, "create group") + } + + ctx.EventManager().EmitEvent( + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, ModuleName), + sdk.NewAttribute(sdk.AttributeKeySender, msg.Admin.String()), + ), + ) + + //TODO: the data/ log response is not specified + return &sdk.Result{ + Data: id.Byte(), + Log: fmt.Sprintf("New group created with id %d", id), + Events: ctx.EventManager().Events(), + }, nil +} diff --git a/incubator/group/integration_test.go b/incubator/group/integration_test.go new file mode 100644 index 0000000..33abe22 --- /dev/null +++ b/incubator/group/integration_test.go @@ -0,0 +1,71 @@ +package group + +import ( + "testing" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/modules/incubator/orm" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/libs/log" + dbm "github.com/tendermint/tm-db" +) + +func createTestApp(isCheckTx bool) (*SimApp, sdk.Context) { + db := dbm.NewMemDB() + app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, 0) + genesisState := ModuleBasics.DefaultGenesis() + stateBytes, err := codec.MarshalJSONIndent(app.Codec(), genesisState) + if err != nil { + panic(err) + } + + // Initialize the chain + app.InitChain( + abci.RequestInitChain{ + Validators: []abci.ValidatorUpdate{}, + AppStateBytes: stateBytes, + }, + ) + app.Commit() + header := abci.Header{Height: app.LastBlockHeight() + 1} + app.BeginBlock(abci.RequestBeginBlock{Header: header}) + + ctx := app.NewContext(isCheckTx, header) + return app, ctx +} + +func TestCreateGroupScenario(t *testing.T) { + app, ctx := createTestApp(false) + priv1, _, addr1 := types.KeyTestPubAddr() + acc1 := app.AccountKeeper.NewAccountWithAddress(ctx, addr1) + app.AccountKeeper.SetAccount(ctx, acc1) + + balances := sdk.NewCoins(sdk.NewInt64Coin("atom", 1000)) + require.NoError(t, app.BankKeeper.SetBalances(ctx, addr1, balances)) + + fee := types.NewTestStdFee() + + msgs := []sdk.Msg{MsgCreateGroup{ + Admin: addr1, + Members: []Member{{ + Address: addr1, + Power: sdk.NewDec(1), + Comment: "foo", + }}, + Comment: "integration test", + }} + + privs, accNums, seqs := []crypto.PrivKey{priv1}, acc1.GetAccountNumber(), acc1.GetSequence() + tx := types.NewTestTx(ctx, msgs, privs, []uint64{accNums}, []uint64{seqs}, fee) + + resp := app.DeliverTx(abci.RequestDeliverTx{Tx: app.Codec().MustMarshalBinaryLengthPrefixed(tx)}) + + require.Equal(t, uint32(0), resp.Code, resp.Log) + assert.Equal(t, orm.EncodeSequence(1), resp.Data) + assert.True(t, app.GroupKeeper.groupTable.Has(ctx, resp.Data)) +} diff --git a/incubator/group/keeper.go b/incubator/group/keeper.go new file mode 100644 index 0000000..2e7ad4c --- /dev/null +++ b/incubator/group/keeper.go @@ -0,0 +1,280 @@ +package group + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/params" + "github.com/cosmos/modules/incubator/orm" +) + +const ( + // Group Table + GroupTablePrefix byte = 0x0 + GroupTableSeqPrefix byte = 0x1 + GroupByAdminIndexPrefix byte = 0x2 + + // Group Member Table + GroupMemberTablePrefix byte = 0x10 + GroupMemberByGroupIndexPrefix byte = 0x11 + GroupMemberByMemberIndexPrefix byte = 0x12 + + // Group Account Table + GroupAccountTablePrefix byte = 0x20 + GroupAccountByGroupIndexPrefix byte = 0x21 + GroupAccountByAdminIndexPrefix byte = 0x22 + + // ProposalBase Table + ProposalBaseTablePrefix byte = 0x30 + ProposalBaseTableSeqPrefix byte = 0x31 + ProposalBaseByGroupAccountIndexPrefix byte = 0x32 + ProposalBaseByProposerIndexPrefix byte = 0x33 + + // Vote Table + VoteTablePrefix byte = 0x40 + VoteByProposalBaseIndexPrefix byte = 0x41 + VoteByVoterIndexPrefix byte = 0x42 +) + +type Keeper struct { + key sdk.StoreKey + + // Group Table + groupTable orm.Table + groupByAdminIndex orm.Index + + // Group Member Table + groupMemberTable orm.NaturalKeyTable + groupMemberByGroupIndex orm.UInt64Index + groupMemberByMemberIndex orm.Index + + // Group Account Table + groupAccountTable orm.NaturalKeyTable + groupAccountByGroupIndex orm.UInt64Index + groupAccountByAdminIndex orm.Index + + // ProposalBase Table + ProposalBaseTable orm.AutoUInt64Table + ProposalBaseByGroupAccountIndex orm.Index + ProposalBaseByProposerIndex orm.Index + + // Vote Table + voteTable orm.NaturalKeyTable + voteByProposalBaseIndex orm.UInt64Index + voteByVoterIndex orm.Index + groupSeq orm.Sequence + + paramSpace params.Subspace +} + +func NewGroupKeeper(storeKey sdk.StoreKey, paramSpace params.Subspace) Keeper { + // set KeyTable if it has not already been set + if !paramSpace.HasKeyTable() { + paramSpace = paramSpace.WithKeyTable(params.NewKeyTable().RegisterParamSet(&Params{})) + } + + k := Keeper{key: storeKey, paramSpace: paramSpace} + + // + // Group Table + // + groupTableBuilder := orm.NewTableBuilder(GroupTablePrefix, storeKey, &GroupMetadata{}, orm.FixLengthIndexKeys(orm.EncodedSeqLength)) + k.groupSeq = orm.NewSequence(storeKey, GroupTableSeqPrefix) + k.groupByAdminIndex = orm.NewIndex(groupTableBuilder, GroupByAdminIndexPrefix, func(val interface{}) ([]orm.RowID, error) { + return []orm.RowID{val.(*GroupMetadata).Admin.Bytes()}, nil + }) + k.groupTable = groupTableBuilder.Build() + + // + // Group Member Table + // + groupMemberTableBuilder := orm.NewNaturalKeyTableBuilder(GroupMemberTablePrefix, storeKey, &GroupMember{}, orm.Max255DynamicLengthIndexKeyCodec{}) + k.groupMemberByGroupIndex = orm.NewUInt64Index(groupMemberTableBuilder, GroupMemberByGroupIndexPrefix, func(val interface{}) ([]uint64, error) { + group := val.(*GroupMember).Group + return []uint64{uint64(group)}, nil + }) + k.groupMemberByMemberIndex = orm.NewIndex(groupMemberTableBuilder, GroupMemberByMemberIndexPrefix, func(val interface{}) ([]orm.RowID, error) { + member := val.(*GroupMember).Member + return []orm.RowID{member.Bytes()}, nil + }) + k.groupMemberTable = groupMemberTableBuilder.Build() + + // + // Group Account Table + // + groupAccountTableBuilder := orm.NewNaturalKeyTableBuilder(GroupAccountTablePrefix, storeKey, &GroupAccountMetadataBase{}, orm.Max255DynamicLengthIndexKeyCodec{}) + k.groupAccountByGroupIndex = orm.NewUInt64Index(groupAccountTableBuilder, GroupAccountByGroupIndexPrefix, func(value interface{}) ([]uint64, error) { + group := value.(*GroupAccountMetadataBase).Group + return []uint64{uint64(group)}, nil + }) + k.groupAccountByAdminIndex = orm.NewIndex(groupAccountTableBuilder, GroupAccountByAdminIndexPrefix, func(value interface{}) ([]orm.RowID, error) { + admin := value.(*GroupAccountMetadataBase).Admin + return []orm.RowID{admin.Bytes()}, nil + }) + k.groupAccountTable = groupAccountTableBuilder.Build() + + // + // ProposalBase Table + // + ProposalBaseTableBuilder := orm.NewAutoUInt64TableBuilder(ProposalBaseTablePrefix, ProposalBaseTableSeqPrefix, storeKey, &ProposalBase{}) + k.ProposalBaseByGroupAccountIndex = orm.NewIndex(ProposalBaseTableBuilder, ProposalBaseByGroupAccountIndexPrefix, func(value interface{}) ([]orm.RowID, error) { + account := value.(*ProposalBase).GroupAccount + return []orm.RowID{account.Bytes()}, nil + + }) + k.ProposalBaseByProposerIndex = orm.NewIndex(ProposalBaseTableBuilder, ProposalBaseByProposerIndexPrefix, func(value interface{}) ([]orm.RowID, error) { + proposers := value.(*ProposalBase).Proposers + r := make([]orm.RowID, len(proposers)) + for i := range proposers { + r[i] = proposers[i].Bytes() + } + return r, nil + }) + k.ProposalBaseTable = ProposalBaseTableBuilder.Build() + + // + // Vote Table + // + voteTableBuilder := orm.NewNaturalKeyTableBuilder(VoteTablePrefix, storeKey, &Vote{}, orm.Max255DynamicLengthIndexKeyCodec{}) + k.voteByProposalBaseIndex = orm.NewUInt64Index(voteTableBuilder, VoteByProposalBaseIndexPrefix, func(value interface{}) ([]uint64, error) { + return []uint64{uint64(value.(*Vote).Proposal)}, nil + }) + k.voteByVoterIndex = orm.NewIndex(voteTableBuilder, VoteByVoterIndexPrefix, func(value interface{}) ([]orm.RowID, error) { + return []orm.RowID{value.(*Vote).Voter.Bytes()}, nil + }) + k.voteTable = voteTableBuilder.Build() + + return k +} + +// MaxCommentSize returns the maximum length of a comment +func (k Keeper) MaxCommentSize(ctx sdk.Context) int { + var result uint32 + k.paramSpace.Get(ctx, ParamMaxCommentLength, &result) + return int(result) +} + +func (k Keeper) CreateGroup(ctx sdk.Context, admin sdk.AccAddress, members []Member, comment string) (GroupID, error) { + maxCommentSize := k.MaxCommentSize(ctx) + if len(comment) > maxCommentSize { + return 0, errors.Wrap(ErrMaxLimit, "group comment") + } + id := k.groupSeq.NextVal(ctx) + var groupID = GroupID(id) + err := k.groupTable.Create(ctx, orm.EncodeSequence(id), &GroupMetadata{ + Group: groupID, + Admin: admin, + Comment: comment, + Version: 0, + }) + if err != nil { + return 0, errors.Wrap(err, "could not create group") + } + + for i := range members { + m := members[i] + if len(m.Comment) > maxCommentSize { + return 0, errors.Wrap(ErrMaxLimit, "group comment") + } + + err := k.groupMemberTable.Create(ctx, &GroupMember{ + Group: groupID, + Member: m.Address, + Weight: m.Power, + }) + if err != nil { + return 0, errors.Wrapf(err, "could not store member %d", i) + } + } + return groupID, nil +} + +func (k Keeper) UpdateGroupMembers(ctx orm.HasKVStore, groupID GroupID, membersUpdates []Member) error { + panic("implement me") +} + +func (k Keeper) UpdateGroupAdmin(ctx orm.HasKVStore, groupID GroupID, newAdmin sdk.AccAddress) error { + var obj GroupMetadata + rowID := orm.EncodeSequence(uint64(groupID)) + err := k.groupTable.GetOne(ctx, rowID, &obj) + if err != nil { + return err + } + obj.Admin = newAdmin + return k.groupTable.Save(ctx, rowID, &obj) +} + +func (k Keeper) UpdateGroupComment(ctx orm.HasKVStore, groupID GroupID, newComment string) error { + var obj GroupMetadata + rowID := orm.EncodeSequence(uint64(groupID)) + err := k.groupTable.GetOne(ctx, rowID, &obj) + if err != nil { + return err + } + obj.Comment = newComment + return k.groupTable.Save(ctx, rowID, &obj) +} + +func (k Keeper) getParams(ctx sdk.Context) Params { + var p Params + k.paramSpace.GetParamSet(ctx, &p) + return p +} + +func (k Keeper) setParams(ctx sdk.Context, params Params) { + k.paramSpace.SetParamSet(ctx, ¶ms) +} + +//func (k Keeper) CreateGroupAccount(ctx orm.HasKVStore, admin sdk.AccAddress, groupID GroupID, policy DecisionPolicy, comment string) (sdk.AccAddress, error) { +// panic("implement me") +//} +// +//func (k Keeper) UpdateGroupAccountAdmin(ctx orm.HasKVStore, groupAcc sdk.AccAddress, newAdmin sdk.AccAddress) error { +// panic("implement me") +//} +// +//func (k Keeper) UpdateGroupAccountDecisionPolicy(ctx orm.HasKVStore, groupAcc sdk.AccAddress, newPolicy DecisionPolicy) error { +// panic("implement me") +//} +// +//func (k Keeper) UpdateGroupAccountComment(ctx orm.HasKVStore, groupAcc sdk.AccAddress, newComment string) error { +// panic("implement me") +//} +// +//func (k Keeper) Propose(ctx orm.HasKVStore, groupAcc sdk.AccAddress, approvers []sdk.AccAddress, msgs []sdk.Msg, comment string, execNow bool) (id ProposalID, execResult sdk.Result) { +// panic("implement me") +//} +// +//func (k Keeper) Vote(ctx orm.HasKVStore, id ProposalID, voters []sdk.AccAddress, choice Choice) error { +// panic("implement me") +//} +// +//func (k Keeper) Exec(ctx orm.HasKVStore, id ProposalID) sdk.Result { +// panic("implement me") +//} + +type KeeperDELME interface { // obsolete when Keeper implements all functions + // Groups + CreateGroup(ctx orm.HasKVStore, admin sdk.AccAddress, members []Member, comment string) (GroupID, error) + UpdateGroupMembers(ctx orm.HasKVStore, group GroupID, membersUpdates []Member) error + UpdateGroupAdmin(ctx orm.HasKVStore, group GroupID, newAdmin sdk.AccAddress) error + UpdateGroupComment(ctx orm.HasKVStore, group GroupID, newComment string) error + + // Group Accounts + CreateGroupAccount(ctx orm.HasKVStore, admin sdk.AccAddress, group GroupID, policy DecisionPolicy, comment string) (sdk.AccAddress, error) + UpdateGroupAccountAdmin(ctx orm.HasKVStore, groupAcc sdk.AccAddress, newAdmin sdk.AccAddress) error + UpdateGroupAccountDecisionPolicy(ctx orm.HasKVStore, groupAcc sdk.AccAddress, newPolicy DecisionPolicy) error + UpdateGroupAccountComment(ctx orm.HasKVStore, groupAcc sdk.AccAddress, newComment string) error + + // ProposalBases + + // Propose returns a new ProposalBase ID and a populated sdk.Result which could return an error + // or the result of execution if execNow was set to true + Propose(ctx orm.HasKVStore, groupAcc sdk.AccAddress, approvers []sdk.AccAddress, msgs []sdk.Msg, comment string, execNow bool) (id ProposalID, execResult sdk.Result) + + Vote(ctx orm.HasKVStore, id ProposalID, voters []sdk.AccAddress, choice Choice) error + + // Exec attempts to execute the specified ProposalBase. If the ProposalBase is in a valid + // state and has enough approvals, then it will be executed and its result will be + // returned, otherwise the result will contain an error + Exec(ctx orm.HasKVStore, id ProposalID) sdk.Result +} diff --git a/incubator/group/keeper_test.go b/incubator/group/keeper_test.go new file mode 100644 index 0000000..f8446ba --- /dev/null +++ b/incubator/group/keeper_test.go @@ -0,0 +1,46 @@ +package group + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/params" + "github.com/cosmos/cosmos-sdk/x/params/subspace" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestCreateGroup(t *testing.T) { + pKey, pTKey := sdk.NewKVStoreKey(params.StoreKey), sdk.NewTransientStoreKey(params.TStoreKey) + paramSpace := subspace.NewSubspace(ModuleCdc.amino, pKey, pTKey, DefaultParamspace) + + groupKey := sdk.NewKVStoreKey(StoreKeyName) + k := NewGroupKeeper(groupKey, paramSpace) + + members := []Member{{ + Address: sdk.AccAddress([]byte("member-address")), + Power: sdk.NewDec(1), + Comment: "first", + }} + ctx := NewContext(pKey, pTKey, groupKey) + k.setParams(ctx, DefaultParams()) + + id, err := k.CreateGroup(ctx, []byte("admin-address"), members, "test") + require.NoError(t, err) + assert.Equal(t, GroupID(1), id) +} + +func TestLoadParam(t *testing.T) { + pKey, pTKey := sdk.NewKVStoreKey(params.StoreKey), sdk.NewTransientStoreKey(params.TStoreKey) + paramSpace := subspace.NewSubspace(ModuleCdc.amino, pKey, pTKey, DefaultParamspace) + + groupKey := sdk.NewKVStoreKey(StoreKeyName) + k := NewGroupKeeper(groupKey, paramSpace) + + ctx := NewContext(pKey, pTKey, groupKey) + + myParams := Params{MaxCommentLength: 1} + paramSpace.SetParamSet(ctx, &myParams) + + assert.Equal(t, myParams, k.getParams(ctx)) +} diff --git a/incubator/group/msg.go b/incubator/group/msg.go new file mode 100644 index 0000000..fc9cbeb --- /dev/null +++ b/incubator/group/msg.go @@ -0,0 +1,56 @@ +package group + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/pkg/errors" +) + +var _ sdk.Msg = &MsgCreateGroup{} + +const ( + msgTypeGroup = "create_group" +) + +func (m MsgCreateGroup) Route() string { return ModuleName } +func (m MsgCreateGroup) Type() string { return msgTypeGroup } + +// GetSigners returns the addresses that must sign over msg.GetSignBytes() +func (m MsgCreateGroup) GetSigners() []sdk.AccAddress { + // TODO: @aaronc ok with this constraint? We can enforce the signature on creation. Also see `MsgUpdateGroupAdmin.GetSigners()`. + return []sdk.AccAddress{m.Admin} +} + +// GetSignBytes returns the bytes for the message signer to sign on +func (m MsgCreateGroup) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(m)) +} + +// ValidateBasic does a sanity check on the provided data +func (m MsgCreateGroup) ValidateBasic() error { + if m.Admin.Empty() { + return sdkerrors.Wrap(ErrEmpty, "admin") + } + index := make(map[string]struct{}, len(m.Members)) + for i := range m.Members { + member := m.Members[i] + if err := member.ValidateBasic(); err != nil { + return sdkerrors.Wrap(err, "member") + } + if member.Power.LTE(sdk.ZeroDec()) { + return sdkerrors.Wrap(ErrEmpty, "member power") + } + addr := member.Address.String() + if _, exists := index[addr]; exists { + return errors.Wrapf(ErrDuplicate, "address: %s", addr) + } + } + // todo: test + // empty members list allowed + // max members list allowed??? + // duplicate member address + // member address empty + // Power -1, 0 + // comment >max + return nil +} diff --git a/incubator/group/protocgen.sh b/incubator/group/protocgen.sh new file mode 100755 index 0000000..2cdc38a --- /dev/null +++ b/incubator/group/protocgen.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -eo pipefail + +protoc \ +-I. \ +-I=$(go list -f "{{ .Dir }}" -m github.com/gogo/protobuf) \ +--gocosmos_out=\ +Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\ +Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ +Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,\ +Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,\ +Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ +Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,\ +plugins=interfacetype+grpc,paths=source_relative:. \ +types.proto diff --git a/incubator/group/querier.go b/incubator/group/querier.go new file mode 100644 index 0000000..cc8653c --- /dev/null +++ b/incubator/group/querier.go @@ -0,0 +1,17 @@ +package group + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + abci "github.com/tendermint/tendermint/abci/types" +) + +func NewQuerier(k Keeper) sdk.Querier { + return func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { + switch path[0] { + // TODO: define supported queries and return types + default: + return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown query path: %s", path[0]) + } + } +} diff --git a/incubator/group/sim_app_test.go b/incubator/group/sim_app_test.go new file mode 100644 index 0000000..de3a7f0 --- /dev/null +++ b/incubator/group/sim_app_test.go @@ -0,0 +1,392 @@ +package group + +import ( + "encoding/json" + "io" + + bam "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/simapp" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/version" + "github.com/cosmos/cosmos-sdk/x/auth" + "github.com/cosmos/cosmos-sdk/x/auth/ante" + "github.com/cosmos/cosmos-sdk/x/auth/vesting" + "github.com/cosmos/cosmos-sdk/x/bank" + "github.com/cosmos/cosmos-sdk/x/crisis" + distr "github.com/cosmos/cosmos-sdk/x/distribution" + "github.com/cosmos/cosmos-sdk/x/evidence" + "github.com/cosmos/cosmos-sdk/x/genutil" + "github.com/cosmos/cosmos-sdk/x/gov" + "github.com/cosmos/cosmos-sdk/x/mint" + "github.com/cosmos/cosmos-sdk/x/params" + paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" + "github.com/cosmos/cosmos-sdk/x/slashing" + "github.com/cosmos/cosmos-sdk/x/staking" + "github.com/cosmos/cosmos-sdk/x/supply" + "github.com/cosmos/cosmos-sdk/x/upgrade" + upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" + tmos "github.com/tendermint/tendermint/libs/os" + "github.com/tendermint/tendermint/types" + dbm "github.com/tendermint/tm-db" +) + +const appName = "SimApp" + +var ( + // ModuleBasics defines the module BasicManager is in charge of setting up basic, + // non-dependant module elements, such as codec registration + // and genesis verification. + ModuleBasics = module.NewBasicManager( + auth.AppModuleBasic{}, + supply.AppModuleBasic{}, + genutil.AppModuleBasic{}, + bank.AppModuleBasic{}, + staking.AppModuleBasic{}, + mint.AppModuleBasic{}, + distr.AppModuleBasic{}, + gov.NewAppModuleBasic( + paramsclient.ProposalHandler, distr.ProposalHandler, upgradeclient.ProposalHandler, + ), + params.AppModuleBasic{}, + crisis.AppModuleBasic{}, + slashing.AppModuleBasic{}, + upgrade.AppModuleBasic{}, + evidence.AppModuleBasic{}, + AppModule{}, + ) + + // module account permissions + maccPerms = map[string][]string{ + auth.FeeCollectorName: nil, + distr.ModuleName: nil, + mint.ModuleName: {supply.Minter}, + staking.BondedPoolName: {supply.Burner, supply.Staking}, + staking.NotBondedPoolName: {supply.Burner, supply.Staking}, + gov.ModuleName: {supply.Burner}, + } + + // module accounts that are allowed to receive tokens + allowedReceivingModAcc = map[string]bool{ + distr.ModuleName: true, + } +) + +// Verify app interface at compile time +var _ simapp.App = (*SimApp)(nil) + +// SimApp extends an ABCI application, but with most of its parameters exported. +// They are exported for convenience in creating helper functions, as object +// capabilities aren't needed for testing. +// +// The code was copied from cosmos-sdk `simapp.SimApp` as there are no extension points to add a custom handler. +type SimApp struct { + *bam.BaseApp + cdc *codec.Codec + + invCheckPeriod uint + + // keys to access the substores + keys map[string]*sdk.KVStoreKey + tkeys map[string]*sdk.TransientStoreKey + + // subspaces + subspaces map[string]params.Subspace + + // keepers + AccountKeeper auth.AccountKeeper + BankKeeper bank.Keeper + SupplyKeeper supply.Keeper + StakingKeeper staking.Keeper + SlashingKeeper slashing.Keeper + MintKeeper mint.Keeper + DistrKeeper distr.Keeper + GovKeeper gov.Keeper + CrisisKeeper crisis.Keeper + UpgradeKeeper upgrade.Keeper + ParamsKeeper params.Keeper + EvidenceKeeper evidence.Keeper + GroupKeeper Keeper + + // the module manager + mm *module.Manager + + // simulation manager + sm *module.SimulationManager +} + +// NewSimApp returns a reference to an initialized SimApp. +func NewSimApp( + logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, + invCheckPeriod uint, baseAppOptions ...func(*bam.BaseApp), +) *SimApp { + + appCodec := simapp.NewAppCodec() + + // TODO: Remove cdc in favor of appCodec once all modules are migrated. + var cdc = codec.New() + ModuleBasics.RegisterCodec(cdc) + vesting.RegisterCodec(cdc) + sdk.RegisterCodec(cdc) + codec.RegisterCrypto(cdc) + + bApp := bam.NewBaseApp(appName, logger, db, auth.DefaultTxDecoder(cdc), baseAppOptions...) + bApp.SetCommitMultiStoreTracer(traceStore) + bApp.SetAppVersion(version.Version) + + keys := sdk.NewKVStoreKeys( + bam.MainStoreKey, auth.StoreKey, bank.StoreKey, staking.StoreKey, + supply.StoreKey, mint.StoreKey, distr.StoreKey, slashing.StoreKey, + gov.StoreKey, params.StoreKey, upgrade.StoreKey, evidence.StoreKey, + StoreKeyName, + ) + tkeys := sdk.NewTransientStoreKeys(params.TStoreKey) + + app := &SimApp{ + BaseApp: bApp, + cdc: cdc, + invCheckPeriod: invCheckPeriod, + keys: keys, + tkeys: tkeys, + subspaces: make(map[string]params.Subspace), + } + + // init params keeper and subspaces + app.ParamsKeeper = params.NewKeeper(app.cdc, keys[params.StoreKey], tkeys[params.TStoreKey]) + app.subspaces[auth.ModuleName] = app.ParamsKeeper.Subspace(auth.DefaultParamspace) + app.subspaces[bank.ModuleName] = app.ParamsKeeper.Subspace(bank.DefaultParamspace) + app.subspaces[staking.ModuleName] = app.ParamsKeeper.Subspace(staking.DefaultParamspace) + app.subspaces[mint.ModuleName] = app.ParamsKeeper.Subspace(mint.DefaultParamspace) + app.subspaces[distr.ModuleName] = app.ParamsKeeper.Subspace(distr.DefaultParamspace) + app.subspaces[slashing.ModuleName] = app.ParamsKeeper.Subspace(slashing.DefaultParamspace) + app.subspaces[gov.ModuleName] = app.ParamsKeeper.Subspace(gov.DefaultParamspace).WithKeyTable(gov.ParamKeyTable()) + app.subspaces[crisis.ModuleName] = app.ParamsKeeper.Subspace(crisis.DefaultParamspace) + app.subspaces[evidence.ModuleName] = app.ParamsKeeper.Subspace(evidence.DefaultParamspace) + app.subspaces[ModuleName] = app.ParamsKeeper.Subspace(DefaultParamspace) + + // add keepers + app.AccountKeeper = auth.NewAccountKeeper( + app.cdc, keys[auth.StoreKey], app.subspaces[auth.ModuleName], auth.ProtoBaseAccount, + ) + app.BankKeeper = bank.NewBaseKeeper( + app.cdc, keys[bank.StoreKey], app.AccountKeeper, app.subspaces[bank.ModuleName], app.BlacklistedAccAddrs(), + ) + app.SupplyKeeper = supply.NewKeeper( + app.cdc, keys[supply.StoreKey], app.AccountKeeper, app.BankKeeper, maccPerms, + ) + stakingKeeper := staking.NewKeeper( + appCodec.Staking, keys[staking.StoreKey], app.BankKeeper, app.SupplyKeeper, app.subspaces[staking.ModuleName], + ) + app.MintKeeper = mint.NewKeeper( + app.cdc, keys[mint.StoreKey], app.subspaces[mint.ModuleName], &stakingKeeper, + app.SupplyKeeper, auth.FeeCollectorName, + ) + app.DistrKeeper = distr.NewKeeper( + appCodec.Distribution, keys[distr.StoreKey], app.subspaces[distr.ModuleName], app.BankKeeper, &stakingKeeper, + app.SupplyKeeper, auth.FeeCollectorName, app.ModuleAccountAddrs(), + ) + app.SlashingKeeper = slashing.NewKeeper( + app.cdc, keys[slashing.StoreKey], &stakingKeeper, app.subspaces[slashing.ModuleName], + ) + app.CrisisKeeper = crisis.NewKeeper( + app.subspaces[crisis.ModuleName], invCheckPeriod, app.SupplyKeeper, auth.FeeCollectorName, + ) + app.UpgradeKeeper = upgrade.NewKeeper(skipUpgradeHeights, keys[upgrade.StoreKey], app.cdc) + + // create evidence keeper with router + evidenceKeeper := evidence.NewKeeper( + app.cdc, keys[evidence.StoreKey], app.subspaces[evidence.ModuleName], &app.StakingKeeper, app.SlashingKeeper, + ) + app.GroupKeeper = NewGroupKeeper(keys[StoreKeyName], app.subspaces[ModuleName]) + + evidenceRouter := evidence.NewRouter() + // TODO: Register evidence routes. + evidenceKeeper.SetRouter(evidenceRouter) + app.EvidenceKeeper = *evidenceKeeper + + // register the proposal types + govRouter := gov.NewRouter() + govRouter.AddRoute(gov.RouterKey, gov.ProposalHandler). + AddRoute(params.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). + AddRoute(distr.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)). + AddRoute(upgrade.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)) + app.GovKeeper = gov.NewKeeper( + app.cdc, keys[gov.StoreKey], app.subspaces[gov.ModuleName], app.SupplyKeeper, + &stakingKeeper, govRouter, + ) + + // register the staking hooks + // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks + app.StakingKeeper = *stakingKeeper.SetHooks( + staking.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()), + ) + + // NOTE: Any module instantiated in the module manager that is later modified + // must be passed by reference here. + app.mm = module.NewManager( + genutil.NewAppModule(app.AccountKeeper, app.StakingKeeper, app.BaseApp.DeliverTx), + auth.NewAppModule(app.AccountKeeper), + bank.NewAppModule(app.BankKeeper, app.AccountKeeper), + crisis.NewAppModule(&app.CrisisKeeper), + supply.NewAppModule(app.SupplyKeeper, app.BankKeeper, app.AccountKeeper), + gov.NewAppModule(app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.SupplyKeeper), + mint.NewAppModule(app.MintKeeper), + slashing.NewAppModule(app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), + distr.NewAppModule(app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.SupplyKeeper, app.StakingKeeper), + staking.NewAppModule(app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.SupplyKeeper), + upgrade.NewAppModule(app.UpgradeKeeper), + evidence.NewAppModule(app.EvidenceKeeper), + NewAppModule(app.GroupKeeper), + ) + + // During begin block slashing happens after distr.BeginBlocker so that + // there is nothing left over in the validator fee pool, so as to keep the + // CanWithdrawInvariant invariant. + app.mm.SetOrderBeginBlockers(upgrade.ModuleName, mint.ModuleName, distr.ModuleName, slashing.ModuleName, evidence.ModuleName, ModuleName) + app.mm.SetOrderEndBlockers(crisis.ModuleName, gov.ModuleName, staking.ModuleName, ModuleName) + + // NOTE: The genutils moodule must occur after staking so that pools are + // properly initialized with tokens from genesis accounts. + app.mm.SetOrderInitGenesis( + auth.ModuleName, distr.ModuleName, staking.ModuleName, bank.ModuleName, + slashing.ModuleName, gov.ModuleName, mint.ModuleName, supply.ModuleName, + crisis.ModuleName, genutil.ModuleName, evidence.ModuleName, + ModuleName, + ) + + app.mm.RegisterInvariants(&app.CrisisKeeper) + app.mm.RegisterRoutes(app.Router(), app.QueryRouter()) + + // create the simulation manager and define the order of the modules for deterministic simulations + // + // NOTE: this is not required apps that don't use the simulator for fuzz testing + // transactions + app.sm = module.NewSimulationManager( + auth.NewAppModule(app.AccountKeeper), + bank.NewAppModule(app.BankKeeper, app.AccountKeeper), + supply.NewAppModule(app.SupplyKeeper, app.BankKeeper, app.AccountKeeper), + gov.NewAppModule(app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.SupplyKeeper), + mint.NewAppModule(app.MintKeeper), + staking.NewAppModule(app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.SupplyKeeper), + distr.NewAppModule(app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.SupplyKeeper, app.StakingKeeper), + slashing.NewAppModule(app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), + params.NewAppModule(), // NOTE: only used for simulation to generate randomized param change proposals + ) + + app.sm.RegisterStoreDecoders() + + // initialize stores + app.MountKVStores(keys) + app.MountTransientStores(tkeys) + + // initialize BaseApp + app.SetInitChainer(app.InitChainer) + app.SetBeginBlocker(app.BeginBlocker) + app.SetAnteHandler(ante.NewAnteHandler(app.AccountKeeper, app.SupplyKeeper, auth.DefaultSigVerificationGasConsumer)) + app.SetEndBlocker(app.EndBlocker) + + if loadLatest { + err := app.LoadLatestVersion(app.keys[bam.MainStoreKey]) + if err != nil { + tmos.Exit(err.Error()) + } + } + + return app +} + +func (app *SimApp) ExportAppStateAndValidators(bool, []string) (json.RawMessage, []types.GenesisValidator, error) { + panic("implement me") +} + +// Name returns the name of the App +func (app *SimApp) Name() string { return app.BaseApp.Name() } + +// BeginBlocker application updates every begin block +func (app *SimApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { + return app.mm.BeginBlock(ctx, req) +} + +// EndBlocker application updates every end block +func (app *SimApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { + return app.mm.EndBlock(ctx, req) +} + +// InitChainer application update at chain initialization +func (app *SimApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { + var genesisState map[string]json.RawMessage + + app.cdc.MustUnmarshalJSON(req.AppStateBytes, &genesisState) + return app.mm.InitGenesis(ctx, genesisState) +} + +// LoadHeight loads a particular height +func (app *SimApp) LoadHeight(height int64) error { + return app.LoadVersion(height, app.keys[bam.MainStoreKey]) +} + +// ModuleAccountAddrs returns all the app's module account addresses. +func (app *SimApp) ModuleAccountAddrs() map[string]bool { + modAccAddrs := make(map[string]bool) + for acc := range maccPerms { + modAccAddrs[supply.NewModuleAddress(acc).String()] = true + } + + return modAccAddrs +} + +// BlacklistedAccAddrs returns all the app's module account addresses black listed for receiving tokens. +func (app *SimApp) BlacklistedAccAddrs() map[string]bool { + blacklistedAddrs := make(map[string]bool) + for acc := range maccPerms { + blacklistedAddrs[supply.NewModuleAddress(acc).String()] = !allowedReceivingModAcc[acc] + } + + return blacklistedAddrs +} + +// Codec returns SimApp's codec. +// +// NOTE: This is solely to be used for testing purposes as it may be desirable +// for modules to register their own custom testing types. +func (app *SimApp) Codec() *codec.Codec { + return app.cdc +} + +// GetKey returns the KVStoreKey for the provided store key. +// +// NOTE: This is solely to be used for testing purposes. +func (app *SimApp) GetKey(storeKey string) *sdk.KVStoreKey { + return app.keys[storeKey] +} + +// GetTKey returns the TransientStoreKey for the provided store key. +// +// NOTE: This is solely to be used for testing purposes. +func (app *SimApp) GetTKey(storeKey string) *sdk.TransientStoreKey { + return app.tkeys[storeKey] +} + +// GetSubspace returns a param subspace for a given module name. +// +// NOTE: This is solely to be used for testing purposes. +func (app *SimApp) GetSubspace(moduleName string) params.Subspace { + return app.subspaces[moduleName] +} + +// SimulationManager implements the SimulationApp interface +func (app *SimApp) SimulationManager() *module.SimulationManager { + return app.sm +} + +// GetMaccPerms returns a copy of the module account permissions +func GetMaccPerms() map[string][]string { + dupMaccPerms := make(map[string][]string) + for k, v := range maccPerms { + dupMaccPerms[k] = v + } + return dupMaccPerms +} diff --git a/incubator/group/testsupport.go b/incubator/group/testsupport.go new file mode 100644 index 0000000..166a7a7 --- /dev/null +++ b/incubator/group/testsupport.go @@ -0,0 +1,24 @@ +package group + +import ( + "github.com/cosmos/cosmos-sdk/store/rootmulti" + sdk "github.com/cosmos/cosmos-sdk/types" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" + dbm "github.com/tendermint/tm-db" +) + +func NewContext(keys ...sdk.StoreKey) sdk.Context { + db := dbm.NewMemDB() + cms := rootmulti.NewStore(db) + for _, v := range keys { + storeType := sdk.StoreTypeIAVL + if _, ok := v.(*sdk.TransientStoreKey); ok { + storeType = sdk.StoreTypeTransient + } + cms.MountStoreWithDB(v, storeType, db) + cms.LoadLatestVersion() + } + return sdk.NewContext(cms, abci.Header{}, false, log.NewNopLogger()) + +} diff --git a/incubator/group/types.go b/incubator/group/types.go new file mode 100644 index 0000000..a69fd4b --- /dev/null +++ b/incubator/group/types.go @@ -0,0 +1,86 @@ +package group + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/params" + "github.com/cosmos/cosmos-sdk/x/params/subspace" + "github.com/cosmos/modules/incubator/orm" + "gopkg.in/yaml.v2" + + "time" +) + +type GroupID uint64 + +func (g GroupID) Byte() []byte { + return orm.EncodeSequence(uint64(g)) +} + +type ProposalID uint64 + +func (p ProposalID) Byte() []byte { + return orm.EncodeSequence(uint64(p)) +} + +type DecisionPolicy interface { + Allow(tally Tally, totalPower sdk.Dec, votingDuration time.Duration) bool +} + +func (g GroupMember) NaturalKey() []byte { + result := make([]byte, 0, 8+len(g.Member)) + copy(result[0:8], orm.EncodeSequence(uint64(g.Group))) + result = append(result, g.Member...) + return result +} + +func (g GroupAccountMetadataBase) NaturalKey() []byte { + return g.GroupAccount +} + +func (v Vote) NaturalKey() []byte { + result := make([]byte, 0, 8+len(v.Voter)) + copy(result[0:8], orm.EncodeSequence(uint64(v.Proposal))) + result = append(result, v.Voter...) + return result +} + +func (m Member) ValidateBasic() error { + if m.Address.Empty() { + return sdkerrors.Wrap(ErrEmpty, "address") + } + return nil +} + +const defaultMaxCommentLength = 255 + +// Parameter keys +var ( + ParamMaxCommentLength = []byte("MaxCommentLength") +) + +// DefaultParams returns the default parameters for the group module. +func DefaultParams() Params { + return Params{ + MaxCommentLength: defaultMaxCommentLength, + } +} + +func (p Params) String() string { + out, _ := yaml.Marshal(p) + return string(out) +} + +// ParamSetPairs returns the parameter set pairs. +func (p *Params) ParamSetPairs() params.ParamSetPairs { + return params.ParamSetPairs{ + params.NewParamSetPair(ParamMaxCommentLength, &p.MaxCommentLength, noopValidator()), + } +} +func (p Params) Validate() error { + return nil +} + +func noopValidator() subspace.ValueValidatorFn { + return func(value interface{}) error { return nil } +} diff --git a/incubator/group/types.pb.go b/incubator/group/types.pb.go new file mode 100644 index 0000000..f4f410a --- /dev/null +++ b/incubator/group/types.pb.go @@ -0,0 +1,7872 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: types.proto + +package group + +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" + types "github.com/gogo/protobuf/types" + 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 Choice int32 + +const ( + Choice_UNKNOWN Choice = 0 + Choice_NO Choice = 1 + Choice_YES Choice = 2 + Choice_ABSTAIN Choice = 3 + Choice_VETO Choice = 4 +) + +var Choice_name = map[int32]string{ + 0: "UNKNOWN", + 1: "NO", + 2: "YES", + 3: "ABSTAIN", + 4: "VETO", +} + +var Choice_value = map[string]int32{ + "UNKNOWN": 0, + "NO": 1, + "YES": 2, + "ABSTAIN": 3, + "VETO": 4, +} + +func (x Choice) String() string { + return proto.EnumName(Choice_name, int32(x)) +} + +func (Choice) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{0} +} + +type Msg struct { + // Types that are valid to be assigned to Sum: + // *Msg_CreateGroup + // *Msg_UpdateGroupMembers + // *Msg_UpdateGroupAdmin + // *Msg_UpdateGroupComment + // *Msg_CreateGroupAccount + // *Msg_UpdateGroupAccountAdmin + // *Msg_UpdateGroupAccountDecisionPolicy + // *Msg_UpdateGroupAccountComment + // *Msg_Vote + // *Msg_Exec + Sum isMsg_Sum `protobuf_oneof:"sum"` +} + +func (m *Msg) Reset() { *m = Msg{} } +func (m *Msg) String() string { return proto.CompactTextString(m) } +func (*Msg) ProtoMessage() {} +func (*Msg) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{0} +} +func (m *Msg) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Msg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Msg.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 *Msg) XXX_Merge(src proto.Message) { + xxx_messageInfo_Msg.Merge(m, src) +} +func (m *Msg) XXX_Size() int { + return m.Size() +} +func (m *Msg) XXX_DiscardUnknown() { + xxx_messageInfo_Msg.DiscardUnknown(m) +} + +var xxx_messageInfo_Msg proto.InternalMessageInfo + +type isMsg_Sum interface { + isMsg_Sum() + MarshalTo([]byte) (int, error) + Size() int +} + +type Msg_CreateGroup struct { + CreateGroup *MsgCreateGroup `protobuf:"bytes,1,opt,name=create_group,json=createGroup,proto3,oneof" json:"create_group,omitempty"` +} +type Msg_UpdateGroupMembers struct { + UpdateGroupMembers *MsgUpdateGroupMembers `protobuf:"bytes,2,opt,name=update_group_members,json=updateGroupMembers,proto3,oneof" json:"update_group_members,omitempty"` +} +type Msg_UpdateGroupAdmin struct { + UpdateGroupAdmin *MsgUpdateGroupAdmin `protobuf:"bytes,3,opt,name=update_group_admin,json=updateGroupAdmin,proto3,oneof" json:"update_group_admin,omitempty"` +} +type Msg_UpdateGroupComment struct { + UpdateGroupComment *MsgUpdateGroupComment `protobuf:"bytes,4,opt,name=update_group_comment,json=updateGroupComment,proto3,oneof" json:"update_group_comment,omitempty"` +} +type Msg_CreateGroupAccount struct { + CreateGroupAccount *MsgCreateGroupAccountStd `protobuf:"bytes,5,opt,name=create_group_account,json=createGroupAccount,proto3,oneof" json:"create_group_account,omitempty"` +} +type Msg_UpdateGroupAccountAdmin struct { + UpdateGroupAccountAdmin *MsgUpdateGroupAccountAdmin `protobuf:"bytes,6,opt,name=update_group_account_admin,json=updateGroupAccountAdmin,proto3,oneof" json:"update_group_account_admin,omitempty"` +} +type Msg_UpdateGroupAccountDecisionPolicy struct { + UpdateGroupAccountDecisionPolicy *MsgUpdateGroupAccountDecisionPolicyStd `protobuf:"bytes,7,opt,name=update_group_account_decision_policy,json=updateGroupAccountDecisionPolicy,proto3,oneof" json:"update_group_account_decision_policy,omitempty"` +} +type Msg_UpdateGroupAccountComment struct { + UpdateGroupAccountComment *MsgUpdateGroupAccountComment `protobuf:"bytes,8,opt,name=update_group_account_comment,json=updateGroupAccountComment,proto3,oneof" json:"update_group_account_comment,omitempty"` +} +type Msg_Vote struct { + Vote *MsgVote `protobuf:"bytes,9,opt,name=vote,proto3,oneof" json:"vote,omitempty"` +} +type Msg_Exec struct { + Exec *MsgExec `protobuf:"bytes,10,opt,name=exec,proto3,oneof" json:"exec,omitempty"` +} + +func (*Msg_CreateGroup) isMsg_Sum() {} +func (*Msg_UpdateGroupMembers) isMsg_Sum() {} +func (*Msg_UpdateGroupAdmin) isMsg_Sum() {} +func (*Msg_UpdateGroupComment) isMsg_Sum() {} +func (*Msg_CreateGroupAccount) isMsg_Sum() {} +func (*Msg_UpdateGroupAccountAdmin) isMsg_Sum() {} +func (*Msg_UpdateGroupAccountDecisionPolicy) isMsg_Sum() {} +func (*Msg_UpdateGroupAccountComment) isMsg_Sum() {} +func (*Msg_Vote) isMsg_Sum() {} +func (*Msg_Exec) isMsg_Sum() {} + +func (m *Msg) GetSum() isMsg_Sum { + if m != nil { + return m.Sum + } + return nil +} + +func (m *Msg) GetCreateGroup() *MsgCreateGroup { + if x, ok := m.GetSum().(*Msg_CreateGroup); ok { + return x.CreateGroup + } + return nil +} + +func (m *Msg) GetUpdateGroupMembers() *MsgUpdateGroupMembers { + if x, ok := m.GetSum().(*Msg_UpdateGroupMembers); ok { + return x.UpdateGroupMembers + } + return nil +} + +func (m *Msg) GetUpdateGroupAdmin() *MsgUpdateGroupAdmin { + if x, ok := m.GetSum().(*Msg_UpdateGroupAdmin); ok { + return x.UpdateGroupAdmin + } + return nil +} + +func (m *Msg) GetUpdateGroupComment() *MsgUpdateGroupComment { + if x, ok := m.GetSum().(*Msg_UpdateGroupComment); ok { + return x.UpdateGroupComment + } + return nil +} + +func (m *Msg) GetCreateGroupAccount() *MsgCreateGroupAccountStd { + if x, ok := m.GetSum().(*Msg_CreateGroupAccount); ok { + return x.CreateGroupAccount + } + return nil +} + +func (m *Msg) GetUpdateGroupAccountAdmin() *MsgUpdateGroupAccountAdmin { + if x, ok := m.GetSum().(*Msg_UpdateGroupAccountAdmin); ok { + return x.UpdateGroupAccountAdmin + } + return nil +} + +func (m *Msg) GetUpdateGroupAccountDecisionPolicy() *MsgUpdateGroupAccountDecisionPolicyStd { + if x, ok := m.GetSum().(*Msg_UpdateGroupAccountDecisionPolicy); ok { + return x.UpdateGroupAccountDecisionPolicy + } + return nil +} + +func (m *Msg) GetUpdateGroupAccountComment() *MsgUpdateGroupAccountComment { + if x, ok := m.GetSum().(*Msg_UpdateGroupAccountComment); ok { + return x.UpdateGroupAccountComment + } + return nil +} + +func (m *Msg) GetVote() *MsgVote { + if x, ok := m.GetSum().(*Msg_Vote); ok { + return x.Vote + } + return nil +} + +func (m *Msg) GetExec() *MsgExec { + if x, ok := m.GetSum().(*Msg_Exec); ok { + return x.Exec + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Msg) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Msg_CreateGroup)(nil), + (*Msg_UpdateGroupMembers)(nil), + (*Msg_UpdateGroupAdmin)(nil), + (*Msg_UpdateGroupComment)(nil), + (*Msg_CreateGroupAccount)(nil), + (*Msg_UpdateGroupAccountAdmin)(nil), + (*Msg_UpdateGroupAccountDecisionPolicy)(nil), + (*Msg_UpdateGroupAccountComment)(nil), + (*Msg_Vote)(nil), + (*Msg_Exec)(nil), + } +} + +type MsgCreateGroup struct { + Admin github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=admin,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"admin,omitempty"` + Members []Member `protobuf:"bytes,2,rep,name=members,proto3" json:"members"` + Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"` +} + +func (m *MsgCreateGroup) Reset() { *m = MsgCreateGroup{} } +func (m *MsgCreateGroup) String() string { return proto.CompactTextString(m) } +func (*MsgCreateGroup) ProtoMessage() {} +func (*MsgCreateGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{1} +} +func (m *MsgCreateGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateGroup.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 *MsgCreateGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateGroup.Merge(m, src) +} +func (m *MsgCreateGroup) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateGroup) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateGroup proto.InternalMessageInfo + +func (m *MsgCreateGroup) GetAdmin() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Admin + } + return nil +} + +func (m *MsgCreateGroup) GetMembers() []Member { + if m != nil { + return m.Members + } + return nil +} + +func (m *MsgCreateGroup) GetComment() string { + if m != nil { + return m.Comment + } + return "" +} + +type MsgUpdateGroupMembers struct { + Admin github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=admin,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"admin,omitempty"` + Group GroupID `protobuf:"varint,2,opt,name=group,proto3,casttype=GroupID" json:"group,omitempty"` + MemberUpdates []Member `protobuf:"bytes,3,rep,name=member_updates,json=memberUpdates,proto3" json:"member_updates"` +} + +func (m *MsgUpdateGroupMembers) Reset() { *m = MsgUpdateGroupMembers{} } +func (m *MsgUpdateGroupMembers) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupMembers) ProtoMessage() {} +func (*MsgUpdateGroupMembers) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{2} +} +func (m *MsgUpdateGroupMembers) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupMembers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupMembers.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 *MsgUpdateGroupMembers) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupMembers.Merge(m, src) +} +func (m *MsgUpdateGroupMembers) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupMembers) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupMembers.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupMembers proto.InternalMessageInfo + +func (m *MsgUpdateGroupMembers) GetAdmin() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Admin + } + return nil +} + +func (m *MsgUpdateGroupMembers) GetGroup() GroupID { + if m != nil { + return m.Group + } + return 0 +} + +func (m *MsgUpdateGroupMembers) GetMemberUpdates() []Member { + if m != nil { + return m.MemberUpdates + } + return nil +} + +type MsgUpdateGroupAdmin struct { + Admin github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=admin,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"admin,omitempty"` + Group GroupID `protobuf:"varint,2,opt,name=group,proto3,casttype=GroupID" json:"group,omitempty"` + NewAdmin github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,3,opt,name=new_admin,json=newAdmin,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"new_admin,omitempty"` +} + +func (m *MsgUpdateGroupAdmin) Reset() { *m = MsgUpdateGroupAdmin{} } +func (m *MsgUpdateGroupAdmin) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupAdmin) ProtoMessage() {} +func (*MsgUpdateGroupAdmin) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{3} +} +func (m *MsgUpdateGroupAdmin) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupAdmin.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 *MsgUpdateGroupAdmin) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupAdmin.Merge(m, src) +} +func (m *MsgUpdateGroupAdmin) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupAdmin) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupAdmin.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupAdmin proto.InternalMessageInfo + +func (m *MsgUpdateGroupAdmin) GetAdmin() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Admin + } + return nil +} + +func (m *MsgUpdateGroupAdmin) GetGroup() GroupID { + if m != nil { + return m.Group + } + return 0 +} + +func (m *MsgUpdateGroupAdmin) GetNewAdmin() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.NewAdmin + } + return nil +} + +type MsgUpdateGroupComment struct { + Admin github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=admin,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"admin,omitempty"` + Group GroupID `protobuf:"varint,2,opt,name=group,proto3,casttype=GroupID" json:"group,omitempty"` + Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"` +} + +func (m *MsgUpdateGroupComment) Reset() { *m = MsgUpdateGroupComment{} } +func (m *MsgUpdateGroupComment) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupComment) ProtoMessage() {} +func (*MsgUpdateGroupComment) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{4} +} +func (m *MsgUpdateGroupComment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupComment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupComment.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 *MsgUpdateGroupComment) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupComment.Merge(m, src) +} +func (m *MsgUpdateGroupComment) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupComment) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupComment.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupComment proto.InternalMessageInfo + +func (m *MsgUpdateGroupComment) GetAdmin() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Admin + } + return nil +} + +func (m *MsgUpdateGroupComment) GetGroup() GroupID { + if m != nil { + return m.Group + } + return 0 +} + +func (m *MsgUpdateGroupComment) GetComment() string { + if m != nil { + return m.Comment + } + return "" +} + +type Member struct { + Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"` + Power github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=power,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"power"` + Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"` +} + +func (m *Member) Reset() { *m = Member{} } +func (m *Member) String() string { return proto.CompactTextString(m) } +func (*Member) ProtoMessage() {} +func (*Member) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{5} +} +func (m *Member) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Member) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Member.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 *Member) XXX_Merge(src proto.Message) { + xxx_messageInfo_Member.Merge(m, src) +} +func (m *Member) XXX_Size() int { + return m.Size() +} +func (m *Member) XXX_DiscardUnknown() { + xxx_messageInfo_Member.DiscardUnknown(m) +} + +var xxx_messageInfo_Member proto.InternalMessageInfo + +func (m *Member) GetAddress() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Address + } + return nil +} + +func (m *Member) GetComment() string { + if m != nil { + return m.Comment + } + return "" +} + +type MsgCreateGroupAccountBase struct { + Admin github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=admin,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"admin,omitempty"` + Group GroupID `protobuf:"varint,2,opt,name=group,proto3,casttype=GroupID" json:"group,omitempty"` + Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"` +} + +func (m *MsgCreateGroupAccountBase) Reset() { *m = MsgCreateGroupAccountBase{} } +func (m *MsgCreateGroupAccountBase) String() string { return proto.CompactTextString(m) } +func (*MsgCreateGroupAccountBase) ProtoMessage() {} +func (*MsgCreateGroupAccountBase) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{6} +} +func (m *MsgCreateGroupAccountBase) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateGroupAccountBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateGroupAccountBase.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 *MsgCreateGroupAccountBase) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateGroupAccountBase.Merge(m, src) +} +func (m *MsgCreateGroupAccountBase) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateGroupAccountBase) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateGroupAccountBase.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateGroupAccountBase proto.InternalMessageInfo + +func (m *MsgCreateGroupAccountBase) GetAdmin() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Admin + } + return nil +} + +func (m *MsgCreateGroupAccountBase) GetGroup() GroupID { + if m != nil { + return m.Group + } + return 0 +} + +func (m *MsgCreateGroupAccountBase) GetComment() string { + if m != nil { + return m.Comment + } + return "" +} + +// MsgCreateGroupAccountStd creates a group account using one of the members of StdDecisionPolicy. Apps can +// create their own create account msg that supports custom DecisionPolicy's using MsgCreateGroupAccountBase as +// starting point +type MsgCreateGroupAccountStd struct { + Base *MsgCreateGroupAccountBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + DecisionPolicy *StdDecisionPolicy `protobuf:"bytes,2,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` +} + +func (m *MsgCreateGroupAccountStd) Reset() { *m = MsgCreateGroupAccountStd{} } +func (m *MsgCreateGroupAccountStd) String() string { return proto.CompactTextString(m) } +func (*MsgCreateGroupAccountStd) ProtoMessage() {} +func (*MsgCreateGroupAccountStd) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{7} +} +func (m *MsgCreateGroupAccountStd) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateGroupAccountStd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateGroupAccountStd.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 *MsgCreateGroupAccountStd) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateGroupAccountStd.Merge(m, src) +} +func (m *MsgCreateGroupAccountStd) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateGroupAccountStd) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateGroupAccountStd.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateGroupAccountStd proto.InternalMessageInfo + +func (m *MsgCreateGroupAccountStd) GetBase() *MsgCreateGroupAccountBase { + if m != nil { + return m.Base + } + return nil +} + +func (m *MsgCreateGroupAccountStd) GetDecisionPolicy() *StdDecisionPolicy { + if m != nil { + return m.DecisionPolicy + } + return nil +} + +type MsgUpdateGroupAccountAdmin struct { + Admin github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=admin,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"admin,omitempty"` + GroupAcount github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=group_acount,json=groupAcount,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"group_acount,omitempty"` + NewAdmin github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,3,opt,name=new_admin,json=newAdmin,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"new_admin,omitempty"` +} + +func (m *MsgUpdateGroupAccountAdmin) Reset() { *m = MsgUpdateGroupAccountAdmin{} } +func (m *MsgUpdateGroupAccountAdmin) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupAccountAdmin) ProtoMessage() {} +func (*MsgUpdateGroupAccountAdmin) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{8} +} +func (m *MsgUpdateGroupAccountAdmin) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupAccountAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupAccountAdmin.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 *MsgUpdateGroupAccountAdmin) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupAccountAdmin.Merge(m, src) +} +func (m *MsgUpdateGroupAccountAdmin) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupAccountAdmin) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupAccountAdmin.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupAccountAdmin proto.InternalMessageInfo + +func (m *MsgUpdateGroupAccountAdmin) GetAdmin() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Admin + } + return nil +} + +func (m *MsgUpdateGroupAccountAdmin) GetGroupAcount() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.GroupAcount + } + return nil +} + +func (m *MsgUpdateGroupAccountAdmin) GetNewAdmin() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.NewAdmin + } + return nil +} + +type MsgUpdateGroupAccountBase struct { + Admin github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=admin,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"admin,omitempty"` + Group GroupID `protobuf:"varint,2,opt,name=group,proto3,casttype=GroupID" json:"group,omitempty"` +} + +func (m *MsgUpdateGroupAccountBase) Reset() { *m = MsgUpdateGroupAccountBase{} } +func (m *MsgUpdateGroupAccountBase) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupAccountBase) ProtoMessage() {} +func (*MsgUpdateGroupAccountBase) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{9} +} +func (m *MsgUpdateGroupAccountBase) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupAccountBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupAccountBase.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 *MsgUpdateGroupAccountBase) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupAccountBase.Merge(m, src) +} +func (m *MsgUpdateGroupAccountBase) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupAccountBase) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupAccountBase.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupAccountBase proto.InternalMessageInfo + +func (m *MsgUpdateGroupAccountBase) GetAdmin() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Admin + } + return nil +} + +func (m *MsgUpdateGroupAccountBase) GetGroup() GroupID { + if m != nil { + return m.Group + } + return 0 +} + +// MsgCreateGroupAccountStd allows a group account decision policy to be updated to a member of StdDecisionPolicy, can +// be overridden to support custom DecisionPolicy's by apps. +type MsgUpdateGroupAccountDecisionPolicyStd struct { + Base *MsgUpdateGroupAccountBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + DecisionPolicy *StdDecisionPolicy `protobuf:"bytes,3,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` +} + +func (m *MsgUpdateGroupAccountDecisionPolicyStd) Reset() { + *m = MsgUpdateGroupAccountDecisionPolicyStd{} +} +func (m *MsgUpdateGroupAccountDecisionPolicyStd) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupAccountDecisionPolicyStd) ProtoMessage() {} +func (*MsgUpdateGroupAccountDecisionPolicyStd) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{10} +} +func (m *MsgUpdateGroupAccountDecisionPolicyStd) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupAccountDecisionPolicyStd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicyStd.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 *MsgUpdateGroupAccountDecisionPolicyStd) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicyStd.Merge(m, src) +} +func (m *MsgUpdateGroupAccountDecisionPolicyStd) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupAccountDecisionPolicyStd) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicyStd.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicyStd proto.InternalMessageInfo + +func (m *MsgUpdateGroupAccountDecisionPolicyStd) GetBase() *MsgUpdateGroupAccountBase { + if m != nil { + return m.Base + } + return nil +} + +func (m *MsgUpdateGroupAccountDecisionPolicyStd) GetDecisionPolicy() *StdDecisionPolicy { + if m != nil { + return m.DecisionPolicy + } + return nil +} + +type MsgUpdateGroupAccountComment struct { + Admin github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=admin,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"admin,omitempty"` + GroupAcount github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=group_acount,json=groupAcount,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"group_acount,omitempty"` + Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"` +} + +func (m *MsgUpdateGroupAccountComment) Reset() { *m = MsgUpdateGroupAccountComment{} } +func (m *MsgUpdateGroupAccountComment) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupAccountComment) ProtoMessage() {} +func (*MsgUpdateGroupAccountComment) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{11} +} +func (m *MsgUpdateGroupAccountComment) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateGroupAccountComment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateGroupAccountComment.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 *MsgUpdateGroupAccountComment) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupAccountComment.Merge(m, src) +} +func (m *MsgUpdateGroupAccountComment) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateGroupAccountComment) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupAccountComment.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateGroupAccountComment proto.InternalMessageInfo + +func (m *MsgUpdateGroupAccountComment) GetAdmin() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Admin + } + return nil +} + +func (m *MsgUpdateGroupAccountComment) GetGroupAcount() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.GroupAcount + } + return nil +} + +func (m *MsgUpdateGroupAccountComment) GetComment() string { + if m != nil { + return m.Comment + } + return "" +} + +// StdDecisionPolicy is a set of standard decision policies that can be used by zones that do not implement custom +// DecisionPolicy types. Apps can start with StdDecisionPolicy and later add custom DecisionPolicy's by creating +// a MyAppDecisionPolicy and registering that with the group module codec. In order to be backwards compatible, +// MyAppDecisionPolicy should include all the existing StdDecisionPolicy types with the same field number and then +// add custom DecisionPolicy types afterwards. +type StdDecisionPolicy struct { + // Types that are valid to be assigned to Sum: + // *StdDecisionPolicy_Threshold + Sum isStdDecisionPolicy_Sum `protobuf_oneof:"sum"` +} + +func (m *StdDecisionPolicy) Reset() { *m = StdDecisionPolicy{} } +func (m *StdDecisionPolicy) String() string { return proto.CompactTextString(m) } +func (*StdDecisionPolicy) ProtoMessage() {} +func (*StdDecisionPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{12} +} +func (m *StdDecisionPolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StdDecisionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StdDecisionPolicy.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 *StdDecisionPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_StdDecisionPolicy.Merge(m, src) +} +func (m *StdDecisionPolicy) XXX_Size() int { + return m.Size() +} +func (m *StdDecisionPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_StdDecisionPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_StdDecisionPolicy proto.InternalMessageInfo + +type isStdDecisionPolicy_Sum interface { + isStdDecisionPolicy_Sum() + MarshalTo([]byte) (int, error) + Size() int +} + +type StdDecisionPolicy_Threshold struct { + Threshold *ThresholdDecisionPolicy `protobuf:"bytes,1,opt,name=threshold,proto3,oneof" json:"threshold,omitempty"` +} + +func (*StdDecisionPolicy_Threshold) isStdDecisionPolicy_Sum() {} + +func (m *StdDecisionPolicy) GetSum() isStdDecisionPolicy_Sum { + if m != nil { + return m.Sum + } + return nil +} + +func (m *StdDecisionPolicy) GetThreshold() *ThresholdDecisionPolicy { + if x, ok := m.GetSum().(*StdDecisionPolicy_Threshold); ok { + return x.Threshold + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*StdDecisionPolicy) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*StdDecisionPolicy_Threshold)(nil), + } +} + +type ThresholdDecisionPolicy struct { + Threshold *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=threshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"threshold,omitempty"` + MinVotingWindow *types.Duration `protobuf:"bytes,2,opt,name=min_voting_window,json=minVotingWindow,proto3" json:"min_voting_window,omitempty"` + MaxVotingWindow *types.Duration `protobuf:"bytes,3,opt,name=max_voting_window,json=maxVotingWindow,proto3" json:"max_voting_window,omitempty"` +} + +func (m *ThresholdDecisionPolicy) Reset() { *m = ThresholdDecisionPolicy{} } +func (m *ThresholdDecisionPolicy) String() string { return proto.CompactTextString(m) } +func (*ThresholdDecisionPolicy) ProtoMessage() {} +func (*ThresholdDecisionPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{13} +} +func (m *ThresholdDecisionPolicy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ThresholdDecisionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ThresholdDecisionPolicy.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 *ThresholdDecisionPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_ThresholdDecisionPolicy.Merge(m, src) +} +func (m *ThresholdDecisionPolicy) XXX_Size() int { + return m.Size() +} +func (m *ThresholdDecisionPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_ThresholdDecisionPolicy.DiscardUnknown(m) +} + +var xxx_messageInfo_ThresholdDecisionPolicy proto.InternalMessageInfo + +func (m *ThresholdDecisionPolicy) GetMinVotingWindow() *types.Duration { + if m != nil { + return m.MinVotingWindow + } + return nil +} + +func (m *ThresholdDecisionPolicy) GetMaxVotingWindow() *types.Duration { + if m != nil { + return m.MaxVotingWindow + } + return nil +} + +// MsgProposeBase is the base propose msg that app should use to implement a MsgPropose type based +// on their app Msg type. +// +// Ex: +// message MsgPropose { +// MsgProposeBase base = 1; +// repeated MyAppMsg msgs = 2; +// } +type MsgProposeBase struct { + GroupAccount github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=group_account,json=groupAccount,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"group_account,omitempty"` + // Proposers signatures will be counted as yes votes + Proposers []github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,rep,name=proposers,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"proposers,omitempty"` + Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"` + // ExecNow will attempt to execute the proposal immediately based on + // the proposers signing the transaction + ExecNow bool `protobuf:"varint,4,opt,name=exec_now,json=execNow,proto3" json:"exec_now,omitempty"` +} + +func (m *MsgProposeBase) Reset() { *m = MsgProposeBase{} } +func (m *MsgProposeBase) String() string { return proto.CompactTextString(m) } +func (*MsgProposeBase) ProtoMessage() {} +func (*MsgProposeBase) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{14} +} +func (m *MsgProposeBase) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgProposeBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgProposeBase.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 *MsgProposeBase) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgProposeBase.Merge(m, src) +} +func (m *MsgProposeBase) XXX_Size() int { + return m.Size() +} +func (m *MsgProposeBase) XXX_DiscardUnknown() { + xxx_messageInfo_MsgProposeBase.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgProposeBase proto.InternalMessageInfo + +func (m *MsgProposeBase) GetGroupAccount() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.GroupAccount + } + return nil +} + +func (m *MsgProposeBase) GetProposers() []github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Proposers + } + return nil +} + +func (m *MsgProposeBase) GetComment() string { + if m != nil { + return m.Comment + } + return "" +} + +func (m *MsgProposeBase) GetExecNow() bool { + if m != nil { + return m.ExecNow + } + return false +} + +type MsgVote struct { + Proposal ProposalID `protobuf:"varint,1,opt,name=proposal,proto3,casttype=ProposalID" json:"proposal,omitempty"` + Voters []github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,rep,name=voters,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"voters,omitempty"` + Choice Choice `protobuf:"varint,3,opt,name=choice,proto3,enum=cosmos_modules.incubator.group.v1_alpha.Choice" json:"choice,omitempty"` + Comment string `protobuf:"bytes,4,opt,name=comment,proto3" json:"comment,omitempty"` +} + +func (m *MsgVote) Reset() { *m = MsgVote{} } +func (m *MsgVote) String() string { return proto.CompactTextString(m) } +func (*MsgVote) ProtoMessage() {} +func (*MsgVote) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{15} +} +func (m *MsgVote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVote.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 *MsgVote) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVote.Merge(m, src) +} +func (m *MsgVote) XXX_Size() int { + return m.Size() +} +func (m *MsgVote) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVote.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVote proto.InternalMessageInfo + +func (m *MsgVote) GetProposal() ProposalID { + if m != nil { + return m.Proposal + } + return 0 +} + +func (m *MsgVote) GetVoters() []github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Voters + } + return nil +} + +func (m *MsgVote) GetChoice() Choice { + if m != nil { + return m.Choice + } + return Choice_UNKNOWN +} + +func (m *MsgVote) GetComment() string { + if m != nil { + return m.Comment + } + return "" +} + +type MsgExec struct { + Proposal ProposalID `protobuf:"varint,1,opt,name=proposal,proto3,casttype=ProposalID" json:"proposal,omitempty"` + Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"` +} + +func (m *MsgExec) Reset() { *m = MsgExec{} } +func (m *MsgExec) String() string { return proto.CompactTextString(m) } +func (*MsgExec) ProtoMessage() {} +func (*MsgExec) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{16} +} +func (m *MsgExec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExec.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 *MsgExec) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExec.Merge(m, src) +} +func (m *MsgExec) XXX_Size() int { + return m.Size() +} +func (m *MsgExec) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExec.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExec proto.InternalMessageInfo + +func (m *MsgExec) GetProposal() ProposalID { + if m != nil { + return m.Proposal + } + return 0 +} + +func (m *MsgExec) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Signer + } + return nil +} + +type GroupMetadata struct { + Group GroupID `protobuf:"varint,1,opt,name=group,proto3,casttype=GroupID" json:"group,omitempty"` + Admin github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=admin,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"admin,omitempty"` + Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"` + // version is used to track changes to a group's membership structure that + // would break existing proposals. Whenever any members power is changed, + // or any member is added or removed this version is incremented and will + // cause proposals based on older versions of this group to fail + Version uint64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` +} + +func (m *GroupMetadata) Reset() { *m = GroupMetadata{} } +func (m *GroupMetadata) String() string { return proto.CompactTextString(m) } +func (*GroupMetadata) ProtoMessage() {} +func (*GroupMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{17} +} +func (m *GroupMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GroupMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GroupMetadata.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 *GroupMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupMetadata.Merge(m, src) +} +func (m *GroupMetadata) XXX_Size() int { + return m.Size() +} +func (m *GroupMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_GroupMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupMetadata proto.InternalMessageInfo + +func (m *GroupMetadata) GetGroup() GroupID { + if m != nil { + return m.Group + } + return 0 +} + +func (m *GroupMetadata) GetAdmin() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Admin + } + return nil +} + +func (m *GroupMetadata) GetComment() string { + if m != nil { + return m.Comment + } + return "" +} + +func (m *GroupMetadata) GetVersion() uint64 { + if m != nil { + return m.Version + } + return 0 +} + +type GroupMember struct { + Group GroupID `protobuf:"varint,1,opt,name=group,proto3,casttype=GroupID" json:"group,omitempty"` + Member github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=member,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"member,omitempty"` + Weight github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=weight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"weight"` +} + +func (m *GroupMember) Reset() { *m = GroupMember{} } +func (m *GroupMember) String() string { return proto.CompactTextString(m) } +func (*GroupMember) ProtoMessage() {} +func (*GroupMember) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{18} +} +func (m *GroupMember) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GroupMember) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GroupMember.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 *GroupMember) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupMember.Merge(m, src) +} +func (m *GroupMember) XXX_Size() int { + return m.Size() +} +func (m *GroupMember) XXX_DiscardUnknown() { + xxx_messageInfo_GroupMember.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupMember proto.InternalMessageInfo + +func (m *GroupMember) GetGroup() GroupID { + if m != nil { + return m.Group + } + return 0 +} + +func (m *GroupMember) GetMember() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Member + } + return nil +} + +// GroupAccountMetadataBase is the base message that app's should use to specify group account metadata based on the +// DecisionPolicy's they support. +// +// Ex: +// message MyAppGroupAccountMetadata { +// GroupAccountMetadataBase base = 1; +// MyAppDecisionPolicy decision_policy = 2; +// } +// +// App's which do not implement custom DecisionPolicy's can use StdGroupAccountMetadata. +type GroupAccountMetadataBase struct { + GroupAccount github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=group_account,json=groupAccount,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"group_account,omitempty"` + Group GroupID `protobuf:"varint,2,opt,name=group,proto3,casttype=GroupID" json:"group,omitempty"` + Admin github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,3,opt,name=admin,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"admin,omitempty"` + Comment string `protobuf:"bytes,4,opt,name=comment,proto3" json:"comment,omitempty"` +} + +func (m *GroupAccountMetadataBase) Reset() { *m = GroupAccountMetadataBase{} } +func (m *GroupAccountMetadataBase) String() string { return proto.CompactTextString(m) } +func (*GroupAccountMetadataBase) ProtoMessage() {} +func (*GroupAccountMetadataBase) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{19} +} +func (m *GroupAccountMetadataBase) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GroupAccountMetadataBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GroupAccountMetadataBase.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 *GroupAccountMetadataBase) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupAccountMetadataBase.Merge(m, src) +} +func (m *GroupAccountMetadataBase) XXX_Size() int { + return m.Size() +} +func (m *GroupAccountMetadataBase) XXX_DiscardUnknown() { + xxx_messageInfo_GroupAccountMetadataBase.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupAccountMetadataBase proto.InternalMessageInfo + +func (m *GroupAccountMetadataBase) GetGroupAccount() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.GroupAccount + } + return nil +} + +func (m *GroupAccountMetadataBase) GetGroup() GroupID { + if m != nil { + return m.Group + } + return 0 +} + +func (m *GroupAccountMetadataBase) GetAdmin() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Admin + } + return nil +} + +func (m *GroupAccountMetadataBase) GetComment() string { + if m != nil { + return m.Comment + } + return "" +} + +// StdGroupAccountMetadata is a default group account metadata type to be used by apps which do not implement custom +// DecisionPolicy's. +type StdGroupAccountMetadata struct { + Base *GroupAccountMetadataBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + DecisionPolicy *StdDecisionPolicy `protobuf:"bytes,2,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,omitempty"` +} + +func (m *StdGroupAccountMetadata) Reset() { *m = StdGroupAccountMetadata{} } +func (m *StdGroupAccountMetadata) String() string { return proto.CompactTextString(m) } +func (*StdGroupAccountMetadata) ProtoMessage() {} +func (*StdGroupAccountMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{20} +} +func (m *StdGroupAccountMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StdGroupAccountMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StdGroupAccountMetadata.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 *StdGroupAccountMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_StdGroupAccountMetadata.Merge(m, src) +} +func (m *StdGroupAccountMetadata) XXX_Size() int { + return m.Size() +} +func (m *StdGroupAccountMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_StdGroupAccountMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_StdGroupAccountMetadata proto.InternalMessageInfo + +func (m *StdGroupAccountMetadata) GetBase() *GroupAccountMetadataBase { + if m != nil { + return m.Base + } + return nil +} + +func (m *StdGroupAccountMetadata) GetDecisionPolicy() *StdDecisionPolicy { + if m != nil { + return m.DecisionPolicy + } + return nil +} + +// ProposalBase is the base proposal type that app should use to implement a Proposal type based +// on their app Msg type. +// +// Ex: +// message MyAppProposal { +// ProposalBase base = 1; +// repeated MyAppMsg msgs = 2; +// } +type ProposalBase struct { + GroupAccount github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=group_account,json=groupAccount,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"group_account,omitempty"` + Comment string `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"` + Proposers []github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,3,rep,name=proposers,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"proposers,omitempty"` + SubmittedAt *types.Timestamp `protobuf:"bytes,4,opt,name=submitted_at,json=submittedAt,proto3" json:"submitted_at,omitempty"` + // GroupVersion tracks the version of the group that this proposal corresponds to. When group membership is changed + // existing proposals for prior group versions will become invalid. + GroupVersion uint64 `protobuf:"varint,5,opt,name=group_version,json=groupVersion,proto3" json:"group_version,omitempty"` +} + +func (m *ProposalBase) Reset() { *m = ProposalBase{} } +func (m *ProposalBase) String() string { return proto.CompactTextString(m) } +func (*ProposalBase) ProtoMessage() {} +func (*ProposalBase) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{21} +} +func (m *ProposalBase) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProposalBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProposalBase.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 *ProposalBase) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProposalBase.Merge(m, src) +} +func (m *ProposalBase) XXX_Size() int { + return m.Size() +} +func (m *ProposalBase) XXX_DiscardUnknown() { + xxx_messageInfo_ProposalBase.DiscardUnknown(m) +} + +var xxx_messageInfo_ProposalBase proto.InternalMessageInfo + +func (m *ProposalBase) GetGroupAccount() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.GroupAccount + } + return nil +} + +func (m *ProposalBase) GetComment() string { + if m != nil { + return m.Comment + } + return "" +} + +func (m *ProposalBase) GetProposers() []github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Proposers + } + return nil +} + +func (m *ProposalBase) GetSubmittedAt() *types.Timestamp { + if m != nil { + return m.SubmittedAt + } + return nil +} + +func (m *ProposalBase) GetGroupVersion() uint64 { + if m != nil { + return m.GroupVersion + } + return 0 +} + +type Tally struct { + YesCount *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=yes_count,json=yesCount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"yes_count,omitempty"` + NoCount *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=no_count,json=noCount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"no_count,omitempty"` + AbstainCount *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=abstain_count,json=abstainCount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"abstain_count,omitempty"` + VetoCount *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=veto_count,json=vetoCount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"veto_count,omitempty"` +} + +func (m *Tally) Reset() { *m = Tally{} } +func (m *Tally) String() string { return proto.CompactTextString(m) } +func (*Tally) ProtoMessage() {} +func (*Tally) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{22} +} +func (m *Tally) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Tally) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Tally.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 *Tally) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tally.Merge(m, src) +} +func (m *Tally) XXX_Size() int { + return m.Size() +} +func (m *Tally) XXX_DiscardUnknown() { + xxx_messageInfo_Tally.DiscardUnknown(m) +} + +var xxx_messageInfo_Tally proto.InternalMessageInfo + +type Vote struct { + Proposal ProposalID `protobuf:"varint,1,opt,name=proposal,proto3,casttype=ProposalID" json:"proposal,omitempty"` + Voter github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=voter,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"voter,omitempty"` + Choice Choice `protobuf:"varint,3,opt,name=choice,proto3,enum=cosmos_modules.incubator.group.v1_alpha.Choice" json:"choice,omitempty"` + Comment string `protobuf:"bytes,4,opt,name=comment,proto3" json:"comment,omitempty"` + SubmittedAt *types.Timestamp `protobuf:"bytes,5,opt,name=submitted_at,json=submittedAt,proto3" json:"submitted_at,omitempty"` +} + +func (m *Vote) Reset() { *m = Vote{} } +func (m *Vote) String() string { return proto.CompactTextString(m) } +func (*Vote) ProtoMessage() {} +func (*Vote) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{23} +} +func (m *Vote) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Vote.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 *Vote) XXX_Merge(src proto.Message) { + xxx_messageInfo_Vote.Merge(m, src) +} +func (m *Vote) XXX_Size() int { + return m.Size() +} +func (m *Vote) XXX_DiscardUnknown() { + xxx_messageInfo_Vote.DiscardUnknown(m) +} + +var xxx_messageInfo_Vote proto.InternalMessageInfo + +func (m *Vote) GetProposal() ProposalID { + if m != nil { + return m.Proposal + } + return 0 +} + +func (m *Vote) GetVoter() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Voter + } + return nil +} + +func (m *Vote) GetChoice() Choice { + if m != nil { + return m.Choice + } + return Choice_UNKNOWN +} + +func (m *Vote) GetComment() string { + if m != nil { + return m.Comment + } + return "" +} + +func (m *Vote) GetSubmittedAt() *types.Timestamp { + if m != nil { + return m.SubmittedAt + } + return nil +} + +// Params defines the set of configurable parameters. +type Params struct { + MaxCommentLength uint32 `protobuf:"varint,1,opt,name=max_comment_length,json=maxCommentLength,proto3" json:"max_comment_length,omitempty" yaml:"max_comment_length"` +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{24} +} +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) GetMaxCommentLength() uint32 { + if m != nil { + return m.MaxCommentLength + } + return 0 +} + +func init() { + proto.RegisterEnum("cosmos_modules.incubator.group.v1_alpha.Choice", Choice_name, Choice_value) + proto.RegisterType((*Msg)(nil), "cosmos_modules.incubator.group.v1_alpha.Msg") + proto.RegisterType((*MsgCreateGroup)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgCreateGroup") + proto.RegisterType((*MsgUpdateGroupMembers)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgUpdateGroupMembers") + proto.RegisterType((*MsgUpdateGroupAdmin)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgUpdateGroupAdmin") + proto.RegisterType((*MsgUpdateGroupComment)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgUpdateGroupComment") + proto.RegisterType((*Member)(nil), "cosmos_modules.incubator.group.v1_alpha.Member") + proto.RegisterType((*MsgCreateGroupAccountBase)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgCreateGroupAccountBase") + proto.RegisterType((*MsgCreateGroupAccountStd)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgCreateGroupAccountStd") + proto.RegisterType((*MsgUpdateGroupAccountAdmin)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgUpdateGroupAccountAdmin") + proto.RegisterType((*MsgUpdateGroupAccountBase)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgUpdateGroupAccountBase") + proto.RegisterType((*MsgUpdateGroupAccountDecisionPolicyStd)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgUpdateGroupAccountDecisionPolicyStd") + proto.RegisterType((*MsgUpdateGroupAccountComment)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgUpdateGroupAccountComment") + proto.RegisterType((*StdDecisionPolicy)(nil), "cosmos_modules.incubator.group.v1_alpha.StdDecisionPolicy") + proto.RegisterType((*ThresholdDecisionPolicy)(nil), "cosmos_modules.incubator.group.v1_alpha.ThresholdDecisionPolicy") + proto.RegisterType((*MsgProposeBase)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgProposeBase") + proto.RegisterType((*MsgVote)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgVote") + proto.RegisterType((*MsgExec)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgExec") + proto.RegisterType((*GroupMetadata)(nil), "cosmos_modules.incubator.group.v1_alpha.GroupMetadata") + proto.RegisterType((*GroupMember)(nil), "cosmos_modules.incubator.group.v1_alpha.GroupMember") + proto.RegisterType((*GroupAccountMetadataBase)(nil), "cosmos_modules.incubator.group.v1_alpha.GroupAccountMetadataBase") + proto.RegisterType((*StdGroupAccountMetadata)(nil), "cosmos_modules.incubator.group.v1_alpha.StdGroupAccountMetadata") + proto.RegisterType((*ProposalBase)(nil), "cosmos_modules.incubator.group.v1_alpha.ProposalBase") + proto.RegisterType((*Tally)(nil), "cosmos_modules.incubator.group.v1_alpha.Tally") + proto.RegisterType((*Vote)(nil), "cosmos_modules.incubator.group.v1_alpha.Vote") + proto.RegisterType((*Params)(nil), "cosmos_modules.incubator.group.v1_alpha.Params") +} + +func init() { proto.RegisterFile("types.proto", fileDescriptor_d938547f84707355) } + +var fileDescriptor_d938547f84707355 = []byte{ + // 1478 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xfa, 0xdb, 0xcf, 0x4e, 0xea, 0x0e, 0x45, 0xdd, 0x44, 0xc5, 0x2e, 0x0b, 0x2a, 0xa5, + 0x52, 0x6d, 0x5a, 0x0e, 0x48, 0x15, 0x45, 0xd8, 0x4e, 0x9a, 0x44, 0xa5, 0x4e, 0xb4, 0x49, 0x53, + 0x81, 0x2a, 0x2d, 0xeb, 0xdd, 0x61, 0xbd, 0xc2, 0xbb, 0x63, 0xed, 0x47, 0x9c, 0x48, 0x1c, 0x10, + 0x17, 0x90, 0xb8, 0x70, 0xe4, 0x52, 0xa9, 0xfd, 0x0b, 0x38, 0xa0, 0xfe, 0x05, 0x70, 0xe8, 0xb1, + 0x1c, 0x50, 0x11, 0x87, 0x08, 0x1a, 0x21, 0x71, 0x42, 0x82, 0x13, 0x2a, 0x17, 0xb4, 0x33, 0xbb, + 0xf1, 0x77, 0xeb, 0xb5, 0xd3, 0xa8, 0xa7, 0x64, 0x77, 0xf6, 0xfd, 0xde, 0x7b, 0xbf, 0x79, 0xf3, + 0xde, 0x6f, 0x0c, 0x59, 0x67, 0xaf, 0x8d, 0xed, 0x52, 0xdb, 0x22, 0x0e, 0x41, 0x6f, 0x28, 0xc4, + 0x36, 0x88, 0x2d, 0x19, 0x44, 0x75, 0x5b, 0xd8, 0x2e, 0xe9, 0xa6, 0xe2, 0x36, 0x64, 0x87, 0x58, + 0x25, 0xcd, 0x22, 0x6e, 0xbb, 0xb4, 0x73, 0x49, 0x92, 0x5b, 0xed, 0xa6, 0xbc, 0x78, 0x4a, 0x23, + 0x1a, 0xa1, 0x36, 0x65, 0xef, 0x3f, 0x66, 0xbe, 0x58, 0xd0, 0x08, 0xd1, 0x5a, 0xb8, 0x4c, 0x9f, + 0x1a, 0xee, 0x27, 0x65, 0xd5, 0xb5, 0x64, 0x47, 0x27, 0xa6, 0xbf, 0x5e, 0x1c, 0x5c, 0x77, 0x74, + 0x03, 0xdb, 0x8e, 0x6c, 0xb4, 0xd9, 0x07, 0xc2, 0x7f, 0x69, 0x88, 0xdd, 0xb0, 0x35, 0x74, 0x1b, + 0x72, 0x8a, 0x85, 0x65, 0x07, 0x4b, 0xd4, 0x2f, 0xcf, 0x9d, 0xe5, 0xce, 0x67, 0x2f, 0xbf, 0x53, + 0x9a, 0x30, 0xbc, 0xd2, 0x0d, 0x5b, 0xab, 0x51, 0xfb, 0x15, 0xef, 0xfd, 0x6a, 0x44, 0xcc, 0x2a, + 0xdd, 0x47, 0x64, 0xc1, 0x29, 0xb7, 0xad, 0x1e, 0xa2, 0x4b, 0x06, 0x36, 0x1a, 0xd8, 0xb2, 0xf9, + 0x28, 0xf5, 0xf2, 0x5e, 0x18, 0x2f, 0x37, 0x29, 0x0e, 0x85, 0xbd, 0xc1, 0x50, 0x56, 0x23, 0x22, + 0x72, 0x87, 0xde, 0xa2, 0x16, 0xa0, 0x3e, 0x9f, 0xb2, 0x6a, 0xe8, 0x26, 0x1f, 0xa3, 0x1e, 0xdf, + 0x9d, 0xd2, 0x63, 0xc5, 0xc3, 0x58, 0x8d, 0x88, 0x79, 0x77, 0xe0, 0xdd, 0x50, 0x86, 0x0a, 0x31, + 0x0c, 0x6c, 0x3a, 0x7c, 0x7c, 0xa6, 0x0c, 0x6b, 0x0c, 0x65, 0x20, 0x43, 0xff, 0x2d, 0x72, 0xe1, + 0x54, 0xef, 0x9e, 0x49, 0xb2, 0xa2, 0x10, 0xd7, 0x74, 0xf8, 0x04, 0xf5, 0x59, 0x99, 0x72, 0xef, + 0x2a, 0x0c, 0x65, 0xd3, 0x51, 0x3d, 0xb7, 0xca, 0xd0, 0x02, 0xfa, 0x82, 0x83, 0xc5, 0x7e, 0x66, + 0xd9, 0x82, 0xcf, 0x70, 0x92, 0x7a, 0xaf, 0x4d, 0xcb, 0x30, 0xc3, 0x0a, 0x88, 0x3e, 0xed, 0x8e, + 0x5e, 0x42, 0xf7, 0x38, 0x78, 0x7d, 0x64, 0x10, 0x2a, 0x56, 0x74, 0x5b, 0x27, 0xa6, 0xd4, 0x26, + 0x2d, 0x5d, 0xd9, 0xe3, 0x53, 0x34, 0x9c, 0xf5, 0xd9, 0xc2, 0x59, 0xf2, 0x41, 0x37, 0x28, 0x26, + 0xa3, 0xe6, 0xac, 0xfb, 0x8c, 0xcf, 0xd0, 0x57, 0x1c, 0x9c, 0x19, 0x19, 0x63, 0x50, 0x1c, 0x69, + 0x1a, 0xdb, 0xf2, 0x6c, 0xb1, 0x75, 0x6b, 0x64, 0xc1, 0x1d, 0xb7, 0x88, 0xae, 0x41, 0x7c, 0x87, + 0x38, 0x98, 0xcf, 0x50, 0x8f, 0x6f, 0x85, 0xf1, 0xb8, 0x4d, 0x1c, 0xbc, 0x1a, 0x11, 0xa9, 0xbd, + 0x87, 0x83, 0x77, 0xb1, 0xc2, 0x43, 0x78, 0x9c, 0xe5, 0x5d, 0xac, 0x78, 0x38, 0x9e, 0x7d, 0x35, + 0x01, 0x31, 0xdb, 0x35, 0x84, 0x1f, 0x39, 0x98, 0xef, 0xaf, 0x3e, 0xb4, 0x02, 0x09, 0x56, 0x47, + 0x5e, 0x07, 0xca, 0x55, 0x2f, 0x3d, 0xd9, 0x2f, 0x5e, 0xd4, 0x74, 0xa7, 0xe9, 0x36, 0x4a, 0x0a, + 0x31, 0xca, 0xcc, 0xa1, 0xff, 0xe7, 0xa2, 0xad, 0x7e, 0x5a, 0x66, 0xdd, 0xb4, 0xa2, 0x28, 0x15, + 0x55, 0xb5, 0xb0, 0x6d, 0x8b, 0xcc, 0x1e, 0xad, 0x43, 0xaa, 0xdb, 0x66, 0x62, 0xe7, 0xb3, 0x97, + 0xcb, 0x93, 0x47, 0x4b, 0xed, 0xaa, 0xf1, 0x07, 0xfb, 0xc5, 0x88, 0x18, 0xa0, 0x20, 0x1e, 0x52, + 0xc1, 0xc6, 0x79, 0x5d, 0x24, 0x23, 0x06, 0x8f, 0xc2, 0xef, 0x1c, 0xbc, 0x3c, 0xb2, 0x35, 0x1d, + 0x5d, 0x36, 0xaf, 0x42, 0x82, 0x35, 0x66, 0xaf, 0x65, 0xc6, 0xab, 0xd9, 0x27, 0xfb, 0xc5, 0x14, + 0xf5, 0xb4, 0xb6, 0x24, 0xb2, 0x15, 0x74, 0x1b, 0xe6, 0x59, 0xa8, 0x12, 0xab, 0x03, 0x9b, 0x8f, + 0xcd, 0x92, 0xf7, 0x1c, 0x03, 0x63, 0x49, 0xd9, 0xc2, 0x4f, 0x1c, 0xbc, 0x34, 0xa2, 0x19, 0x1e, + 0x6b, 0x86, 0x75, 0xc8, 0x98, 0xb8, 0xd3, 0xd3, 0xc9, 0xa7, 0xf2, 0x97, 0x36, 0x71, 0x87, 0xc6, + 0x2e, 0xdc, 0x19, 0xda, 0xb7, 0xe0, 0xbc, 0x1c, 0x67, 0x56, 0xe3, 0xeb, 0xea, 0x3e, 0x07, 0x49, + 0xb6, 0x27, 0xe8, 0x3a, 0xa4, 0x64, 0x86, 0x3c, 0x7d, 0x48, 0x01, 0x02, 0x5a, 0x82, 0x44, 0x9b, + 0x74, 0xb0, 0x45, 0x83, 0xca, 0x54, 0x4b, 0xde, 0x7e, 0xff, 0xba, 0x5f, 0x3c, 0x37, 0x01, 0xdc, + 0x12, 0x56, 0x44, 0x66, 0xfc, 0x94, 0xb8, 0xef, 0x71, 0xb0, 0x30, 0x72, 0xa8, 0x54, 0x65, 0x1b, + 0xbf, 0x20, 0xdc, 0x3e, 0xe2, 0x80, 0x1f, 0x37, 0xf8, 0xd0, 0x36, 0xc4, 0x1b, 0xb2, 0x8d, 0x7d, + 0x15, 0x54, 0x9d, 0x6d, 0x92, 0x7a, 0x49, 0x8b, 0x14, 0x0f, 0x29, 0x70, 0x62, 0x70, 0x3e, 0x31, + 0x09, 0x74, 0x65, 0x62, 0x17, 0x9b, 0x8e, 0xda, 0x3f, 0x66, 0xc4, 0x79, 0xb5, 0xef, 0x59, 0xf8, + 0x3a, 0x0a, 0x8b, 0xe3, 0x87, 0xea, 0xd1, 0xd1, 0xbf, 0x05, 0xb9, 0x60, 0xac, 0x51, 0xd9, 0x11, + 0x9d, 0x16, 0x2f, 0xab, 0xb1, 0x20, 0xa9, 0xba, 0x38, 0xea, 0x33, 0xfe, 0x25, 0xab, 0xc5, 0x61, + 0x36, 0x8e, 0xbb, 0x16, 0x85, 0x3f, 0x38, 0x38, 0x37, 0x99, 0xba, 0x98, 0xa5, 0xfe, 0x46, 0x27, + 0x3a, 0xbe, 0xfe, 0x62, 0x47, 0x5e, 0x7f, 0x8f, 0x38, 0x38, 0xf3, 0x34, 0xa5, 0xf2, 0xa2, 0x57, + 0xe0, 0xf8, 0x9e, 0xf1, 0x19, 0x9c, 0x1c, 0x4a, 0x1f, 0x7d, 0x0c, 0x19, 0xa7, 0x69, 0x61, 0xbb, + 0x49, 0x5a, 0xaa, 0xbf, 0x61, 0xef, 0x4f, 0xcc, 0xe6, 0x56, 0x60, 0xd9, 0x0f, 0xba, 0x1a, 0x11, + 0xbb, 0xa0, 0x81, 0x58, 0xfa, 0x9b, 0x83, 0xd3, 0x63, 0xbe, 0x47, 0xab, 0x83, 0x41, 0x64, 0xaa, + 0x17, 0x42, 0x74, 0xf4, 0xae, 0x31, 0x5a, 0x86, 0x93, 0x86, 0x6e, 0x4a, 0x3b, 0xc4, 0xd1, 0x4d, + 0x4d, 0xea, 0xe8, 0xa6, 0x4a, 0x3a, 0x7e, 0x93, 0x5a, 0x28, 0xb1, 0xdb, 0x64, 0x29, 0xb8, 0x4d, + 0x96, 0x96, 0xfc, 0xdb, 0xa6, 0x78, 0xc2, 0xd0, 0xcd, 0x6d, 0x6a, 0x72, 0x8b, 0x5a, 0x50, 0x18, + 0x79, 0x77, 0x00, 0x26, 0xf6, 0x6c, 0x18, 0x79, 0xb7, 0x17, 0x46, 0xf8, 0x8b, 0x09, 0xc4, 0x0d, + 0x8b, 0xb4, 0x89, 0x8d, 0xe9, 0x91, 0xdd, 0x86, 0xb9, 0xfe, 0xeb, 0xce, 0xd4, 0x55, 0x94, 0xd3, + 0x7a, 0xaf, 0x35, 0xeb, 0x90, 0x69, 0x33, 0x37, 0xbe, 0x62, 0x9c, 0x0a, 0xb3, 0x8b, 0x31, 0xbe, + 0x8e, 0xd0, 0x02, 0xa4, 0x3d, 0x15, 0x2c, 0x99, 0xa4, 0x43, 0x2f, 0x88, 0x69, 0x31, 0xe5, 0x3d, + 0xd7, 0x49, 0x47, 0x38, 0xe0, 0x20, 0xe5, 0x8b, 0x6e, 0x74, 0x01, 0xd2, 0x0c, 0x4d, 0x6e, 0xd1, + 0x24, 0xe3, 0xd5, 0xf9, 0x27, 0xfb, 0x45, 0xd8, 0xf0, 0xdf, 0xad, 0x2d, 0x89, 0x87, 0xeb, 0x68, + 0x0d, 0x92, 0x9e, 0x40, 0x9f, 0x25, 0x74, 0x1f, 0x00, 0xad, 0x40, 0x52, 0x69, 0x12, 0x5d, 0xc1, + 0x34, 0xec, 0xf9, 0x10, 0xfa, 0xb1, 0x46, 0xcd, 0x44, 0xdf, 0xbc, 0x97, 0x80, 0x78, 0xff, 0x41, + 0xfa, 0x9c, 0x65, 0xe9, 0x5d, 0x09, 0xc2, 0x66, 0x69, 0xeb, 0x9a, 0xe9, 0x2b, 0x97, 0xe9, 0xb2, + 0x64, 0x00, 0xc2, 0x77, 0x1c, 0xcc, 0xf9, 0x52, 0xdd, 0x91, 0x55, 0xd9, 0x91, 0xbb, 0x2d, 0x9c, + 0x1b, 0x2b, 0x27, 0x0e, 0x3b, 0x57, 0x74, 0xc6, 0xce, 0x35, 0xbe, 0x36, 0x78, 0x48, 0xed, 0x60, + 0xcb, 0x3b, 0xda, 0x94, 0xb4, 0xb8, 0x18, 0x3c, 0x0a, 0x3f, 0x70, 0x90, 0xed, 0xb9, 0x5c, 0x4c, + 0x12, 0xef, 0x1a, 0x24, 0x99, 0x8a, 0x9f, 0x81, 0x2f, 0x06, 0x80, 0xae, 0x41, 0xb2, 0x83, 0x75, + 0xad, 0xe9, 0x07, 0x1c, 0x5a, 0x34, 0xfa, 0xd6, 0xc2, 0xbf, 0x1c, 0xf0, 0xbd, 0x43, 0x21, 0xa0, + 0xff, 0xb9, 0x9e, 0xed, 0x09, 0x94, 0xe2, 0xe1, 0xd6, 0xc6, 0x8e, 0x6e, 0x6b, 0x07, 0xaa, 0xfe, + 0x67, 0x0e, 0x4e, 0x6f, 0x3a, 0xea, 0xa8, 0xec, 0xd1, 0xcd, 0xbe, 0x89, 0x3f, 0xf9, 0x6f, 0x37, + 0xe3, 0xa8, 0x3c, 0x4e, 0xc1, 0x79, 0x3f, 0x0a, 0xb9, 0xe0, 0xb8, 0x3e, 0xd7, 0x6d, 0xec, 0xa1, + 0x36, 0xda, 0x7f, 0x6a, 0xfa, 0x9a, 0x77, 0xec, 0x08, 0x9a, 0xf7, 0x55, 0xc8, 0xd9, 0x6e, 0xc3, + 0xd0, 0x1d, 0x07, 0xab, 0x92, 0x1c, 0xfc, 0x8e, 0xb7, 0x38, 0x34, 0xba, 0xb6, 0x82, 0xdf, 0x53, + 0xc5, 0xec, 0xe1, 0xf7, 0x15, 0x07, 0xbd, 0x16, 0x30, 0x10, 0x9c, 0xe5, 0x04, 0x3d, 0xcb, 0x2c, + 0x9d, 0x6d, 0xff, 0x40, 0x7f, 0x1f, 0x85, 0xc4, 0x96, 0xdc, 0x6a, 0xed, 0xa1, 0x15, 0xc8, 0xec, + 0x61, 0x5b, 0xea, 0x92, 0x15, 0x6e, 0x7c, 0xa7, 0xf7, 0xb0, 0x5d, 0xa3, 0x0c, 0x2d, 0x43, 0xda, + 0x24, 0x52, 0x57, 0x0d, 0x85, 0xc3, 0x49, 0x99, 0xa4, 0xe6, 0xcf, 0xc2, 0x39, 0xb9, 0x61, 0x3b, + 0xb2, 0x6e, 0xfa, 0x58, 0xb1, 0xd0, 0x58, 0x39, 0x1f, 0x80, 0x01, 0xae, 0x01, 0xec, 0x60, 0x27, + 0x88, 0x2c, 0x1e, 0x5e, 0xa0, 0x78, 0xd6, 0x14, 0x4a, 0xb8, 0x13, 0x85, 0x78, 0xe8, 0xf1, 0xb8, + 0x02, 0x09, 0x3a, 0xdd, 0x66, 0x68, 0xdc, 0xd4, 0xfe, 0x18, 0x86, 0xe3, 0x50, 0xe9, 0x25, 0x42, + 0x95, 0x9e, 0x20, 0x41, 0x72, 0x43, 0xb6, 0x64, 0xc3, 0x46, 0xd7, 0x01, 0x79, 0x1a, 0xcc, 0xc7, + 0x95, 0x5a, 0xd8, 0xd4, 0x9c, 0x26, 0xa5, 0x6a, 0xae, 0xfa, 0xca, 0x3f, 0xfb, 0xc5, 0x85, 0x3d, + 0xd9, 0x68, 0x5d, 0x11, 0x86, 0xbf, 0x11, 0xc4, 0xbc, 0x21, 0xef, 0xfa, 0x72, 0xfd, 0x03, 0xfa, + 0xea, 0x4a, 0xfa, 0xdb, 0xbb, 0xc5, 0xc8, 0x9f, 0x77, 0x8b, 0xdc, 0x85, 0xab, 0x90, 0x64, 0xb9, + 0xa0, 0x2c, 0xa4, 0x6e, 0xd6, 0xaf, 0xd7, 0xd7, 0x6f, 0xd5, 0xf3, 0x11, 0x94, 0x84, 0x68, 0x7d, + 0x3d, 0xcf, 0xa1, 0x14, 0xc4, 0x3e, 0x5c, 0xde, 0xcc, 0x47, 0xbd, 0xd5, 0x4a, 0x75, 0x73, 0xab, + 0xb2, 0x56, 0xcf, 0xc7, 0x50, 0x1a, 0xe2, 0xdb, 0xcb, 0x5b, 0xeb, 0xf9, 0x78, 0xb5, 0xf6, 0xe0, + 0x71, 0x81, 0x7b, 0xf8, 0xb8, 0xc0, 0xfd, 0xf6, 0xb8, 0xc0, 0x7d, 0x73, 0x50, 0x88, 0x3c, 0x3c, + 0x28, 0x44, 0x7e, 0x39, 0x28, 0x44, 0x3e, 0x7a, 0x73, 0x78, 0x47, 0x7c, 0x56, 0xcb, 0x87, 0xac, + 0x96, 0x29, 0xab, 0x8d, 0x24, 0x65, 0xe1, 0xed, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x27, + 0xef, 0xfb, 0x4c, 0x19, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MaxCommentLength != that1.MaxCommentLength { + return false + } + return true +} +func (m *Msg) 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 *Msg) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Msg) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Sum != nil { + { + size := m.Sum.Size() + i -= size + if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *Msg_CreateGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Msg_CreateGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.CreateGroup != nil { + { + size, err := m.CreateGroup.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *Msg_UpdateGroupMembers) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Msg_UpdateGroupMembers) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.UpdateGroupMembers != nil { + { + size, err := m.UpdateGroupMembers.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *Msg_UpdateGroupAdmin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Msg_UpdateGroupAdmin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.UpdateGroupAdmin != nil { + { + size, err := m.UpdateGroupAdmin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *Msg_UpdateGroupComment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Msg_UpdateGroupComment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.UpdateGroupComment != nil { + { + size, err := m.UpdateGroupComment.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *Msg_CreateGroupAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Msg_CreateGroupAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.CreateGroupAccount != nil { + { + size, err := m.CreateGroupAccount.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + return len(dAtA) - i, nil +} +func (m *Msg_UpdateGroupAccountAdmin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Msg_UpdateGroupAccountAdmin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.UpdateGroupAccountAdmin != nil { + { + size, err := m.UpdateGroupAccountAdmin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} +func (m *Msg_UpdateGroupAccountDecisionPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Msg_UpdateGroupAccountDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.UpdateGroupAccountDecisionPolicy != nil { + { + size, err := m.UpdateGroupAccountDecisionPolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + return len(dAtA) - i, nil +} +func (m *Msg_UpdateGroupAccountComment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Msg_UpdateGroupAccountComment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.UpdateGroupAccountComment != nil { + { + size, err := m.UpdateGroupAccountComment.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + return len(dAtA) - i, nil +} +func (m *Msg_Vote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Msg_Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Vote != nil { + { + size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + return len(dAtA) - i, nil +} +func (m *Msg_Exec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Msg_Exec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Exec != nil { + { + size, err := m.Exec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + return len(dAtA) - i, nil +} +func (m *MsgCreateGroup) 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 *MsgCreateGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x1a + } + if len(m.Members) > 0 { + for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupMembers) 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 *MsgUpdateGroupMembers) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupMembers) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MemberUpdates) > 0 { + for iNdEx := len(m.MemberUpdates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MemberUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.Group != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Group)) + i-- + dAtA[i] = 0x10 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupAdmin) 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 *MsgUpdateGroupAdmin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupAdmin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NewAdmin) > 0 { + i -= len(m.NewAdmin) + copy(dAtA[i:], m.NewAdmin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.NewAdmin))) + i-- + dAtA[i] = 0x1a + } + if m.Group != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Group)) + i-- + dAtA[i] = 0x10 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupComment) 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 *MsgUpdateGroupComment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupComment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x1a + } + if m.Group != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Group)) + i-- + dAtA[i] = 0x10 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Member) 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 *Member) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Member) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x1a + } + { + size := m.Power.Size() + i -= size + if _, err := m.Power.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateGroupAccountBase) 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 *MsgCreateGroupAccountBase) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateGroupAccountBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x1a + } + if m.Group != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Group)) + i-- + dAtA[i] = 0x10 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateGroupAccountStd) 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 *MsgCreateGroupAccountStd) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateGroupAccountStd) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DecisionPolicy != nil { + { + size, err := m.DecisionPolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Base != nil { + { + size, err := m.Base.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupAccountAdmin) 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 *MsgUpdateGroupAccountAdmin) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupAccountAdmin) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NewAdmin) > 0 { + i -= len(m.NewAdmin) + copy(dAtA[i:], m.NewAdmin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.NewAdmin))) + i-- + dAtA[i] = 0x1a + } + if len(m.GroupAcount) > 0 { + i -= len(m.GroupAcount) + copy(dAtA[i:], m.GroupAcount) + i = encodeVarintTypes(dAtA, i, uint64(len(m.GroupAcount))) + i-- + dAtA[i] = 0x12 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupAccountBase) 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 *MsgUpdateGroupAccountBase) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupAccountBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Group != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Group)) + i-- + dAtA[i] = 0x10 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupAccountDecisionPolicyStd) 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 *MsgUpdateGroupAccountDecisionPolicyStd) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupAccountDecisionPolicyStd) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DecisionPolicy != nil { + { + size, err := m.DecisionPolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Base != nil { + { + size, err := m.Base.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateGroupAccountComment) 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 *MsgUpdateGroupAccountComment) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateGroupAccountComment) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x1a + } + if len(m.GroupAcount) > 0 { + i -= len(m.GroupAcount) + copy(dAtA[i:], m.GroupAcount) + i = encodeVarintTypes(dAtA, i, uint64(len(m.GroupAcount))) + i-- + dAtA[i] = 0x12 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StdDecisionPolicy) 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 *StdDecisionPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StdDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Sum != nil { + { + size := m.Sum.Size() + i -= size + if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *StdDecisionPolicy_Threshold) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StdDecisionPolicy_Threshold) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Threshold != nil { + { + size, err := m.Threshold.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *ThresholdDecisionPolicy) 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 *ThresholdDecisionPolicy) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ThresholdDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MaxVotingWindow != nil { + { + size, err := m.MaxVotingWindow.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.MinVotingWindow != nil { + { + size, err := m.MinVotingWindow.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Threshold != nil { + { + size := m.Threshold.Size() + i -= size + if _, err := m.Threshold.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgProposeBase) 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 *MsgProposeBase) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgProposeBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ExecNow { + i-- + if m.ExecNow { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x1a + } + if len(m.Proposers) > 0 { + for iNdEx := len(m.Proposers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Proposers[iNdEx]) + copy(dAtA[i:], m.Proposers[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Proposers[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.GroupAccount) > 0 { + i -= len(m.GroupAccount) + copy(dAtA[i:], m.GroupAccount) + i = encodeVarintTypes(dAtA, i, uint64(len(m.GroupAccount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgVote) 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 *MsgVote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x22 + } + if m.Choice != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Choice)) + i-- + dAtA[i] = 0x18 + } + if len(m.Voters) > 0 { + for iNdEx := len(m.Voters) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Voters[iNdEx]) + copy(dAtA[i:], m.Voters[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Voters[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if m.Proposal != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Proposal)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgExec) 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 *MsgExec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0x12 + } + if m.Proposal != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Proposal)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GroupMetadata) 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 *GroupMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Version != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x20 + } + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x1a + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0x12 + } + if m.Group != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Group)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GroupMember) 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 *GroupMember) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupMember) 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 = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.Member) > 0 { + i -= len(m.Member) + copy(dAtA[i:], m.Member) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Member))) + i-- + dAtA[i] = 0x12 + } + if m.Group != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Group)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GroupAccountMetadataBase) 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 *GroupAccountMetadataBase) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GroupAccountMetadataBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x22 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0x1a + } + if m.Group != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Group)) + i-- + dAtA[i] = 0x10 + } + if len(m.GroupAccount) > 0 { + i -= len(m.GroupAccount) + copy(dAtA[i:], m.GroupAccount) + i = encodeVarintTypes(dAtA, i, uint64(len(m.GroupAccount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StdGroupAccountMetadata) 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 *StdGroupAccountMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StdGroupAccountMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.DecisionPolicy != nil { + { + size, err := m.DecisionPolicy.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Base != nil { + { + size, err := m.Base.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ProposalBase) 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 *ProposalBase) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProposalBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GroupVersion != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.GroupVersion)) + i-- + dAtA[i] = 0x28 + } + if m.SubmittedAt != nil { + { + size, err := m.SubmittedAt.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.Proposers) > 0 { + for iNdEx := len(m.Proposers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Proposers[iNdEx]) + copy(dAtA[i:], m.Proposers[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Proposers[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x12 + } + if len(m.GroupAccount) > 0 { + i -= len(m.GroupAccount) + copy(dAtA[i:], m.GroupAccount) + i = encodeVarintTypes(dAtA, i, uint64(len(m.GroupAccount))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Tally) 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 *Tally) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Tally) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.VetoCount != nil { + { + size := m.VetoCount.Size() + i -= size + if _, err := m.VetoCount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.AbstainCount != nil { + { + size := m.AbstainCount.Size() + i -= size + if _, err := m.AbstainCount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.NoCount != nil { + { + size := m.NoCount.Size() + i -= size + if _, err := m.NoCount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.YesCount != nil { + { + size := m.YesCount.Size() + i -= size + if _, err := m.YesCount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Vote) 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 *Vote) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SubmittedAt != nil { + { + size, err := m.SubmittedAt.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.Comment) > 0 { + i -= len(m.Comment) + copy(dAtA[i:], m.Comment) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Comment))) + i-- + dAtA[i] = 0x22 + } + if m.Choice != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Choice)) + i-- + dAtA[i] = 0x18 + } + if len(m.Voter) > 0 { + i -= len(m.Voter) + copy(dAtA[i:], m.Voter) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Voter))) + i-- + dAtA[i] = 0x12 + } + if m.Proposal != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Proposal)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MaxCommentLength != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.MaxCommentLength)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Msg) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Sum != nil { + n += m.Sum.Size() + } + return n +} + +func (m *Msg_CreateGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CreateGroup != nil { + l = m.CreateGroup.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Msg_UpdateGroupMembers) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UpdateGroupMembers != nil { + l = m.UpdateGroupMembers.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Msg_UpdateGroupAdmin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UpdateGroupAdmin != nil { + l = m.UpdateGroupAdmin.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Msg_UpdateGroupComment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UpdateGroupComment != nil { + l = m.UpdateGroupComment.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Msg_CreateGroupAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CreateGroupAccount != nil { + l = m.CreateGroupAccount.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Msg_UpdateGroupAccountAdmin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UpdateGroupAccountAdmin != nil { + l = m.UpdateGroupAccountAdmin.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Msg_UpdateGroupAccountDecisionPolicy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UpdateGroupAccountDecisionPolicy != nil { + l = m.UpdateGroupAccountDecisionPolicy.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Msg_UpdateGroupAccountComment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UpdateGroupAccountComment != nil { + l = m.UpdateGroupAccountComment.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Msg_Vote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Vote != nil { + l = m.Vote.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *Msg_Exec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Exec != nil { + l = m.Exec.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *MsgCreateGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + l = len(m.Comment) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *MsgUpdateGroupMembers) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Group != 0 { + n += 1 + sovTypes(uint64(m.Group)) + } + if len(m.MemberUpdates) > 0 { + for _, e := range m.MemberUpdates { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *MsgUpdateGroupAdmin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Group != 0 { + n += 1 + sovTypes(uint64(m.Group)) + } + l = len(m.NewAdmin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *MsgUpdateGroupComment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Group != 0 { + n += 1 + sovTypes(uint64(m.Group)) + } + l = len(m.Comment) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Member) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Power.Size() + n += 1 + l + sovTypes(uint64(l)) + l = len(m.Comment) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *MsgCreateGroupAccountBase) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Group != 0 { + n += 1 + sovTypes(uint64(m.Group)) + } + l = len(m.Comment) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *MsgCreateGroupAccountStd) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Base != nil { + l = m.Base.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.DecisionPolicy != nil { + l = m.DecisionPolicy.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *MsgUpdateGroupAccountAdmin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.GroupAcount) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.NewAdmin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *MsgUpdateGroupAccountBase) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Group != 0 { + n += 1 + sovTypes(uint64(m.Group)) + } + return n +} + +func (m *MsgUpdateGroupAccountDecisionPolicyStd) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Base != nil { + l = m.Base.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.DecisionPolicy != nil { + l = m.DecisionPolicy.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *MsgUpdateGroupAccountComment) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.GroupAcount) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Comment) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *StdDecisionPolicy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Sum != nil { + n += m.Sum.Size() + } + return n +} + +func (m *StdDecisionPolicy_Threshold) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Threshold != nil { + l = m.Threshold.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *ThresholdDecisionPolicy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Threshold != nil { + l = m.Threshold.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.MinVotingWindow != nil { + l = m.MinVotingWindow.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.MaxVotingWindow != nil { + l = m.MaxVotingWindow.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *MsgProposeBase) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupAccount) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Proposers) > 0 { + for _, b := range m.Proposers { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } + } + l = len(m.Comment) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.ExecNow { + n += 2 + } + return n +} + +func (m *MsgVote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Proposal != 0 { + n += 1 + sovTypes(uint64(m.Proposal)) + } + if len(m.Voters) > 0 { + for _, b := range m.Voters { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.Choice != 0 { + n += 1 + sovTypes(uint64(m.Choice)) + } + l = len(m.Comment) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *MsgExec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Proposal != 0 { + n += 1 + sovTypes(uint64(m.Proposal)) + } + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *GroupMetadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Group != 0 { + n += 1 + sovTypes(uint64(m.Group)) + } + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Comment) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Version != 0 { + n += 1 + sovTypes(uint64(m.Version)) + } + return n +} + +func (m *GroupMember) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Group != 0 { + n += 1 + sovTypes(uint64(m.Group)) + } + l = len(m.Member) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Weight.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func (m *GroupAccountMetadataBase) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupAccount) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Group != 0 { + n += 1 + sovTypes(uint64(m.Group)) + } + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Comment) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *StdGroupAccountMetadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Base != nil { + l = m.Base.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.DecisionPolicy != nil { + l = m.DecisionPolicy.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *ProposalBase) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.GroupAccount) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Comment) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Proposers) > 0 { + for _, b := range m.Proposers { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.SubmittedAt != nil { + l = m.SubmittedAt.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.GroupVersion != 0 { + n += 1 + sovTypes(uint64(m.GroupVersion)) + } + return n +} + +func (m *Tally) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.YesCount != nil { + l = m.YesCount.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NoCount != nil { + l = m.NoCount.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.AbstainCount != nil { + l = m.AbstainCount.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.VetoCount != nil { + l = m.VetoCount.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Vote) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Proposal != 0 { + n += 1 + sovTypes(uint64(m.Proposal)) + } + l = len(m.Voter) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Choice != 0 { + n += 1 + sovTypes(uint64(m.Choice)) + } + l = len(m.Comment) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.SubmittedAt != nil { + l = m.SubmittedAt.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MaxCommentLength != 0 { + n += 1 + sovTypes(uint64(m.MaxCommentLength)) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Msg) 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 ErrIntOverflowTypes + } + 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: Msg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Msg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreateGroup", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &MsgCreateGroup{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Sum = &Msg_CreateGroup{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateGroupMembers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &MsgUpdateGroupMembers{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Sum = &Msg_UpdateGroupMembers{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateGroupAdmin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &MsgUpdateGroupAdmin{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Sum = &Msg_UpdateGroupAdmin{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateGroupComment", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &MsgUpdateGroupComment{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Sum = &Msg_UpdateGroupComment{v} + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreateGroupAccount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &MsgCreateGroupAccountStd{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Sum = &Msg_CreateGroupAccount{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateGroupAccountAdmin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &MsgUpdateGroupAccountAdmin{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Sum = &Msg_UpdateGroupAccountAdmin{v} + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateGroupAccountDecisionPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &MsgUpdateGroupAccountDecisionPolicyStd{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Sum = &Msg_UpdateGroupAccountDecisionPolicy{v} + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateGroupAccountComment", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &MsgUpdateGroupAccountComment{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Sum = &Msg_UpdateGroupAccountComment{v} + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &MsgVote{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Sum = &Msg_Vote{v} + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Exec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &MsgExec{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Sum = &Msg_Exec{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateGroup) 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 ErrIntOverflowTypes + } + 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: MsgCreateGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = append(m.Admin[:0], dAtA[iNdEx:postIndex]...) + if m.Admin == nil { + m.Admin = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Members = append(m.Members, Member{}) + if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Comment = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupMembers) 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 ErrIntOverflowTypes + } + 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: MsgUpdateGroupMembers: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupMembers: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = append(m.Admin[:0], dAtA[iNdEx:postIndex]...) + if m.Admin == nil { + m.Admin = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + m.Group = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Group |= GroupID(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MemberUpdates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MemberUpdates = append(m.MemberUpdates, Member{}) + if err := m.MemberUpdates[len(m.MemberUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupAdmin) 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 ErrIntOverflowTypes + } + 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: MsgUpdateGroupAdmin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupAdmin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = append(m.Admin[:0], dAtA[iNdEx:postIndex]...) + if m.Admin == nil { + m.Admin = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + m.Group = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Group |= GroupID(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewAdmin", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewAdmin = append(m.NewAdmin[:0], dAtA[iNdEx:postIndex]...) + if m.NewAdmin == nil { + m.NewAdmin = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupComment) 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 ErrIntOverflowTypes + } + 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: MsgUpdateGroupComment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupComment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = append(m.Admin[:0], dAtA[iNdEx:postIndex]...) + if m.Admin == nil { + m.Admin = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + m.Group = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Group |= GroupID(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Comment = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Member) 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 ErrIntOverflowTypes + } + 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: Member: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Member: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Power.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Comment = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateGroupAccountBase) 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 ErrIntOverflowTypes + } + 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: MsgCreateGroupAccountBase: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateGroupAccountBase: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = append(m.Admin[:0], dAtA[iNdEx:postIndex]...) + if m.Admin == nil { + m.Admin = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + m.Group = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Group |= GroupID(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Comment = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateGroupAccountStd) 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 ErrIntOverflowTypes + } + 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: MsgCreateGroupAccountStd: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateGroupAccountStd: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Base", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Base == nil { + m.Base = &MsgCreateGroupAccountBase{} + } + if err := m.Base.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DecisionPolicy == nil { + m.DecisionPolicy = &StdDecisionPolicy{} + } + if err := m.DecisionPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupAccountAdmin) 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 ErrIntOverflowTypes + } + 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: MsgUpdateGroupAccountAdmin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupAccountAdmin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = append(m.Admin[:0], dAtA[iNdEx:postIndex]...) + if m.Admin == nil { + m.Admin = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupAcount", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupAcount = append(m.GroupAcount[:0], dAtA[iNdEx:postIndex]...) + if m.GroupAcount == nil { + m.GroupAcount = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewAdmin", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewAdmin = append(m.NewAdmin[:0], dAtA[iNdEx:postIndex]...) + if m.NewAdmin == nil { + m.NewAdmin = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupAccountBase) 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 ErrIntOverflowTypes + } + 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: MsgUpdateGroupAccountBase: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupAccountBase: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = append(m.Admin[:0], dAtA[iNdEx:postIndex]...) + if m.Admin == nil { + m.Admin = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + m.Group = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Group |= GroupID(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupAccountDecisionPolicyStd) 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 ErrIntOverflowTypes + } + 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: MsgUpdateGroupAccountDecisionPolicyStd: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupAccountDecisionPolicyStd: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Base", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Base == nil { + m.Base = &MsgUpdateGroupAccountBase{} + } + if err := m.Base.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DecisionPolicy == nil { + m.DecisionPolicy = &StdDecisionPolicy{} + } + if err := m.DecisionPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateGroupAccountComment) 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 ErrIntOverflowTypes + } + 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: MsgUpdateGroupAccountComment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateGroupAccountComment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = append(m.Admin[:0], dAtA[iNdEx:postIndex]...) + if m.Admin == nil { + m.Admin = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupAcount", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupAcount = append(m.GroupAcount[:0], dAtA[iNdEx:postIndex]...) + if m.GroupAcount == nil { + m.GroupAcount = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Comment = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StdDecisionPolicy) 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 ErrIntOverflowTypes + } + 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: StdDecisionPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StdDecisionPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ThresholdDecisionPolicy{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Sum = &StdDecisionPolicy_Threshold{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ThresholdDecisionPolicy) 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 ErrIntOverflowTypes + } + 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: ThresholdDecisionPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ThresholdDecisionPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Threshold", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_cosmos_cosmos_sdk_types.Dec + m.Threshold = &v + if err := m.Threshold.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinVotingWindow", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MinVotingWindow == nil { + m.MinVotingWindow = &types.Duration{} + } + if err := m.MinVotingWindow.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxVotingWindow", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MaxVotingWindow == nil { + m.MaxVotingWindow = &types.Duration{} + } + if err := m.MaxVotingWindow.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgProposeBase) 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 ErrIntOverflowTypes + } + 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: MsgProposeBase: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgProposeBase: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupAccount", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupAccount = append(m.GroupAccount[:0], dAtA[iNdEx:postIndex]...) + if m.GroupAccount == nil { + m.GroupAccount = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposers", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proposers = append(m.Proposers, make([]byte, postIndex-iNdEx)) + copy(m.Proposers[len(m.Proposers)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Comment = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecNow", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ExecNow = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgVote) 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 ErrIntOverflowTypes + } + 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: MsgVote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) + } + m.Proposal = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Proposal |= ProposalID(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Voters", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Voters = append(m.Voters, make([]byte, postIndex-iNdEx)) + copy(m.Voters[len(m.Voters)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Choice", wireType) + } + m.Choice = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Choice |= Choice(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Comment = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExec) 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 ErrIntOverflowTypes + } + 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: MsgExec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) + } + m.Proposal = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Proposal |= ProposalID(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = append(m.Signer[:0], dAtA[iNdEx:postIndex]...) + if m.Signer == nil { + m.Signer = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupMetadata) 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 ErrIntOverflowTypes + } + 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: GroupMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + m.Group = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Group |= GroupID(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = append(m.Admin[:0], dAtA[iNdEx:postIndex]...) + if m.Admin == nil { + m.Admin = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Comment = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupMember) 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 ErrIntOverflowTypes + } + 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: GroupMember: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupMember: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + m.Group = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Group |= GroupID(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Member", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Member = append(m.Member[:0], dAtA[iNdEx:postIndex]...) + if m.Member == nil { + m.Member = []byte{} + } + iNdEx = postIndex + case 3: + 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 ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + 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 := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupAccountMetadataBase) 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 ErrIntOverflowTypes + } + 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: GroupAccountMetadataBase: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupAccountMetadataBase: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupAccount", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupAccount = append(m.GroupAccount[:0], dAtA[iNdEx:postIndex]...) + if m.GroupAccount == nil { + m.GroupAccount = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + m.Group = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Group |= GroupID(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = append(m.Admin[:0], dAtA[iNdEx:postIndex]...) + if m.Admin == nil { + m.Admin = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Comment = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StdGroupAccountMetadata) 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 ErrIntOverflowTypes + } + 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: StdGroupAccountMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StdGroupAccountMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Base", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Base == nil { + m.Base = &GroupAccountMetadataBase{} + } + if err := m.Base.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DecisionPolicy == nil { + m.DecisionPolicy = &StdDecisionPolicy{} + } + if err := m.DecisionPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProposalBase) 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 ErrIntOverflowTypes + } + 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: ProposalBase: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProposalBase: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupAccount", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupAccount = append(m.GroupAccount[:0], dAtA[iNdEx:postIndex]...) + if m.GroupAccount == nil { + m.GroupAccount = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Comment = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposers", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proposers = append(m.Proposers, make([]byte, postIndex-iNdEx)) + copy(m.Proposers[len(m.Proposers)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubmittedAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SubmittedAt == nil { + m.SubmittedAt = &types.Timestamp{} + } + if err := m.SubmittedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupVersion", wireType) + } + m.GroupVersion = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GroupVersion |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Tally) 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 ErrIntOverflowTypes + } + 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: Tally: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tally: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field YesCount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_cosmos_cosmos_sdk_types.Dec + m.YesCount = &v + if err := m.YesCount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NoCount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_cosmos_cosmos_sdk_types.Dec + m.NoCount = &v + if err := m.NoCount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AbstainCount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_cosmos_cosmos_sdk_types.Dec + m.AbstainCount = &v + if err := m.AbstainCount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VetoCount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_cosmos_cosmos_sdk_types.Dec + m.VetoCount = &v + if err := m.VetoCount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Vote) 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 ErrIntOverflowTypes + } + 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: Vote: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposal", wireType) + } + m.Proposal = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Proposal |= ProposalID(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Voter = append(m.Voter[:0], dAtA[iNdEx:postIndex]...) + if m.Voter == nil { + m.Voter = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Choice", wireType) + } + m.Choice = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Choice |= Choice(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Comment = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubmittedAt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SubmittedAt == nil { + m.SubmittedAt = &types.Timestamp{} + } + if err := m.SubmittedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxCommentLength", wireType) + } + m.MaxCommentLength = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxCommentLength |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/incubator/group/types.proto b/incubator/group/types.proto new file mode 100644 index 0000000..3a4ad25 --- /dev/null +++ b/incubator/group/types.proto @@ -0,0 +1,245 @@ +syntax = "proto3"; + +package cosmos_modules.incubator.group.v1_alpha; + +option go_package = "github.com/cosmos/modules/incubator/group"; + +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +message Msg { + oneof sum { + MsgCreateGroup create_group = 1; // returns uint64 GroupID + MsgUpdateGroupMembers update_group_members = 2; + MsgUpdateGroupAdmin update_group_admin = 3; + MsgUpdateGroupComment update_group_comment = 4; + MsgCreateGroupAccountStd create_group_account = 5; // returns sdk.AccAddress + MsgUpdateGroupAccountAdmin update_group_account_admin = 6; + MsgUpdateGroupAccountDecisionPolicyStd update_group_account_decision_policy = 7; + MsgUpdateGroupAccountComment update_group_account_comment = 8; + MsgVote vote = 9; + MsgExec exec = 10; + } +} + +// +// Groups +// + +message MsgCreateGroup { + bytes admin = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + repeated Member members = 2 [(gogoproto.nullable) = false]; + string comment = 3; +} + +message MsgUpdateGroupMembers { + bytes admin = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + uint64 group = 2 [(gogoproto.casttype) = "GroupID"]; + repeated Member member_updates = 3 [(gogoproto.nullable) = false]; // set power to 0 to remove +} + +message MsgUpdateGroupAdmin { + bytes admin = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + uint64 group = 2 [(gogoproto.casttype) = "GroupID"]; + bytes new_admin = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; +} + +message MsgUpdateGroupComment { + bytes admin = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + uint64 group = 2 [(gogoproto.casttype) = "GroupID"]; + string comment = 3; +} + +message Member { + bytes address = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string power = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string comment = 3; +} + +// +// Group Accounts +// + +message MsgCreateGroupAccountBase { + bytes admin = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + uint64 group = 2 [(gogoproto.casttype) = "GroupID"]; + string comment = 3; +} + +// MsgCreateGroupAccountStd creates a group account using one of the members of StdDecisionPolicy. Apps can +// create their own create account msg that supports custom DecisionPolicy's using MsgCreateGroupAccountBase as +// starting point +message MsgCreateGroupAccountStd { + MsgCreateGroupAccountBase base = 1; + StdDecisionPolicy decision_policy = 2; +} + +message MsgUpdateGroupAccountAdmin { + bytes admin = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + bytes group_acount = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + bytes new_admin = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; +} + +message MsgUpdateGroupAccountBase { + bytes admin = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + uint64 group = 2 [(gogoproto.casttype) = "GroupID"]; +} + +// MsgCreateGroupAccountStd allows a group account decision policy to be updated to a member of StdDecisionPolicy, can +// be overridden to support custom DecisionPolicy's by apps. +message MsgUpdateGroupAccountDecisionPolicyStd { + MsgUpdateGroupAccountBase base = 1; + StdDecisionPolicy decision_policy = 3; +} + +message MsgUpdateGroupAccountComment { + bytes admin = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + bytes group_acount = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string comment = 3; +} + +// StdDecisionPolicy is a set of standard decision policies that can be used by zones that do not implement custom +// DecisionPolicy types. Apps can start with StdDecisionPolicy and later add custom DecisionPolicy's by creating +// a MyAppDecisionPolicy and registering that with the group module codec. In order to be backwards compatible, +// MyAppDecisionPolicy should include all the existing StdDecisionPolicy types with the same field number and then +// add custom DecisionPolicy types afterwards. +message StdDecisionPolicy { + oneof sum { + ThresholdDecisionPolicy threshold = 1; + } +} + +message ThresholdDecisionPolicy { + string threshold = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"]; + google.protobuf.Duration min_voting_window = 2; + google.protobuf.Duration max_voting_window = 3; +} + +// +// Proposals and Voting +// + +// MsgProposeBase is the base propose msg that app should use to implement a MsgPropose type based +// on their app Msg type. +// +// Ex: +// message MsgPropose { +// MsgProposeBase base = 1; +// repeated MyAppMsg msgs = 2; +// } +message MsgProposeBase { + bytes group_account = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + // Proposers signatures will be counted as yes votes + repeated bytes proposers = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string comment = 3; + // ExecNow will attempt to execute the proposal immediately based on + // the proposers signing the transaction + bool exec_now = 4; +} + +enum Choice { + UNKNOWN = 0; + NO = 1; + YES = 2; + ABSTAIN = 3; + VETO = 4; +} + +message MsgVote { + uint64 proposal = 1 [(gogoproto.casttype) = "ProposalID"]; + repeated bytes voters = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + Choice choice = 3; + string comment = 4; +} + +message MsgExec { + uint64 proposal = 1 [(gogoproto.casttype) = "ProposalID"]; + bytes signer = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; +} + +// +// State +// + +message GroupMetadata { + uint64 group = 1 [(gogoproto.casttype) = "GroupID"]; + bytes admin = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string comment = 3; + // version is used to track changes to a group's membership structure that + // would break existing proposals. Whenever any members power is changed, + // or any member is added or removed this version is incremented and will + // cause proposals based on older versions of this group to fail + uint64 version = 4; +} + +message GroupMember { + uint64 group = 1 [(gogoproto.casttype) = "GroupID"]; + bytes member = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string weight = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + +// GroupAccountMetadataBase is the base message that app's should use to specify group account metadata based on the +// DecisionPolicy's they support. +// +// Ex: +// message MyAppGroupAccountMetadata { +// GroupAccountMetadataBase base = 1; +// MyAppDecisionPolicy decision_policy = 2; +// } +// +// App's which do not implement custom DecisionPolicy's can use StdGroupAccountMetadata. +message GroupAccountMetadataBase { + bytes group_account = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + uint64 group = 2 [(gogoproto.casttype) = "GroupID"]; + bytes admin = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string comment = 4; +} + +// StdGroupAccountMetadata is a default group account metadata type to be used by apps which do not implement custom +// DecisionPolicy's. +message StdGroupAccountMetadata { + GroupAccountMetadataBase base = 1; + StdDecisionPolicy decision_policy = 2; +} + +// ProposalBase is the base proposal type that app should use to implement a Proposal type based +// on their app Msg type. +// +// Ex: +// message MyAppProposal { +// ProposalBase base = 1; +// repeated MyAppMsg msgs = 2; +// } +message ProposalBase { + bytes group_account = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + string comment = 2; + repeated bytes proposers = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + google.protobuf.Timestamp submitted_at = 4; + // GroupVersion tracks the version of the group that this proposal corresponds to. When group membership is changed + // existing proposals for prior group versions will become invalid. + uint64 group_version = 5; +} + +message Tally { + string yes_count = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"]; + string no_count = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"]; + string abstain_count = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"]; + string veto_count = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"]; +} + +message Vote { + uint64 proposal = 1 [(gogoproto.casttype) = "ProposalID"]; + bytes voter = 2 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; + Choice choice = 3; + string comment = 4; + google.protobuf.Timestamp submitted_at = 5; +} + + +// Params defines the set of configurable parameters. +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + uint32 max_comment_length = 1 [(gogoproto.moretags) = "yaml:\"max_comment_length\""]; +}