@agoric/cosmos 0.34.2-upgrade-16-fi-dev-8879538.0 → 0.34.2-upgrade-16-dev-24665a9.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.
- package/app/app.go +121 -46
- package/cmd/agd/main.go +4 -4
- package/cmd/libdaemon/main.go +6 -6
- package/daemon/cmd/root.go +3 -7
- package/daemon/main.go +3 -2
- package/git-revision.txt +1 -1
- package/go.mod +3 -0
- package/go.sum +2 -2
- package/package.json +2 -2
- package/proto/agoric/vtransfer/genesis.proto +18 -0
- package/vm/client_test.go +6 -8
- package/vm/controller.go +3 -0
- package/vm/proto_json.go +38 -0
- package/vm/proto_json_test.go +103 -0
- package/x/swingset/alias.go +2 -0
- package/x/swingset/keeper/keeper.go +8 -20
- package/x/swingset/keeper/test_utils.go +16 -0
- package/x/swingset/module.go +7 -2
- package/x/swingset/testing/queue.go +17 -0
- package/x/swingset/types/msgs.go +19 -0
- package/x/vbank/genesis.go +0 -2
- package/x/vbank/types/msgs.go +0 -12
- package/x/vbank/vbank.go +6 -6
- package/x/vbank/vbank_test.go +2 -2
- package/x/vibc/alias.go +1 -1
- package/x/vibc/types/receiver.go +17 -7
- package/x/vlocalchain/handler.go +2 -1
- package/x/vlocalchain/keeper/keeper_test.go +66 -1
- package/x/vlocalchain/vlocalchain.go +26 -21
- package/x/vlocalchain/vlocalchain_test.go +133 -4
- package/x/vstorage/keeper/keeper.go +5 -5
- package/x/vstorage/testing/queue.go +27 -0
- package/x/vtransfer/alias.go +13 -0
- package/x/vtransfer/genesis.go +39 -0
- package/x/vtransfer/genesis_test.go +12 -0
- package/x/vtransfer/handler.go +20 -0
- package/x/vtransfer/ibc_middleware.go +186 -0
- package/x/vtransfer/ibc_middleware_test.go +448 -0
- package/x/vtransfer/keeper/keeper.go +281 -0
- package/x/vtransfer/module.go +124 -0
- package/x/vtransfer/types/expected_keepers.go +38 -0
- package/x/vtransfer/types/genesis.pb.go +327 -0
- package/x/vtransfer/types/key.go +9 -0
- package/x/vtransfer/types/msgs.go +9 -0
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
2
|
+
// source: agoric/vtransfer/genesis.proto
|
|
3
|
+
|
|
4
|
+
package types
|
|
5
|
+
|
|
6
|
+
import (
|
|
7
|
+
fmt "fmt"
|
|
8
|
+
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
|
9
|
+
_ "github.com/gogo/protobuf/gogoproto"
|
|
10
|
+
proto "github.com/gogo/protobuf/proto"
|
|
11
|
+
io "io"
|
|
12
|
+
math "math"
|
|
13
|
+
math_bits "math/bits"
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
// Reference imports to suppress errors if they are not otherwise used.
|
|
17
|
+
var _ = proto.Marshal
|
|
18
|
+
var _ = fmt.Errorf
|
|
19
|
+
var _ = math.Inf
|
|
20
|
+
|
|
21
|
+
// This is a compile-time assertion to ensure that this generated file
|
|
22
|
+
// is compatible with the proto package it is being compiled against.
|
|
23
|
+
// A compilation error at this line likely means your copy of the
|
|
24
|
+
// proto package needs to be updated.
|
|
25
|
+
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
26
|
+
|
|
27
|
+
// The initial and exported module state.
|
|
28
|
+
type GenesisState struct {
|
|
29
|
+
WatchedAddresses []github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,rep,name=watched_addresses,json=watchedAddresses,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"watched_addresses" yaml:"watched_addresses"`
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
func (m *GenesisState) Reset() { *m = GenesisState{} }
|
|
33
|
+
func (m *GenesisState) String() string { return proto.CompactTextString(m) }
|
|
34
|
+
func (*GenesisState) ProtoMessage() {}
|
|
35
|
+
func (*GenesisState) Descriptor() ([]byte, []int) {
|
|
36
|
+
return fileDescriptor_fd0b59a10ad6824e, []int{0}
|
|
37
|
+
}
|
|
38
|
+
func (m *GenesisState) XXX_Unmarshal(b []byte) error {
|
|
39
|
+
return m.Unmarshal(b)
|
|
40
|
+
}
|
|
41
|
+
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
42
|
+
if deterministic {
|
|
43
|
+
return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic)
|
|
44
|
+
} else {
|
|
45
|
+
b = b[:cap(b)]
|
|
46
|
+
n, err := m.MarshalToSizedBuffer(b)
|
|
47
|
+
if err != nil {
|
|
48
|
+
return nil, err
|
|
49
|
+
}
|
|
50
|
+
return b[:n], nil
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
func (m *GenesisState) XXX_Merge(src proto.Message) {
|
|
54
|
+
xxx_messageInfo_GenesisState.Merge(m, src)
|
|
55
|
+
}
|
|
56
|
+
func (m *GenesisState) XXX_Size() int {
|
|
57
|
+
return m.Size()
|
|
58
|
+
}
|
|
59
|
+
func (m *GenesisState) XXX_DiscardUnknown() {
|
|
60
|
+
xxx_messageInfo_GenesisState.DiscardUnknown(m)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
var xxx_messageInfo_GenesisState proto.InternalMessageInfo
|
|
64
|
+
|
|
65
|
+
func (m *GenesisState) GetWatchedAddresses() []github_com_cosmos_cosmos_sdk_types.AccAddress {
|
|
66
|
+
if m != nil {
|
|
67
|
+
return m.WatchedAddresses
|
|
68
|
+
}
|
|
69
|
+
return nil
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
func init() {
|
|
73
|
+
proto.RegisterType((*GenesisState)(nil), "agoric.vtransfer.GenesisState")
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
func init() { proto.RegisterFile("agoric/vtransfer/genesis.proto", fileDescriptor_fd0b59a10ad6824e) }
|
|
77
|
+
|
|
78
|
+
var fileDescriptor_fd0b59a10ad6824e = []byte{
|
|
79
|
+
// 249 bytes of a gzipped FileDescript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x04, 0x09, 0x40, 0x0d, 0x71, 0x84, 0x99, 0x61, 0xc5, 0xf2, 0x62, 0x81, 0x3c,
|
|
91
|
+
0x83, 0x53, 0xd8, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38,
|
|
92
|
+
0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0xd9, 0x20, 0x59,
|
|
93
|
+
0xe0, 0x08, 0x09, 0x15, 0x88, 0xe7, 0xc1, 0x16, 0xa4, 0xe7, 0xe7, 0x24, 0xe6, 0xa5, 0xc3, 0x6c,
|
|
94
|
+
0xae, 0x40, 0x0a, 0x30, 0xb0, 0xd5, 0x49, 0x6c, 0xe0, 0x70, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff,
|
|
95
|
+
0xff, 0x78, 0x52, 0xc9, 0xd5, 0x51, 0x01, 0x00, 0x00,
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
func (m *GenesisState) Marshal() (dAtA []byte, err error) {
|
|
99
|
+
size := m.Size()
|
|
100
|
+
dAtA = make([]byte, size)
|
|
101
|
+
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
102
|
+
if err != nil {
|
|
103
|
+
return nil, err
|
|
104
|
+
}
|
|
105
|
+
return dAtA[:n], nil
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) {
|
|
109
|
+
size := m.Size()
|
|
110
|
+
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
114
|
+
i := len(dAtA)
|
|
115
|
+
_ = i
|
|
116
|
+
var l int
|
|
117
|
+
_ = l
|
|
118
|
+
if len(m.WatchedAddresses) > 0 {
|
|
119
|
+
for iNdEx := len(m.WatchedAddresses) - 1; iNdEx >= 0; iNdEx-- {
|
|
120
|
+
i -= len(m.WatchedAddresses[iNdEx])
|
|
121
|
+
copy(dAtA[i:], m.WatchedAddresses[iNdEx])
|
|
122
|
+
i = encodeVarintGenesis(dAtA, i, uint64(len(m.WatchedAddresses[iNdEx])))
|
|
123
|
+
i--
|
|
124
|
+
dAtA[i] = 0xa
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return len(dAtA) - i, nil
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int {
|
|
131
|
+
offset -= sovGenesis(v)
|
|
132
|
+
base := offset
|
|
133
|
+
for v >= 1<<7 {
|
|
134
|
+
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
135
|
+
v >>= 7
|
|
136
|
+
offset++
|
|
137
|
+
}
|
|
138
|
+
dAtA[offset] = uint8(v)
|
|
139
|
+
return base
|
|
140
|
+
}
|
|
141
|
+
func (m *GenesisState) Size() (n int) {
|
|
142
|
+
if m == nil {
|
|
143
|
+
return 0
|
|
144
|
+
}
|
|
145
|
+
var l int
|
|
146
|
+
_ = l
|
|
147
|
+
if len(m.WatchedAddresses) > 0 {
|
|
148
|
+
for _, b := range m.WatchedAddresses {
|
|
149
|
+
l = len(b)
|
|
150
|
+
n += 1 + l + sovGenesis(uint64(l))
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return n
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
func sovGenesis(x uint64) (n int) {
|
|
157
|
+
return (math_bits.Len64(x|1) + 6) / 7
|
|
158
|
+
}
|
|
159
|
+
func sozGenesis(x uint64) (n int) {
|
|
160
|
+
return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
161
|
+
}
|
|
162
|
+
func (m *GenesisState) Unmarshal(dAtA []byte) error {
|
|
163
|
+
l := len(dAtA)
|
|
164
|
+
iNdEx := 0
|
|
165
|
+
for iNdEx < l {
|
|
166
|
+
preIndex := iNdEx
|
|
167
|
+
var wire uint64
|
|
168
|
+
for shift := uint(0); ; shift += 7 {
|
|
169
|
+
if shift >= 64 {
|
|
170
|
+
return ErrIntOverflowGenesis
|
|
171
|
+
}
|
|
172
|
+
if iNdEx >= l {
|
|
173
|
+
return io.ErrUnexpectedEOF
|
|
174
|
+
}
|
|
175
|
+
b := dAtA[iNdEx]
|
|
176
|
+
iNdEx++
|
|
177
|
+
wire |= uint64(b&0x7F) << shift
|
|
178
|
+
if b < 0x80 {
|
|
179
|
+
break
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
fieldNum := int32(wire >> 3)
|
|
183
|
+
wireType := int(wire & 0x7)
|
|
184
|
+
if wireType == 4 {
|
|
185
|
+
return fmt.Errorf("proto: GenesisState: wiretype end group for non-group")
|
|
186
|
+
}
|
|
187
|
+
if fieldNum <= 0 {
|
|
188
|
+
return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
189
|
+
}
|
|
190
|
+
switch fieldNum {
|
|
191
|
+
case 1:
|
|
192
|
+
if wireType != 2 {
|
|
193
|
+
return fmt.Errorf("proto: wrong wireType = %d for field WatchedAddresses", wireType)
|
|
194
|
+
}
|
|
195
|
+
var byteLen int
|
|
196
|
+
for shift := uint(0); ; shift += 7 {
|
|
197
|
+
if shift >= 64 {
|
|
198
|
+
return ErrIntOverflowGenesis
|
|
199
|
+
}
|
|
200
|
+
if iNdEx >= l {
|
|
201
|
+
return io.ErrUnexpectedEOF
|
|
202
|
+
}
|
|
203
|
+
b := dAtA[iNdEx]
|
|
204
|
+
iNdEx++
|
|
205
|
+
byteLen |= int(b&0x7F) << shift
|
|
206
|
+
if b < 0x80 {
|
|
207
|
+
break
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
if byteLen < 0 {
|
|
211
|
+
return ErrInvalidLengthGenesis
|
|
212
|
+
}
|
|
213
|
+
postIndex := iNdEx + byteLen
|
|
214
|
+
if postIndex < 0 {
|
|
215
|
+
return ErrInvalidLengthGenesis
|
|
216
|
+
}
|
|
217
|
+
if postIndex > l {
|
|
218
|
+
return io.ErrUnexpectedEOF
|
|
219
|
+
}
|
|
220
|
+
m.WatchedAddresses = append(m.WatchedAddresses, make([]byte, postIndex-iNdEx))
|
|
221
|
+
copy(m.WatchedAddresses[len(m.WatchedAddresses)-1], dAtA[iNdEx:postIndex])
|
|
222
|
+
iNdEx = postIndex
|
|
223
|
+
default:
|
|
224
|
+
iNdEx = preIndex
|
|
225
|
+
skippy, err := skipGenesis(dAtA[iNdEx:])
|
|
226
|
+
if err != nil {
|
|
227
|
+
return err
|
|
228
|
+
}
|
|
229
|
+
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
230
|
+
return ErrInvalidLengthGenesis
|
|
231
|
+
}
|
|
232
|
+
if (iNdEx + skippy) > l {
|
|
233
|
+
return io.ErrUnexpectedEOF
|
|
234
|
+
}
|
|
235
|
+
iNdEx += skippy
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if iNdEx > l {
|
|
240
|
+
return io.ErrUnexpectedEOF
|
|
241
|
+
}
|
|
242
|
+
return nil
|
|
243
|
+
}
|
|
244
|
+
func skipGenesis(dAtA []byte) (n int, err error) {
|
|
245
|
+
l := len(dAtA)
|
|
246
|
+
iNdEx := 0
|
|
247
|
+
depth := 0
|
|
248
|
+
for iNdEx < l {
|
|
249
|
+
var wire uint64
|
|
250
|
+
for shift := uint(0); ; shift += 7 {
|
|
251
|
+
if shift >= 64 {
|
|
252
|
+
return 0, ErrIntOverflowGenesis
|
|
253
|
+
}
|
|
254
|
+
if iNdEx >= l {
|
|
255
|
+
return 0, io.ErrUnexpectedEOF
|
|
256
|
+
}
|
|
257
|
+
b := dAtA[iNdEx]
|
|
258
|
+
iNdEx++
|
|
259
|
+
wire |= (uint64(b) & 0x7F) << shift
|
|
260
|
+
if b < 0x80 {
|
|
261
|
+
break
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
wireType := int(wire & 0x7)
|
|
265
|
+
switch wireType {
|
|
266
|
+
case 0:
|
|
267
|
+
for shift := uint(0); ; shift += 7 {
|
|
268
|
+
if shift >= 64 {
|
|
269
|
+
return 0, ErrIntOverflowGenesis
|
|
270
|
+
}
|
|
271
|
+
if iNdEx >= l {
|
|
272
|
+
return 0, io.ErrUnexpectedEOF
|
|
273
|
+
}
|
|
274
|
+
iNdEx++
|
|
275
|
+
if dAtA[iNdEx-1] < 0x80 {
|
|
276
|
+
break
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
case 1:
|
|
280
|
+
iNdEx += 8
|
|
281
|
+
case 2:
|
|
282
|
+
var length int
|
|
283
|
+
for shift := uint(0); ; shift += 7 {
|
|
284
|
+
if shift >= 64 {
|
|
285
|
+
return 0, ErrIntOverflowGenesis
|
|
286
|
+
}
|
|
287
|
+
if iNdEx >= l {
|
|
288
|
+
return 0, io.ErrUnexpectedEOF
|
|
289
|
+
}
|
|
290
|
+
b := dAtA[iNdEx]
|
|
291
|
+
iNdEx++
|
|
292
|
+
length |= (int(b) & 0x7F) << shift
|
|
293
|
+
if b < 0x80 {
|
|
294
|
+
break
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
if length < 0 {
|
|
298
|
+
return 0, ErrInvalidLengthGenesis
|
|
299
|
+
}
|
|
300
|
+
iNdEx += length
|
|
301
|
+
case 3:
|
|
302
|
+
depth++
|
|
303
|
+
case 4:
|
|
304
|
+
if depth == 0 {
|
|
305
|
+
return 0, ErrUnexpectedEndOfGroupGenesis
|
|
306
|
+
}
|
|
307
|
+
depth--
|
|
308
|
+
case 5:
|
|
309
|
+
iNdEx += 4
|
|
310
|
+
default:
|
|
311
|
+
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
312
|
+
}
|
|
313
|
+
if iNdEx < 0 {
|
|
314
|
+
return 0, ErrInvalidLengthGenesis
|
|
315
|
+
}
|
|
316
|
+
if depth == 0 {
|
|
317
|
+
return iNdEx, nil
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
return 0, io.ErrUnexpectedEOF
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
var (
|
|
324
|
+
ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
325
|
+
ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow")
|
|
326
|
+
ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
|
|
327
|
+
)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
package types
|
|
2
|
+
|
|
3
|
+
const RouterKey = ModuleName // this was defined in your key.go file
|
|
4
|
+
|
|
5
|
+
type InvokeMemo struct {
|
|
6
|
+
InvokeOnAcknowledgementPacket string `json:"invokeOnAcknowledgementPacket"`
|
|
7
|
+
InvokeOnTimeoutPacket string `json:"invokeOnTimeoutPacket"`
|
|
8
|
+
InvokeWriteAcknowledgement string `json:"invokeWriteAcknowledgement"`
|
|
9
|
+
}
|