Bank proto buf migration (#6166)
* Bank proto buf migration * WIP: Added proto code for bank * added supply on bank module * Bank module proto migration * formatter applied * Added comment for RegisterInterfaceTypes in bank/module
This commit is contained in:
parent
2f68c4166d
commit
da92383bff
42
std/codec.go
42
std/codec.go
|
@ -8,14 +8,11 @@ import (
|
|||
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||
authexported "github.com/cosmos/cosmos-sdk/x/auth/exported"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank"
|
||||
bankexported "github.com/cosmos/cosmos-sdk/x/bank/exported"
|
||||
gov "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
)
|
||||
|
||||
var (
|
||||
_ auth.Codec = (*Codec)(nil)
|
||||
_ bank.Codec = (*Codec)(nil)
|
||||
_ gov.Codec = (*Codec)(nil)
|
||||
)
|
||||
|
||||
|
@ -74,45 +71,6 @@ func (c *Codec) UnmarshalAccountJSON(bz []byte) (authexported.Account, error) {
|
|||
return acc.GetAccount(), nil
|
||||
}
|
||||
|
||||
// MarshalSupply marshals a SupplyI interface. If the given type implements
|
||||
// the Marshaler interface, it is treated as a Proto-defined message and
|
||||
// serialized that way. Otherwise, it falls back on the internal Amino codec.
|
||||
func (c *Codec) MarshalSupply(supplyI bankexported.SupplyI) ([]byte, error) {
|
||||
supply := &Supply{}
|
||||
if err := supply.SetSupplyI(supplyI); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return c.Marshaler.MarshalBinaryBare(supply)
|
||||
}
|
||||
|
||||
// UnmarshalSupply returns a SupplyI interface from raw encoded account bytes
|
||||
// of a Proto-based SupplyI type. An error is returned upon decoding failure.
|
||||
func (c *Codec) UnmarshalSupply(bz []byte) (bankexported.SupplyI, error) {
|
||||
supply := &Supply{}
|
||||
if err := c.Marshaler.UnmarshalBinaryBare(bz, supply); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return supply.GetSupplyI(), nil
|
||||
}
|
||||
|
||||
// MarshalSupplyJSON JSON encodes a supply object implementing the SupplyI
|
||||
// interface.
|
||||
func (c *Codec) MarshalSupplyJSON(supply bankexported.SupplyI) ([]byte, error) {
|
||||
return c.Marshaler.MarshalJSON(supply)
|
||||
}
|
||||
|
||||
// UnmarshalSupplyJSON returns a SupplyI from JSON encoded bytes.
|
||||
func (c *Codec) UnmarshalSupplyJSON(bz []byte) (bankexported.SupplyI, error) {
|
||||
supply := &Supply{}
|
||||
if err := c.Marshaler.UnmarshalJSON(bz, supply); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return supply.GetSupplyI(), nil
|
||||
}
|
||||
|
||||
// MarshalProposal marshals a Proposal. It accepts a Proposal defined by the x/gov
|
||||
// module and uses the application-level Proposal type which has the concrete
|
||||
// Content implementation to serialize.
|
||||
|
|
666
std/codec.pb.go
666
std/codec.pb.go
File diff suppressed because it is too large
Load Diff
|
@ -31,17 +31,6 @@ message Account {
|
|||
}
|
||||
}
|
||||
|
||||
// Supply defines the application-level Supply type.
|
||||
message Supply {
|
||||
option (gogoproto.equal) = true;
|
||||
option (cosmos_proto.interface_type) = "*github.com/cosmos/cosmos-sdk/x/bank/exported.SupplyI";
|
||||
|
||||
// sum defines a set of all acceptable concrete Supply implementations.
|
||||
oneof sum {
|
||||
cosmos_sdk.x.bank.v1.Supply supply = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// MsgSubmitProposal defines the application-level message type for handling
|
||||
// governance proposals.
|
||||
message MsgSubmitProposal {
|
||||
|
|
|
@ -7,4 +7,10 @@ option go_package = "github.com/regen-network/cosmos-proto";
|
|||
|
||||
extend google.protobuf.MessageOptions {
|
||||
string interface_type = 93001;
|
||||
|
||||
string implements_interface = 93002;
|
||||
}
|
||||
|
||||
extend google.protobuf.FieldOptions {
|
||||
string accepts_interface = 93001;
|
||||
}
|
||||
|
|
|
@ -73,5 +73,4 @@ type (
|
|||
Keeper = keeper.Keeper
|
||||
GenesisState = types.GenesisState
|
||||
Supply = types.Supply
|
||||
Codec = types.Codec
|
||||
)
|
||||
|
|
|
@ -4,6 +4,8 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
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/auth"
|
||||
|
@ -11,6 +13,7 @@ import (
|
|||
"github.com/cosmos/cosmos-sdk/x/bank/exported"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
||||
"github.com/gogo/protobuf/proto"
|
||||
)
|
||||
|
||||
var _ Keeper = (*BaseKeeper)(nil)
|
||||
|
@ -33,6 +36,10 @@ type Keeper interface {
|
|||
|
||||
DelegateCoins(ctx sdk.Context, delegatorAddr, moduleAccAddr sdk.AccAddress, amt sdk.Coins) error
|
||||
UndelegateCoins(ctx sdk.Context, moduleAccAddr, delegatorAddr sdk.AccAddress, amt sdk.Coins) error
|
||||
MarshalSupply(supplyI exported.SupplyI) ([]byte, error)
|
||||
UnmarshalSupply(bz []byte) (exported.SupplyI, error)
|
||||
MarshalSupplyJSON(supply exported.SupplyI) ([]byte, error)
|
||||
UnmarshalSupplyJSON(bz []byte) (exported.SupplyI, error)
|
||||
}
|
||||
|
||||
// BaseKeeper manages transfers between accounts. It implements the Keeper interface.
|
||||
|
@ -40,13 +47,13 @@ type BaseKeeper struct {
|
|||
BaseSendKeeper
|
||||
|
||||
ak types.AccountKeeper
|
||||
cdc types.Codec
|
||||
cdc codec.Marshaler
|
||||
storeKey sdk.StoreKey
|
||||
paramSpace paramtypes.Subspace
|
||||
}
|
||||
|
||||
func NewBaseKeeper(
|
||||
cdc types.Codec, storeKey sdk.StoreKey, ak types.AccountKeeper, paramSpace paramtypes.Subspace,
|
||||
cdc codec.Marshaler, storeKey sdk.StoreKey, ak types.AccountKeeper, paramSpace paramtypes.Subspace,
|
||||
blacklistedAddrs map[string]bool,
|
||||
) BaseKeeper {
|
||||
|
||||
|
@ -148,7 +155,7 @@ func (k BaseKeeper) GetSupply(ctx sdk.Context) exported.SupplyI {
|
|||
panic("stored supply should not have been nil")
|
||||
}
|
||||
|
||||
supply, err := k.cdc.UnmarshalSupply(bz)
|
||||
supply, err := k.UnmarshalSupply(bz)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
@ -159,7 +166,7 @@ func (k BaseKeeper) GetSupply(ctx sdk.Context) exported.SupplyI {
|
|||
// SetSupply sets the Supply to store
|
||||
func (k BaseKeeper) SetSupply(ctx sdk.Context, supply exported.SupplyI) {
|
||||
store := ctx.KVStore(k.storeKey)
|
||||
bz, err := k.cdc.MarshalSupply(supply)
|
||||
bz, err := k.MarshalSupply(supply)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
@ -338,3 +345,53 @@ func (k BaseKeeper) trackUndelegation(ctx sdk.Context, addr sdk.AccAddress, amt
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalSupply marshals a Supply interface. If the given type implements
|
||||
// the Marshaler interface, it is treated as a Proto-defined message and
|
||||
// serialized that way. Otherwise, it falls back on the internal Amino codec.
|
||||
func (k BaseKeeper) MarshalSupply(supplyI exported.SupplyI) ([]byte, error) {
|
||||
return codec.MarshalAny(k.cdc, supplyI)
|
||||
}
|
||||
|
||||
// UnmarshalSupply returns a Supply interface from raw encoded supply
|
||||
// bytes of a Proto-based Supply type. An error is returned upon decoding
|
||||
// failure.
|
||||
func (k BaseKeeper) UnmarshalSupply(bz []byte) (exported.SupplyI, error) {
|
||||
var evi exported.SupplyI
|
||||
if err := codec.UnmarshalAny(k.cdc, &evi, bz); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return evi, nil
|
||||
}
|
||||
|
||||
// MarshalSupplyJSON JSON encodes a supply object implementing the Supply
|
||||
// interface.
|
||||
func (k BaseKeeper) MarshalSupplyJSON(supply exported.SupplyI) ([]byte, error) {
|
||||
msg, ok := supply.(proto.Message)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("cannot proto marshal %T", supply)
|
||||
}
|
||||
|
||||
any, err := codectypes.NewAnyWithValue(msg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return k.cdc.MarshalJSON(any)
|
||||
}
|
||||
|
||||
// UnmarshalSupplyJSON returns a Supply from JSON encoded bytes
|
||||
func (k BaseKeeper) UnmarshalSupplyJSON(bz []byte) (exported.SupplyI, error) {
|
||||
var any codectypes.Any
|
||||
if err := k.cdc.UnmarshalJSON(bz, &any); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var supply exported.SupplyI
|
||||
if err := k.cdc.UnpackAny(&any, &supply); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return supply, nil
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import (
|
|||
|
||||
"github.com/cosmos/cosmos-sdk/client/context"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/module"
|
||||
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
|
||||
|
@ -25,11 +26,12 @@ var (
|
|||
_ module.AppModule = AppModule{}
|
||||
_ module.AppModuleBasic = AppModuleBasic{}
|
||||
_ module.AppModuleSimulation = AppModule{}
|
||||
_ module.InterfaceModule = AppModuleBasic{}
|
||||
)
|
||||
|
||||
// AppModuleBasic defines the basic application module used by the bank module.
|
||||
type AppModuleBasic struct {
|
||||
cdc Codec
|
||||
cdc codec.Marshaler
|
||||
}
|
||||
|
||||
// Name returns the bank module's name.
|
||||
|
@ -69,6 +71,11 @@ func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command {
|
|||
return cli.GetQueryCmd(cdc)
|
||||
}
|
||||
|
||||
// RegisterInterfaceTypes registers interfaces and implementations of the bank module.
|
||||
func (AppModuleBasic) RegisterInterfaceTypes(registry codectypes.InterfaceRegistry) {
|
||||
types.RegisterInterfaces(registry)
|
||||
}
|
||||
|
||||
//____________________________________________________________________________
|
||||
|
||||
// AppModule implements an application module for the bank module.
|
||||
|
@ -80,7 +87,7 @@ type AppModule struct {
|
|||
}
|
||||
|
||||
// NewAppModule creates a new AppModule object
|
||||
func NewAppModule(cdc Codec, keeper Keeper, accountKeeper types.AccountKeeper) AppModule {
|
||||
func NewAppModule(cdc codec.Marshaler, keeper Keeper, accountKeeper types.AccountKeeper) AppModule {
|
||||
return AppModule{
|
||||
AppModuleBasic: AppModuleBasic{cdc: cdc},
|
||||
keeper: keeper,
|
||||
|
@ -156,7 +163,7 @@ func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange {
|
|||
|
||||
// RegisterStoreDecoder registers a decoder for supply module's types
|
||||
func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) {
|
||||
sdr[StoreKey] = simulation.NewDecodeStore(am.cdc)
|
||||
sdr[StoreKey] = simulation.NewDecodeStore(am.keeper)
|
||||
}
|
||||
|
||||
// WeightedOperations returns the all the gov module operations with their respective weights.
|
||||
|
|
|
@ -4,14 +4,20 @@ import (
|
|||
"bytes"
|
||||
"fmt"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/exported"
|
||||
|
||||
tmkv "github.com/tendermint/tendermint/libs/kv"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
)
|
||||
|
||||
type SupplyUnmarshaller interface {
|
||||
UnmarshalSupply([]byte) (exported.SupplyI, error)
|
||||
}
|
||||
|
||||
// NewDecodeStore returns a function closure that unmarshals the KVPair's values
|
||||
// to the corresponding types.
|
||||
func NewDecodeStore(cdc types.Codec) func(kvA, kvB tmkv.Pair) string {
|
||||
func NewDecodeStore(cdc SupplyUnmarshaller) func(kvA, kvB tmkv.Pair) string {
|
||||
return func(kvA, kvB tmkv.Pair) string {
|
||||
switch {
|
||||
case bytes.Equal(kvA.Key[:1], types.SupplyKey):
|
||||
|
|
|
@ -14,12 +14,12 @@ import (
|
|||
)
|
||||
|
||||
func TestDecodeStore(t *testing.T) {
|
||||
cdc, _ := simapp.MakeCodecs()
|
||||
dec := simulation.NewDecodeStore(cdc)
|
||||
app := simapp.Setup(false)
|
||||
dec := simulation.NewDecodeStore(app.BankKeeper)
|
||||
|
||||
totalSupply := types.NewSupply(sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 1000)))
|
||||
|
||||
supplyBz, err := cdc.MarshalSupply(totalSupply)
|
||||
supplyBz, err := app.BankKeeper.MarshalSupply(totalSupply)
|
||||
require.NoError(t, err)
|
||||
|
||||
kvPairs := tmkv.Pairs{
|
||||
|
|
|
@ -3,21 +3,10 @@ package types
|
|||
import (
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/codec/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank/exported"
|
||||
)
|
||||
|
||||
// Codec defines the interface needed to serialize x/bank state. It must
|
||||
// be aware of all concrete supply types.
|
||||
type Codec interface {
|
||||
codec.Marshaler
|
||||
|
||||
MarshalSupply(supply exported.SupplyI) ([]byte, error)
|
||||
UnmarshalSupply(bz []byte) (exported.SupplyI, error)
|
||||
|
||||
MarshalSupplyJSON(supply exported.SupplyI) ([]byte, error)
|
||||
UnmarshalSupplyJSON(bz []byte) (exported.SupplyI, error)
|
||||
}
|
||||
|
||||
// RegisterCodec registers the necessary x/bank interfaces and concrete types
|
||||
// on the provided Amino codec. These types are used for Amino JSON serialization.
|
||||
func RegisterCodec(cdc *codec.Codec) {
|
||||
|
@ -27,6 +16,19 @@ func RegisterCodec(cdc *codec.Codec) {
|
|||
cdc.RegisterConcrete(MsgMultiSend{}, "cosmos-sdk/MsgMultiSend", nil)
|
||||
}
|
||||
|
||||
func RegisterInterfaces(registry types.InterfaceRegistry) {
|
||||
registry.RegisterImplementations((*sdk.Msg)(nil),
|
||||
&MsgSend{},
|
||||
&MsgMultiSend{},
|
||||
)
|
||||
|
||||
registry.RegisterInterface(
|
||||
"cosmos_sdk.bank.v1.bank",
|
||||
(*exported.SupplyI)(nil),
|
||||
&Supply{},
|
||||
)
|
||||
}
|
||||
|
||||
var (
|
||||
amino = codec.New()
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ import (
|
|||
types "github.com/cosmos/cosmos-sdk/types"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
_ "github.com/regen-network/cosmos-proto"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
|
@ -295,35 +296,37 @@ func init() {
|
|||
func init() { proto.RegisterFile("x/bank/types/types.proto", fileDescriptor_934ff6b24d3432e2) }
|
||||
|
||||
var fileDescriptor_934ff6b24d3432e2 = []byte{
|
||||
// 449 bytes of a gzipped FileDescriptorProto
|
||||
// 481 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xa8, 0xd0, 0x4f, 0x4a,
|
||||
0xcc, 0xcb, 0xd6, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x86, 0x90, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9,
|
||||
0x42, 0x22, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0xc5, 0x29, 0xd9, 0x7a, 0x15, 0x7a, 0x20,
|
||||
0x45, 0x7a, 0x65, 0x86, 0x52, 0x6a, 0x25, 0x19, 0x99, 0x45, 0x29, 0xf1, 0x05, 0x89, 0x45, 0x25,
|
||||
0x95, 0xfa, 0x60, 0x85, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0x08, 0x16, 0x44, 0xb7, 0x94, 0x20, 0x86,
|
||||
0x81, 0x4a, 0x87, 0x98, 0xb8, 0xd8, 0x7d, 0x8b, 0xd3, 0x83, 0x53, 0xf3, 0x52, 0x84, 0xb2, 0xb9,
|
||||
0x78, 0xd2, 0x8a, 0xf2, 0x73, 0xe3, 0x13, 0x53, 0x52, 0x8a, 0x52, 0x8b, 0x8b, 0x25, 0x18, 0x15,
|
||||
0x18, 0x35, 0x78, 0x9c, 0x3c, 0x3e, 0xdd, 0x93, 0x17, 0xae, 0x4c, 0xcc, 0xcd, 0xb1, 0x52, 0x42,
|
||||
0x96, 0x55, 0xfa, 0x75, 0x4f, 0x5e, 0x37, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f,
|
||||
0x57, 0x1f, 0xe2, 0x30, 0x28, 0xa5, 0x5b, 0x9c, 0x02, 0x75, 0xbd, 0x9e, 0x63, 0x72, 0xb2, 0x23,
|
||||
0x44, 0x47, 0x10, 0x37, 0x48, 0x3f, 0x94, 0x23, 0x94, 0xca, 0xc5, 0x55, 0x92, 0x0f, 0xb7, 0x8a,
|
||||
0x09, 0x6c, 0x95, 0xdb, 0xa7, 0x7b, 0xf2, 0x82, 0x10, 0xab, 0x10, 0x72, 0x64, 0x58, 0xc4, 0x59,
|
||||
0x92, 0x0f, 0xb3, 0x26, 0x96, 0x8b, 0x2d, 0x31, 0x37, 0xbf, 0x34, 0xaf, 0x44, 0x82, 0x59, 0x81,
|
||||
0x59, 0x83, 0xdb, 0x48, 0x58, 0x0f, 0x29, 0x04, 0xcb, 0x0c, 0xf5, 0x9c, 0xf3, 0x33, 0xf3, 0x9c,
|
||||
0x0c, 0x4e, 0xdc, 0x93, 0x67, 0x58, 0x75, 0x5f, 0x5e, 0x83, 0x08, 0x6b, 0x40, 0x1a, 0x8a, 0x83,
|
||||
0xa0, 0x86, 0x5a, 0xb1, 0xbc, 0x58, 0x20, 0xcf, 0xa8, 0xb4, 0x9d, 0x91, 0x8b, 0xd5, 0x33, 0xaf,
|
||||
0xa0, 0xb4, 0x44, 0xc8, 0x9b, 0x8b, 0x1d, 0x35, 0xf4, 0x0c, 0x49, 0x77, 0x3d, 0xcc, 0x04, 0xa1,
|
||||
0x68, 0x2e, 0xd6, 0x64, 0x90, 0x6d, 0x12, 0x4c, 0xd4, 0x74, 0x3a, 0xc4, 0x4c, 0xa8, 0xcb, 0x77,
|
||||
0x30, 0x72, 0xb1, 0xf9, 0x97, 0x96, 0x0c, 0x45, 0xa7, 0xf7, 0x32, 0x72, 0xf1, 0xf8, 0x16, 0xa7,
|
||||
0xfb, 0x96, 0xe6, 0x94, 0x64, 0x82, 0x93, 0xaf, 0x25, 0x17, 0x5b, 0x26, 0x28, 0x12, 0x40, 0xee,
|
||||
0x07, 0x59, 0x2a, 0xad, 0x87, 0x2d, 0xb3, 0xe8, 0x81, 0x23, 0xca, 0x89, 0x05, 0x64, 0x79, 0x10,
|
||||
0x54, 0x83, 0x90, 0x0d, 0x17, 0x7b, 0x3e, 0x38, 0x14, 0x60, 0x0e, 0x96, 0xc1, 0xae, 0x17, 0x12,
|
||||
0x54, 0x50, 0xcd, 0x30, 0x2d, 0x50, 0xf7, 0x14, 0x73, 0xb1, 0x05, 0x97, 0x16, 0x14, 0xe4, 0x54,
|
||||
0x82, 0x3c, 0x5f, 0x92, 0x5f, 0x92, 0x98, 0x03, 0x75, 0x07, 0xb5, 0x3c, 0x0f, 0x36, 0xd3, 0x8a,
|
||||
0xa7, 0x63, 0x81, 0x3c, 0xc3, 0x8c, 0x05, 0xf2, 0x0c, 0x20, 0x4b, 0x9d, 0x9c, 0x4f, 0x3c, 0x92,
|
||||
0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c,
|
||||
0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x13, 0xaf, 0xc1, 0xc8, 0x05, 0x4c, 0x12, 0x1b,
|
||||
0xb8, 0x28, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x0e, 0x1e, 0x07, 0x77, 0x04, 0x00,
|
||||
0x95, 0xfa, 0x60, 0x85, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0x08, 0x16, 0x44, 0xb7, 0x94, 0x36, 0xa6,
|
||||
0x3a, 0x88, 0x79, 0xba, 0xc8, 0x1c, 0xa8, 0x62, 0x41, 0x0c, 0xdb, 0x95, 0x0e, 0x31, 0x71, 0xb1,
|
||||
0xfb, 0x16, 0xa7, 0x07, 0xa7, 0xe6, 0xa5, 0x08, 0x65, 0x73, 0xf1, 0xa4, 0x15, 0xe5, 0xe7, 0xc6,
|
||||
0x27, 0xa6, 0xa4, 0x14, 0xa5, 0x16, 0x17, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x38, 0x79, 0x7c,
|
||||
0xba, 0x27, 0x2f, 0x5c, 0x99, 0x98, 0x9b, 0x63, 0xa5, 0x84, 0x2c, 0xab, 0xf4, 0xeb, 0x9e, 0xbc,
|
||||
0x6e, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0x2e, 0xd4, 0x22, 0x98, 0xe5, 0xc5,
|
||||
0x29, 0x50, 0xaf, 0xea, 0x39, 0x26, 0x27, 0x3b, 0x42, 0x74, 0x04, 0x71, 0x83, 0xf4, 0x43, 0x39,
|
||||
0x42, 0xa9, 0x5c, 0x5c, 0x25, 0xf9, 0x70, 0xab, 0x98, 0xc0, 0x56, 0xb9, 0x7d, 0xba, 0x27, 0x2f,
|
||||
0x08, 0xb1, 0x0a, 0x21, 0x47, 0x86, 0x45, 0x9c, 0x25, 0xf9, 0x30, 0x6b, 0x62, 0xb9, 0xd8, 0x12,
|
||||
0x73, 0xf3, 0x4b, 0xf3, 0x4a, 0x24, 0x98, 0x15, 0x98, 0x35, 0xb8, 0x8d, 0x84, 0xf5, 0x90, 0x82,
|
||||
0xbb, 0xcc, 0x50, 0xcf, 0x39, 0x3f, 0x33, 0xcf, 0xc9, 0xe0, 0xc4, 0x3d, 0x79, 0x86, 0x55, 0xf7,
|
||||
0xe5, 0x35, 0x88, 0xb0, 0x06, 0xa4, 0xa1, 0x38, 0x08, 0x6a, 0xa8, 0x15, 0xcb, 0x8b, 0x05, 0xf2,
|
||||
0x8c, 0x4a, 0xdb, 0x19, 0xb9, 0x58, 0x3d, 0xf3, 0x0a, 0x4a, 0x4b, 0x84, 0xbc, 0xb9, 0xd8, 0x51,
|
||||
0x43, 0xcf, 0x90, 0x74, 0xd7, 0xc3, 0x4c, 0x10, 0x8a, 0xe6, 0x62, 0x4d, 0x06, 0xd9, 0x26, 0xc1,
|
||||
0x44, 0x4d, 0xa7, 0x43, 0xcc, 0x84, 0xba, 0x7c, 0x07, 0x23, 0x17, 0x9b, 0x7f, 0x69, 0xc9, 0x50,
|
||||
0x74, 0x7a, 0x2f, 0x23, 0x17, 0x8f, 0x6f, 0x71, 0xba, 0x6f, 0x69, 0x4e, 0x49, 0x26, 0x38, 0xf9,
|
||||
0x5a, 0x72, 0xb1, 0x65, 0x82, 0x22, 0x01, 0xe4, 0x7e, 0x90, 0xa5, 0xd2, 0x7a, 0xd8, 0x72, 0x96,
|
||||
0x1e, 0x38, 0xa2, 0x9c, 0x58, 0x40, 0x96, 0x07, 0x41, 0x35, 0x08, 0xd9, 0x70, 0xb1, 0xe7, 0x83,
|
||||
0x43, 0x01, 0xe6, 0x60, 0x19, 0xec, 0x7a, 0x21, 0x41, 0x05, 0xd5, 0x0c, 0xd3, 0x02, 0x75, 0xcf,
|
||||
0x1a, 0x46, 0x2e, 0xb6, 0xe0, 0xd2, 0x82, 0x82, 0x9c, 0x4a, 0x90, 0xef, 0x4b, 0xf2, 0x4b, 0x12,
|
||||
0x73, 0xa0, 0x0e, 0xa1, 0x96, 0xef, 0xc1, 0x66, 0x5a, 0xb9, 0x76, 0x2c, 0x90, 0x67, 0x98, 0xb1,
|
||||
0x40, 0x9e, 0x01, 0x64, 0xeb, 0xa5, 0x2d, 0xba, 0xa6, 0x5a, 0x78, 0x4d, 0x80, 0x96, 0x3b, 0xa9,
|
||||
0x15, 0x05, 0xf9, 0x45, 0x25, 0xa9, 0x29, 0x7a, 0x10, 0x27, 0x7a, 0x3a, 0x39, 0x9f, 0x78, 0x24,
|
||||
0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78,
|
||||
0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x26, 0x31, 0xe6, 0x81, 0x1d, 0x96, 0xc4, 0x06,
|
||||
0x2e, 0x44, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x5a, 0x2d, 0x41, 0xde, 0x04, 0x00,
|
||||
0x00,
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ syntax = "proto3";
|
|||
package cosmos_sdk.x.bank.v1;
|
||||
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
import "third_party/proto/cosmos-proto/cosmos.proto";
|
||||
import "types/types.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types";
|
||||
|
@ -54,6 +55,7 @@ message Supply {
|
|||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/exported.SupplyI";
|
||||
|
||||
repeated cosmos_sdk.v1.Coin total = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
|
|
Loading…
Reference in New Issue