feat(auth): allow BaseAccounts to be migrated to x/accounts (#21820)

Co-authored-by: Akhil Kumar P <36399231+akhilkumarpilli@users.noreply.github.com>
This commit is contained in:
testinginprod
2024-09-23 21:22:01 +00:00
committed by GitHub
co-authored by Akhil Kumar P
parent 0202d71f70
commit ebbaa0e92e
18 changed files with 2229 additions and 149 deletions
@@ -14,14 +14,16 @@ import (
)
var (
md_MsgInit protoreflect.MessageDescriptor
fd_MsgInit_pub_key protoreflect.FieldDescriptor
md_MsgInit protoreflect.MessageDescriptor
fd_MsgInit_pub_key protoreflect.FieldDescriptor
fd_MsgInit_init_sequence protoreflect.FieldDescriptor
)
func init() {
file_cosmos_accounts_defaults_base_v1_base_proto_init()
md_MsgInit = File_cosmos_accounts_defaults_base_v1_base_proto.Messages().ByName("MsgInit")
fd_MsgInit_pub_key = md_MsgInit.Fields().ByName("pub_key")
fd_MsgInit_init_sequence = md_MsgInit.Fields().ByName("init_sequence")
}
var _ protoreflect.Message = (*fastReflection_MsgInit)(nil)
@@ -95,6 +97,12 @@ func (x *fastReflection_MsgInit) Range(f func(protoreflect.FieldDescriptor, prot
return
}
}
if x.InitSequence != uint64(0) {
value := protoreflect.ValueOfUint64(x.InitSequence)
if !f(fd_MsgInit_init_sequence, value) {
return
}
}
}
// Has reports whether a field is populated.
@@ -112,6 +120,8 @@ func (x *fastReflection_MsgInit) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "cosmos.accounts.defaults.base.v1.MsgInit.pub_key":
return x.PubKey != nil
case "cosmos.accounts.defaults.base.v1.MsgInit.init_sequence":
return x.InitSequence != uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInit"))
@@ -130,6 +140,8 @@ func (x *fastReflection_MsgInit) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "cosmos.accounts.defaults.base.v1.MsgInit.pub_key":
x.PubKey = nil
case "cosmos.accounts.defaults.base.v1.MsgInit.init_sequence":
x.InitSequence = uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInit"))
@@ -149,6 +161,9 @@ func (x *fastReflection_MsgInit) Get(descriptor protoreflect.FieldDescriptor) pr
case "cosmos.accounts.defaults.base.v1.MsgInit.pub_key":
value := x.PubKey
return protoreflect.ValueOfMessage(value.ProtoReflect())
case "cosmos.accounts.defaults.base.v1.MsgInit.init_sequence":
value := x.InitSequence
return protoreflect.ValueOfUint64(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInit"))
@@ -171,6 +186,8 @@ func (x *fastReflection_MsgInit) Set(fd protoreflect.FieldDescriptor, value prot
switch fd.FullName() {
case "cosmos.accounts.defaults.base.v1.MsgInit.pub_key":
x.PubKey = value.Message().Interface().(*anypb.Any)
case "cosmos.accounts.defaults.base.v1.MsgInit.init_sequence":
x.InitSequence = value.Uint()
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInit"))
@@ -196,6 +213,8 @@ func (x *fastReflection_MsgInit) Mutable(fd protoreflect.FieldDescriptor) protor
x.PubKey = new(anypb.Any)
}
return protoreflect.ValueOfMessage(x.PubKey.ProtoReflect())
case "cosmos.accounts.defaults.base.v1.MsgInit.init_sequence":
panic(fmt.Errorf("field init_sequence of message cosmos.accounts.defaults.base.v1.MsgInit is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInit"))
@@ -212,6 +231,8 @@ func (x *fastReflection_MsgInit) NewField(fd protoreflect.FieldDescriptor) proto
case "cosmos.accounts.defaults.base.v1.MsgInit.pub_key":
m := new(anypb.Any)
return protoreflect.ValueOfMessage(m.ProtoReflect())
case "cosmos.accounts.defaults.base.v1.MsgInit.init_sequence":
return protoreflect.ValueOfUint64(uint64(0))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.accounts.defaults.base.v1.MsgInit"))
@@ -285,6 +306,9 @@ func (x *fastReflection_MsgInit) ProtoMethods() *protoiface.Methods {
l = options.Size(x.PubKey)
n += 1 + l + runtime.Sov(uint64(l))
}
if x.InitSequence != 0 {
n += 1 + runtime.Sov(uint64(x.InitSequence))
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
@@ -314,6 +338,11 @@ func (x *fastReflection_MsgInit) ProtoMethods() *protoiface.Methods {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if x.InitSequence != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.InitSequence))
i--
dAtA[i] = 0x10
}
if x.PubKey != nil {
encoded, err := options.Marshal(x.PubKey)
if err != nil {
@@ -413,6 +442,25 @@ func (x *fastReflection_MsgInit) ProtoMethods() *protoiface.Methods {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
iNdEx = postIndex
case 2:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InitSequence", wireType)
}
x.InitSequence = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
x.InitSequence |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
@@ -3167,6 +3215,9 @@ type MsgInit struct {
// pub_key defines a pubkey for the account arbitrary encapsulated.
PubKey *anypb.Any `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
// init_sequence defines the initial sequence of the account.
// Defaults to zero if not set.
InitSequence uint64 `protobuf:"varint,2,opt,name=init_sequence,json=initSequence,proto3" json:"init_sequence,omitempty"`
}
func (x *MsgInit) Reset() {
@@ -3196,6 +3247,13 @@ func (x *MsgInit) GetPubKey() *anypb.Any {
return nil
}
func (x *MsgInit) GetInitSequence() uint64 {
if x != nil {
return x.InitSequence
}
return 0
}
// MsgInitResponse is the response returned after base account initialization.
// This is empty.
type MsgInitResponse struct {
@@ -3425,45 +3483,48 @@ var file_cosmos_accounts_defaults_base_v1_base_proto_rawDesc = []byte{
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64,
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x1a,
0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x38, 0x0a, 0x07, 0x4d, 0x73,
0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, 0x07, 0x4d, 0x73,
0x67, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x2d, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x06, 0x70, 0x75,
0x62, 0x4b, 0x65, 0x79, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x53, 0x77,
0x61, 0x70, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f,
0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x41, 0x6e, 0x79, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0x17,
0x0a, 0x15, 0x4d, 0x73, 0x67, 0x53, 0x77, 0x61, 0x70, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79,
0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x33, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72,
0x79, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x0d, 0x0a,
0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0x44, 0x0a, 0x13,
0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b,
0x65, 0x79, 0x42, 0x90, 0x02, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x64, 0x65, 0x66, 0x61, 0x75,
0x6c, 0x74, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x42, 0x61, 0x73,
0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75,
0x6c, 0x74, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x62, 0x61, 0x73, 0x65,
0x76, 0x31, 0xa2, 0x02, 0x04, 0x43, 0x41, 0x44, 0x42, 0xaa, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d,
0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x44, 0x65, 0x66, 0x61,
0x75, 0x6c, 0x74, 0x73, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x20, 0x43,
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44,
0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c, 0x56, 0x31, 0xe2,
0x02, 0x2c, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x42, 0x61, 0x73, 0x65, 0x5c,
0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
0x24, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x73, 0x3a, 0x3a, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x3a, 0x3a, 0x42, 0x61, 0x73,
0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x62, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x71,
0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x69, 0x6e, 0x69,
0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67,
0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x0a, 0x0d,
0x4d, 0x73, 0x67, 0x53, 0x77, 0x61, 0x70, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x34, 0x0a,
0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x09, 0x6e, 0x65, 0x77, 0x50, 0x75, 0x62,
0x4b, 0x65, 0x79, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x53, 0x77, 0x61, 0x70, 0x50, 0x75,
0x62, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x0a, 0x0d,
0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x33, 0x0a,
0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e,
0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e,
0x63, 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x75, 0x62, 0x4b, 0x65,
0x79, 0x22, 0x44, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x70, 0x75, 0x62, 0x5f,
0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52,
0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x42, 0x90, 0x02, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e,
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e,
0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
0x42, 0x09, 0x42, 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x63,
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f,
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f,
0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31,
0x3b, 0x62, 0x61, 0x73, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x43, 0x41, 0x44, 0x42, 0xaa, 0x02,
0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
0x2e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x2e, 0x56,
0x31, 0xca, 0x02, 0x20, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c, 0x42, 0x61, 0x73,
0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x2c, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x5c,
0x42, 0x61, 0x73, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xea, 0x02, 0x24, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x63,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x3a, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73,
0x3a, 0x3a, 0x42, 0x61, 0x73, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
+1 -1
View File
@@ -937,7 +937,7 @@ type QueryLegacyAccountResponse struct {
// the type wrapped by the any does not need to comply with the
// sdk.AccountI interface.
Account *anypb.Any `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
// info represents the account as a BaseAccount, this can return
// base represents the account as a BaseAccount, this can return
// nil if the account cannot be represented as a BaseAccount.
// This is used in the gRPC QueryAccountInfo method.
Base *BaseAccount `protobuf:"bytes,2,opt,name=base,proto3" json:"base,omitempty"`
File diff suppressed because it is too large Load Diff
+42 -2
View File
@@ -19,8 +19,9 @@ import (
const _ = grpc.SupportPackageIsVersion9
const (
Msg_UpdateParams_FullMethodName = "/cosmos.auth.v1beta1.Msg/UpdateParams"
Msg_NonAtomicExec_FullMethodName = "/cosmos.auth.v1beta1.Msg/NonAtomicExec"
Msg_UpdateParams_FullMethodName = "/cosmos.auth.v1beta1.Msg/UpdateParams"
Msg_NonAtomicExec_FullMethodName = "/cosmos.auth.v1beta1.Msg/NonAtomicExec"
Msg_MigrateAccount_FullMethodName = "/cosmos.auth.v1beta1.Msg/MigrateAccount"
)
// MsgClient is the client API for Msg service.
@@ -34,6 +35,8 @@ type MsgClient interface {
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
// NonAtomicExec allows users to submit multiple messages for non-atomic execution.
NonAtomicExec(ctx context.Context, in *MsgNonAtomicExec, opts ...grpc.CallOption) (*MsgNonAtomicExecResponse, error)
// MigrateAccount migrates the account to x/accounts.
MigrateAccount(ctx context.Context, in *MsgMigrateAccount, opts ...grpc.CallOption) (*MsgMigrateAccountResponse, error)
}
type msgClient struct {
@@ -64,6 +67,16 @@ func (c *msgClient) NonAtomicExec(ctx context.Context, in *MsgNonAtomicExec, opt
return out, nil
}
func (c *msgClient) MigrateAccount(ctx context.Context, in *MsgMigrateAccount, opts ...grpc.CallOption) (*MsgMigrateAccountResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MsgMigrateAccountResponse)
err := c.cc.Invoke(ctx, Msg_MigrateAccount_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// MsgServer is the server API for Msg service.
// All implementations must embed UnimplementedMsgServer
// for forward compatibility.
@@ -75,6 +88,8 @@ type MsgServer interface {
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
// NonAtomicExec allows users to submit multiple messages for non-atomic execution.
NonAtomicExec(context.Context, *MsgNonAtomicExec) (*MsgNonAtomicExecResponse, error)
// MigrateAccount migrates the account to x/accounts.
MigrateAccount(context.Context, *MsgMigrateAccount) (*MsgMigrateAccountResponse, error)
mustEmbedUnimplementedMsgServer()
}
@@ -91,6 +106,9 @@ func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*
func (UnimplementedMsgServer) NonAtomicExec(context.Context, *MsgNonAtomicExec) (*MsgNonAtomicExecResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method NonAtomicExec not implemented")
}
func (UnimplementedMsgServer) MigrateAccount(context.Context, *MsgMigrateAccount) (*MsgMigrateAccountResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method MigrateAccount not implemented")
}
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
func (UnimplementedMsgServer) testEmbeddedByValue() {}
@@ -148,6 +166,24 @@ func _Msg_NonAtomicExec_Handler(srv interface{}, ctx context.Context, dec func(i
return interceptor(ctx, in, info, handler)
}
func _Msg_MigrateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgMigrateAccount)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).MigrateAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_MigrateAccount_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).MigrateAccount(ctx, req.(*MsgMigrateAccount))
}
return interceptor(ctx, in, info, handler)
}
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -163,6 +199,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
MethodName: "NonAtomicExec",
Handler: _Msg_NonAtomicExec_Handler,
},
{
MethodName: "MigrateAccount",
Handler: _Msg_MigrateAccount_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cosmos/auth/v1beta1/tx.proto",