Rename GovCodec to gov.Codec
This commit is contained in:
parent
e8155d67d0
commit
3919645e8b
|
@ -26,7 +26,7 @@ type Keeper struct {
|
|||
storeKey sdk.StoreKey
|
||||
|
||||
// The codec codec for binary encoding/decoding.
|
||||
cdc types.GovCodec
|
||||
cdc types.Codec
|
||||
|
||||
// Proposal router
|
||||
router types.Router
|
||||
|
@ -40,7 +40,7 @@ type Keeper struct {
|
|||
//
|
||||
// CONTRACT: the parameter Subspace must have the param key table already initialized
|
||||
func NewKeeper(
|
||||
cdc types.GovCodec, key sdk.StoreKey, paramSpace types.ParamSubspace,
|
||||
cdc types.Codec, key sdk.StoreKey, paramSpace types.ParamSubspace,
|
||||
supplyKeeper types.SupplyKeeper, sk types.StakingKeeper, rtr types.Router,
|
||||
) Keeper {
|
||||
|
||||
|
|
|
@ -4,6 +4,14 @@ import (
|
|||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
)
|
||||
|
||||
type Codec interface {
|
||||
codec.Marshaler
|
||||
|
||||
MarshalProposal(p Proposal) ([]byte, error)
|
||||
UnmarshalProposal(bz []byte, ptr *Proposal) error
|
||||
}
|
||||
|
||||
|
||||
// module codec
|
||||
var ModuleCdc = codec.New()
|
||||
|
||||
|
@ -31,12 +39,6 @@ func init() {
|
|||
RegisterCodec(ModuleCdc)
|
||||
}
|
||||
|
||||
type GovCodec interface {
|
||||
codec.Marshaler
|
||||
MarshalProposal(p Proposal) ([]byte, error)
|
||||
UnmarshalProposal(bz []byte, ptr *Proposal) error
|
||||
}
|
||||
|
||||
type AminoGovCodec struct {
|
||||
codec.Marshaler
|
||||
amino *codec.Codec
|
||||
|
@ -54,4 +56,4 @@ func (a AminoGovCodec) UnmarshalProposal(bz []byte, ptr *Proposal) error {
|
|||
return a.amino.UnmarshalBinaryBare(bz, ptr)
|
||||
}
|
||||
|
||||
var _ GovCodec = AminoGovCodec{}
|
||||
var _ Codec = AminoGovCodec{}
|
||||
|
|
|
@ -11,15 +11,6 @@ option (gogoproto.goproto_stringer_all) = false;
|
|||
option (gogoproto.stringer_all) = false;
|
||||
option (gogoproto.goproto_getters_all) = false;
|
||||
|
||||
message MsgCommon {
|
||||
option (cosmos_proto.interface_type) = "github.com/cosmos/cosmos-sdk/types.Msg";
|
||||
option (gogoproto.stringer) = true;
|
||||
oneof sum {
|
||||
MsgDeposit gov_deposit = 1;
|
||||
MsgVote gov_vote = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message MsgSubmitProposalBase {
|
||||
option (gogoproto.stringer) = true;
|
||||
repeated cosmos_sdk.v1.Coin intial_deposit = 1 [(gogoproto.nullable) = false
|
||||
|
|
Loading…
Reference in New Issue