diff --git a/incubator/group/codec.go b/incubator/group/codec.go index df6117f..b4fe44d 100644 --- a/incubator/group/codec.go +++ b/incubator/group/codec.go @@ -2,46 +2,59 @@ package group import ( "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" ) -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.RegisterInterface((*DecisionPolicy)(nil), nil) cdc.RegisterConcrete(MsgCreateGroup{}, "cosmos-sdk/MsgCreateGroup", nil) cdc.RegisterConcrete(MsgUpdateGroupMembers{}, "cosmos-sdk/MsgUpdateGroupMembers", nil) cdc.RegisterConcrete(MsgUpdateGroupAdmin{}, "cosmos-sdk/MsgUpdateGroupAdmin", nil) cdc.RegisterConcrete(MsgUpdateGroupComment{}, "cosmos-sdk/MsgUpdateGroupComment", nil) - cdc.RegisterConcrete(MsgCreateGroupAccountStd{}, "cosmos-sdk/MsgCreateGroupAccountStd", nil) + cdc.RegisterConcrete(MsgCreateGroupAccount{}, "cosmos-sdk/MsgCreateGroupAccount", nil) cdc.RegisterConcrete(MsgVote{}, "cosmos-sdk/group/MsgVote", nil) cdc.RegisterConcrete(MsgExec{}, "cosmos-sdk/group/MsgExec", nil) // oh man... amino - cdc.RegisterConcrete(StdDecisionPolicy{}, "cosmos-sdk/StdDecisionPolicy", nil) - cdc.RegisterConcrete(&StdDecisionPolicy_Threshold{}, "cosmos-sdk/StdDecisionPolicy_Threshold", nil) - cdc.RegisterConcrete(ThresholdDecisionPolicy{}, "cosmos-sdk/ThresholdDecisionPolicy", nil) - cdc.RegisterInterface((*isStdDecisionPolicy_Sum)(nil), nil) + // cdc.RegisterConcrete(StdDecisionPolicy{}, "cosmos-sdk/StdDecisionPolicy", nil) + // cdc.RegisterConcrete(&StdDecisionPolicy_Threshold{}, "cosmos-sdk/StdDecisionPolicy_Threshold", nil) + cdc.RegisterConcrete(&ThresholdDecisionPolicy{}, "cosmos-sdk/ThresholdDecisionPolicy", nil) + // cdc.RegisterInterface((*isStdDecisionPolicy_Sum)(nil), nil) +} + +func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgCreateGroup{}, + &MsgUpdateGroupMembers{}, + &MsgUpdateGroupComment{}, + &MsgCreateGroupAccount{}, + &MsgVote{}, + &MsgExec{}, + ) + registry.RegisterInterface( + "cosmos_modules.incubator.group.v1_alpha.DecisionPolicy", + (*DecisionPolicy)(nil), + &ThresholdDecisionPolicy{}, + ) } -// generic sealed codec to be used throughout module -var ModuleCdc *Codec +var ( + amino = codec.New() + + // moduleCdc references the global group module codec. Note, the codec + // should ONLY be used in certain instances of tests and for JSON encoding as Amino + // is still used for that purpose. + // + // The actual codec used for serialization should be provided to group and + // defined at the application level. + moduleCdc = codec.NewHybridCodec(amino, cdctypes.NewInterfaceRegistry()) +) func init() { - ModuleCdc = NewCodec(codec.New()) - RegisterCodec(ModuleCdc.amino) - codec.RegisterCrypto(ModuleCdc.amino) - ModuleCdc.amino.Seal() + RegisterCodec(amino) + codec.RegisterCrypto(amino) + amino.Seal() } diff --git a/incubator/group/go.mod b/incubator/group/go.mod index cfad3ee..f4a93f0 100644 --- a/incubator/group/go.mod +++ b/incubator/group/go.mod @@ -3,17 +3,17 @@ 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/cosmos-sdk v0.34.4-0.20200528030001-71770b5a7804 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/gorilla/mux v1.7.4 github.com/pkg/errors v0.9.1 - github.com/regen-network/cosmos-proto v0.1.1-0.20200213154359-02baa11ea7c2 - 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 + github.com/regen-network/cosmos-proto v0.3.0 + github.com/spf13/cobra v1.0.0 + github.com/stretchr/testify v1.5.1 + github.com/tendermint/tendermint v0.33.4 + github.com/tendermint/tm-db v0.5.1 + gopkg.in/yaml.v2 v2.3.0 ) replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.2-alpha.regen.1 diff --git a/incubator/group/go.sum b/incubator/group/go.sum index 0ed1a2c..ef09942 100644 --- a/incubator/group/go.sum +++ b/incubator/group/go.sum @@ -1,49 +1,102 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= 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/99designs/keyring v1.1.5 h1:wLv7QyzYpFIyMSwOADq1CLTF9KbjbBfcnfmOGJ64aO4= +github.com/99designs/keyring v1.1.5/go.mod h1:7hsVvt2qXgtadGevGJ4ujg+u8m6SpJ5TpHqTozIPqf0= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel 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/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= +github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/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/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= +github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= 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/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= 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/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= +github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= 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/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= +github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= 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/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= 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/etcd v3.3.13+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-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= 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/cosmos-sdk v0.38.1 h1:DTuxIJeMpB//ydq+ObAjQgsaiwYBZ8T7NDzXjyiL1Kg= +github.com/cosmos/cosmos-sdk v0.34.4-0.20200528030001-71770b5a7804 h1:LSe12XaJbg8bSzkZL8+VJv+g7RtrfUMbsE7Qsv6pGqk= +github.com/cosmos/cosmos-sdk v0.34.4-0.20200528030001-71770b5a7804/go.mod h1:tjEitNQy9tpQXxyDxY+EHk1+FefrHOb7/rw6IhUDkU0= +github.com/cosmos/cosmos-sdk v0.38.4 h1:jPZOvhMQkm7wwwzcLxuluhVpKfuIgddNGt999pAiz/Y= 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= @@ -53,6 +106,9 @@ github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0W 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/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= 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= @@ -61,9 +117,17 @@ 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/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= 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/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/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= @@ -74,30 +138,46 @@ github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojt 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/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= 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/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/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/gibson042/canonicaljson-go v1.0.3 h1:EAyF8L74AWabkyUmrvEFHEt/AGFQeD6RfwbAuf0j1bI= +github.com/gibson042/canonicaljson-go v1.0.3/go.mod h1:DsLpJTThXyGNO+KZlI85C1/KDcImpP67k/RKVjcaEqo= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= 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-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= 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-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= 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/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= 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-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129 h1:tT8iWCYw4uOem71yYA3htfH+LNopJvcqZQshm56G5L4= github.com/golang/mock v1.3.1-0.20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.3 h1:GV+pQPG/EUUbkh47niozDcADz6go/dUwhVzdUQHIVRw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 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= @@ -105,45 +185,110 @@ github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs 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/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 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 v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= 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/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 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/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/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/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= 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/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= +github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= 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/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/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-middleware v1.0.1-0.20190118093823-f849b5445de4/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/grpc-ecosystem/grpc-gateway v1.9.5/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/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= +github.com/gtank/merlin v0.1.1/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/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 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/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= 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/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= 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= @@ -161,94 +306,193 @@ 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/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.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/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= 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/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= 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/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 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/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= +github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= 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/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k= +github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0 h1:TJIWdbX0B+kpNagQrjgq8bCMrbhiuX73M2XwgtDMoOI= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.1 h1:BCmzIS3n71sGfHB5NMNDB3lHYPz8fWSkCAErHed//qc= +github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.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/pelletier/go-toml v1.8.0 h1:Keo9qb7iRJs2voHvunFtuuYFsbWeOBh8/P9v/kVMFtw= +github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bAOTRnLElKs= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= 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_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.5.0 h1:Ctq0iGpCmr3jeP77kbF2UxgvRwzWWz+4Bh9/vJTyg1A= +github.com/prometheus/client_golang v1.5.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.5.1 h1:bdHYieyGlH+6OLEk2YQha8THib30KP0/yD0YH9m6xcA= +github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= 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/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/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.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 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/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/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/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= 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/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= 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/cosmos-proto v0.1.1-0.20200213154359-02baa11ea7c2 h1:jQK1YoH972Aptd22YKgtNu5jM2X2xMGkyIENOAc71to= -github.com/regen-network/cosmos-proto v0.1.1-0.20200213154359-02baa11ea7c2/go.mod h1:+r7jN10xXCypD4yBgzKOa+vgLz0riqYMHeDcKekxPvA= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ= +github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/regen-network/cosmos-proto v0.3.0 h1:24dVpPrPi0GDoPVLesf2Ug98iK5QgVscPl0ga4Eoub0= +github.com/regen-network/cosmos-proto v0.3.0/go.mod h1:zuP2jVPHab6+IIyOx3nXHFN+euFNeS3W8XQkcdd4s7A= +github.com/regen-network/protobuf v1.3.1 h1:NqorqFbh0keWskTfR5D1oCvGdR/GjmD3PUpJcCIvcgE= 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/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= 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/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= 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/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= 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/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= +github.com/spf13/afero v1.2.2/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.3/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/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.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/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= +github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= 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= @@ -257,14 +501,16 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf 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/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 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/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/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= @@ -275,19 +521,24 @@ github.com/tendermint/go-amino v0.15.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoM 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/iavl v0.13.3 h1:expgBDY1MX+6/3sqrIxGChbTNf9N9aTJ67SH4bPchCs= +github.com/tendermint/iavl v0.13.3/go.mod h1:2lE7GiWdSvc7kvT78ncIKmkOjCnp6JEnSb2O7B9htLw= 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/tendermint v0.33.2/go.mod h1:25DqB7YvV1tN3tHsjWoc2vFtlwICfrub9XO6UBO+4xk= +github.com/tendermint/tendermint v0.33.4 h1:NM3G9618yC5PaaxGrcAySc5ylc1PAANeIx42u2Re/jo= +github.com/tendermint/tendermint v0.33.4/go.mod h1:6NW9DVkvsvqmCY6wbRsOo66qGDhMXglRL70aXajvBEA= 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/tendermint/tm-db v0.4.1/go.mod h1:JsJ6qzYkCGiGwm5GHl/H5GLI9XLb6qZX7PRe425dHAY= +github.com/tendermint/tm-db v0.5.1 h1:H9HDq8UEA7Eeg13kdYckkgwwkQLBnJGgX4PgLJRhieY= +github.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/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/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= 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= @@ -295,106 +546,239 @@ github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWp 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.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= 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-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-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-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-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/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200406173513-056763e48d71 h1:DOmugCavvUtnUD114C1Wh+UgTgQZ4pMLzXxi1pSt+/Y= +golang.org/x/crypto v0.0.0-20200406173513-056763e48d71/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/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-20181023162649-9b4f9f5ad519/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-20181201002055-351d144fa1fc/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-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/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-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/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-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 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-20190813141303-74dc4d7220e7/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/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 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/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/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-20181122145206-62eef0e2fa9b/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/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-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/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/sys v0.0.0-20200122134326-e047566fdf82 h1:ywK/j/KkyTHcdyYSZNXGjMwgmDSfjglYZ3vStQ/gSCU= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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.1-0.20180807135948-17ff2d5776d2/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-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-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-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200110213125-a7a6caa82ab2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= 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-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 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-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 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.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0 h1:bO/TA4OxCOummhSf10siHuG7vJOiwh7SpRpFZDkOgl4= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.28.1 h1:C1QC6KzgSiLyBabDi87BbjaGreoRgGUF5nOyvfrAZ1k= +google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 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/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= 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/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= 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= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/incubator/group/group.go b/incubator/group/group.go index 227d58a..c3a0537 100644 --- a/incubator/group/group.go +++ b/incubator/group/group.go @@ -1,16 +1,14 @@ package group import ( - "bytes" "encoding/json" "fmt" "github.com/cosmos/cosmos-sdk/client/context" "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/modules/incubator/orm" - "github.com/gogo/protobuf/jsonpb" "github.com/gorilla/mux" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" @@ -37,79 +35,73 @@ func AccountCondition(id uint64) Condition { return NewCondition("group", "account", orm.EncodeSequence(id)) } -type AppModule struct { - keeper Keeper -} - -func NewAppModule(keeper Keeper) AppModule { - return AppModule{ - keeper: keeper, - } +type AppModuleBasic struct { } -func (a AppModule) Name() string { +func (a AppModuleBasic) Name() string { return ModuleName } -func (a AppModule) RegisterCodec(cdc *codec.Codec) { +func (a AppModuleBasic) RegisterCodec(cdc *codec.Codec) { RegisterCodec(cdc) // can not be removed until sdk.StdTx support protobuf } -func (a AppModule) DefaultGenesis() json.RawMessage { - var buf bytes.Buffer - marshaler := jsonpb.Marshaler{} - err := marshaler.Marshal(&buf, NewGenesisState()) - if err != nil { - panic(errors.Wrap(err, "failed to marshal default genesis")) - } - return buf.Bytes() +func (a AppModuleBasic) DefaultGenesis(marshaler codec.JSONMarshaler) json.RawMessage { + return marshaler.MustMarshalJSON(NewGenesisState()) } -func (a AppModule) ValidateGenesis(bz json.RawMessage) error { +func (a AppModuleBasic) ValidateGenesis(cdc codec.JSONMarshaler, bz json.RawMessage) error { var data GenesisState - if err := jsonpb.Unmarshal(bytes.NewReader(bz), &data); err != nil { - return errors.Wrapf(err, "validate genesis") + if err := cdc.UnmarshalJSON(bz, &data); err != nil { + return fmt.Errorf("failed to unmarshal %s genesis state: %w", ModuleName, err) } return data.Validate() } -func (a AppModule) RegisterRESTRoutes(ctx context.CLIContext, r *mux.Router) { - //rest.RegisterRoutes(ctx, r, ModuleCdc, RouterKey) +func (a AppModuleBasic) 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") + return } -func (a AppModule) GetTxCmd(*codec.Codec) *cobra.Command { - //return cli.GetTxCmd(StoreKey, cdc) - panic("implement me") +func (a AppModuleBasic) GetTxCmd(ctx context.CLIContext) *cobra.Command { + return nil } -func (a AppModule) GetQueryCmd(*codec.Codec) *cobra.Command { +func (a AppModuleBasic) GetQueryCmd(*codec.Codec) *cobra.Command { //return cli.GetQueryCmd(StoreKey, cdc) - panic("implement me") + return nil } -func (a AppModule) InitGenesis(ctx sdk.Context, bz json.RawMessage) []abci.ValidatorUpdate { - var data GenesisState - if err := jsonpb.Unmarshal(bytes.NewReader(bz), &data); err != nil { - panic(errors.Wrapf(err, "init genesis")) +// RegisterInterfaceTypes registers module concrete types into protobuf Any. +func (AppModuleBasic) RegisterInterfaceTypes(registry cdctypes.InterfaceRegistry) { + RegisterInterfaces(registry) +} + +type AppModule struct { + AppModuleBasic + keeper Keeper +} + +func NewAppModule(keeper Keeper) AppModule { + return AppModule{ + AppModuleBasic: AppModuleBasic{}, + keeper: keeper, } +} - if err := data.Validate(); err != nil { +func (a AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { + var genesisState GenesisState + cdc.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, data.Params) + a.keeper.setParams(ctx, genesisState.Params) // TODO: revisit if this makes sense return []abci.ValidatorUpdate{} - } -func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage { - var buf bytes.Buffer - marshaller := jsonpb.Marshaler{} - if err := marshaller.Marshal(&buf, ExportGenesis(ctx, a.keeper)); err != nil { - panic(errors.Wrap(err, "export genesis")) - } - return buf.Bytes() +func (a AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONMarshaler) json.RawMessage { + return cdc.MustMarshalJSON(ExportGenesis(ctx, a.keeper)) } func (a AppModule) RegisterInvariants(sdk.InvariantRegistry) { @@ -136,5 +128,5 @@ func (a AppModule) NewQuerierHandler() sdk.Querier { func (a AppModule) BeginBlock(sdk.Context, abci.RequestBeginBlock) {} func (a AppModule) EndBlock(sdk.Context, abci.RequestEndBlock) []abci.ValidatorUpdate { - return nil + return []abci.ValidatorUpdate{} } diff --git a/incubator/group/group_handler.go b/incubator/group/group_handler.go index 2de6dba..e0541d7 100644 --- a/incubator/group/group_handler.go +++ b/incubator/group/group_handler.go @@ -111,6 +111,6 @@ func buildGroupResult(ctx sdk.Context, admin sdk.AccAddress, group GroupID, note return &sdk.Result{ Data: group.Bytes(), Log: fmt.Sprintf("Group %d %s", group, note), - Events: ctx.EventManager().Events(), + Events: ctx.EventManager().ABCIEvents(), }, nil } diff --git a/incubator/group/handler.go b/incubator/group/handler.go index b418b3d..417b106 100644 --- a/incubator/group/handler.go +++ b/incubator/group/handler.go @@ -21,8 +21,8 @@ func NewHandler(k Keeper) sdk.Handler { return handleMsgUpdateGroupComment(ctx, k, msg) case MsgUpdateGroupMembers: return handleMsgUpdateGroupMembers(ctx, k, msg) - case MsgCreateGroupAccountI: - return handleMsgCreateGroupAccountI(ctx, k, msg) + case MsgCreateGroupAccount: + return handleMsgCreateGroupAccount(ctx, k, msg) case MsgVote: return handleMsgVote(ctx, k, msg) case MsgExec: @@ -42,7 +42,7 @@ func handleMsgVote(ctx sdk.Context, k Keeper, msg MsgVote) (*sdk.Result, error) // todo: event? return &sdk.Result{ Log: fmt.Sprintf("Voted for proposal: %d", msg.Proposal), - Events: ctx.EventManager().Events(), + Events: ctx.EventManager().ABCIEvents(), }, nil } @@ -53,17 +53,17 @@ func handleMsgExec(ctx sdk.Context, k Keeper, msg MsgExec) (*sdk.Result, error) // todo: event? return &sdk.Result{ Log: fmt.Sprintf("Executed proposal: %d", msg.Proposal), - Events: ctx.EventManager().Events(), + Events: ctx.EventManager().ABCIEvents(), }, nil } -func handleMsgCreateGroupAccountI(ctx sdk.Context, k Keeper, msg MsgCreateGroupAccountI) (*sdk.Result, error) { +func handleMsgCreateGroupAccount(ctx sdk.Context, k Keeper, msg MsgCreateGroupAccount) (*sdk.Result, error) { decisionPolicy := msg.GetDecisionPolicy() - acc, err := k.CreateGroupAccount(ctx, msg.GetBase().Admin, msg.GetBase().Group, *decisionPolicy.GetThreshold(), msg.GetBase().Comment) + acc, err := k.CreateGroupAccount(ctx, msg.GetAdmin(), msg.GetGroup(), decisionPolicy, msg.GetComment()) if err != nil { return nil, errors.Wrap(err, "create group account") } - return buildGroupAccountResult(ctx, msg.GetBase().Admin, acc, "created") + return buildGroupAccountResult(ctx, msg.GetAdmin(), acc, "created") } func buildGroupAccountResult(ctx sdk.Context, admin sdk.AccAddress, acc sdk.AccAddress, note string) (*sdk.Result, error) { @@ -77,6 +77,6 @@ func buildGroupAccountResult(ctx sdk.Context, admin sdk.AccAddress, acc sdk.AccA return &sdk.Result{ Data: acc.Bytes(), Log: fmt.Sprintf("Group account %s %s", acc.String(), note), - Events: ctx.EventManager().Events(), + Events: ctx.EventManager().ABCIEvents(), }, nil } diff --git a/incubator/group/integration_test.go b/incubator/group/integration_test.go index c5ecd84..b241f7f 100644 --- a/incubator/group/integration_test.go +++ b/incubator/group/integration_test.go @@ -23,8 +23,8 @@ import ( func createTestApp(isCheckTx bool) (*testdata.SimApp, sdk.Context) { db := dbm.NewMemDB() - app := testdata.NewSimApp(log.NewTMJSONLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, 0) - genesisState := testdata.ModuleBasics.DefaultGenesis() + app := testdata.NewSimApp(log.NewTMJSONLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, "", 0) + genesisState := testdata.ModuleBasics.DefaultGenesis(app.AppCodec()) stateBytes, err := codec.MarshalJSONIndent(app.Codec(), genesisState) if err != nil { panic(err) @@ -100,8 +100,7 @@ func TestCreateGroupScenario(t *testing.T) { accSeq, err := app.AccountKeeper.GetSequence(ctx, myAddr) require.NoError(t, err) tx := types.NewTestTx(ctx, []sdk.Msg{spec.src}, privs, []uint64{accNums}, []uint64{accSeq}, fee) - - resp := app.DeliverTx(abci.RequestDeliverTx{Tx: app.Codec().MustMarshalBinaryLengthPrefixed(tx)}) + resp := app.DeliverTx(abci.RequestDeliverTx{Tx: app.MustEncodeTx(tx)}) // then require.Equal(t, spec.expCode, resp.Code, resp.Log) if spec.expCode != 0 { @@ -130,66 +129,42 @@ func TestCreateGroupAccountScenario(t *testing.T) { fee := types.NewTestStdFee() specs := map[string]struct { - src group.MsgCreateGroupAccountStd - expCode uint32 + admin sdk.AccAddress + group group.GroupID + comment string + threshold sdk.Dec + timeout proto.Duration + expCode uint32 }{ "happy path": { - src: group.MsgCreateGroupAccountStd{ - Base: group.MsgCreateGroupAccountBase{ - Admin: myAddr, - Group: myGroupID, - Comment: "integration test", - }, - DecisionPolicy: group.StdDecisionPolicy{ - Sum: &group.StdDecisionPolicy_Threshold{Threshold: &group.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: 1}, - }}}, - }, + admin: myAddr, + group: myGroupID, + comment: "integration test", + threshold: sdk.OneDec(), + timeout: proto.Duration{Seconds: 1}, }, "second account with same group": { - src: group.MsgCreateGroupAccountStd{ - Base: group.MsgCreateGroupAccountBase{ - Admin: myAddr, - Group: myGroupID, - Comment: "integration test", - }, - DecisionPolicy: group.StdDecisionPolicy{ - Sum: &group.StdDecisionPolicy_Threshold{Threshold: &group.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: 1}, - }}}, - }, + admin: myAddr, + group: myGroupID, + comment: "integration test", + threshold: sdk.OneDec(), + timeout: proto.Duration{Seconds: 1}, }, "unknown group in message": { - src: group.MsgCreateGroupAccountStd{ - Base: group.MsgCreateGroupAccountBase{ - Admin: myAddr, - Group: 99999, - Comment: "group id does not exists", - }, - DecisionPolicy: group.StdDecisionPolicy{ - Sum: &group.StdDecisionPolicy_Threshold{Threshold: &group.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: 1}, - }}}, - }, - expCode: orm.ErrNotFound.ABCICode(), + admin: myAddr, + group: 99999, + comment: "group id does not exists", + threshold: sdk.OneDec(), + timeout: proto.Duration{Seconds: 1}, + expCode: orm.ErrNotFound.ABCICode(), }, "invalid signer": { - src: group.MsgCreateGroupAccountStd{ - Base: group.MsgCreateGroupAccountBase{ - Admin: otherAddr, - Group: myGroupID, - Comment: "integration test", - }, - DecisionPolicy: group.StdDecisionPolicy{ - Sum: &group.StdDecisionPolicy_Threshold{Threshold: &group.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: 1}, - }}}, - }, - expCode: errors.ErrInvalidPubKey.ABCICode(), + admin: otherAddr, + group: myGroupID, + comment: "integration test", + threshold: sdk.OneDec(), + timeout: proto.Duration{Seconds: 1}, + expCode: errors.ErrInvalidPubKey.ABCICode(), }, } @@ -197,12 +172,23 @@ func TestCreateGroupAccountScenario(t *testing.T) { privs, accNums := []crypto.PrivKey{myKey}, myAccount.GetAccountNumber() for msg, spec := range specs { t.Run(msg, func(t *testing.T) { - msgs := []sdk.Msg{spec.src} + m, err := group.NewMsgCreateGroupAccount( + spec.admin, + spec.group, + spec.comment, + group.NewThresholdDecisionPolicy( + spec.threshold, + spec.timeout, + ), + ) + + require.NoError(t, err) + + msgs := []sdk.Msg{m} accSeq, err := app.AccountKeeper.GetSequence(ctx, myAddr) require.NoError(t, err) tx := types.NewTestTx(ctx, msgs, privs, []uint64{accNums}, []uint64{accSeq}, fee) - - resp := app.DeliverTx(abci.RequestDeliverTx{Tx: app.Codec().MustMarshalBinaryLengthPrefixed(tx)}) + resp := app.DeliverTx(abci.RequestDeliverTx{Tx: app.MustEncodeTx(tx)}) // then require.Equal(t, spec.expCode, resp.Code, resp.Log) if spec.expCode != 0 { @@ -226,6 +212,28 @@ func TestFullProposalWorkflow(t *testing.T) { balances := sdk.NewCoins(sdk.NewInt64Coin("atom", 100000)) require.NoError(t, app.BankKeeper.SetBalances(ctx, myAddr, balances)) + msgFirstAccount, err := group.NewMsgCreateGroupAccount( + myAddr, + 1, + "first account", + group.NewThresholdDecisionPolicy( + sdk.OneDec(), + *proto.DurationProto(time.Second), + ), + ) + require.NoError(t, err) + + msgSecondAccount, err := group.NewMsgCreateGroupAccount( + myAddr, + 1, + "second account", + group.NewThresholdDecisionPolicy( + sdk.OneDec(), + *proto.DurationProto(time.Second), + ), + ) + require.NoError(t, err) + // setup group msgs := []sdk.Msg{ group.MsgCreateGroup{ @@ -238,37 +246,9 @@ func TestFullProposalWorkflow(t *testing.T) { Comment: "integration test", }, // setup group account - group.MsgCreateGroupAccountStd{ - Base: group.MsgCreateGroupAccountBase{ - Admin: myAddr, - Group: 1, - Comment: "first account", - }, - DecisionPolicy: group.StdDecisionPolicy{ - Sum: &group.StdDecisionPolicy_Threshold{ - Threshold: &group.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Timout: *proto.DurationProto(time.Second), - }, - }, - }, - }, + msgFirstAccount, // and another one - group.MsgCreateGroupAccountStd{ - Base: group.MsgCreateGroupAccountBase{ - Admin: myAddr, - Group: 1, - Comment: "second account", - }, - DecisionPolicy: group.StdDecisionPolicy{ - Sum: &group.StdDecisionPolicy_Threshold{ - Threshold: &group.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Timout: *proto.DurationProto(time.Second), - }, - }, - }, - }, + msgSecondAccount, // submit proposals testdata.MsgPropose{ Base: group.MsgProposeBase{ @@ -304,7 +284,7 @@ func TestFullProposalWorkflow(t *testing.T) { privs, accNums, seqs := []crypto.PrivKey{myKey}, myAccount.GetAccountNumber(), myAccount.GetSequence() tx := types.NewTestTx(ctx, msgs, privs, []uint64{accNums}, []uint64{seqs}, fee) - resp := app.DeliverTx(abci.RequestDeliverTx{Tx: app.Codec().MustMarshalBinaryLengthPrefixed(tx)}) + resp := app.DeliverTx(abci.RequestDeliverTx{Tx: app.MustEncodeTx(tx)}) require.Equal(t, uint32(0), resp.Code, resp.Log) // execute can not be in the same block so start new one @@ -321,7 +301,7 @@ func TestFullProposalWorkflow(t *testing.T) { privs, accNums, seqs = []crypto.PrivKey{myKey}, myAccount.GetAccountNumber(), myAccount.GetSequence() tx = types.NewTestTx(ctx, msgs, privs, []uint64{accNums}, []uint64{seqs}, fee) - resp = app.DeliverTx(abci.RequestDeliverTx{Tx: app.Codec().MustMarshalBinaryLengthPrefixed(tx)}) + resp = app.DeliverTx(abci.RequestDeliverTx{Tx: app.MustEncodeTx(tx)}) require.Equal(t, uint32(0), resp.Code, resp.Log) // then verify proposal got accepted @@ -343,7 +323,7 @@ func TestFullProposalWorkflow(t *testing.T) { privs, accNums, seqs = []crypto.PrivKey{myKey}, myAccount.GetAccountNumber(), myAccount.GetSequence() tx = types.NewTestTx(ctx, msgs, privs, []uint64{accNums}, []uint64{seqs}, fee) - resp = app.DeliverTx(abci.RequestDeliverTx{Tx: app.Codec().MustMarshalBinaryLengthPrefixed(tx)}) + resp = app.DeliverTx(abci.RequestDeliverTx{Tx: app.MustEncodeTx(tx)}) require.Equal(t, uint32(0), resp.Code, resp.Log) // verify second proposal diff --git a/incubator/group/keeper.go b/incubator/group/keeper.go index 946113a..f6a0837 100644 --- a/incubator/group/keeper.go +++ b/incubator/group/keeper.go @@ -132,13 +132,13 @@ func NewGroupKeeper(storeKey sdk.StoreKey, paramSpace params.Subspace, router sd // Group Account Table // k.groupAccountSeq = orm.NewSequence(storeKey, GroupAccountTableSeqPrefix) - groupAccountTableBuilder := orm.NewNaturalKeyTableBuilder(GroupAccountTablePrefix, storeKey, &StdGroupAccountMetadata{}, orm.Max255DynamicLengthIndexKeyCodec{}) + groupAccountTableBuilder := orm.NewNaturalKeyTableBuilder(GroupAccountTablePrefix, storeKey, &GroupAccountMetadata{}, orm.Max255DynamicLengthIndexKeyCodec{}) k.groupAccountByGroupIndex = orm.NewUInt64Index(groupAccountTableBuilder, GroupAccountByGroupIndexPrefix, func(value interface{}) ([]uint64, error) { - group := value.(*StdGroupAccountMetadata).Base.Group + group := value.(*GroupAccountMetadata).Group return []uint64{uint64(group)}, nil }) k.groupAccountByAdminIndex = orm.NewIndex(groupAccountTableBuilder, GroupAccountByAdminIndexPrefix, func(value interface{}) ([]orm.RowID, error) { - admin := value.(*StdGroupAccountMetadata).Base.Admin + admin := value.(*GroupAccountMetadata).Admin return []orm.RowID{admin.Bytes()}, nil }) k.groupAccountTable = groupAccountTableBuilder.Build() @@ -252,9 +252,8 @@ func (k Keeper) setParams(ctx sdk.Context, params Params) { k.paramSpace.SetParamSet(ctx, ¶ms) } -// CreateGroupAccount creates and persists a `StdGroupAccountMetadata` -//func (k Keeper) CreateGroupAccount(ctx sdk.Context, admin sdk.AccAddress, groupID GroupID, policy DecisionPolicy, comment string) (sdk.AccAddress, error) { -func (k Keeper) CreateGroupAccount(ctx sdk.Context, admin sdk.AccAddress, groupID GroupID, policy ThresholdDecisionPolicy, comment string) (sdk.AccAddress, error) { +// CreateGroupAccount creates and persists a `GroupAccountMetadata` +func (k Keeper) CreateGroupAccount(ctx sdk.Context, admin sdk.AccAddress, groupID GroupID, policy DecisionPolicy, comment string) (sdk.AccAddress, error) { maxCommentSize := k.MaxCommentSize(ctx) if len(comment) > maxCommentSize { return nil, errors.Wrap(ErrMaxLimit, @@ -269,16 +268,18 @@ func (k Keeper) CreateGroupAccount(ctx sdk.Context, admin sdk.AccAddress, groupI return nil, errors.Wrap(errors.ErrUnauthorized, "not group admin") } accountAddr := AccountCondition(k.groupAccountSeq.NextVal(ctx)).Address() - groupAccount := StdGroupAccountMetadata{ - Base: GroupAccountMetadataBase{ - GroupAccount: accountAddr, - Group: groupID, - Admin: admin, - Comment: comment, - Version: 1, - }, - DecisionPolicy: StdDecisionPolicy{Sum: &StdDecisionPolicy_Threshold{&policy}}, + groupAccount, err := NewGroupAccountMetadata( + accountAddr, + groupID, + admin, + comment, + 1, + policy, + ) + if err != nil { + return nil, err } + if err := k.groupAccountTable.Create(ctx, &groupAccount); err != nil { return nil, errors.Wrap(err, "could not create group account") } @@ -289,13 +290,13 @@ func (k Keeper) HasGroupAccount(ctx sdk.Context, address sdk.AccAddress) bool { return k.groupAccountTable.Has(ctx, address.Bytes()) } -func (k Keeper) GetGroupAccount(ctx sdk.Context, accountAddress sdk.AccAddress) (StdGroupAccountMetadata, error) { - var obj StdGroupAccountMetadata +func (k Keeper) GetGroupAccount(ctx sdk.Context, accountAddress sdk.AccAddress) (GroupAccountMetadata, error) { + var obj GroupAccountMetadata return obj, k.groupAccountTable.GetOne(ctx, accountAddress.Bytes(), &obj) } -func (k Keeper) UpdateGroupAccount(ctx sdk.Context, obj *StdGroupAccountMetadata) error { - obj.Base.Version++ +func (k Keeper) UpdateGroupAccount(ctx sdk.Context, obj *GroupAccountMetadata) error { + obj.Version++ return k.groupAccountTable.Save(ctx, obj) } @@ -304,7 +305,7 @@ func (k Keeper) GetGroupByGroupAccount(ctx sdk.Context, accountAddress sdk.AccAd if err != nil { return GroupMetadata{}, errors.Wrap(err, "load group account") } - return k.GetGroup(ctx, obj.Base.Group) + return k.GetGroup(ctx, obj.Group) } func (k Keeper) GetGroupMembersByGroup(ctx sdk.Context, id GroupID) (orm.Iterator, error) { @@ -339,15 +340,15 @@ func (k Keeper) Vote(ctx sdk.Context, id ProposalID, voters []sdk.AccAddress, ch if votingPeriodEnd.Before(ctx.BlockTime()) || votingPeriodEnd.Equal(ctx.BlockTime()) { return errors.Wrap(ErrExpired, "voting period has ended already") } - var accountMetadata StdGroupAccountMetadata + var accountMetadata GroupAccountMetadata if err := k.groupAccountTable.GetOne(ctx, base.GroupAccount.Bytes(), &accountMetadata); err != nil { return errors.Wrap(err, "load group account") } - if base.GroupAccountVersion != accountMetadata.Base.Version { + if base.GroupAccountVersion != accountMetadata.Version { return errors.Wrap(ErrModified, "group account was modified") } - electorate, err := k.GetGroup(ctx, accountMetadata.Base.Group) + electorate, err := k.GetGroup(ctx, accountMetadata.Group) if err != nil { return err } @@ -386,8 +387,8 @@ func (k Keeper) Vote(ctx sdk.Context, id ProposalID, voters []sdk.AccAddress, ch return k.proposalTable.Save(ctx, id.Uint64(), proposal) } -func doTally(ctx sdk.Context, base *ProposalBase, electorate GroupMetadata, accountMetadata StdGroupAccountMetadata) error { - policy := accountMetadata.DecisionPolicy.GetThreshold() +func doTally(ctx sdk.Context, base *ProposalBase, electorate GroupMetadata, accountMetadata GroupAccountMetadata) error { + policy := accountMetadata.GetDecisionPolicy() submittedAt, err := types.TimestampFromProto(&base.SubmittedAt) if err != nil { return err @@ -420,7 +421,7 @@ func (k Keeper) ExecProposal(ctx sdk.Context, id ProposalID) error { return errors.Wrapf(ErrInvalid, "not possible with proposal status %s", base.Status.String()) } - var accountMetadata StdGroupAccountMetadata + var accountMetadata GroupAccountMetadata if err := k.groupAccountTable.GetOne(ctx, base.GroupAccount.Bytes(), &accountMetadata); err != nil { return errors.Wrap(err, "load group account") } @@ -431,13 +432,13 @@ func (k Keeper) ExecProposal(ctx sdk.Context, id ProposalID) error { } if base.Status == ProposalStatusSubmitted { - if base.GroupAccountVersion != accountMetadata.Base.Version { + if base.GroupAccountVersion != accountMetadata.Version { base.Result = ProposalResultUndefined base.Status = ProposalStatusAborted return storeUpdates() } - electorate, err := k.GetGroup(ctx, accountMetadata.Base.Group) + electorate, err := k.GetGroup(ctx, accountMetadata.Group) if err != nil { return errors.Wrap(err, "load group") } @@ -456,7 +457,7 @@ func (k Keeper) ExecProposal(ctx sdk.Context, id ProposalID) error { if base.Status == ProposalStatusClosed && base.Result == ProposalResultAccepted && base.ExecutorResult != ProposalExecutorResultSuccess { logger := ctx.Logger().With("module", fmt.Sprintf("x/%s", ModuleName)) ctx, flush := ctx.CacheContext() - _, err := doExecuteMsgs(ctx, k.router, accountMetadata.Base.GroupAccount, proposal.GetMsgs()) + _, err := doExecuteMsgs(ctx, k.router, accountMetadata.GroupAccount, proposal.GetMsgs()) if err != nil { base.ExecutorResult = ProposalExecutorResultFailure proposalType := reflect.TypeOf(proposal).String() @@ -484,11 +485,12 @@ func (k Keeper) CreateProposal(ctx sdk.Context, accountAddress sdk.AccAddress, c } account, err := k.GetGroupAccount(ctx, accountAddress.Bytes()) + if err != nil { return 0, errors.Wrap(err, "load group account") } - g, err := k.GetGroup(ctx, account.Base.Group) + g, err := k.GetGroup(ctx, account.Group) if err != nil { return 0, errors.Wrap(err, "get group by account") } @@ -500,7 +502,7 @@ func (k Keeper) CreateProposal(ctx sdk.Context, accountAddress sdk.AccAddress, c } } - if err := ensureMsgAuthZ(msgs, account.Base.GroupAccount); err != nil { + if err := ensureMsgAuthZ(msgs, account.GroupAccount); err != nil { return 0, err } @@ -508,8 +510,21 @@ func (k Keeper) CreateProposal(ctx sdk.Context, accountAddress sdk.AccAddress, c if err != nil { return 0, errors.Wrap(err, "block time conversion") } + policy := account.GetDecisionPolicy() - window, err := types.DurationFromProto(&policy.GetThreshold().Timout) + + if policy == nil { + return 0, errors.Wrap(ErrEmpty, "nil policy") + } + + // prevent proposal that can not succeed + err = policy.Validate(g) + if err != nil { + return 0, err + } + + timeout := policy.GetTimeout() + window, err := types.DurationFromProto(&timeout) if err != nil { return 0, errors.Wrap(err, "maxVotingWindow time conversion") } @@ -518,11 +533,6 @@ func (k Keeper) CreateProposal(ctx sdk.Context, accountAddress sdk.AccAddress, c return 0, errors.Wrap(err, "end time conversion") } - // prevent proposal that can not succeed - if policy.GetThreshold() != nil && policy.GetThreshold().Threshold.GT(g.TotalWeight) { - return 0, errors.Wrap(ErrInvalid, "policy threshold should not be greater than the total group weight") - } - m := reflect.New(k.proposalModelType).Interface().(ProposalI) m.SetBase(ProposalBase{ GroupAccount: accountAddress, @@ -530,7 +540,7 @@ func (k Keeper) CreateProposal(ctx sdk.Context, accountAddress sdk.AccAddress, c Proposers: proposers, SubmittedAt: *blockTime, GroupVersion: g.Version, - GroupAccountVersion: account.Base.Version, + GroupAccountVersion: account.Version, Result: ProposalResultUndefined, Status: ProposalStatusSubmitted, ExecutorResult: ProposalExecutorResultNotRun, diff --git a/incubator/group/keeper_test.go b/incubator/group/keeper_test.go index 915017e..b4d51b5 100644 --- a/incubator/group/keeper_test.go +++ b/incubator/group/keeper_test.go @@ -7,10 +7,9 @@ import ( "time" "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/params" - "github.com/cosmos/cosmos-sdk/x/params/subspace" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/cosmos/modules/incubator/group" "github.com/cosmos/modules/incubator/group/testdata" "github.com/cosmos/modules/incubator/orm" @@ -20,9 +19,8 @@ import ( ) func TestCreateGroup(t *testing.T) { - amino := codec.New() pKey, pTKey := sdk.NewKVStoreKey(params.StoreKey), sdk.NewTransientStoreKey(params.TStoreKey) - paramSpace := subspace.NewSubspace(amino, pKey, pTKey, group.DefaultParamspace) + paramSpace := paramtypes.NewSubspace(group.NewCodec(), pKey, pTKey, group.DefaultParamspace) groupKey := sdk.NewKVStoreKey(group.StoreKeyName) k := group.NewGroupKeeper(groupKey, paramSpace, baseapp.NewRouter(), &group.MockProposalI{}) @@ -107,9 +105,8 @@ func TestCreateGroup(t *testing.T) { } func TestCreateGroupAccount(t *testing.T) { - amino := codec.New() pKey, pTKey := sdk.NewKVStoreKey(params.StoreKey), sdk.NewTransientStoreKey(params.TStoreKey) - paramSpace := subspace.NewSubspace(amino, pKey, pTKey, group.DefaultParamspace) + paramSpace := paramtypes.NewSubspace(group.NewCodec(), pKey, pTKey, group.DefaultParamspace) groupKey := sdk.NewKVStoreKey(group.StoreKeyName) k := group.NewGroupKeeper(groupKey, paramSpace, baseapp.NewRouter(), &group.MockProposalI{}) @@ -123,7 +120,7 @@ func TestCreateGroupAccount(t *testing.T) { specs := map[string]struct { srcAdmin sdk.AccAddress srcGroupID group.GroupID - srcPolicy group.ThresholdDecisionPolicy + srcPolicy group.DecisionPolicy srcComment string expErr bool }{ @@ -131,48 +128,48 @@ func TestCreateGroupAccount(t *testing.T) { srcAdmin: []byte("valid--admin-address"), srcComment: "test", srcGroupID: myGroupID, - srcPolicy: group.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Timout: types.Duration{Seconds: 1}, - }, + srcPolicy: group.NewThresholdDecisionPolicy( + sdk.OneDec(), + types.Duration{Seconds: 1}, + ), }, "decision policy threshold > total group weight": { srcAdmin: []byte("valid--admin-address"), srcComment: "test", srcGroupID: myGroupID, - srcPolicy: group.ThresholdDecisionPolicy{ - Threshold: sdk.NewDec(math.MaxInt64), - Timout: types.Duration{Seconds: 1}, - }, + srcPolicy: group.NewThresholdDecisionPolicy( + sdk.NewDec(math.MaxInt64), + types.Duration{Seconds: 1}, + ), }, "group id does not exists": { srcAdmin: []byte("valid--admin-address"), srcComment: "test", srcGroupID: 9999, - srcPolicy: group.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Timout: types.Duration{Seconds: 1}, - }, + srcPolicy: group.NewThresholdDecisionPolicy( + sdk.OneDec(), + types.Duration{Seconds: 1}, + ), expErr: true, }, "admin not group admin": { srcAdmin: []byte("other--admin-address"), srcComment: "test", srcGroupID: myGroupID, - srcPolicy: group.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Timout: types.Duration{Seconds: 1}, - }, + srcPolicy: group.NewThresholdDecisionPolicy( + sdk.OneDec(), + types.Duration{Seconds: 1}, + ), expErr: true, }, "comment too long": { srcAdmin: []byte("valid--admin-address"), srcComment: strings.Repeat("a", 256), srcGroupID: myGroupID, - srcPolicy: group.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Timout: types.Duration{Seconds: 1}, - }, + srcPolicy: group.NewThresholdDecisionPolicy( + sdk.OneDec(), + types.Duration{Seconds: 1}, + ), expErr: true, }, } @@ -188,20 +185,19 @@ func TestCreateGroupAccount(t *testing.T) { // then all data persisted groupAccount, err := k.GetGroupAccount(ctx, addr) require.NoError(t, err) - assert.Equal(t, addr, groupAccount.Base.GroupAccount) - assert.Equal(t, myGroupID, groupAccount.Base.Group) - assert.Equal(t, sdk.AccAddress([]byte(spec.srcAdmin)), groupAccount.Base.Admin) - assert.Equal(t, spec.srcComment, groupAccount.Base.Comment) - assert.Equal(t, uint64(1), groupAccount.Base.Version) - assert.Equal(t, &spec.srcPolicy, groupAccount.DecisionPolicy.GetDecisionPolicy()) + assert.Equal(t, addr, groupAccount.GroupAccount) + assert.Equal(t, myGroupID, groupAccount.Group) + assert.Equal(t, sdk.AccAddress([]byte(spec.srcAdmin)), groupAccount.Admin) + assert.Equal(t, spec.srcComment, groupAccount.Comment) + assert.Equal(t, uint64(1), groupAccount.Version) + assert.Equal(t, &spec.srcPolicy, groupAccount.GetDecisionPolicy()) }) } } func TestCreateProposal(t *testing.T) { - amino := codec.New() pKey, pTKey := sdk.NewKVStoreKey(params.StoreKey), sdk.NewTransientStoreKey(params.TStoreKey) - paramSpace := subspace.NewSubspace(amino, pKey, pTKey, group.DefaultParamspace) + paramSpace := paramtypes.NewSubspace(group.NewCodec(), pKey, pTKey, group.DefaultParamspace) groupKey := sdk.NewKVStoreKey(group.StoreKeyName) k := group.NewGroupKeeper(groupKey, paramSpace, baseapp.NewRouter(), &testdata.MyAppProposal{}) @@ -217,17 +213,17 @@ func TestCreateProposal(t *testing.T) { myGroupID, err := k.CreateGroup(ctx, []byte("valid--admin-address"), members, "test") require.NoError(t, err) - policy := group.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Timout: types.Duration{Seconds: 1}, - } + policy := group.NewThresholdDecisionPolicy( + sdk.OneDec(), + types.Duration{Seconds: 1}, + ) accountAddr, err := k.CreateGroupAccount(ctx, []byte("valid--admin-address"), myGroupID, policy, "test") require.NoError(t, err) - policy = group.ThresholdDecisionPolicy{ - Threshold: sdk.NewDec(math.MaxInt64), - Timout: types.Duration{Seconds: 1}, - } + policy = group.NewThresholdDecisionPolicy( + sdk.NewDec(math.MaxInt64), + types.Duration{Seconds: 1}, + ) bigThresholdAddr, err := k.CreateGroupAccount(ctx, []byte("valid--admin-address"), myGroupID, policy, "test") require.NoError(t, err) @@ -337,9 +333,9 @@ func TestCreateProposal(t *testing.T) { VetoCount: sdk.ZeroDec(), }, base.VoteState) - timout, err := types.TimestampFromProto(&base.Timeout) + timeout, err := types.TimestampFromProto(&base.Timeout) require.NoError(t, err) - assert.Equal(t, blockTime.Add(time.Second).UTC(), timout) + assert.Equal(t, blockTime.Add(time.Second).UTC(), timeout) if spec.srcMsgs == nil { // then empty list is ok assert.Len(t, proposal.GetMsgs(), 0) @@ -351,9 +347,8 @@ func TestCreateProposal(t *testing.T) { } func TestVote(t *testing.T) { - amino := codec.New() pKey, pTKey := sdk.NewKVStoreKey(params.StoreKey), sdk.NewTransientStoreKey(params.TStoreKey) - paramSpace := subspace.NewSubspace(amino, pKey, pTKey, group.DefaultParamspace) + paramSpace := paramtypes.NewSubspace(group.NewCodec(), pKey, pTKey, group.DefaultParamspace) groupKey := sdk.NewKVStoreKey(group.StoreKeyName) k := group.NewGroupKeeper(groupKey, paramSpace, baseapp.NewRouter(), &testdata.MyAppProposal{}) @@ -369,10 +364,10 @@ func TestVote(t *testing.T) { myGroupID, err := k.CreateGroup(parentCtx, []byte("valid--admin-address"), members, "test") require.NoError(t, err) - policy := group.ThresholdDecisionPolicy{ - Threshold: sdk.NewDec(2), - Timout: types.Duration{Seconds: 1}, - } + policy := group.NewThresholdDecisionPolicy( + sdk.NewDec(2), + types.Duration{Seconds: 1}, + ) accountAddr, err := k.CreateGroupAccount(parentCtx, []byte("valid--admin-address"), myGroupID, policy, "test") require.NoError(t, err) myProposalID, err := k.CreateProposal(parentCtx, accountAddr, "integration test", []sdk.AccAddress{[]byte("valid-member-address")}, nil) @@ -563,7 +558,7 @@ func TestVote(t *testing.T) { doBefore: func(t *testing.T, ctx sdk.Context) { a, err := k.GetGroupAccount(ctx, accountAddr) require.NoError(t, err) - a.Base.Comment = "modified" + a.Comment = "modified" require.NoError(t, k.UpdateGroupAccount(ctx, &a)) }, expErr: true, @@ -612,9 +607,8 @@ func TestVote(t *testing.T) { } func TestExecProposal(t *testing.T) { - amino := codec.New() pKey, pTKey := sdk.NewKVStoreKey(params.StoreKey), sdk.NewTransientStoreKey(params.TStoreKey) - paramSpace := subspace.NewSubspace(amino, pKey, pTKey, group.DefaultParamspace) + paramSpace := paramtypes.NewSubspace(group.NewCodec(), pKey, pTKey, group.DefaultParamspace) router := baseapp.NewRouter() groupKey := sdk.NewKVStoreKey(group.StoreKeyName) @@ -634,10 +628,10 @@ func TestExecProposal(t *testing.T) { myGroupID, err := k.CreateGroup(parentCtx, []byte("valid--admin-address"), members, "test") require.NoError(t, err) - policy := group.ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Timout: types.Duration{Seconds: 1}, - } + policy := group.NewThresholdDecisionPolicy( + sdk.OneDec(), + types.Duration{Seconds: 1}, + ) accountAddr, err := k.CreateGroupAccount(parentCtx, []byte("valid--admin-address"), myGroupID, policy, "test") require.NoError(t, err) @@ -771,7 +765,7 @@ func TestExecProposal(t *testing.T) { // then modify group account a, err := k.GetGroupAccount(ctx, accountAddr) require.NoError(t, err) - a.Base.Comment = "modified" + a.Comment = "modified" require.NoError(t, k.UpdateGroupAccount(ctx, &a)) return myProposalID }, @@ -808,7 +802,7 @@ func TestExecProposal(t *testing.T) { // then modify group account a, err := k.GetGroupAccount(ctx, accountAddr) require.NoError(t, err) - a.Base.Comment = "modified" + a.Comment = "modified" require.NoError(t, k.UpdateGroupAccount(ctx, &a)) return myProposalID }, @@ -901,9 +895,8 @@ func TestExecProposal(t *testing.T) { } func TestLoadParam(t *testing.T) { - amino := codec.New() pKey, pTKey := sdk.NewKVStoreKey(params.StoreKey), sdk.NewTransientStoreKey(params.TStoreKey) - paramSpace := subspace.NewSubspace(amino, pKey, pTKey, group.DefaultParamspace) + paramSpace := paramtypes.NewSubspace(group.NewCodec(), pKey, pTKey, group.DefaultParamspace) groupKey := sdk.NewKVStoreKey(group.StoreKeyName) k := group.NewGroupKeeper(groupKey, paramSpace, baseapp.NewRouter(), &group.MockProposalI{}) diff --git a/incubator/group/msg.go b/incubator/group/msg.go index d44d65e..a7f3f91 100644 --- a/incubator/group/msg.go +++ b/incubator/group/msg.go @@ -2,28 +2,26 @@ package group import ( "bytes" + "fmt" + "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/gogo/protobuf/jsonpb" + proto "github.com/gogo/protobuf/proto" "github.com/pkg/errors" ) const ( - msgTypeCreateGroup = "create_group" - msgTypeUpdateGroupAdmin = "update_group_admin" - msgTypeUpdateGroupComment = "update_group_comment" - msgTypeUpdateGroupMembers = "update_group_members" - msgTypeCreateGroupAccountStd = "create_group_account" - msgTypeVote = "vote" - msgTypeExecProposal = "exec_proposal" + msgTypeCreateGroup = "create_group" + msgTypeUpdateGroupAdmin = "update_group_admin" + msgTypeUpdateGroupComment = "update_group_comment" + msgTypeUpdateGroupMembers = "update_group_members" + msgTypeCreateGroupAccount = "create_group_account" + msgTypeVote = "vote" + msgTypeExecProposal = "exec_proposal" ) -type MsgCreateGroupAccountI interface { - GetBase() MsgCreateGroupAccountBase - GetDecisionPolicy() StdDecisionPolicy -} - var _ sdk.Msg = &MsgCreateGroup{} func (m MsgCreateGroup) Route() string { return ModuleName } @@ -201,20 +199,6 @@ func (m MsgUpdateGroupMembers) ValidateBasic() error { return nil } -func (m *MsgCreateGroupAccountBase) ValidateBasic() error { - if m.Admin.Empty() { - return sdkerrors.Wrap(ErrEmpty, "admin") - } - if err := sdk.VerifyAddressFormat(m.Admin); err != nil { - return sdkerrors.Wrap(err, "admin") - } - - if m.Group == 0 { - return sdkerrors.Wrap(ErrEmpty, "group") - } - return nil -} - func (m *MsgProposeBase) ValidateBasic() error { if m.GroupAccount.Empty() { return sdkerrors.Wrap(ErrEmpty, "group account") @@ -231,48 +215,98 @@ func (m *MsgProposeBase) ValidateBasic() error { return nil } -var _ sdk.Msg = &MsgCreateGroupAccountStd{} +var _ sdk.Msg = &MsgCreateGroupAccount{} -func (m MsgCreateGroupAccountStd) Route() string { return ModuleName } -func (m MsgCreateGroupAccountStd) Type() string { return msgTypeCreateGroupAccountStd } +func (m MsgCreateGroupAccount) Route() string { return ModuleName } +func (m MsgCreateGroupAccount) Type() string { return msgTypeCreateGroupAccount } // GetSigners returns the addresses that must sign over msg.GetSignBytes() -func (m MsgCreateGroupAccountStd) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{m.Base.Admin} +func (m MsgCreateGroupAccount) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{m.Admin} } // GetSignBytes returns the bytes for the message signer to sign on -func (m MsgCreateGroupAccountStd) GetSignBytes() []byte { - var buf bytes.Buffer - enc := jsonpb.Marshaler{} - if err := enc.Marshal(&buf, &m); err != nil { - panic(errors.Wrap(err, "get sign bytes")) - } - return sdk.MustSortJSON(buf.Bytes()) +func (m MsgCreateGroupAccount) GetSignBytes() []byte { + bz := moduleCdc.MustMarshalJSON(m) + return sdk.MustSortJSON(bz) } // ValidateBasic does a sanity check on the provided data -func (m MsgCreateGroupAccountStd) ValidateBasic() error { - if err := m.Base.ValidateBasic(); err != nil { - return errors.Wrap(err, "base") +func (m MsgCreateGroupAccount) ValidateBasic() error { + if m.Admin.Empty() { + return sdkerrors.Wrap(ErrEmpty, "admin") } - if m.DecisionPolicy.GetDecisionPolicy() == nil { + if err := sdk.VerifyAddressFormat(m.Admin); err != nil { + return sdkerrors.Wrap(err, "admin") + } + if m.Group == 0 { + return sdkerrors.Wrap(ErrEmpty, "group") + } + + policy := m.GetDecisionPolicy() + if policy == nil { return errors.Wrap(ErrEmpty, "decision policy") } - if err := m.DecisionPolicy.GetDecisionPolicy().ValidateBasic(); err != nil { + + if err := policy.ValidateBasic(); err != nil { return errors.Wrap(err, "decision policy") } return nil } -var _ MsgCreateGroupAccountI = MsgCreateGroupAccountStd{} +var _ types.UnpackInterfacesMessage = MsgCreateGroupAccount{} + +// NewMsgCreateGroupAccount creates a new MsgCreateGroupAccount. +func NewMsgCreateGroupAccount(admin sdk.AccAddress, group GroupID, comment string, decisionPolicy DecisionPolicy) (*MsgCreateGroupAccount, error) { + m := &MsgCreateGroupAccount{ + Admin: admin, + Group: group, + Comment: comment, + } + err := m.SetDecisionPolicy(decisionPolicy) + if err != nil { + return nil, err + } + return m, nil +} + +func (m *MsgCreateGroupAccount) GetAdmin() sdk.AccAddress { + return m.Admin +} + +func (m *MsgCreateGroupAccount) GetGroup() GroupID { + return m.Group +} + +func (m *MsgCreateGroupAccount) GetComment() string { + return m.Comment +} + +func (m *MsgCreateGroupAccount) GetDecisionPolicy() DecisionPolicy { + decisionPolicy, ok := m.DecisionPolicy.GetCachedValue().(DecisionPolicy) + if !ok { + return nil + } + return decisionPolicy +} -func (m MsgCreateGroupAccountStd) GetBase() MsgCreateGroupAccountBase { - return m.Base +func (m *MsgCreateGroupAccount) SetDecisionPolicy(decisionPolicy DecisionPolicy) error { + msg, ok := decisionPolicy.(proto.Message) + if !ok { + return fmt.Errorf("can't proto marshal %T", msg) + } + any, err := types.NewAnyWithValue(msg) + if err != nil { + return err + } + m.DecisionPolicy = any + return nil } -func (m MsgCreateGroupAccountStd) GetDecisionPolicy() StdDecisionPolicy { - return m.DecisionPolicy +// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces +func (m MsgCreateGroupAccount) UnpackInterfaces(unpacker types.AnyUnpacker) error { + var decisionPolicy DecisionPolicy + return unpacker.UnpackAny(m.DecisionPolicy, &decisionPolicy) } var _ sdk.Msg = &MsgVote{} diff --git a/incubator/group/msg_test.go b/incubator/group/msg_test.go index f77ccbc..a727641 100644 --- a/incubator/group/msg_test.go +++ b/incubator/group/msg_test.go @@ -118,132 +118,97 @@ func TestMsgCreateGroupSigner(t *testing.T) { assert.Equal(t, []sdk.AccAddress{myAddr}, MsgCreateGroup{Admin: myAddr}.GetSigners()) } -func TestMsgCreateGroupAccountStd(t *testing.T) { +func TestMsgCreateGroupAccount(t *testing.T) { _, _, myAddr := auth.KeyTestPubAddr() specs := map[string]struct { - src MsgCreateGroupAccountStd - expErr bool + admin sdk.AccAddress + group GroupID + threshold sdk.Dec + timeout proto.Duration + expErr bool }{ "all good with minimum fields set": { - src: MsgCreateGroupAccountStd{ - Base: MsgCreateGroupAccountBase{Admin: myAddr, Group: 1}, - DecisionPolicy: StdDecisionPolicy{ - Sum: &StdDecisionPolicy_Threshold{&ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: 1}, - }}, - }, - }, + admin: myAddr, + group: 1, + threshold: sdk.OneDec(), + timeout: proto.Duration{Seconds: 1}, }, "zero threshold not allowed": { - src: MsgCreateGroupAccountStd{ - Base: MsgCreateGroupAccountBase{Admin: myAddr, Group: 1}, - DecisionPolicy: StdDecisionPolicy{ - Sum: &StdDecisionPolicy_Threshold{&ThresholdDecisionPolicy{ - Threshold: sdk.ZeroDec(), - Timout: proto.Duration{Seconds: 1}, - }}, - }, - }, - expErr: true, + admin: myAddr, + group: 1, + threshold: sdk.ZeroDec(), + timeout: proto.Duration{Seconds: 1}, + expErr: true, }, "admin required": { - src: MsgCreateGroupAccountStd{ - Base: MsgCreateGroupAccountBase{Group: 1}, - DecisionPolicy: StdDecisionPolicy{ - Sum: &StdDecisionPolicy_Threshold{&ThresholdDecisionPolicy{ - Threshold: sdk.ZeroDec(), - Timout: proto.Duration{Seconds: 1}, - }}, - }, - }, - expErr: true, + group: 1, + threshold: sdk.ZeroDec(), + timeout: proto.Duration{Seconds: 1}, + expErr: true, }, "valid admin required": { - src: MsgCreateGroupAccountStd{ - Base: MsgCreateGroupAccountBase{Admin: []byte("invalid-address"), Group: 1}, - DecisionPolicy: StdDecisionPolicy{ - Sum: &StdDecisionPolicy_Threshold{&ThresholdDecisionPolicy{ - Threshold: sdk.ZeroDec(), - Timout: proto.Duration{Seconds: 1}, - }}, - }, - }, - expErr: true, + admin: []byte("invalid-address"), + group: 1, + threshold: sdk.ZeroDec(), + timeout: proto.Duration{Seconds: 1}, + expErr: true, }, "group required": { - src: MsgCreateGroupAccountStd{ - Base: MsgCreateGroupAccountBase{Admin: myAddr}, - DecisionPolicy: StdDecisionPolicy{ - Sum: &StdDecisionPolicy_Threshold{&ThresholdDecisionPolicy{ - Threshold: sdk.ZeroDec(), - Timout: proto.Duration{Seconds: 1}, - }}, - }, - }, - expErr: true, + admin: myAddr, + threshold: sdk.ZeroDec(), + timeout: proto.Duration{Seconds: 1}, + expErr: true, }, "decision policy required": { - src: MsgCreateGroupAccountStd{ - Base: MsgCreateGroupAccountBase{Admin: myAddr, Group: 1}, - }, + admin: myAddr, + group: 1, expErr: true, }, - "decision policy without timout": { - src: MsgCreateGroupAccountStd{ - Base: MsgCreateGroupAccountBase{Admin: myAddr, Group: 1}, - DecisionPolicy: StdDecisionPolicy{ - Sum: &StdDecisionPolicy_Threshold{&ThresholdDecisionPolicy{ - Threshold: sdk.ZeroDec(), - }}, - }, - }, - expErr: true, + "decision policy without timeout": { + admin: myAddr, + group: 1, + threshold: sdk.ZeroDec(), + expErr: true, }, - "decision policy with invalid timout": { - src: MsgCreateGroupAccountStd{ - Base: MsgCreateGroupAccountBase{Admin: myAddr, Group: 1}, - DecisionPolicy: StdDecisionPolicy{ - Sum: &StdDecisionPolicy_Threshold{&ThresholdDecisionPolicy{ - Threshold: sdk.ZeroDec(), - Timout: proto.Duration{Seconds: -1}, - }}, - }, - }, - expErr: true, + "decision policy with invalid timeout": { + admin: myAddr, + group: 1, + threshold: sdk.ZeroDec(), + timeout: proto.Duration{Seconds: -1}, + expErr: true, }, "decision policy without threshold": { - src: MsgCreateGroupAccountStd{ - Base: MsgCreateGroupAccountBase{Admin: myAddr, Group: 1}, - DecisionPolicy: StdDecisionPolicy{ - Sum: &StdDecisionPolicy_Threshold{&ThresholdDecisionPolicy{ - Timout: proto.Duration{Seconds: 1}, - }}, - }, - }, - expErr: true, + admin: myAddr, + group: 1, + timeout: proto.Duration{Seconds: 1}, + expErr: true, }, "decision policy with negative threshold": { - src: MsgCreateGroupAccountStd{ - Base: MsgCreateGroupAccountBase{Admin: myAddr, Group: 1}, - DecisionPolicy: StdDecisionPolicy{ - Sum: &StdDecisionPolicy_Threshold{&ThresholdDecisionPolicy{ - Threshold: sdk.NewDec(-1), - Timout: proto.Duration{Seconds: 1}, - }}, - }, - }, - expErr: true, + admin: myAddr, + group: 1, + threshold: sdk.NewDec(-1), + timeout: proto.Duration{Seconds: 1}, + expErr: true, }, } for msg, spec := range specs { t.Run(msg, func(t *testing.T) { - err := spec.src.ValidateBasic() + m, err := NewMsgCreateGroupAccount( + spec.admin, + spec.group, + "any comment", + &ThresholdDecisionPolicy{ + Threshold: spec.threshold, + Timeout: spec.timeout, + }, + ) + require.NoError(t, err) + if spec.expErr { - require.Error(t, err) + require.Error(t, m.ValidateBasic()) } else { - require.NoError(t, err) + require.NoError(t, m.ValidateBasic()) } }) } diff --git a/incubator/group/protocgen.sh b/incubator/group/protocgen.sh index af54519..ea53aa1 100755 --- a/incubator/group/protocgen.sh +++ b/incubator/group/protocgen.sh @@ -7,7 +7,7 @@ protoc \ -I=$(go list -f "{{ .Dir }}" -m github.com/gogo/protobuf) \ -I=$(go list -f "{{ .Dir }}" -m github.com/cosmos/cosmos-sdk) \ --gocosmos_out=\ -Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\ +Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/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,\ @@ -23,7 +23,7 @@ protoc \ -I=$(go list -f "{{ .Dir }}" -m github.com/cosmos/cosmos-sdk) \ -I=$(go list -f "{{ .Dir }}" -m github.com/gogo/protobuf) \ --gocosmos_out=\ -Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\ +Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/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,\ diff --git a/incubator/group/testdata/codec.go b/incubator/group/testdata/codec.go index a4635b1..4a0fcff 100644 --- a/incubator/group/testdata/codec.go +++ b/incubator/group/testdata/codec.go @@ -2,22 +2,9 @@ package testdata import ( "github.com/cosmos/cosmos-sdk/codec" + cdctypes "github.com/cosmos/cosmos-sdk/codec/types" ) -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) { @@ -30,12 +17,20 @@ func RegisterCodec(cdc *codec.Codec) { cdc.RegisterConcrete(&MyAppMsg_B{}, "testdata/MyAppMsg_B", nil) } -// generic sealed codec to be used throughout module -var ModuleCdc *Codec +var ( + amino = codec.New() + + // moduleCdc references the global x/transfer module codec. Note, the codec + // should ONLY be used in certain instances of tests and for JSON encoding as Amino + // is still used for that purpose. + // + // The actual codec used for serialization should be provided to x/transfer and + // defined at the application level. + moduleCdc = codec.NewHybridCodec(amino, cdctypes.NewInterfaceRegistry()) +) func init() { - ModuleCdc = NewCodec(codec.New()) - RegisterCodec(ModuleCdc.amino) - codec.RegisterCrypto(ModuleCdc.amino) - ModuleCdc.amino.Seal() + RegisterCodec(amino) + codec.RegisterCrypto(amino) + amino.Seal() } diff --git a/incubator/group/testdata/handler.go b/incubator/group/testdata/handler.go index e4c5079..8d64614 100644 --- a/incubator/group/testdata/handler.go +++ b/incubator/group/testdata/handler.go @@ -21,7 +21,7 @@ func NewHandler(k Keeper) sdk.Handler { return &sdk.Result{ Data: nil, Log: "MsgAlwaysSucceed executed", - Events: ctx.EventManager().Events(), + Events: ctx.EventManager().ABCIEvents(), }, nil case *MsgAlwaysFail: logger.Info("executed MsgAlwaysFail msg") @@ -32,14 +32,14 @@ func NewHandler(k Keeper) sdk.Handler { return &sdk.Result{ Data: []byte(msg.Value), Log: "MsgSetValue executed", - Events: ctx.EventManager().Events(), + Events: ctx.EventManager().ABCIEvents(), }, nil case *MsgIncCounter: logger.Info("executed MsgIncCounter msg") return &sdk.Result{ Data: k.IncCounter(ctx), Log: "MsgIncCounter executed", - Events: ctx.EventManager().Events(), + Events: ctx.EventManager().ABCIEvents(), }, nil case *MsgConditional: logger.Info("executed MsgConditional msg") @@ -49,14 +49,14 @@ func NewHandler(k Keeper) sdk.Handler { return &sdk.Result{ Data: orm.EncodeSequence(msg.ExpectedCounter), Log: "MsgConditional executed", - Events: ctx.EventManager().Events(), + Events: ctx.EventManager().ABCIEvents(), }, nil case *MsgAuthenticate: logger.Info("executed MsgAuthenticate msg") return &sdk.Result{ Data: nil, Log: "MsgAuthenticate executed", - Events: ctx.EventManager().Events(), + Events: ctx.EventManager().ABCIEvents(), }, nil default: return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized message type: %T", msg) @@ -72,6 +72,6 @@ func handleMsgPropose(ctx sdk.Context, k Keeper, msg MsgPropose) (*sdk.Result, e return &sdk.Result{ Data: id.Bytes(), Log: fmt.Sprintf("Proposal created :%d", id), - Events: ctx.EventManager().Events(), + Events: ctx.EventManager().ABCIEvents(), }, nil } diff --git a/incubator/group/testdata/module.go b/incubator/group/testdata/module.go index 9f3e54a..6ee950b 100644 --- a/incubator/group/testdata/module.go +++ b/incubator/group/testdata/module.go @@ -10,7 +10,6 @@ import ( "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" ) - const ModuleName = "testdata" type AppModule struct { @@ -31,19 +30,19 @@ func (a AppModule) RegisterCodec(cdc *codec.Codec) { RegisterCodec(cdc) } -func (a AppModule) DefaultGenesis() json.RawMessage { +func (a AppModule) DefaultGenesis(cdc codec.JSONMarshaler) json.RawMessage { return nil } -func (a AppModule) ValidateGenesis(bz json.RawMessage) error { - return nil +func (a AppModule) ValidateGenesis(cdc codec.JSONMarshaler, bz json.RawMessage) error { + panic("implement me") } func (a AppModule) RegisterRESTRoutes(ctx context.CLIContext, r *mux.Router) { panic("implement me") } -func (a AppModule) GetTxCmd(*codec.Codec) *cobra.Command { +func (a AppModule) GetTxCmd(ctx context.CLIContext) *cobra.Command { panic("implement me") } @@ -51,11 +50,11 @@ func (a AppModule) GetQueryCmd(*codec.Codec) *cobra.Command { panic("implement me") } -func (a AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate { +func (a AppModule)InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data json.RawMessage) []abci.ValidatorUpdate { return nil } -func (a AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage { +func (a AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONMarshaler) json.RawMessage { return nil } diff --git a/incubator/group/testdata/sim_app.go b/incubator/group/testdata/sim_app.go index a2dde20..720def7 100644 --- a/incubator/group/testdata/sim_app.go +++ b/incubator/group/testdata/sim_app.go @@ -2,50 +2,64 @@ package testdata import ( "encoding/json" + "fmt" "io" + "os" - bam "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cosmos/cosmos-sdk/std" 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/capability" "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/ibc" + transfer "github.com/cosmos/cosmos-sdk/x/ibc-transfer" + ibcclient "github.com/cosmos/cosmos-sdk/x/ibc/02-client" + port "github.com/cosmos/cosmos-sdk/x/ibc/05-port" "github.com/cosmos/cosmos-sdk/x/mint" "github.com/cosmos/cosmos-sdk/x/params" paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" + paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" "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" "github.com/cosmos/modules/incubator/group" 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" + tmtypes "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" ) const appName = "SimApp" var ( + // DefaultCLIHome default home directories for the application CLI + DefaultCLIHome = os.ExpandEnv("$HOME/.simapp") + + // DefaultNodeHome default home directories for the application daemon + DefaultNodeHome = os.ExpandEnv("$HOME/.simapp") + // 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{}, + capability.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, @@ -55,8 +69,10 @@ var ( params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, + ibc.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, + transfer.AppModuleBasic{}, group.AppModule{}, AppModule{}, ) @@ -65,10 +81,11 @@ var ( 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}, + mint.ModuleName: {auth.Minter}, + staking.BondedPoolName: {auth.Burner, auth.Staking}, + staking.NotBondedPoolName: {auth.Burner, auth.Staking}, + gov.ModuleName: {auth.Burner}, + transfer.ModuleName: {auth.Minter, auth.Burner}, } // module accounts that are allowed to receive tokens @@ -83,82 +100,95 @@ 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 + *baseapp.BaseApp + cdc *codec.Codec + appCodec *std.Codec invCheckPeriod uint // keys to access the substores - keys map[string]*sdk.KVStoreKey - tkeys map[string]*sdk.TransientStoreKey + keys map[string]*sdk.KVStoreKey + tkeys map[string]*sdk.TransientStoreKey + memKeys map[string]*sdk.MemoryStoreKey // 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 group.Keeper - TestdataKeeper Keeper + AccountKeeper auth.AccountKeeper + BankKeeper bank.Keeper + CapabilityKeeper *capability.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 + IBCKeeper *ibc.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly + EvidenceKeeper evidence.Keeper + TransferKeeper transfer.Keeper + GroupKeeper group.Keeper + TestdataKeeper Keeper + + // make scoped keepers public for test purposes + ScopedIBCKeeper capability.ScopedKeeper + ScopedTransferKeeper capability.ScopedKeeper // the module manager mm *module.Manager // simulation manager - sm *module.SimulationManager + sm *module.SimulationManager + txEncoder sdk.TxEncoder +} + +func (app *SimApp) ExportAppStateAndValidators( + forZeroHeight bool, jailWhiteList []string, +) (appState json.RawMessage, validators []tmtypes.GenesisValidator, cp *abci.ConsensusParams, err error) { + + panic("implement me") } // 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), + homePath string, invCheckPeriod uint, baseAppOptions ...func(*baseapp.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) + appCodec, cdc := MakeCodecs() - bApp := bam.NewBaseApp(appName, logger, db, auth.DefaultTxDecoder(cdc), baseAppOptions...) + bApp := baseapp.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, + auth.StoreKey, bank.StoreKey, staking.StoreKey, + mint.StoreKey, distr.StoreKey, slashing.StoreKey, + gov.StoreKey, params.StoreKey, ibc.StoreKey, upgrade.StoreKey, + evidence.StoreKey, transfer.StoreKey, capability.StoreKey, group.StoreKeyName, ModuleName, ) tkeys := sdk.NewTransientStoreKeys(params.TStoreKey) + memKeys := sdk.NewMemoryStoreKeys(capability.MemStoreKey) app := &SimApp{ BaseApp: bApp, cdc: cdc, + appCodec: appCodec, invCheckPeriod: invCheckPeriod, keys: keys, tkeys: tkeys, + memKeys: memKeys, subspaces: make(map[string]params.Subspace), + txEncoder: auth.DefaultTxEncoder(cdc), } // init params keeper and subspaces - app.ParamsKeeper = params.NewKeeper(app.cdc, keys[params.StoreKey], tkeys[params.TStoreKey]) + app.ParamsKeeper = params.NewKeeper(appCodec, 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) @@ -167,58 +197,53 @@ func NewSimApp( 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[group.ModuleName] = app.ParamsKeeper.Subspace(group.DefaultParamspace) app.subspaces[ModuleName] = app.ParamsKeeper.Subspace(ModuleName) + // set the BaseApp's parameter store + bApp.SetParamStore(app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(std.ConsensusParamsKeyTable())) + + // add capability keeper and ScopeToModule for ibc module + app.CapabilityKeeper = capability.NewKeeper(appCodec, keys[capability.StoreKey], memKeys[capability.MemStoreKey]) + scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibc.ModuleName) + scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(transfer.ModuleName) + // add keepers app.AccountKeeper = auth.NewAccountKeeper( - app.cdc, keys[auth.StoreKey], app.subspaces[auth.ModuleName], auth.ProtoBaseAccount, + appCodec, keys[auth.StoreKey], app.subspaces[auth.ModuleName], auth.ProtoBaseAccount, maccPerms, ) 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, + appCodec, keys[bank.StoreKey], app.AccountKeeper, app.subspaces[bank.ModuleName], app.BlacklistedAccAddrs(), ) stakingKeeper := staking.NewKeeper( - appCodec.Staking, keys[staking.StoreKey], app.BankKeeper, app.SupplyKeeper, app.subspaces[staking.ModuleName], + appCodec, keys[staking.StoreKey], app.AccountKeeper, app.BankKeeper, app.subspaces[staking.ModuleName], ) app.MintKeeper = mint.NewKeeper( - app.cdc, keys[mint.StoreKey], app.subspaces[mint.ModuleName], &stakingKeeper, - app.SupplyKeeper, auth.FeeCollectorName, + appCodec, keys[mint.StoreKey], app.subspaces[mint.ModuleName], &stakingKeeper, + app.AccountKeeper, app.BankKeeper, auth.FeeCollectorName, ) app.DistrKeeper = distr.NewKeeper( - appCodec.Distribution, keys[distr.StoreKey], app.subspaces[distr.ModuleName], app.BankKeeper, &stakingKeeper, - app.SupplyKeeper, auth.FeeCollectorName, app.ModuleAccountAddrs(), + appCodec, keys[distr.StoreKey], app.subspaces[distr.ModuleName], app.AccountKeeper, app.BankKeeper, + &stakingKeeper, auth.FeeCollectorName, app.ModuleAccountAddrs(), ) app.SlashingKeeper = slashing.NewKeeper( - app.cdc, keys[slashing.StoreKey], &stakingKeeper, app.subspaces[slashing.ModuleName], + appCodec, 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.subspaces[crisis.ModuleName], invCheckPeriod, app.BankKeeper, auth.FeeCollectorName, ) - app.GroupKeeper = group.NewGroupKeeper(keys[group.StoreKeyName], app.subspaces[group.ModuleName], app.Router(), &MyAppProposal{} ) + app.UpgradeKeeper = upgrade.NewKeeper(skipUpgradeHeights, keys[upgrade.StoreKey], appCodec, homePath) + app.GroupKeeper = group.NewGroupKeeper(keys[group.StoreKeyName], app.subspaces[group.ModuleName], app.Router(), &MyAppProposal{}) app.TestdataKeeper = NewKeeper(keys[ModuleName], app.GroupKeeper) - 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(paramproposal.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, + appCodec, keys[gov.StoreKey], app.subspaces[gov.ModuleName], app.AccountKeeper, app.BankKeeper, &stakingKeeper, govRouter, ) @@ -228,21 +253,54 @@ func NewSimApp( staking.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()), ) + // Create IBC Keeper + // TODO: remove amino codec dependency once Tendermint version is upgraded with + // protobuf changes + app.IBCKeeper = ibc.NewKeeper( + app.cdc, appCodec, keys[ibc.StoreKey], app.StakingKeeper, scopedIBCKeeper, + ) + + // Create Transfer Keepers + app.TransferKeeper = transfer.NewKeeper( + appCodec, keys[transfer.StoreKey], + app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, + app.AccountKeeper, app.BankKeeper, scopedTransferKeeper, + ) + transferModule := transfer.NewAppModule(app.TransferKeeper) + + // Create static IBC router, add transfer route, then set and seal it + ibcRouter := port.NewRouter() + ibcRouter.AddRoute(transfer.ModuleName, transferModule) + app.IBCKeeper.SetRouter(ibcRouter) + + // create evidence keeper with router + evidenceKeeper := evidence.NewKeeper( + appCodec, keys[evidence.StoreKey], &app.StakingKeeper, app.SlashingKeeper, + ) + evidenceRouter := evidence.NewRouter(). + AddRoute(ibcclient.RouterKey, ibcclient.HandlerClientMisbehaviour(app.IBCKeeper.ClientKeeper)) + + evidenceKeeper.SetRouter(evidenceRouter) + app.EvidenceKeeper = *evidenceKeeper + // 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), + auth.NewAppModule(appCodec, app.AccountKeeper), + bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), + capability.NewAppModule(appCodec, *app.CapabilityKeeper), 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), + gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), + mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), + slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), + distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), + staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), upgrade.NewAppModule(app.UpgradeKeeper), evidence.NewAppModule(app.EvidenceKeeper), + ibc.NewAppModule(app.IBCKeeper), + params.NewAppModule(app.ParamsKeeper), + transferModule, group.NewAppModule(app.GroupKeeper), NewAppModule(app.TestdataKeeper), ) @@ -250,15 +308,22 @@ func NewSimApp( // 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, group.ModuleName) - app.mm.SetOrderEndBlockers(crisis.ModuleName, gov.ModuleName, staking.ModuleName, group.ModuleName) + // NOTE: staking module is required if HistoricalEntries param > 0 + app.mm.SetOrderBeginBlockers( + upgrade.ModuleName, mint.ModuleName, distr.ModuleName, slashing.ModuleName, + evidence.ModuleName, staking.ModuleName, ibc.ModuleName, + ) + app.mm.SetOrderEndBlockers(crisis.ModuleName, gov.ModuleName, staking.ModuleName) // NOTE: The genutils moodule must occur after staking so that pools are // properly initialized with tokens from genesis accounts. + // NOTE: Capability module must occur first so that it can initialize any capabilities + // so that other modules that want to create or claim capabilities afterwards in InitChain + // can do so safely. 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, + capability.ModuleName, auth.ModuleName, distr.ModuleName, staking.ModuleName, bank.ModuleName, + slashing.ModuleName, gov.ModuleName, mint.ModuleName, crisis.ModuleName, + ibc.ModuleName, genutil.ModuleName, evidence.ModuleName, transfer.ModuleName, group.ModuleName, ) @@ -270,15 +335,18 @@ func NewSimApp( // 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 + auth.NewAppModule(appCodec, app.AccountKeeper), + bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), + capability.NewAppModule(appCodec, *app.CapabilityKeeper), + gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), + mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper), + staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), + distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), + slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), + params.NewAppModule(app.ParamsKeeper), + evidence.NewAppModule(app.EvidenceKeeper), + ibc.NewAppModule(app.IBCKeeper), + transferModule, ) app.sm.RegisterStoreDecoders() @@ -286,25 +354,56 @@ func NewSimApp( // initialize stores app.MountKVStores(keys) app.MountTransientStores(tkeys) + app.MountMemoryStores(memKeys) // initialize BaseApp app.SetInitChainer(app.InitChainer) app.SetBeginBlocker(app.BeginBlocker) - app.SetAnteHandler(ante.NewAnteHandler(app.AccountKeeper, app.SupplyKeeper, auth.DefaultSigVerificationGasConsumer)) + app.SetAnteHandler( + ante.NewAnteHandler( + app.AccountKeeper, app.BankKeeper, *app.IBCKeeper, ante.DefaultSigVerificationGasConsumer, + ), + ) app.SetEndBlocker(app.EndBlocker) if loadLatest { - err := app.LoadLatestVersion(app.keys[bam.MainStoreKey]) - if err != nil { + if err := app.LoadLatestVersion(); err != nil { tmos.Exit(err.Error()) } } + // Initialize and seal the capability keeper so all persistent capabilities + // are loaded in-memory and prevent any further modules from creating scoped + // sub-keepers. + // This must be done during creation of baseapp rather than in InitChain so + // that in-memory capabilities get regenerated on app restart + ctx := app.BaseApp.NewUncachedContext(true, abci.Header{}) + app.CapabilityKeeper.InitializeAndSeal(ctx) + + app.ScopedIBCKeeper = scopedIBCKeeper + app.ScopedTransferKeeper = scopedTransferKeeper + return app } -func (app *SimApp) ExportAppStateAndValidators(bool, []string) (json.RawMessage, []types.GenesisValidator, error) { - panic("implement me") +// MakeCodecs constructs the *std.Codec and *codec.Codec instances used by +// simapp. It is useful for tests and clients who do not want to construct the +// full simapp +func MakeCodecs() (*std.Codec, *codec.Codec) { + cdc := std.MakeCodec(ModuleBasics) + interfaceRegistry := types.NewInterfaceRegistry() + std.RegisterInterfaces(interfaceRegistry) + ModuleBasics.RegisterInterfaceModules(interfaceRegistry) + appCodec := std.NewAppCodec(cdc, interfaceRegistry) + return appCodec, cdc +} + +func (app *SimApp) MustEncodeTx(tx sdk.Tx) []byte { + b, err := app.txEncoder(tx) + if err != nil { + panic(fmt.Sprintf("failed to encode Tx with encoder %T: %s", app.txEncoder, err)) + } + return b } // Name returns the name of the App @@ -322,23 +421,21 @@ func (app *SimApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.Re // InitChainer application update at chain initialization func (app *SimApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { - var genesisState map[string]json.RawMessage - if err:= json.Unmarshal(req.AppStateBytes, &genesisState); err!=nil{ - panic(err) - } - return app.mm.InitGenesis(ctx, genesisState) + var genesisState simapp.GenesisState + app.cdc.MustUnmarshalJSON(req.AppStateBytes, &genesisState) + return app.mm.InitGenesis(ctx, app.cdc, genesisState) } // LoadHeight loads a particular height func (app *SimApp) LoadHeight(height int64) error { - return app.LoadVersion(height, app.keys[bam.MainStoreKey]) + return app.LoadVersion(height) } // 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 + modAccAddrs[auth.NewModuleAddress(acc).String()] = true } return modAccAddrs @@ -348,7 +445,7 @@ func (app *SimApp) ModuleAccountAddrs() map[string]bool { func (app *SimApp) BlacklistedAccAddrs() map[string]bool { blacklistedAddrs := make(map[string]bool) for acc := range maccPerms { - blacklistedAddrs[supply.NewModuleAddress(acc).String()] = !allowedReceivingModAcc[acc] + blacklistedAddrs[auth.NewModuleAddress(acc).String()] = !allowedReceivingModAcc[acc] } return blacklistedAddrs @@ -362,6 +459,14 @@ func (app *SimApp) Codec() *codec.Codec { return app.cdc } +// AppCodec returns SimApp's app 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) AppCodec() *std.Codec { + return app.appCodec +} + // GetKey returns the KVStoreKey for the provided store key. // // NOTE: This is solely to be used for testing purposes. @@ -376,6 +481,13 @@ func (app *SimApp) GetTKey(storeKey string) *sdk.TransientStoreKey { return app.tkeys[storeKey] } +// GetMemKey returns the MemStoreKey for the provided mem key. +// +// NOTE: This is solely used for testing purposes. +func (app *SimApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey { + return app.memKeys[storeKey] +} + // GetSubspace returns a param subspace for a given module name. // // NOTE: This is solely to be used for testing purposes. diff --git a/incubator/group/testsupport.go b/incubator/group/testsupport.go index 44212d2..dfc46d7 100644 --- a/incubator/group/testsupport.go +++ b/incubator/group/testsupport.go @@ -3,10 +3,12 @@ package group import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/std" "github.com/cosmos/cosmos-sdk/store/rootmulti" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/params" - "github.com/cosmos/cosmos-sdk/x/params/subspace" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" @@ -26,10 +28,16 @@ func NewContext(keys ...sdk.StoreKey) sdk.Context { return sdk.NewContext(cms, abci.Header{}, false, log.NewNopLogger()) } -func createGroupKeeper() (Keeper, sdk.Context) { +func NewCodec() *std.Codec { amino := codec.New() + interfaceRegistry := types.NewInterfaceRegistry() + std.RegisterInterfaces(interfaceRegistry) + RegisterInterfaces(interfaceRegistry) + return std.NewAppCodec(amino, interfaceRegistry) +} +func createGroupKeeper() (Keeper, sdk.Context) { pKey, pTKey := sdk.NewKVStoreKey(params.StoreKey), sdk.NewTransientStoreKey(params.TStoreKey) - paramSpace := subspace.NewSubspace(amino, pKey, pTKey, DefaultParamspace) + paramSpace := paramtypes.NewSubspace(NewCodec(), pKey, pTKey, DefaultParamspace) groupKey := sdk.NewKVStoreKey(StoreKeyName) k := NewGroupKeeper(groupKey, paramSpace, baseapp.NewRouter(), &MockProposalI{}) diff --git a/incubator/group/types.go b/incubator/group/types.go index 29d653a..671b8bf 100644 --- a/incubator/group/types.go +++ b/incubator/group/types.go @@ -1,11 +1,15 @@ package group import ( + "fmt" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" 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" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/cosmos/modules/incubator/orm" + proto "github.com/gogo/protobuf/proto" "github.com/gogo/protobuf/types" "github.com/pkg/errors" "gopkg.in/yaml.v2" @@ -49,12 +53,22 @@ type DecisionPolicyResult struct { type DecisionPolicy interface { orm.Persistent orm.Validateable + GetTimeout() types.Duration Allow(tally Tally, totalPower sdk.Dec, votingDuration time.Duration) (DecisionPolicyResult, error) + Validate(g GroupMetadata) error +} + +// Implements DecisionPolicy Interface +var _ DecisionPolicy = &ThresholdDecisionPolicy{} + +// NewThresholdDecisionPolicy creates a threshold DecisionPolicy +func NewThresholdDecisionPolicy(threshold sdk.Dec, timeout types.Duration) DecisionPolicy { + return &ThresholdDecisionPolicy{threshold, timeout} } // Allow allows a proposal to pass when the tally of yes votes equals or exceeds the threshold before the timeout. func (p ThresholdDecisionPolicy) Allow(tally Tally, totalPower sdk.Dec, votingDuration time.Duration) (DecisionPolicyResult, error) { - timeout, err := types.DurationFromProto(&p.Timout) + timeout, err := types.DurationFromProto(&p.Timeout) if err != nil { return DecisionPolicyResult{}, err } @@ -71,6 +85,19 @@ func (p ThresholdDecisionPolicy) Allow(tally Tally, totalPower sdk.Dec, votingDu return DecisionPolicyResult{Allow: false, Final: false}, nil } +// GetThreshold returns the policy threshold +func (p *ThresholdDecisionPolicy) GetThreshold() sdk.Dec { + return p.Threshold +} + +// Validate returns an error if policy threshold is greater than the total group weight +func (p *ThresholdDecisionPolicy) Validate(g GroupMetadata) error { + if p.GetThreshold().GT(g.TotalWeight) { + return errors.Wrap(ErrInvalid, "policy threshold should not be greater than the total group weight") + } + return nil +} + func (p ThresholdDecisionPolicy) ValidateBasic() error { if p.Threshold.IsNil() { return errors.Wrap(ErrEmpty, "threshold") @@ -78,7 +105,7 @@ func (p ThresholdDecisionPolicy) ValidateBasic() error { if p.Threshold.LT(sdk.OneDec()) { return errors.Wrap(ErrInvalid, "threshold") } - timeout, err := types.DurationFromProto(&p.Timout) + timeout, err := types.DurationFromProto(&p.Timeout) if err != nil { return errors.Wrap(err, "timeout") } @@ -96,11 +123,45 @@ func (g GroupMember) NaturalKey() []byte { return result } -func (g GroupAccountMetadataBase) NaturalKey() []byte { +func (g GroupAccountMetadata) NaturalKey() []byte { return g.GroupAccount } -func (g GroupAccountMetadataBase) ValidateBasic() error { +var _ orm.Validateable = GroupAccountMetadata{} + +// NewGroupAccountMetadata creates a new GroupAccountMetadata instance +func NewGroupAccountMetadata(groupAccount sdk.AccAddress, group GroupID, admin sdk.AccAddress, comment string, version uint64, decisionPolicy DecisionPolicy) (GroupAccountMetadata, error) { + p := GroupAccountMetadata{ + GroupAccount: groupAccount, + Group: group, + Admin: admin, + Comment: comment, + Version: version, + } + + msg, ok := decisionPolicy.(proto.Message) + if !ok { + return GroupAccountMetadata{}, fmt.Errorf("%T does not implement proto.Message", decisionPolicy) + } + + any, err := codectypes.NewAnyWithValue(msg) + if err != nil { + return GroupAccountMetadata{}, err + } + + p.DecisionPolicy = any + return p, nil +} + +func (g GroupAccountMetadata) GetDecisionPolicy() DecisionPolicy { + decisionPolicy, ok := g.DecisionPolicy.GetCachedValue().(DecisionPolicy) + if !ok { + return nil + } + return decisionPolicy +} + +func (g GroupAccountMetadata) ValidateBasic() error { if g.Admin.Empty() { return sdkerrors.Wrap(ErrEmpty, "admin") } @@ -120,20 +181,8 @@ func (g GroupAccountMetadataBase) ValidateBasic() error { if g.Version == 0 { return sdkerrors.Wrap(ErrEmpty, "version") } + policy := g.GetDecisionPolicy() - return nil -} -func (s StdGroupAccountMetadata) NaturalKey() []byte { - return s.Base.NaturalKey() -} - -var _ orm.Validateable = StdGroupAccountMetadata{} - -func (s StdGroupAccountMetadata) ValidateBasic() error { - if err := s.Base.ValidateBasic(); err != nil { - return errors.Wrap(err, "base") - } - policy := s.DecisionPolicy.GetDecisionPolicy() if policy == nil { return errors.Wrap(ErrEmpty, "policy") } @@ -207,7 +256,7 @@ func (p Params) Validate() error { return nil } -func noopValidator() subspace.ValueValidatorFn { +func noopValidator() paramtypes.ValueValidatorFn { return func(value interface{}) error { return nil } } diff --git a/incubator/group/types.pb.go b/incubator/group/types.pb.go index 8e89c8e..c167636 100644 --- a/incubator/group/types.pb.go +++ b/incubator/group/types.pb.go @@ -4,11 +4,13 @@ package group import ( + bytes "bytes" fmt "fmt" + types "github.com/cosmos/cosmos-sdk/codec/types" 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" + types1 "github.com/gogo/protobuf/types" _ "github.com/regen-network/cosmos-proto" io "io" math "math" @@ -92,7 +94,7 @@ func (x ProposalBase_Status) String() string { } func (ProposalBase_Status) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{21, 0} + return fileDescriptor_d938547f84707355, []int{16, 0} } type ProposalBase_Result int32 @@ -127,7 +129,7 @@ func (x ProposalBase_Result) String() string { } func (ProposalBase_Result) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{21, 1} + return fileDescriptor_d938547f84707355, []int{16, 1} } type ProposalBase_ExecutorResult int32 @@ -162,196 +164,7 @@ func (x ProposalBase_ExecutorResult) String() string { } func (ProposalBase_ExecutorResult) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{21, 2} -} - -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), - } + return fileDescriptor_d938547f84707355, []int{16, 2} } type MsgCreateGroup struct { @@ -364,7 +177,7 @@ 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} + return fileDescriptor_d938547f84707355, []int{0} } func (m *MsgCreateGroup) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -424,7 +237,7 @@ 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} + return fileDescriptor_d938547f84707355, []int{1} } func (m *MsgUpdateGroupMembers) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -484,7 +297,7 @@ 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} + return fileDescriptor_d938547f84707355, []int{2} } func (m *MsgUpdateGroupAdmin) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -544,7 +357,7 @@ 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} + return fileDescriptor_d938547f84707355, []int{3} } func (m *MsgUpdateGroupComment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -604,7 +417,7 @@ 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} + return fileDescriptor_d938547f84707355, []int{4} } func (m *Member) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -647,86 +460,27 @@ func (m *Member) GetComment() string { return "" } -type MsgCreateGroupAccountBase struct { +// MsgCreateGroupAccount creates a group account using one of the members of DecisionPolicy. +type MsgCreateGroupAccount 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"` + // StdDecisionPolicy decision_policy = 2 [(gogoproto.nullable) = false]; + DecisionPolicy *types.Any `protobuf:"bytes,4,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,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"` - DecisionPolicy StdDecisionPolicy `protobuf:"bytes,2,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy"` -} - -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 *MsgCreateGroupAccount) Reset() { *m = MsgCreateGroupAccount{} } +func (m *MsgCreateGroupAccount) String() string { return proto.CompactTextString(m) } +func (*MsgCreateGroupAccount) ProtoMessage() {} +func (*MsgCreateGroupAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{5} } -func (m *MsgCreateGroupAccountStd) XXX_Unmarshal(b []byte) error { +func (m *MsgCreateGroupAccount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgCreateGroupAccountStd) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgCreateGroupAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgCreateGroupAccountStd.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgCreateGroupAccount.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -736,17 +490,17 @@ func (m *MsgCreateGroupAccountStd) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *MsgCreateGroupAccountStd) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateGroupAccountStd.Merge(m, src) +func (m *MsgCreateGroupAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateGroupAccount.Merge(m, src) } -func (m *MsgCreateGroupAccountStd) XXX_Size() int { +func (m *MsgCreateGroupAccount) XXX_Size() int { return m.Size() } -func (m *MsgCreateGroupAccountStd) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateGroupAccountStd.DiscardUnknown(m) +func (m *MsgCreateGroupAccount) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateGroupAccount.DiscardUnknown(m) } -var xxx_messageInfo_MsgCreateGroupAccountStd proto.InternalMessageInfo +var xxx_messageInfo_MsgCreateGroupAccount proto.InternalMessageInfo 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"` @@ -758,7 +512,7 @@ func (m *MsgUpdateGroupAccountAdmin) Reset() { *m = MsgUpdateGroupAccoun func (m *MsgUpdateGroupAccountAdmin) String() string { return proto.CompactTextString(m) } func (*MsgUpdateGroupAccountAdmin) ProtoMessage() {} func (*MsgUpdateGroupAccountAdmin) Descriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{8} + return fileDescriptor_d938547f84707355, []int{6} } func (m *MsgUpdateGroupAccountAdmin) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -808,23 +562,26 @@ func (m *MsgUpdateGroupAccountAdmin) GetNewAdmin() github_com_cosmos_cosmos_sdk_ return nil } -type MsgUpdateGroupAccountBase struct { +// MsgCreateGroupAccount allows a group account decision policy to be updated to a member of DecisionPolicy. +type MsgUpdateGroupAccountDecisionPolicy 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"` + // StdDecisionPolicy decision_policy = 2 [(gogoproto.nullable) = false]; + DecisionPolicy *types.Any `protobuf:"bytes,3,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,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 *MsgUpdateGroupAccountDecisionPolicy) Reset() { *m = MsgUpdateGroupAccountDecisionPolicy{} } +func (m *MsgUpdateGroupAccountDecisionPolicy) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateGroupAccountDecisionPolicy) ProtoMessage() {} +func (*MsgUpdateGroupAccountDecisionPolicy) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{7} } -func (m *MsgUpdateGroupAccountBase) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateGroupAccountDecisionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateGroupAccountBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateGroupAccountDecisionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateGroupAccountBase.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicy.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -834,86 +591,37 @@ func (m *MsgUpdateGroupAccountBase) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *MsgUpdateGroupAccountBase) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateGroupAccountBase.Merge(m, src) +func (m *MsgUpdateGroupAccountDecisionPolicy) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicy.Merge(m, src) } -func (m *MsgUpdateGroupAccountBase) XXX_Size() int { +func (m *MsgUpdateGroupAccountDecisionPolicy) XXX_Size() int { return m.Size() } -func (m *MsgUpdateGroupAccountBase) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateGroupAccountBase.DiscardUnknown(m) +func (m *MsgUpdateGroupAccountDecisionPolicy) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicy.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateGroupAccountBase proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateGroupAccountDecisionPolicy proto.InternalMessageInfo -func (m *MsgUpdateGroupAccountBase) GetAdmin() github_com_cosmos_cosmos_sdk_types.AccAddress { +func (m *MsgUpdateGroupAccountDecisionPolicy) GetAdmin() github_com_cosmos_cosmos_sdk_types.AccAddress { if m != nil { return m.Admin } return nil } -func (m *MsgUpdateGroupAccountBase) GetGroup() GroupID { +func (m *MsgUpdateGroupAccountDecisionPolicy) 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"` - DecisionPolicy StdDecisionPolicy `protobuf:"bytes,2,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy"` -} - -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 MsgUpdateGroupAccountBase{} -} - -func (m *MsgUpdateGroupAccountDecisionPolicyStd) GetDecisionPolicy() StdDecisionPolicy { +func (m *MsgUpdateGroupAccountDecisionPolicy) GetDecisionPolicy() *types.Any { if m != nil { return m.DecisionPolicy } - return StdDecisionPolicy{} + return nil } type MsgUpdateGroupAccountComment struct { @@ -926,7 +634,7 @@ func (m *MsgUpdateGroupAccountComment) Reset() { *m = MsgUpdateGroupAcco func (m *MsgUpdateGroupAccountComment) String() string { return proto.CompactTextString(m) } func (*MsgUpdateGroupAccountComment) ProtoMessage() {} func (*MsgUpdateGroupAccountComment) Descriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{11} + return fileDescriptor_d938547f84707355, []int{8} } func (m *MsgUpdateGroupAccountComment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -976,96 +684,20 @@ func (m *MsgUpdateGroupAccountComment) GetComment() string { 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), - } -} - +// ThresholdDecisionPolicy implements the DecisionPolicy interface type ThresholdDecisionPolicy struct { // threshold is a fix weight value that must be met or exceeded for a proposal to succeed. 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"` - // timout is the duration from submission of a proposal to the end of voting period + // timeout is the duration from submission of a proposal to the end of voting period // Within this times votes and exec messages can be submitted. - Timout types.Duration `protobuf:"bytes,2,opt,name=timout,proto3" json:"timout"` + Timeout types1.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout"` } 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} + return fileDescriptor_d938547f84707355, []int{9} } func (m *ThresholdDecisionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1094,11 +726,11 @@ func (m *ThresholdDecisionPolicy) XXX_DiscardUnknown() { var xxx_messageInfo_ThresholdDecisionPolicy proto.InternalMessageInfo -func (m *ThresholdDecisionPolicy) GetTimout() types.Duration { +func (m *ThresholdDecisionPolicy) GetTimeout() types1.Duration { if m != nil { - return m.Timout + return m.Timeout } - return types.Duration{} + return types1.Duration{} } // MsgProposeBase is the base propose msg that app should use to implement a MsgPropose type based @@ -1120,7 +752,7 @@ 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} + return fileDescriptor_d938547f84707355, []int{10} } func (m *MsgProposeBase) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1181,7 +813,7 @@ 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} + return fileDescriptor_d938547f84707355, []int{11} } func (m *MsgVote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1247,7 +879,7 @@ 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} + return fileDescriptor_d938547f84707355, []int{12} } func (m *MsgExec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1306,7 +938,7 @@ 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} + return fileDescriptor_d938547f84707355, []int{13} } func (m *GroupMetadata) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1376,7 +1008,7 @@ 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} + return fileDescriptor_d938547f84707355, []int{14} } func (m *GroupMember) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1426,38 +1058,30 @@ func (m *GroupMember) GetComment() string { return "" } -// 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 { +// GroupAccountMetadata specifies group account metadata +type GroupAccountMetadata 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"` - // version is used to track changes to a group's GroupAccountMetadataBase structure that + // version is used to track changes to a group's GroupAccountMetadata structure that // would create a different result on a running proposal. - Version uint64 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` + Version uint64 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"` + DecisionPolicy *types.Any `protobuf:"bytes,6,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy,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 *GroupAccountMetadata) Reset() { *m = GroupAccountMetadata{} } +func (m *GroupAccountMetadata) String() string { return proto.CompactTextString(m) } +func (*GroupAccountMetadata) ProtoMessage() {} +func (*GroupAccountMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_d938547f84707355, []int{15} } -func (m *GroupAccountMetadataBase) XXX_Unmarshal(b []byte) error { +func (m *GroupAccountMetadata) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *GroupAccountMetadataBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *GroupAccountMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_GroupAccountMetadataBase.Marshal(b, m, deterministic) + return xxx_messageInfo_GroupAccountMetadata.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1467,106 +1091,17 @@ func (m *GroupAccountMetadataBase) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *GroupAccountMetadataBase) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupAccountMetadataBase.Merge(m, src) +func (m *GroupAccountMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupAccountMetadata.Merge(m, src) } -func (m *GroupAccountMetadataBase) XXX_Size() int { +func (m *GroupAccountMetadata) XXX_Size() int { return m.Size() } -func (m *GroupAccountMetadataBase) XXX_DiscardUnknown() { - xxx_messageInfo_GroupAccountMetadataBase.DiscardUnknown(m) +func (m *GroupAccountMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_GroupAccountMetadata.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 "" -} - -func (m *GroupAccountMetadataBase) GetVersion() uint64 { - if m != nil { - return m.Version - } - return 0 -} - -// 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"` - DecisionPolicy StdDecisionPolicy `protobuf:"bytes,2,opt,name=decision_policy,json=decisionPolicy,proto3" json:"decision_policy"` -} - -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 GroupAccountMetadataBase{} -} - -func (m *StdGroupAccountMetadata) GetDecisionPolicy() StdDecisionPolicy { - if m != nil { - return m.DecisionPolicy - } - return StdDecisionPolicy{} -} +var xxx_messageInfo_GroupAccountMetadata proto.InternalMessageInfo // ProposalBase is the base proposal type that app should use to implement a Proposal type based // on their app Msg type. @@ -1580,7 +1115,7 @@ 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"` + SubmittedAt types1.Timestamp `protobuf:"bytes,4,opt,name=submitted_at,json=submittedAt,proto3" json:"submitted_at"` // 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"` @@ -1597,7 +1132,7 @@ type ProposalBase struct { // Timestamp of the block where the proposal execution times out. Header times of the votes and execution messages // must be before this end time to be included in the election. After the timeout timestamp the proposal can not be // executed anymore and should be considered pending delete. - Timeout types.Timestamp `protobuf:"bytes,10,opt,name=timeout,proto3" json:"timeout"` + Timeout types1.Timestamp `protobuf:"bytes,10,opt,name=timeout,proto3" json:"timeout"` // Result is the final result based on the votes and election rule. Initial value is NotRun. ExecutorResult ProposalBase_ExecutorResult `protobuf:"varint,11,opt,name=executor_result,json=executorResult,proto3,enum=cosmos_modules.incubator.group.v1_alpha.ProposalBase_ExecutorResult" json:"executor_result,omitempty"` } @@ -1606,7 +1141,7 @@ 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} + return fileDescriptor_d938547f84707355, []int{16} } func (m *ProposalBase) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1656,11 +1191,11 @@ func (m *ProposalBase) GetProposers() []github_com_cosmos_cosmos_sdk_types.AccAd return nil } -func (m *ProposalBase) GetSubmittedAt() types.Timestamp { +func (m *ProposalBase) GetSubmittedAt() types1.Timestamp { if m != nil { return m.SubmittedAt } - return types.Timestamp{} + return types1.Timestamp{} } func (m *ProposalBase) GetGroupVersion() uint64 { @@ -1698,11 +1233,11 @@ func (m *ProposalBase) GetVoteState() Tally { return Tally{} } -func (m *ProposalBase) GetTimeout() types.Timestamp { +func (m *ProposalBase) GetTimeout() types1.Timestamp { if m != nil { return m.Timeout } - return types.Timestamp{} + return types1.Timestamp{} } func (m *ProposalBase) GetExecutorResult() ProposalBase_ExecutorResult { @@ -1723,7 +1258,7 @@ 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} + return fileDescriptor_d938547f84707355, []int{17} } func (m *Tally) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1757,14 +1292,14 @@ type Vote struct { 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"` + SubmittedAt types1.Timestamp `protobuf:"bytes,5,opt,name=submitted_at,json=submittedAt,proto3" json:"submitted_at"` } 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} + return fileDescriptor_d938547f84707355, []int{18} } func (m *Vote) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1821,11 +1356,11 @@ func (m *Vote) GetComment() string { return "" } -func (m *Vote) GetSubmittedAt() types.Timestamp { +func (m *Vote) GetSubmittedAt() types1.Timestamp { if m != nil { return m.SubmittedAt } - return types.Timestamp{} + return types1.Timestamp{} } // Params defines the set of configurable parameters. @@ -1836,7 +1371,7 @@ type Params struct { func (m *Params) Reset() { *m = Params{} } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{24} + return fileDescriptor_d938547f84707355, []int{19} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1879,7 +1414,7 @@ type GenesisState struct { func (m *GenesisState) Reset() { *m = GenesisState{} } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{25} + return fileDescriptor_d938547f84707355, []int{20} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1920,27 +1455,22 @@ func init() { proto.RegisterEnum("cosmos_modules.incubator.group.v1_alpha.ProposalBase_Status", ProposalBase_Status_name, ProposalBase_Status_value) proto.RegisterEnum("cosmos_modules.incubator.group.v1_alpha.ProposalBase_Result", ProposalBase_Result_name, ProposalBase_Result_value) proto.RegisterEnum("cosmos_modules.incubator.group.v1_alpha.ProposalBase_ExecutorResult", ProposalBase_ExecutorResult_name, ProposalBase_ExecutorResult_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((*MsgCreateGroupAccount)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgCreateGroupAccount") 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((*MsgUpdateGroupAccountDecisionPolicy)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgUpdateGroupAccountDecisionPolicy") 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((*GroupAccountMetadata)(nil), "cosmos_modules.incubator.group.v1_alpha.GroupAccountMetadata") 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") @@ -1951,130 +1481,152 @@ func init() { func init() { proto.RegisterFile("types.proto", fileDescriptor_d938547f84707355) } var fileDescriptor_d938547f84707355 = []byte{ - // 1926 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x6f, 0x23, 0x49, - 0x15, 0x77, 0xdb, 0x8e, 0x9d, 0x3c, 0x27, 0x19, 0x53, 0x33, 0xb3, 0x71, 0xcc, 0x6c, 0xec, 0x6d, - 0xd0, 0xb2, 0x0c, 0x1a, 0x87, 0x1d, 0x10, 0x8b, 0x22, 0x40, 0xf8, 0x2b, 0x89, 0x99, 0xc4, 0x8e, - 0xba, 0xed, 0x2c, 0x1f, 0x23, 0x35, 0x9d, 0xee, 0x5a, 0xa7, 0xc1, 0xdd, 0x6d, 0x75, 0x57, 0x67, - 0x92, 0x1b, 0x70, 0x61, 0x14, 0x09, 0x09, 0x38, 0x71, 0x89, 0x34, 0xab, 0xfd, 0x17, 0xe0, 0xc0, - 0x79, 0x39, 0xac, 0x38, 0x2d, 0xe2, 0x02, 0x48, 0x44, 0x30, 0x73, 0x81, 0x1b, 0x70, 0xe0, 0x30, - 0x5c, 0x50, 0x57, 0x55, 0xc7, 0xee, 0xd8, 0xce, 0xfa, 0x23, 0x3b, 0x3b, 0x37, 0x77, 0x57, 0xbd, - 0xdf, 0x7b, 0xbf, 0xf7, 0x5e, 0xbf, 0xf7, 0xaa, 0x0c, 0x29, 0x72, 0xd2, 0xc5, 0x6e, 0xa1, 0xeb, - 0xd8, 0xc4, 0x46, 0x9f, 0xd3, 0x6c, 0xd7, 0xb4, 0x5d, 0xc5, 0xb4, 0x75, 0xaf, 0x83, 0xdd, 0x82, - 0x61, 0x69, 0xde, 0x81, 0x4a, 0x6c, 0xa7, 0xd0, 0x76, 0x6c, 0xaf, 0x5b, 0x38, 0x7a, 0x53, 0x51, - 0x3b, 0xdd, 0x43, 0x35, 0x7b, 0xab, 0x6d, 0xb7, 0x6d, 0x2a, 0xb3, 0xee, 0xff, 0x62, 0xe2, 0xd9, - 0xb5, 0xb6, 0x6d, 0xb7, 0x3b, 0x78, 0x9d, 0x3e, 0x1d, 0x78, 0xef, 0xac, 0xeb, 0x9e, 0xa3, 0x12, - 0xc3, 0xb6, 0xf8, 0x7a, 0xee, 0xf2, 0x3a, 0x31, 0x4c, 0xec, 0x12, 0xd5, 0xec, 0xf2, 0x0d, 0x5f, - 0x20, 0x87, 0x86, 0xa3, 0x2b, 0x5d, 0xd5, 0x21, 0x27, 0x6c, 0xd7, 0x3a, 0xb3, 0xe8, 0x5e, 0xff, - 0x03, 0xdb, 0x2c, 0xfe, 0x6f, 0x1e, 0x62, 0xbb, 0x6e, 0x1b, 0x3d, 0x84, 0x45, 0xcd, 0xc1, 0x2a, - 0xc1, 0x0a, 0x35, 0x32, 0x23, 0xe4, 0x85, 0x37, 0x52, 0xf7, 0xdf, 0x2a, 0x8c, 0xc9, 0xa5, 0xb0, - 0xeb, 0xb6, 0xcb, 0x54, 0x7e, 0xcb, 0x7f, 0xbf, 0x1d, 0x91, 0x52, 0x5a, 0xef, 0x11, 0x39, 0x70, - 0xcb, 0xeb, 0xea, 0x17, 0xe8, 0x8a, 0x89, 0xcd, 0x03, 0xec, 0xb8, 0x99, 0x28, 0xd5, 0xf2, 0x8d, - 0x49, 0xb4, 0xb4, 0x28, 0x0e, 0x85, 0xdd, 0x65, 0x28, 0xdb, 0x11, 0x09, 0x79, 0x03, 0x6f, 0x51, - 0x07, 0x50, 0x48, 0xa7, 0xaa, 0x9b, 0x86, 0x95, 0x89, 0x51, 0x8d, 0x5f, 0x9b, 0x52, 0x63, 0xd1, - 0xc7, 0xd8, 0x8e, 0x48, 0x69, 0xef, 0xd2, 0xbb, 0x01, 0x86, 0x9a, 0x6d, 0x9a, 0xd8, 0x22, 0x99, - 0xf8, 0x4c, 0x0c, 0xcb, 0x0c, 0xe5, 0x12, 0x43, 0xfe, 0x16, 0x79, 0x70, 0xab, 0x3f, 0x66, 0x8a, - 0xaa, 0x69, 0xb6, 0x67, 0x91, 0xcc, 0x1c, 0xd5, 0x59, 0x9c, 0x32, 0x76, 0x45, 0x86, 0x22, 0x13, - 0xdd, 0x57, 0xab, 0x0d, 0x2c, 0xa0, 0x9f, 0x08, 0x90, 0x0d, 0x7b, 0x96, 0x2d, 0x70, 0x0f, 0x27, - 0xa8, 0xf6, 0xf2, 0xb4, 0x1e, 0x66, 0x58, 0x81, 0xa3, 0x57, 0xbc, 0xe1, 0x4b, 0xe8, 0x5d, 0x01, - 0x3e, 0x3b, 0xd4, 0x08, 0x1d, 0x6b, 0x86, 0x6b, 0xd8, 0x96, 0xd2, 0xb5, 0x3b, 0x86, 0x76, 0x92, - 0x49, 0x52, 0x73, 0x1a, 0xb3, 0x99, 0x53, 0xe1, 0xa0, 0x7b, 0x14, 0x93, 0xb9, 0x26, 0xef, 0x7d, - 0xc4, 0x36, 0xf4, 0x58, 0x80, 0x3b, 0x43, 0x6d, 0x0c, 0x92, 0x63, 0x9e, 0xda, 0x56, 0x9d, 0xcd, - 0xb6, 0x5e, 0x8e, 0xac, 0x7a, 0xa3, 0x16, 0xd1, 0x26, 0xc4, 0x8f, 0x6c, 0x82, 0x33, 0x0b, 0x54, - 0xe3, 0x17, 0x27, 0xd1, 0xb8, 0x6f, 0x13, 0xbc, 0x1d, 0x91, 0xa8, 0xbc, 0x8f, 0x83, 0x8f, 0xb1, - 0x96, 0x81, 0xc9, 0x71, 0xaa, 0xc7, 0x58, 0xf3, 0x71, 0x7c, 0xf9, 0xd2, 0x1c, 0xc4, 0x5c, 0xcf, - 0x14, 0x7f, 0x27, 0xc0, 0x72, 0x38, 0xfb, 0xd0, 0x16, 0xcc, 0xb1, 0x3c, 0xf2, 0x2b, 0xd0, 0x62, - 0xe9, 0xcd, 0xe7, 0xe7, 0xb9, 0x7b, 0x6d, 0x83, 0x1c, 0x7a, 0x07, 0x05, 0xcd, 0x36, 0x79, 0xf1, - 0x0a, 0x0a, 0x9a, 0xab, 0xff, 0x70, 0x9d, 0x95, 0xde, 0xa2, 0xa6, 0x15, 0x75, 0xdd, 0xc1, 0xae, - 0x2b, 0x31, 0x79, 0xd4, 0x80, 0x64, 0xaf, 0xcc, 0xc4, 0xde, 0x48, 0xdd, 0x5f, 0x1f, 0xdf, 0x5a, - 0x2a, 0x57, 0x8a, 0x7f, 0x70, 0x9e, 0x8b, 0x48, 0x01, 0x0a, 0xca, 0x40, 0x32, 0x08, 0x9c, 0x5f, - 0x45, 0x16, 0xa4, 0xe0, 0x51, 0xfc, 0xbb, 0x00, 0xb7, 0x87, 0x96, 0xa6, 0xeb, 0x63, 0xf3, 0x1a, - 0xcc, 0xb1, 0xc2, 0xec, 0x97, 0xcc, 0x78, 0x29, 0xf5, 0xfc, 0x3c, 0x97, 0xa4, 0x9a, 0x6a, 0x15, - 0x89, 0xad, 0xa0, 0x87, 0xb0, 0xcc, 0x4c, 0x55, 0x58, 0x1e, 0xb8, 0x99, 0xd8, 0x2c, 0xbc, 0x97, - 0x18, 0x18, 0x23, 0xe5, 0x8a, 0x7f, 0x10, 0xe0, 0xe6, 0x90, 0x62, 0xf8, 0x42, 0x19, 0xd6, 0x61, - 0xc1, 0xc2, 0x8f, 0xfa, 0x2a, 0xf9, 0x54, 0xfa, 0xe6, 0x2d, 0xfc, 0x88, 0xda, 0x2e, 0x9e, 0x0d, - 0xc4, 0x2d, 0xf8, 0x5e, 0x5e, 0x24, 0xab, 0xd1, 0x79, 0xf5, 0x1b, 0x01, 0x12, 0x2c, 0x26, 0xe8, - 0x01, 0x24, 0x55, 0x86, 0x3c, 0xbd, 0x49, 0x01, 0x02, 0xaa, 0xc0, 0x5c, 0xd7, 0x7e, 0x84, 0x1d, - 0x6a, 0xd4, 0x42, 0xa9, 0xe0, 0xc7, 0xfb, 0x2f, 0xe7, 0xb9, 0xd7, 0xc7, 0x80, 0xab, 0x60, 0x4d, - 0x62, 0xc2, 0x57, 0xd8, 0xfd, 0xae, 0x00, 0xab, 0x43, 0x9b, 0x4a, 0x49, 0x75, 0xf1, 0x4b, 0xe2, - 0xdb, 0x7f, 0x0a, 0x90, 0x19, 0xd5, 0xf8, 0xd0, 0x43, 0x88, 0x1f, 0xa8, 0x2e, 0xe6, 0x53, 0x50, - 0x69, 0xb6, 0x4e, 0xea, 0x93, 0xe6, 0xdf, 0x14, 0x45, 0x45, 0x06, 0xdc, 0xb8, 0xdc, 0xa5, 0xd8, - 0x20, 0xb4, 0x31, 0xb6, 0x22, 0x99, 0xe8, 0xe1, 0x66, 0xc3, 0x15, 0x2c, 0xeb, 0xa1, 0xb7, 0x1b, - 0xf1, 0xc7, 0x4f, 0x72, 0x11, 0xf1, 0x67, 0x51, 0xc8, 0x8e, 0x6e, 0xb3, 0xd7, 0x17, 0x90, 0x7d, - 0x58, 0x0a, 0x4f, 0x22, 0xd1, 0x69, 0x01, 0x17, 0xdb, 0xfd, 0x13, 0xc7, 0x75, 0x7f, 0xf7, 0x3f, - 0x65, 0xf9, 0x39, 0xe8, 0x8f, 0x17, 0x9d, 0x9f, 0xe2, 0xbf, 0x05, 0x78, 0x7d, 0xbc, 0x89, 0x63, - 0x96, 0x9c, 0x1c, 0x4e, 0xf4, 0x13, 0xca, 0x49, 0xf1, 0xcf, 0x02, 0xdc, 0xb9, 0x6a, 0x92, 0x79, - 0xf9, 0xf3, 0x71, 0x74, 0x55, 0xf9, 0x85, 0x00, 0x9f, 0x1a, 0xf0, 0x03, 0xfa, 0x3e, 0x2c, 0x90, - 0x43, 0x07, 0xbb, 0x87, 0x76, 0x47, 0xe7, 0xf1, 0xfb, 0xe6, 0xd8, 0x6e, 0x6d, 0x06, 0x92, 0x61, - 0xd0, 0xed, 0x88, 0xd4, 0x03, 0xdd, 0xb8, 0xf9, 0xfb, 0x5f, 0xdf, 0xbb, 0x71, 0xf7, 0x92, 0xfb, - 0xf9, 0x90, 0xf5, 0x44, 0x80, 0x95, 0x11, 0x20, 0x68, 0xe7, 0xb2, 0x65, 0x93, 0x77, 0x83, 0x1e, - 0x00, 0x7a, 0x0b, 0x12, 0xc4, 0x30, 0x6d, 0x8f, 0xf0, 0xdc, 0x59, 0x2d, 0xb0, 0xb3, 0x6a, 0x21, - 0x38, 0xab, 0x16, 0x2a, 0xfc, 0x2c, 0xcb, 0x53, 0x83, 0x6f, 0x17, 0xff, 0xc8, 0xe6, 0xc0, 0x3d, - 0xc7, 0xee, 0xda, 0x2e, 0xa6, 0x5f, 0xe1, 0x40, 0xec, 0x84, 0xeb, 0x89, 0x5d, 0x03, 0x16, 0xba, - 0x4c, 0x0d, 0x1f, 0x0c, 0xa7, 0xc2, 0xec, 0x61, 0x5c, 0x91, 0x0c, 0xcf, 0x04, 0x48, 0xf2, 0x01, - 0x1a, 0xdd, 0x85, 0x79, 0x26, 0xa2, 0x76, 0x28, 0x93, 0x78, 0x69, 0xf9, 0xf9, 0x79, 0x0e, 0xf6, - 0xf8, 0xbb, 0x5a, 0x45, 0xba, 0x58, 0x47, 0x35, 0x48, 0xf8, 0xc3, 0xf6, 0x2c, 0xf6, 0x71, 0x00, - 0xb4, 0x05, 0x09, 0xed, 0xd0, 0x36, 0x34, 0x4c, 0x6d, 0x5b, 0x9e, 0x60, 0x16, 0x2c, 0x53, 0x31, - 0x89, 0x8b, 0xf7, 0xb3, 0x8c, 0x87, 0x59, 0xfe, 0x88, 0xb1, 0xf4, 0xc7, 0xfb, 0x49, 0x59, 0xba, - 0x46, 0xdb, 0xe2, 0x53, 0xc8, 0x74, 0x2c, 0x19, 0x80, 0xf8, 0xe3, 0x28, 0x2c, 0xf1, 0xb1, 0x9b, - 0xa8, 0xba, 0x4a, 0xd4, 0x5e, 0xe9, 0x15, 0x46, 0x8e, 0x06, 0x17, 0x55, 0x26, 0x3a, 0x63, 0x95, - 0x19, 0x99, 0x00, 0xfe, 0xca, 0x11, 0x76, 0xfc, 0xcf, 0x8d, 0x3a, 0x2d, 0x2e, 0x05, 0x8f, 0x68, - 0x0f, 0x52, 0xc4, 0x26, 0x6a, 0xe7, 0x6d, 0x6c, 0xb4, 0x0f, 0xd9, 0x89, 0x7d, 0xf2, 0x2f, 0xaf, - 0x1f, 0x42, 0xfc, 0xab, 0x00, 0xa9, 0xbe, 0xa3, 0xc7, 0x38, 0x1e, 0xa8, 0x41, 0x82, 0xcd, 0xf8, - 0x33, 0x44, 0x80, 0x01, 0xa0, 0x4d, 0x48, 0x3c, 0x62, 0x54, 0x62, 0x53, 0x51, 0xe1, 0xd2, 0x57, - 0xa4, 0xd9, 0x2f, 0xa3, 0x90, 0xe9, 0x6f, 0x16, 0x41, 0xa8, 0x3f, 0xd6, 0x62, 0x31, 0xc6, 0x84, - 0x79, 0x91, 0x46, 0xb1, 0xeb, 0x4b, 0xa3, 0xf8, 0xc8, 0x34, 0x9a, 0x0b, 0xa5, 0x91, 0x7f, 0xf0, - 0x5c, 0x91, 0x89, 0x3e, 0xcc, 0x2f, 0xe8, 0x7b, 0xa1, 0x79, 0x61, 0xfc, 0xdb, 0xa0, 0x51, 0x4e, - 0xfe, 0xa4, 0xc6, 0x85, 0xf7, 0x17, 0x61, 0x31, 0x28, 0x20, 0x1f, 0x6b, 0xb0, 0xfb, 0x02, 0x10, - 0x0d, 0x07, 0x20, 0xd4, 0x33, 0x62, 0xd7, 0xd0, 0x33, 0xca, 0xb0, 0xe8, 0x7a, 0x07, 0xa6, 0x41, - 0x08, 0xd6, 0x15, 0x35, 0xb8, 0x25, 0xcc, 0x0e, 0xb4, 0xcb, 0x66, 0x70, 0xb5, 0xcb, 0x7d, 0x93, - 0xba, 0x90, 0x2a, 0x12, 0xf4, 0x99, 0xc0, 0x0f, 0xe1, 0xe4, 0x60, 0xa4, 0xf6, 0x79, 0xa1, 0xb9, - 0x0f, 0xb7, 0xc3, 0x77, 0x4f, 0xc1, 0xe6, 0x04, 0xdd, 0x7c, 0xb3, 0xdf, 0x03, 0x81, 0x4c, 0x13, - 0x12, 0x2e, 0x51, 0x89, 0xe7, 0xd2, 0xcb, 0xb3, 0xe5, 0x09, 0x6e, 0x4b, 0xfb, 0xe3, 0x54, 0x90, - 0x29, 0x86, 0xc4, 0xb1, 0x7c, 0x54, 0x07, 0xbb, 0x5e, 0x87, 0x5d, 0x7b, 0x4d, 0x8d, 0x2a, 0x51, - 0x0c, 0x89, 0x63, 0x21, 0x19, 0xc0, 0x6f, 0x75, 0x8a, 0xaf, 0x24, 0xb8, 0xde, 0x2a, 0x8c, 0x3f, - 0x5b, 0xa9, 0x9d, 0x4e, 0x90, 0x77, 0x0b, 0x3e, 0x8e, 0x6f, 0x33, 0x46, 0x1b, 0x90, 0x24, 0x86, - 0x89, 0xfd, 0x41, 0x06, 0xc6, 0x8c, 0x4c, 0x20, 0x80, 0x4c, 0xb8, 0x81, 0x8f, 0xb1, 0xe6, 0x11, - 0xdb, 0x51, 0x38, 0xdf, 0x14, 0xe5, 0x5b, 0x99, 0x8e, 0x6f, 0x95, 0x83, 0x71, 0xde, 0xcb, 0x38, - 0xf4, 0x2c, 0xfe, 0x4b, 0x80, 0x04, 0x73, 0x34, 0xfa, 0x0a, 0xac, 0xec, 0x49, 0x8d, 0xbd, 0x86, - 0x5c, 0xdc, 0x51, 0xe4, 0x66, 0xb1, 0xd9, 0x92, 0x95, 0x5a, 0x7d, 0xbf, 0xb8, 0x53, 0xab, 0xa4, - 0x23, 0xd9, 0xd5, 0xd3, 0xb3, 0xfc, 0xed, 0x00, 0x98, 0x09, 0xd4, 0xac, 0x23, 0xb5, 0x63, 0xe8, - 0x68, 0x03, 0x56, 0x2f, 0xcb, 0xc9, 0xad, 0xd2, 0x6e, 0xad, 0xd9, 0xac, 0x56, 0xd2, 0x42, 0xf6, - 0xd3, 0xa7, 0x67, 0xf9, 0x95, 0xb0, 0xa4, 0x1c, 0x64, 0x21, 0xfa, 0x32, 0xbc, 0x72, 0x59, 0xb6, - 0xbc, 0xd3, 0x90, 0xab, 0x95, 0x74, 0x34, 0x9b, 0x39, 0x3d, 0xcb, 0xdf, 0x0a, 0x0b, 0x96, 0x3b, - 0xb6, 0x8b, 0xf5, 0x61, 0x96, 0x16, 0x4b, 0x0d, 0xc9, 0xd7, 0x17, 0x1b, 0x66, 0x69, 0xf1, 0xc0, - 0x76, 0x08, 0xd6, 0xb3, 0xf1, 0xc7, 0xef, 0xad, 0x45, 0xc4, 0xff, 0x0a, 0x90, 0x60, 0xec, 0x43, - 0x40, 0x52, 0x55, 0x6e, 0xed, 0x34, 0x47, 0x51, 0x66, 0x02, 0xc3, 0x28, 0x73, 0xb9, 0x56, 0xbd, - 0x52, 0xdd, 0xac, 0xd5, 0x07, 0x29, 0x33, 0xc9, 0x96, 0xa5, 0xe3, 0x77, 0x0c, 0x0b, 0xeb, 0xe8, - 0xab, 0x90, 0xb9, 0x2c, 0x5b, 0x2c, 0x97, 0xab, 0x7b, 0x4d, 0x4a, 0x3a, 0x7b, 0x7a, 0x96, 0x7f, - 0x25, 0x2c, 0x5a, 0xd4, 0x34, 0xdc, 0x25, 0xc3, 0x25, 0xa5, 0xea, 0xb7, 0xaa, 0x65, 0xc6, 0x7b, - 0x88, 0xa4, 0x84, 0x7f, 0x80, 0xb5, 0x1e, 0xf1, 0xdf, 0x46, 0x61, 0x39, 0x9c, 0x0e, 0x68, 0x0b, - 0xf2, 0x17, 0x90, 0xd5, 0x6f, 0x57, 0xcb, 0xad, 0x66, 0x43, 0x1a, 0xf4, 0xc4, 0x6b, 0xa7, 0x67, - 0xf9, 0x57, 0x03, 0xe8, 0x30, 0x42, 0xe0, 0x91, 0xcd, 0x2b, 0x80, 0xea, 0x8d, 0xa6, 0x22, 0xb5, - 0xea, 0x69, 0x21, 0x9b, 0x3f, 0x3d, 0xcb, 0xdf, 0x19, 0x0e, 0x54, 0xb7, 0x89, 0xe4, 0x59, 0x57, - 0x1a, 0x24, 0xb7, 0xca, 0xe5, 0xaa, 0x2c, 0xa7, 0xa3, 0x57, 0x19, 0x24, 0x7b, 0x9a, 0x86, 0x5d, - 0xf7, 0x4a, 0xa0, 0xcd, 0x62, 0x6d, 0xa7, 0x25, 0x55, 0xd3, 0xb1, 0xab, 0x80, 0x36, 0x55, 0xa3, - 0xe3, 0x39, 0x98, 0xfb, 0xee, 0xfd, 0x28, 0xcc, 0xd1, 0xaf, 0x1d, 0x3d, 0x80, 0x85, 0x13, 0xec, - 0x2a, 0xbd, 0xd6, 0x31, 0xf9, 0xb4, 0x32, 0x7f, 0x82, 0xdd, 0x32, 0xed, 0x19, 0x35, 0x98, 0xb7, - 0x6c, 0xa5, 0x77, 0xb8, 0x9c, 0x1c, 0x2b, 0x69, 0xd9, 0x0c, 0x4a, 0x86, 0x25, 0xf5, 0xc0, 0x25, - 0xaa, 0x61, 0x71, 0xbc, 0xe9, 0x26, 0xa9, 0x45, 0x0e, 0xc2, 0x40, 0x77, 0x01, 0x8e, 0x30, 0x09, - 0x2c, 0x8c, 0x4f, 0x77, 0xc0, 0xf3, 0x11, 0x28, 0x9c, 0xf8, 0x5e, 0x14, 0xe2, 0x13, 0x1f, 0x67, - 0xb6, 0x60, 0x8e, 0x9e, 0x46, 0x66, 0x18, 0xb4, 0xa9, 0xfc, 0x0b, 0x38, 0xcc, 0x0c, 0x34, 0xe6, - 0xb9, 0x29, 0x1a, 0xb3, 0xa8, 0x40, 0x62, 0x4f, 0x75, 0x54, 0xd3, 0x45, 0x0f, 0x00, 0x99, 0xea, - 0x71, 0xf0, 0x7f, 0x8f, 0xd2, 0xc1, 0x56, 0x9b, 0x1c, 0x52, 0x87, 0x2d, 0x95, 0x5e, 0xfd, 0xcf, - 0x79, 0x6e, 0xf5, 0x44, 0x35, 0x3b, 0x1b, 0xe2, 0xe0, 0x1e, 0x51, 0x4a, 0x9b, 0xea, 0x31, 0xbf, - 0x10, 0xd9, 0xa1, 0xaf, 0x36, 0xe6, 0x7f, 0xf5, 0x24, 0x17, 0xf9, 0xc7, 0x93, 0x9c, 0x20, 0xb6, - 0x61, 0x71, 0x0b, 0x5b, 0xd8, 0x35, 0x5c, 0xd6, 0xaf, 0x76, 0x03, 0x85, 0x7c, 0xd8, 0x1b, 0xdf, - 0x31, 0x4c, 0x2c, 0x38, 0x8d, 0xb3, 0xa7, 0x9e, 0xa2, 0xbb, 0x5f, 0x87, 0x04, 0x73, 0x1d, 0x4a, - 0x41, 0xb2, 0x55, 0x7f, 0x50, 0x6f, 0xbc, 0x5d, 0x4f, 0x47, 0x50, 0x02, 0xa2, 0xf5, 0x46, 0x5a, - 0x40, 0x49, 0x88, 0x7d, 0xa7, 0x2a, 0xa7, 0xa3, 0xfe, 0x6a, 0xb1, 0x24, 0x37, 0x8b, 0xb5, 0x7a, - 0x3a, 0x86, 0xe6, 0x21, 0xbe, 0x5f, 0x6d, 0x36, 0xd2, 0xf1, 0x52, 0xf9, 0x83, 0xa7, 0x6b, 0xc2, - 0x87, 0x4f, 0xd7, 0x84, 0xbf, 0x3d, 0x5d, 0x13, 0x7e, 0xfe, 0x6c, 0x2d, 0xf2, 0xe1, 0xb3, 0xb5, - 0xc8, 0x9f, 0x9e, 0xad, 0x45, 0xbe, 0xfb, 0xf9, 0xc1, 0x04, 0xe0, 0xb6, 0xae, 0x5f, 0xd8, 0xba, - 0x4e, 0x6d, 0x3d, 0x48, 0x50, 0xa7, 0x7f, 0xe9, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x09, 0x67, - 0x14, 0x97, 0x64, 0x1f, 0x00, 0x00, -} + // 1650 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x23, 0x49, + 0x15, 0x4e, 0xdb, 0x8e, 0x9d, 0x3c, 0x27, 0x59, 0xab, 0x76, 0x66, 0xc7, 0x31, 0xbb, 0xb1, 0xd7, + 0x2b, 0x41, 0x58, 0x34, 0x8e, 0x76, 0x40, 0x08, 0x22, 0x38, 0xb4, 0x7f, 0x24, 0x32, 0x93, 0xd8, + 0xa1, 0xdb, 0xce, 0x02, 0x42, 0x6a, 0x75, 0xba, 0x6b, 0x9d, 0x06, 0x77, 0x97, 0xd5, 0x55, 0x9d, + 0x19, 0xdf, 0xe0, 0xb6, 0x8a, 0x84, 0xc4, 0x91, 0x4b, 0xa4, 0x95, 0xf6, 0x5f, 0x00, 0x24, 0xce, + 0xcb, 0x61, 0xc5, 0x69, 0x80, 0x0b, 0x20, 0x11, 0xc1, 0x0c, 0x07, 0x24, 0x2e, 0x88, 0x03, 0x87, + 0x39, 0x21, 0x57, 0x55, 0xdb, 0xee, 0xd8, 0xb1, 0x12, 0x3b, 0x33, 0xe2, 0x96, 0x4e, 0xd5, 0xf7, + 0xd5, 0xfb, 0xbe, 0x57, 0xf5, 0xea, 0x95, 0x21, 0xcd, 0xfa, 0x3d, 0x4c, 0x4b, 0x3d, 0x9f, 0x30, + 0x82, 0xbe, 0x64, 0x11, 0xea, 0x12, 0x6a, 0xb8, 0xc4, 0x0e, 0xba, 0x98, 0x96, 0x1c, 0xcf, 0x0a, + 0x4e, 0x4c, 0x46, 0xfc, 0x52, 0xc7, 0x27, 0x41, 0xaf, 0x74, 0xf6, 0x81, 0x61, 0x76, 0x7b, 0xa7, + 0x66, 0xee, 0x5e, 0x87, 0x74, 0x08, 0xc7, 0xec, 0x0c, 0xfe, 0x12, 0xf0, 0xdc, 0x56, 0x87, 0x90, + 0x4e, 0x17, 0xef, 0xf0, 0xaf, 0x93, 0xe0, 0xa3, 0x1d, 0x3b, 0xf0, 0x4d, 0xe6, 0x10, 0x4f, 0x8e, + 0xe7, 0xaf, 0x8e, 0x33, 0xc7, 0xc5, 0x94, 0x99, 0x6e, 0x4f, 0x4e, 0xf8, 0x0a, 0x3b, 0x75, 0x7c, + 0xdb, 0xe8, 0x99, 0x3e, 0xeb, 0x8b, 0x59, 0x3b, 0x22, 0xa2, 0x87, 0xe3, 0x1f, 0x72, 0xf2, 0xe6, + 0x55, 0x36, 0xd3, 0xeb, 0x8b, 0xa1, 0xe2, 0x6f, 0x15, 0xd8, 0x38, 0xa4, 0x9d, 0x8a, 0x8f, 0x4d, + 0x86, 0xf7, 0x07, 0xa1, 0xa3, 0x7d, 0x58, 0x36, 0x6d, 0xd7, 0xf1, 0xb2, 0x4a, 0x41, 0xd9, 0x5e, + 0x2b, 0x7f, 0xf0, 0xf2, 0x32, 0xff, 0xb0, 0xe3, 0xb0, 0xd3, 0xe0, 0xa4, 0x64, 0x11, 0x57, 0x32, + 0x87, 0xab, 0x51, 0xfb, 0xc7, 0x3b, 0xc2, 0x17, 0xd5, 0xb2, 0x54, 0xdb, 0xf6, 0x31, 0xa5, 0x9a, + 0xc0, 0xa3, 0x26, 0xa4, 0x5c, 0xec, 0x9e, 0x60, 0x9f, 0x66, 0x63, 0x85, 0xf8, 0x76, 0xfa, 0xd1, + 0x4e, 0xe9, 0x86, 0xae, 0x95, 0x0e, 0x39, 0xae, 0x9c, 0xf8, 0xfc, 0x32, 0xbf, 0xa4, 0x85, 0x2c, + 0x28, 0x0b, 0x29, 0x8b, 0xb8, 0x2e, 0xf6, 0x58, 0x36, 0x5e, 0x50, 0xb6, 0x57, 0xb5, 0xf0, 0xb3, + 0xf8, 0x77, 0x05, 0xee, 0x1f, 0xd2, 0x4e, 0xbb, 0x67, 0x87, 0x32, 0x0e, 0x25, 0xe6, 0xce, 0xd4, + 0xbc, 0x0b, 0xcb, 0x3c, 0xc8, 0x6c, 0xac, 0xa0, 0x6c, 0x27, 0xca, 0xe9, 0x97, 0x97, 0xf9, 0x14, + 0x5f, 0xa9, 0x5e, 0xd5, 0xc4, 0x08, 0xfa, 0x21, 0x6c, 0x88, 0x50, 0x8d, 0x80, 0x07, 0x42, 0xb3, + 0xf1, 0x45, 0x74, 0xaf, 0x0b, 0x32, 0x21, 0x8a, 0x16, 0x7f, 0xaf, 0xc0, 0x9b, 0x51, 0x8d, 0x2a, + 0x0f, 0xec, 0x75, 0x2a, 0x6c, 0xc0, 0xaa, 0x87, 0x9f, 0x18, 0x62, 0xbd, 0xf8, 0xbc, 0xeb, 0xad, + 0x78, 0xf8, 0x09, 0x8f, 0xbd, 0x78, 0x31, 0x91, 0xb7, 0x8a, 0xc8, 0xe8, 0x6b, 0x55, 0x75, 0xfd, + 0xbe, 0xfa, 0x95, 0x02, 0x49, 0x91, 0x13, 0xf4, 0x18, 0x52, 0xa6, 0x60, 0x9e, 0x3f, 0xa4, 0x90, + 0x01, 0x55, 0x61, 0xb9, 0x47, 0x9e, 0x60, 0x9f, 0x07, 0xb5, 0x5a, 0x2e, 0x0d, 0xf2, 0xfd, 0x97, + 0xcb, 0xfc, 0x17, 0x6f, 0x40, 0x57, 0xc5, 0x96, 0x26, 0xc0, 0x33, 0xe2, 0xfe, 0xaf, 0xf0, 0x75, + 0xec, 0x58, 0xab, 0x96, 0x45, 0x82, 0xff, 0x17, 0x5f, 0xd1, 0x77, 0xe1, 0x0d, 0x1b, 0x5b, 0x0e, + 0x75, 0x88, 0x67, 0xf4, 0x48, 0xd7, 0xb1, 0xfa, 0xd9, 0x44, 0x41, 0xd9, 0x4e, 0x3f, 0xba, 0x57, + 0x12, 0xb5, 0xaa, 0x14, 0xd6, 0xaa, 0x92, 0xea, 0xf5, 0xcb, 0xe8, 0x77, 0xbf, 0x7c, 0xb8, 0x51, + 0x95, 0x80, 0x23, 0x3e, 0x5f, 0xdb, 0xb0, 0x23, 0xdf, 0xbb, 0x89, 0x8f, 0x3f, 0xc9, 0x2f, 0x15, + 0x7f, 0x16, 0x83, 0xdc, 0x95, 0x43, 0x22, 0x84, 0xdf, 0xf1, 0x59, 0x39, 0x86, 0x75, 0xae, 0xd1, + 0x30, 0x05, 0x3d, 0x77, 0x61, 0x2e, 0xc2, 0xb5, 0xce, 0x78, 0x7a, 0xee, 0xfa, 0x80, 0xfd, 0x43, + 0x81, 0xf7, 0xa6, 0xfa, 0x11, 0x75, 0xf3, 0xb5, 0x6e, 0x8b, 0x29, 0xc9, 0x8f, 0x2f, 0x96, 0xfc, + 0xe2, 0x9f, 0x15, 0x78, 0x7b, 0xaa, 0xcc, 0x3b, 0x2f, 0x27, 0xaf, 0x2a, 0xf1, 0xd7, 0x9f, 0xe5, + 0x5f, 0x2b, 0xf0, 0xa0, 0x75, 0xea, 0x63, 0x7a, 0x4a, 0xba, 0xf6, 0x95, 0xb4, 0x1d, 0xc0, 0x2a, + 0x0b, 0x87, 0xb8, 0xb4, 0xdb, 0xd7, 0x92, 0x11, 0x01, 0xfa, 0x26, 0xa4, 0x06, 0x7d, 0x06, 0x09, + 0x84, 0xaa, 0xf4, 0xa3, 0xcd, 0x89, 0x84, 0x54, 0x65, 0x9f, 0x12, 0x5e, 0xcd, 0x72, 0xfe, 0x2e, + 0xfa, 0xc3, 0x44, 0x92, 0x8a, 0x7f, 0x14, 0xbd, 0xc5, 0x91, 0x4f, 0x7a, 0x84, 0xe2, 0xb2, 0x49, + 0xf1, 0xa4, 0x7b, 0xca, 0xdd, 0xb8, 0xd7, 0x84, 0xd5, 0x9e, 0x58, 0x46, 0x36, 0x1b, 0x73, 0x71, + 0x8e, 0x38, 0x66, 0xa4, 0xe3, 0x85, 0x02, 0xa9, 0x43, 0xda, 0x39, 0x26, 0x0c, 0xa3, 0xf7, 0x61, + 0x45, 0x40, 0xcc, 0x2e, 0x57, 0x92, 0x28, 0x6f, 0xbc, 0xbc, 0xcc, 0xc3, 0x91, 0xfc, 0x5f, 0xbd, + 0xaa, 0x0d, 0xc7, 0x51, 0x1d, 0x92, 0x67, 0x84, 0x2d, 0x14, 0x9f, 0x24, 0x40, 0xfb, 0x90, 0xb4, + 0x4e, 0x89, 0x63, 0x61, 0x1e, 0xdb, 0xc6, 0x2d, 0xfa, 0x8b, 0x0a, 0x87, 0x69, 0x12, 0x3e, 0xae, + 0x32, 0x11, 0x55, 0xf9, 0x13, 0xa1, 0xb2, 0xf6, 0x14, 0x5b, 0xb7, 0x55, 0x49, 0x9d, 0x8e, 0x27, + 0x6f, 0xb6, 0xf9, 0x54, 0x0a, 0x82, 0xe2, 0x4f, 0x63, 0xb0, 0x2e, 0x5b, 0x39, 0x66, 0xda, 0x26, + 0x33, 0x47, 0xb5, 0x45, 0xb9, 0xb6, 0xb6, 0x0c, 0xcf, 0x79, 0x6c, 0xc1, 0x73, 0x7e, 0xfd, 0xdd, + 0x95, 0x85, 0xd4, 0x19, 0xf6, 0x07, 0xfb, 0x9c, 0x9b, 0x96, 0xd0, 0xc2, 0x4f, 0x74, 0x04, 0x69, + 0x46, 0x98, 0xd9, 0xfd, 0x10, 0x3b, 0x9d, 0x53, 0x96, 0x5d, 0x9e, 0xeb, 0x3c, 0x8e, 0x53, 0x14, + 0xff, 0xaa, 0x40, 0x7a, 0xac, 0x9d, 0xbd, 0x89, 0x03, 0x75, 0x48, 0x8a, 0xbe, 0x71, 0x81, 0x0c, + 0x08, 0x02, 0xb4, 0x07, 0xc9, 0x27, 0x42, 0x4a, 0x7c, 0x2e, 0x29, 0x12, 0x3d, 0x63, 0x9b, 0xfd, + 0x2b, 0x06, 0xf7, 0xc6, 0xcb, 0xf5, 0x30, 0xd5, 0xaf, 0xaa, 0x50, 0xdc, 0xe0, 0x7a, 0x1a, 0x6e, + 0xa1, 0xf8, 0xdd, 0x6d, 0xa1, 0xc4, 0xb5, 0x5b, 0x68, 0x39, 0xba, 0x85, 0xa6, 0xdc, 0x8d, 0xc9, + 0x05, 0x1b, 0xa3, 0x95, 0x41, 0x63, 0xf4, 0xcf, 0x4f, 0xf2, 0x4a, 0xf1, 0xb3, 0x35, 0x58, 0x0b, + 0x4f, 0xed, 0x2b, 0x2d, 0xc7, 0x63, 0xca, 0x63, 0x51, 0xe5, 0x91, 0x42, 0x1d, 0xbf, 0x83, 0x42, + 0x5d, 0x81, 0x35, 0x1a, 0x9c, 0xb8, 0x0e, 0x63, 0xd8, 0x36, 0x4c, 0x26, 0xdb, 0xc8, 0xdc, 0x84, + 0x5b, 0xad, 0xf0, 0x01, 0x2d, 0x6f, 0xae, 0xf4, 0x10, 0xa5, 0x32, 0xf4, 0x5e, 0xe8, 0x43, 0x34, + 0x2b, 0x42, 0xd4, 0xb1, 0x4c, 0xcd, 0x23, 0xb8, 0x1f, 0x31, 0x6b, 0x38, 0x39, 0xc9, 0x27, 0xbf, + 0x39, 0xee, 0x40, 0x88, 0x69, 0x41, 0x92, 0x32, 0x93, 0x05, 0x34, 0x9b, 0xe2, 0x95, 0xfa, 0x5b, + 0x37, 0xae, 0xd4, 0xe3, 0x79, 0x2a, 0xe9, 0x9c, 0x43, 0x93, 0x5c, 0x03, 0x56, 0x1f, 0xd3, 0xa0, + 0xcb, 0xb2, 0x2b, 0x8b, 0xb0, 0x6a, 0x9c, 0x43, 0x93, 0x5c, 0x48, 0x07, 0x18, 0xdc, 0x2f, 0xc6, + 0x60, 0x11, 0x9c, 0x5d, 0xe5, 0x3e, 0x96, 0x6e, 0xcc, 0xdc, 0x32, 0xbb, 0xdd, 0xbe, 0xf4, 0x76, + 0x75, 0xc0, 0x33, 0x88, 0x19, 0xa3, 0xdd, 0x51, 0x4b, 0x01, 0x37, 0xcc, 0x4c, 0x08, 0x40, 0x2e, + 0xbc, 0x81, 0x9f, 0x62, 0x2b, 0x60, 0xc4, 0x37, 0xa4, 0xde, 0x34, 0xd7, 0x5b, 0x9d, 0x4f, 0x6f, + 0x4d, 0x92, 0x49, 0xdd, 0x1b, 0x38, 0xf2, 0x5d, 0xfc, 0xb7, 0x02, 0x49, 0x61, 0x34, 0xfa, 0x3a, + 0x3c, 0x38, 0xd2, 0x9a, 0x47, 0x4d, 0x5d, 0x3d, 0x30, 0xf4, 0x96, 0xda, 0x6a, 0xeb, 0x46, 0xbd, + 0x71, 0xac, 0x1e, 0xd4, 0xab, 0x99, 0xa5, 0xdc, 0xe6, 0xf9, 0x45, 0xe1, 0x7e, 0x48, 0x2c, 0x00, + 0x75, 0xef, 0xcc, 0xec, 0x3a, 0x36, 0xda, 0x85, 0xcd, 0xab, 0x38, 0xbd, 0x5d, 0x3e, 0xac, 0xb7, + 0x5a, 0xb5, 0x6a, 0x46, 0xc9, 0x7d, 0xe1, 0xfc, 0xa2, 0xf0, 0x20, 0x8a, 0xd4, 0xc3, 0x5d, 0x88, + 0xbe, 0x06, 0x6f, 0x5d, 0xc5, 0x56, 0x0e, 0x9a, 0x7a, 0xad, 0x9a, 0x89, 0xe5, 0xb2, 0xe7, 0x17, + 0x85, 0x7b, 0x51, 0x60, 0xa5, 0x4b, 0x28, 0xb6, 0xa7, 0x45, 0xaa, 0x96, 0x9b, 0xda, 0x60, 0xbd, + 0xf8, 0xb4, 0x48, 0xd5, 0x13, 0xe2, 0x33, 0x6c, 0xe7, 0x12, 0x1f, 0x7f, 0xba, 0xb5, 0x34, 0x78, + 0x26, 0x26, 0x85, 0xfa, 0x08, 0x91, 0x56, 0xd3, 0xdb, 0x07, 0xad, 0xeb, 0x24, 0x0b, 0xc0, 0x34, + 0xc9, 0x12, 0xd7, 0x6e, 0x54, 0x6b, 0x7b, 0xf5, 0xc6, 0xa4, 0x64, 0x81, 0x6c, 0x7b, 0x36, 0xfe, + 0xc8, 0xf1, 0xb0, 0x8d, 0xbe, 0x01, 0xd9, 0xab, 0x58, 0xb5, 0x52, 0xa9, 0x1d, 0xb5, 0xb8, 0xe8, + 0xdc, 0xf9, 0x45, 0xe1, 0xad, 0x28, 0x54, 0xb5, 0x2c, 0xdc, 0x63, 0xd3, 0x91, 0x5a, 0xed, 0x3b, + 0xb5, 0x8a, 0xd0, 0x3d, 0x05, 0xa9, 0xe1, 0x1f, 0x61, 0x6b, 0x24, 0xfc, 0x37, 0x31, 0xd8, 0x88, + 0x6e, 0x07, 0xb4, 0x0f, 0x85, 0x21, 0x65, 0xed, 0x7b, 0xb5, 0x4a, 0xbb, 0xd5, 0xd4, 0x26, 0x9d, + 0x78, 0xf7, 0xfc, 0xa2, 0xf0, 0x4e, 0x48, 0x1d, 0x65, 0x08, 0x1d, 0xd9, 0x9b, 0x41, 0xd4, 0x68, + 0xb6, 0x0c, 0xad, 0xdd, 0xc8, 0x28, 0xb9, 0xc2, 0xf9, 0x45, 0xe1, 0xed, 0xe9, 0x44, 0x0d, 0xc2, + 0xb4, 0xc0, 0x9b, 0x19, 0x90, 0xde, 0xae, 0x54, 0x6a, 0xba, 0x9e, 0x89, 0xcd, 0x0a, 0x48, 0x0f, + 0x2c, 0x0b, 0x53, 0x3a, 0x93, 0x68, 0x4f, 0xad, 0x1f, 0xb4, 0xb5, 0x5a, 0x26, 0x3e, 0x8b, 0x68, + 0xcf, 0x74, 0xba, 0x81, 0x8f, 0xa5, 0x77, 0x9f, 0xc5, 0x60, 0x99, 0x9f, 0x76, 0xf4, 0x18, 0x56, + 0xfb, 0x98, 0x1a, 0xa3, 0xab, 0xe3, 0xf6, 0x2d, 0xc2, 0x4a, 0x1f, 0xd3, 0x0a, 0xbf, 0x33, 0xea, + 0xb0, 0xe2, 0x11, 0x63, 0xf4, 0xa6, 0xba, 0x3d, 0x57, 0xca, 0x23, 0x82, 0x4a, 0x87, 0x75, 0xf3, + 0x84, 0x32, 0xd3, 0xf1, 0x24, 0xdf, 0x7c, 0xed, 0xcb, 0x9a, 0x24, 0x11, 0xa4, 0x87, 0x00, 0x67, + 0x98, 0x85, 0x11, 0x26, 0xe6, 0x7b, 0x6b, 0x0d, 0x18, 0x38, 0x5d, 0xf1, 0xd3, 0x18, 0x24, 0x6e, + 0xfd, 0x86, 0xd8, 0x87, 0x65, 0xfe, 0x04, 0x58, 0xa0, 0xbb, 0xe5, 0xf8, 0xd7, 0xf0, 0x82, 0x98, + 0xb8, 0x98, 0x97, 0xe7, 0xb8, 0x98, 0x8b, 0x06, 0x24, 0x8f, 0x4c, 0xdf, 0x74, 0x29, 0x7a, 0x0c, + 0xc8, 0x35, 0x9f, 0x1a, 0x92, 0xdd, 0xe8, 0x62, 0xaf, 0xc3, 0x4e, 0xb9, 0x61, 0xeb, 0xe5, 0x77, + 0xfe, 0x73, 0x99, 0xdf, 0xec, 0x9b, 0x6e, 0x77, 0xb7, 0x38, 0x39, 0xa7, 0xa8, 0x65, 0x5c, 0xf3, + 0xa9, 0xfc, 0x1d, 0xe0, 0x80, 0xff, 0x6b, 0x77, 0xe5, 0x17, 0x61, 0x4b, 0xd4, 0x81, 0xb5, 0x7d, + 0xec, 0x61, 0xea, 0x50, 0x71, 0x5f, 0x1d, 0x86, 0x0b, 0x72, 0xea, 0xdb, 0xfc, 0x74, 0x2b, 0x60, + 0x52, 0x84, 0x24, 0x19, 0x2d, 0xf4, 0xfe, 0xb7, 0x21, 0x29, 0xac, 0x43, 0x69, 0x48, 0xb5, 0x1b, + 0x8f, 0x1b, 0xcd, 0x0f, 0x1b, 0x99, 0x25, 0x94, 0x84, 0x58, 0xa3, 0x99, 0x51, 0x50, 0x0a, 0xe2, + 0xdf, 0xaf, 0xe9, 0x99, 0xd8, 0x60, 0x54, 0x2d, 0xeb, 0x2d, 0xb5, 0xde, 0xc8, 0xc4, 0xd1, 0x0a, + 0x24, 0x8e, 0x6b, 0xad, 0x66, 0x26, 0x51, 0xae, 0x7c, 0xfe, 0x7c, 0x4b, 0x79, 0xf6, 0x7c, 0x4b, + 0xf9, 0xdb, 0xf3, 0x2d, 0xe5, 0xe7, 0x2f, 0xb6, 0x96, 0x9e, 0xbd, 0xd8, 0x5a, 0xfa, 0xd3, 0x8b, + 0xad, 0xa5, 0x1f, 0x7c, 0x79, 0x72, 0x03, 0xc8, 0x58, 0x77, 0x86, 0xb1, 0xee, 0xf0, 0x58, 0x4f, + 0x92, 0xdc, 0xf4, 0xaf, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xf2, 0x37, 0x56, 0x40, 0xca, 0x18, + 0x00, 0x00, +} + +func (this *GroupAccountMetadata) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + that1, ok := that.(*GroupAccountMetadata) + if !ok { + that2, ok := that.(GroupAccountMetadata) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.GroupAccount, that1.GroupAccount) { + return false + } + if this.Group != that1.Group { + return false + } + if !bytes.Equal(this.Admin, that1.Admin) { + return false + } + if this.Comment != that1.Comment { + return false + } + if this.Version != that1.Version { + return false + } + if !this.DecisionPolicy.Equal(that1.DecisionPolicy) { + return false + } + return true +} func (this *Params) Equal(that interface{}) bool { if that == nil { return this == nil @@ -2123,27 +1675,7 @@ func (this *GenesisState) Equal(that interface{}) bool { } return true } -func (this *StdDecisionPolicy) GetDecisionPolicy() DecisionPolicy { - if x := this.GetThreshold(); x != nil { - return x - } - return nil -} - -func (this *StdDecisionPolicy) SetDecisionPolicy(value DecisionPolicy) error { - if value == nil { - this.Sum = nil - return nil - } - switch vt := value.(type) { - case *ThresholdDecisionPolicy: - this.Sum = &StdDecisionPolicy_Threshold{vt} - return nil - } - return fmt.Errorf("can't encode value of type %T as message StdDecisionPolicy", value) -} - -func (m *Msg) Marshal() (dAtA []byte, err error) { +func (m *MsgCreateGroup) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2153,239 +1685,228 @@ func (m *Msg) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Msg) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgCreateGroup) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Msg) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgCreateGroup) 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 + 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 *Msg_CreateGroup) MarshalTo(dAtA []byte) (int, error) { +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 *Msg_CreateGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupMembers) 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 + 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 -= 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 *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 +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 len(dAtA) - i, nil + return dAtA[:n], nil } -func (m *Msg_UpdateGroupAdmin) MarshalTo(dAtA []byte) (int, error) { + +func (m *MsgUpdateGroupAdmin) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Msg_UpdateGroupAdmin) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupAdmin) 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 + 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 *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 +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 len(dAtA) - i, nil + return dAtA[:n], nil } -func (m *Msg_CreateGroupAccount) MarshalTo(dAtA []byte) (int, error) { + +func (m *MsgUpdateGroupComment) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Msg_CreateGroupAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupComment) 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 + 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] = 0x2a + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *Msg_UpdateGroupAccountAdmin) MarshalTo(dAtA []byte) (int, error) { + +func (m *Member) Marshal() (dAtA []byte, err error) { size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -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) { +func (m *Member) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Msg_UpdateGroupAccountDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Member) 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 + 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] = 0x3a + dAtA[i] = 0x1a } - 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)) + { + size := m.Power.Size() + i -= size + if _, err := m.Power.MarshalTo(dAtA[i:]); err != nil { + return 0, err } - i-- - dAtA[i] = 0x42 + i = encodeVarintTypes(dAtA, i, uint64(size)) } - 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] = 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] = 0x4a + dAtA[i] = 0xa } 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) { +func (m *MsgCreateGroupAccount) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2395,16 +1916,28 @@ func (m *MsgCreateGroup) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgCreateGroup) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgCreateGroupAccount) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgCreateGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgCreateGroupAccount) 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] = 0x22 + } if len(m.Comment) > 0 { i -= len(m.Comment) copy(dAtA[i:], m.Comment) @@ -2412,19 +1945,10 @@ func (m *MsgCreateGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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 m.Group != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Group)) + i-- + dAtA[i] = 0x10 } if len(m.Admin) > 0 { i -= len(m.Admin) @@ -2436,7 +1960,7 @@ func (m *MsgCreateGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgUpdateGroupMembers) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateGroupAccountAdmin) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2446,34 +1970,29 @@ func (m *MsgUpdateGroupMembers) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateGroupMembers) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupAccountAdmin) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateGroupMembers) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupAccountAdmin) 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 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)) + 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] = 0x10 + dAtA[i] = 0x12 } if len(m.Admin) > 0 { i -= len(m.Admin) @@ -2485,7 +2004,7 @@ func (m *MsgUpdateGroupMembers) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgUpdateGroupAdmin) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateGroupAccountDecisionPolicy) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2495,20 +2014,25 @@ func (m *MsgUpdateGroupAdmin) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateGroupAdmin) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupAccountDecisionPolicy) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateGroupAdmin) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupAccountDecisionPolicy) 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))) + 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 } @@ -2527,7 +2051,7 @@ func (m *MsgUpdateGroupAdmin) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgUpdateGroupComment) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateGroupAccountComment) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2537,12 +2061,12 @@ func (m *MsgUpdateGroupComment) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateGroupComment) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupAccountComment) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateGroupComment) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateGroupAccountComment) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2554,10 +2078,12 @@ func (m *MsgUpdateGroupComment) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if m.Group != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Group)) + 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] = 0x10 + dAtA[i] = 0x12 } if len(m.Admin) > 0 { i -= len(m.Admin) @@ -2569,7 +2095,7 @@ func (m *MsgUpdateGroupComment) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Member) Marshal() (dAtA []byte, err error) { +func (m *ThresholdDecisionPolicy) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2579,44 +2105,40 @@ func (m *Member) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Member) MarshalTo(dAtA []byte) (int, error) { +func (m *ThresholdDecisionPolicy) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Member) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ThresholdDecisionPolicy) 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 { + size, err := m.Timeout.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { return 0, err } + i -= size 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 + { + 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 *MsgCreateGroupAccountBase) Marshal() (dAtA []byte, err error) { +func (m *MsgProposeBase) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2626,12 +2148,12 @@ func (m *MsgCreateGroupAccountBase) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgCreateGroupAccountBase) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgProposeBase) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgCreateGroupAccountBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgProposeBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2643,22 +2165,26 @@ func (m *MsgCreateGroupAccountBase) MarshalToSizedBuffer(dAtA []byte) (int, erro i-- dAtA[i] = 0x1a } - if m.Group != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Group)) - i-- - dAtA[i] = 0x10 + 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.Admin) > 0 { - i -= len(m.Admin) - copy(dAtA[i:], m.Admin) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + 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 *MsgCreateGroupAccountStd) Marshal() (dAtA []byte, err error) { +func (m *MsgVote) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2668,40 +2194,46 @@ func (m *MsgCreateGroupAccountStd) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgCreateGroupAccountStd) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgVote) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgCreateGroupAccountStd) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - 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 - { - size, err := m.Base.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + 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 } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *MsgUpdateGroupAccountAdmin) Marshal() (dAtA []byte, err error) { +func (m *MsgExec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2711,41 +2243,32 @@ func (m *MsgUpdateGroupAccountAdmin) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateGroupAccountAdmin) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgExec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateGroupAccountAdmin) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgExec) 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.GroupAccount) > 0 { - i -= len(m.GroupAccount) - copy(dAtA[i:], m.GroupAccount) - i = encodeVarintTypes(dAtA, i, uint64(len(m.GroupAccount))) + 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 len(m.Admin) > 0 { - i -= len(m.Admin) - copy(dAtA[i:], m.Admin) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + if m.Proposal != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Proposal)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *MsgUpdateGroupAccountBase) Marshal() (dAtA []byte, err error) { +func (m *GroupMetadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2755,32 +2278,54 @@ func (m *MsgUpdateGroupAccountBase) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateGroupAccountBase) MarshalTo(dAtA []byte) (int, error) { +func (m *GroupMetadata) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateGroupAccountBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GroupMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Group != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Group)) + { + size := m.TotalWeight.Size() + i -= size + if _, err := m.TotalWeight.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.Version != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Version)) i-- - dAtA[i] = 0x10 + 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] = 0xa + 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 *MsgUpdateGroupAccountDecisionPolicyStd) Marshal() (dAtA []byte, err error) { +func (m *GroupMember) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2790,40 +2335,49 @@ func (m *MsgUpdateGroupAccountDecisionPolicyStd) Marshal() (dAtA []byte, err err return dAtA[:n], nil } -func (m *MsgUpdateGroupAccountDecisionPolicyStd) MarshalTo(dAtA []byte) (int, error) { +func (m *GroupMember) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateGroupAccountDecisionPolicyStd) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GroupMember) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.DecisionPolicy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + 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 } - i-- - dAtA[i] = 0x12 { - size, err := m.Base.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { + size := m.Weight.Size() + i -= size + if _, err := m.Weight.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + 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 *MsgUpdateGroupAccountComment) Marshal() (dAtA []byte, err error) { +func (m *GroupAccountMetadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2833,41 +2387,63 @@ func (m *MsgUpdateGroupAccountComment) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateGroupAccountComment) MarshalTo(dAtA []byte) (int, error) { +func (m *GroupAccountMetadata) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateGroupAccountComment) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GroupAccountMetadata) 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] = 0x32 + } + if m.Version != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x28 + } 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] = 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) { +func (m *ProposalBase) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2877,50 +2453,98 @@ func (m *StdDecisionPolicy) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StdDecisionPolicy) MarshalTo(dAtA []byte) (int, error) { +func (m *ProposalBase) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *StdDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ProposalBase) 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 - } + if m.ExecutorResult != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ExecutorResult)) + i-- + dAtA[i] = 0x58 + } + { + size, err := m.Timeout.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - 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] = 0x52 + { + size, err := m.VoteState.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + if m.Result != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Result)) + i-- + dAtA[i] = 0x40 + } + if m.Status != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x38 + } + if m.GroupAccountVersion != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.GroupAccountVersion)) + i-- + dAtA[i] = 0x30 + } + if m.GroupVersion != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.GroupVersion)) + i-- + dAtA[i] = 0x28 + } + { + 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 *ThresholdDecisionPolicy) Marshal() (dAtA []byte, err error) { + +func (m *Tally) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2930,30 +2554,50 @@ func (m *ThresholdDecisionPolicy) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ThresholdDecisionPolicy) MarshalTo(dAtA []byte) (int, error) { +func (m *Tally) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ThresholdDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Tally) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.Timout.MarshalToSizedBuffer(dAtA[:i]) - if err != 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 + { + 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 + { + 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 { - size := m.Threshold.Size() + size := m.YesCount.Size() i -= size - if _, err := m.Threshold.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.YesCount.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintTypes(dAtA, i, uint64(size)) @@ -2963,7 +2607,7 @@ func (m *ThresholdDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgProposeBase) Marshal() (dAtA []byte, err error) { +func (m *Vote) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2973,62 +2617,26 @@ func (m *MsgProposeBase) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgProposeBase) MarshalTo(dAtA []byte) (int, error) { +func (m *Vote) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgProposeBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Vote) 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.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 + { + size, err := m.SubmittedAt.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - 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 + i-- + dAtA[i] = 0x2a if len(m.Comment) > 0 { i -= len(m.Comment) copy(dAtA[i:], m.Comment) @@ -3041,14 +2649,12 @@ func (m *MsgVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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 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)) @@ -3058,7 +2664,7 @@ func (m *MsgVote) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgExec) Marshal() (dAtA []byte, err error) { +func (m *Params) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3068,32 +2674,25 @@ func (m *MsgExec) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgExec) MarshalTo(dAtA []byte) (int, error) { +func (m *Params) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgExec) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Params) 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)) + if m.MaxCommentLength != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.MaxCommentLength)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *GroupMetadata) Marshal() (dAtA []byte, err error) { +func (m *GenesisState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3103,1540 +2702,499 @@ func (m *GroupMetadata) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GroupMetadata) MarshalTo(dAtA []byte) (int, error) { +func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GroupMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size := m.TotalWeight.Size() - i -= size - if _, err := m.TotalWeight.MarshalTo(dAtA[i:]); err != nil { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { return 0, err } + i -= size i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a - 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 - } + dAtA[i] = 0xa 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 +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++ } - return dAtA[:n], nil -} - -func (m *GroupMember) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + dAtA[offset] = uint8(v) + return base } - -func (m *GroupMember) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *MsgCreateGroup) Size() (n int) { + if m == nil { + return 0 + } 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 + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - { - size := m.Weight.Size() - i -= size - if _, err := m.Weight.MarshalTo(dAtA[i:]); err != nil { - return 0, err + if len(m.Members) > 0 { + for _, e := range m.Members { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) } - 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 + l = len(m.Comment) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - return len(dAtA) - i, nil + return n } -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 +func (m *MsgUpdateGroupMembers) Size() (n int) { + if m == nil { + return 0 } - 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 m.Version != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x28 + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(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.Group != 0 { + n += 1 + sovTypes(uint64(m.Group)) } - 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 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 { - i = encodeVarintTypes(dAtA, i, uint64(m.Group)) - i-- - dAtA[i] = 0x10 + n += 1 + sovTypes(uint64(m.Group)) } - 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 + l = len(m.NewAdmin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - return len(dAtA) - i, nil + return n } -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 +func (m *MsgUpdateGroupComment) Size() (n int) { + if m == nil { + return 0 } - 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 - { - size, err := m.DecisionPolicy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - i-- - dAtA[i] = 0x12 - { - size, err := m.Base.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + if m.Group != 0 { + n += 1 + sovTypes(uint64(m.Group)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + l = len(m.Comment) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n } -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 +func (m *Member) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + 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 *ProposalBase) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *MsgCreateGroupAccount) 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)) + } + if m.DecisionPolicy != nil { + l = m.DecisionPolicy.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n } -func (m *ProposalBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *MsgUpdateGroupAccountAdmin) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if m.ExecutorResult != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.ExecutorResult)) - i-- - dAtA[i] = 0x58 + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - { - size, err := m.Timeout.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + l = len(m.GroupAccount) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - i-- - dAtA[i] = 0x52 - { - size, err := m.VoteState.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + l = len(m.NewAdmin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - i-- - dAtA[i] = 0x4a - if m.Result != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Result)) - i-- - dAtA[i] = 0x40 + return n +} + +func (m *MsgUpdateGroupAccountDecisionPolicy) Size() (n int) { + if m == nil { + return 0 } - if m.Status != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x38 + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - if m.GroupAccountVersion != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.GroupAccountVersion)) - i-- - dAtA[i] = 0x30 + if m.Group != 0 { + n += 1 + sovTypes(uint64(m.Group)) } - if m.GroupVersion != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.GroupVersion)) - i-- - dAtA[i] = 0x28 + if m.DecisionPolicy != nil { + l = m.DecisionPolicy.Size() + n += 1 + l + sovTypes(uint64(l)) } - { - size, err := m.SubmittedAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + return n +} + +func (m *MsgUpdateGroupAccountComment) Size() (n int) { + if m == nil { + return 0 } - 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 - } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(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] = 0x12 + l = len(m.GroupAccount) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - 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 + l = len(m.Comment) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) } - return len(dAtA) - i, nil + return n } -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 +func (m *ThresholdDecisionPolicy) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + l = m.Threshold.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Timeout.Size() + n += 1 + l + sovTypes(uint64(l)) + return n } -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 - { - 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 - { - 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 - { - 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 - { - 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 - { - 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 (m *GenesisState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - 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) { +func (m *MsgProposeBase) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.CreateGroup != nil { - l = m.CreateGroup.Size() + l = len(m.GroupAccount) + if l > 0 { n += 1 + l + sovTypes(uint64(l)) } - return n -} -func (m *Msg_UpdateGroupMembers) Size() (n int) { - if m == nil { - return 0 + if len(m.Proposers) > 0 { + for _, b := range m.Proposers { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } } - var l int - _ = l - if m.UpdateGroupMembers != nil { - l = m.UpdateGroupMembers.Size() + l = len(m.Comment) + if l > 0 { n += 1 + l + sovTypes(uint64(l)) } return n } -func (m *Msg_UpdateGroupAdmin) Size() (n int) { + +func (m *MsgVote) 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 + if m.Proposal != 0 { + n += 1 + sovTypes(uint64(m.Proposal)) } - var l int - _ = l - if m.UpdateGroupComment != nil { - l = m.UpdateGroupComment.Size() - n += 1 + l + sovTypes(uint64(l)) + if len(m.Voters) > 0 { + for _, b := range m.Voters { + l = len(b) + n += 1 + l + sovTypes(uint64(l)) + } } - return n -} -func (m *Msg_CreateGroupAccount) Size() (n int) { - if m == nil { - return 0 + if m.Choice != 0 { + n += 1 + sovTypes(uint64(m.Choice)) } - var l int - _ = l - if m.CreateGroupAccount != nil { - l = m.CreateGroupAccount.Size() + l = len(m.Comment) + if l > 0 { n += 1 + l + sovTypes(uint64(l)) } return n } -func (m *Msg_UpdateGroupAccountAdmin) Size() (n int) { + +func (m *MsgExec) 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 + if m.Proposal != 0 { + n += 1 + sovTypes(uint64(m.Proposal)) } - var l int - _ = l - if m.UpdateGroupAccountDecisionPolicy != nil { - l = m.UpdateGroupAccountDecisionPolicy.Size() + l = len(m.Signer) + if l > 0 { n += 1 + l + sovTypes(uint64(l)) } return n } -func (m *Msg_UpdateGroupAccountComment) Size() (n int) { + +func (m *GroupMetadata) 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 - l = m.Base.Size() - n += 1 + l + sovTypes(uint64(l)) - 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.GroupAccount) - 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 - l = m.Base.Size() - n += 1 + l + sovTypes(uint64(l)) - 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.GroupAccount) - if l > 0 { + 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 *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 - l = m.Threshold.Size() - n += 1 + l + sovTypes(uint64(l)) - l = m.Timout.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)) - } - 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)) - } - l = m.TotalWeight.Size() - n += 1 + l + sovTypes(uint64(l)) - 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)) - l = len(m.Comment) - if l > 0 { - 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)) - } - if m.Version != 0 { - n += 1 + sovTypes(uint64(m.Version)) - } - return n -} - -func (m *StdGroupAccountMetadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Base.Size() - n += 1 + l + sovTypes(uint64(l)) - 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)) - } - } - l = m.SubmittedAt.Size() - n += 1 + l + sovTypes(uint64(l)) - if m.GroupVersion != 0 { - n += 1 + sovTypes(uint64(m.GroupVersion)) - } - if m.GroupAccountVersion != 0 { - n += 1 + sovTypes(uint64(m.GroupAccountVersion)) - } - if m.Status != 0 { - n += 1 + sovTypes(uint64(m.Status)) - } - if m.Result != 0 { - n += 1 + sovTypes(uint64(m.Result)) - } - l = m.VoteState.Size() - n += 1 + l + sovTypes(uint64(l)) - l = m.Timeout.Size() - n += 1 + l + sovTypes(uint64(l)) - if m.ExecutorResult != 0 { - n += 1 + sovTypes(uint64(m.ExecutorResult)) - } - return n -} - -func (m *Tally) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.YesCount.Size() - n += 1 + l + sovTypes(uint64(l)) - l = m.NoCount.Size() - n += 1 + l + sovTypes(uint64(l)) - l = m.AbstainCount.Size() - n += 1 + l + sovTypes(uint64(l)) - 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)) - } - 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 (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovTypes(uint64(l)) - 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 l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Version != 0 { + n += 1 + sovTypes(uint64(m.Version)) + } + l = m.TotalWeight.Size() + n += 1 + l + sovTypes(uint64(l)) + 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)) + l = len(m.Comment) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *GroupAccountMetadata) 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)) + } + if m.Version != 0 { + n += 1 + sovTypes(uint64(m.Version)) + } + 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)) } } + l = m.SubmittedAt.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.GroupVersion != 0 { + n += 1 + sovTypes(uint64(m.GroupVersion)) + } + if m.GroupAccountVersion != 0 { + n += 1 + sovTypes(uint64(m.GroupAccountVersion)) + } + if m.Status != 0 { + n += 1 + sovTypes(uint64(m.Status)) + } + if m.Result != 0 { + n += 1 + sovTypes(uint64(m.Result)) + } + l = m.VoteState.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Timeout.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.ExecutorResult != 0 { + n += 1 + sovTypes(uint64(m.ExecutorResult)) + } + return n +} - if iNdEx > l { - return io.ErrUnexpectedEOF +func (m *Tally) Size() (n int) { + if m == nil { + return 0 } - return nil + var l int + _ = l + l = m.YesCount.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.NoCount.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.AbstainCount.Size() + n += 1 + l + sovTypes(uint64(l)) + 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)) + } + 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 (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovTypes(uint64(l)) + 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 *MsgCreateGroup) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -5362,7 +3920,7 @@ func (m *Member) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCreateGroupAccountBase) Unmarshal(dAtA []byte) error { +func (m *MsgCreateGroupAccount) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5385,10 +3943,10 @@ func (m *MsgCreateGroupAccountBase) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCreateGroupAccountBase: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCreateGroupAccount: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateGroupAccountBase: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCreateGroupAccount: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5474,95 +4032,9 @@ func (m *MsgCreateGroupAccountBase) Unmarshal(dAtA []byte) error { 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 err := m.Base.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Comment = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", wireType) } @@ -5591,6 +4063,9 @@ func (m *MsgCreateGroupAccountStd) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.DecisionPolicy == nil { + m.DecisionPolicy = &types.Any{} + } if err := m.DecisionPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -5774,7 +4249,7 @@ func (m *MsgUpdateGroupAccountAdmin) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateGroupAccountBase) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateGroupAccountDecisionPolicy) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5797,10 +4272,10 @@ func (m *MsgUpdateGroupAccountBase) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateGroupAccountBase: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateGroupAccountDecisionPolicy: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateGroupAccountBase: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateGroupAccountDecisionPolicy: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5856,93 +4331,7 @@ func (m *MsgUpdateGroupAccountBase) Unmarshal(dAtA []byte) error { 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 err := m.Base.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", wireType) } @@ -5971,6 +4360,9 @@ func (m *MsgUpdateGroupAccountDecisionPolicyStd) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.DecisionPolicy == nil { + m.DecisionPolicy = &types.Any{} + } if err := m.DecisionPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6152,94 +4544,6 @@ func (m *MsgUpdateGroupAccountComment) Unmarshal(dAtA []byte) error { } 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 @@ -6305,7 +4609,7 @@ func (m *ThresholdDecisionPolicy) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timout", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6332,7 +4636,7 @@ func (m *ThresholdDecisionPolicy) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Timout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Timeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7135,7 +5439,7 @@ func (m *GroupMember) Unmarshal(dAtA []byte) error { } return nil } -func (m *GroupAccountMetadataBase) Unmarshal(dAtA []byte) error { +func (m *GroupAccountMetadata) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7158,10 +5462,10 @@ func (m *GroupAccountMetadataBase) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GroupAccountMetadataBase: wiretype end group for non-group") + return fmt.Errorf("proto: GroupAccountMetadata: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GroupAccountMetadataBase: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GroupAccountMetadata: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -7302,93 +5606,7 @@ func (m *GroupAccountMetadataBase) Unmarshal(dAtA []byte) error { 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 *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 err := m.Base.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DecisionPolicy", wireType) } @@ -7417,6 +5635,9 @@ func (m *StdGroupAccountMetadata) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + if m.DecisionPolicy == nil { + m.DecisionPolicy = &types.Any{} + } if err := m.DecisionPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/incubator/group/types.proto b/incubator/group/types.proto index 9451def..68e50bb 100644 --- a/incubator/group/types.proto +++ b/incubator/group/types.proto @@ -8,22 +8,7 @@ import "gogoproto/gogo.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "third_party/proto/cosmos-proto/cosmos.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; - } -} +import "google/protobuf/any.proto"; // // Groups @@ -63,19 +48,14 @@ message Member { // Group Accounts // -message MsgCreateGroupAccountBase { +// MsgCreateGroupAccount creates a group account using one of the members of DecisionPolicy. +message MsgCreateGroupAccount { + option (gogoproto.goproto_getters) = false; 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 { - option (gogoproto.goproto_getters) = false; - MsgCreateGroupAccountBase base = 1 [(gogoproto.nullable) = false]; - StdDecisionPolicy decision_policy = 2 [(gogoproto.nullable) = false]; + // StdDecisionPolicy decision_policy = 2 [(gogoproto.nullable) = false]; + google.protobuf.Any decision_policy = 4 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; } message MsgUpdateGroupAccountAdmin { @@ -84,16 +64,17 @@ message MsgUpdateGroupAccountAdmin { bytes new_admin = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; } -message MsgUpdateGroupAccountBase { +// message MsgUpdateGroupAccountBase { +// bytes admin = 1 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress"]; +// uint64 group = 2 [(gogoproto.casttype) = "GroupID"]; +// } + +// MsgCreateGroupAccount allows a group account decision policy to be updated to a member of DecisionPolicy. +message MsgUpdateGroupAccountDecisionPolicy { 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 [(gogoproto.nullable) = false]; - StdDecisionPolicy decision_policy = 2 [(gogoproto.nullable) = false]; + // StdDecisionPolicy decision_policy = 2 [(gogoproto.nullable) = false]; + google.protobuf.Any decision_policy = 3 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; } message MsgUpdateGroupAccountComment { @@ -107,18 +88,22 @@ message MsgUpdateGroupAccountComment { // 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 { - option (cosmos_proto.interface_type) = "*DecisionPolicy"; - oneof sum { - ThresholdDecisionPolicy threshold = 1; - } -} +// message StdDecisionPolicy { +// option (cosmos_proto.interface_type) = "*DecisionPolicy"; +// oneof sum { +// ThresholdDecisionPolicy threshold = 1; +// } +// } + +// ThresholdDecisionPolicy implements the DecisionPolicy interface message ThresholdDecisionPolicy { + option (cosmos_proto.implements_interface) = "DecisionPolicy"; + // threshold is a fix weight value that must be met or exceeded for a proposal to succeed. string threshold = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; - // timout is the duration from submission of a proposal to the end of voting period + // timeout is the duration from submission of a proposal to the end of voting period // Within this times votes and exec messages can be submitted. - google.protobuf.Duration timout = 2 [(gogoproto.nullable) = false]; + google.protobuf.Duration timeout = 2 [(gogoproto.nullable) = false]; } // @@ -185,31 +170,19 @@ message GroupMember { string comment = 4; // TODO: @aaronc was comment missing by intention? } -// 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 { +// GroupAccountMetadata specifies group account metadata +message GroupAccountMetadata { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + 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; - // version is used to track changes to a group's GroupAccountMetadataBase structure that + // version is used to track changes to a group's GroupAccountMetadata structure that // would create a different result on a running proposal. uint64 version = 5; -} - -// 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 [(gogoproto.nullable) = false]; - StdDecisionPolicy decision_policy = 2 [(gogoproto.nullable) = false]; + google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "DecisionPolicy"]; } // ProposalBase is the base proposal type that app should use to implement a Proposal type based diff --git a/incubator/group/types_test.go b/incubator/group/types_test.go index fd4b428..e404886 100644 --- a/incubator/group/types_test.go +++ b/incubator/group/types_test.go @@ -22,7 +22,7 @@ func TestThresholdDecisionPolicy(t *testing.T) { "accept when yes count greater than threshold": { srcPolicy: ThresholdDecisionPolicy{ Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: 1}, + Timeout: proto.Duration{Seconds: 1}, }, srcTally: Tally{YesCount: sdk.NewDec(2)}, srcTotalPower: sdk.NewDec(3), @@ -32,7 +32,7 @@ func TestThresholdDecisionPolicy(t *testing.T) { "accept when yes count equal to threshold": { srcPolicy: ThresholdDecisionPolicy{ Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: 1}, + Timeout: proto.Duration{Seconds: 1}, }, srcTally: Tally{YesCount: sdk.OneDec(), NoCount: sdk.ZeroDec(), AbstainCount: sdk.ZeroDec(), VetoCount: sdk.ZeroDec()}, srcTotalPower: sdk.NewDec(3), @@ -42,7 +42,7 @@ func TestThresholdDecisionPolicy(t *testing.T) { "reject when yes count lower to threshold": { srcPolicy: ThresholdDecisionPolicy{ Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: 1}, + Timeout: proto.Duration{Seconds: 1}, }, srcTally: Tally{YesCount: sdk.ZeroDec(), NoCount: sdk.ZeroDec(), AbstainCount: sdk.ZeroDec(), VetoCount: sdk.ZeroDec()}, srcTotalPower: sdk.NewDec(3), @@ -52,7 +52,7 @@ func TestThresholdDecisionPolicy(t *testing.T) { "reject as final when remaining votes can't cross threshold": { srcPolicy: ThresholdDecisionPolicy{ Threshold: sdk.NewDec(2), - Timout: proto.Duration{Seconds: 1}, + Timeout: proto.Duration{Seconds: 1}, }, srcTally: Tally{YesCount: sdk.ZeroDec(), NoCount: sdk.NewDec(2), AbstainCount: sdk.ZeroDec(), VetoCount: sdk.ZeroDec()}, srcTotalPower: sdk.NewDec(3), @@ -62,7 +62,7 @@ func TestThresholdDecisionPolicy(t *testing.T) { "expired when on timeout": { srcPolicy: ThresholdDecisionPolicy{ Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: 1}, + Timeout: proto.Duration{Seconds: 1}, }, srcTally: Tally{YesCount: sdk.NewDec(2)}, srcTotalPower: sdk.NewDec(3), @@ -72,7 +72,7 @@ func TestThresholdDecisionPolicy(t *testing.T) { "expired when after timeout": { srcPolicy: ThresholdDecisionPolicy{ Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: 1}, + Timeout: proto.Duration{Seconds: 1}, }, srcTally: Tally{YesCount: sdk.NewDec(2)}, srcTotalPower: sdk.NewDec(3), @@ -82,7 +82,7 @@ func TestThresholdDecisionPolicy(t *testing.T) { "abstain has no impact": { srcPolicy: ThresholdDecisionPolicy{ Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: 1}, + Timeout: proto.Duration{Seconds: 1}, }, srcTally: Tally{YesCount: sdk.ZeroDec(), NoCount: sdk.ZeroDec(), AbstainCount: sdk.OneDec(), VetoCount: sdk.ZeroDec()}, srcTotalPower: sdk.NewDec(3), @@ -92,7 +92,7 @@ func TestThresholdDecisionPolicy(t *testing.T) { "veto same as no": { srcPolicy: ThresholdDecisionPolicy{ Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: 1}, + Timeout: proto.Duration{Seconds: 1}, }, srcTally: Tally{YesCount: sdk.ZeroDec(), NoCount: sdk.ZeroDec(), AbstainCount: sdk.ZeroDec(), VetoCount: sdk.NewDec(2)}, srcTotalPower: sdk.NewDec(3), @@ -121,10 +121,10 @@ func TestThresholdDecisionPolicyValidation(t *testing.T) { }{ "all good": {src: ThresholdDecisionPolicy{ Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: 1}, + Timeout: proto.Duration{Seconds: 1}, }}, "threshold missing": {src: ThresholdDecisionPolicy{ - Timout: proto.Duration{Seconds: 1}, + Timeout: proto.Duration{Seconds: 1}, }, expErr: true, }, @@ -135,30 +135,30 @@ func TestThresholdDecisionPolicyValidation(t *testing.T) { }, "duration out of limit": {src: ThresholdDecisionPolicy{ Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: maxSeconds + 1}, + Timeout: proto.Duration{Seconds: maxSeconds + 1}, }, expErr: true, }, "no negative thresholds": {src: ThresholdDecisionPolicy{ Threshold: sdk.NewDec(-1), - Timout: proto.Duration{Seconds: 1}, + Timeout: proto.Duration{Seconds: 1}, }, expErr: true, }, "no empty thresholds": {src: ThresholdDecisionPolicy{ - Timout: proto.Duration{Seconds: 1}, + Timeout: proto.Duration{Seconds: 1}, }, expErr: true, }, "no zero thresholds": {src: ThresholdDecisionPolicy{ - Timout: proto.Duration{Seconds: 1}, + Timeout: proto.Duration{Seconds: 1}, Threshold: sdk.ZeroDec(), }, expErr: true, }, "no negative timeouts": {src: ThresholdDecisionPolicy{ Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: -1}, + Timeout: proto.Duration{Seconds: -1}, }, expErr: true, }, @@ -322,175 +322,159 @@ func TestGroupMemberValidation(t *testing.T) { } } -func TestGroupAccountMetadataBase(t *testing.T) { +func TestGroupAccountMetadata(t *testing.T) { specs := map[string]struct { - src GroupAccountMetadataBase - expErr bool + groupAccount sdk.AccAddress + group GroupID + admin sdk.AccAddress + comment string + version uint64 + threshold sdk.Dec + timeout proto.Duration + expErr bool }{ "all good": { - src: GroupAccountMetadataBase{ - Group: 1, - GroupAccount: []byte("valid--group-address"), - Admin: []byte("valid--admin-address"), - Comment: "any", - Version: 1, - }, + group: 1, + groupAccount: []byte("valid--group-address"), + admin: []byte("valid--admin-address"), + comment: "any", + version: 1, + threshold: sdk.OneDec(), + timeout: proto.Duration{Seconds: 1}, }, "invalid group": { - src: GroupAccountMetadataBase{ - Group: 0, - GroupAccount: []byte("valid--group-address"), - Admin: []byte("valid--admin-address"), - Comment: "any", - Version: 1, - }, - expErr: true, + group: 0, + groupAccount: []byte("valid--group-address"), + admin: []byte("valid--admin-address"), + comment: "any", + version: 1, + threshold: sdk.OneDec(), + timeout: proto.Duration{Seconds: 1}, + expErr: true, }, "invalid group account address": { - src: GroupAccountMetadataBase{ - Group: 1, - GroupAccount: []byte("any-invalid-group-address"), - Admin: []byte("valid--admin-address"), - Comment: "any", - Version: 1, - }, - expErr: true, + group: 1, + groupAccount: []byte("any-invalid-group-address"), + admin: []byte("valid--admin-address"), + comment: "any", + version: 1, + threshold: sdk.OneDec(), + timeout: proto.Duration{Seconds: 1}, + expErr: true, }, "empty group account address": { - src: GroupAccountMetadataBase{ - Group: 1, - Admin: []byte("valid--admin-address"), - Comment: "any", - Version: 1, - }, - expErr: true, - }, - "invalid admin account address": { - src: GroupAccountMetadataBase{ - Group: 1, - GroupAccount: []byte("valid--group-address"), - Admin: []byte("any-invalid-admin-address"), - Comment: "any", - Version: 1, - }, - expErr: true, + group: 1, + admin: []byte("valid--admin-address"), + comment: "any", + version: 1, + threshold: sdk.OneDec(), + timeout: proto.Duration{Seconds: 1}, + expErr: true, }, "empty admin account address": { - src: GroupAccountMetadataBase{ - Group: 1, - GroupAccount: []byte("valid--group-address"), - Comment: "any", - Version: 1, - }, - expErr: true, - }, - "empty version number": { - src: GroupAccountMetadataBase{ - Group: 1, - GroupAccount: []byte("valid--group-address"), - Admin: []byte("valid--admin-address"), - Comment: "any", - }, - expErr: true, + group: 1, + groupAccount: []byte("valid--group-address"), + comment: "any", + version: 1, + threshold: sdk.OneDec(), + timeout: proto.Duration{Seconds: 1}, + expErr: true, }, - } - for msg, spec := range specs { - t.Run(msg, func(t *testing.T) { - err := spec.src.ValidateBasic() - if spec.expErr { - require.Error(t, err) - } else { - require.NoError(t, err) - } - }) - } -} - -func TestStdGroupAccountMetadata(t *testing.T) { - specs := map[string]struct { - src StdGroupAccountMetadata - expErr bool - }{ - "all good": { - src: StdGroupAccountMetadata{ - Base: GroupAccountMetadataBase{ - Group: 1, - GroupAccount: []byte("valid--group-address"), - Admin: []byte("valid--admin-address"), - Comment: "any", - Version: 1, - }, - DecisionPolicy: StdDecisionPolicy{Sum: &StdDecisionPolicy_Threshold{&ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: 1}, - }}}, - }, - }, - "invalid base": { - src: StdGroupAccountMetadata{ - Base: GroupAccountMetadataBase{}, - DecisionPolicy: StdDecisionPolicy{Sum: &StdDecisionPolicy_Threshold{&ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: 1}, - }}}, - }, - expErr: true, - }, - "missing base": { - src: StdGroupAccountMetadata{ - DecisionPolicy: StdDecisionPolicy{Sum: &StdDecisionPolicy_Threshold{&ThresholdDecisionPolicy{ - Threshold: sdk.OneDec(), - Timout: proto.Duration{Seconds: 1}, - }}}, - }, - expErr: true, - }, - "invalid decision policy": { - src: StdGroupAccountMetadata{ - Base: GroupAccountMetadataBase{ - Group: 1, - GroupAccount: []byte("valid--group-address"), - Admin: []byte("valid--admin-address"), - Comment: "any", - Version: 1, - }, - DecisionPolicy: StdDecisionPolicy{Sum: &StdDecisionPolicy_Threshold{&ThresholdDecisionPolicy{}}}, - }, - expErr: true, + "invalid admin account address": { + group: 1, + groupAccount: []byte("valid--group-address"), + admin: []byte("any-invalid-admin-address"), + comment: "any", + version: 1, + threshold: sdk.OneDec(), + timeout: proto.Duration{Seconds: 1}, + expErr: true, }, - "concrete decision policy not set": { - src: StdGroupAccountMetadata{ - Base: GroupAccountMetadataBase{ - Group: 1, - GroupAccount: []byte("valid--group-address"), - Admin: []byte("valid--admin-address"), - Comment: "any", - Version: 1, - }, - DecisionPolicy: StdDecisionPolicy{Sum: &StdDecisionPolicy_Threshold{}}, - }, - expErr: true, + "empty version number": { + group: 1, + groupAccount: []byte("valid--group-address"), + admin: []byte("valid--admin-address"), + comment: "any", + threshold: sdk.OneDec(), + timeout: proto.Duration{Seconds: 1}, + expErr: true, }, "missing decision policy": { - src: StdGroupAccountMetadata{ - Base: GroupAccountMetadataBase{ - Group: 1, - GroupAccount: []byte("valid--group-address"), - Admin: []byte("valid--admin-address"), - Comment: "any", - Version: 1, - }, - }, - expErr: true, + group: 1, + groupAccount: []byte("valid--group-address"), + admin: []byte("valid--admin-address"), + comment: "any", + version: 1, + expErr: true, + }, + "missing decision policy timeout": { + group: 1, + groupAccount: []byte("valid--group-address"), + admin: []byte("valid--admin-address"), + comment: "any", + version: 1, + threshold: sdk.OneDec(), + expErr: true, + }, + "decision policy with invalid timeout": { + group: 1, + groupAccount: []byte("valid--group-address"), + admin: []byte("valid--admin-address"), + comment: "any", + version: 1, + threshold: sdk.OneDec(), + timeout: proto.Duration{Seconds: -1}, + expErr: true, + }, + "missing decision policy threshold": { + group: 1, + groupAccount: []byte("valid--group-address"), + admin: []byte("valid--admin-address"), + comment: "any", + version: 1, + timeout: proto.Duration{Seconds: 1}, + expErr: true, + }, + "decision policy with negative threshold": { + group: 1, + groupAccount: []byte("valid--group-address"), + admin: []byte("valid--admin-address"), + comment: "any", + version: 1, + threshold: sdk.NewDec(-1), + timeout: proto.Duration{Seconds: 1}, + expErr: true, + }, + "decision policy with zero threshold": { + group: 1, + groupAccount: []byte("valid--group-address"), + admin: []byte("valid--admin-address"), + comment: "any", + version: 1, + threshold: sdk.ZeroDec(), + timeout: proto.Duration{Seconds: 1}, + expErr: true, }, } for msg, spec := range specs { t.Run(msg, func(t *testing.T) { - err := spec.src.ValidateBasic() + m, err := NewGroupAccountMetadata( + spec.groupAccount, + spec.group, + spec.admin, + spec.comment, + spec.version, + &ThresholdDecisionPolicy{ + Threshold: spec.threshold, + Timeout: spec.timeout, + }, + ) + require.NoError(t, err) + if spec.expErr { - require.Error(t, err) + require.Error(t, m.ValidateBasic()) } else { - require.NoError(t, err) + require.NoError(t, m.ValidateBasic()) } }) } diff --git a/incubator/orm/testsupport.go b/incubator/orm/testsupport.go index 68befd2..db35094 100644 --- a/incubator/orm/testsupport.go +++ b/incubator/orm/testsupport.go @@ -63,6 +63,10 @@ func (d debuggingGasMeter) IsPastLimit() bool { func (d debuggingGasMeter) IsOutOfGas() bool { return d.g.IsOutOfGas() } +func (g *debuggingGasMeter) String() string { + return g.g.String() +} + type GasCountingMockContext struct { parent HasKVStore