refactor: remove gogoproto stringer annotations and MarshalYAML functions (#13850)

This commit is contained in:
Julien Robert
2022-11-28 12:56:00 +00:00
committed by GitHub
parent 68c1517046
commit 41f0ab15e6
63 changed files with 2221 additions and 2617 deletions
-46
View File
@@ -9,11 +9,8 @@ import (
"github.com/cosmos/gogoproto/proto"
"github.com/tendermint/tendermint/crypto"
"sigs.k8s.io/yaml"
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)
@@ -138,18 +135,6 @@ func (acc BaseAccount) Validate() error {
return nil
}
// MarshalYAML returns the YAML representation of an account.
func (acc BaseAccount) MarshalYAML() (interface{}, error) {
registry := codectypes.NewInterfaceRegistry()
cryptocodec.RegisterInterfaces(registry)
bz, err := codec.MarshalYAML(codec.NewProtoCodec(registry), &acc)
if err != nil {
return nil, err
}
return string(bz), err
}
// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (acc BaseAccount) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error {
if acc.PubKey == nil {
@@ -251,37 +236,6 @@ type moduleAccountPretty struct {
Permissions []string `json:"permissions"`
}
func (ma ModuleAccount) String() string {
out, err := ma.MarshalYAML()
if err != nil {
panic(err)
}
return out.(string)
}
// MarshalYAML returns the YAML representation of a ModuleAccount.
func (ma ModuleAccount) MarshalYAML() (interface{}, error) {
accAddr, err := sdk.AccAddressFromBech32(ma.Address)
if err != nil {
return nil, err
}
bs, err := yaml.Marshal(moduleAccountPretty{
Address: accAddr,
PubKey: "",
AccountNumber: ma.AccountNumber,
Sequence: ma.Sequence,
Name: ma.Name,
Permissions: ma.Permissions,
})
if err != nil {
return nil, err
}
return string(bs), nil
}
// MarshalJSON returns the JSON representation of a ModuleAccount.
func (ma ModuleAccount) MarshalJSON() ([]byte, error) {
accAddr, err := sdk.AccAddressFromBech32(ma.Address)
+7 -11
View File
@@ -7,7 +7,6 @@ import (
"testing"
"github.com/stretchr/testify/require"
"sigs.k8s.io/yaml"
"cosmossdk.io/depinject"
@@ -51,11 +50,8 @@ func TestBaseAddressPubKey(t *testing.T) {
require.Nil(t, err)
require.EqualValues(t, addr2, acc2.GetAddress())
// no error when calling MarshalYAML with an account with pubkey
_, err = acc.MarshalYAML()
require.Nil(t, err)
// no panic on calling string with an account with pubkey
require.NotEmpty(t, acc.String())
require.NotPanics(t, func() { _ = acc.String() })
}
@@ -127,14 +123,14 @@ func TestGenesisAccountValidate(t *testing.T) {
}
}
func TestModuleAccountMarshalYAML(t *testing.T) {
func TestModuleAccountString(t *testing.T) {
name := "test"
moduleAcc := types.NewEmptyModuleAccount(name, types.Minter, types.Burner, types.Staking)
bs, err := yaml.Marshal(moduleAcc)
require.NoError(t, err)
want := "account_number: 0\naddress: cosmos1n7rdpqvgf37ktx30a2sv2kkszk3m7ncmg5drhe\nname: test\npermissions:\n- minter\n- burner\n- staking\npublic_key: \"\"\nsequence: 0\n"
require.Equal(t, want, string(bs))
want := `base_account:<address:"cosmos1n7rdpqvgf37ktx30a2sv2kkszk3m7ncmg5drhe" > name:"test" permissions:"minter" permissions:"burner" permissions:"staking" `
require.Equal(t, want, moduleAcc.String())
moduleAcc.SetSequence(10)
want = `base_account:<address:"cosmos1n7rdpqvgf37ktx30a2sv2kkszk3m7ncmg5drhe" sequence:10 > name:"test" permissions:"minter" permissions:"burner" permissions:"staking" `
require.Equal(t, want, moduleAcc.String())
}
func TestHasPermissions(t *testing.T) {
+51 -49
View File
@@ -76,8 +76,9 @@ type ModuleAccount struct {
Permissions []string `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty"`
}
func (m *ModuleAccount) Reset() { *m = ModuleAccount{} }
func (*ModuleAccount) ProtoMessage() {}
func (m *ModuleAccount) Reset() { *m = ModuleAccount{} }
func (m *ModuleAccount) String() string { return proto.CompactTextString(m) }
func (*ModuleAccount) ProtoMessage() {}
func (*ModuleAccount) Descriptor() ([]byte, []int) {
return fileDescriptor_7e1f7e915d020d2d, []int{1}
}
@@ -175,8 +176,9 @@ type Params struct {
SigVerifyCostSecp256k1 uint64 `protobuf:"varint,5,opt,name=sig_verify_cost_secp256k1,json=sigVerifyCostSecp256k1,proto3" json:"sig_verify_cost_secp256k1,omitempty"`
}
func (m *Params) Reset() { *m = Params{} }
func (*Params) ProtoMessage() {}
func (m *Params) Reset() { *m = Params{} }
func (m *Params) String() string { return proto.CompactTextString(m) }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
return fileDescriptor_7e1f7e915d020d2d, []int{3}
}
@@ -252,51 +254,51 @@ func init() {
func init() { proto.RegisterFile("cosmos/auth/v1beta1/auth.proto", fileDescriptor_7e1f7e915d020d2d) }
var fileDescriptor_7e1f7e915d020d2d = []byte{
// 704 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x54, 0x4d, 0x4f, 0xdb, 0x48,
0x18, 0x8e, 0x93, 0x2c, 0x1f, 0x13, 0x60, 0x17, 0x93, 0x65, 0x4d, 0x0e, 0x89, 0x15, 0x09, 0x91,
0x45, 0x8b, 0xbd, 0x49, 0x45, 0xab, 0x72, 0x23, 0x69, 0x0f, 0x88, 0x42, 0x91, 0xa3, 0x72, 0xa8,
0x2a, 0x59, 0x63, 0x67, 0x30, 0x23, 0x32, 0x1e, 0xd7, 0x33, 0x46, 0x31, 0xbf, 0xa0, 0xaa, 0x54,
0xa9, 0x47, 0x8e, 0xa8, 0xbf, 0x80, 0x03, 0x3f, 0xa2, 0xed, 0x09, 0xf5, 0x54, 0xa9, 0x52, 0x54,
0x85, 0x03, 0x55, 0x7f, 0x45, 0xe5, 0x19, 0x07, 0x12, 0xca, 0x25, 0xf2, 0xfb, 0x3c, 0xcf, 0xfb,
0xfd, 0x4e, 0x40, 0xd9, 0xa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6, 0xf2, 0xaa, 0x9c, 0xf9, 0x7a, 0x55, 0xce, 0xbc, 0xfc, 0xd7, 0xc3, 0xfc, 0x30,
0x72, 0x0c, 0x97, 0x92, 0xf4, 0xed, 0x9b, 0xbf, 0x47, 0xe1, 0x71, 0x80, 0x98, 0x33, 0x21, 0xde,
0xdf, 0x83, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x70, 0x41, 0x50, 0x4a, 0x79, 0x04, 0x00, 0x00,
// 702 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x54, 0xcf, 0x4e, 0xdb, 0x48,
0x1c, 0x8e, 0x93, 0x2c, 0x7f, 0x26, 0xc0, 0x2e, 0x26, 0xcb, 0x9a, 0x1c, 0x62, 0x6f, 0xa4, 0x15,
0x59, 0xb4, 0xd8, 0x9b, 0x20, 0x56, 0x5a, 0x6e, 0x24, 0xbb, 0x07, 0xc4, 0xc2, 0x22, 0x47, 0xe5,
0x50, 0x55, 0xb2, 0xc6, 0xce, 0x60, 0x46, 0x64, 0x3c, 0xae, 0x67, 0x8c, 0x62, 0x9e, 0x00, 0x55,
0xaa, 0xd4, 0x47, 0x40, 0x7d, 0x02, 0x0e, 0xbc, 0x42, 0xa5, 0xaa, 0x27, 0xd4, 0x4b, 0x7b, 0x8a,
0xaa, 0x70, 0x00, 0xf5, 0x29, 0x2a, 0xcf, 0x38, 0x90, 0x50, 0x2e, 0xd6, 0xfc, 0xbe, 0xef, 0xfb,
0xfd, 0x9f, 0x31, 0xa8, 0x7a, 0x94, 0x11, 0xca, 0x2c, 0x18, 0xf3, 0x63, 0xeb, 0xb4, 0xe1, 0x22,
0x0e, 0x1b, 0xc2, 0x30, 0xc3, 0x88, 0x72, 0xaa, 0x2e, 0x49, 0xde, 0x14, 0x50, 0xc6, 0x57, 0x16,
0x21, 0xc1, 0x01, 0xb5, 0xc4, 0x57, 0xea, 0x2a, 0x2b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 0xff, 0xff, 0x42, 0x2a, 0x8b, 0xed, 0x71, 0x04, 0x00, 0x00,
}
func (this *Params) Equal(that interface{}) bool {
-8
View File
@@ -2,8 +2,6 @@ package types
import (
"fmt"
"sigs.k8s.io/yaml"
)
// Default parameter values
@@ -51,12 +49,6 @@ func (p Params) SigVerifyCostSecp256r1() uint64 {
return p.SigVerifyCostSecp256k1 / 2
}
// String implements the stringer interface.
func (p Params) String() string {
out, _ := yaml.Marshal(p)
return string(out)
}
func validateTxSigLimit(i interface{}) error {
v, ok := i.(uint64)
if !ok {
+2
View File
@@ -44,6 +44,8 @@ func TestParams_Validate(t *testing.T) {
require.NoError(t, got)
return
}
require.NotEmpty(t, tt.params.String())
require.Equal(t, tt.wantErr, got)
})
}
-8
View File
@@ -5,8 +5,6 @@ import (
"strings"
"time"
"sigs.k8s.io/yaml"
sdk "github.com/cosmos/cosmos-sdk/types"
)
@@ -18,12 +16,6 @@ func (p Period) Duration() time.Duration {
return time.Duration(p.Length) * time.Second
}
// String implements the fmt.Stringer interface
func (p Period) String() string {
out, _ := yaml.Marshal(p)
return string(out)
}
// TotalLength return the total length in seconds for a period
func (p Periods) TotalLength() int64 {
var total int64
+56 -51
View File
@@ -37,8 +37,9 @@ type BaseVestingAccount struct {
EndTime int64 `protobuf:"varint,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
}
func (m *BaseVestingAccount) Reset() { *m = BaseVestingAccount{} }
func (*BaseVestingAccount) ProtoMessage() {}
func (m *BaseVestingAccount) Reset() { *m = BaseVestingAccount{} }
func (m *BaseVestingAccount) String() string { return proto.CompactTextString(m) }
func (*BaseVestingAccount) ProtoMessage() {}
func (*BaseVestingAccount) Descriptor() ([]byte, []int) {
return fileDescriptor_89e80273ca606d6e, []int{0}
}
@@ -76,8 +77,9 @@ type ContinuousVestingAccount struct {
StartTime int64 `protobuf:"varint,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
}
func (m *ContinuousVestingAccount) Reset() { *m = ContinuousVestingAccount{} }
func (*ContinuousVestingAccount) ProtoMessage() {}
func (m *ContinuousVestingAccount) Reset() { *m = ContinuousVestingAccount{} }
func (m *ContinuousVestingAccount) String() string { return proto.CompactTextString(m) }
func (*ContinuousVestingAccount) ProtoMessage() {}
func (*ContinuousVestingAccount) Descriptor() ([]byte, []int) {
return fileDescriptor_89e80273ca606d6e, []int{1}
}
@@ -115,8 +117,9 @@ type DelayedVestingAccount struct {
*BaseVestingAccount `protobuf:"bytes,1,opt,name=base_vesting_account,json=baseVestingAccount,proto3,embedded=base_vesting_account" json:"base_vesting_account,omitempty"`
}
func (m *DelayedVestingAccount) Reset() { *m = DelayedVestingAccount{} }
func (*DelayedVestingAccount) ProtoMessage() {}
func (m *DelayedVestingAccount) Reset() { *m = DelayedVestingAccount{} }
func (m *DelayedVestingAccount) String() string { return proto.CompactTextString(m) }
func (*DelayedVestingAccount) ProtoMessage() {}
func (*DelayedVestingAccount) Descriptor() ([]byte, []int) {
return fileDescriptor_89e80273ca606d6e, []int{2}
}
@@ -153,8 +156,9 @@ type Period struct {
Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
}
func (m *Period) Reset() { *m = Period{} }
func (*Period) ProtoMessage() {}
func (m *Period) Reset() { *m = Period{} }
func (m *Period) String() string { return proto.CompactTextString(m) }
func (*Period) ProtoMessage() {}
func (*Period) Descriptor() ([]byte, []int) {
return fileDescriptor_89e80273ca606d6e, []int{3}
}
@@ -207,8 +211,9 @@ type PeriodicVestingAccount struct {
VestingPeriods []Period `protobuf:"bytes,3,rep,name=vesting_periods,json=vestingPeriods,proto3" json:"vesting_periods"`
}
func (m *PeriodicVestingAccount) Reset() { *m = PeriodicVestingAccount{} }
func (*PeriodicVestingAccount) ProtoMessage() {}
func (m *PeriodicVestingAccount) Reset() { *m = PeriodicVestingAccount{} }
func (m *PeriodicVestingAccount) String() string { return proto.CompactTextString(m) }
func (*PeriodicVestingAccount) ProtoMessage() {}
func (*PeriodicVestingAccount) Descriptor() ([]byte, []int) {
return fileDescriptor_89e80273ca606d6e, []int{4}
}
@@ -248,8 +253,9 @@ type PermanentLockedAccount struct {
*BaseVestingAccount `protobuf:"bytes,1,opt,name=base_vesting_account,json=baseVestingAccount,proto3,embedded=base_vesting_account" json:"base_vesting_account,omitempty"`
}
func (m *PermanentLockedAccount) Reset() { *m = PermanentLockedAccount{} }
func (*PermanentLockedAccount) ProtoMessage() {}
func (m *PermanentLockedAccount) Reset() { *m = PermanentLockedAccount{} }
func (m *PermanentLockedAccount) String() string { return proto.CompactTextString(m) }
func (*PermanentLockedAccount) ProtoMessage() {}
func (*PermanentLockedAccount) Descriptor() ([]byte, []int) {
return fileDescriptor_89e80273ca606d6e, []int{5}
}
@@ -294,45 +300,44 @@ func init() {
}
var fileDescriptor_89e80273ca606d6e = []byte{
// 599 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xbf, 0x6f, 0xd3, 0x40,
0x18, 0xf5, 0x25, 0x21, 0xd0, 0x0b, 0xf4, 0x87, 0x55, 0xa2, 0xb4, 0x52, 0x9d, 0x60, 0x18, 0xa2,
0x48, 0xb5, 0x49, 0x11, 0x4b, 0x36, 0x52, 0x84, 0x84, 0x60, 0x40, 0x11, 0x62, 0x60, 0x89, 0xce,
0xf6, 0xe1, 0x9c, 0x1a, 0xdf, 0x45, 0xbe, 0x4b, 0xa1, 0x42, 0xec, 0x88, 0xa9, 0x23, 0x12, 0x03,
0x1d, 0x51, 0xc5, 0xd0, 0x3f, 0xa3, 0x1b, 0x19, 0x99, 0x0a, 0x4a, 0x86, 0xfe, 0x1b, 0xc8, 0xe7,
0xb3, 0x6b, 0x25, 0x69, 0xb7, 0x54, 0x2c, 0x89, 0xbf, 0x1f, 0xf7, 0xbd, 0xf7, 0x3e, 0x3f, 0xeb,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, 0x44, 0x81, 0xe4, 0xb9, 0xa8, 0x6f, 0x4a, 0xcd, 0x6f, 0x15, 0x22, 0xde, 0xe6, 0xf7,
0x1c, 0x2c, 0xc7, 0x94, 0x88, 0xfb, 0xdf, 0xf9, 0x41, 0xef, 0xc0, 0x95, 0x04, 0x7d, 0x20, 0x49,
0x72, 0xf5, 0xbd, 0x1b, 0x97, 0xa1, 0xc7, 0x5a, 0xda, 0x4b, 0xd1, 0x6e, 0x62, 0xbd, 0xcb, 0xaa,
0x25, 0xae, 0xf0, 0x96, 0x95, 0x7d, 0x67, 0xf7, 0x32, 0x9b, 0x9a, 0xbf, 0x06, 0xf3, 0x27, 0x90,
0x1b, 0x0a, 0x10, 0xc5, 0x54, 0xbc, 0x64, 0xee, 0x1e, 0xf6, 0xae, 0xd3, 0x62, 0x57, 0xd1, 0x9d,
0xc3, 0xa9, 0xfd, 0xe2, 0x74, 0x6c, 0x80, 0xd1, 0xd8, 0x00, 0x7f, 0xc7, 0x06, 0x38, 0x9c, 0x18,
0xda, 0x68, 0x62, 0x68, 0xbf, 0x27, 0x86, 0xf6, 0xb6, 0x79, 0xa5, 0x4f, 0x3e, 0xa8, 0x2b, 0x45,
0x5d, 0x6f, 0xd2, 0x36, 0x4e, 0x51, 0x5e, 0x2a, 0x8f, 0xfe, 0x05, 0x00, 0x00, 0xff, 0xff, 0x18,
0x83, 0xdb, 0x67, 0xfd, 0x06, 0x00, 0x00,
// 592 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x3d, 0x6f, 0xd3, 0x40,
0x18, 0xce, 0x25, 0x21, 0xd0, 0x0b, 0xf4, 0xc3, 0x2a, 0x51, 0x5a, 0xa9, 0x4e, 0x30, 0x08, 0x85,
0x08, 0x6c, 0xa5, 0x88, 0x25, 0x1b, 0x29, 0x42, 0x42, 0x30, 0xa0, 0x08, 0x31, 0xb0, 0x44, 0x67,
0x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 0xfa, 0x0e, 0xe0, 0xcd, 0x27, 0xb8, 0x87, 0x0e, 0xd3, 0x1d, 0x5d, 0xa2, 0x94, 0xe6, 0xbd,
0x84, 0x6b, 0x75, 0x82, 0xeb, 0x5c, 0x3a, 0xd6, 0x11, 0x80, 0x85, 0x97, 0x38, 0x22, 0xcc, 0x37,
0x4a, 0xb0, 0xd0, 0xc3, 0x34, 0x10, 0x5d, 0xc9, 0x25, 0xd7, 0xd6, 0x91, 0xd1, 0x85, 0x05, 0x14,
0x4a, 0x8e, 0xcb, 0xfa, 0x8e, 0xf4, 0x7c, 0xeb, 0x6b, 0x16, 0x96, 0x14, 0x19, 0xe2, 0xfd, 0x77,
0x0e, 0x30, 0xda, 0x70, 0x2d, 0x41, 0xef, 0x4b, 0x92, 0x5c, 0x7f, 0xdd, 0xe6, 0x22, 0x74, 0xa5,
0xa5, 0xb5, 0x12, 0x6f, 0x45, 0x29, 0x5d, 0xd5, 0x2d, 0xaa, 0xc2, 0x9b, 0xf5, 0xe4, 0x4d, 0xdd,
0x9a, 0xd8, 0xcf, 0xfc, 0x15, 0x58, 0xc7, 0x40, 0x6e, 0x27, 0x44, 0x14, 0x53, 0xf1, 0x82, 0x79,
0xfb, 0xd8, 0xbf, 0x4c, 0x53, 0x2d, 0xa2, 0x3a, 0x87, 0x4f, 0xeb, 0xf9, 0xe9, 0xc8, 0x04, 0xc3,
0x91, 0x09, 0xfe, 0x8c, 0x4c, 0xf0, 0x79, 0x6c, 0x66, 0x86, 0x63, 0x33, 0xf3, 0x6b, 0x6c, 0x66,
0xde, 0x34, 0xfe, 0xe9, 0x8c, 0xf7, 0xfa, 0xe2, 0xd0, 0x97, 0x98, 0x34, 0x8a, 0x5b, 0x90, 0x57,
0xc7, 0xc3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x44, 0x3b, 0x1e, 0xcd, 0xe3, 0x06, 0x00, 0x00,
}
func (m *BaseVestingAccount) Marshal() (dAtA []byte, err error) {
-124
View File
@@ -5,9 +5,7 @@ import (
"time"
"cosmossdk.io/math"
"sigs.k8s.io/yaml"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
vestexported "github.com/cosmos/cosmos-sdk/x/auth/vesting/exported"
@@ -152,46 +150,6 @@ func (bva BaseVestingAccount) Validate() error {
return bva.BaseAccount.Validate()
}
type vestingAccountYAML struct {
Address sdk.AccAddress `json:"address"`
PubKey string `json:"public_key"`
AccountNumber uint64 `json:"account_number"`
Sequence uint64 `json:"sequence"`
OriginalVesting sdk.Coins `json:"original_vesting"`
DelegatedFree sdk.Coins `json:"delegated_free"`
DelegatedVesting sdk.Coins `json:"delegated_vesting"`
EndTime int64 `json:"end_time"`
// custom fields based on concrete vesting type which can be omitted
StartTime int64 `json:"start_time,omitempty"`
VestingPeriods Periods `json:"vesting_periods,omitempty"`
}
func (bva BaseVestingAccount) String() string {
out, _ := bva.MarshalYAML()
return out.(string)
}
// MarshalYAML returns the YAML representation of a BaseVestingAccount.
func (bva BaseVestingAccount) MarshalYAML() (interface{}, error) {
accAddr, err := sdk.AccAddressFromBech32(bva.Address)
if err != nil {
return nil, err
}
out := vestingAccountYAML{
Address: accAddr,
AccountNumber: bva.AccountNumber,
PubKey: getPKString(bva),
Sequence: bva.Sequence,
OriginalVesting: bva.OriginalVesting,
DelegatedFree: bva.DelegatedFree,
DelegatedVesting: bva.DelegatedVesting,
EndTime: bva.EndTime,
}
return marshalYaml(out)
}
// Continuous Vesting Account
var (
@@ -282,32 +240,6 @@ func (cva ContinuousVestingAccount) Validate() error {
return cva.BaseVestingAccount.Validate()
}
func (cva ContinuousVestingAccount) String() string {
out, _ := cva.MarshalYAML()
return out.(string)
}
// MarshalYAML returns the YAML representation of a ContinuousVestingAccount.
func (cva ContinuousVestingAccount) MarshalYAML() (interface{}, error) {
accAddr, err := sdk.AccAddressFromBech32(cva.Address)
if err != nil {
return nil, err
}
out := vestingAccountYAML{
Address: accAddr,
AccountNumber: cva.AccountNumber,
PubKey: getPKString(cva),
Sequence: cva.Sequence,
OriginalVesting: cva.OriginalVesting,
DelegatedFree: cva.DelegatedFree,
DelegatedVesting: cva.DelegatedVesting,
EndTime: cva.EndTime,
StartTime: cva.StartTime,
}
return marshalYaml(out)
}
// Periodic Vesting Account
var (
@@ -427,33 +359,6 @@ func (pva PeriodicVestingAccount) Validate() error {
return pva.BaseVestingAccount.Validate()
}
func (pva PeriodicVestingAccount) String() string {
out, _ := pva.MarshalYAML()
return out.(string)
}
// MarshalYAML returns the YAML representation of a PeriodicVestingAccount.
func (pva PeriodicVestingAccount) MarshalYAML() (interface{}, error) {
accAddr, err := sdk.AccAddressFromBech32(pva.Address)
if err != nil {
return nil, err
}
out := vestingAccountYAML{
Address: accAddr,
AccountNumber: pva.AccountNumber,
PubKey: getPKString(pva),
Sequence: pva.Sequence,
OriginalVesting: pva.OriginalVesting,
DelegatedFree: pva.DelegatedFree,
DelegatedVesting: pva.DelegatedVesting,
EndTime: pva.EndTime,
StartTime: pva.StartTime,
VestingPeriods: pva.VestingPeriods,
}
return marshalYaml(out)
}
// Delayed Vesting Account
var (
@@ -518,11 +423,6 @@ func (dva DelayedVestingAccount) Validate() error {
return dva.BaseVestingAccount.Validate()
}
func (dva DelayedVestingAccount) String() string {
out, _ := dva.MarshalYAML()
return out.(string)
}
//-----------------------------------------------------------------------------
// Permanent Locked Vesting Account
@@ -586,27 +486,3 @@ func (plva PermanentLockedAccount) Validate() error {
return plva.BaseVestingAccount.Validate()
}
func (plva PermanentLockedAccount) String() string {
out, _ := plva.MarshalYAML()
return out.(string)
}
type getPK interface {
GetPubKey() cryptotypes.PubKey
}
func getPKString(g getPK) string {
if pk := g.GetPubKey(); pk != nil {
return pk.String()
}
return ""
}
func marshalYaml(i interface{}) (interface{}, error) {
bz, err := yaml.Marshal(i)
if err != nil {
return nil, err
}
return string(bz), nil
}
+49 -47
View File
@@ -39,8 +39,9 @@ type Params struct {
DefaultSendEnabled bool `protobuf:"varint,2,opt,name=default_send_enabled,json=defaultSendEnabled,proto3" json:"default_send_enabled,omitempty"`
}
func (m *Params) Reset() { *m = Params{} }
func (*Params) ProtoMessage() {}
func (m *Params) Reset() { *m = Params{} }
func (m *Params) String() string { return proto.CompactTextString(m) }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
return fileDescriptor_dd052eee12edf988, []int{0}
}
@@ -93,8 +94,9 @@ type SendEnabled struct {
Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"`
}
func (m *SendEnabled) Reset() { *m = SendEnabled{} }
func (*SendEnabled) ProtoMessage() {}
func (m *SendEnabled) Reset() { *m = SendEnabled{} }
func (m *SendEnabled) String() string { return proto.CompactTextString(m) }
func (*SendEnabled) ProtoMessage() {}
func (*SendEnabled) Descriptor() ([]byte, []int) {
return fileDescriptor_dd052eee12edf988, []int{1}
}
@@ -461,49 +463,49 @@ func init() {
func init() { proto.RegisterFile("cosmos/bank/v1beta1/bank.proto", fileDescriptor_dd052eee12edf988) }
var fileDescriptor_dd052eee12edf988 = []byte{
// 664 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xbf, 0x6f, 0x13, 0x31,
0x14, 0x8e, 0x93, 0xe6, 0x47, 0x1d, 0x18, 0x30, 0x01, 0xdc, 0x0e, 0x97, 0x90, 0x01, 0x85, 0x4a,
0x4d, 0x68, 0x11, 0x4b, 0x16, 0x44, 0x0a, 0x2a, 0x19, 0x10, 0xe8, 0xaa, 0x0a, 0x89, 0x25, 0x72,
0x72, 0x6e, 0x62, 0xf5, 0xce, 0x3e, 0x9d, 0x7d, 0x55, 0xb3, 0xb2, 0x80, 0x3a, 0x31, 0x32, 0x76,
0x42, 0x88, 0x01, 0x75, 0xe8, 0xc2, 0x7f, 0x50, 0x31, 0x55, 0x4c, 0x4c, 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4e, 0xe6, 0xfb, 0xa9, 0x93, 0x79, 0x75, 0xf7, 0xaf, 0xc3,
0x4c, 0xde, 0xba, 0x99, 0x69, 0xbf, 0x60, 0x3e, 0x4d, 0xf7, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff,
0x7a, 0xa9, 0x19, 0x98, 0x4e, 0x05, 0x00, 0x00,
// 666 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0x3f, 0x6f, 0x13, 0x4b,
0x10, 0xf7, 0xda, 0xf1, 0x9f, 0xac, 0xdf, 0x2b, 0xde, 0x3e, 0xbf, 0xc7, 0x26, 0x12, 0x77, 0xd6,
0x15, 0xc8, 0x44, 0x8a, 0x8f, 0x04, 0xd1, 0xb8, 0x41, 0x38, 0x20, 0x70, 0x81, 0x40, 0x17, 0x45,
0x48, 0x34, 0xd6, 0xda, 0xb7, 0xb1, 0x57, 0xb9, 0xdb, 0x3d, 0xdd, 0xee, 0x45, 0x71, 0x4b, 0x03,
0x4a, 0xc5, 0x47, 0x88, 0xa8, 0x10, 0x05, 0x4a, 0x91, 0x86, 0x6f, 0x10, 0x51, 0x45, 0x54, 0x54,
0x01, 0x39, 0x45, 0xf2, 0x31, 0xd0, 0xed, 0xde, 0x39, 0x8e, 0x14, 0xe8, 0x90, 0x68, 0xec, 0x99,
0xf9, 0xfd, 0x76, 0x7e, 0xb3, 0x33, 0xb3, 0x07, 0xad, 0xa1, 0x90, 0xa1, 0x90, 0xee, 0x80, 0xf0,
0x1d, 0x77, 0x77, 0x6d, 0x40, 0x15, 0x59, 0xd3, 0x4e, 0x3b, 0x8a, 0x85, 0x12, 0xe8, 0x5f, 0x83,
0xb7, 0x75, 0x28, 0xc3, 0x97, 0x1b, 0x23, 0x31, 0x12, 0x1a, 0x77, 0x53, 0xcb, 0x50, 0x97, 0x97,
0x0c, 0xb5, 0x6f, 0x80, 0xec, 0x9c, 0x81, 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 0xbd, 0x1e, 0xf4, 0x73, 0x53, 0x22, 0x04,
0x17, 0xd2, 0x96, 0xe1, 0x92, 0xce, 0xad, 0xed, 0xb4, 0x3a, 0x9f, 0xc9, 0x28, 0x20, 0x13, 0xbc,
0xa0, 0xc3, 0xb9, 0x9b, 0xb2, 0x39, 0x09, 0x29, 0x2e, 0x1b, 0x76, 0x6a, 0xa3, 0xff, 0x61, 0x45,
0x4e, 0xc2, 0x81, 0x08, 0x70, 0x45, 0x47, 0x33, 0x0f, 0x2d, 0xc1, 0x52, 0x12, 0x33, 0x5c, 0xd5,
0xeb, 0x54, 0x9d, 0x9e, 0xda, 0xa5, 0x2d, 0xaf, 0xe7, 0xa5, 0x31, 0x74, 0x0b, 0xd6, 0x92, 0x98,
0xf5, 0xc7, 0x44, 0x8e, 0x71, 0x4d, 0xe3, 0xf5, 0xe9, 0xa9, 0x5d, 0xdd, 0xf2, 0x7a, 0x4f, 0x88,
0x1c, 0x7b, 0xd5, 0x24, 0x66, 0xa9, 0xd1, 0xdd, 0x38, 0x9e, 0x5a, 0xe0, 0x64, 0x6a, 0x81, 0xef,
0x53, 0x0b, 0xbc, 0x3d, 0xb3, 0x0a, 0x27, 0x67, 0x56, 0xe1, 0xeb, 0x99, 0x55, 0x78, 0x79, 0xfb,
0x97, 0xc3, 0xcc, 0xde, 0xb9, 0x9e, 0xe9, 0xa0, 0xa2, 0x3f, 0x49, 0x77, 0x7f, 0x04, 0x00, 0x00,
0xff, 0xff, 0xb4, 0x4f, 0x15, 0x3b, 0x46, 0x05, 0x00, 0x00,
}
func (this *SendEnabled) Equal(that interface{}) bool {
-17
View File
@@ -4,8 +4,6 @@ import (
"errors"
"fmt"
"sigs.k8s.io/yaml"
sdk "github.com/cosmos/cosmos-sdk/types"
)
@@ -36,16 +34,6 @@ func (p Params) Validate() error {
return validateIsBool(p.DefaultSendEnabled)
}
// String implements the Stringer interface.
func (p Params) String() string {
sendEnabled, _ := yaml.Marshal(p.SendEnabled)
d := " "
if len(sendEnabled) > 0 && sendEnabled[0] == '-' {
d = "\n"
}
return fmt.Sprintf("default_send_enabled: %t\nsend_enabled:%s%s", p.DefaultSendEnabled, d, sendEnabled)
}
// Validate gets any errors with this SendEnabled entry.
func (se SendEnabled) Validate() error {
return sdk.ValidateDenom(se.Denom)
@@ -60,11 +48,6 @@ func NewSendEnabled(denom string, sendEnabled bool) *SendEnabled {
}
}
// String implements stringer interface
func (se SendEnabled) String() string {
return fmt.Sprintf("denom: %s\nenabled: %t\n", se.Denom, se.Enabled)
}
// validateIsBool is used by the x/params module to validate that a thing is a bool.
func validateIsBool(i interface{}) error {
_, ok := i.(bool)
+6 -6
View File
@@ -22,10 +22,10 @@ func Test_sendParamEqual(t *testing.T) {
}
func Test_SendEnabledString(t *testing.T) {
paramStringTrue := "denom: foo\nenabled: true\n"
paramStringTrue := "denom:\"foo\" enabled:true "
paramTrue := NewSendEnabled("foo", true)
assert.Equal(t, paramStringTrue, paramTrue.String(), "true")
paramStringFalse := "denom: bar\nenabled: false\n"
paramStringFalse := "denom:\"bar\" "
paramFalse := NewSendEnabled("bar", false)
assert.Equal(t, paramStringFalse, paramFalse.String(), "false")
}
@@ -39,22 +39,22 @@ func Test_ParamsString(t *testing.T) {
{
name: "default true empty send enabled",
params: Params{[]*SendEnabled{}, true},
expected: "default_send_enabled: true\nsend_enabled: []\n",
expected: "default_send_enabled:true ",
},
{
name: "default false empty send enabled",
params: Params{[]*SendEnabled{}, false},
expected: "default_send_enabled: false\nsend_enabled: []\n",
expected: "",
},
{
name: "default true one true send enabled",
params: Params{[]*SendEnabled{{"foocoin", true}}, true},
expected: "default_send_enabled: true\nsend_enabled:\n- denom: foocoin\n enabled: true\n",
expected: "send_enabled:<denom:\"foocoin\" enabled:true > default_send_enabled:true ",
},
{
name: "default true one false send enabled",
params: Params{[]*SendEnabled{{"barcoin", false}}, true},
expected: "default_send_enabled: true\nsend_enabled:\n- denom: barcoin\n",
expected: "send_enabled:<denom:\"barcoin\" > default_send_enabled:true ",
},
}
for _, tc := range tests {
+14 -13
View File
@@ -76,8 +76,9 @@ type Owner struct {
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (m *Owner) Reset() { *m = Owner{} }
func (*Owner) ProtoMessage() {}
func (m *Owner) Reset() { *m = Owner{} }
func (m *Owner) String() string { return proto.CompactTextString(m) }
func (*Owner) ProtoMessage() {}
func (*Owner) Descriptor() ([]byte, []int) {
return fileDescriptor_6308261edd8470a9, []int{1}
}
@@ -165,25 +166,25 @@ func init() {
}
var fileDescriptor_6308261edd8470a9 = []byte{
// 277 bytes of a gzipped FileDescriptorProto
// 274 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4a, 0xce, 0x2f, 0xce,
0xcd, 0x2f, 0xd6, 0x4f, 0x4e, 0x2c, 0x48, 0x4c, 0xca, 0xcc, 0xc9, 0x2c, 0xa9, 0xd4, 0x2f, 0x33,
0x4c, 0x4a, 0x2d, 0x49, 0x34, 0x44, 0x12, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x84,
0xa8, 0xd5, 0x43, 0x92, 0x80, 0xaa, 0x95, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd2, 0x07,
0xb1, 0x20, 0x1a, 0xa4, 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x48, 0x49,
0x83, 0x8b, 0xcb, 0x19, 0xae, 0x5d, 0x48, 0x84, 0x8b, 0x35, 0x33, 0x2f, 0x25, 0xb5, 0x42, 0x82,
0x51, 0x81, 0x51, 0x83, 0x25, 0x08, 0xc2, 0xb1, 0x62, 0x99, 0xb1, 0x40, 0x9e, 0x41, 0xc9, 0x96,
0x51, 0x81, 0x51, 0x83, 0x25, 0x08, 0xc2, 0xb1, 0x62, 0x99, 0xb1, 0x40, 0x9e, 0x41, 0xc9, 0x92,
0x8b, 0xd5, 0xbf, 0x3c, 0x2f, 0xb5, 0x48, 0x48, 0x8c, 0x8b, 0x2d, 0x37, 0x3f, 0xa5, 0x34, 0x27,
0x15, 0xac, 0x8a, 0x33, 0x08, 0xca, 0x13, 0x12, 0xe2, 0x62, 0xc9, 0x4b, 0xcc, 0x4d, 0x95, 0x60,
0x02, 0x8b, 0x82, 0xd9, 0x56, 0x1c, 0x1d, 0x0b, 0xe4, 0x19, 0xc0, 0xda, 0xc3, 0xb9, 0x04, 0x10,
0x16, 0x81, 0x0d, 0x2a, 0x16, 0x72, 0xe6, 0x62, 0xcb, 0x07, 0xb3, 0x24, 0x18, 0x15, 0x98, 0x35,
0xb8, 0x8d, 0x14, 0xf4, 0x70, 0xfa, 0x48, 0x0f, 0xac, 0xc5, 0x89, 0xf3, 0xc4, 0x3d, 0x79, 0x86,
0x15, 0xcf, 0x37, 0x68, 0x31, 0x06, 0x41, 0xb5, 0x3a, 0x79, 0x9e, 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, 0x7e, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae,
0x3e, 0x2c, 0x58, 0xc1, 0x94, 0x6e, 0x71, 0x4a, 0xb6, 0x7e, 0x05, 0x72, 0x18, 0x97, 0x54, 0x16,
0xa4, 0x16, 0x27, 0xb1, 0x81, 0xc3, 0xc4, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x27, 0x8c, 0xba,
0x4e, 0x85, 0x01, 0x00, 0x00,
0x02, 0x8b, 0x82, 0xd9, 0x56, 0x2c, 0x1d, 0x20, 0xad, 0xe1, 0x5c, 0x02, 0x08, 0x4b, 0xc0, 0x86,
0x14, 0x0b, 0x39, 0x73, 0xb1, 0xe5, 0x83, 0x59, 0x12, 0x8c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0x0a,
0x7a, 0x38, 0x7d, 0xa3, 0x07, 0xd6, 0xe2, 0xc4, 0x79, 0xe2, 0x9e, 0x3c, 0xc3, 0x8a, 0xe7, 0x1b,
0xb4, 0x18, 0x83, 0xa0, 0x5a, 0x9d, 0x3c, 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, 0x3f, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0x16, 0xa4,
0x60, 0x4a, 0xb7, 0x38, 0x25, 0x5b, 0xbf, 0x02, 0x39, 0x7c, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93,
0xd8, 0xc0, 0xe1, 0x61, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x65, 0xb9, 0x70, 0x63, 0x81, 0x01,
0x00, 0x00,
}
func (m *Capability) Marshal() (dAtA []byte, err error) {
-7
View File
@@ -4,8 +4,6 @@ import (
"fmt"
"sort"
"sigs.k8s.io/yaml"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
@@ -31,11 +29,6 @@ func (o Owner) Key() string {
return fmt.Sprintf("%s/%s", o.Module, o.Name)
}
func (o Owner) String() string {
bz, _ := yaml.Marshal(o)
return string(bz)
}
func NewCapabilityOwners() *CapabilityOwners {
return &CapabilityOwners{Owners: make([]Owner, 0)}
}
+1 -1
View File
@@ -20,7 +20,7 @@ func TestCapabilityKey(t *testing.T) {
func TestOwner(t *testing.T) {
o := types.NewOwner("bank", "send")
require.Equal(t, "bank/send", o.Key())
require.Equal(t, "module: bank\nname: send\n", o.String())
require.Equal(t, "module:\"bank\" name:\"send\" ", o.String())
}
func TestCapabilityOwners_Set(t *testing.T) {
+64 -63
View File
@@ -37,8 +37,9 @@ type Params struct {
WithdrawAddrEnabled bool `protobuf:"varint,4,opt,name=withdraw_addr_enabled,json=withdrawAddrEnabled,proto3" json:"withdraw_addr_enabled,omitempty"`
}
func (m *Params) Reset() { *m = Params{} }
func (*Params) ProtoMessage() {}
func (m *Params) Reset() { *m = Params{} }
func (m *Params) String() string { return proto.CompactTextString(m) }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
return fileDescriptor_cd78a31ea281a992, []int{0}
}
@@ -637,69 +638,69 @@ func init() {
}
var fileDescriptor_cd78a31ea281a992 = []byte{
// 992 bytes of a gzipped FileDescriptorProto
// 991 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x4f, 0x6f, 0x1b, 0x45,
0x14, 0xf7, 0x34, 0x8e, 0x93, 0x4c, 0x69, 0x42, 0x27, 0x4e, 0xea, 0xb8, 0x95, 0x6d, 0xad, 0x44,
0x49, 0x43, 0x63, 0x93, 0x22, 0x24, 0x64, 0x21, 0xa4, 0xd8, 0x0e, 0x82, 0x53, 0xa3, 0x0d, 0x02,
0x14, 0xf7, 0x34, 0x8e, 0x93, 0x4c, 0x69, 0x42, 0x27, 0x4e, 0xea, 0xb8, 0x95, 0x6d, 0xad, 0xd4,
0x12, 0x42, 0x63, 0x93, 0x22, 0x24, 0x64, 0x21, 0xa4, 0xd8, 0x0e, 0x82, 0x53, 0xa3, 0x0d, 0x02,
0xc4, 0x65, 0x35, 0xde, 0x9d, 0xd8, 0xa3, 0xee, 0xce, 0x2c, 0x33, 0x63, 0x27, 0x3d, 0x70, 0xaf,
0x7a, 0x00, 0x8e, 0x15, 0xa7, 0x08, 0x2e, 0x15, 0xa7, 0x1c, 0xf2, 0x21, 0x2a, 0x4e, 0x55, 0x0f,
0x80, 0x2a, 0x14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, 0x8f, 0x5d, 0xe6, 0x99, 0xd4, 0xf7, 0x27, 0xfb, 0x2b, 0x67, 0x63, 0xd6,
0x0a, 0xb3, 0x70, 0x7e, 0x07, 0x70, 0xc9, 0x8a, 0xa3, 0x9c, 0xa5, 0x32, 0xed, 0x41, 0xb6, 0x01,
0xaf, 0x0e, 0xbf, 0x05, 0x7d, 0x92, 0x11, 0x29, 0xed, 0xad, 0xa0, 0xf0, 0xec, 0x60, 0x35, 0x6f,
0x59, 0xad, 0x9b, 0xcc, 0x96, 0x12, 0x7a, 0xde, 0x0c, 0x3f, 0x6e, 0x1b, 0x47, 0x0c, 0xe6, 0xd2,
0x73, 0x7e, 0x9c, 0x5d, 0x6c, 0x51, 0xea, 0xd3, 0x76, 0x7f, 0x81, 0xf3, 0x2b, 0x80, 0x37, 0xff,
0xbb, 0x91, 0x3f, 0xa3, 0xaa, 0xdb, 0x22, 0x31, 0x97, 0x54, 0x8d, 0xa9, 0xa7, 0x17, 0x47, 0x7a,
0x5a, 0xa7, 0xec, 0x0a, 0x15, 0xe0, 0x54, 0x60, 0x80, 0x0b, 0x93, 0x49, 0x62, 0xb0, 0xac, 0xdf,
0x1a, 0x70, 0xbf, 0xb8, 0x2f, 0x1b, 0x77, 0x1f, 0x1f, 0x95, 0xc0, 0x93, 0xa3, 0x12, 0x78, 0x7a,
0x54, 0x02, 0x7f, 0x1e, 0x95, 0xc0, 0xb7, 0xc7, 0xa5, 0xcc, 0xd3, 0xe3, 0x52, 0xe6, 0xb7, 0xe3,
0x52, 0xe6, 0x8b, 0xb5, 0x0b, 0xbd, 0x3b, 0x73, 0xb5, 0x48, 0xac, 0x6c, 0xe7, 0x92, 0xfb, 0xe0,
0x3b, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x84, 0xd7, 0x2f, 0xc2, 0x0a, 0x00, 0x00,
}
func (this *Params) Equal(that interface{}) bool {
-6
View File
@@ -4,7 +4,6 @@ import (
"fmt"
"cosmossdk.io/math"
"sigs.k8s.io/yaml"
sdk "github.com/cosmos/cosmos-sdk/types"
)
@@ -19,11 +18,6 @@ func DefaultParams() Params {
}
}
func (p Params) String() string {
out, _ := yaml.Marshal(p)
return string(out)
}
// ValidateBasic performs basic validation on distribution parameters.
func (p Params) ValidateBasic() error {
if p.CommunityTax.IsNegative() || p.CommunityTax.GT(math.LegacyOneDec()) {
-6
View File
@@ -7,7 +7,6 @@ import (
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto/tmhash"
tmbytes "github.com/tendermint/tendermint/libs/bytes"
"sigs.k8s.io/yaml"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/evidence/exported"
@@ -27,11 +26,6 @@ func (e *Equivocation) Route() string { return RouteEquivocation }
// Type returns the Evidence Handler type for an Equivocation type.
func (e *Equivocation) Type() string { return TypeEquivocation }
func (e *Equivocation) String() string {
bz, _ := yaml.Marshal(e)
return string(bz)
}
// Hash returns the hash of an Equivocation object.
func (e *Equivocation) Hash() tmbytes.HexBytes {
bz, err := e.Marshal()
+12 -11
View File
@@ -38,8 +38,9 @@ type Equivocation struct {
ConsensusAddress string `protobuf:"bytes,4,opt,name=consensus_address,json=consensusAddress,proto3" json:"consensus_address,omitempty"`
}
func (m *Equivocation) Reset() { *m = Equivocation{} }
func (*Equivocation) ProtoMessage() {}
func (m *Equivocation) Reset() { *m = Equivocation{} }
func (m *Equivocation) String() string { return proto.CompactTextString(m) }
func (*Equivocation) ProtoMessage() {}
func (*Equivocation) Descriptor() ([]byte, []int) {
return fileDescriptor_dd143e71a177f0dd, []int{0}
}
@@ -79,7 +80,7 @@ func init() {
}
var fileDescriptor_dd143e71a177f0dd = []byte{
// 361 bytes of a gzipped FileDescriptorProto
// 356 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0xce, 0x2f, 0xce,
0xcd, 0x2f, 0xd6, 0x4f, 0x2d, 0xcb, 0x4c, 0x49, 0xcd, 0x4b, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a,
0x2d, 0x49, 0x34, 0x84, 0x0b, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x89, 0x43, 0xd4, 0xe9,
@@ -87,7 +88,7 @@ var fileDescriptor_dd143e71a177f0dd = []byte{
0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x45, 0xe5, 0xd3, 0xf3, 0xf3,
0xd3, 0x73, 0x52, 0xf5, 0xc1, 0xbc, 0xa4, 0xd2, 0x34, 0xfd, 0x92, 0xcc, 0xdc, 0xd4, 0xe2, 0x92,
0xc4, 0xdc, 0x02, 0xa8, 0x02, 0x49, 0x88, 0x15, 0xf1, 0x10, 0x9d, 0x50, 0xfb, 0xc0, 0x1c, 0xa5,
0x37, 0x8c, 0x5c, 0x3c, 0xae, 0x85, 0xa5, 0x99, 0x65, 0xf9, 0xc9, 0x89, 0x25, 0x99, 0xf9, 0x79,
0x17, 0x8c, 0x5c, 0x3c, 0xae, 0x85, 0xa5, 0x99, 0x65, 0xf9, 0xc9, 0x89, 0x25, 0x99, 0xf9, 0x79,
0x42, 0x62, 0x5c, 0x6c, 0x19, 0xa9, 0x99, 0xe9, 0x19, 0x25, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc,
0x41, 0x50, 0x9e, 0x90, 0x2d, 0x17, 0x0b, 0xc8, 0x58, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x6e, 0x23,
0x29, 0x3d, 0x88, 0x9d, 0x7a, 0x30, 0x3b, 0xf5, 0x42, 0x60, 0x76, 0x3a, 0xf1, 0x9e, 0xb8, 0x27,
@@ -96,13 +97,13 @@ var fileDescriptor_dd143e71a177f0dd = []byte{
0x82, 0xc9, 0xf9, 0x79, 0xc5, 0xa9, 0x79, 0xc5, 0xa5, 0xc5, 0xf1,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x63, 0x39, 0x86, 0x0b,
0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2,
0x4b, 0xce, 0xcf, 0x85, 0x86, 0x90, 0x3e, 0x92, 0x41, 0x15, 0x88, 0x68, 0x2c, 0xa9, 0x2c, 0x48,
0x2d, 0x4e, 0x62, 0x03, 0x7b, 0xdc, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x73, 0xbd, 0x43, 0x8e,
0xe6, 0x01, 0x00, 0x00,
}
func (m *Equivocation) Marshal() (dAtA []byte, err error) {
+2 -2
View File
@@ -30,7 +30,7 @@ func TestEquivocation_Valid(t *testing.T) {
require.Equal(t, e.Type(), types.TypeEquivocation)
require.Equal(t, e.Route(), types.RouteEquivocation)
require.Equal(t, e.Hash().String(), "1E10F9267BEA3A9A4AB5302C2C510CC1AFD7C54E232DA5B2E3360DFAFACF7A76")
require.Equal(t, e.String(), "consensus_address: cosmosvalcons1vehk7h6lta047h6lta047h6lta047h6l8m4r53\nheight: 100\npower: 1000000\ntime: \"2006-01-02T15:04:05Z\"\n")
require.Equal(t, "height:100 time:<seconds:1136214245 > power:1000000 consensus_address:\"cosmosvalcons1vehk7h6lta047h6lta047h6lta047h6l8m4r53\" ", e.String())
require.NoError(t, e.ValidateBasic())
require.Equal(t, int64(0), e.GetTotalPower())
@@ -41,7 +41,7 @@ func TestEquivocation_Valid(t *testing.T) {
require.Equal(t, types.TypeEquivocation, e.Type())
require.Equal(t, types.RouteEquivocation, e.Route())
require.Equal(t, "1E10F9267BEA3A9A4AB5302C2C510CC1AFD7C54E232DA5B2E3360DFAFACF7A76", e.Hash().String())
require.Equal(t, "consensus_address: cosmosvalcons1vehk7h6lta047h6lta047h6lta047h6l8m4r53\nheight: 100\npower: 1000000\ntime: \"2006-01-02T15:04:05Z\"\n", e.String())
require.Equal(t, "height:100 time:<seconds:1136214245 > power:1000000 consensus_address:\"cosmosvalcons1vehk7h6lta047h6lta047h6lta047h6l8m4r53\" ", e.String())
require.NoError(t, e.ValidateBasic())
}
+7 -21
View File
@@ -74,13 +74,8 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposal() {
if testCase.expPass {
suite.Require().NoError(err)
// Instead of using MashalJSON, we could compare .String() output too.
// https://github.com/cosmos/cosmos-sdk/issues/10965
expJSON, err := suite.cdc.MarshalJSON(&expProposal)
suite.Require().NoError(err)
actualJSON, err := suite.cdc.MarshalJSON(proposalRes.Proposal)
suite.Require().NoError(err)
suite.Require().Equal(expJSON, actualJSON)
suite.Require().NotEmpty(proposalRes.Proposal.String())
suite.Require().Equal(proposalRes.Proposal.String(), expProposal.String())
} else {
suite.Require().Error(err)
suite.Require().Nil(proposalRes)
@@ -150,13 +145,8 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposal() {
if testCase.expPass {
suite.Require().NoError(err)
// Instead of using MashalJSON, we could compare .String() output too.
// https://github.com/cosmos/cosmos-sdk/issues/10965
expJSON, err := suite.cdc.MarshalJSON(&expProposal)
suite.Require().NoError(err)
actualJSON, err := suite.cdc.MarshalJSON(&proposalRes.Proposal)
suite.Require().NoError(err)
suite.Require().Equal(expJSON, actualJSON)
suite.Require().NotEmpty(proposalRes.Proposal.String())
suite.Require().Equal(proposalRes.Proposal.String(), expProposal.String())
} else {
suite.Require().Error(err)
suite.Require().Nil(proposalRes)
@@ -299,14 +289,9 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() {
suite.Require().Len(proposals.GetProposals(), len(expRes.GetProposals()))
for i := 0; i < len(proposals.GetProposals()); i++ {
// Instead of using MashalJSON, we could compare .String() output too.
// https://github.com/cosmos/cosmos-sdk/issues/10965
expJSON, err := suite.cdc.MarshalJSON(expRes.GetProposals()[i])
suite.Require().NoError(err)
actualJSON, err := suite.cdc.MarshalJSON(proposals.GetProposals()[i])
suite.Require().NoError(err)
suite.Require().Equal(expJSON, actualJSON)
suite.Require().NotEmpty(proposals.GetProposals()[i])
suite.Require().Equal(expRes.GetProposals()[i].String(), proposals.GetProposals()[i].String())
}
} else {
@@ -1266,6 +1251,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposits() {
}
func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposits() {
suite.reset()
ctx, queryClient, addrs := suite.ctx, suite.legacyQueryClient, suite.addrs
var (
+2 -3
View File
@@ -32,13 +32,12 @@ func TestProposalStatus_Format(t *testing.T) {
// Here, we're creating a proposal which has a Msg (1st any) with a legacy
// content (2nd any).
func TestNestedAnys(t *testing.T) {
// TODO https://github.com/cosmos/cosmos-sdk/issues/10965
t.Skip()
testProposal := v1beta1.NewTextProposal("Proposal", "testing proposal")
msgContent, err := v1.NewLegacyContent(testProposal, "cosmos1govacct")
require.NoError(t, err)
proposal, err := v1.NewProposal([]sdk.Msg{msgContent}, 1, "", time.Now(), time.Now())
require.NoError(t, err)
require.Equal(t, "TODO Fix panic here", proposal.String())
require.NotPanics(t, func() { _ = proposal.String() })
require.NotEmpty(t, proposal.String())
}
+1 -8
View File
@@ -3,8 +3,6 @@ package v1beta1
import (
"fmt"
"sigs.k8s.io/yaml"
sdk "github.com/cosmos/cosmos-sdk/types"
)
@@ -15,14 +13,9 @@ func NewDeposit(proposalID uint64, depositor sdk.AccAddress, amount sdk.Coins) D
return Deposit{proposalID, depositor.String(), amount}
}
func (d Deposit) String() string {
out, _ := yaml.Marshal(d)
return string(out)
}
// Empty returns whether a deposit is empty.
func (d Deposit) Empty() bool {
return d.String() == Deposit{}.String()
return d.String() == (&Deposit{}).String()
}
// Deposits is a collection of Deposit objects
+115 -107
View File
@@ -130,8 +130,9 @@ type WeightedVoteOption struct {
Weight github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=weight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"weight"`
}
func (m *WeightedVoteOption) Reset() { *m = WeightedVoteOption{} }
func (*WeightedVoteOption) ProtoMessage() {}
func (m *WeightedVoteOption) Reset() { *m = WeightedVoteOption{} }
func (m *WeightedVoteOption) String() string { return proto.CompactTextString(m) }
func (*WeightedVoteOption) ProtoMessage() {}
func (*WeightedVoteOption) Descriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []int{0}
}
@@ -169,8 +170,9 @@ type TextProposal struct {
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
}
func (m *TextProposal) Reset() { *m = TextProposal{} }
func (*TextProposal) ProtoMessage() {}
func (m *TextProposal) Reset() { *m = TextProposal{} }
func (m *TextProposal) String() string { return proto.CompactTextString(m) }
func (*TextProposal) ProtoMessage() {}
func (*TextProposal) Descriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []int{1}
}
@@ -209,8 +211,9 @@ type Deposit struct {
Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
}
func (m *Deposit) Reset() { *m = Deposit{} }
func (*Deposit) ProtoMessage() {}
func (m *Deposit) Reset() { *m = Deposit{} }
func (m *Deposit) String() string { return proto.CompactTextString(m) }
func (*Deposit) ProtoMessage() {}
func (*Deposit) Descriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []int{2}
}
@@ -257,8 +260,9 @@ type Proposal struct {
VotingEndTime time.Time `protobuf:"bytes,9,opt,name=voting_end_time,json=votingEndTime,proto3,stdtime" json:"voting_end_time"`
}
func (m *Proposal) Reset() { *m = Proposal{} }
func (*Proposal) ProtoMessage() {}
func (m *Proposal) Reset() { *m = Proposal{} }
func (m *Proposal) String() string { return proto.CompactTextString(m) }
func (*Proposal) ProtoMessage() {}
func (*Proposal) Descriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []int{3}
}
@@ -297,8 +301,9 @@ type TallyResult struct {
NoWithVeto github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=no_with_veto,json=noWithVeto,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"no_with_veto"`
}
func (m *TallyResult) Reset() { *m = TallyResult{} }
func (*TallyResult) ProtoMessage() {}
func (m *TallyResult) Reset() { *m = TallyResult{} }
func (m *TallyResult) String() string { return proto.CompactTextString(m) }
func (*TallyResult) ProtoMessage() {}
func (*TallyResult) Descriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []int{4}
}
@@ -342,8 +347,9 @@ type Vote struct {
Options []WeightedVoteOption `protobuf:"bytes,4,rep,name=options,proto3" json:"options"`
}
func (m *Vote) Reset() { *m = Vote{} }
func (*Vote) ProtoMessage() {}
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_6e82113c1a9a4b7c, []int{5}
}
@@ -383,8 +389,9 @@ type DepositParams struct {
MaxDepositPeriod time.Duration `protobuf:"bytes,2,opt,name=max_deposit_period,json=maxDepositPeriod,proto3,stdduration" json:"max_deposit_period,omitempty"`
}
func (m *DepositParams) Reset() { *m = DepositParams{} }
func (*DepositParams) ProtoMessage() {}
func (m *DepositParams) Reset() { *m = DepositParams{} }
func (m *DepositParams) String() string { return proto.CompactTextString(m) }
func (*DepositParams) ProtoMessage() {}
func (*DepositParams) Descriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []int{6}
}
@@ -421,8 +428,9 @@ type VotingParams struct {
VotingPeriod time.Duration `protobuf:"bytes,1,opt,name=voting_period,json=votingPeriod,proto3,stdduration" json:"voting_period,omitempty"`
}
func (m *VotingParams) Reset() { *m = VotingParams{} }
func (*VotingParams) ProtoMessage() {}
func (m *VotingParams) Reset() { *m = VotingParams{} }
func (m *VotingParams) String() string { return proto.CompactTextString(m) }
func (*VotingParams) ProtoMessage() {}
func (*VotingParams) Descriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []int{7}
}
@@ -465,8 +473,9 @@ type TallyParams struct {
VetoThreshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=veto_threshold,json=vetoThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"veto_threshold,omitempty"`
}
func (m *TallyParams) Reset() { *m = TallyParams{} }
func (*TallyParams) ProtoMessage() {}
func (m *TallyParams) Reset() { *m = TallyParams{} }
func (m *TallyParams) String() string { return proto.CompactTextString(m) }
func (*TallyParams) ProtoMessage() {}
func (*TallyParams) Descriptor() ([]byte, []int) {
return fileDescriptor_6e82113c1a9a4b7c, []int{8}
}
@@ -514,95 +523,94 @@ func init() {
func init() { proto.RegisterFile("cosmos/gov/v1beta1/gov.proto", fileDescriptor_6e82113c1a9a4b7c) }
var fileDescriptor_6e82113c1a9a4b7c = []byte{
// 1400 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x6f, 0x13, 0xc7,
0x17, 0xf7, 0xda, 0xce, 0xaf, 0xb1, 0x13, 0x96, 0x21, 0x5f, 0xe2, 0xf8, 0x4b, 0x77, 0x57, 0xa9,
0x84, 0xa2, 0x94, 0xd8, 0x10, 0x54, 0xa4, 0x86, 0x5e, 0xec, 0x78, 0x69, 0x4d, 0x91, 0xed, 0xae,
0x17, 0x53, 0x38, 0x74, 0xb5, 0xf6, 0x0e, 0xf6, 0xb6, 0xde, 0x1d, 0xe3, 0x1d, 0x87, 0xe4, 0xd6,
0x4b, 0x25, 0xe4, 0x13, 0x47, 0x2e, 0x96, 0x10, 0xbd, 0x54, 0x3d, 0x71, 0xe0, 0x1f, 0xe8, 0xa5,
0x42, 0x55, 0x0f, 0x88, 0x43, 0x85, 0x7a, 0x08, 0x25, 0x48, 0x85, 0xf2, 0x47, 0x54, 0xd5, 0xce,
0xcc, 0xc6, 0x1b, 0x27, 0x6a, 0x70, 0x51, 0x2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df, 0x79, 0x0d, 0x00, 0x00,
// 1391 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x41, 0x6f, 0x1a, 0xd7,
0x16, 0x66, 0x00, 0x63, 0x73, 0x01, 0x67, 0x72, 0xe3, 0x17, 0x63, 0x5e, 0x1e, 0x33, 0xe2, 0x49,
0x91, 0xe5, 0x17, 0x43, 0xe2, 0xe8, 0x45, 0xaa, 0xd3, 0x0d, 0x98, 0x49, 0x4b, 0x1a, 0x01, 0x1d,
0x26, 0xa4, 0xc9, 0xa2, 0xa3, 0x81, 0xb9, 0x81, 0x69, 0x99, 0xb9, 0x84, 0xb9, 0x38, 0xf6, 0x0f,
0xa8, 0x14, 0xb1, 0xca, 0xb2, 0x1b, 0xa4, 0x28, 0xdd, 0x54, 0x5d, 0x65, 0x91, 0x3f, 0xd0, 0x4d,
0x15, 0x55, 0x5d, 0x44, 0x59, 0x54, 0x55, 0x17, 0x4e, 0x9b, 0x48, 0x4d, 0x9a, 0x9f, 0xd0, 0x55,
0x35, 0xf7, 0xde, 0x31, 0x63, 0x6c, 0xd5, 0xa1, 0x51, 0x37, 0xf6, 0x70, 0xcf, 0x77, 0xbe, 0xef,
0x9c, 0xc3, 0x39, 0x67, 0x2e, 0xe0, 0x4c, 0x1b, 0xbb, 0x36, 0x76, 0x0b, 0x1d, 0xbc, 0x5d, 0xd8,
0xbe, 0xd0, 0x42, 0xc4, 0xb8, 0xe0, 0x3d, 0xe7, 0xfb, 0x03, 0x4c, 0x30, 0x84, 0xcc, 0x9a, 0xf7,
0x4e, 0xb8, 0x35, 0x93, 0xe5, 0x1e, 0x2d, 0xc3, 0x45, 0xfb, 0x2e, 0x6d, 0x6c, 0x39, 0xcc, 0x27,
0xb3, 0xd4, 0xc1, 0x1d, 0x4c, 0x1f, 0x0b, 0xde, 0x13, 0x3f, 0x95, 0x3a, 0x18, 0x77, 0x7a, 0xa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 0x17, 0x99, 0xf0, 0x3c, 0x48, 0x4f, 0xa3, 0x55, 0xe5, 0xaa, 0xb2, 0xa5, 0x29, 0x65,
0x31, 0x9a, 0x81, 0xa3, 0xb1, 0xbc, 0xc8, 0x2f, 0x55, 0xe8, 0x33, 0xd4, 0x26, 0xe8, 0x48, 0xfe,
0x2b, 0xc5, 0xca, 0x35, 0xa5, 0x2c, 0xce, 0x05, 0xf9, 0xaf, 0x18, 0x56, 0x0f, 0x99, 0xac, 0x9c,
0xa5, 0xea, 0x93, 0x5f, 0xb3, 0xa1, 0x27, 0x2f, 0xb2, 0xc2, 0xd3, 0x17, 0x59, 0xe1, 0x97, 0x17,
0x59, 0xe1, 0xfe, 0xcb, 0x6c, 0xe8, 0xe9, 0xcb, 0x6c, 0xe8, 0xa7, 0x97, 0xd9, 0xd0, 0xad, 0xf3,
0x7f, 0xd9, 0xa8, 0x3b, 0xf4, 0xa7, 0x14, 0x6d, 0x57, 0xff, 0xd7, 0x51, 0x2b, 0x46, 0x37, 0xc2,
0xc5, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xbe, 0xf8, 0x52, 0x65, 0x6d, 0x0d, 0x00, 0x00,
}
func (this *TextProposal) Equal(that interface{}) bool {
-25
View File
@@ -5,7 +5,6 @@ import (
"cosmossdk.io/math"
"github.com/cosmos/gogoproto/proto"
"sigs.k8s.io/yaml"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
@@ -122,12 +121,6 @@ func (m MsgSubmitProposal) GetSigners() []sdk.AccAddress {
return []sdk.AccAddress{proposer}
}
// String implements the Stringer interface
func (m MsgSubmitProposal) String() string {
out, _ := yaml.Marshal(m)
return string(out)
}
// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (m MsgSubmitProposal) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error {
var content Content
@@ -162,12 +155,6 @@ func (msg MsgDeposit) ValidateBasic() error {
return nil
}
// String implements the Stringer interface
func (msg MsgDeposit) String() string {
out, _ := yaml.Marshal(msg)
return string(out)
}
// GetSignBytes implements Msg
func (msg MsgDeposit) GetSignBytes() []byte {
bz := codec.ModuleCdc.MustMarshalJSON(&msg)
@@ -205,12 +192,6 @@ func (msg MsgVote) ValidateBasic() error {
return nil
}
// String implements the Stringer interface
func (msg MsgVote) String() string {
out, _ := yaml.Marshal(msg)
return string(out)
}
// GetSignBytes implements Msg
func (msg MsgVote) GetSignBytes() []byte {
bz := codec.ModuleCdc.MustMarshalJSON(&msg)
@@ -269,12 +250,6 @@ func (msg MsgVoteWeighted) ValidateBasic() error {
return nil
}
// String implements the Stringer interface
func (msg MsgVoteWeighted) String() string {
out, _ := yaml.Marshal(msg)
return string(out)
}
// GetSignBytes implements Msg
func (msg MsgVoteWeighted) GetSignBytes() []byte {
bz := codec.ModuleCdc.MustMarshalJSON(&msg)
-20
View File
@@ -3,8 +3,6 @@ package v1beta1
import (
"time"
"sigs.k8s.io/yaml"
sdk "github.com/cosmos/cosmos-sdk/types"
)
@@ -37,12 +35,6 @@ func DefaultDepositParams() DepositParams {
)
}
// String implements stringer insterface
func (dp DepositParams) String() string {
out, _ := yaml.Marshal(dp)
return string(out)
}
// Equal checks equality of DepositParams
func (dp DepositParams) Equal(dp2 DepositParams) bool {
return dp.MinDeposit.IsEqual(dp2.MinDeposit) && dp.MaxDepositPeriod == dp2.MaxDepositPeriod
@@ -67,12 +59,6 @@ func (tp TallyParams) Equal(other TallyParams) bool {
return tp.Quorum.Equal(other.Quorum) && tp.Threshold.Equal(other.Threshold) && tp.VetoThreshold.Equal(other.VetoThreshold)
}
// String implements stringer insterface
func (tp TallyParams) String() string {
out, _ := yaml.Marshal(tp)
return string(out)
}
// NewVotingParams creates a new VotingParams object
func NewVotingParams(votingPeriod time.Duration) VotingParams {
return VotingParams{
@@ -90,12 +76,6 @@ func (vp VotingParams) Equal(other VotingParams) bool {
return vp.VotingPeriod == other.VotingPeriod
}
// String implements stringer interface
func (vp VotingParams) String() string {
out, _ := yaml.Marshal(vp)
return string(out)
}
// Params returns all of the governance params
type Params struct {
VotingParams VotingParams `json:"voting_params" yaml:"voting_params"`
-13
View File
@@ -6,7 +6,6 @@ import (
"time"
"github.com/cosmos/gogoproto/proto"
"sigs.k8s.io/yaml"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
@@ -41,12 +40,6 @@ func NewProposal(content Content, id uint64, submitTime, depositEndTime time.Tim
return p, nil
}
// String implements stringer interface
func (p Proposal) String() string {
out, _ := yaml.Marshal(p)
return string(out)
}
// GetContent returns the proposal Content
func (p Proposal) GetContent() Content {
content, ok := p.Content.GetCachedValue().(Content)
@@ -180,12 +173,6 @@ func (tp *TextProposal) ProposalType() string { return ProposalTypeText }
// ValidateBasic validates the content's title and description of the proposal
func (tp *TextProposal) ValidateBasic() error { return ValidateAbstract(tp) }
// String implements Stringer interface
func (tp TextProposal) String() string {
out, _ := yaml.Marshal(tp)
return string(out)
}
func ValidProposalStatus(status ProposalStatus) bool {
if status == StatusDepositPeriod ||
status == StatusVotingPeriod ||
-7
View File
@@ -2,7 +2,6 @@ package v1beta1
import (
"cosmossdk.io/math"
"sigs.k8s.io/yaml"
sdk "github.com/cosmos/cosmos-sdk/types"
)
@@ -61,9 +60,3 @@ func (tr TallyResult) Equals(comp TallyResult) bool {
tr.No.Equal(comp.No) &&
tr.NoWithVeto.Equal(comp.NoWithVeto)
}
// String implements stringer interface
func (tr TallyResult) String() string {
out, _ := yaml.Marshal(tr)
return string(out)
}
+60 -56
View File
@@ -42,8 +42,9 @@ type MsgSubmitProposal struct {
Proposer string `protobuf:"bytes,3,opt,name=proposer,proto3" json:"proposer,omitempty"`
}
func (m *MsgSubmitProposal) Reset() { *m = MsgSubmitProposal{} }
func (*MsgSubmitProposal) ProtoMessage() {}
func (m *MsgSubmitProposal) Reset() { *m = MsgSubmitProposal{} }
func (m *MsgSubmitProposal) String() string { return proto.CompactTextString(m) }
func (*MsgSubmitProposal) ProtoMessage() {}
func (*MsgSubmitProposal) Descriptor() ([]byte, []int) {
return fileDescriptor_3c053992595e3dce, []int{0}
}
@@ -126,8 +127,9 @@ type MsgVote struct {
Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=cosmos.gov.v1beta1.VoteOption" json:"option,omitempty"`
}
func (m *MsgVote) Reset() { *m = MsgVote{} }
func (*MsgVote) ProtoMessage() {}
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_3c053992595e3dce, []int{2}
}
@@ -204,8 +206,9 @@ type MsgVoteWeighted struct {
Options []WeightedVoteOption `protobuf:"bytes,3,rep,name=options,proto3" json:"options"`
}
func (m *MsgVoteWeighted) Reset() { *m = MsgVoteWeighted{} }
func (*MsgVoteWeighted) ProtoMessage() {}
func (m *MsgVoteWeighted) Reset() { *m = MsgVoteWeighted{} }
func (m *MsgVoteWeighted) String() string { return proto.CompactTextString(m) }
func (*MsgVoteWeighted) ProtoMessage() {}
func (*MsgVoteWeighted) Descriptor() ([]byte, []int) {
return fileDescriptor_3c053992595e3dce, []int{4}
}
@@ -282,8 +285,9 @@ type MsgDeposit struct {
Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
}
func (m *MsgDeposit) Reset() { *m = MsgDeposit{} }
func (*MsgDeposit) ProtoMessage() {}
func (m *MsgDeposit) Reset() { *m = MsgDeposit{} }
func (m *MsgDeposit) String() string { return proto.CompactTextString(m) }
func (*MsgDeposit) ProtoMessage() {}
func (*MsgDeposit) Descriptor() ([]byte, []int) {
return fileDescriptor_3c053992595e3dce, []int{6}
}
@@ -365,54 +369,54 @@ func init() {
func init() { proto.RegisterFile("cosmos/gov/v1beta1/tx.proto", fileDescriptor_3c053992595e3dce) }
var fileDescriptor_3c053992595e3dce = []byte{
// 744 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0xcf, 0x4f, 0x13, 0x4d,
0x18, 0xc7, 0x77, 0x5b, 0xa0, 0x2f, 0xd3, 0x37, 0x10, 0x36, 0x7d, 0x43, 0xbb, 0x90, 0xdd, 0x66,
0xdf, 0x48, 0x1a, 0x4c, 0x77, 0x6d, 0x15, 0xa2, 0x35, 0x31, 0xa1, 0x78, 0xf0, 0x47, 0x1a, 0xb5,
0x24, 0x9a, 0x78, 0xc1, 0x6d, 0x77, 0x18, 0x36, 0xd2, 0x9d, 0x4d, 0x67, 0xda, 0xd0, 0x1b, 0xf1,
0x64, 0x3c, 0x79, 0xf4, 0x26, 0x47, 0xe3, 0x89, 0x03, 0xff, 0x80, 0x07, 0x13, 0xe2, 0x89, 0x78,
0xf2, 0x60, 0xd0, 0xc0, 0x01, 0xe3, 0xd5, 0x7f, 0xc0, 0xec, 0xce, 0xcc, 0x16, 0x68, 0x29, 0x48,
0xbc, 0x74, 0x77, 0x9f, 0xef, 0xf3, 0x63, 0x9f, 0xcf, 0x3e, 0x4f, 0x07, 0x4c, 0xd5, 0x31, 0x69,
0x60, 0x62, 0x21, 0xdc, 0xb6, 0xda, 0x85, 0x1a, 0xa4, 0x76, 0xc1, 0xa2, 0xeb, 0xa6, 0xdf, 0xc4,
0x14, 0x2b, 0x0a, 0x13, 0x4d, 0x84, 0xdb, 0x26, 0x17, 0x55, 0x8d, 0x07, 0xd4, 0x6c, 0x02, 0xa3,
0x88, 0x3a, 0x76, 0x3d, 0x16, 0xa3, 0x4e, 0xf7, 0x49, 0x18, 0xc4, 0x33, 0x35, 0xc3, 0xd4, 0xe5,
0xf0, 0xc9, 0xe2, 0xe9, 0x99, 0x94, 0x42, 0x18, 0x61, 0x66, 0x0f, 0xee, 0x44, 0x00, 0xc2, 0x18,
0xad, 0x41, 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, 0x00, 0x00, 0xff, 0xff,
0xd4, 0x12, 0x1b, 0x78, 0x7a, 0x07, 0x00, 0x00,
// 738 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x3d, 0x4c, 0xdb, 0x5a,
0x14, 0xc7, 0xe3, 0x04, 0xc8, 0xe3, 0xe6, 0x09, 0x84, 0x95, 0x27, 0x12, 0x83, 0x9c, 0xc8, 0x4f,
0x0f, 0xe5, 0x51, 0xc5, 0x6e, 0x52, 0x60, 0x48, 0x27, 0x42, 0x87, 0x7e, 0x28, 0x6a, 0x1b, 0xa4,
0x56, 0xea, 0x42, 0x9d, 0xf8, 0x72, 0xb1, 0x4a, 0x7c, 0xad, 0xdc, 0x9b, 0x88, 0x6c, 0xa8, 0x53,
0xd5, 0xa9, 0x7b, 0x17, 0xc6, 0xaa, 0x13, 0x03, 0x4b, 0x87, 0xee, 0xa8, 0x13, 0xea, 0xd4, 0xa1,
0xa2, 0x15, 0x0c, 0x54, 0x5d, 0xbb, 0x74, 0xac, 0x7c, 0x3f, 0x9c, 0x40, 0x42, 0xa0, 0xa8, 0x4b,
0x6c, 0x9f, 0x73, 0xfe, 0xe7, 0xf8, 0xfc, 0x7c, 0x4e, 0x2e, 0x98, 0xa9, 0x63, 0xd2, 0xc0, 0xc4,
0x42, 0xb8, 0x6d, 0xb5, 0x0b, 0x35, 0x48, 0xed, 0x82, 0x45, 0xb7, 0x4c, 0xbf, 0x89, 0x29, 0x56,
0x55, 0xee, 0x34, 0x11, 0x6e, 0x9b, 0xc2, 0xa9, 0xe9, 0x42, 0x50, 0xb3, 0x09, 0x0c, 0x15, 0x75,
0xec, 0x7a, 0x5c, 0xa3, 0xcd, 0x0e, 0x48, 0x18, 0xe8, 0xb9, 0x37, 0xcd, 0xbd, 0x6b, 0xec, 0xc9,
0x12, 0xe9, 0xb9, 0x2b, 0x89, 0x30, 0xc2, 0xdc, 0x1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 0x8d, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x73, 0xbe, 0xa8, 0x09, 0x5e, 0x07,
0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
+1 -13
View File
@@ -5,7 +5,6 @@ import (
"strings"
"cosmossdk.io/math"
"sigs.k8s.io/yaml"
sdk "github.com/cosmos/cosmos-sdk/types"
)
@@ -17,15 +16,9 @@ func NewVote(proposalID uint64, voter sdk.AccAddress, options WeightedVoteOption
return Vote{ProposalId: proposalID, Voter: voter.String(), Options: options}
}
// String returns the string representation of the vote
func (v Vote) String() string {
out, _ := yaml.Marshal(v)
return string(out)
}
// Empty returns whether a vote is empty.
func (v Vote) Empty() bool {
return v.String() == Vote{}.String()
return v.String() == (&Vote{}).String()
}
// Votes is an array of vote
@@ -62,11 +55,6 @@ func NewNonSplitVoteOption(option VoteOption) WeightedVoteOptions {
return WeightedVoteOptions{{option, math.LegacyNewDec(1)}}
}
func (v WeightedVoteOption) String() string {
out, _ := yaml.Marshal(v)
return string(out)
}
// WeightedVoteOptions describes array of WeightedVoteOptions
type WeightedVoteOptions []WeightedVoteOption
+29 -29
View File
@@ -83,8 +83,9 @@ type Params struct {
BlocksPerYear uint64 `protobuf:"varint,6,opt,name=blocks_per_year,json=blocksPerYear,proto3" json:"blocks_per_year,omitempty"`
}
func (m *Params) Reset() { *m = Params{} }
func (*Params) ProtoMessage() {}
func (m *Params) Reset() { *m = Params{} }
func (m *Params) String() string { return proto.CompactTextString(m) }
func (*Params) ProtoMessage() {}
func (*Params) Descriptor() ([]byte, []int) {
return fileDescriptor_2df116d183c1e223, []int{1}
}
@@ -137,34 +138,33 @@ func init() {
func init() { proto.RegisterFile("cosmos/mint/v1beta1/mint.proto", fileDescriptor_2df116d183c1e223) }
var fileDescriptor_2df116d183c1e223 = []byte{
// 418 bytes of a gzipped FileDescriptorProto
// 412 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x92, 0x48, 0x7f, 0x44, 0x92, 0x1f, 0xdf, 0x6e, 0x50, 0x1d, 0x38, 0x22, 0x49, 0x78, 0xc4,
0x61, 0x8a, 0x4e, 0x81, 0xb1, 0x05, 0xe4, 0x55, 0xad, 0x25, 0x95, 0x94, 0x33, 0xe9, 0xde, 0x69,
0x21, 0xe3, 0x91, 0xc1, 0x4e, 0x1a, 0xea, 0xe5, 0x87, 0x0e, 0x72, 0x26, 0x20, 0xa0, 0x90, 0xf8,
0x19, 0x42, 0xd5, 0x07, 0x8b, 0x52, 0xc2, 0x78, 0x61, 0x5e, 0x29, 0xec, 0x56, 0xca, 0xa8, 0x12,
0x70, 0x89, 0x9e, 0x34, 0x0d, 0x23, 0x01, 0x8a, 0x44, 0xc9, 0x0c, 0x58, 0x46, 0x5a, 0x29, 0x76,
0xd6, 0xa0, 0x43, 0x50, 0x64, 0xa8, 0xc1, 0x18, 0xd0, 0xc9, 0x31, 0xb1, 0x80, 0x95, 0x7b, 0xb7,
0x85, 0xa4, 0x07, 0x0d, 0x72, 0x0c, 0xab, 0xff, 0x22, 0x28, 0x73, 0x3b, 0xed, 0x46, 0x50, 0x86,
0xdf, 0xa1, 0xfb, 0x19, 0x87, 0x3c, 0x8a, 0x39, 0x4b, 0x49, 0xea, 0xde, 0x6b, 0x21, 0x00, 0x55,
0xc0, 0x81, 0xe6, 0xe1, 0x2b, 0xf4, 0x30, 0xce, 0x79, 0x32, 0x97, 0x51, 0x49, 0x44, 0xb4, 0x26,
0x20, 0x5c, 0xe7, 0xc2, 0xbe, 0xee, 0x84, 0x27, 0x46, 0x9e, 0x10, 0xf1, 0x96, 0x80, 0x78, 0xfd,
0xfc, 0xf3, 0x97, 0x9e, 0xf5, 0xf1, 0xcf, 0xd7, 0x97, 0xee, 0x3f, 0x01, 0x2b, 0xb3, 0x42, 0xe6,
0x07, 0x18, 0x0c, 0x37, 0x7b, 0xcf, 0xde, 0xee, 0x3d, 0xfb, 0xf7, 0xde, 0xb3, 0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b, 0xab, 0xcf,
0x7f, 0xbe, 0xbe, 0x76, 0xff, 0x81, 0xaf, 0xcd, 0xfa, 0x98, 0x9f, 0x3f, 0x1c, 0x6d, 0x0f, 0x9e,
0xbd, 0x3b, 0x78, 0xf6, 0xef, 0x83, 0x67, 0x7f, 0x39, 0x7a, 0xd6, 0xee, 0xe8, 0x59, 0x3f, 0x8f,
0x9e, 0x35, 0x7b, 0x75, 0x6f, 0xc5, 0x9a, 0xa2, 0x9b, 0xc6, 0x8e, 0xde, 0x92, 0x37, 0x7f, 0x03,
0x00, 0x00, 0xff, 0xff, 0x05, 0x75, 0xa9, 0x8a, 0xa0, 0x03, 0x00, 0x00,
}
func (m *Minter) Marshal() (dAtA []byte, err error) {
-7
View File
@@ -6,7 +6,6 @@ import (
"strings"
"cosmossdk.io/math"
"sigs.k8s.io/yaml"
sdk "github.com/cosmos/cosmos-sdk/types"
)
@@ -64,12 +63,6 @@ func (p Params) Validate() error {
return nil
}
// String implements the Stringer interface.
func (p Params) String() string {
out, _ := yaml.Marshal(p)
return string(out)
}
func validateMintDenom(i interface{}) error {
v, ok := i.(string)
if !ok {
+11 -10
View File
@@ -72,8 +72,9 @@ type ParamChange struct {
Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
}
func (m *ParamChange) Reset() { *m = ParamChange{} }
func (*ParamChange) ProtoMessage() {}
func (m *ParamChange) Reset() { *m = ParamChange{} }
func (m *ParamChange) String() string { return proto.CompactTextString(m) }
func (*ParamChange) ProtoMessage() {}
func (*ParamChange) Descriptor() ([]byte, []int) {
return fileDescriptor_53a944ecb0483e4c, []int{1}
}
@@ -135,7 +136,7 @@ func init() {
}
var fileDescriptor_53a944ecb0483e4c = []byte{
// 362 bytes of a gzipped FileDescriptorProto
// 358 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0xce, 0x2f, 0xce,
0xcd, 0x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, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x26, 0xe9, 0x99, 0x25, 0x19, 0xa5,
0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xd0, 0xe8, 0xd0, 0x47, 0x72, 0x6c, 0x05, 0x2c, 0xe6, 0x4b, 0x2a,
0x0b, 0x52, 0x8b, 0xf5, 0x0b, 0xa0, 0x8e, 0x4d, 0x62, 0x03, 0xc7, 0x8f, 0x31, 0x20, 0x00, 0x00,
0xff, 0xff, 0x02, 0xb0, 0x4d, 0x75, 0x20, 0x02, 0x00, 0x00,
0x66, 0x48, 0x60, 0x80, 0x39, 0x4e, 0x41, 0x2b, 0x1e, 0xc9, 0x31, 0x9e, 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, 0x49, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e,
0x2e, 0x34, 0x22, 0xf4, 0x91, 0x9c, 0x59, 0x01, 0x8b, 0xf3, 0x92, 0xca, 0x82, 0xd4, 0x62, 0xfd,
0x02, 0xa8, 0x33, 0x93, 0xd8, 0xc0, 0x31, 0x63, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x05, 0x76,
0xe8, 0xdb, 0x1a, 0x02, 0x00, 0x00,
}
func (this *ParameterChangeProposal) Equal(that interface{}) bool {
-8
View File
@@ -4,8 +4,6 @@ import (
"fmt"
"strings"
"sigs.k8s.io/yaml"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
)
@@ -72,12 +70,6 @@ func NewParamChange(subspace, key, value string) ParamChange {
return ParamChange{subspace, key, value}
}
// String implements the Stringer interface.
func (pc ParamChange) String() string {
out, _ := yaml.Marshal(pc)
return string(out)
}
// ValidateChanges performs basic validation checks over a set of ParamChange. It
// returns an error if any ParamChange is invalid.
func ValidateChanges(changes []ParamChange) error {
-13
View File
@@ -4,7 +4,6 @@ import (
"time"
"cosmossdk.io/math"
"sigs.k8s.io/yaml"
sdk "github.com/cosmos/cosmos-sdk/types"
)
@@ -35,18 +34,6 @@ func NewCommissionWithTime(rate, maxRate, maxChangeRate sdk.Dec, updatedAt time.
}
}
// String implements the Stringer interface for a Commission object.
func (c Commission) String() string {
out, _ := yaml.Marshal(c)
return string(out)
}
// String implements the Stringer interface for a CommissionRates object.
func (cr CommissionRates) String() string {
out, _ := yaml.Marshal(cr)
return string(out)
}
// Validate performs basic sanity validation checks of initial commission
// parameters. If validation fails, an SDK error is returned.
func (cr CommissionRates) Validate() error {
-31
View File
@@ -9,24 +9,11 @@ import (
"cosmossdk.io/math"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"sigs.k8s.io/yaml"
)
// Implements Delegation interface
var _ DelegationI = Delegation{}
// String implements the Stringer interface for a DVPair object.
func (dv DVPair) String() string {
out, _ := yaml.Marshal(dv)
return string(out)
}
// String implements the Stringer interface for a DVVTriplet object.
func (dvv DVVTriplet) String() string {
out, _ := yaml.Marshal(dvv)
return string(out)
}
// NewDelegation creates a new delegation object
//
//nolint:interfacer
@@ -75,12 +62,6 @@ func (d Delegation) GetValidatorAddr() sdk.ValAddress {
}
func (d Delegation) GetShares() math.LegacyDec { return d.Shares }
// String returns a human readable string representation of a Delegation.
func (d Delegation) String() string {
out, _ := yaml.Marshal(d)
return string(out)
}
// Delegations is a collection of delegations
type Delegations []Delegation
@@ -103,12 +84,6 @@ func NewUnbondingDelegationEntry(creationHeight int64, completionTime time.Time,
}
}
// String implements the stringer interface for a UnbondingDelegationEntry.
func (e UnbondingDelegationEntry) String() string {
out, _ := yaml.Marshal(e)
return string(out)
}
// IsMature - is the current entry mature
func (e UnbondingDelegationEntry) IsMature(currentTime time.Time) bool {
return !e.CompletionTime.After(currentTime)
@@ -246,12 +221,6 @@ func NewRedelegationEntry(creationHeight int64, completionTime time.Time, balanc
}
}
// String implements the Stringer interface for a RedelegationEntry object.
func (e RedelegationEntry) String() string {
out, _ := yaml.Marshal(e)
return string(out)
}
// IsMature - is the current entry mature
func (e RedelegationEntry) IsMature(currentTime time.Time) bool {
return !e.CompletionTime.After(currentTime)
-7
View File
@@ -7,7 +7,6 @@ import (
"time"
"cosmossdk.io/math"
"sigs.k8s.io/yaml"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
@@ -59,12 +58,6 @@ func DefaultParams() Params {
)
}
// String returns a human readable string representation of the parameters.
func (p Params) String() string {
out, _ := yaml.Marshal(p)
return string(out)
}
// unmarshal the current staking params value from store key or panic
func MustUnmarshalParams(cdc *codec.LegacyAmino, value []byte) Params {
params, err := UnmarshalParams(cdc, value)
File diff suppressed because it is too large Load Diff
-6
View File
@@ -202,12 +202,6 @@ func NewDescription(moniker, identity, website, securityContact, details string)
}
}
// String implements the Stringer interface for a Description object.
func (d Description) String() string {
out, _ := yaml.Marshal(d)
return string(out)
}
// UpdateDescription updates the fields of a given description. An error is
// returned if the resulting description contains an invalid length.
func (d Description) UpdateDescription(d2 Description) (Description, error) {