From 81b85199b6ba83e4cba9efaf641ce8d0df889def Mon Sep 17 00:00:00 2001 From: Dzung Do Date: Wed, 10 Jul 2024 16:19:47 +0700 Subject: [PATCH 1/2] add proto for new module --- proto/buf.lock | 11 ++- proto/buf.yaml | 1 + proto/realionetwork/asset/v1/params.proto | 6 +- proto/realionetwork/asset/v1/token.proto | 16 ++-- .../asset/v1/tokenauthorization.proto | 13 --- proto/realionetwork/asset/v1/tx.proto | 85 +++++++++++-------- 6 files changed, 77 insertions(+), 55 deletions(-) delete mode 100644 proto/realionetwork/asset/v1/tokenauthorization.proto diff --git a/proto/buf.lock b/proto/buf.lock index 5e5f5983..b465cc66 100644 --- a/proto/buf.lock +++ b/proto/buf.lock @@ -1,11 +1,18 @@ # Generated by buf. DO NOT EDIT. version: v1 deps: + - remote: buf.build + owner: cosmos + repository: cosmos-proto + commit: 04467658e59e44bbb22fe568206e1f70 + digest: shake256:73a640bd60e0c523b0f8237ff34eab67c45a38b64bbbde1d80224819d272dbf316ac183526bd245f994af6608b025f5130483d0133c5edd385531326b5990466 - remote: buf.build owner: cosmos repository: gogo-proto - commit: 34d970b699f84aa382f3c29773a60836 + commit: 88ef6483f90f478fb938c37dde52ece3 + digest: shake256:89c45df2aa11e0cff97b0d695436713db3d993d76792e9f8dc1ae90e6ab9a9bec55503d48ceedd6b86069ab07d3041b32001b2bfe0227fa725dd515ff381e5ba - remote: buf.build owner: googleapis repository: googleapis - commit: 5ae7f88519b04fe1965da0f8a375a088 + commit: f0e53af8f2fc4556b94f482688b57223 + digest: shake256:de26a277fc28b8b411ecf58729d78d32fcf15090ffd998a4469225b17889bfb51442eaab04bb7a8d88d203ecdf0a9febd4ffd52c18ed1c2229160c7bd353ca95 diff --git a/proto/buf.yaml b/proto/buf.yaml index e71d3d2a..e608548f 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -1,6 +1,7 @@ version: v1 name: buf.build/realiotech/realio-network deps: + - buf.build/cosmos/cosmos-proto - buf.build/cosmos/gogo-proto - buf.build/googleapis/googleapis breaking: diff --git a/proto/realionetwork/asset/v1/params.proto b/proto/realionetwork/asset/v1/params.proto index afdfdcfc..c80c120e 100644 --- a/proto/realionetwork/asset/v1/params.proto +++ b/proto/realionetwork/asset/v1/params.proto @@ -6,4 +6,8 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/realiotech/realio-network/x/asset/types"; // Params defines the parameters for the module. -message Params { option (gogoproto.goproto_stringer) = false; } \ No newline at end of file +message Params { + option (gogoproto.goproto_stringer) = false; + // privileges refers to the privileges that is enabled for our privilege system. + repeated string privileges = 1; +} \ No newline at end of file diff --git a/proto/realionetwork/asset/v1/token.proto b/proto/realionetwork/asset/v1/token.proto index bf455d14..32dc9436 100644 --- a/proto/realionetwork/asset/v1/token.proto +++ b/proto/realionetwork/asset/v1/token.proto @@ -2,16 +2,22 @@ syntax = "proto3"; package realionetwork.asset.v1; import "gogoproto/gogo.proto"; -import "realionetwork/asset/v1/tokenauthorization.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/realiotech/realio-network/x/asset/types"; // Token represents an asset in the module message Token { + option (gogoproto.equal) = false; + string name = 1; string symbol = 2; - string total = 3; - bool authorizationRequired = 4; - string manager = 5; - repeated TokenAuthorization authorized = 6; + string decimal = 3; + string description = 4; +} + +message TokenManagement { + string manager = 1[(cosmos_proto.scalar) = "cosmos.AddressString"]; + bool add_new_privilege = 2; + repeated string excluded_privileges = 3; } \ No newline at end of file diff --git a/proto/realionetwork/asset/v1/tokenauthorization.proto b/proto/realionetwork/asset/v1/tokenauthorization.proto deleted file mode 100644 index 1fef9144..00000000 --- a/proto/realionetwork/asset/v1/tokenauthorization.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; -package realionetwork.asset.v1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/realiotech/realio-network/x/asset/types"; - -// TokenAuthorization represents the current authorization state for an -// address:token -message TokenAuthorization { - string address = 2; - bool authorized = 3; -} \ No newline at end of file diff --git a/proto/realionetwork/asset/v1/tx.proto b/proto/realionetwork/asset/v1/tx.proto index 3d50ffc8..06b4a8e8 100644 --- a/proto/realionetwork/asset/v1/tx.proto +++ b/proto/realionetwork/asset/v1/tx.proto @@ -4,61 +4,78 @@ package realionetwork.asset.v1; option go_package = "github.com/realiotech/realio-network/x/asset/types"; import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/bank/v1beta1/genesis.proto"; +import "google/protobuf/any.proto"; // Msg defines the Msg service. service Msg { rpc CreateToken(MsgCreateToken) returns (MsgCreateTokenResponse); - rpc UpdateToken(MsgUpdateToken) returns (MsgUpdateTokenResponse); - rpc AuthorizeAddress(MsgAuthorizeAddress) - returns (MsgAuthorizeAddressResponse); - rpc UnAuthorizeAddress(MsgUnAuthorizeAddress) - returns (MsgUnAuthorizeAddressResponse); - rpc TransferToken(MsgTransferToken) returns (MsgTransferTokenResponse); - // this line is used by starport scaffolding # proto/tx/rpc + rpc AllocateToken(MsgAllocateToken) returns (MsgAllocateTokenResponse); + rpc AssignPrivilege(MsgAssignPrivilege) returns (MsgAssignPrivilegeResponse); + rpc UnassignPrivilege(MsgUnassignPrivilege) + returns (MsgUnassignPrivilegeResponse); + rpc DisablePrivilege(MsgDisablePrivilege) + returns (MsgDisablePrivilegeResponse); + rpc ExecutePrivilege(MsgExecutePrivilege) + returns (MsgExecutePrivilegeResponse); } message MsgCreateToken { - string manager = 1; - string name = 2; - string symbol = 3; - string total = 4; - bool authorizationRequired = 6; + string creator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string manager = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string name = 3; + string symbol = 4; + string decimal = 5; + repeated string excluded_privileges = 6; + bool add_new_privilege = 7; } message MsgCreateTokenResponse {} -message MsgUpdateToken { - string manager = 1; - string symbol = 2; - bool authorizationRequired = 3; +message MsgAllocateToken { + string manager = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string token_id = 2; + repeated cosmos.bank.v1beta1.Balance balances = 3 + [ (gogoproto.nullable) = false ]; + repeated google.protobuf.Any vesting_balance = 4; } -message MsgUpdateTokenResponse {} +message MsgAllocateTokenResponse {} -message MsgAuthorizeAddress { - string manager = 1; - string symbol = 2; - string address = 3; +message MsgAssignPrivilege { + string manager = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string token_id = 2; + repeated string assigned_to = 3 + [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string privilege = 4; } -message MsgAuthorizeAddressResponse {} +message MsgAssignPrivilegeResponse {} -message MsgUnAuthorizeAddress { - string manager = 1; - string symbol = 2; - string address = 3; +message MsgUnassignPrivilege { + string manager = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string token_id = 2; + repeated string unassigned_from = 3 + [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string privilege = 4; } -message MsgUnAuthorizeAddressResponse {} +message MsgUnassignPrivilegeResponse {} -message MsgTransferToken { - string symbol = 1; - string from = 2; - string to = 3; - string amount = 4; +message MsgDisablePrivilege { + string manager = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string token_id = 2; + string disabled_privilege = 3; } -message MsgTransferTokenResponse {} +message MsgDisablePrivilegeResponse {} -// this line is used by starport scaffolding # proto/tx/message \ No newline at end of file +message MsgExecutePrivilege { + string address = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + string token_id = 2; + google.protobuf.Any privilege_msg = 3; +} + +message MsgExecutePrivilegeResponse {} \ No newline at end of file From 8e342605e1d8ef2bba73e97d4e8e34d090643758 Mon Sep 17 00:00:00 2001 From: Dzung Do Date: Thu, 11 Jul 2024 17:10:34 +0700 Subject: [PATCH 2/2] generate proto file --- x/asset/types/params.pb.go | 73 +- x/asset/types/token.pb.go | 348 +++++--- x/asset/types/tx.pb.go | 1555 ++++++++++++++++++++++++++---------- 3 files changed, 1453 insertions(+), 523 deletions(-) diff --git a/x/asset/types/params.pb.go b/x/asset/types/params.pb.go index 8716b9c4..48c50489 100644 --- a/x/asset/types/params.pb.go +++ b/x/asset/types/params.pb.go @@ -25,6 +25,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Params defines the parameters for the module. type Params struct { + // privileges refers to the privileges that is enabled for our privilege system. + Privileges []string `protobuf:"bytes,1,rep,name=privileges,proto3" json:"privileges,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -59,6 +61,13 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo +func (m *Params) GetPrivileges() []string { + if m != nil { + return m.Privileges + } + return nil +} + func init() { proto.RegisterType((*Params)(nil), "realionetwork.asset.v1.Params") } @@ -68,18 +77,19 @@ func init() { } var fileDescriptor_d68d5b1218748d2a = []byte{ - // 162 bytes of a gzipped FileDescriptorProto + // 185 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2e, 0x4a, 0x4d, 0xcc, 0xc9, 0xcc, 0xcf, 0x4b, 0x2d, 0x29, 0xcf, 0x2f, 0xca, 0xd6, 0x4f, 0x2c, 0x2e, 0x4e, 0x2d, 0xd1, 0x2f, 0x33, 0xd4, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x43, 0x51, 0xa4, 0x07, 0x56, 0xa4, 0x57, 0x66, 0x28, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, - 0x56, 0xa2, 0x0f, 0x62, 0x41, 0x54, 0x2b, 0xf1, 0x71, 0xb1, 0x05, 0x80, 0x75, 0x5b, 0xb1, 0xcc, - 0x58, 0x20, 0xcf, 0xe0, 0xe4, 0x73, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, - 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, - 0x46, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x10, 0x2b, 0x4a, 0x52, - 0x93, 0x33, 0xa0, 0x4c, 0x5d, 0x98, 0x9b, 0x2a, 0xa0, 0xae, 0x2a, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, - 0x62, 0x03, 0x5b, 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x30, 0xc3, 0xf2, 0x1b, 0xb9, 0x00, - 0x00, 0x00, + 0x56, 0xa2, 0x0f, 0x62, 0x41, 0x54, 0x2b, 0xe9, 0x71, 0xb1, 0x05, 0x80, 0x75, 0x0b, 0xc9, 0x71, + 0x71, 0x15, 0x14, 0x65, 0x96, 0x65, 0xe6, 0xa4, 0xa6, 0xa7, 0x16, 0x4b, 0x30, 0x2a, 0x30, 0x6b, + 0x70, 0x06, 0x21, 0x89, 0x58, 0xb1, 0xcc, 0x58, 0x20, 0xcf, 0xe0, 0xe4, 0x73, 0xe2, 0x91, 0x1c, + 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, + 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x46, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, + 0xf9, 0xb9, 0xfa, 0x10, 0x27, 0x94, 0xa4, 0x26, 0x67, 0x40, 0x99, 0xba, 0x30, 0x37, 0x57, 0x40, + 0x5d, 0x5d, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x76, 0x84, 0x31, 0x20, 0x00, 0x00, 0xff, + 0xff, 0x4f, 0xae, 0xb5, 0xec, 0xd9, 0x00, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -102,6 +112,15 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Privileges) > 0 { + for iNdEx := len(m.Privileges) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Privileges[iNdEx]) + copy(dAtA[i:], m.Privileges[iNdEx]) + i = encodeVarintParams(dAtA, i, uint64(len(m.Privileges[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } return len(dAtA) - i, nil } @@ -122,6 +141,12 @@ func (m *Params) Size() (n int) { } var l int _ = l + if len(m.Privileges) > 0 { + for _, s := range m.Privileges { + l = len(s) + n += 1 + l + sovParams(uint64(l)) + } + } return n } @@ -160,6 +185,38 @@ func (m *Params) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Privileges", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Privileges = append(m.Privileges, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/asset/types/token.pb.go b/x/asset/types/token.pb.go index 33ff9a70..17eea40c 100644 --- a/x/asset/types/token.pb.go +++ b/x/asset/types/token.pb.go @@ -5,6 +5,7 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -25,12 +26,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Token represents an asset in the module type Token struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` - Total string `protobuf:"bytes,3,opt,name=total,proto3" json:"total,omitempty"` - AuthorizationRequired bool `protobuf:"varint,4,opt,name=authorizationRequired,proto3" json:"authorizationRequired,omitempty"` - Manager string `protobuf:"bytes,5,opt,name=manager,proto3" json:"manager,omitempty"` - Authorized []*TokenAuthorization `protobuf:"bytes,6,rep,name=authorized,proto3" json:"authorized,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + Decimal string `protobuf:"bytes,3,opt,name=decimal,proto3" json:"decimal,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` } func (m *Token) Reset() { *m = Token{} } @@ -80,36 +79,83 @@ func (m *Token) GetSymbol() string { return "" } -func (m *Token) GetTotal() string { +func (m *Token) GetDecimal() string { if m != nil { - return m.Total + return m.Decimal } return "" } -func (m *Token) GetAuthorizationRequired() bool { +func (m *Token) GetDescription() string { if m != nil { - return m.AuthorizationRequired + return m.Description + } + return "" +} + +type TokenManagement struct { + Manager string `protobuf:"bytes,1,opt,name=manager,proto3" json:"manager,omitempty"` + AddNewPrivilege bool `protobuf:"varint,2,opt,name=add_new_privilege,json=addNewPrivilege,proto3" json:"add_new_privilege,omitempty"` + ExcludedPrivileges []string `protobuf:"bytes,3,rep,name=excluded_privileges,json=excludedPrivileges,proto3" json:"excluded_privileges,omitempty"` +} + +func (m *TokenManagement) Reset() { *m = TokenManagement{} } +func (m *TokenManagement) String() string { return proto.CompactTextString(m) } +func (*TokenManagement) ProtoMessage() {} +func (*TokenManagement) Descriptor() ([]byte, []int) { + return fileDescriptor_2f83138fc60a3176, []int{1} +} +func (m *TokenManagement) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TokenManagement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TokenManagement.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return false } +func (m *TokenManagement) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenManagement.Merge(m, src) +} +func (m *TokenManagement) XXX_Size() int { + return m.Size() +} +func (m *TokenManagement) XXX_DiscardUnknown() { + xxx_messageInfo_TokenManagement.DiscardUnknown(m) +} + +var xxx_messageInfo_TokenManagement proto.InternalMessageInfo -func (m *Token) GetManager() string { +func (m *TokenManagement) GetManager() string { if m != nil { return m.Manager } return "" } -func (m *Token) GetAuthorized() []*TokenAuthorization { +func (m *TokenManagement) GetAddNewPrivilege() bool { if m != nil { - return m.Authorized + return m.AddNewPrivilege + } + return false +} + +func (m *TokenManagement) GetExcludedPrivileges() []string { + if m != nil { + return m.ExcludedPrivileges } return nil } func init() { proto.RegisterType((*Token)(nil), "realionetwork.asset.v1.Token") + proto.RegisterType((*TokenManagement)(nil), "realionetwork.asset.v1.TokenManagement") } func init() { @@ -117,25 +163,29 @@ func init() { } var fileDescriptor_2f83138fc60a3176 = []byte{ - // 286 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xb1, 0x4e, 0xc3, 0x30, - 0x10, 0x86, 0x6b, 0xda, 0x06, 0x30, 0x9b, 0x55, 0x2a, 0xab, 0x83, 0x15, 0x75, 0x8a, 0x90, 0x70, - 0xd4, 0xc2, 0x0b, 0xc0, 0x88, 0x98, 0x22, 0x26, 0x36, 0xa7, 0xb5, 0x92, 0xa8, 0x49, 0xae, 0x38, - 0x97, 0x42, 0x79, 0x0a, 0x1e, 0x8b, 0xb1, 0x23, 0x23, 0x4a, 0xc4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 0xde, 0x57, 0x2d, 0x7a, 0xcf, 0xf3, 0x28, 0xc1, 0xb8, 0x0c, 0xe5, 0x02, 0xb2, 0x86, 0x1e, 0xea, - 0x45, 0xdc, 0xc8, 0xeb, 0x96, 0xe4, 0x5b, 0xc3, 0x12, 0xb7, 0x6b, 0x5d, 0x84, 0x8e, 0x85, 0x77, - 0xf3, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x66, 0x07, 0x38, 0xad, 0xc1, 0x01, 0x00, 0x00, + // 349 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xbd, 0x6e, 0xea, 0x30, + 0x1c, 0xc5, 0x93, 0x0b, 0x17, 0x2e, 0xbe, 0x03, 0xba, 0xbe, 0x08, 0xa5, 0x0c, 0x29, 0x62, 0x42, + 0x95, 0x48, 0x04, 0xdd, 0xba, 0x95, 0xb9, 0xad, 0xaa, 0xb4, 0x53, 0x17, 0x64, 0xe2, 0xbf, 0x82, + 0x45, 0x6c, 0x47, 0xb6, 0xf9, 0x7a, 0x8b, 0x3e, 0x42, 0xd5, 0x67, 0xe8, 0x43, 0x74, 0x44, 0x9d, + 0x3a, 0x56, 0xb0, 0xf4, 0x31, 0x2a, 0x9c, 0xa4, 0x1f, 0xdb, 0xff, 0x9c, 0xf3, 0x53, 0x72, 0xe4, + 0x83, 0x7a, 0x0a, 0x48, 0xca, 0xa4, 0x00, 0xb3, 0x92, 0x6a, 0x1e, 0x12, 0xad, 0xc1, 0x84, 0xcb, + 0x61, 0x68, 0xe4, 0x1c, 0x44, 0x90, 0x29, 0x69, 0x24, 0x6e, 0xff, 0x60, 0x02, 0xcb, 0x04, 0xcb, + 0x61, 0xa7, 0x95, 0xc8, 0x44, 0x5a, 0x24, 0x3c, 0x5c, 0x39, 0xdd, 0x39, 0x8a, 0xa5, 0xe6, 0x52, + 0x4f, 0xf2, 0x20, 0x17, 0x79, 0xd4, 0x5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, 0x81, 0x78, 0x56, + 0x9c, 0x83, 0x72, 0xb9, 0x75, 0xb1, 0x9d, 0xd9, 0x64, 0xa0, 0xa7, 0x35, 0xfb, 0xe0, 0xa7, 0x1f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x3e, 0xa6, 0x19, 0xa8, 0xdf, 0x01, 0x00, 0x00, } func (m *Token) Marshal() (dAtA []byte, err error) { @@ -158,41 +208,17 @@ func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Authorized) > 0 { - for iNdEx := len(m.Authorized) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Authorized[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintToken(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if len(m.Manager) > 0 { - i -= len(m.Manager) - copy(dAtA[i:], m.Manager) - i = encodeVarintToken(dAtA, i, uint64(len(m.Manager))) + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintToken(dAtA, i, uint64(len(m.Description))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } - if m.AuthorizationRequired { - i-- - if m.AuthorizationRequired { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Total) > 0 { - i -= len(m.Total) - copy(dAtA[i:], m.Total) - i = encodeVarintToken(dAtA, i, uint64(len(m.Total))) + if len(m.Decimal) > 0 { + i -= len(m.Decimal) + copy(dAtA[i:], m.Decimal) + i = encodeVarintToken(dAtA, i, uint64(len(m.Decimal))) i-- dAtA[i] = 0x1a } @@ -213,6 +239,55 @@ func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *TokenManagement) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TokenManagement) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TokenManagement) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ExcludedPrivileges) > 0 { + for iNdEx := len(m.ExcludedPrivileges) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ExcludedPrivileges[iNdEx]) + copy(dAtA[i:], m.ExcludedPrivileges[iNdEx]) + i = encodeVarintToken(dAtA, i, uint64(len(m.ExcludedPrivileges[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if m.AddNewPrivilege { + i-- + if m.AddNewPrivilege { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Manager) > 0 { + i -= len(m.Manager) + copy(dAtA[i:], m.Manager) + i = encodeVarintToken(dAtA, i, uint64(len(m.Manager))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintToken(dAtA []byte, offset int, v uint64) int { offset -= sovToken(v) base := offset @@ -238,20 +313,33 @@ func (m *Token) Size() (n int) { if l > 0 { n += 1 + l + sovToken(uint64(l)) } - l = len(m.Total) + l = len(m.Decimal) if l > 0 { n += 1 + l + sovToken(uint64(l)) } - if m.AuthorizationRequired { - n += 2 + l = len(m.Description) + if l > 0 { + n += 1 + l + sovToken(uint64(l)) } + return n +} + +func (m *TokenManagement) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l l = len(m.Manager) if l > 0 { n += 1 + l + sovToken(uint64(l)) } - if len(m.Authorized) > 0 { - for _, e := range m.Authorized { - l = e.Size() + if m.AddNewPrivilege { + n += 2 + } + if len(m.ExcludedPrivileges) > 0 { + for _, s := range m.ExcludedPrivileges { + l = len(s) n += 1 + l + sovToken(uint64(l)) } } @@ -359,7 +447,7 @@ func (m *Token) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Decimal", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -387,13 +475,13 @@ func (m *Token) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Total = string(dAtA[iNdEx:postIndex]) + m.Decimal = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthorizationRequired", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowToken @@ -403,13 +491,75 @@ func (m *Token) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.AuthorizationRequired = bool(v != 0) - case 5: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipToken(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthToken + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TokenManagement) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TokenManagement: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TokenManagement: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Manager", wireType) } @@ -441,11 +591,31 @@ func (m *Token) Unmarshal(dAtA []byte) error { } m.Manager = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AddNewPrivilege", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AddNewPrivilege = bool(v != 0) + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authorized", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExcludedPrivileges", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowToken @@ -455,25 +625,23 @@ func (m *Token) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthToken } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthToken } if postIndex > l { return io.ErrUnexpectedEOF } - m.Authorized = append(m.Authorized, &TokenAuthorization{}) - if err := m.Authorized[len(m.Authorized)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.ExcludedPrivileges = append(m.ExcludedPrivileges, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/asset/types/tx.pb.go b/x/asset/types/tx.pb.go index ec2c6e11..529a2173 100644 --- a/x/asset/types/tx.pb.go +++ b/x/asset/types/tx.pb.go @@ -6,12 +6,15 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/x/bank/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + protobuf "google/protobuf" io "io" math "math" math_bits "math/bits" @@ -29,11 +32,13 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MsgCreateToken struct { - Manager string `protobuf:"bytes,1,opt,name=manager,proto3" json:"manager,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` - Total string `protobuf:"bytes,4,opt,name=total,proto3" json:"total,omitempty"` - AuthorizationRequired bool `protobuf:"varint,6,opt,name=authorizationRequired,proto3" json:"authorizationRequired,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + Manager string `protobuf:"bytes,2,opt,name=manager,proto3" json:"manager,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty"` + Decimal string `protobuf:"bytes,5,opt,name=decimal,proto3" json:"decimal,omitempty"` + ExcludedPrivileges []string `protobuf:"bytes,6,rep,name=excluded_privileges,json=excludedPrivileges,proto3" json:"excluded_privileges,omitempty"` + AddNewPrivilege bool `protobuf:"varint,7,opt,name=add_new_privilege,json=addNewPrivilege,proto3" json:"add_new_privilege,omitempty"` } func (m *MsgCreateToken) Reset() { *m = MsgCreateToken{} } @@ -69,6 +74,13 @@ func (m *MsgCreateToken) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateToken proto.InternalMessageInfo +func (m *MsgCreateToken) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + func (m *MsgCreateToken) GetManager() string { if m != nil { return m.Manager @@ -90,16 +102,23 @@ func (m *MsgCreateToken) GetSymbol() string { return "" } -func (m *MsgCreateToken) GetTotal() string { +func (m *MsgCreateToken) GetDecimal() string { if m != nil { - return m.Total + return m.Decimal } return "" } -func (m *MsgCreateToken) GetAuthorizationRequired() bool { +func (m *MsgCreateToken) GetExcludedPrivileges() []string { + if m != nil { + return m.ExcludedPrivileges + } + return nil +} + +func (m *MsgCreateToken) GetAddNewPrivilege() bool { if m != nil { - return m.AuthorizationRequired + return m.AddNewPrivilege } return false } @@ -140,24 +159,25 @@ func (m *MsgCreateTokenResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateTokenResponse proto.InternalMessageInfo -type MsgUpdateToken struct { - Manager string `protobuf:"bytes,1,opt,name=manager,proto3" json:"manager,omitempty"` - Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` - AuthorizationRequired bool `protobuf:"varint,3,opt,name=authorizationRequired,proto3" json:"authorizationRequired,omitempty"` +type MsgAllocateToken struct { + Manager string `protobuf:"bytes,1,opt,name=manager,proto3" json:"manager,omitempty"` + TokenId string `protobuf:"bytes,2,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` + Balances []types.Balance `protobuf:"bytes,3,rep,name=balances,proto3" json:"balances"` + VestingBalance []*protobuf.Any `protobuf:"bytes,4,rep,name=vesting_balance,json=vestingBalance,proto3" json:"vesting_balance,omitempty"` } -func (m *MsgUpdateToken) Reset() { *m = MsgUpdateToken{} } -func (m *MsgUpdateToken) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateToken) ProtoMessage() {} -func (*MsgUpdateToken) Descriptor() ([]byte, []int) { +func (m *MsgAllocateToken) Reset() { *m = MsgAllocateToken{} } +func (m *MsgAllocateToken) String() string { return proto.CompactTextString(m) } +func (*MsgAllocateToken) ProtoMessage() {} +func (*MsgAllocateToken) Descriptor() ([]byte, []int) { return fileDescriptor_1cfda60866e68e13, []int{2} } -func (m *MsgUpdateToken) XXX_Unmarshal(b []byte) error { +func (m *MsgAllocateToken) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAllocateToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateToken.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAllocateToken.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -167,54 +187,61 @@ func (m *MsgUpdateToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *MsgUpdateToken) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateToken.Merge(m, src) +func (m *MsgAllocateToken) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAllocateToken.Merge(m, src) } -func (m *MsgUpdateToken) XXX_Size() int { +func (m *MsgAllocateToken) XXX_Size() int { return m.Size() } -func (m *MsgUpdateToken) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateToken.DiscardUnknown(m) +func (m *MsgAllocateToken) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAllocateToken.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateToken proto.InternalMessageInfo +var xxx_messageInfo_MsgAllocateToken proto.InternalMessageInfo -func (m *MsgUpdateToken) GetManager() string { +func (m *MsgAllocateToken) GetManager() string { if m != nil { return m.Manager } return "" } -func (m *MsgUpdateToken) GetSymbol() string { +func (m *MsgAllocateToken) GetTokenId() string { if m != nil { - return m.Symbol + return m.TokenId } return "" } -func (m *MsgUpdateToken) GetAuthorizationRequired() bool { +func (m *MsgAllocateToken) GetBalances() []types.Balance { if m != nil { - return m.AuthorizationRequired + return m.Balances } - return false + return nil +} + +func (m *MsgAllocateToken) GetVestingBalance() []*protobuf.Any { + if m != nil { + return m.VestingBalance + } + return nil } -type MsgUpdateTokenResponse struct { +type MsgAllocateTokenResponse struct { } -func (m *MsgUpdateTokenResponse) Reset() { *m = MsgUpdateTokenResponse{} } -func (m *MsgUpdateTokenResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateTokenResponse) ProtoMessage() {} -func (*MsgUpdateTokenResponse) Descriptor() ([]byte, []int) { +func (m *MsgAllocateTokenResponse) Reset() { *m = MsgAllocateTokenResponse{} } +func (m *MsgAllocateTokenResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAllocateTokenResponse) ProtoMessage() {} +func (*MsgAllocateTokenResponse) Descriptor() ([]byte, []int) { return fileDescriptor_1cfda60866e68e13, []int{3} } -func (m *MsgUpdateTokenResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgAllocateTokenResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAllocateTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateTokenResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAllocateTokenResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -224,36 +251,37 @@ func (m *MsgUpdateTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *MsgUpdateTokenResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateTokenResponse.Merge(m, src) +func (m *MsgAllocateTokenResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAllocateTokenResponse.Merge(m, src) } -func (m *MsgUpdateTokenResponse) XXX_Size() int { +func (m *MsgAllocateTokenResponse) XXX_Size() int { return m.Size() } -func (m *MsgUpdateTokenResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateTokenResponse.DiscardUnknown(m) +func (m *MsgAllocateTokenResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAllocateTokenResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateTokenResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgAllocateTokenResponse proto.InternalMessageInfo -type MsgAuthorizeAddress struct { - Manager string `protobuf:"bytes,1,opt,name=manager,proto3" json:"manager,omitempty"` - Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` +type MsgAssignPrivilege struct { + Manager string `protobuf:"bytes,1,opt,name=manager,proto3" json:"manager,omitempty"` + TokenId string `protobuf:"bytes,2,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` + AssignedTo []string `protobuf:"bytes,3,rep,name=assigned_to,json=assignedTo,proto3" json:"assigned_to,omitempty"` + Privilege string `protobuf:"bytes,4,opt,name=privilege,proto3" json:"privilege,omitempty"` } -func (m *MsgAuthorizeAddress) Reset() { *m = MsgAuthorizeAddress{} } -func (m *MsgAuthorizeAddress) String() string { return proto.CompactTextString(m) } -func (*MsgAuthorizeAddress) ProtoMessage() {} -func (*MsgAuthorizeAddress) Descriptor() ([]byte, []int) { +func (m *MsgAssignPrivilege) Reset() { *m = MsgAssignPrivilege{} } +func (m *MsgAssignPrivilege) String() string { return proto.CompactTextString(m) } +func (*MsgAssignPrivilege) ProtoMessage() {} +func (*MsgAssignPrivilege) Descriptor() ([]byte, []int) { return fileDescriptor_1cfda60866e68e13, []int{4} } -func (m *MsgAuthorizeAddress) XXX_Unmarshal(b []byte) error { +func (m *MsgAssignPrivilege) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgAuthorizeAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAssignPrivilege) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgAuthorizeAddress.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAssignPrivilege.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -263,54 +291,61 @@ func (m *MsgAuthorizeAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *MsgAuthorizeAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAuthorizeAddress.Merge(m, src) +func (m *MsgAssignPrivilege) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAssignPrivilege.Merge(m, src) } -func (m *MsgAuthorizeAddress) XXX_Size() int { +func (m *MsgAssignPrivilege) XXX_Size() int { return m.Size() } -func (m *MsgAuthorizeAddress) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAuthorizeAddress.DiscardUnknown(m) +func (m *MsgAssignPrivilege) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAssignPrivilege.DiscardUnknown(m) } -var xxx_messageInfo_MsgAuthorizeAddress proto.InternalMessageInfo +var xxx_messageInfo_MsgAssignPrivilege proto.InternalMessageInfo -func (m *MsgAuthorizeAddress) GetManager() string { +func (m *MsgAssignPrivilege) GetManager() string { if m != nil { return m.Manager } return "" } -func (m *MsgAuthorizeAddress) GetSymbol() string { +func (m *MsgAssignPrivilege) GetTokenId() string { if m != nil { - return m.Symbol + return m.TokenId } return "" } -func (m *MsgAuthorizeAddress) GetAddress() string { +func (m *MsgAssignPrivilege) GetAssignedTo() []string { if m != nil { - return m.Address + return m.AssignedTo + } + return nil +} + +func (m *MsgAssignPrivilege) GetPrivilege() string { + if m != nil { + return m.Privilege } return "" } -type MsgAuthorizeAddressResponse struct { +type MsgAssignPrivilegeResponse struct { } -func (m *MsgAuthorizeAddressResponse) Reset() { *m = MsgAuthorizeAddressResponse{} } -func (m *MsgAuthorizeAddressResponse) String() string { return proto.CompactTextString(m) } -func (*MsgAuthorizeAddressResponse) ProtoMessage() {} -func (*MsgAuthorizeAddressResponse) Descriptor() ([]byte, []int) { +func (m *MsgAssignPrivilegeResponse) Reset() { *m = MsgAssignPrivilegeResponse{} } +func (m *MsgAssignPrivilegeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAssignPrivilegeResponse) ProtoMessage() {} +func (*MsgAssignPrivilegeResponse) Descriptor() ([]byte, []int) { return fileDescriptor_1cfda60866e68e13, []int{5} } -func (m *MsgAuthorizeAddressResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgAssignPrivilegeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgAuthorizeAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAssignPrivilegeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgAuthorizeAddressResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAssignPrivilegeResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -320,36 +355,37 @@ func (m *MsgAuthorizeAddressResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *MsgAuthorizeAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAuthorizeAddressResponse.Merge(m, src) +func (m *MsgAssignPrivilegeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAssignPrivilegeResponse.Merge(m, src) } -func (m *MsgAuthorizeAddressResponse) XXX_Size() int { +func (m *MsgAssignPrivilegeResponse) XXX_Size() int { return m.Size() } -func (m *MsgAuthorizeAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAuthorizeAddressResponse.DiscardUnknown(m) +func (m *MsgAssignPrivilegeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAssignPrivilegeResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgAuthorizeAddressResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgAssignPrivilegeResponse proto.InternalMessageInfo -type MsgUnAuthorizeAddress struct { - Manager string `protobuf:"bytes,1,opt,name=manager,proto3" json:"manager,omitempty"` - Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` +type MsgUnassignPrivilege struct { + Manager string `protobuf:"bytes,1,opt,name=manager,proto3" json:"manager,omitempty"` + TokenId string `protobuf:"bytes,2,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` + UnassignedFrom []string `protobuf:"bytes,3,rep,name=unassigned_from,json=unassignedFrom,proto3" json:"unassigned_from,omitempty"` + Privilege string `protobuf:"bytes,4,opt,name=privilege,proto3" json:"privilege,omitempty"` } -func (m *MsgUnAuthorizeAddress) Reset() { *m = MsgUnAuthorizeAddress{} } -func (m *MsgUnAuthorizeAddress) String() string { return proto.CompactTextString(m) } -func (*MsgUnAuthorizeAddress) ProtoMessage() {} -func (*MsgUnAuthorizeAddress) Descriptor() ([]byte, []int) { +func (m *MsgUnassignPrivilege) Reset() { *m = MsgUnassignPrivilege{} } +func (m *MsgUnassignPrivilege) String() string { return proto.CompactTextString(m) } +func (*MsgUnassignPrivilege) ProtoMessage() {} +func (*MsgUnassignPrivilege) Descriptor() ([]byte, []int) { return fileDescriptor_1cfda60866e68e13, []int{6} } -func (m *MsgUnAuthorizeAddress) XXX_Unmarshal(b []byte) error { +func (m *MsgUnassignPrivilege) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUnAuthorizeAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUnassignPrivilege) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUnAuthorizeAddress.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUnassignPrivilege.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -359,54 +395,61 @@ func (m *MsgUnAuthorizeAddress) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (m *MsgUnAuthorizeAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUnAuthorizeAddress.Merge(m, src) +func (m *MsgUnassignPrivilege) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnassignPrivilege.Merge(m, src) } -func (m *MsgUnAuthorizeAddress) XXX_Size() int { +func (m *MsgUnassignPrivilege) XXX_Size() int { return m.Size() } -func (m *MsgUnAuthorizeAddress) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUnAuthorizeAddress.DiscardUnknown(m) +func (m *MsgUnassignPrivilege) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnassignPrivilege.DiscardUnknown(m) } -var xxx_messageInfo_MsgUnAuthorizeAddress proto.InternalMessageInfo +var xxx_messageInfo_MsgUnassignPrivilege proto.InternalMessageInfo -func (m *MsgUnAuthorizeAddress) GetManager() string { +func (m *MsgUnassignPrivilege) GetManager() string { if m != nil { return m.Manager } return "" } -func (m *MsgUnAuthorizeAddress) GetSymbol() string { +func (m *MsgUnassignPrivilege) GetTokenId() string { if m != nil { - return m.Symbol + return m.TokenId } return "" } -func (m *MsgUnAuthorizeAddress) GetAddress() string { +func (m *MsgUnassignPrivilege) GetUnassignedFrom() []string { if m != nil { - return m.Address + return m.UnassignedFrom + } + return nil +} + +func (m *MsgUnassignPrivilege) GetPrivilege() string { + if m != nil { + return m.Privilege } return "" } -type MsgUnAuthorizeAddressResponse struct { +type MsgUnassignPrivilegeResponse struct { } -func (m *MsgUnAuthorizeAddressResponse) Reset() { *m = MsgUnAuthorizeAddressResponse{} } -func (m *MsgUnAuthorizeAddressResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUnAuthorizeAddressResponse) ProtoMessage() {} -func (*MsgUnAuthorizeAddressResponse) Descriptor() ([]byte, []int) { +func (m *MsgUnassignPrivilegeResponse) Reset() { *m = MsgUnassignPrivilegeResponse{} } +func (m *MsgUnassignPrivilegeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUnassignPrivilegeResponse) ProtoMessage() {} +func (*MsgUnassignPrivilegeResponse) Descriptor() ([]byte, []int) { return fileDescriptor_1cfda60866e68e13, []int{7} } -func (m *MsgUnAuthorizeAddressResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgUnassignPrivilegeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUnAuthorizeAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUnassignPrivilegeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUnAuthorizeAddressResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUnassignPrivilegeResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -416,37 +459,36 @@ func (m *MsgUnAuthorizeAddressResponse) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } -func (m *MsgUnAuthorizeAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUnAuthorizeAddressResponse.Merge(m, src) +func (m *MsgUnassignPrivilegeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnassignPrivilegeResponse.Merge(m, src) } -func (m *MsgUnAuthorizeAddressResponse) XXX_Size() int { +func (m *MsgUnassignPrivilegeResponse) XXX_Size() int { return m.Size() } -func (m *MsgUnAuthorizeAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUnAuthorizeAddressResponse.DiscardUnknown(m) +func (m *MsgUnassignPrivilegeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnassignPrivilegeResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgUnAuthorizeAddressResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgUnassignPrivilegeResponse proto.InternalMessageInfo -type MsgTransferToken struct { - Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` - From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` - To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` - Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` +type MsgDisablePrivilege struct { + Manager string `protobuf:"bytes,1,opt,name=manager,proto3" json:"manager,omitempty"` + TokenId string `protobuf:"bytes,2,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` + DisabledPrivilege string `protobuf:"bytes,3,opt,name=disabled_privilege,json=disabledPrivilege,proto3" json:"disabled_privilege,omitempty"` } -func (m *MsgTransferToken) Reset() { *m = MsgTransferToken{} } -func (m *MsgTransferToken) String() string { return proto.CompactTextString(m) } -func (*MsgTransferToken) ProtoMessage() {} -func (*MsgTransferToken) Descriptor() ([]byte, []int) { +func (m *MsgDisablePrivilege) Reset() { *m = MsgDisablePrivilege{} } +func (m *MsgDisablePrivilege) String() string { return proto.CompactTextString(m) } +func (*MsgDisablePrivilege) ProtoMessage() {} +func (*MsgDisablePrivilege) Descriptor() ([]byte, []int) { return fileDescriptor_1cfda60866e68e13, []int{8} } -func (m *MsgTransferToken) XXX_Unmarshal(b []byte) error { +func (m *MsgDisablePrivilege) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgTransferToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgDisablePrivilege) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgTransferToken.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgDisablePrivilege.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -456,61 +498,150 @@ func (m *MsgTransferToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *MsgTransferToken) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgTransferToken.Merge(m, src) +func (m *MsgDisablePrivilege) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDisablePrivilege.Merge(m, src) } -func (m *MsgTransferToken) XXX_Size() int { +func (m *MsgDisablePrivilege) XXX_Size() int { return m.Size() } -func (m *MsgTransferToken) XXX_DiscardUnknown() { - xxx_messageInfo_MsgTransferToken.DiscardUnknown(m) +func (m *MsgDisablePrivilege) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDisablePrivilege.DiscardUnknown(m) } -var xxx_messageInfo_MsgTransferToken proto.InternalMessageInfo +var xxx_messageInfo_MsgDisablePrivilege proto.InternalMessageInfo -func (m *MsgTransferToken) GetSymbol() string { +func (m *MsgDisablePrivilege) GetManager() string { if m != nil { - return m.Symbol + return m.Manager + } + return "" +} + +func (m *MsgDisablePrivilege) GetTokenId() string { + if m != nil { + return m.TokenId } return "" } -func (m *MsgTransferToken) GetFrom() string { +func (m *MsgDisablePrivilege) GetDisabledPrivilege() string { if m != nil { - return m.From + return m.DisabledPrivilege } return "" } -func (m *MsgTransferToken) GetTo() string { +type MsgDisablePrivilegeResponse struct { +} + +func (m *MsgDisablePrivilegeResponse) Reset() { *m = MsgDisablePrivilegeResponse{} } +func (m *MsgDisablePrivilegeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDisablePrivilegeResponse) ProtoMessage() {} +func (*MsgDisablePrivilegeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1cfda60866e68e13, []int{9} +} +func (m *MsgDisablePrivilegeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDisablePrivilegeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDisablePrivilegeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgDisablePrivilegeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDisablePrivilegeResponse.Merge(m, src) +} +func (m *MsgDisablePrivilegeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDisablePrivilegeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDisablePrivilegeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDisablePrivilegeResponse proto.InternalMessageInfo + +type MsgExecutePrivilege struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + TokenId string `protobuf:"bytes,2,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"` + PrivilegeMsg *protobuf.Any `protobuf:"bytes,3,opt,name=privilege_msg,json=privilegeMsg,proto3" json:"privilege_msg,omitempty"` +} + +func (m *MsgExecutePrivilege) Reset() { *m = MsgExecutePrivilege{} } +func (m *MsgExecutePrivilege) String() string { return proto.CompactTextString(m) } +func (*MsgExecutePrivilege) ProtoMessage() {} +func (*MsgExecutePrivilege) Descriptor() ([]byte, []int) { + return fileDescriptor_1cfda60866e68e13, []int{10} +} +func (m *MsgExecutePrivilege) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgExecutePrivilege) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgExecutePrivilege.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgExecutePrivilege) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExecutePrivilege.Merge(m, src) +} +func (m *MsgExecutePrivilege) XXX_Size() int { + return m.Size() +} +func (m *MsgExecutePrivilege) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExecutePrivilege.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgExecutePrivilege proto.InternalMessageInfo + +func (m *MsgExecutePrivilege) GetAddress() string { if m != nil { - return m.To + return m.Address } return "" } -func (m *MsgTransferToken) GetAmount() string { +func (m *MsgExecutePrivilege) GetTokenId() string { if m != nil { - return m.Amount + return m.TokenId } return "" } -type MsgTransferTokenResponse struct { +func (m *MsgExecutePrivilege) GetPrivilegeMsg() *protobuf.Any { + if m != nil { + return m.PrivilegeMsg + } + return nil } -func (m *MsgTransferTokenResponse) Reset() { *m = MsgTransferTokenResponse{} } -func (m *MsgTransferTokenResponse) String() string { return proto.CompactTextString(m) } -func (*MsgTransferTokenResponse) ProtoMessage() {} -func (*MsgTransferTokenResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1cfda60866e68e13, []int{9} +type MsgExecutePrivilegeResponse struct { +} + +func (m *MsgExecutePrivilegeResponse) Reset() { *m = MsgExecutePrivilegeResponse{} } +func (m *MsgExecutePrivilegeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgExecutePrivilegeResponse) ProtoMessage() {} +func (*MsgExecutePrivilegeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1cfda60866e68e13, []int{11} } -func (m *MsgTransferTokenResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgExecutePrivilegeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgTransferTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgExecutePrivilegeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgTransferTokenResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgExecutePrivilegeResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -520,66 +651,86 @@ func (m *MsgTransferTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *MsgTransferTokenResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgTransferTokenResponse.Merge(m, src) +func (m *MsgExecutePrivilegeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgExecutePrivilegeResponse.Merge(m, src) } -func (m *MsgTransferTokenResponse) XXX_Size() int { +func (m *MsgExecutePrivilegeResponse) XXX_Size() int { return m.Size() } -func (m *MsgTransferTokenResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgTransferTokenResponse.DiscardUnknown(m) +func (m *MsgExecutePrivilegeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgExecutePrivilegeResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgTransferTokenResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgExecutePrivilegeResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgCreateToken)(nil), "realionetwork.asset.v1.MsgCreateToken") proto.RegisterType((*MsgCreateTokenResponse)(nil), "realionetwork.asset.v1.MsgCreateTokenResponse") - proto.RegisterType((*MsgUpdateToken)(nil), "realionetwork.asset.v1.MsgUpdateToken") - proto.RegisterType((*MsgUpdateTokenResponse)(nil), "realionetwork.asset.v1.MsgUpdateTokenResponse") - proto.RegisterType((*MsgAuthorizeAddress)(nil), "realionetwork.asset.v1.MsgAuthorizeAddress") - proto.RegisterType((*MsgAuthorizeAddressResponse)(nil), "realionetwork.asset.v1.MsgAuthorizeAddressResponse") - proto.RegisterType((*MsgUnAuthorizeAddress)(nil), "realionetwork.asset.v1.MsgUnAuthorizeAddress") - proto.RegisterType((*MsgUnAuthorizeAddressResponse)(nil), "realionetwork.asset.v1.MsgUnAuthorizeAddressResponse") - proto.RegisterType((*MsgTransferToken)(nil), "realionetwork.asset.v1.MsgTransferToken") - proto.RegisterType((*MsgTransferTokenResponse)(nil), "realionetwork.asset.v1.MsgTransferTokenResponse") + proto.RegisterType((*MsgAllocateToken)(nil), "realionetwork.asset.v1.MsgAllocateToken") + proto.RegisterType((*MsgAllocateTokenResponse)(nil), "realionetwork.asset.v1.MsgAllocateTokenResponse") + proto.RegisterType((*MsgAssignPrivilege)(nil), "realionetwork.asset.v1.MsgAssignPrivilege") + proto.RegisterType((*MsgAssignPrivilegeResponse)(nil), "realionetwork.asset.v1.MsgAssignPrivilegeResponse") + proto.RegisterType((*MsgUnassignPrivilege)(nil), "realionetwork.asset.v1.MsgUnassignPrivilege") + proto.RegisterType((*MsgUnassignPrivilegeResponse)(nil), "realionetwork.asset.v1.MsgUnassignPrivilegeResponse") + proto.RegisterType((*MsgDisablePrivilege)(nil), "realionetwork.asset.v1.MsgDisablePrivilege") + proto.RegisterType((*MsgDisablePrivilegeResponse)(nil), "realionetwork.asset.v1.MsgDisablePrivilegeResponse") + proto.RegisterType((*MsgExecutePrivilege)(nil), "realionetwork.asset.v1.MsgExecutePrivilege") + proto.RegisterType((*MsgExecutePrivilegeResponse)(nil), "realionetwork.asset.v1.MsgExecutePrivilegeResponse") } func init() { proto.RegisterFile("realionetwork/asset/v1/tx.proto", fileDescriptor_1cfda60866e68e13) } var fileDescriptor_1cfda60866e68e13 = []byte{ - // 496 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0xc1, 0x6e, 0xd3, 0x30, - 0x18, 0xc7, 0x9b, 0xb6, 0x74, 0xf0, 0x21, 0xa6, 0xc9, 0x6c, 0x95, 0x15, 0xb4, 0x6c, 0xca, 0x01, - 0x55, 0x42, 0x4b, 0xd8, 0x06, 0x0f, 0x30, 0xb8, 0xd2, 0x4b, 0x35, 0x2e, 0xdc, 0xdc, 0xf6, 0x6b, - 0x1a, 0xb5, 0xb1, 0x8b, 0xed, 0x8e, 0x6e, 0x4f, 0xc1, 0x33, 0xf0, 0x08, 0x3c, 0x05, 0xc7, 0x1d, - 0x39, 0xa2, 0xf6, 0x45, 0x50, 0x12, 0x27, 0x6b, 0xb6, 0x10, 0x5a, 0x24, 0x6e, 0xfe, 0xdc, 0x7f, - 0xfc, 0xfb, 0xa9, 0xf9, 0xc7, 0x70, 0x24, 0x91, 0x4d, 0x43, 0xc1, 0x51, 0x7f, 0x11, 0x72, 0xe2, - 0x33, 0xa5, 0x50, 0xfb, 0x57, 0xa7, 0xbe, 0x5e, 0x78, 0x33, 0x29, 0xb4, 0x20, 0xed, 0x42, 0xc0, - 0x4b, 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 0x7e, 0x2b, 0xb9, - 0x68, 0xcf, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x73, 0xaf, 0x67, 0xb9, 0x05, 0x00, 0x00, + // 780 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x96, 0x4b, 0x4f, 0xeb, 0x46, + 0x14, 0xc7, 0x63, 0x12, 0x08, 0x1c, 0x0a, 0x81, 0x21, 0x42, 0xc6, 0x4d, 0x43, 0x9a, 0x45, 0x15, + 0xd1, 0x62, 0x37, 0xa1, 0x9b, 0x2e, 0x5a, 0x29, 0xe9, 0x43, 0xaa, 0xd4, 0x54, 0x95, 0x4b, 0x37, + 0xdd, 0x44, 0x63, 0x7b, 0x18, 0xac, 0xd8, 0x33, 0xa9, 0xc7, 0x79, 0x7d, 0x8b, 0x4a, 0x5d, 0x76, + 0xd1, 0xcf, 0x50, 0xa9, 0xcb, 0xbb, 0xbe, 0x62, 0x89, 0xee, 0xea, 0xae, 0xae, 0x10, 0x7c, 0x91, + 0xab, 0xf8, 0x95, 0x17, 0x38, 0x41, 0xba, 0xec, 0x7c, 0x7c, 0x7e, 0x73, 0xce, 0xf9, 0x1f, 0x9f, + 0x33, 0x09, 0x9c, 0x7a, 0x04, 0x3b, 0x36, 0x67, 0xc4, 0x1f, 0x72, 0xaf, 0xab, 0x61, 0x21, 0x88, + 0xaf, 0x0d, 0xea, 0x9a, 0x3f, 0x52, 0x7b, 0x1e, 0xf7, 0x39, 0x3a, 0x9e, 0x03, 0xd4, 0x00, 0x50, + 0x07, 0x75, 0xa5, 0x48, 0x39, 0xe5, 0x01, 0xa2, 0x4d, 0x9e, 0x42, 0x5a, 0x39, 0x31, 0xb9, 0x70, + 0xb9, 0xe8, 0x84, 0x8e, 0xd0, 0x88, 0x5c, 0x9f, 0x86, 0x96, 0x66, 0x60, 0xd6, 0xd5, 0x06, 0x75, + 0x83, 0xf8,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xfd, 0x7c, 0x73, 0x5f, 0x96, 0x6e, 0xef, 0xcb, 0xd2, 0xdd, 0x7d, 0x59, + 0xfa, 0xeb, 0xa1, 0x9c, 0xb9, 0x7d, 0x28, 0x67, 0xde, 0x3e, 0x94, 0x33, 0x7f, 0x34, 0xa8, 0xed, + 0x5f, 0xf7, 0x0d, 0xd5, 0xe4, 0xae, 0x16, 0x06, 0xf6, 0x89, 0x79, 0x1d, 0x3d, 0x9e, 0xc7, 0xff, + 0x7f, 0x46, 0xd1, 0x3f, 0x20, 0x7f, 0xdc, 0x23, 0xc2, 0xd8, 0x0a, 0x96, 0xe7, 0xe2, 0x7d, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xee, 0x81, 0x15, 0xb5, 0x25, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -595,10 +746,11 @@ const _ = grpc.SupportPackageIsVersion4 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { CreateToken(ctx context.Context, in *MsgCreateToken, opts ...grpc.CallOption) (*MsgCreateTokenResponse, error) - UpdateToken(ctx context.Context, in *MsgUpdateToken, opts ...grpc.CallOption) (*MsgUpdateTokenResponse, error) - AuthorizeAddress(ctx context.Context, in *MsgAuthorizeAddress, opts ...grpc.CallOption) (*MsgAuthorizeAddressResponse, error) - UnAuthorizeAddress(ctx context.Context, in *MsgUnAuthorizeAddress, opts ...grpc.CallOption) (*MsgUnAuthorizeAddressResponse, error) - TransferToken(ctx context.Context, in *MsgTransferToken, opts ...grpc.CallOption) (*MsgTransferTokenResponse, error) + AllocateToken(ctx context.Context, in *MsgAllocateToken, opts ...grpc.CallOption) (*MsgAllocateTokenResponse, error) + AssignPrivilege(ctx context.Context, in *MsgAssignPrivilege, opts ...grpc.CallOption) (*MsgAssignPrivilegeResponse, error) + UnassignPrivilege(ctx context.Context, in *MsgUnassignPrivilege, opts ...grpc.CallOption) (*MsgUnassignPrivilegeResponse, error) + DisablePrivilege(ctx context.Context, in *MsgDisablePrivilege, opts ...grpc.CallOption) (*MsgDisablePrivilegeResponse, error) + ExecutePrivilege(ctx context.Context, in *MsgExecutePrivilege, opts ...grpc.CallOption) (*MsgExecutePrivilegeResponse, error) } type msgClient struct { @@ -618,36 +770,45 @@ func (c *msgClient) CreateToken(ctx context.Context, in *MsgCreateToken, opts .. return out, nil } -func (c *msgClient) UpdateToken(ctx context.Context, in *MsgUpdateToken, opts ...grpc.CallOption) (*MsgUpdateTokenResponse, error) { - out := new(MsgUpdateTokenResponse) - err := c.cc.Invoke(ctx, "/realionetwork.asset.v1.Msg/UpdateToken", in, out, opts...) +func (c *msgClient) AllocateToken(ctx context.Context, in *MsgAllocateToken, opts ...grpc.CallOption) (*MsgAllocateTokenResponse, error) { + out := new(MsgAllocateTokenResponse) + err := c.cc.Invoke(ctx, "/realionetwork.asset.v1.Msg/AllocateToken", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) AssignPrivilege(ctx context.Context, in *MsgAssignPrivilege, opts ...grpc.CallOption) (*MsgAssignPrivilegeResponse, error) { + out := new(MsgAssignPrivilegeResponse) + err := c.cc.Invoke(ctx, "/realionetwork.asset.v1.Msg/AssignPrivilege", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) AuthorizeAddress(ctx context.Context, in *MsgAuthorizeAddress, opts ...grpc.CallOption) (*MsgAuthorizeAddressResponse, error) { - out := new(MsgAuthorizeAddressResponse) - err := c.cc.Invoke(ctx, "/realionetwork.asset.v1.Msg/AuthorizeAddress", in, out, opts...) +func (c *msgClient) UnassignPrivilege(ctx context.Context, in *MsgUnassignPrivilege, opts ...grpc.CallOption) (*MsgUnassignPrivilegeResponse, error) { + out := new(MsgUnassignPrivilegeResponse) + err := c.cc.Invoke(ctx, "/realionetwork.asset.v1.Msg/UnassignPrivilege", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) UnAuthorizeAddress(ctx context.Context, in *MsgUnAuthorizeAddress, opts ...grpc.CallOption) (*MsgUnAuthorizeAddressResponse, error) { - out := new(MsgUnAuthorizeAddressResponse) - err := c.cc.Invoke(ctx, "/realionetwork.asset.v1.Msg/UnAuthorizeAddress", in, out, opts...) +func (c *msgClient) DisablePrivilege(ctx context.Context, in *MsgDisablePrivilege, opts ...grpc.CallOption) (*MsgDisablePrivilegeResponse, error) { + out := new(MsgDisablePrivilegeResponse) + err := c.cc.Invoke(ctx, "/realionetwork.asset.v1.Msg/DisablePrivilege", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) TransferToken(ctx context.Context, in *MsgTransferToken, opts ...grpc.CallOption) (*MsgTransferTokenResponse, error) { - out := new(MsgTransferTokenResponse) - err := c.cc.Invoke(ctx, "/realionetwork.asset.v1.Msg/TransferToken", in, out, opts...) +func (c *msgClient) ExecutePrivilege(ctx context.Context, in *MsgExecutePrivilege, opts ...grpc.CallOption) (*MsgExecutePrivilegeResponse, error) { + out := new(MsgExecutePrivilegeResponse) + err := c.cc.Invoke(ctx, "/realionetwork.asset.v1.Msg/ExecutePrivilege", in, out, opts...) if err != nil { return nil, err } @@ -657,10 +818,11 @@ func (c *msgClient) TransferToken(ctx context.Context, in *MsgTransferToken, opt // MsgServer is the server API for Msg service. type MsgServer interface { CreateToken(context.Context, *MsgCreateToken) (*MsgCreateTokenResponse, error) - UpdateToken(context.Context, *MsgUpdateToken) (*MsgUpdateTokenResponse, error) - AuthorizeAddress(context.Context, *MsgAuthorizeAddress) (*MsgAuthorizeAddressResponse, error) - UnAuthorizeAddress(context.Context, *MsgUnAuthorizeAddress) (*MsgUnAuthorizeAddressResponse, error) - TransferToken(context.Context, *MsgTransferToken) (*MsgTransferTokenResponse, error) + AllocateToken(context.Context, *MsgAllocateToken) (*MsgAllocateTokenResponse, error) + AssignPrivilege(context.Context, *MsgAssignPrivilege) (*MsgAssignPrivilegeResponse, error) + UnassignPrivilege(context.Context, *MsgUnassignPrivilege) (*MsgUnassignPrivilegeResponse, error) + DisablePrivilege(context.Context, *MsgDisablePrivilege) (*MsgDisablePrivilegeResponse, error) + ExecutePrivilege(context.Context, *MsgExecutePrivilege) (*MsgExecutePrivilegeResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -670,17 +832,20 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) CreateToken(ctx context.Context, req *MsgCreateToken) (*MsgCreateTokenResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateToken not implemented") } -func (*UnimplementedMsgServer) UpdateToken(ctx context.Context, req *MsgUpdateToken) (*MsgUpdateTokenResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateToken not implemented") +func (*UnimplementedMsgServer) AllocateToken(ctx context.Context, req *MsgAllocateToken) (*MsgAllocateTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllocateToken not implemented") +} +func (*UnimplementedMsgServer) AssignPrivilege(ctx context.Context, req *MsgAssignPrivilege) (*MsgAssignPrivilegeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AssignPrivilege not implemented") } -func (*UnimplementedMsgServer) AuthorizeAddress(ctx context.Context, req *MsgAuthorizeAddress) (*MsgAuthorizeAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AuthorizeAddress not implemented") +func (*UnimplementedMsgServer) UnassignPrivilege(ctx context.Context, req *MsgUnassignPrivilege) (*MsgUnassignPrivilegeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnassignPrivilege not implemented") } -func (*UnimplementedMsgServer) UnAuthorizeAddress(ctx context.Context, req *MsgUnAuthorizeAddress) (*MsgUnAuthorizeAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnAuthorizeAddress not implemented") +func (*UnimplementedMsgServer) DisablePrivilege(ctx context.Context, req *MsgDisablePrivilege) (*MsgDisablePrivilegeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DisablePrivilege not implemented") } -func (*UnimplementedMsgServer) TransferToken(ctx context.Context, req *MsgTransferToken) (*MsgTransferTokenResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TransferToken not implemented") +func (*UnimplementedMsgServer) ExecutePrivilege(ctx context.Context, req *MsgExecutePrivilege) (*MsgExecutePrivilegeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExecutePrivilege not implemented") } func RegisterMsgServer(s grpc1.Server, srv MsgServer) { @@ -705,74 +870,92 @@ func _Msg_CreateToken_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } -func _Msg_UpdateToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateToken) +func _Msg_AllocateToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAllocateToken) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).UpdateToken(ctx, in) + return srv.(MsgServer).AllocateToken(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/realionetwork.asset.v1.Msg/UpdateToken", + FullMethod: "/realionetwork.asset.v1.Msg/AllocateToken", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateToken(ctx, req.(*MsgUpdateToken)) + return srv.(MsgServer).AllocateToken(ctx, req.(*MsgAllocateToken)) } return interceptor(ctx, in, info, handler) } -func _Msg_AuthorizeAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAuthorizeAddress) +func _Msg_AssignPrivilege_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAssignPrivilege) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).AuthorizeAddress(ctx, in) + return srv.(MsgServer).AssignPrivilege(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/realionetwork.asset.v1.Msg/AuthorizeAddress", + FullMethod: "/realionetwork.asset.v1.Msg/AssignPrivilege", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AuthorizeAddress(ctx, req.(*MsgAuthorizeAddress)) + return srv.(MsgServer).AssignPrivilege(ctx, req.(*MsgAssignPrivilege)) } return interceptor(ctx, in, info, handler) } -func _Msg_UnAuthorizeAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUnAuthorizeAddress) +func _Msg_UnassignPrivilege_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUnassignPrivilege) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).UnAuthorizeAddress(ctx, in) + return srv.(MsgServer).UnassignPrivilege(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/realionetwork.asset.v1.Msg/UnAuthorizeAddress", + FullMethod: "/realionetwork.asset.v1.Msg/UnassignPrivilege", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UnAuthorizeAddress(ctx, req.(*MsgUnAuthorizeAddress)) + return srv.(MsgServer).UnassignPrivilege(ctx, req.(*MsgUnassignPrivilege)) } return interceptor(ctx, in, info, handler) } -func _Msg_TransferToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgTransferToken) +func _Msg_DisablePrivilege_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDisablePrivilege) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).TransferToken(ctx, in) + return srv.(MsgServer).DisablePrivilege(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/realionetwork.asset.v1.Msg/TransferToken", + FullMethod: "/realionetwork.asset.v1.Msg/DisablePrivilege", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).TransferToken(ctx, req.(*MsgTransferToken)) + return srv.(MsgServer).DisablePrivilege(ctx, req.(*MsgDisablePrivilege)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ExecutePrivilege_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgExecutePrivilege) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ExecutePrivilege(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/realionetwork.asset.v1.Msg/ExecutePrivilege", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ExecutePrivilege(ctx, req.(*MsgExecutePrivilege)) } return interceptor(ctx, in, info, handler) } @@ -786,20 +969,24 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_CreateToken_Handler, }, { - MethodName: "UpdateToken", - Handler: _Msg_UpdateToken_Handler, + MethodName: "AllocateToken", + Handler: _Msg_AllocateToken_Handler, + }, + { + MethodName: "AssignPrivilege", + Handler: _Msg_AssignPrivilege_Handler, }, { - MethodName: "AuthorizeAddress", - Handler: _Msg_AuthorizeAddress_Handler, + MethodName: "UnassignPrivilege", + Handler: _Msg_UnassignPrivilege_Handler, }, { - MethodName: "UnAuthorizeAddress", - Handler: _Msg_UnAuthorizeAddress_Handler, + MethodName: "DisablePrivilege", + Handler: _Msg_DisablePrivilege_Handler, }, { - MethodName: "TransferToken", - Handler: _Msg_TransferToken_Handler, + MethodName: "ExecutePrivilege", + Handler: _Msg_ExecutePrivilege_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -826,42 +1013,58 @@ func (m *MsgCreateToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.AuthorizationRequired { + if m.AddNewPrivilege { i-- - if m.AuthorizationRequired { + if m.AddNewPrivilege { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x30 + dAtA[i] = 0x38 + } + if len(m.ExcludedPrivileges) > 0 { + for iNdEx := len(m.ExcludedPrivileges) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ExcludedPrivileges[iNdEx]) + copy(dAtA[i:], m.ExcludedPrivileges[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.ExcludedPrivileges[iNdEx]))) + i-- + dAtA[i] = 0x32 + } } - if len(m.Total) > 0 { - i -= len(m.Total) - copy(dAtA[i:], m.Total) - i = encodeVarintTx(dAtA, i, uint64(len(m.Total))) + if len(m.Decimal) > 0 { + i -= len(m.Decimal) + copy(dAtA[i:], m.Decimal) + i = encodeVarintTx(dAtA, i, uint64(len(m.Decimal))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a } if len(m.Symbol) > 0 { i -= len(m.Symbol) copy(dAtA[i:], m.Symbol) i = encodeVarintTx(dAtA, i, uint64(len(m.Symbol))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } if len(m.Manager) > 0 { i -= len(m.Manager) copy(dAtA[i:], m.Manager) i = encodeVarintTx(dAtA, i, uint64(len(m.Manager))) i-- + dAtA[i] = 0x12 + } + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -890,7 +1093,7 @@ func (m *MsgCreateTokenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgUpdateToken) Marshal() (dAtA []byte, err error) { +func (m *MsgAllocateToken) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -900,30 +1103,48 @@ func (m *MsgUpdateToken) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateToken) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgAllocateToken) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgAllocateToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.AuthorizationRequired { - i-- - if m.AuthorizationRequired { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.VestingBalance) > 0 { + for iNdEx := len(m.VestingBalance) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.VestingBalance[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x18 } - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintTx(dAtA, i, uint64(len(m.Symbol))) + if len(m.Balances) > 0 { + for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.TokenId) > 0 { + i -= len(m.TokenId) + copy(dAtA[i:], m.TokenId) + i = encodeVarintTx(dAtA, i, uint64(len(m.TokenId))) i-- dAtA[i] = 0x12 } @@ -937,7 +1158,7 @@ func (m *MsgUpdateToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgUpdateTokenResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgAllocateTokenResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -947,12 +1168,12 @@ func (m *MsgUpdateTokenResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateTokenResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgAllocateTokenResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateTokenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgAllocateTokenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -960,7 +1181,7 @@ func (m *MsgUpdateTokenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgAuthorizeAddress) Marshal() (dAtA []byte, err error) { +func (m *MsgAssignPrivilege) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -970,27 +1191,36 @@ func (m *MsgAuthorizeAddress) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgAuthorizeAddress) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgAssignPrivilege) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgAuthorizeAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgAssignPrivilege) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + if len(m.Privilege) > 0 { + i -= len(m.Privilege) + copy(dAtA[i:], m.Privilege) + i = encodeVarintTx(dAtA, i, uint64(len(m.Privilege))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintTx(dAtA, i, uint64(len(m.Symbol))) + if len(m.AssignedTo) > 0 { + for iNdEx := len(m.AssignedTo) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AssignedTo[iNdEx]) + copy(dAtA[i:], m.AssignedTo[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.AssignedTo[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.TokenId) > 0 { + i -= len(m.TokenId) + copy(dAtA[i:], m.TokenId) + i = encodeVarintTx(dAtA, i, uint64(len(m.TokenId))) i-- dAtA[i] = 0x12 } @@ -1004,7 +1234,7 @@ func (m *MsgAuthorizeAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgAuthorizeAddressResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgAssignPrivilegeResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1014,12 +1244,12 @@ func (m *MsgAuthorizeAddressResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgAuthorizeAddressResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgAssignPrivilegeResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgAuthorizeAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgAssignPrivilegeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1027,7 +1257,7 @@ func (m *MsgAuthorizeAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } -func (m *MsgUnAuthorizeAddress) Marshal() (dAtA []byte, err error) { +func (m *MsgUnassignPrivilege) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1037,27 +1267,36 @@ func (m *MsgUnAuthorizeAddress) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUnAuthorizeAddress) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUnassignPrivilege) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUnAuthorizeAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUnassignPrivilege) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + if len(m.Privilege) > 0 { + i -= len(m.Privilege) + copy(dAtA[i:], m.Privilege) + i = encodeVarintTx(dAtA, i, uint64(len(m.Privilege))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintTx(dAtA, i, uint64(len(m.Symbol))) + if len(m.UnassignedFrom) > 0 { + for iNdEx := len(m.UnassignedFrom) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.UnassignedFrom[iNdEx]) + copy(dAtA[i:], m.UnassignedFrom[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.UnassignedFrom[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.TokenId) > 0 { + i -= len(m.TokenId) + copy(dAtA[i:], m.TokenId) + i = encodeVarintTx(dAtA, i, uint64(len(m.TokenId))) i-- dAtA[i] = 0x12 } @@ -1071,7 +1310,7 @@ func (m *MsgUnAuthorizeAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgUnAuthorizeAddressResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgUnassignPrivilegeResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1081,12 +1320,12 @@ func (m *MsgUnAuthorizeAddressResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUnAuthorizeAddressResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUnassignPrivilegeResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUnAuthorizeAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUnassignPrivilegeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1094,7 +1333,7 @@ func (m *MsgUnAuthorizeAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *MsgTransferToken) Marshal() (dAtA []byte, err error) { +func (m *MsgDisablePrivilege) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1104,48 +1343,113 @@ func (m *MsgTransferToken) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgTransferToken) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgDisablePrivilege) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgTransferToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgDisablePrivilege) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Amount) > 0 { - i -= len(m.Amount) - copy(dAtA[i:], m.Amount) - i = encodeVarintTx(dAtA, i, uint64(len(m.Amount))) + if len(m.DisabledPrivilege) > 0 { + i -= len(m.DisabledPrivilege) + copy(dAtA[i:], m.DisabledPrivilege) + i = encodeVarintTx(dAtA, i, uint64(len(m.DisabledPrivilege))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a + } + if len(m.TokenId) > 0 { + i -= len(m.TokenId) + copy(dAtA[i:], m.TokenId) + i = encodeVarintTx(dAtA, i, uint64(len(m.TokenId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Manager) > 0 { + i -= len(m.Manager) + copy(dAtA[i:], m.Manager) + i = encodeVarintTx(dAtA, i, uint64(len(m.Manager))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDisablePrivilegeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgDisablePrivilegeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDisablePrivilegeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgExecutePrivilege) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.To) > 0 { - i -= len(m.To) - copy(dAtA[i:], m.To) - i = encodeVarintTx(dAtA, i, uint64(len(m.To))) + return dAtA[:n], nil +} + +func (m *MsgExecutePrivilege) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgExecutePrivilege) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PrivilegeMsg != nil { + { + size, err := m.PrivilegeMsg.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x1a } - if len(m.From) > 0 { - i -= len(m.From) - copy(dAtA[i:], m.From) - i = encodeVarintTx(dAtA, i, uint64(len(m.From))) + if len(m.TokenId) > 0 { + i -= len(m.TokenId) + copy(dAtA[i:], m.TokenId) + i = encodeVarintTx(dAtA, i, uint64(len(m.TokenId))) i-- dAtA[i] = 0x12 } - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintTx(dAtA, i, uint64(len(m.Symbol))) + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *MsgTransferTokenResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgExecutePrivilegeResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1155,12 +1459,12 @@ func (m *MsgTransferTokenResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgTransferTokenResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgExecutePrivilegeResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgTransferTokenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgExecutePrivilegeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1185,6 +1489,10 @@ func (m *MsgCreateToken) Size() (n int) { } var l int _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } l = len(m.Manager) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1197,11 +1505,17 @@ func (m *MsgCreateToken) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Total) + l = len(m.Decimal) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.AuthorizationRequired { + if len(m.ExcludedPrivileges) > 0 { + for _, s := range m.ExcludedPrivileges { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if m.AddNewPrivilege { n += 2 } return n @@ -1216,7 +1530,7 @@ func (m *MsgCreateTokenResponse) Size() (n int) { return n } -func (m *MsgUpdateToken) Size() (n int) { +func (m *MsgAllocateToken) Size() (n int) { if m == nil { return 0 } @@ -1226,17 +1540,26 @@ func (m *MsgUpdateToken) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Symbol) + l = len(m.TokenId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.AuthorizationRequired { - n += 2 + if len(m.Balances) > 0 { + for _, e := range m.Balances { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.VestingBalance) > 0 { + for _, e := range m.VestingBalance { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } } return n } -func (m *MsgUpdateTokenResponse) Size() (n int) { +func (m *MsgAllocateTokenResponse) Size() (n int) { if m == nil { return 0 } @@ -1245,7 +1568,7 @@ func (m *MsgUpdateTokenResponse) Size() (n int) { return n } -func (m *MsgAuthorizeAddress) Size() (n int) { +func (m *MsgAssignPrivilege) Size() (n int) { if m == nil { return 0 } @@ -1255,18 +1578,24 @@ func (m *MsgAuthorizeAddress) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Symbol) + l = len(m.TokenId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Address) + if len(m.AssignedTo) > 0 { + for _, s := range m.AssignedTo { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.Privilege) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } -func (m *MsgAuthorizeAddressResponse) Size() (n int) { +func (m *MsgAssignPrivilegeResponse) Size() (n int) { if m == nil { return 0 } @@ -1275,7 +1604,7 @@ func (m *MsgAuthorizeAddressResponse) Size() (n int) { return n } -func (m *MsgUnAuthorizeAddress) Size() (n int) { +func (m *MsgUnassignPrivilege) Size() (n int) { if m == nil { return 0 } @@ -1285,18 +1614,24 @@ func (m *MsgUnAuthorizeAddress) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Symbol) + l = len(m.TokenId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Address) + if len(m.UnassignedFrom) > 0 { + for _, s := range m.UnassignedFrom { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.Privilege) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } -func (m *MsgUnAuthorizeAddressResponse) Size() (n int) { +func (m *MsgUnassignPrivilegeResponse) Size() (n int) { if m == nil { return 0 } @@ -1305,32 +1640,28 @@ func (m *MsgUnAuthorizeAddressResponse) Size() (n int) { return n } -func (m *MsgTransferToken) Size() (n int) { +func (m *MsgDisablePrivilege) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Symbol) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.From) + l = len(m.Manager) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.To) + l = len(m.TokenId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Amount) + l = len(m.DisabledPrivilege) if l > 0 { n += 1 + l + sovTx(uint64(l)) } return n } -func (m *MsgTransferTokenResponse) Size() (n int) { +func (m *MsgDisablePrivilegeResponse) Size() (n int) { if m == nil { return 0 } @@ -1339,16 +1670,46 @@ func (m *MsgTransferTokenResponse) Size() (n int) { return n } -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgCreateToken) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { +func (m *MsgExecutePrivilege) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.TokenId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.PrivilegeMsg != nil { + l = m.PrivilegeMsg.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgExecutePrivilegeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgCreateToken) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1375,6 +1736,38 @@ func (m *MsgCreateToken) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Manager", wireType) } @@ -1406,7 +1799,7 @@ func (m *MsgCreateToken) Unmarshal(dAtA []byte) error { } m.Manager = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } @@ -1438,7 +1831,7 @@ func (m *MsgCreateToken) Unmarshal(dAtA []byte) error { } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) } @@ -1470,9 +1863,9 @@ func (m *MsgCreateToken) Unmarshal(dAtA []byte) error { } m.Symbol = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Decimal", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1500,11 +1893,43 @@ func (m *MsgCreateToken) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Total = string(dAtA[iNdEx:postIndex]) + m.Decimal = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExcludedPrivileges", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExcludedPrivileges = append(m.ExcludedPrivileges, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthorizationRequired", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AddNewPrivilege", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -1521,7 +1946,7 @@ func (m *MsgCreateToken) Unmarshal(dAtA []byte) error { break } } - m.AuthorizationRequired = bool(v != 0) + m.AddNewPrivilege = bool(v != 0) default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -1593,7 +2018,7 @@ func (m *MsgCreateTokenResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateToken) Unmarshal(dAtA []byte) error { +func (m *MsgAllocateToken) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1616,10 +2041,10 @@ func (m *MsgUpdateToken) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateToken: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAllocateToken: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateToken: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAllocateToken: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1656,7 +2081,7 @@ func (m *MsgUpdateToken) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1684,13 +2109,13 @@ func (m *MsgUpdateToken) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Symbol = string(dAtA[iNdEx:postIndex]) + m.TokenId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthorizationRequired", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1700,12 +2125,60 @@ func (m *MsgUpdateToken) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.AuthorizationRequired = bool(v != 0) + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Balances = append(m.Balances, types.Balance{}) + if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VestingBalance", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VestingBalance = append(m.VestingBalance, &protobuf.Any{}) + if err := m.VestingBalance[len(m.VestingBalance)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -1727,7 +2200,7 @@ func (m *MsgUpdateToken) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateTokenResponse) Unmarshal(dAtA []byte) error { +func (m *MsgAllocateTokenResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1750,10 +2223,10 @@ func (m *MsgUpdateTokenResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateTokenResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAllocateTokenResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAllocateTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1777,7 +2250,7 @@ func (m *MsgUpdateTokenResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAuthorizeAddress) Unmarshal(dAtA []byte) error { +func (m *MsgAssignPrivilege) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1800,10 +2273,10 @@ func (m *MsgAuthorizeAddress) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAuthorizeAddress: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAssignPrivilege: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAuthorizeAddress: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAssignPrivilege: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1840,7 +2313,7 @@ func (m *MsgAuthorizeAddress) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1868,11 +2341,11 @@ func (m *MsgAuthorizeAddress) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Symbol = string(dAtA[iNdEx:postIndex]) + m.TokenId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AssignedTo", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1900,7 +2373,39 @@ func (m *MsgAuthorizeAddress) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.AssignedTo = append(m.AssignedTo, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Privilege", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Privilege = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1923,7 +2428,7 @@ func (m *MsgAuthorizeAddress) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAuthorizeAddressResponse) Unmarshal(dAtA []byte) error { +func (m *MsgAssignPrivilegeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1946,10 +2451,10 @@ func (m *MsgAuthorizeAddressResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAuthorizeAddressResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAssignPrivilegeResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAuthorizeAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAssignPrivilegeResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1973,7 +2478,7 @@ func (m *MsgAuthorizeAddressResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUnAuthorizeAddress) Unmarshal(dAtA []byte) error { +func (m *MsgUnassignPrivilege) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1996,10 +2501,10 @@ func (m *MsgUnAuthorizeAddress) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUnAuthorizeAddress: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUnassignPrivilege: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUnAuthorizeAddress: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUnassignPrivilege: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2036,7 +2541,7 @@ func (m *MsgUnAuthorizeAddress) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2064,11 +2569,11 @@ func (m *MsgUnAuthorizeAddress) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Symbol = string(dAtA[iNdEx:postIndex]) + m.TokenId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UnassignedFrom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2096,7 +2601,39 @@ func (m *MsgUnAuthorizeAddress) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.UnassignedFrom = append(m.UnassignedFrom, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Privilege", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Privilege = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2119,7 +2656,7 @@ func (m *MsgUnAuthorizeAddress) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUnAuthorizeAddressResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUnassignPrivilegeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2142,10 +2679,10 @@ func (m *MsgUnAuthorizeAddressResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUnAuthorizeAddressResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUnassignPrivilegeResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUnAuthorizeAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUnassignPrivilegeResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2169,7 +2706,7 @@ func (m *MsgUnAuthorizeAddressResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgTransferToken) Unmarshal(dAtA []byte) error { +func (m *MsgDisablePrivilege) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2192,15 +2729,15 @@ func (m *MsgTransferToken) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgTransferToken: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDisablePrivilege: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgTransferToken: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDisablePrivilege: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Manager", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2228,11 +2765,11 @@ func (m *MsgTransferToken) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Symbol = string(dAtA[iNdEx:postIndex]) + m.Manager = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2260,11 +2797,11 @@ func (m *MsgTransferToken) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.From = string(dAtA[iNdEx:postIndex]) + m.TokenId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DisabledPrivilege", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2292,11 +2829,111 @@ func (m *MsgTransferToken) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.To = string(dAtA[iNdEx:postIndex]) + m.DisabledPrivilege = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgDisablePrivilegeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgDisablePrivilegeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDisablePrivilegeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgExecutePrivilege) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgExecutePrivilege: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgExecutePrivilege: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2324,7 +2961,75 @@ func (m *MsgTransferToken) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Amount = string(dAtA[iNdEx:postIndex]) + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TokenId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PrivilegeMsg", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PrivilegeMsg == nil { + m.PrivilegeMsg = &protobuf.Any{} + } + if err := m.PrivilegeMsg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -2347,7 +3052,7 @@ func (m *MsgTransferToken) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgTransferTokenResponse) Unmarshal(dAtA []byte) error { +func (m *MsgExecutePrivilegeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2370,10 +3075,10 @@ func (m *MsgTransferTokenResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgTransferTokenResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgExecutePrivilegeResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgTransferTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgExecutePrivilegeResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: