@agoric/cosmos 0.34.1 → 0.34.2-calypso-dev-84eb287.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/MAINTAINERS.md +3 -0
- package/Makefile +67 -41
- package/agoric/config.go +35 -0
- package/ante/ante.go +65 -0
- package/ante/expected_keepers.go +26 -0
- package/ante/inbound.go +137 -0
- package/ante/inbound_test.go +228 -0
- package/ante/vm_admission.go +65 -0
- package/app/app.go +396 -211
- package/app/export.go +13 -9
- package/app/sim_test.go +4 -4
- package/app/upgrade.go +215 -0
- package/binding.gyp.in +29 -4
- package/buf.work.yaml +4 -0
- package/cmd/agd/agvm.go +42 -0
- package/cmd/agd/find_binary.go +22 -7
- package/cmd/agd/main.go +133 -10
- package/cmd/libdaemon/main.go +67 -53
- package/cmd/libdaemon/main_test.go +37 -0
- package/daemon/cmd/genaccounts.go +22 -18
- package/daemon/cmd/root.go +253 -52
- package/daemon/cmd/root_test.go +190 -2
- package/daemon/cmd/testnet.go +17 -6
- package/daemon/main.go +6 -3
- package/e2e_test/Makefile +29 -0
- package/e2e_test/README.md +100 -0
- package/e2e_test/go.mod +217 -0
- package/e2e_test/go.sum +1323 -0
- package/e2e_test/ibc_conformance_test.go +56 -0
- package/e2e_test/pfm_test.go +613 -0
- package/e2e_test/util.go +271 -0
- package/git-revision.txt +1 -0
- package/go.mod +207 -0
- package/go.sum +1877 -0
- package/package.json +13 -21
- package/proto/agoric/swingset/genesis.proto +14 -0
- package/proto/agoric/swingset/swingset.proto +6 -3
- package/proto/agoric/vlocalchain/.clang-format +7 -0
- package/proto/agoric/vlocalchain/vlocalchain.proto +31 -0
- package/proto/agoric/vstorage/query.proto +53 -1
- package/proto/agoric/vtransfer/genesis.proto +18 -0
- package/scripts/protocgen.sh +16 -6
- package/third_party/proto/buf.yaml +1 -0
- package/third_party/proto/cosmos/base/query/v1beta1/pagination.proto +4 -1
- package/third_party/proto/cosmos/base/v1beta1/coin.proto +7 -4
- package/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto +16 -6
- package/third_party/proto/cosmos_proto/cosmos.proto +97 -0
- package/third_party/proto/google/api/annotations.proto +1 -1
- package/third_party/proto/google/api/http.proto +181 -120
- package/third_party/proto/google/api/httpbody.proto +9 -6
- package/third_party/proto/google/protobuf/any.proto +1 -7
- package/third_party/proto/ibc/core/channel/v1/channel.proto +15 -1
- package/third_party/proto/ibc/core/client/v1/client.proto +9 -6
- package/tools/tools.go +11 -0
- package/types/events.go +41 -0
- package/types/kv_entry.go +114 -0
- package/types/kv_entry_helpers.go +276 -0
- package/types/kv_entry_helpers_test.go +237 -0
- package/types/kv_entry_test.go +143 -0
- package/upgradegaia.sh +75 -0
- package/vm/action.go +134 -0
- package/vm/action_test.go +149 -0
- package/vm/client.go +113 -0
- package/vm/client_test.go +182 -0
- package/vm/controller.go +49 -0
- package/vm/core_proposals.go +51 -0
- package/vm/jsonrpcconn/jsonrpcconn.go +160 -0
- package/vm/jsonrpcconn/jsonrpcconn_test.go +126 -0
- package/vm/proto_json.go +38 -0
- package/vm/proto_json_test.go +103 -0
- package/vm/server.go +124 -0
- package/x/swingset/abci.go +26 -37
- package/x/swingset/alias.go +9 -6
- package/x/swingset/client/cli/query.go +2 -2
- package/x/swingset/client/cli/tx.go +52 -33
- package/x/swingset/client/proposal_handler.go +2 -17
- package/x/swingset/genesis.go +163 -37
- package/x/swingset/handler.go +2 -1
- package/x/swingset/keeper/extension_snapshotter.go +309 -0
- package/x/swingset/keeper/extension_snapshotter_test.go +104 -0
- package/x/swingset/keeper/keeper.go +95 -48
- package/x/swingset/keeper/keeper_test.go +77 -0
- package/x/swingset/keeper/migrations.go +7 -2
- package/x/swingset/keeper/msg_server.go +71 -56
- package/x/swingset/keeper/proposal.go +15 -9
- package/x/swingset/keeper/querier.go +24 -15
- package/x/swingset/keeper/swing_store_exports_handler.go +872 -0
- package/x/swingset/keeper/swing_store_exports_handler_test.go +247 -0
- package/x/swingset/keeper/test_utils.go +16 -0
- package/x/swingset/module.go +33 -11
- package/x/swingset/proposal_handler.go +5 -4
- package/x/swingset/swingset.go +73 -0
- package/x/swingset/testing/queue.go +17 -0
- package/x/swingset/types/codec.go +2 -2
- package/x/swingset/types/default-params.go +23 -17
- package/x/swingset/types/expected_keepers.go +14 -2
- package/x/swingset/types/genesis.pb.go +361 -18
- package/x/swingset/types/msgs.go +87 -26
- package/x/swingset/types/msgs.pb.go +16 -16
- package/x/swingset/types/params.go +76 -1
- package/x/swingset/types/params_test.go +116 -0
- package/x/swingset/types/proposal.go +10 -9
- package/x/swingset/types/swingset.pb.go +83 -81
- package/x/swingset/types/types.go +30 -28
- package/x/vbank/genesis.go +0 -2
- package/x/vbank/handler.go +2 -1
- package/x/vbank/keeper/keeper.go +3 -2
- package/x/vbank/keeper/querier.go +9 -4
- package/x/vbank/keeper/rewards.go +1 -1
- package/x/vbank/module.go +0 -5
- package/x/vbank/types/msgs.go +0 -12
- package/x/vbank/vbank.go +34 -32
- package/x/vbank/vbank_test.go +20 -20
- package/x/vibc/alias.go +3 -0
- package/x/vibc/handler.go +17 -15
- package/x/vibc/keeper/keeper.go +113 -89
- package/x/vibc/keeper/triggers.go +101 -0
- package/x/vibc/module.go +5 -8
- package/x/vibc/types/expected_keepers.go +28 -6
- package/x/vibc/types/ibc_module.go +336 -0
- package/x/vibc/types/msgs.go +1 -1
- package/x/vibc/types/msgs.pb.go +1 -1
- package/x/vibc/types/receiver.go +170 -0
- package/x/vlocalchain/alias.go +19 -0
- package/x/vlocalchain/handler.go +21 -0
- package/x/vlocalchain/keeper/keeper.go +279 -0
- package/x/vlocalchain/keeper/keeper_test.go +97 -0
- package/x/vlocalchain/types/codec.go +34 -0
- package/x/vlocalchain/types/key.go +27 -0
- package/x/vlocalchain/types/msgs.go +16 -0
- package/x/vlocalchain/types/vlocalchain.pb.go +1072 -0
- package/x/vlocalchain/vlocalchain.go +114 -0
- package/x/vlocalchain/vlocalchain_test.go +434 -0
- package/x/vstorage/README.md +138 -0
- package/x/vstorage/capdata/capdata.go +298 -0
- package/x/vstorage/capdata/capdata_test.go +352 -0
- package/x/vstorage/client/cli/query.go +51 -4
- package/x/vstorage/genesis.go +0 -3
- package/x/vstorage/handler.go +2 -1
- package/x/vstorage/keeper/grpc_query.go +220 -0
- package/x/vstorage/keeper/keeper.go +75 -57
- package/x/vstorage/keeper/keeper_grpc_test.go +300 -0
- package/x/vstorage/keeper/keeper_test.go +40 -62
- package/x/vstorage/keeper/querier.go +39 -14
- package/x/vstorage/keeper/querier_test.go +113 -0
- package/x/vstorage/module.go +0 -5
- package/x/vstorage/testing/queue.go +27 -0
- package/x/vstorage/types/path_keys.go +22 -10
- package/x/vstorage/types/path_keys_test.go +84 -18
- package/x/vstorage/types/query.pb.go +646 -36
- package/x/vstorage/types/query.pb.gw.go +119 -0
- package/x/vstorage/types/types.go +0 -66
- package/x/vstorage/vstorage.go +33 -35
- package/x/vstorage/vstorage_test.go +19 -19
- 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
- package/app/const.go +0 -6
- package/cmd/helper/main.go +0 -21
- package/proto/agoric/lien/genesis.proto +0 -25
- package/proto/agoric/lien/lien.proto +0 -25
- package/x/lien/alias.go +0 -17
- package/x/lien/genesis.go +0 -58
- package/x/lien/genesis_test.go +0 -101
- package/x/lien/keeper/account.go +0 -285
- package/x/lien/keeper/keeper.go +0 -254
- package/x/lien/keeper/keeper_test.go +0 -623
- package/x/lien/lien.go +0 -203
- package/x/lien/lien_test.go +0 -529
- package/x/lien/module.go +0 -115
- package/x/lien/spec/01_concepts.md +0 -146
- package/x/lien/spec/02_messages.md +0 -96
- package/x/lien/types/accountkeeper.go +0 -81
- package/x/lien/types/accountstate.go +0 -27
- package/x/lien/types/expected_keepers.go +0 -18
- package/x/lien/types/genesis.pb.go +0 -567
- package/x/lien/types/key.go +0 -25
- package/x/lien/types/lien.pb.go +0 -403
- package/x/swingset/keeper/snapshotter.go +0 -491
- package/x/swingset/keeper/snapshotter_test.go +0 -185
- package/x/swingset/legacy/v32/params.go +0 -37
- package/x/swingset/legacy/v32/params_test.go +0 -133
- package/x/vibc/ibc.go +0 -442
- /package/{src/index.cjs → index.cjs} +0 -0
package/x/lien/types/lien.pb.go
DELETED
|
@@ -1,403 +0,0 @@
|
|
|
1
|
-
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
2
|
-
// source: agoric/lien/lien.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
|
-
types "github.com/cosmos/cosmos-sdk/types"
|
|
10
|
-
_ "github.com/gogo/protobuf/gogoproto"
|
|
11
|
-
proto "github.com/gogo/protobuf/proto"
|
|
12
|
-
io "io"
|
|
13
|
-
math "math"
|
|
14
|
-
math_bits "math/bits"
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
// Reference imports to suppress errors if they are not otherwise used.
|
|
18
|
-
var _ = proto.Marshal
|
|
19
|
-
var _ = fmt.Errorf
|
|
20
|
-
var _ = math.Inf
|
|
21
|
-
|
|
22
|
-
// This is a compile-time assertion to ensure that this generated file
|
|
23
|
-
// is compatible with the proto package it is being compiled against.
|
|
24
|
-
// A compilation error at this line likely means your copy of the
|
|
25
|
-
// proto package needs to be updated.
|
|
26
|
-
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
27
|
-
|
|
28
|
-
// Lien contains the lien state of a particular account.
|
|
29
|
-
type Lien struct {
|
|
30
|
-
// coins holds the amount liened
|
|
31
|
-
Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins" yaml:"coins"`
|
|
32
|
-
// delegated tracks the net amount delegated for non-vesting accounts,
|
|
33
|
-
// or zero coins for vesting accounts.
|
|
34
|
-
// (Vesting accounts have their own fields to track delegation.)
|
|
35
|
-
Delegated github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=delegated,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"delegated" yaml:"delegated"`
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
func (m *Lien) Reset() { *m = Lien{} }
|
|
39
|
-
func (m *Lien) String() string { return proto.CompactTextString(m) }
|
|
40
|
-
func (*Lien) ProtoMessage() {}
|
|
41
|
-
func (*Lien) Descriptor() ([]byte, []int) {
|
|
42
|
-
return fileDescriptor_7e748ec8ed81c39b, []int{0}
|
|
43
|
-
}
|
|
44
|
-
func (m *Lien) XXX_Unmarshal(b []byte) error {
|
|
45
|
-
return m.Unmarshal(b)
|
|
46
|
-
}
|
|
47
|
-
func (m *Lien) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
48
|
-
if deterministic {
|
|
49
|
-
return xxx_messageInfo_Lien.Marshal(b, m, deterministic)
|
|
50
|
-
} else {
|
|
51
|
-
b = b[:cap(b)]
|
|
52
|
-
n, err := m.MarshalToSizedBuffer(b)
|
|
53
|
-
if err != nil {
|
|
54
|
-
return nil, err
|
|
55
|
-
}
|
|
56
|
-
return b[:n], nil
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
func (m *Lien) XXX_Merge(src proto.Message) {
|
|
60
|
-
xxx_messageInfo_Lien.Merge(m, src)
|
|
61
|
-
}
|
|
62
|
-
func (m *Lien) XXX_Size() int {
|
|
63
|
-
return m.Size()
|
|
64
|
-
}
|
|
65
|
-
func (m *Lien) XXX_DiscardUnknown() {
|
|
66
|
-
xxx_messageInfo_Lien.DiscardUnknown(m)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
var xxx_messageInfo_Lien proto.InternalMessageInfo
|
|
70
|
-
|
|
71
|
-
func (m *Lien) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins {
|
|
72
|
-
if m != nil {
|
|
73
|
-
return m.Coins
|
|
74
|
-
}
|
|
75
|
-
return nil
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
func (m *Lien) GetDelegated() github_com_cosmos_cosmos_sdk_types.Coins {
|
|
79
|
-
if m != nil {
|
|
80
|
-
return m.Delegated
|
|
81
|
-
}
|
|
82
|
-
return nil
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
func init() {
|
|
86
|
-
proto.RegisterType((*Lien)(nil), "agoric.lien.Lien")
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
func init() { proto.RegisterFile("agoric/lien/lien.proto", fileDescriptor_7e748ec8ed81c39b) }
|
|
90
|
-
|
|
91
|
-
var fileDescriptor_7e748ec8ed81c39b = []byte{
|
|
92
|
-
// 273 bytes of a gzipped FileDescriptorProto
|
|
93
|
-
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4b, 0x4c, 0xcf, 0x2f,
|
|
94
|
-
0xca, 0x4c, 0xd6, 0xcf, 0xc9, 0x4c, 0xcd, 0x03, 0x13, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42,
|
|
95
|
-
0xdc, 0x10, 0x71, 0x3d, 0x90, 0x90, 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x58, 0x5c, 0x1f, 0xc4,
|
|
96
|
-
0x82, 0x28, 0x91, 0x92, 0x4b, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5,
|
|
97
|
-
0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0xce, 0xcf, 0x84, 0x1a, 0xa1, 0xf4, 0x83,
|
|
98
|
-
0x91, 0x8b, 0xc5, 0x27, 0x33, 0x35, 0x4f, 0xa8, 0x90, 0x8b, 0x15, 0x24, 0x5c, 0x2c, 0xc1, 0xa8,
|
|
99
|
-
0xc0, 0xac, 0xc1, 0x6d, 0x24, 0xa9, 0x07, 0xd1, 0xa8, 0x07, 0xd2, 0xa8, 0x07, 0xd5, 0xa8, 0xe7,
|
|
100
|
-
0x9c, 0x9f, 0x99, 0xe7, 0xe4, 0x70, 0xe2, 0x9e, 0x3c, 0xc3, 0xa7, 0x7b, 0xf2, 0x3c, 0x95, 0x89,
|
|
101
|
-
0xb9, 0x39, 0x56, 0x4a, 0x60, 0x5d, 0x4a, 0xab, 0xee, 0xcb, 0x6b, 0xa4, 0x67, 0x96, 0x64, 0x94,
|
|
102
|
-
0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x43, 0x6d, 0x85, 0x50, 0xba, 0xc5, 0x29, 0xd9, 0xfa, 0x25,
|
|
103
|
-
0x95, 0x05, 0xa9, 0xc5, 0x60, 0x03, 0x8a, 0x83, 0x20, 0x36, 0x09, 0xd5, 0x72, 0x71, 0xa6, 0xa4,
|
|
104
|
-
0xe6, 0xa4, 0xa6, 0x27, 0x96, 0xa4, 0xa6, 0x48, 0x30, 0x11, 0xb2, 0xd6, 0x05, 0x6a, 0xad, 0x00,
|
|
105
|
-
0xc4, 0x5a, 0xb8, 0x4e, 0xd2, 0xac, 0x46, 0xd8, 0xe8, 0x14, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85,
|
|
106
|
-
0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3,
|
|
107
|
-
0x8d, 0xc7, 0x72, 0x0c, 0x51, 0xe6, 0x48, 0xc6, 0x39, 0x42, 0x82, 0x1e, 0x12, 0xd2, 0x60, 0xe3,
|
|
108
|
-
0xd2, 0xf3, 0x73, 0x12, 0xf3, 0xd2, 0x61, 0xf6, 0x54, 0x40, 0x62, 0x05, 0x6c, 0x47, 0x12, 0x1b,
|
|
109
|
-
0x38, 0x50, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x71, 0xb7, 0xef, 0x8a, 0xb1, 0x01, 0x00,
|
|
110
|
-
0x00,
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
func (m *Lien) Marshal() (dAtA []byte, err error) {
|
|
114
|
-
size := m.Size()
|
|
115
|
-
dAtA = make([]byte, size)
|
|
116
|
-
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
117
|
-
if err != nil {
|
|
118
|
-
return nil, err
|
|
119
|
-
}
|
|
120
|
-
return dAtA[:n], nil
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
func (m *Lien) MarshalTo(dAtA []byte) (int, error) {
|
|
124
|
-
size := m.Size()
|
|
125
|
-
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
func (m *Lien) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
129
|
-
i := len(dAtA)
|
|
130
|
-
_ = i
|
|
131
|
-
var l int
|
|
132
|
-
_ = l
|
|
133
|
-
if len(m.Delegated) > 0 {
|
|
134
|
-
for iNdEx := len(m.Delegated) - 1; iNdEx >= 0; iNdEx-- {
|
|
135
|
-
{
|
|
136
|
-
size, err := m.Delegated[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
137
|
-
if err != nil {
|
|
138
|
-
return 0, err
|
|
139
|
-
}
|
|
140
|
-
i -= size
|
|
141
|
-
i = encodeVarintLien(dAtA, i, uint64(size))
|
|
142
|
-
}
|
|
143
|
-
i--
|
|
144
|
-
dAtA[i] = 0x12
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
if len(m.Coins) > 0 {
|
|
148
|
-
for iNdEx := len(m.Coins) - 1; iNdEx >= 0; iNdEx-- {
|
|
149
|
-
{
|
|
150
|
-
size, err := m.Coins[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
151
|
-
if err != nil {
|
|
152
|
-
return 0, err
|
|
153
|
-
}
|
|
154
|
-
i -= size
|
|
155
|
-
i = encodeVarintLien(dAtA, i, uint64(size))
|
|
156
|
-
}
|
|
157
|
-
i--
|
|
158
|
-
dAtA[i] = 0xa
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
return len(dAtA) - i, nil
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
func encodeVarintLien(dAtA []byte, offset int, v uint64) int {
|
|
165
|
-
offset -= sovLien(v)
|
|
166
|
-
base := offset
|
|
167
|
-
for v >= 1<<7 {
|
|
168
|
-
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
169
|
-
v >>= 7
|
|
170
|
-
offset++
|
|
171
|
-
}
|
|
172
|
-
dAtA[offset] = uint8(v)
|
|
173
|
-
return base
|
|
174
|
-
}
|
|
175
|
-
func (m *Lien) Size() (n int) {
|
|
176
|
-
if m == nil {
|
|
177
|
-
return 0
|
|
178
|
-
}
|
|
179
|
-
var l int
|
|
180
|
-
_ = l
|
|
181
|
-
if len(m.Coins) > 0 {
|
|
182
|
-
for _, e := range m.Coins {
|
|
183
|
-
l = e.Size()
|
|
184
|
-
n += 1 + l + sovLien(uint64(l))
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
if len(m.Delegated) > 0 {
|
|
188
|
-
for _, e := range m.Delegated {
|
|
189
|
-
l = e.Size()
|
|
190
|
-
n += 1 + l + sovLien(uint64(l))
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
return n
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
func sovLien(x uint64) (n int) {
|
|
197
|
-
return (math_bits.Len64(x|1) + 6) / 7
|
|
198
|
-
}
|
|
199
|
-
func sozLien(x uint64) (n int) {
|
|
200
|
-
return sovLien(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
201
|
-
}
|
|
202
|
-
func (m *Lien) Unmarshal(dAtA []byte) error {
|
|
203
|
-
l := len(dAtA)
|
|
204
|
-
iNdEx := 0
|
|
205
|
-
for iNdEx < l {
|
|
206
|
-
preIndex := iNdEx
|
|
207
|
-
var wire uint64
|
|
208
|
-
for shift := uint(0); ; shift += 7 {
|
|
209
|
-
if shift >= 64 {
|
|
210
|
-
return ErrIntOverflowLien
|
|
211
|
-
}
|
|
212
|
-
if iNdEx >= l {
|
|
213
|
-
return io.ErrUnexpectedEOF
|
|
214
|
-
}
|
|
215
|
-
b := dAtA[iNdEx]
|
|
216
|
-
iNdEx++
|
|
217
|
-
wire |= uint64(b&0x7F) << shift
|
|
218
|
-
if b < 0x80 {
|
|
219
|
-
break
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
fieldNum := int32(wire >> 3)
|
|
223
|
-
wireType := int(wire & 0x7)
|
|
224
|
-
if wireType == 4 {
|
|
225
|
-
return fmt.Errorf("proto: Lien: wiretype end group for non-group")
|
|
226
|
-
}
|
|
227
|
-
if fieldNum <= 0 {
|
|
228
|
-
return fmt.Errorf("proto: Lien: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
229
|
-
}
|
|
230
|
-
switch fieldNum {
|
|
231
|
-
case 1:
|
|
232
|
-
if wireType != 2 {
|
|
233
|
-
return fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType)
|
|
234
|
-
}
|
|
235
|
-
var msglen int
|
|
236
|
-
for shift := uint(0); ; shift += 7 {
|
|
237
|
-
if shift >= 64 {
|
|
238
|
-
return ErrIntOverflowLien
|
|
239
|
-
}
|
|
240
|
-
if iNdEx >= l {
|
|
241
|
-
return io.ErrUnexpectedEOF
|
|
242
|
-
}
|
|
243
|
-
b := dAtA[iNdEx]
|
|
244
|
-
iNdEx++
|
|
245
|
-
msglen |= int(b&0x7F) << shift
|
|
246
|
-
if b < 0x80 {
|
|
247
|
-
break
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
if msglen < 0 {
|
|
251
|
-
return ErrInvalidLengthLien
|
|
252
|
-
}
|
|
253
|
-
postIndex := iNdEx + msglen
|
|
254
|
-
if postIndex < 0 {
|
|
255
|
-
return ErrInvalidLengthLien
|
|
256
|
-
}
|
|
257
|
-
if postIndex > l {
|
|
258
|
-
return io.ErrUnexpectedEOF
|
|
259
|
-
}
|
|
260
|
-
m.Coins = append(m.Coins, types.Coin{})
|
|
261
|
-
if err := m.Coins[len(m.Coins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
262
|
-
return err
|
|
263
|
-
}
|
|
264
|
-
iNdEx = postIndex
|
|
265
|
-
case 2:
|
|
266
|
-
if wireType != 2 {
|
|
267
|
-
return fmt.Errorf("proto: wrong wireType = %d for field Delegated", wireType)
|
|
268
|
-
}
|
|
269
|
-
var msglen int
|
|
270
|
-
for shift := uint(0); ; shift += 7 {
|
|
271
|
-
if shift >= 64 {
|
|
272
|
-
return ErrIntOverflowLien
|
|
273
|
-
}
|
|
274
|
-
if iNdEx >= l {
|
|
275
|
-
return io.ErrUnexpectedEOF
|
|
276
|
-
}
|
|
277
|
-
b := dAtA[iNdEx]
|
|
278
|
-
iNdEx++
|
|
279
|
-
msglen |= int(b&0x7F) << shift
|
|
280
|
-
if b < 0x80 {
|
|
281
|
-
break
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
if msglen < 0 {
|
|
285
|
-
return ErrInvalidLengthLien
|
|
286
|
-
}
|
|
287
|
-
postIndex := iNdEx + msglen
|
|
288
|
-
if postIndex < 0 {
|
|
289
|
-
return ErrInvalidLengthLien
|
|
290
|
-
}
|
|
291
|
-
if postIndex > l {
|
|
292
|
-
return io.ErrUnexpectedEOF
|
|
293
|
-
}
|
|
294
|
-
m.Delegated = append(m.Delegated, types.Coin{})
|
|
295
|
-
if err := m.Delegated[len(m.Delegated)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
296
|
-
return err
|
|
297
|
-
}
|
|
298
|
-
iNdEx = postIndex
|
|
299
|
-
default:
|
|
300
|
-
iNdEx = preIndex
|
|
301
|
-
skippy, err := skipLien(dAtA[iNdEx:])
|
|
302
|
-
if err != nil {
|
|
303
|
-
return err
|
|
304
|
-
}
|
|
305
|
-
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
|
306
|
-
return ErrInvalidLengthLien
|
|
307
|
-
}
|
|
308
|
-
if (iNdEx + skippy) > l {
|
|
309
|
-
return io.ErrUnexpectedEOF
|
|
310
|
-
}
|
|
311
|
-
iNdEx += skippy
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
if iNdEx > l {
|
|
316
|
-
return io.ErrUnexpectedEOF
|
|
317
|
-
}
|
|
318
|
-
return nil
|
|
319
|
-
}
|
|
320
|
-
func skipLien(dAtA []byte) (n int, err error) {
|
|
321
|
-
l := len(dAtA)
|
|
322
|
-
iNdEx := 0
|
|
323
|
-
depth := 0
|
|
324
|
-
for iNdEx < l {
|
|
325
|
-
var wire uint64
|
|
326
|
-
for shift := uint(0); ; shift += 7 {
|
|
327
|
-
if shift >= 64 {
|
|
328
|
-
return 0, ErrIntOverflowLien
|
|
329
|
-
}
|
|
330
|
-
if iNdEx >= l {
|
|
331
|
-
return 0, io.ErrUnexpectedEOF
|
|
332
|
-
}
|
|
333
|
-
b := dAtA[iNdEx]
|
|
334
|
-
iNdEx++
|
|
335
|
-
wire |= (uint64(b) & 0x7F) << shift
|
|
336
|
-
if b < 0x80 {
|
|
337
|
-
break
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
wireType := int(wire & 0x7)
|
|
341
|
-
switch wireType {
|
|
342
|
-
case 0:
|
|
343
|
-
for shift := uint(0); ; shift += 7 {
|
|
344
|
-
if shift >= 64 {
|
|
345
|
-
return 0, ErrIntOverflowLien
|
|
346
|
-
}
|
|
347
|
-
if iNdEx >= l {
|
|
348
|
-
return 0, io.ErrUnexpectedEOF
|
|
349
|
-
}
|
|
350
|
-
iNdEx++
|
|
351
|
-
if dAtA[iNdEx-1] < 0x80 {
|
|
352
|
-
break
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
case 1:
|
|
356
|
-
iNdEx += 8
|
|
357
|
-
case 2:
|
|
358
|
-
var length int
|
|
359
|
-
for shift := uint(0); ; shift += 7 {
|
|
360
|
-
if shift >= 64 {
|
|
361
|
-
return 0, ErrIntOverflowLien
|
|
362
|
-
}
|
|
363
|
-
if iNdEx >= l {
|
|
364
|
-
return 0, io.ErrUnexpectedEOF
|
|
365
|
-
}
|
|
366
|
-
b := dAtA[iNdEx]
|
|
367
|
-
iNdEx++
|
|
368
|
-
length |= (int(b) & 0x7F) << shift
|
|
369
|
-
if b < 0x80 {
|
|
370
|
-
break
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
if length < 0 {
|
|
374
|
-
return 0, ErrInvalidLengthLien
|
|
375
|
-
}
|
|
376
|
-
iNdEx += length
|
|
377
|
-
case 3:
|
|
378
|
-
depth++
|
|
379
|
-
case 4:
|
|
380
|
-
if depth == 0 {
|
|
381
|
-
return 0, ErrUnexpectedEndOfGroupLien
|
|
382
|
-
}
|
|
383
|
-
depth--
|
|
384
|
-
case 5:
|
|
385
|
-
iNdEx += 4
|
|
386
|
-
default:
|
|
387
|
-
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
388
|
-
}
|
|
389
|
-
if iNdEx < 0 {
|
|
390
|
-
return 0, ErrInvalidLengthLien
|
|
391
|
-
}
|
|
392
|
-
if depth == 0 {
|
|
393
|
-
return iNdEx, nil
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
return 0, io.ErrUnexpectedEOF
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
var (
|
|
400
|
-
ErrInvalidLengthLien = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
401
|
-
ErrIntOverflowLien = fmt.Errorf("proto: integer overflow")
|
|
402
|
-
ErrUnexpectedEndOfGroupLien = fmt.Errorf("proto: unexpected end of group")
|
|
403
|
-
)
|