@@ -80,73 +80,12 @@ func (m *DenomTrace) GetBaseDenom() string {
8080 return ""
8181}
8282
83- // Params defines the set of IBC transfer parameters.
84- // NOTE: To prevent a single token from being transferred, set the
85- // TransfersEnabled parameter to true and then set the bank module's SendEnabled
86- // parameter for the denomination to false.
87- type Params struct {
88- // send_enabled enables or disables all cross-chain token transfers from this
89- // chain.
90- SendEnabled bool `protobuf:"varint,1,opt,name=send_enabled,json=sendEnabled,proto3" json:"send_enabled,omitempty"`
91- // receive_enabled enables or disables all cross-chain token transfers to this
92- // chain.
93- ReceiveEnabled bool `protobuf:"varint,2,opt,name=receive_enabled,json=receiveEnabled,proto3" json:"receive_enabled,omitempty"`
94- }
95-
96- func (m * Params ) Reset () { * m = Params {} }
97- func (m * Params ) String () string { return proto .CompactTextString (m ) }
98- func (* Params ) ProtoMessage () {}
99- func (* Params ) Descriptor () ([]byte , []int ) {
100- return fileDescriptor_5041673e96e97901 , []int {1 }
101- }
102- func (m * Params ) XXX_Unmarshal (b []byte ) error {
103- return m .Unmarshal (b )
104- }
105- func (m * Params ) XXX_Marshal (b []byte , deterministic bool ) ([]byte , error ) {
106- if deterministic {
107- return xxx_messageInfo_Params .Marshal (b , m , deterministic )
108- } else {
109- b = b [:cap (b )]
110- n , err := m .MarshalToSizedBuffer (b )
111- if err != nil {
112- return nil , err
113- }
114- return b [:n ], nil
115- }
116- }
117- func (m * Params ) XXX_Merge (src proto.Message ) {
118- xxx_messageInfo_Params .Merge (m , src )
119- }
120- func (m * Params ) XXX_Size () int {
121- return m .Size ()
122- }
123- func (m * Params ) XXX_DiscardUnknown () {
124- xxx_messageInfo_Params .DiscardUnknown (m )
125- }
126-
127- var xxx_messageInfo_Params proto.InternalMessageInfo
128-
129- func (m * Params ) GetSendEnabled () bool {
130- if m != nil {
131- return m .SendEnabled
132- }
133- return false
134- }
135-
136- func (m * Params ) GetReceiveEnabled () bool {
137- if m != nil {
138- return m .ReceiveEnabled
139- }
140- return false
141- }
142-
14383func init () {
144- proto .RegisterType ((* DenomTrace )(nil ), "ibc.applications.transfer.v1.DenomTrace" )
145- proto .RegisterType ((* Params )(nil ), "ibc.applications.transfer.v1.Params" )
84+ //proto.RegisterType((*DenomTrace)(nil), "ibc.applications.transfer.v1.DenomTrace")
14685}
14786
14887func init () {
149- proto .RegisterFile ("ibc/applications/transfer/v1/transfer.proto" , fileDescriptor_5041673e96e97901 )
88+ // proto.RegisterFile("ibc/applications/transfer/v1/transfer.proto", fileDescriptor_5041673e96e97901)
15089}
15190
15291var fileDescriptor_5041673e96e97901 = []byte {
@@ -206,49 +145,6 @@ func (m *DenomTrace) MarshalToSizedBuffer(dAtA []byte) (int, error) {
206145 return len (dAtA ) - i , nil
207146}
208147
209- func (m * Params ) Marshal () (dAtA []byte , err error ) {
210- size := m .Size ()
211- dAtA = make ([]byte , size )
212- n , err := m .MarshalToSizedBuffer (dAtA [:size ])
213- if err != nil {
214- return nil , err
215- }
216- return dAtA [:n ], nil
217- }
218-
219- func (m * Params ) MarshalTo (dAtA []byte ) (int , error ) {
220- size := m .Size ()
221- return m .MarshalToSizedBuffer (dAtA [:size ])
222- }
223-
224- func (m * Params ) MarshalToSizedBuffer (dAtA []byte ) (int , error ) {
225- i := len (dAtA )
226- _ = i
227- var l int
228- _ = l
229- if m .ReceiveEnabled {
230- i --
231- if m .ReceiveEnabled {
232- dAtA [i ] = 1
233- } else {
234- dAtA [i ] = 0
235- }
236- i --
237- dAtA [i ] = 0x10
238- }
239- if m .SendEnabled {
240- i --
241- if m .SendEnabled {
242- dAtA [i ] = 1
243- } else {
244- dAtA [i ] = 0
245- }
246- i --
247- dAtA [i ] = 0x8
248- }
249- return len (dAtA ) - i , nil
250- }
251-
252148func encodeVarintTransfer (dAtA []byte , offset int , v uint64 ) int {
253149 offset -= sovTransfer (v )
254150 base := offset
@@ -277,21 +173,6 @@ func (m *DenomTrace) Size() (n int) {
277173 return n
278174}
279175
280- func (m * Params ) Size () (n int ) {
281- if m == nil {
282- return 0
283- }
284- var l int
285- _ = l
286- if m .SendEnabled {
287- n += 2
288- }
289- if m .ReceiveEnabled {
290- n += 2
291- }
292- return n
293- }
294-
295176func sovTransfer (x uint64 ) (n int ) {
296177 return (math_bits .Len64 (x | 1 ) + 6 ) / 7
297178}
@@ -412,96 +293,7 @@ func (m *DenomTrace) Unmarshal(dAtA []byte) error {
412293 }
413294 return nil
414295}
415- func (m * Params ) Unmarshal (dAtA []byte ) error {
416- l := len (dAtA )
417- iNdEx := 0
418- for iNdEx < l {
419- preIndex := iNdEx
420- var wire uint64
421- for shift := uint (0 ); ; shift += 7 {
422- if shift >= 64 {
423- return ErrIntOverflowTransfer
424- }
425- if iNdEx >= l {
426- return io .ErrUnexpectedEOF
427- }
428- b := dAtA [iNdEx ]
429- iNdEx ++
430- wire |= uint64 (b & 0x7F ) << shift
431- if b < 0x80 {
432- break
433- }
434- }
435- fieldNum := int32 (wire >> 3 )
436- wireType := int (wire & 0x7 )
437- if wireType == 4 {
438- return fmt .Errorf ("proto: Params: wiretype end group for non-group" )
439- }
440- if fieldNum <= 0 {
441- return fmt .Errorf ("proto: Params: illegal tag %d (wire type %d)" , fieldNum , wire )
442- }
443- switch fieldNum {
444- case 1 :
445- if wireType != 0 {
446- return fmt .Errorf ("proto: wrong wireType = %d for field SendEnabled" , wireType )
447- }
448- var v int
449- for shift := uint (0 ); ; shift += 7 {
450- if shift >= 64 {
451- return ErrIntOverflowTransfer
452- }
453- if iNdEx >= l {
454- return io .ErrUnexpectedEOF
455- }
456- b := dAtA [iNdEx ]
457- iNdEx ++
458- v |= int (b & 0x7F ) << shift
459- if b < 0x80 {
460- break
461- }
462- }
463- m .SendEnabled = bool (v != 0 )
464- case 2 :
465- if wireType != 0 {
466- return fmt .Errorf ("proto: wrong wireType = %d for field ReceiveEnabled" , wireType )
467- }
468- var v int
469- for shift := uint (0 ); ; shift += 7 {
470- if shift >= 64 {
471- return ErrIntOverflowTransfer
472- }
473- if iNdEx >= l {
474- return io .ErrUnexpectedEOF
475- }
476- b := dAtA [iNdEx ]
477- iNdEx ++
478- v |= int (b & 0x7F ) << shift
479- if b < 0x80 {
480- break
481- }
482- }
483- m .ReceiveEnabled = bool (v != 0 )
484- default :
485- iNdEx = preIndex
486- skippy , err := skipTransfer (dAtA [iNdEx :])
487- if err != nil {
488- return err
489- }
490- if (skippy < 0 ) || (iNdEx + skippy ) < 0 {
491- return ErrInvalidLengthTransfer
492- }
493- if (iNdEx + skippy ) > l {
494- return io .ErrUnexpectedEOF
495- }
496- iNdEx += skippy
497- }
498- }
499296
500- if iNdEx > l {
501- return io .ErrUnexpectedEOF
502- }
503- return nil
504- }
505297func skipTransfer (dAtA []byte ) (n int , err error ) {
506298 l := len (dAtA )
507299 iNdEx := 0
0 commit comments