@agoric/cosmos 0.35.0-upgrade-14-dev-c8f9e7b.0 → 0.35.0-upgrade-16a-dev-fb592e4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/CHANGELOG.md +121 -77
  2. package/MAINTAINERS.md +3 -0
  3. package/Makefile +36 -26
  4. package/ante/ante.go +7 -9
  5. package/ante/inbound_test.go +3 -2
  6. package/ante/vm_admission.go +2 -1
  7. package/app/app.go +212 -140
  8. package/app/upgrade.go +76 -0
  9. package/cmd/agd/agvm.go +42 -0
  10. package/cmd/agd/main.go +130 -11
  11. package/cmd/libdaemon/main.go +64 -53
  12. package/cmd/libdaemon/main_test.go +2 -1
  13. package/daemon/cmd/root.go +171 -74
  14. package/daemon/cmd/root_test.go +189 -1
  15. package/daemon/main.go +4 -2
  16. package/e2e_test/Makefile +29 -0
  17. package/e2e_test/README.md +100 -0
  18. package/e2e_test/go.mod +217 -0
  19. package/e2e_test/go.sum +1323 -0
  20. package/e2e_test/ibc_conformance_test.go +56 -0
  21. package/e2e_test/pfm_test.go +613 -0
  22. package/e2e_test/util.go +271 -0
  23. package/git-revision.txt +1 -1
  24. package/go.mod +22 -11
  25. package/go.sum +17 -13
  26. package/package.json +9 -5
  27. package/proto/agoric/swingset/genesis.proto +4 -0
  28. package/proto/agoric/swingset/swingset.proto +1 -1
  29. package/proto/agoric/vlocalchain/.clang-format +7 -0
  30. package/proto/agoric/vlocalchain/vlocalchain.proto +31 -0
  31. package/proto/agoric/vtransfer/genesis.proto +18 -0
  32. package/scripts/protocgen.sh +7 -8
  33. package/types/kv_entry_helpers.go +42 -0
  34. package/upgradegaia.sh +8 -8
  35. package/vm/action.go +5 -4
  36. package/vm/action_test.go +31 -11
  37. package/vm/client.go +113 -0
  38. package/vm/client_test.go +182 -0
  39. package/vm/controller.go +17 -40
  40. package/vm/core_proposals.go +22 -2
  41. package/vm/jsonrpcconn/jsonrpcconn.go +160 -0
  42. package/vm/jsonrpcconn/jsonrpcconn_test.go +126 -0
  43. package/vm/proto_json.go +38 -0
  44. package/vm/proto_json_test.go +103 -0
  45. package/vm/server.go +124 -0
  46. package/x/swingset/abci.go +10 -10
  47. package/x/swingset/alias.go +2 -0
  48. package/x/swingset/client/cli/tx.go +4 -0
  49. package/x/swingset/genesis.go +84 -24
  50. package/x/swingset/handler.go +2 -1
  51. package/x/swingset/keeper/extension_snapshotter.go +2 -2
  52. package/x/swingset/keeper/keeper.go +13 -25
  53. package/x/swingset/keeper/msg_server.go +18 -18
  54. package/x/swingset/keeper/proposal.go +3 -3
  55. package/x/swingset/keeper/querier.go +12 -11
  56. package/x/swingset/keeper/swing_store_exports_handler.go +21 -6
  57. package/x/swingset/keeper/test_utils.go +16 -0
  58. package/x/swingset/module.go +7 -7
  59. package/x/swingset/proposal_handler.go +2 -1
  60. package/x/swingset/testing/queue.go +17 -0
  61. package/x/swingset/types/default-params.go +1 -1
  62. package/x/swingset/types/expected_keepers.go +3 -2
  63. package/x/swingset/types/genesis.pb.go +78 -25
  64. package/x/swingset/types/msgs.go +44 -24
  65. package/x/swingset/types/params.go +2 -1
  66. package/x/swingset/types/proposal.go +5 -4
  67. package/x/swingset/types/swingset.pb.go +1 -1
  68. package/x/vbank/genesis.go +0 -2
  69. package/x/vbank/handler.go +2 -1
  70. package/x/vbank/keeper/querier.go +4 -3
  71. package/x/vbank/module.go +0 -5
  72. package/x/vbank/types/msgs.go +0 -12
  73. package/x/vbank/vbank.go +9 -9
  74. package/x/vbank/vbank_test.go +2 -2
  75. package/x/vibc/alias.go +3 -0
  76. package/x/vibc/handler.go +16 -9
  77. package/x/vibc/keeper/keeper.go +102 -65
  78. package/x/vibc/keeper/triggers.go +101 -0
  79. package/x/vibc/module.go +5 -8
  80. package/x/vibc/types/expected_keepers.go +13 -0
  81. package/x/vibc/types/ibc_module.go +336 -0
  82. package/x/vibc/types/receiver.go +170 -0
  83. package/x/vlocalchain/alias.go +19 -0
  84. package/x/vlocalchain/handler.go +21 -0
  85. package/x/vlocalchain/keeper/keeper.go +279 -0
  86. package/x/vlocalchain/keeper/keeper_test.go +97 -0
  87. package/x/vlocalchain/types/codec.go +34 -0
  88. package/x/vlocalchain/types/key.go +27 -0
  89. package/x/vlocalchain/types/msgs.go +16 -0
  90. package/x/vlocalchain/types/vlocalchain.pb.go +1072 -0
  91. package/x/vlocalchain/vlocalchain.go +114 -0
  92. package/x/vlocalchain/vlocalchain_test.go +434 -0
  93. package/x/vstorage/handler.go +2 -1
  94. package/x/vstorage/keeper/grpc_query.go +0 -1
  95. package/x/vstorage/keeper/keeper.go +13 -20
  96. package/x/vstorage/keeper/querier.go +6 -5
  97. package/x/vstorage/keeper/querier_test.go +4 -3
  98. package/x/vstorage/module.go +0 -5
  99. package/x/vstorage/testing/queue.go +27 -0
  100. package/x/vtransfer/alias.go +13 -0
  101. package/x/vtransfer/genesis.go +39 -0
  102. package/x/vtransfer/genesis_test.go +12 -0
  103. package/x/vtransfer/handler.go +20 -0
  104. package/x/vtransfer/ibc_middleware.go +186 -0
  105. package/x/vtransfer/ibc_middleware_test.go +448 -0
  106. package/x/vtransfer/keeper/keeper.go +281 -0
  107. package/x/vtransfer/module.go +124 -0
  108. package/x/vtransfer/types/expected_keepers.go +38 -0
  109. package/x/vtransfer/types/genesis.pb.go +327 -0
  110. package/x/vtransfer/types/key.go +9 -0
  111. package/x/vtransfer/types/msgs.go +9 -0
  112. package/ante/fee.go +0 -96
  113. package/proto/agoric/lien/genesis.proto +0 -25
  114. package/proto/agoric/lien/lien.proto +0 -25
  115. package/x/lien/alias.go +0 -17
  116. package/x/lien/genesis.go +0 -58
  117. package/x/lien/genesis_test.go +0 -101
  118. package/x/lien/keeper/account.go +0 -290
  119. package/x/lien/keeper/keeper.go +0 -255
  120. package/x/lien/keeper/keeper_test.go +0 -623
  121. package/x/lien/lien.go +0 -205
  122. package/x/lien/lien_test.go +0 -533
  123. package/x/lien/module.go +0 -115
  124. package/x/lien/spec/01_concepts.md +0 -146
  125. package/x/lien/spec/02_messages.md +0 -96
  126. package/x/lien/types/accountkeeper.go +0 -81
  127. package/x/lien/types/accountstate.go +0 -27
  128. package/x/lien/types/expected_keepers.go +0 -18
  129. package/x/lien/types/genesis.pb.go +0 -567
  130. package/x/lien/types/key.go +0 -25
  131. package/x/lien/types/lien.pb.go +0 -403
  132. package/x/vibc/ibc.go +0 -394
  133. /package/{src/index.cjs → index.cjs} +0 -0
@@ -1,567 +0,0 @@
1
- // Code generated by protoc-gen-gogo. DO NOT EDIT.
2
- // source: agoric/lien/genesis.proto
3
-
4
- package types
5
-
6
- import (
7
- fmt "fmt"
8
- _ "github.com/gogo/protobuf/gogoproto"
9
- proto "github.com/gogo/protobuf/proto"
10
- io "io"
11
- math "math"
12
- math_bits "math/bits"
13
- )
14
-
15
- // Reference imports to suppress errors if they are not otherwise used.
16
- var _ = proto.Marshal
17
- var _ = fmt.Errorf
18
- var _ = math.Inf
19
-
20
- // This is a compile-time assertion to ensure that this generated file
21
- // is compatible with the proto package it is being compiled against.
22
- // A compilation error at this line likely means your copy of the
23
- // proto package needs to be updated.
24
- const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
25
-
26
- // The initial or exported state.
27
- type GenesisState struct {
28
- Liens []AccountLien `protobuf:"bytes,1,rep,name=liens,proto3" json:"liens"`
29
- }
30
-
31
- func (m *GenesisState) Reset() { *m = GenesisState{} }
32
- func (m *GenesisState) String() string { return proto.CompactTextString(m) }
33
- func (*GenesisState) ProtoMessage() {}
34
- func (*GenesisState) Descriptor() ([]byte, []int) {
35
- return fileDescriptor_4aa701dea5f962c9, []int{0}
36
- }
37
- func (m *GenesisState) XXX_Unmarshal(b []byte) error {
38
- return m.Unmarshal(b)
39
- }
40
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
41
- if deterministic {
42
- return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic)
43
- } else {
44
- b = b[:cap(b)]
45
- n, err := m.MarshalToSizedBuffer(b)
46
- if err != nil {
47
- return nil, err
48
- }
49
- return b[:n], nil
50
- }
51
- }
52
- func (m *GenesisState) XXX_Merge(src proto.Message) {
53
- xxx_messageInfo_GenesisState.Merge(m, src)
54
- }
55
- func (m *GenesisState) XXX_Size() int {
56
- return m.Size()
57
- }
58
- func (m *GenesisState) XXX_DiscardUnknown() {
59
- xxx_messageInfo_GenesisState.DiscardUnknown(m)
60
- }
61
-
62
- var xxx_messageInfo_GenesisState proto.InternalMessageInfo
63
-
64
- func (m *GenesisState) GetLiens() []AccountLien {
65
- if m != nil {
66
- return m.Liens
67
- }
68
- return nil
69
- }
70
-
71
- // The lien on a particular account
72
- type AccountLien struct {
73
- // Account address, bech32-encoded.
74
- Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
75
- // The liened amount. Should be nonzero.
76
- Lien *Lien `protobuf:"bytes,2,opt,name=lien,proto3" json:"lien,omitempty"`
77
- }
78
-
79
- func (m *AccountLien) Reset() { *m = AccountLien{} }
80
- func (m *AccountLien) String() string { return proto.CompactTextString(m) }
81
- func (*AccountLien) ProtoMessage() {}
82
- func (*AccountLien) Descriptor() ([]byte, []int) {
83
- return fileDescriptor_4aa701dea5f962c9, []int{1}
84
- }
85
- func (m *AccountLien) XXX_Unmarshal(b []byte) error {
86
- return m.Unmarshal(b)
87
- }
88
- func (m *AccountLien) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
89
- if deterministic {
90
- return xxx_messageInfo_AccountLien.Marshal(b, m, deterministic)
91
- } else {
92
- b = b[:cap(b)]
93
- n, err := m.MarshalToSizedBuffer(b)
94
- if err != nil {
95
- return nil, err
96
- }
97
- return b[:n], nil
98
- }
99
- }
100
- func (m *AccountLien) XXX_Merge(src proto.Message) {
101
- xxx_messageInfo_AccountLien.Merge(m, src)
102
- }
103
- func (m *AccountLien) XXX_Size() int {
104
- return m.Size()
105
- }
106
- func (m *AccountLien) XXX_DiscardUnknown() {
107
- xxx_messageInfo_AccountLien.DiscardUnknown(m)
108
- }
109
-
110
- var xxx_messageInfo_AccountLien proto.InternalMessageInfo
111
-
112
- func (m *AccountLien) GetAddress() string {
113
- if m != nil {
114
- return m.Address
115
- }
116
- return ""
117
- }
118
-
119
- func (m *AccountLien) GetLien() *Lien {
120
- if m != nil {
121
- return m.Lien
122
- }
123
- return nil
124
- }
125
-
126
- func init() {
127
- proto.RegisterType((*GenesisState)(nil), "agoric.lien.GenesisState")
128
- proto.RegisterType((*AccountLien)(nil), "agoric.lien.AccountLien")
129
- }
130
-
131
- func init() { proto.RegisterFile("agoric/lien/genesis.proto", fileDescriptor_4aa701dea5f962c9) }
132
-
133
- var fileDescriptor_4aa701dea5f962c9 = []byte{
134
- // 259 bytes of a gzipped FileDescriptorProto
135
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0x4c, 0xcf, 0x2f,
136
- 0xca, 0x4c, 0xd6, 0xcf, 0xc9, 0x4c, 0xcd, 0xd3, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6,
137
- 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x86, 0x48, 0xe9, 0x81, 0xa4, 0xa4, 0x44, 0xd2, 0xf3,
138
- 0xd3, 0xf3, 0xc1, 0xe2, 0xfa, 0x20, 0x16, 0x44, 0x89, 0x94, 0x18, 0xb2, 0x6e, 0x10, 0x01, 0x11,
139
- 0x57, 0xf2, 0xe2, 0xe2, 0x71, 0x87, 0x98, 0x15, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0x64, 0xc2, 0xc5,
140
- 0x0a, 0x92, 0x2d, 0x96, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0x92, 0xd0, 0x43, 0x32, 0x5a, 0xcf,
141
- 0x31, 0x39, 0x39, 0xbf, 0x34, 0xaf, 0xc4, 0x27, 0x33, 0x35, 0xcf, 0x89, 0xe5, 0xc4, 0x3d, 0x79,
142
- 0x86, 0x20, 0x88, 0x62, 0x2b, 0x96, 0x17, 0x0b, 0xe4, 0x19, 0x94, 0xfc, 0xb8, 0xb8, 0x91, 0x54,
143
- 0x08, 0x49, 0x70, 0xb1, 0x27, 0xa6, 0xa4, 0x14, 0xa5, 0x16, 0x83, 0x0c, 0x63, 0xd4, 0xe0, 0x0c,
144
- 0x82, 0x71, 0x85, 0x54, 0xb9, 0x58, 0x40, 0xfa, 0x24, 0x98, 0x14, 0x18, 0x35, 0xb8, 0x8d, 0x04,
145
- 0x51, 0xec, 0x00, 0x69, 0x0d, 0x02, 0x4b, 0x3b, 0x05, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91,
146
- 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3,
147
- 0xb1, 0x1c, 0x43, 0x94, 0x79, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0xbe,
148
- 0x23, 0xc4, 0x63, 0x10, 0x33, 0x74, 0x8b, 0x53, 0xb2, 0xf5, 0xd3, 0xf3, 0x73, 0x12, 0xf3, 0xd2,
149
- 0xf5, 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0xf5, 0x2b, 0x20, 0x7e, 0x2e, 0xa9, 0x2c, 0x48, 0x2d,
150
- 0x4e, 0x62, 0x03, 0xfb, 0xda, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xcb, 0x15, 0x7c, 0x4d,
151
- 0x01, 0x00, 0x00,
152
- }
153
-
154
- func (m *GenesisState) Marshal() (dAtA []byte, err error) {
155
- size := m.Size()
156
- dAtA = make([]byte, size)
157
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
158
- if err != nil {
159
- return nil, err
160
- }
161
- return dAtA[:n], nil
162
- }
163
-
164
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) {
165
- size := m.Size()
166
- return m.MarshalToSizedBuffer(dAtA[:size])
167
- }
168
-
169
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
170
- i := len(dAtA)
171
- _ = i
172
- var l int
173
- _ = l
174
- if len(m.Liens) > 0 {
175
- for iNdEx := len(m.Liens) - 1; iNdEx >= 0; iNdEx-- {
176
- {
177
- size, err := m.Liens[iNdEx].MarshalToSizedBuffer(dAtA[:i])
178
- if err != nil {
179
- return 0, err
180
- }
181
- i -= size
182
- i = encodeVarintGenesis(dAtA, i, uint64(size))
183
- }
184
- i--
185
- dAtA[i] = 0xa
186
- }
187
- }
188
- return len(dAtA) - i, nil
189
- }
190
-
191
- func (m *AccountLien) Marshal() (dAtA []byte, err error) {
192
- size := m.Size()
193
- dAtA = make([]byte, size)
194
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
195
- if err != nil {
196
- return nil, err
197
- }
198
- return dAtA[:n], nil
199
- }
200
-
201
- func (m *AccountLien) MarshalTo(dAtA []byte) (int, error) {
202
- size := m.Size()
203
- return m.MarshalToSizedBuffer(dAtA[:size])
204
- }
205
-
206
- func (m *AccountLien) MarshalToSizedBuffer(dAtA []byte) (int, error) {
207
- i := len(dAtA)
208
- _ = i
209
- var l int
210
- _ = l
211
- if m.Lien != nil {
212
- {
213
- size, err := m.Lien.MarshalToSizedBuffer(dAtA[:i])
214
- if err != nil {
215
- return 0, err
216
- }
217
- i -= size
218
- i = encodeVarintGenesis(dAtA, i, uint64(size))
219
- }
220
- i--
221
- dAtA[i] = 0x12
222
- }
223
- if len(m.Address) > 0 {
224
- i -= len(m.Address)
225
- copy(dAtA[i:], m.Address)
226
- i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address)))
227
- i--
228
- dAtA[i] = 0xa
229
- }
230
- return len(dAtA) - i, nil
231
- }
232
-
233
- func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int {
234
- offset -= sovGenesis(v)
235
- base := offset
236
- for v >= 1<<7 {
237
- dAtA[offset] = uint8(v&0x7f | 0x80)
238
- v >>= 7
239
- offset++
240
- }
241
- dAtA[offset] = uint8(v)
242
- return base
243
- }
244
- func (m *GenesisState) Size() (n int) {
245
- if m == nil {
246
- return 0
247
- }
248
- var l int
249
- _ = l
250
- if len(m.Liens) > 0 {
251
- for _, e := range m.Liens {
252
- l = e.Size()
253
- n += 1 + l + sovGenesis(uint64(l))
254
- }
255
- }
256
- return n
257
- }
258
-
259
- func (m *AccountLien) Size() (n int) {
260
- if m == nil {
261
- return 0
262
- }
263
- var l int
264
- _ = l
265
- l = len(m.Address)
266
- if l > 0 {
267
- n += 1 + l + sovGenesis(uint64(l))
268
- }
269
- if m.Lien != nil {
270
- l = m.Lien.Size()
271
- n += 1 + l + sovGenesis(uint64(l))
272
- }
273
- return n
274
- }
275
-
276
- func sovGenesis(x uint64) (n int) {
277
- return (math_bits.Len64(x|1) + 6) / 7
278
- }
279
- func sozGenesis(x uint64) (n int) {
280
- return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63))))
281
- }
282
- func (m *GenesisState) Unmarshal(dAtA []byte) error {
283
- l := len(dAtA)
284
- iNdEx := 0
285
- for iNdEx < l {
286
- preIndex := iNdEx
287
- var wire uint64
288
- for shift := uint(0); ; shift += 7 {
289
- if shift >= 64 {
290
- return ErrIntOverflowGenesis
291
- }
292
- if iNdEx >= l {
293
- return io.ErrUnexpectedEOF
294
- }
295
- b := dAtA[iNdEx]
296
- iNdEx++
297
- wire |= uint64(b&0x7F) << shift
298
- if b < 0x80 {
299
- break
300
- }
301
- }
302
- fieldNum := int32(wire >> 3)
303
- wireType := int(wire & 0x7)
304
- if wireType == 4 {
305
- return fmt.Errorf("proto: GenesisState: wiretype end group for non-group")
306
- }
307
- if fieldNum <= 0 {
308
- return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire)
309
- }
310
- switch fieldNum {
311
- case 1:
312
- if wireType != 2 {
313
- return fmt.Errorf("proto: wrong wireType = %d for field Liens", wireType)
314
- }
315
- var msglen int
316
- for shift := uint(0); ; shift += 7 {
317
- if shift >= 64 {
318
- return ErrIntOverflowGenesis
319
- }
320
- if iNdEx >= l {
321
- return io.ErrUnexpectedEOF
322
- }
323
- b := dAtA[iNdEx]
324
- iNdEx++
325
- msglen |= int(b&0x7F) << shift
326
- if b < 0x80 {
327
- break
328
- }
329
- }
330
- if msglen < 0 {
331
- return ErrInvalidLengthGenesis
332
- }
333
- postIndex := iNdEx + msglen
334
- if postIndex < 0 {
335
- return ErrInvalidLengthGenesis
336
- }
337
- if postIndex > l {
338
- return io.ErrUnexpectedEOF
339
- }
340
- m.Liens = append(m.Liens, AccountLien{})
341
- if err := m.Liens[len(m.Liens)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
342
- return err
343
- }
344
- iNdEx = postIndex
345
- default:
346
- iNdEx = preIndex
347
- skippy, err := skipGenesis(dAtA[iNdEx:])
348
- if err != nil {
349
- return err
350
- }
351
- if (skippy < 0) || (iNdEx+skippy) < 0 {
352
- return ErrInvalidLengthGenesis
353
- }
354
- if (iNdEx + skippy) > l {
355
- return io.ErrUnexpectedEOF
356
- }
357
- iNdEx += skippy
358
- }
359
- }
360
-
361
- if iNdEx > l {
362
- return io.ErrUnexpectedEOF
363
- }
364
- return nil
365
- }
366
- func (m *AccountLien) Unmarshal(dAtA []byte) error {
367
- l := len(dAtA)
368
- iNdEx := 0
369
- for iNdEx < l {
370
- preIndex := iNdEx
371
- var wire uint64
372
- for shift := uint(0); ; shift += 7 {
373
- if shift >= 64 {
374
- return ErrIntOverflowGenesis
375
- }
376
- if iNdEx >= l {
377
- return io.ErrUnexpectedEOF
378
- }
379
- b := dAtA[iNdEx]
380
- iNdEx++
381
- wire |= uint64(b&0x7F) << shift
382
- if b < 0x80 {
383
- break
384
- }
385
- }
386
- fieldNum := int32(wire >> 3)
387
- wireType := int(wire & 0x7)
388
- if wireType == 4 {
389
- return fmt.Errorf("proto: AccountLien: wiretype end group for non-group")
390
- }
391
- if fieldNum <= 0 {
392
- return fmt.Errorf("proto: AccountLien: illegal tag %d (wire type %d)", fieldNum, wire)
393
- }
394
- switch fieldNum {
395
- case 1:
396
- if wireType != 2 {
397
- return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
398
- }
399
- var stringLen uint64
400
- for shift := uint(0); ; shift += 7 {
401
- if shift >= 64 {
402
- return ErrIntOverflowGenesis
403
- }
404
- if iNdEx >= l {
405
- return io.ErrUnexpectedEOF
406
- }
407
- b := dAtA[iNdEx]
408
- iNdEx++
409
- stringLen |= uint64(b&0x7F) << shift
410
- if b < 0x80 {
411
- break
412
- }
413
- }
414
- intStringLen := int(stringLen)
415
- if intStringLen < 0 {
416
- return ErrInvalidLengthGenesis
417
- }
418
- postIndex := iNdEx + intStringLen
419
- if postIndex < 0 {
420
- return ErrInvalidLengthGenesis
421
- }
422
- if postIndex > l {
423
- return io.ErrUnexpectedEOF
424
- }
425
- m.Address = string(dAtA[iNdEx:postIndex])
426
- iNdEx = postIndex
427
- case 2:
428
- if wireType != 2 {
429
- return fmt.Errorf("proto: wrong wireType = %d for field Lien", wireType)
430
- }
431
- var msglen int
432
- for shift := uint(0); ; shift += 7 {
433
- if shift >= 64 {
434
- return ErrIntOverflowGenesis
435
- }
436
- if iNdEx >= l {
437
- return io.ErrUnexpectedEOF
438
- }
439
- b := dAtA[iNdEx]
440
- iNdEx++
441
- msglen |= int(b&0x7F) << shift
442
- if b < 0x80 {
443
- break
444
- }
445
- }
446
- if msglen < 0 {
447
- return ErrInvalidLengthGenesis
448
- }
449
- postIndex := iNdEx + msglen
450
- if postIndex < 0 {
451
- return ErrInvalidLengthGenesis
452
- }
453
- if postIndex > l {
454
- return io.ErrUnexpectedEOF
455
- }
456
- if m.Lien == nil {
457
- m.Lien = &Lien{}
458
- }
459
- if err := m.Lien.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
460
- return err
461
- }
462
- iNdEx = postIndex
463
- default:
464
- iNdEx = preIndex
465
- skippy, err := skipGenesis(dAtA[iNdEx:])
466
- if err != nil {
467
- return err
468
- }
469
- if (skippy < 0) || (iNdEx+skippy) < 0 {
470
- return ErrInvalidLengthGenesis
471
- }
472
- if (iNdEx + skippy) > l {
473
- return io.ErrUnexpectedEOF
474
- }
475
- iNdEx += skippy
476
- }
477
- }
478
-
479
- if iNdEx > l {
480
- return io.ErrUnexpectedEOF
481
- }
482
- return nil
483
- }
484
- func skipGenesis(dAtA []byte) (n int, err error) {
485
- l := len(dAtA)
486
- iNdEx := 0
487
- depth := 0
488
- for iNdEx < l {
489
- var wire uint64
490
- for shift := uint(0); ; shift += 7 {
491
- if shift >= 64 {
492
- return 0, ErrIntOverflowGenesis
493
- }
494
- if iNdEx >= l {
495
- return 0, io.ErrUnexpectedEOF
496
- }
497
- b := dAtA[iNdEx]
498
- iNdEx++
499
- wire |= (uint64(b) & 0x7F) << shift
500
- if b < 0x80 {
501
- break
502
- }
503
- }
504
- wireType := int(wire & 0x7)
505
- switch wireType {
506
- case 0:
507
- for shift := uint(0); ; shift += 7 {
508
- if shift >= 64 {
509
- return 0, ErrIntOverflowGenesis
510
- }
511
- if iNdEx >= l {
512
- return 0, io.ErrUnexpectedEOF
513
- }
514
- iNdEx++
515
- if dAtA[iNdEx-1] < 0x80 {
516
- break
517
- }
518
- }
519
- case 1:
520
- iNdEx += 8
521
- case 2:
522
- var length int
523
- for shift := uint(0); ; shift += 7 {
524
- if shift >= 64 {
525
- return 0, ErrIntOverflowGenesis
526
- }
527
- if iNdEx >= l {
528
- return 0, io.ErrUnexpectedEOF
529
- }
530
- b := dAtA[iNdEx]
531
- iNdEx++
532
- length |= (int(b) & 0x7F) << shift
533
- if b < 0x80 {
534
- break
535
- }
536
- }
537
- if length < 0 {
538
- return 0, ErrInvalidLengthGenesis
539
- }
540
- iNdEx += length
541
- case 3:
542
- depth++
543
- case 4:
544
- if depth == 0 {
545
- return 0, ErrUnexpectedEndOfGroupGenesis
546
- }
547
- depth--
548
- case 5:
549
- iNdEx += 4
550
- default:
551
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
552
- }
553
- if iNdEx < 0 {
554
- return 0, ErrInvalidLengthGenesis
555
- }
556
- if depth == 0 {
557
- return iNdEx, nil
558
- }
559
- }
560
- return 0, io.ErrUnexpectedEOF
561
- }
562
-
563
- var (
564
- ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling")
565
- ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow")
566
- ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
567
- )
@@ -1,25 +0,0 @@
1
- package types
2
-
3
- import (
4
- sdk "github.com/cosmos/cosmos-sdk/types"
5
- )
6
-
7
- const (
8
- ModuleName = "lien"
9
-
10
- StoreKey = ModuleName
11
- )
12
-
13
- // The lien-by-address space maps addresses to Lien messages.
14
- // The keys are raw address bytes.
15
- // THe data are protobuf-encoded Lien messages.
16
-
17
- // LienByAddressKey returns the lien lookup key for the addr.
18
- func LienByAddressKey(addr sdk.AccAddress) []byte {
19
- return addr.Bytes()
20
- }
21
-
22
- // LienByAddressDecodeKey returns the address for the lien lookup key.
23
- func LienByAddressDecodeKey(key []byte) sdk.AccAddress {
24
- return sdk.AccAddress(key)
25
- }