@wireio/opp-solidity-models 1.0.9 → 1.0.12
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/contracts/sysio/opp/Opp.sol +6 -4
- package/contracts/sysio/opp/attestations/Attestations.sol +40 -16
- package/contracts/sysio/opp/types/Types.sol +201 -21
- package/package.json +1 -1
- package/sysio/opp/types/types.d.ts +18 -6
- package/sysio/opp/types/types.d.ts.map +1 -1
- package/sysio/opp/types/types.js +19 -7
- package/sysio/opp/types/types.ts +19 -7
|
@@ -5,7 +5,7 @@ pragma solidity >=0.8.0 <0.9.0;
|
|
|
5
5
|
// DO NOT EDIT
|
|
6
6
|
|
|
7
7
|
import {ProtobufRuntime} from "../../ProtobufRuntime.sol";
|
|
8
|
-
import {ChainId, ChainIdCodec, ChainSignature, ChainSignatureCodec, EncodingFlags, EncodingFlagsCodec} from "./types/Types.sol";
|
|
8
|
+
import {AttestationType, AttestationTypeLib, ChainId, ChainIdCodec, ChainSignature, ChainSignatureCodec, EncodingFlags, EncodingFlagsCodec} from "./types/Types.sol";
|
|
9
9
|
|
|
10
10
|
struct Endpoints {
|
|
11
11
|
ChainId start;
|
|
@@ -29,7 +29,7 @@ struct MessagePayload {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
struct AttestationEntry {
|
|
32
|
-
|
|
32
|
+
AttestationType type_;
|
|
33
33
|
uint32 dataSize;
|
|
34
34
|
bytes data;
|
|
35
35
|
}
|
|
@@ -249,7 +249,7 @@ library AttestationEntryCodec {
|
|
|
249
249
|
|
|
250
250
|
// field 1: type
|
|
251
251
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x8));
|
|
252
|
-
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(attestationEntry.type_));
|
|
252
|
+
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(uint64(AttestationType.unwrap(attestationEntry.type_))));
|
|
253
253
|
|
|
254
254
|
// field 2: data_size
|
|
255
255
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x10));
|
|
@@ -271,7 +271,9 @@ library AttestationEntryCodec {
|
|
|
271
271
|
(tag, pos) = ProtobufRuntime._decode_key(data, pos);
|
|
272
272
|
|
|
273
273
|
if (tag == 8) {
|
|
274
|
-
|
|
274
|
+
{ uint64 _v;
|
|
275
|
+
(_v, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
276
|
+
attestationEntry.type_ = AttestationType.wrap(uint16(_v)); }
|
|
275
277
|
} else if (tag == 16) {
|
|
276
278
|
{ uint64 _v;
|
|
277
279
|
(_v, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
@@ -5,11 +5,25 @@ pragma solidity >=0.8.0 <0.9.0;
|
|
|
5
5
|
// DO NOT EDIT
|
|
6
6
|
|
|
7
7
|
import {ProtobufRuntime} from "../../../ProtobufRuntime.sol";
|
|
8
|
-
import {ChainAddress, ChainAddressCodec, ChainId, ChainIdCodec, ChainSignature, ChainSignatureCodec, TokenAmount, TokenAmountCodec} from "../types/Types.sol";
|
|
8
|
+
import {ChainAddress, ChainAddressCodec, ChainId, ChainIdCodec, ChainKind, ChainKindLib, ChainSignature, ChainSignatureCodec, OperatorStatus, OperatorStatusLib, OperatorType, OperatorTypeLib, StakeStatus, StakeStatusLib, TokenAmount, TokenAmountCodec} from "../types/Types.sol";
|
|
9
9
|
import {Message, MessageCodec} from "../Opp.sol";
|
|
10
10
|
|
|
11
|
+
type ActionType is uint8;
|
|
12
|
+
|
|
13
|
+
using {ActionTypeLib.isValid} for ActionType global;
|
|
14
|
+
|
|
15
|
+
library ActionTypeLib {
|
|
16
|
+
ActionType constant ACTION_TYPE_UNKNOWN = ActionType.wrap(0);
|
|
17
|
+
ActionType constant ACTION_TYPE_DEPOSIT = ActionType.wrap(1);
|
|
18
|
+
ActionType constant ACTION_TYPE_WITHDRAW = ActionType.wrap(2);
|
|
19
|
+
|
|
20
|
+
function isValid(ActionType _v) internal pure returns (bool) {
|
|
21
|
+
return ActionType.unwrap(_v) <= ActionType.unwrap(ACTION_TYPE_WITHDRAW);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
11
25
|
struct ChainReserveBalanceSheet {
|
|
12
|
-
|
|
26
|
+
ChainKind kind;
|
|
13
27
|
TokenAmount[] amounts;
|
|
14
28
|
}
|
|
15
29
|
|
|
@@ -35,7 +49,7 @@ struct PretokenYield {
|
|
|
35
49
|
|
|
36
50
|
struct StakeUpdate {
|
|
37
51
|
ChainAddress actor;
|
|
38
|
-
|
|
52
|
+
StakeStatus status;
|
|
39
53
|
TokenAmount amount;
|
|
40
54
|
}
|
|
41
55
|
|
|
@@ -45,10 +59,10 @@ struct WireTokenPurchase {
|
|
|
45
59
|
}
|
|
46
60
|
|
|
47
61
|
struct OperatorAction {
|
|
48
|
-
|
|
62
|
+
ActionType actionType;
|
|
49
63
|
ChainAddress actor;
|
|
50
|
-
|
|
51
|
-
|
|
64
|
+
OperatorType type_;
|
|
65
|
+
OperatorStatus status;
|
|
52
66
|
TokenAmount amount;
|
|
53
67
|
}
|
|
54
68
|
|
|
@@ -73,7 +87,7 @@ library ChainReserveBalanceSheetCodec {
|
|
|
73
87
|
|
|
74
88
|
// field 1: kind
|
|
75
89
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x8));
|
|
76
|
-
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(chainReserveBalanceSheet.kind));
|
|
90
|
+
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(uint64(ChainKind.unwrap(chainReserveBalanceSheet.kind))));
|
|
77
91
|
|
|
78
92
|
// field 2: amounts
|
|
79
93
|
for (uint256 _i_amounts = 0; _i_amounts < chainReserveBalanceSheet.amounts.length; _i_amounts++) {
|
|
@@ -108,7 +122,9 @@ library ChainReserveBalanceSheetCodec {
|
|
|
108
122
|
(tag, pos) = ProtobufRuntime._decode_key(data, pos);
|
|
109
123
|
|
|
110
124
|
if (tag == 8) {
|
|
111
|
-
|
|
125
|
+
{ uint64 _v;
|
|
126
|
+
(_v, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
127
|
+
chainReserveBalanceSheet.kind = ChainKind.wrap(uint8(_v)); }
|
|
112
128
|
} else if (tag == 18) {
|
|
113
129
|
uint64 _len;
|
|
114
130
|
(_len, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
@@ -316,7 +332,7 @@ library StakeUpdateCodec {
|
|
|
316
332
|
|
|
317
333
|
// field 2: status
|
|
318
334
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x10));
|
|
319
|
-
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(stakeUpdate.status));
|
|
335
|
+
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(uint64(StakeStatus.unwrap(stakeUpdate.status))));
|
|
320
336
|
|
|
321
337
|
// field 3: amount
|
|
322
338
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x1a));
|
|
@@ -342,7 +358,9 @@ library StakeUpdateCodec {
|
|
|
342
358
|
stakeUpdate.actor = ChainAddressCodec.decode(_sub);
|
|
343
359
|
pos += uint256(_len);
|
|
344
360
|
} else if (tag == 16) {
|
|
345
|
-
|
|
361
|
+
{ uint64 _v;
|
|
362
|
+
(_v, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
363
|
+
stakeUpdate.status = StakeStatus.wrap(uint8(_v)); }
|
|
346
364
|
} else if (tag == 26) {
|
|
347
365
|
uint64 _len;
|
|
348
366
|
(_len, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
@@ -425,7 +443,7 @@ library OperatorActionCodec {
|
|
|
425
443
|
|
|
426
444
|
// field 1: action_type
|
|
427
445
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x8));
|
|
428
|
-
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(operatorAction.actionType));
|
|
446
|
+
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(uint64(ActionType.unwrap(operatorAction.actionType))));
|
|
429
447
|
|
|
430
448
|
// field 2: actor
|
|
431
449
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x12));
|
|
@@ -435,11 +453,11 @@ library OperatorActionCodec {
|
|
|
435
453
|
|
|
436
454
|
// field 3: type
|
|
437
455
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x18));
|
|
438
|
-
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(operatorAction.type_));
|
|
456
|
+
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(uint64(OperatorType.unwrap(operatorAction.type_))));
|
|
439
457
|
|
|
440
458
|
// field 4: status
|
|
441
459
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x20));
|
|
442
|
-
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(operatorAction.status));
|
|
460
|
+
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(uint64(OperatorStatus.unwrap(operatorAction.status))));
|
|
443
461
|
|
|
444
462
|
// field 10: amount
|
|
445
463
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x52));
|
|
@@ -459,7 +477,9 @@ library OperatorActionCodec {
|
|
|
459
477
|
(tag, pos) = ProtobufRuntime._decode_key(data, pos);
|
|
460
478
|
|
|
461
479
|
if (tag == 8) {
|
|
462
|
-
|
|
480
|
+
{ uint64 _v;
|
|
481
|
+
(_v, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
482
|
+
operatorAction.actionType = ActionType.wrap(uint8(_v)); }
|
|
463
483
|
} else if (tag == 18) {
|
|
464
484
|
uint64 _len;
|
|
465
485
|
(_len, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
@@ -467,9 +487,13 @@ library OperatorActionCodec {
|
|
|
467
487
|
operatorAction.actor = ChainAddressCodec.decode(_sub);
|
|
468
488
|
pos += uint256(_len);
|
|
469
489
|
} else if (tag == 24) {
|
|
470
|
-
|
|
490
|
+
{ uint64 _v;
|
|
491
|
+
(_v, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
492
|
+
operatorAction.type_ = OperatorType.wrap(uint8(_v)); }
|
|
471
493
|
} else if (tag == 32) {
|
|
472
|
-
|
|
494
|
+
{ uint64 _v;
|
|
495
|
+
(_v, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
496
|
+
operatorAction.status = OperatorStatus.wrap(uint8(_v)); }
|
|
473
497
|
} else if (tag == 82) {
|
|
474
498
|
uint64 _len;
|
|
475
499
|
(_len, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
@@ -6,31 +6,197 @@ pragma solidity >=0.8.0 <0.9.0;
|
|
|
6
6
|
|
|
7
7
|
import {ProtobufRuntime} from "../../../ProtobufRuntime.sol";
|
|
8
8
|
|
|
9
|
+
type ChainKind is uint8;
|
|
10
|
+
|
|
11
|
+
using {ChainKindLib.isValid} for ChainKind global;
|
|
12
|
+
|
|
13
|
+
library ChainKindLib {
|
|
14
|
+
ChainKind constant CHAIN_KIND_UNKNOWN = ChainKind.wrap(0);
|
|
15
|
+
ChainKind constant CHAIN_KIND_WIRE = ChainKind.wrap(1);
|
|
16
|
+
ChainKind constant CHAIN_KIND_ETHEREUM = ChainKind.wrap(2);
|
|
17
|
+
ChainKind constant CHAIN_KIND_SOLANA = ChainKind.wrap(3);
|
|
18
|
+
ChainKind constant CHAIN_KIND_SUI = ChainKind.wrap(4);
|
|
19
|
+
|
|
20
|
+
function isValid(ChainKind _v) internal pure returns (bool) {
|
|
21
|
+
return ChainKind.unwrap(_v) <= ChainKind.unwrap(CHAIN_KIND_SUI);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
type ChainKeyType is uint8;
|
|
26
|
+
|
|
27
|
+
using {ChainKeyTypeLib.isValid} for ChainKeyType global;
|
|
28
|
+
|
|
29
|
+
library ChainKeyTypeLib {
|
|
30
|
+
ChainKeyType constant CHAIN_KEY_TYPE_UNKNOWN = ChainKeyType.wrap(0);
|
|
31
|
+
ChainKeyType constant CHAIN_KEY_TYPE_WIRE = ChainKeyType.wrap(1);
|
|
32
|
+
ChainKeyType constant CHAIN_KEY_TYPE_WIRE_BLS = ChainKeyType.wrap(2);
|
|
33
|
+
ChainKeyType constant CHAIN_KEY_TYPE_ETHEREUM = ChainKeyType.wrap(3);
|
|
34
|
+
ChainKeyType constant CHAIN_KEY_TYPE_SOLANA = ChainKeyType.wrap(4);
|
|
35
|
+
ChainKeyType constant CHAIN_KEY_TYPE_SUI = ChainKeyType.wrap(5);
|
|
36
|
+
|
|
37
|
+
function isValid(ChainKeyType _v) internal pure returns (bool) {
|
|
38
|
+
return ChainKeyType.unwrap(_v) <= ChainKeyType.unwrap(CHAIN_KEY_TYPE_SUI);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
type TokenKind is uint16;
|
|
43
|
+
|
|
44
|
+
using {TokenKindLib.isValid} for TokenKind global;
|
|
45
|
+
|
|
46
|
+
library TokenKindLib {
|
|
47
|
+
TokenKind constant TOKEN_KIND_WIRE = TokenKind.wrap(0);
|
|
48
|
+
TokenKind constant TOKEN_KIND_ETH = TokenKind.wrap(256);
|
|
49
|
+
TokenKind constant TOKEN_KIND_ERC721 = TokenKind.wrap(257);
|
|
50
|
+
TokenKind constant TOKEN_KIND_ERC1155 = TokenKind.wrap(258);
|
|
51
|
+
TokenKind constant TOKTOKEN_KIND_LIQETH = TokenKind.wrap(496);
|
|
52
|
+
TokenKind constant TOKEN_KIND_SOL = TokenKind.wrap(512);
|
|
53
|
+
TokenKind constant TOKEN_KIND_LIQSOL = TokenKind.wrap(752);
|
|
54
|
+
|
|
55
|
+
function isValid(TokenKind _v) internal pure returns (bool) {
|
|
56
|
+
return TokenKind.unwrap(_v) <= TokenKind.unwrap(TOKEN_KIND_LIQSOL);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
type Endianness is uint8;
|
|
61
|
+
|
|
62
|
+
using {EndiannessLib.isValid} for Endianness global;
|
|
63
|
+
|
|
64
|
+
library EndiannessLib {
|
|
65
|
+
Endianness constant ENDIANNESS_BIG = Endianness.wrap(0);
|
|
66
|
+
Endianness constant ENDIANNESS_LITTLE = Endianness.wrap(1);
|
|
67
|
+
|
|
68
|
+
function isValid(Endianness _v) internal pure returns (bool) {
|
|
69
|
+
return Endianness.unwrap(_v) <= Endianness.unwrap(ENDIANNESS_LITTLE);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
type HashAlgorithm is uint8;
|
|
74
|
+
|
|
75
|
+
using {HashAlgorithmLib.isValid} for HashAlgorithm global;
|
|
76
|
+
|
|
77
|
+
library HashAlgorithmLib {
|
|
78
|
+
HashAlgorithm constant HASH_ALGORITHM_KECCAK256 = HashAlgorithm.wrap(0);
|
|
79
|
+
HashAlgorithm constant HASH_ALGORITHM_SHA256 = HashAlgorithm.wrap(1);
|
|
80
|
+
HashAlgorithm constant HASH_ALGORITHM_RESERVED_1 = HashAlgorithm.wrap(2);
|
|
81
|
+
HashAlgorithm constant HASH_ALGORITHM_RESERVED_2 = HashAlgorithm.wrap(3);
|
|
82
|
+
|
|
83
|
+
function isValid(HashAlgorithm _v) internal pure returns (bool) {
|
|
84
|
+
return HashAlgorithm.unwrap(_v) <= HashAlgorithm.unwrap(HASH_ALGORITHM_RESERVED_2);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
type LengthEncoding is uint8;
|
|
89
|
+
|
|
90
|
+
using {LengthEncodingLib.isValid} for LengthEncoding global;
|
|
91
|
+
|
|
92
|
+
library LengthEncodingLib {
|
|
93
|
+
LengthEncoding constant LENGTH_ENCODING_VARUINT = LengthEncoding.wrap(0);
|
|
94
|
+
LengthEncoding constant LENGTH_ENCODING_UINT32 = LengthEncoding.wrap(1);
|
|
95
|
+
|
|
96
|
+
function isValid(LengthEncoding _v) internal pure returns (bool) {
|
|
97
|
+
return LengthEncoding.unwrap(_v) <= LengthEncoding.unwrap(LENGTH_ENCODING_UINT32);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
type AttestationType is uint16;
|
|
102
|
+
|
|
103
|
+
using {AttestationTypeLib.isValid} for AttestationType global;
|
|
104
|
+
|
|
105
|
+
library AttestationTypeLib {
|
|
106
|
+
AttestationType constant ATTESTATION_TYPE_UNSPECIFIED = AttestationType.wrap(0);
|
|
107
|
+
AttestationType constant ATTESTATION_TYPE_OPERATOR_ACTION = AttestationType.wrap(2001);
|
|
108
|
+
AttestationType constant ATTESTATION_TYPE_STAKE = AttestationType.wrap(3001);
|
|
109
|
+
AttestationType constant ATTESTATION_TYPE_UNSTAKE = AttestationType.wrap(3002);
|
|
110
|
+
AttestationType constant ATTESTATION_TYPE_PRETOKEN_PURCHASE = AttestationType.wrap(3004);
|
|
111
|
+
AttestationType constant ATTESTATION_TYPE_PRETOKEN_YIELD = AttestationType.wrap(3006);
|
|
112
|
+
AttestationType constant ATTESTATION_TYPE_RESERVE_BALANCE_SHEET = AttestationType.wrap(43520);
|
|
113
|
+
AttestationType constant ATTESTATION_TYPE_STAKE_UPDATE = AttestationType.wrap(60928);
|
|
114
|
+
AttestationType constant ATTESTATION_TYPE_NATIVE_YIELD_REWARD = AttestationType.wrap(60929);
|
|
115
|
+
AttestationType constant ATTESTATION_TYPE_WIRE_TOKEN_PURCHASE = AttestationType.wrap(60930);
|
|
116
|
+
AttestationType constant ATTESTATION_TYPE_OPERATOR_REG_DEREG = AttestationType.wrap(60931);
|
|
117
|
+
AttestationType constant ATTESTATION_TYPE_CHALLENGE_RESPONSE = AttestationType.wrap(60932);
|
|
118
|
+
AttestationType constant ATTESTATION_TYPE_SLASH_OPERATOR = AttestationType.wrap(60933);
|
|
119
|
+
|
|
120
|
+
function isValid(AttestationType _v) internal pure returns (bool) {
|
|
121
|
+
return AttestationType.unwrap(_v) <= AttestationType.unwrap(ATTESTATION_TYPE_SLASH_OPERATOR);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
type StakeStatus is uint8;
|
|
126
|
+
|
|
127
|
+
using {StakeStatusLib.isValid} for StakeStatus global;
|
|
128
|
+
|
|
129
|
+
library StakeStatusLib {
|
|
130
|
+
StakeStatus constant STAKE_STATUS_UNKNOWN = StakeStatus.wrap(0);
|
|
131
|
+
StakeStatus constant STAKE_STATUS_WARMUP = StakeStatus.wrap(1);
|
|
132
|
+
StakeStatus constant STAKE_STATUS_COOLDOWN = StakeStatus.wrap(2);
|
|
133
|
+
StakeStatus constant STAKE_STATUS_ACTIVE = StakeStatus.wrap(3);
|
|
134
|
+
StakeStatus constant STAKE_STATUS_TERMINATED = StakeStatus.wrap(240);
|
|
135
|
+
StakeStatus constant STAKE_STATUS_SLASHED = StakeStatus.wrap(241);
|
|
136
|
+
|
|
137
|
+
function isValid(StakeStatus _v) internal pure returns (bool) {
|
|
138
|
+
return StakeStatus.unwrap(_v) <= StakeStatus.unwrap(STAKE_STATUS_SLASHED);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
type OperatorType is uint8;
|
|
143
|
+
|
|
144
|
+
using {OperatorTypeLib.isValid} for OperatorType global;
|
|
145
|
+
|
|
146
|
+
library OperatorTypeLib {
|
|
147
|
+
OperatorType constant OPERATOR_TYPE_UNKNOWN = OperatorType.wrap(0);
|
|
148
|
+
OperatorType constant OPERATOR_TYPE_PRODUCER = OperatorType.wrap(1);
|
|
149
|
+
OperatorType constant OPERATOR_TYPE_BATCH = OperatorType.wrap(2);
|
|
150
|
+
OperatorType constant OPERATOR_TYPE_UNDERWRITER = OperatorType.wrap(3);
|
|
151
|
+
OperatorType constant OPERATOR_TYPE_CHALLENGER = OperatorType.wrap(4);
|
|
152
|
+
|
|
153
|
+
function isValid(OperatorType _v) internal pure returns (bool) {
|
|
154
|
+
return OperatorType.unwrap(_v) <= OperatorType.unwrap(OPERATOR_TYPE_CHALLENGER);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
type OperatorStatus is uint8;
|
|
159
|
+
|
|
160
|
+
using {OperatorStatusLib.isValid} for OperatorStatus global;
|
|
161
|
+
|
|
162
|
+
library OperatorStatusLib {
|
|
163
|
+
OperatorStatus constant OPERATOR_STATUS_UNKNOWN = OperatorStatus.wrap(0);
|
|
164
|
+
OperatorStatus constant OPERATOR_STATUS_WARMUP = OperatorStatus.wrap(1);
|
|
165
|
+
OperatorStatus constant OPERATOR_STATUS_COOLDOWN = OperatorStatus.wrap(2);
|
|
166
|
+
OperatorStatus constant OPERATOR_STATUS_ACTIVE = OperatorStatus.wrap(3);
|
|
167
|
+
OperatorStatus constant OPERATOR_STATUS_TERMINATED = OperatorStatus.wrap(240);
|
|
168
|
+
OperatorStatus constant OPERATOR_STATUS_SLASHED = OperatorStatus.wrap(241);
|
|
169
|
+
|
|
170
|
+
function isValid(OperatorStatus _v) internal pure returns (bool) {
|
|
171
|
+
return OperatorStatus.unwrap(_v) <= OperatorStatus.unwrap(OPERATOR_STATUS_SLASHED);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
9
175
|
struct ChainId {
|
|
10
|
-
|
|
176
|
+
ChainKind kind;
|
|
11
177
|
uint32 id;
|
|
12
178
|
}
|
|
13
179
|
|
|
14
180
|
struct ChainAddress {
|
|
15
|
-
|
|
181
|
+
ChainKind kind;
|
|
16
182
|
bytes address_;
|
|
17
183
|
}
|
|
18
184
|
|
|
19
185
|
struct ChainSignature {
|
|
20
186
|
ChainAddress actor;
|
|
21
|
-
|
|
187
|
+
ChainKeyType keyType;
|
|
22
188
|
bytes signature;
|
|
23
189
|
}
|
|
24
190
|
|
|
25
191
|
struct TokenAmount {
|
|
26
|
-
|
|
192
|
+
TokenKind kind;
|
|
27
193
|
int64 amount;
|
|
28
194
|
}
|
|
29
195
|
|
|
30
196
|
struct EncodingFlags {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
197
|
+
Endianness endianness;
|
|
198
|
+
HashAlgorithm hashAlgorithm;
|
|
199
|
+
LengthEncoding lengthEncoding;
|
|
34
200
|
}
|
|
35
201
|
|
|
36
202
|
library ChainIdCodec {
|
|
@@ -40,7 +206,7 @@ library ChainIdCodec {
|
|
|
40
206
|
|
|
41
207
|
// field 1: kind
|
|
42
208
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x8));
|
|
43
|
-
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(chainId.kind));
|
|
209
|
+
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(uint64(ChainKind.unwrap(chainId.kind))));
|
|
44
210
|
|
|
45
211
|
// field 2: id
|
|
46
212
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x10));
|
|
@@ -58,7 +224,9 @@ library ChainIdCodec {
|
|
|
58
224
|
(tag, pos) = ProtobufRuntime._decode_key(data, pos);
|
|
59
225
|
|
|
60
226
|
if (tag == 8) {
|
|
61
|
-
|
|
227
|
+
{ uint64 _v;
|
|
228
|
+
(_v, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
229
|
+
chainId.kind = ChainKind.wrap(uint8(_v)); }
|
|
62
230
|
} else if (tag == 16) {
|
|
63
231
|
{ uint64 _v;
|
|
64
232
|
(_v, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
@@ -77,7 +245,7 @@ library ChainAddressCodec {
|
|
|
77
245
|
|
|
78
246
|
// field 1: kind
|
|
79
247
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x8));
|
|
80
|
-
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(chainAddress.kind));
|
|
248
|
+
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(uint64(ChainKind.unwrap(chainAddress.kind))));
|
|
81
249
|
|
|
82
250
|
// field 2: address
|
|
83
251
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x12));
|
|
@@ -95,7 +263,9 @@ library ChainAddressCodec {
|
|
|
95
263
|
(tag, pos) = ProtobufRuntime._decode_key(data, pos);
|
|
96
264
|
|
|
97
265
|
if (tag == 8) {
|
|
98
|
-
|
|
266
|
+
{ uint64 _v;
|
|
267
|
+
(_v, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
268
|
+
chainAddress.kind = ChainKind.wrap(uint8(_v)); }
|
|
99
269
|
} else if (tag == 18) {
|
|
100
270
|
(chainAddress.address_, pos) = ProtobufRuntime._decode_bytes(data, pos);
|
|
101
271
|
} else {
|
|
@@ -118,7 +288,7 @@ library ChainSignatureCodec {
|
|
|
118
288
|
|
|
119
289
|
// field 2: key_type
|
|
120
290
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x10));
|
|
121
|
-
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(chainSignature.keyType));
|
|
291
|
+
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(uint64(ChainKeyType.unwrap(chainSignature.keyType))));
|
|
122
292
|
|
|
123
293
|
// field 3: signature
|
|
124
294
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x1a));
|
|
@@ -142,7 +312,9 @@ library ChainSignatureCodec {
|
|
|
142
312
|
chainSignature.actor = ChainAddressCodec.decode(_sub);
|
|
143
313
|
pos += uint256(_len);
|
|
144
314
|
} else if (tag == 16) {
|
|
145
|
-
|
|
315
|
+
{ uint64 _v;
|
|
316
|
+
(_v, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
317
|
+
chainSignature.keyType = ChainKeyType.wrap(uint8(_v)); }
|
|
146
318
|
} else if (tag == 26) {
|
|
147
319
|
(chainSignature.signature, pos) = ProtobufRuntime._decode_bytes(data, pos);
|
|
148
320
|
} else {
|
|
@@ -159,7 +331,7 @@ library TokenAmountCodec {
|
|
|
159
331
|
|
|
160
332
|
// field 1: kind
|
|
161
333
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x8));
|
|
162
|
-
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(tokenAmount.kind));
|
|
334
|
+
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(uint64(TokenKind.unwrap(tokenAmount.kind))));
|
|
163
335
|
|
|
164
336
|
// field 2: amount
|
|
165
337
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x10));
|
|
@@ -177,7 +349,9 @@ library TokenAmountCodec {
|
|
|
177
349
|
(tag, pos) = ProtobufRuntime._decode_key(data, pos);
|
|
178
350
|
|
|
179
351
|
if (tag == 8) {
|
|
180
|
-
|
|
352
|
+
{ uint64 _v;
|
|
353
|
+
(_v, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
354
|
+
tokenAmount.kind = TokenKind.wrap(uint16(_v)); }
|
|
181
355
|
} else if (tag == 16) {
|
|
182
356
|
{ uint64 _v;
|
|
183
357
|
(_v, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
@@ -196,15 +370,15 @@ library EncodingFlagsCodec {
|
|
|
196
370
|
|
|
197
371
|
// field 1: endianness
|
|
198
372
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x8));
|
|
199
|
-
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(encodingFlags.endianness));
|
|
373
|
+
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(uint64(Endianness.unwrap(encodingFlags.endianness))));
|
|
200
374
|
|
|
201
375
|
// field 2: hash_algorithm
|
|
202
376
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x10));
|
|
203
|
-
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(encodingFlags.hashAlgorithm));
|
|
377
|
+
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(uint64(HashAlgorithm.unwrap(encodingFlags.hashAlgorithm))));
|
|
204
378
|
|
|
205
379
|
// field 3: length_encoding
|
|
206
380
|
buf = abi.encodePacked(buf, ProtobufRuntime._encode_key(0x18));
|
|
207
|
-
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(encodingFlags.lengthEncoding));
|
|
381
|
+
buf = abi.encodePacked(buf, ProtobufRuntime._encode_varint(uint64(LengthEncoding.unwrap(encodingFlags.lengthEncoding))));
|
|
208
382
|
|
|
209
383
|
return buf;
|
|
210
384
|
}
|
|
@@ -218,11 +392,17 @@ library EncodingFlagsCodec {
|
|
|
218
392
|
(tag, pos) = ProtobufRuntime._decode_key(data, pos);
|
|
219
393
|
|
|
220
394
|
if (tag == 8) {
|
|
221
|
-
|
|
395
|
+
{ uint64 _v;
|
|
396
|
+
(_v, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
397
|
+
encodingFlags.endianness = Endianness.wrap(uint8(_v)); }
|
|
222
398
|
} else if (tag == 16) {
|
|
223
|
-
|
|
399
|
+
{ uint64 _v;
|
|
400
|
+
(_v, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
401
|
+
encodingFlags.hashAlgorithm = HashAlgorithm.wrap(uint8(_v)); }
|
|
224
402
|
} else if (tag == 24) {
|
|
225
|
-
|
|
403
|
+
{ uint64 _v;
|
|
404
|
+
(_v, pos) = ProtobufRuntime._decode_varint(data, pos);
|
|
405
|
+
encodingFlags.lengthEncoding = LengthEncoding.wrap(uint8(_v)); }
|
|
226
406
|
} else {
|
|
227
407
|
pos = ProtobufRuntime._skip_field(data, pos, tag & 0x07);
|
|
228
408
|
}
|
package/package.json
CHANGED
|
@@ -148,31 +148,43 @@ export declare enum TokenKind {
|
|
|
148
148
|
*
|
|
149
149
|
* @generated from protobuf enum value: TOKEN_KIND_WIRE = 0;
|
|
150
150
|
*/
|
|
151
|
-
|
|
151
|
+
TOKEN_KIND_WIRE = 0,
|
|
152
152
|
/**
|
|
153
153
|
* 0x0100
|
|
154
154
|
*
|
|
155
155
|
* @generated from protobuf enum value: TOKEN_KIND_ETH = 256;
|
|
156
156
|
*/
|
|
157
|
-
|
|
157
|
+
TOKEN_KIND_ETH = 256,
|
|
158
|
+
/**
|
|
159
|
+
* 0x0101
|
|
160
|
+
*
|
|
161
|
+
* @generated from protobuf enum value: TOKEN_KIND_ERC721 = 257;
|
|
162
|
+
*/
|
|
163
|
+
TOKEN_KIND_ERC721 = 257,
|
|
164
|
+
/**
|
|
165
|
+
* 0x0102
|
|
166
|
+
*
|
|
167
|
+
* @generated from protobuf enum value: TOKEN_KIND_ERC1155 = 258;
|
|
168
|
+
*/
|
|
169
|
+
TOKEN_KIND_ERC1155 = 258,
|
|
158
170
|
/**
|
|
159
171
|
* 0x01F0
|
|
160
172
|
*
|
|
161
|
-
* @generated from protobuf enum value:
|
|
173
|
+
* @generated from protobuf enum value: TOKTOKEN_KIND_LIQETH = 496;
|
|
162
174
|
*/
|
|
163
|
-
|
|
175
|
+
TOKTOKEN_KIND_LIQETH = 496,
|
|
164
176
|
/**
|
|
165
177
|
* 0x0200
|
|
166
178
|
*
|
|
167
179
|
* @generated from protobuf enum value: TOKEN_KIND_SOL = 512;
|
|
168
180
|
*/
|
|
169
|
-
|
|
181
|
+
TOKEN_KIND_SOL = 512,
|
|
170
182
|
/**
|
|
171
183
|
* 0x02F0
|
|
172
184
|
*
|
|
173
185
|
* @generated from protobuf enum value: TOKEN_KIND_LIQSOL = 752;
|
|
174
186
|
*/
|
|
175
|
-
|
|
187
|
+
TOKEN_KIND_LIQSOL = 752
|
|
176
188
|
}
|
|
177
189
|
/**
|
|
178
190
|
* @generated from protobuf enum sysio.opp.types.Endianness
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD;;GAEG;AACH,MAAM,WAAW,OAAO;IACpB;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACd;AACD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;OAEG;IACH,OAAO,EAAE,UAAU,CAAC;CACvB;AACD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC;IACtB;;OAEG;IACH,SAAS,EAAE,UAAU,CAAC;CACzB;AACD;;;;GAIG;AACH,MAAM,WAAW,WAAW;IACxB;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAClB;AACD;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC;IACvB;;OAEG;IACH,aAAa,EAAE,aAAa,CAAC;IAC7B;;OAEG;IACH,cAAc,EAAE,cAAc,CAAC;CAClC;AAKD;;GAEG;AACH,oBAAY,SAAS;IACjB;;OAEG;IACH,OAAO,IAAI;IACX;;OAEG;IACH,IAAI,IAAI;IACR;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,MAAM,IAAI;IACV;;OAEG;IACH,GAAG,IAAI;CACV;AACD;;GAEG;AACH,oBAAY,YAAY;IACpB;;OAEG;IACH,OAAO,IAAI;IACX;;OAEG;IACH,IAAI,IAAI;IACR;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,MAAM,IAAI;IACV;;OAEG;IACH,GAAG,IAAI;CACV;AACD;;;;GAIG;AACH,oBAAY,SAAS;IACjB;;;;OAIG;IACH,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,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AAC,aAAa,CAAC;;IAQvD,MAAM,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,GAAG,aAAa;IAS5D,kBAAkB,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,aAAa,GAAG,aAAa;IAyB5H,mBAAmB,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,kBAAkB,GAAG,aAAa;CAejH;AACD;;GAEG;AACH,eAAO,MAAM,aAAa,oBAA2B,CAAC"}
|
package/sysio/opp/types/types.js
CHANGED
|
@@ -73,31 +73,43 @@ export var TokenKind;
|
|
|
73
73
|
*
|
|
74
74
|
* @generated from protobuf enum value: TOKEN_KIND_WIRE = 0;
|
|
75
75
|
*/
|
|
76
|
-
TokenKind[TokenKind["
|
|
76
|
+
TokenKind[TokenKind["TOKEN_KIND_WIRE"] = 0] = "TOKEN_KIND_WIRE";
|
|
77
77
|
/**
|
|
78
78
|
* 0x0100
|
|
79
79
|
*
|
|
80
80
|
* @generated from protobuf enum value: TOKEN_KIND_ETH = 256;
|
|
81
81
|
*/
|
|
82
|
-
TokenKind[TokenKind["
|
|
82
|
+
TokenKind[TokenKind["TOKEN_KIND_ETH"] = 256] = "TOKEN_KIND_ETH";
|
|
83
|
+
/**
|
|
84
|
+
* 0x0101
|
|
85
|
+
*
|
|
86
|
+
* @generated from protobuf enum value: TOKEN_KIND_ERC721 = 257;
|
|
87
|
+
*/
|
|
88
|
+
TokenKind[TokenKind["TOKEN_KIND_ERC721"] = 257] = "TOKEN_KIND_ERC721";
|
|
89
|
+
/**
|
|
90
|
+
* 0x0102
|
|
91
|
+
*
|
|
92
|
+
* @generated from protobuf enum value: TOKEN_KIND_ERC1155 = 258;
|
|
93
|
+
*/
|
|
94
|
+
TokenKind[TokenKind["TOKEN_KIND_ERC1155"] = 258] = "TOKEN_KIND_ERC1155";
|
|
83
95
|
/**
|
|
84
96
|
* 0x01F0
|
|
85
97
|
*
|
|
86
|
-
* @generated from protobuf enum value:
|
|
98
|
+
* @generated from protobuf enum value: TOKTOKEN_KIND_LIQETH = 496;
|
|
87
99
|
*/
|
|
88
|
-
TokenKind[TokenKind["
|
|
100
|
+
TokenKind[TokenKind["TOKTOKEN_KIND_LIQETH"] = 496] = "TOKTOKEN_KIND_LIQETH";
|
|
89
101
|
/**
|
|
90
102
|
* 0x0200
|
|
91
103
|
*
|
|
92
104
|
* @generated from protobuf enum value: TOKEN_KIND_SOL = 512;
|
|
93
105
|
*/
|
|
94
|
-
TokenKind[TokenKind["
|
|
106
|
+
TokenKind[TokenKind["TOKEN_KIND_SOL"] = 512] = "TOKEN_KIND_SOL";
|
|
95
107
|
/**
|
|
96
108
|
* 0x02F0
|
|
97
109
|
*
|
|
98
110
|
* @generated from protobuf enum value: TOKEN_KIND_LIQSOL = 752;
|
|
99
111
|
*/
|
|
100
|
-
TokenKind[TokenKind["
|
|
112
|
+
TokenKind[TokenKind["TOKEN_KIND_LIQSOL"] = 752] = "TOKEN_KIND_LIQSOL";
|
|
101
113
|
})(TokenKind || (TokenKind = {}));
|
|
102
114
|
// ---------------------------------------------------------------------------
|
|
103
115
|
// Encoding flags (originally a single uint8 bitfield)
|
|
@@ -550,7 +562,7 @@ export const ChainSignature = new ChainSignature$Type();
|
|
|
550
562
|
class TokenAmount$Type extends MessageType {
|
|
551
563
|
constructor() {
|
|
552
564
|
super("sysio.opp.types.TokenAmount", [
|
|
553
|
-
{ no: 1, name: "kind", kind: "enum", T: () => ["sysio.opp.types.TokenKind", TokenKind
|
|
565
|
+
{ no: 1, name: "kind", kind: "enum", T: () => ["sysio.opp.types.TokenKind", TokenKind] },
|
|
554
566
|
{ no: 2, name: "amount", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
|
|
555
567
|
]);
|
|
556
568
|
}
|
package/sysio/opp/types/types.ts
CHANGED
|
@@ -158,31 +158,43 @@ export enum TokenKind {
|
|
|
158
158
|
*
|
|
159
159
|
* @generated from protobuf enum value: TOKEN_KIND_WIRE = 0;
|
|
160
160
|
*/
|
|
161
|
-
|
|
161
|
+
TOKEN_KIND_WIRE = 0,
|
|
162
162
|
/**
|
|
163
163
|
* 0x0100
|
|
164
164
|
*
|
|
165
165
|
* @generated from protobuf enum value: TOKEN_KIND_ETH = 256;
|
|
166
166
|
*/
|
|
167
|
-
|
|
167
|
+
TOKEN_KIND_ETH = 256,
|
|
168
|
+
/**
|
|
169
|
+
* 0x0101
|
|
170
|
+
*
|
|
171
|
+
* @generated from protobuf enum value: TOKEN_KIND_ERC721 = 257;
|
|
172
|
+
*/
|
|
173
|
+
TOKEN_KIND_ERC721 = 257,
|
|
174
|
+
/**
|
|
175
|
+
* 0x0102
|
|
176
|
+
*
|
|
177
|
+
* @generated from protobuf enum value: TOKEN_KIND_ERC1155 = 258;
|
|
178
|
+
*/
|
|
179
|
+
TOKEN_KIND_ERC1155 = 258,
|
|
168
180
|
/**
|
|
169
181
|
* 0x01F0
|
|
170
182
|
*
|
|
171
|
-
* @generated from protobuf enum value:
|
|
183
|
+
* @generated from protobuf enum value: TOKTOKEN_KIND_LIQETH = 496;
|
|
172
184
|
*/
|
|
173
|
-
|
|
185
|
+
TOKTOKEN_KIND_LIQETH = 496,
|
|
174
186
|
/**
|
|
175
187
|
* 0x0200
|
|
176
188
|
*
|
|
177
189
|
* @generated from protobuf enum value: TOKEN_KIND_SOL = 512;
|
|
178
190
|
*/
|
|
179
|
-
|
|
191
|
+
TOKEN_KIND_SOL = 512,
|
|
180
192
|
/**
|
|
181
193
|
* 0x02F0
|
|
182
194
|
*
|
|
183
195
|
* @generated from protobuf enum value: TOKEN_KIND_LIQSOL = 752;
|
|
184
196
|
*/
|
|
185
|
-
|
|
197
|
+
TOKEN_KIND_LIQSOL = 752
|
|
186
198
|
}
|
|
187
199
|
// ---------------------------------------------------------------------------
|
|
188
200
|
// Encoding flags (originally a single uint8 bitfield)
|
|
@@ -631,7 +643,7 @@ export const ChainSignature = new ChainSignature$Type();
|
|
|
631
643
|
class TokenAmount$Type extends MessageType<TokenAmount> {
|
|
632
644
|
constructor() {
|
|
633
645
|
super("sysio.opp.types.TokenAmount", [
|
|
634
|
-
{ no: 1, name: "kind", kind: "enum", T: () => ["sysio.opp.types.TokenKind", TokenKind
|
|
646
|
+
{ no: 1, name: "kind", kind: "enum", T: () => ["sysio.opp.types.TokenKind", TokenKind] },
|
|
635
647
|
{ no: 2, name: "amount", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }
|
|
636
648
|
]);
|
|
637
649
|
}
|