@ton-agent-kit/plugin-escrow 1.0.3 → 1.1.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/package.json +1 -1
- package/src/actions/auto-release-escrow.ts +72 -0
- package/src/actions/claim-reward.ts +48 -0
- package/src/actions/confirm-delivery.ts +60 -0
- package/src/actions/create-escrow.ts +44 -26
- package/src/actions/fallback-settle.ts +51 -0
- package/src/actions/get-escrow-info.ts +22 -4
- package/src/actions/join-dispute.ts +56 -0
- package/src/actions/open-dispute.ts +56 -0
- package/src/actions/refund-escrow.ts +31 -0
- package/src/actions/release-escrow.ts +30 -0
- package/src/actions/seller-stake.ts +69 -0
- package/src/actions/vote-refund.ts +50 -0
- package/src/actions/vote-release.ts +50 -0
- package/src/contracts/Escrow_Escrow.code.boc +0 -0
- package/src/contracts/Escrow_Escrow.ts +887 -37
- package/src/index.ts +60 -6
- package/src/utils.ts +75 -84
|
@@ -1003,15 +1003,536 @@ export function dictValueParserRefund(): DictionaryValue<Refund> {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
1005
|
|
|
1006
|
+
export type DeliveryConfirmed = {
|
|
1007
|
+
$$type: 'DeliveryConfirmed';
|
|
1008
|
+
x402TxHash: string;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
export function storeDeliveryConfirmed(src: DeliveryConfirmed) {
|
|
1012
|
+
return (builder: Builder) => {
|
|
1013
|
+
const b_0 = builder;
|
|
1014
|
+
b_0.storeUint(3537337858, 32);
|
|
1015
|
+
b_0.storeStringRefTail(src.x402TxHash);
|
|
1016
|
+
};
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
export function loadDeliveryConfirmed(slice: Slice) {
|
|
1020
|
+
const sc_0 = slice;
|
|
1021
|
+
if (sc_0.loadUint(32) !== 3537337858) { throw Error('Invalid prefix'); }
|
|
1022
|
+
const _x402TxHash = sc_0.loadStringRefTail();
|
|
1023
|
+
return { $$type: 'DeliveryConfirmed' as const, x402TxHash: _x402TxHash };
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
export function loadTupleDeliveryConfirmed(source: TupleReader) {
|
|
1027
|
+
const _x402TxHash = source.readString();
|
|
1028
|
+
return { $$type: 'DeliveryConfirmed' as const, x402TxHash: _x402TxHash };
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
export function loadGetterTupleDeliveryConfirmed(source: TupleReader) {
|
|
1032
|
+
const _x402TxHash = source.readString();
|
|
1033
|
+
return { $$type: 'DeliveryConfirmed' as const, x402TxHash: _x402TxHash };
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
export function storeTupleDeliveryConfirmed(source: DeliveryConfirmed) {
|
|
1037
|
+
const builder = new TupleBuilder();
|
|
1038
|
+
builder.writeString(source.x402TxHash);
|
|
1039
|
+
return builder.build();
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
export function dictValueParserDeliveryConfirmed(): DictionaryValue<DeliveryConfirmed> {
|
|
1043
|
+
return {
|
|
1044
|
+
serialize: (src, builder) => {
|
|
1045
|
+
builder.storeRef(beginCell().store(storeDeliveryConfirmed(src)).endCell());
|
|
1046
|
+
},
|
|
1047
|
+
parse: (src) => {
|
|
1048
|
+
return loadDeliveryConfirmed(src.loadRef().beginParse());
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
export type AutoRelease = {
|
|
1054
|
+
$$type: 'AutoRelease';
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
export function storeAutoRelease(src: AutoRelease) {
|
|
1058
|
+
return (builder: Builder) => {
|
|
1059
|
+
const b_0 = builder;
|
|
1060
|
+
b_0.storeUint(1179475699, 32);
|
|
1061
|
+
};
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
export function loadAutoRelease(slice: Slice) {
|
|
1065
|
+
const sc_0 = slice;
|
|
1066
|
+
if (sc_0.loadUint(32) !== 1179475699) { throw Error('Invalid prefix'); }
|
|
1067
|
+
return { $$type: 'AutoRelease' as const };
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
export function loadTupleAutoRelease(source: TupleReader) {
|
|
1071
|
+
return { $$type: 'AutoRelease' as const };
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
export function loadGetterTupleAutoRelease(source: TupleReader) {
|
|
1075
|
+
return { $$type: 'AutoRelease' as const };
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
export function storeTupleAutoRelease(source: AutoRelease) {
|
|
1079
|
+
const builder = new TupleBuilder();
|
|
1080
|
+
return builder.build();
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
export function dictValueParserAutoRelease(): DictionaryValue<AutoRelease> {
|
|
1084
|
+
return {
|
|
1085
|
+
serialize: (src, builder) => {
|
|
1086
|
+
builder.storeRef(beginCell().store(storeAutoRelease(src)).endCell());
|
|
1087
|
+
},
|
|
1088
|
+
parse: (src) => {
|
|
1089
|
+
return loadAutoRelease(src.loadRef().beginParse());
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
export type OpenDispute = {
|
|
1095
|
+
$$type: 'OpenDispute';
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
export function storeOpenDispute(src: OpenDispute) {
|
|
1099
|
+
return (builder: Builder) => {
|
|
1100
|
+
const b_0 = builder;
|
|
1101
|
+
b_0.storeUint(2663435750, 32);
|
|
1102
|
+
};
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
export function loadOpenDispute(slice: Slice) {
|
|
1106
|
+
const sc_0 = slice;
|
|
1107
|
+
if (sc_0.loadUint(32) !== 2663435750) { throw Error('Invalid prefix'); }
|
|
1108
|
+
return { $$type: 'OpenDispute' as const };
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
export function loadTupleOpenDispute(source: TupleReader) {
|
|
1112
|
+
return { $$type: 'OpenDispute' as const };
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
export function loadGetterTupleOpenDispute(source: TupleReader) {
|
|
1116
|
+
return { $$type: 'OpenDispute' as const };
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
export function storeTupleOpenDispute(source: OpenDispute) {
|
|
1120
|
+
const builder = new TupleBuilder();
|
|
1121
|
+
return builder.build();
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
export function dictValueParserOpenDispute(): DictionaryValue<OpenDispute> {
|
|
1125
|
+
return {
|
|
1126
|
+
serialize: (src, builder) => {
|
|
1127
|
+
builder.storeRef(beginCell().store(storeOpenDispute(src)).endCell());
|
|
1128
|
+
},
|
|
1129
|
+
parse: (src) => {
|
|
1130
|
+
return loadOpenDispute(src.loadRef().beginParse());
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
export type JoinDispute = {
|
|
1136
|
+
$$type: 'JoinDispute';
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
export function storeJoinDispute(src: JoinDispute) {
|
|
1140
|
+
return (builder: Builder) => {
|
|
1141
|
+
const b_0 = builder;
|
|
1142
|
+
b_0.storeUint(3263842436, 32);
|
|
1143
|
+
};
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
export function loadJoinDispute(slice: Slice) {
|
|
1147
|
+
const sc_0 = slice;
|
|
1148
|
+
if (sc_0.loadUint(32) !== 3263842436) { throw Error('Invalid prefix'); }
|
|
1149
|
+
return { $$type: 'JoinDispute' as const };
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
export function loadTupleJoinDispute(source: TupleReader) {
|
|
1153
|
+
return { $$type: 'JoinDispute' as const };
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
export function loadGetterTupleJoinDispute(source: TupleReader) {
|
|
1157
|
+
return { $$type: 'JoinDispute' as const };
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
export function storeTupleJoinDispute(source: JoinDispute) {
|
|
1161
|
+
const builder = new TupleBuilder();
|
|
1162
|
+
return builder.build();
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
export function dictValueParserJoinDispute(): DictionaryValue<JoinDispute> {
|
|
1166
|
+
return {
|
|
1167
|
+
serialize: (src, builder) => {
|
|
1168
|
+
builder.storeRef(beginCell().store(storeJoinDispute(src)).endCell());
|
|
1169
|
+
},
|
|
1170
|
+
parse: (src) => {
|
|
1171
|
+
return loadJoinDispute(src.loadRef().beginParse());
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
export type VoteRelease = {
|
|
1177
|
+
$$type: 'VoteRelease';
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
export function storeVoteRelease(src: VoteRelease) {
|
|
1181
|
+
return (builder: Builder) => {
|
|
1182
|
+
const b_0 = builder;
|
|
1183
|
+
b_0.storeUint(44752475, 32);
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
export function loadVoteRelease(slice: Slice) {
|
|
1188
|
+
const sc_0 = slice;
|
|
1189
|
+
if (sc_0.loadUint(32) !== 44752475) { throw Error('Invalid prefix'); }
|
|
1190
|
+
return { $$type: 'VoteRelease' as const };
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
export function loadTupleVoteRelease(source: TupleReader) {
|
|
1194
|
+
return { $$type: 'VoteRelease' as const };
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
export function loadGetterTupleVoteRelease(source: TupleReader) {
|
|
1198
|
+
return { $$type: 'VoteRelease' as const };
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
export function storeTupleVoteRelease(source: VoteRelease) {
|
|
1202
|
+
const builder = new TupleBuilder();
|
|
1203
|
+
return builder.build();
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
export function dictValueParserVoteRelease(): DictionaryValue<VoteRelease> {
|
|
1207
|
+
return {
|
|
1208
|
+
serialize: (src, builder) => {
|
|
1209
|
+
builder.storeRef(beginCell().store(storeVoteRelease(src)).endCell());
|
|
1210
|
+
},
|
|
1211
|
+
parse: (src) => {
|
|
1212
|
+
return loadVoteRelease(src.loadRef().beginParse());
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
export type VoteRefund = {
|
|
1218
|
+
$$type: 'VoteRefund';
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
export function storeVoteRefund(src: VoteRefund) {
|
|
1222
|
+
return (builder: Builder) => {
|
|
1223
|
+
const b_0 = builder;
|
|
1224
|
+
b_0.storeUint(1287417331, 32);
|
|
1225
|
+
};
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
export function loadVoteRefund(slice: Slice) {
|
|
1229
|
+
const sc_0 = slice;
|
|
1230
|
+
if (sc_0.loadUint(32) !== 1287417331) { throw Error('Invalid prefix'); }
|
|
1231
|
+
return { $$type: 'VoteRefund' as const };
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
export function loadTupleVoteRefund(source: TupleReader) {
|
|
1235
|
+
return { $$type: 'VoteRefund' as const };
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
export function loadGetterTupleVoteRefund(source: TupleReader) {
|
|
1239
|
+
return { $$type: 'VoteRefund' as const };
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
export function storeTupleVoteRefund(source: VoteRefund) {
|
|
1243
|
+
const builder = new TupleBuilder();
|
|
1244
|
+
return builder.build();
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
export function dictValueParserVoteRefund(): DictionaryValue<VoteRefund> {
|
|
1248
|
+
return {
|
|
1249
|
+
serialize: (src, builder) => {
|
|
1250
|
+
builder.storeRef(beginCell().store(storeVoteRefund(src)).endCell());
|
|
1251
|
+
},
|
|
1252
|
+
parse: (src) => {
|
|
1253
|
+
return loadVoteRefund(src.loadRef().beginParse());
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
export type ClaimReward = {
|
|
1259
|
+
$$type: 'ClaimReward';
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
export function storeClaimReward(src: ClaimReward) {
|
|
1263
|
+
return (builder: Builder) => {
|
|
1264
|
+
const b_0 = builder;
|
|
1265
|
+
b_0.storeUint(2151883269, 32);
|
|
1266
|
+
};
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
export function loadClaimReward(slice: Slice) {
|
|
1270
|
+
const sc_0 = slice;
|
|
1271
|
+
if (sc_0.loadUint(32) !== 2151883269) { throw Error('Invalid prefix'); }
|
|
1272
|
+
return { $$type: 'ClaimReward' as const };
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
export function loadTupleClaimReward(source: TupleReader) {
|
|
1276
|
+
return { $$type: 'ClaimReward' as const };
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
export function loadGetterTupleClaimReward(source: TupleReader) {
|
|
1280
|
+
return { $$type: 'ClaimReward' as const };
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
export function storeTupleClaimReward(source: ClaimReward) {
|
|
1284
|
+
const builder = new TupleBuilder();
|
|
1285
|
+
return builder.build();
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
export function dictValueParserClaimReward(): DictionaryValue<ClaimReward> {
|
|
1289
|
+
return {
|
|
1290
|
+
serialize: (src, builder) => {
|
|
1291
|
+
builder.storeRef(beginCell().store(storeClaimReward(src)).endCell());
|
|
1292
|
+
},
|
|
1293
|
+
parse: (src) => {
|
|
1294
|
+
return loadClaimReward(src.loadRef().beginParse());
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
export type FallbackSettle = {
|
|
1300
|
+
$$type: 'FallbackSettle';
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
export function storeFallbackSettle(src: FallbackSettle) {
|
|
1304
|
+
return (builder: Builder) => {
|
|
1305
|
+
const b_0 = builder;
|
|
1306
|
+
b_0.storeUint(3702460484, 32);
|
|
1307
|
+
};
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
export function loadFallbackSettle(slice: Slice) {
|
|
1311
|
+
const sc_0 = slice;
|
|
1312
|
+
if (sc_0.loadUint(32) !== 3702460484) { throw Error('Invalid prefix'); }
|
|
1313
|
+
return { $$type: 'FallbackSettle' as const };
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
export function loadTupleFallbackSettle(source: TupleReader) {
|
|
1317
|
+
return { $$type: 'FallbackSettle' as const };
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
export function loadGetterTupleFallbackSettle(source: TupleReader) {
|
|
1321
|
+
return { $$type: 'FallbackSettle' as const };
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
export function storeTupleFallbackSettle(source: FallbackSettle) {
|
|
1325
|
+
const builder = new TupleBuilder();
|
|
1326
|
+
return builder.build();
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
export function dictValueParserFallbackSettle(): DictionaryValue<FallbackSettle> {
|
|
1330
|
+
return {
|
|
1331
|
+
serialize: (src, builder) => {
|
|
1332
|
+
builder.storeRef(beginCell().store(storeFallbackSettle(src)).endCell());
|
|
1333
|
+
},
|
|
1334
|
+
parse: (src) => {
|
|
1335
|
+
return loadFallbackSettle(src.loadRef().beginParse());
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
export type SellerStake = {
|
|
1341
|
+
$$type: 'SellerStake';
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
export function storeSellerStake(src: SellerStake) {
|
|
1345
|
+
return (builder: Builder) => {
|
|
1346
|
+
const b_0 = builder;
|
|
1347
|
+
b_0.storeUint(4053763055, 32);
|
|
1348
|
+
};
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
export function loadSellerStake(slice: Slice) {
|
|
1352
|
+
const sc_0 = slice;
|
|
1353
|
+
if (sc_0.loadUint(32) !== 4053763055) { throw Error('Invalid prefix'); }
|
|
1354
|
+
return { $$type: 'SellerStake' as const };
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
export function loadTupleSellerStake(source: TupleReader) {
|
|
1358
|
+
return { $$type: 'SellerStake' as const };
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
export function loadGetterTupleSellerStake(source: TupleReader) {
|
|
1362
|
+
return { $$type: 'SellerStake' as const };
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
export function storeTupleSellerStake(source: SellerStake) {
|
|
1366
|
+
const builder = new TupleBuilder();
|
|
1367
|
+
return builder.build();
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
export function dictValueParserSellerStake(): DictionaryValue<SellerStake> {
|
|
1371
|
+
return {
|
|
1372
|
+
serialize: (src, builder) => {
|
|
1373
|
+
builder.storeRef(beginCell().store(storeSellerStake(src)).endCell());
|
|
1374
|
+
},
|
|
1375
|
+
parse: (src) => {
|
|
1376
|
+
return loadSellerStake(src.loadRef().beginParse());
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
export type NotifyDisputeOpened = {
|
|
1382
|
+
$$type: 'NotifyDisputeOpened';
|
|
1383
|
+
escrowAddress: Address;
|
|
1384
|
+
depositor: Address;
|
|
1385
|
+
beneficiary: Address;
|
|
1386
|
+
amount: bigint;
|
|
1387
|
+
votingDeadline: bigint;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
export function storeNotifyDisputeOpened(src: NotifyDisputeOpened) {
|
|
1391
|
+
return (builder: Builder) => {
|
|
1392
|
+
const b_0 = builder;
|
|
1393
|
+
b_0.storeUint(796807257, 32);
|
|
1394
|
+
b_0.storeAddress(src.escrowAddress);
|
|
1395
|
+
b_0.storeAddress(src.depositor);
|
|
1396
|
+
b_0.storeAddress(src.beneficiary);
|
|
1397
|
+
b_0.storeCoins(src.amount);
|
|
1398
|
+
b_0.storeUint(src.votingDeadline, 32);
|
|
1399
|
+
};
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
export function loadNotifyDisputeOpened(slice: Slice) {
|
|
1403
|
+
const sc_0 = slice;
|
|
1404
|
+
if (sc_0.loadUint(32) !== 796807257) { throw Error('Invalid prefix'); }
|
|
1405
|
+
const _escrowAddress = sc_0.loadAddress();
|
|
1406
|
+
const _depositor = sc_0.loadAddress();
|
|
1407
|
+
const _beneficiary = sc_0.loadAddress();
|
|
1408
|
+
const _amount = sc_0.loadCoins();
|
|
1409
|
+
const _votingDeadline = sc_0.loadUintBig(32);
|
|
1410
|
+
return { $$type: 'NotifyDisputeOpened' as const, escrowAddress: _escrowAddress, depositor: _depositor, beneficiary: _beneficiary, amount: _amount, votingDeadline: _votingDeadline };
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
export function loadTupleNotifyDisputeOpened(source: TupleReader) {
|
|
1414
|
+
const _escrowAddress = source.readAddress();
|
|
1415
|
+
const _depositor = source.readAddress();
|
|
1416
|
+
const _beneficiary = source.readAddress();
|
|
1417
|
+
const _amount = source.readBigNumber();
|
|
1418
|
+
const _votingDeadline = source.readBigNumber();
|
|
1419
|
+
return { $$type: 'NotifyDisputeOpened' as const, escrowAddress: _escrowAddress, depositor: _depositor, beneficiary: _beneficiary, amount: _amount, votingDeadline: _votingDeadline };
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
export function loadGetterTupleNotifyDisputeOpened(source: TupleReader) {
|
|
1423
|
+
const _escrowAddress = source.readAddress();
|
|
1424
|
+
const _depositor = source.readAddress();
|
|
1425
|
+
const _beneficiary = source.readAddress();
|
|
1426
|
+
const _amount = source.readBigNumber();
|
|
1427
|
+
const _votingDeadline = source.readBigNumber();
|
|
1428
|
+
return { $$type: 'NotifyDisputeOpened' as const, escrowAddress: _escrowAddress, depositor: _depositor, beneficiary: _beneficiary, amount: _amount, votingDeadline: _votingDeadline };
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
export function storeTupleNotifyDisputeOpened(source: NotifyDisputeOpened) {
|
|
1432
|
+
const builder = new TupleBuilder();
|
|
1433
|
+
builder.writeAddress(source.escrowAddress);
|
|
1434
|
+
builder.writeAddress(source.depositor);
|
|
1435
|
+
builder.writeAddress(source.beneficiary);
|
|
1436
|
+
builder.writeNumber(source.amount);
|
|
1437
|
+
builder.writeNumber(source.votingDeadline);
|
|
1438
|
+
return builder.build();
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
export function dictValueParserNotifyDisputeOpened(): DictionaryValue<NotifyDisputeOpened> {
|
|
1442
|
+
return {
|
|
1443
|
+
serialize: (src, builder) => {
|
|
1444
|
+
builder.storeRef(beginCell().store(storeNotifyDisputeOpened(src)).endCell());
|
|
1445
|
+
},
|
|
1446
|
+
parse: (src) => {
|
|
1447
|
+
return loadNotifyDisputeOpened(src.loadRef().beginParse());
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
export type NotifyDisputeSettled = {
|
|
1453
|
+
$$type: 'NotifyDisputeSettled';
|
|
1454
|
+
escrowAddress: Address;
|
|
1455
|
+
released: boolean;
|
|
1456
|
+
refunded: boolean;
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
export function storeNotifyDisputeSettled(src: NotifyDisputeSettled) {
|
|
1460
|
+
return (builder: Builder) => {
|
|
1461
|
+
const b_0 = builder;
|
|
1462
|
+
b_0.storeUint(3214956934, 32);
|
|
1463
|
+
b_0.storeAddress(src.escrowAddress);
|
|
1464
|
+
b_0.storeBit(src.released);
|
|
1465
|
+
b_0.storeBit(src.refunded);
|
|
1466
|
+
};
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
export function loadNotifyDisputeSettled(slice: Slice) {
|
|
1470
|
+
const sc_0 = slice;
|
|
1471
|
+
if (sc_0.loadUint(32) !== 3214956934) { throw Error('Invalid prefix'); }
|
|
1472
|
+
const _escrowAddress = sc_0.loadAddress();
|
|
1473
|
+
const _released = sc_0.loadBit();
|
|
1474
|
+
const _refunded = sc_0.loadBit();
|
|
1475
|
+
return { $$type: 'NotifyDisputeSettled' as const, escrowAddress: _escrowAddress, released: _released, refunded: _refunded };
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
export function loadTupleNotifyDisputeSettled(source: TupleReader) {
|
|
1479
|
+
const _escrowAddress = source.readAddress();
|
|
1480
|
+
const _released = source.readBoolean();
|
|
1481
|
+
const _refunded = source.readBoolean();
|
|
1482
|
+
return { $$type: 'NotifyDisputeSettled' as const, escrowAddress: _escrowAddress, released: _released, refunded: _refunded };
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
export function loadGetterTupleNotifyDisputeSettled(source: TupleReader) {
|
|
1486
|
+
const _escrowAddress = source.readAddress();
|
|
1487
|
+
const _released = source.readBoolean();
|
|
1488
|
+
const _refunded = source.readBoolean();
|
|
1489
|
+
return { $$type: 'NotifyDisputeSettled' as const, escrowAddress: _escrowAddress, released: _released, refunded: _refunded };
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
export function storeTupleNotifyDisputeSettled(source: NotifyDisputeSettled) {
|
|
1493
|
+
const builder = new TupleBuilder();
|
|
1494
|
+
builder.writeAddress(source.escrowAddress);
|
|
1495
|
+
builder.writeBoolean(source.released);
|
|
1496
|
+
builder.writeBoolean(source.refunded);
|
|
1497
|
+
return builder.build();
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
export function dictValueParserNotifyDisputeSettled(): DictionaryValue<NotifyDisputeSettled> {
|
|
1501
|
+
return {
|
|
1502
|
+
serialize: (src, builder) => {
|
|
1503
|
+
builder.storeRef(beginCell().store(storeNotifyDisputeSettled(src)).endCell());
|
|
1504
|
+
},
|
|
1505
|
+
parse: (src) => {
|
|
1506
|
+
return loadNotifyDisputeSettled(src.loadRef().beginParse());
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1006
1511
|
export type EscrowData = {
|
|
1007
1512
|
$$type: 'EscrowData';
|
|
1008
1513
|
depositor: Address;
|
|
1009
1514
|
beneficiary: Address;
|
|
1010
|
-
|
|
1515
|
+
reputationContract: Address;
|
|
1011
1516
|
amount: bigint;
|
|
1012
1517
|
deadline: bigint;
|
|
1013
1518
|
released: boolean;
|
|
1014
1519
|
refunded: boolean;
|
|
1520
|
+
deliveryConfirmed: boolean;
|
|
1521
|
+
disputed: boolean;
|
|
1522
|
+
votingDeadline: bigint;
|
|
1523
|
+
arbiterCount: bigint;
|
|
1524
|
+
votesRelease: bigint;
|
|
1525
|
+
votesRefund: bigint;
|
|
1526
|
+
minArbiters: bigint;
|
|
1527
|
+
minStake: bigint;
|
|
1528
|
+
sellerStake: bigint;
|
|
1529
|
+
sellerStaked: boolean;
|
|
1530
|
+
requireSellerStake: boolean;
|
|
1531
|
+
baseSellerStake: bigint;
|
|
1532
|
+
requireRepCollateral: boolean;
|
|
1533
|
+
minRepScore: bigint;
|
|
1534
|
+
autoReleaseAvailable: boolean;
|
|
1535
|
+
refundAvailable: boolean;
|
|
1015
1536
|
}
|
|
1016
1537
|
|
|
1017
1538
|
export function storeEscrowData(src: EscrowData) {
|
|
@@ -1019,11 +1540,29 @@ export function storeEscrowData(src: EscrowData) {
|
|
|
1019
1540
|
const b_0 = builder;
|
|
1020
1541
|
b_0.storeAddress(src.depositor);
|
|
1021
1542
|
b_0.storeAddress(src.beneficiary);
|
|
1022
|
-
b_0.storeAddress(src.
|
|
1543
|
+
b_0.storeAddress(src.reputationContract);
|
|
1023
1544
|
b_0.storeCoins(src.amount);
|
|
1024
1545
|
b_0.storeUint(src.deadline, 32);
|
|
1025
1546
|
b_0.storeBit(src.released);
|
|
1026
1547
|
b_0.storeBit(src.refunded);
|
|
1548
|
+
b_0.storeBit(src.deliveryConfirmed);
|
|
1549
|
+
b_0.storeBit(src.disputed);
|
|
1550
|
+
b_0.storeUint(src.votingDeadline, 32);
|
|
1551
|
+
b_0.storeUint(src.arbiterCount, 16);
|
|
1552
|
+
const b_1 = new Builder();
|
|
1553
|
+
b_1.storeUint(src.votesRelease, 16);
|
|
1554
|
+
b_1.storeUint(src.votesRefund, 16);
|
|
1555
|
+
b_1.storeUint(src.minArbiters, 8);
|
|
1556
|
+
b_1.storeCoins(src.minStake);
|
|
1557
|
+
b_1.storeCoins(src.sellerStake);
|
|
1558
|
+
b_1.storeBit(src.sellerStaked);
|
|
1559
|
+
b_1.storeBit(src.requireSellerStake);
|
|
1560
|
+
b_1.storeCoins(src.baseSellerStake);
|
|
1561
|
+
b_1.storeBit(src.requireRepCollateral);
|
|
1562
|
+
b_1.storeUint(src.minRepScore, 8);
|
|
1563
|
+
b_1.storeBit(src.autoReleaseAvailable);
|
|
1564
|
+
b_1.storeBit(src.refundAvailable);
|
|
1565
|
+
b_0.storeRef(b_1.endCell());
|
|
1027
1566
|
};
|
|
1028
1567
|
}
|
|
1029
1568
|
|
|
@@ -1031,45 +1570,111 @@ export function loadEscrowData(slice: Slice) {
|
|
|
1031
1570
|
const sc_0 = slice;
|
|
1032
1571
|
const _depositor = sc_0.loadAddress();
|
|
1033
1572
|
const _beneficiary = sc_0.loadAddress();
|
|
1034
|
-
const
|
|
1573
|
+
const _reputationContract = sc_0.loadAddress();
|
|
1035
1574
|
const _amount = sc_0.loadCoins();
|
|
1036
1575
|
const _deadline = sc_0.loadUintBig(32);
|
|
1037
1576
|
const _released = sc_0.loadBit();
|
|
1038
1577
|
const _refunded = sc_0.loadBit();
|
|
1039
|
-
|
|
1578
|
+
const _deliveryConfirmed = sc_0.loadBit();
|
|
1579
|
+
const _disputed = sc_0.loadBit();
|
|
1580
|
+
const _votingDeadline = sc_0.loadUintBig(32);
|
|
1581
|
+
const _arbiterCount = sc_0.loadUintBig(16);
|
|
1582
|
+
const sc_1 = sc_0.loadRef().beginParse();
|
|
1583
|
+
const _votesRelease = sc_1.loadUintBig(16);
|
|
1584
|
+
const _votesRefund = sc_1.loadUintBig(16);
|
|
1585
|
+
const _minArbiters = sc_1.loadUintBig(8);
|
|
1586
|
+
const _minStake = sc_1.loadCoins();
|
|
1587
|
+
const _sellerStake = sc_1.loadCoins();
|
|
1588
|
+
const _sellerStaked = sc_1.loadBit();
|
|
1589
|
+
const _requireSellerStake = sc_1.loadBit();
|
|
1590
|
+
const _baseSellerStake = sc_1.loadCoins();
|
|
1591
|
+
const _requireRepCollateral = sc_1.loadBit();
|
|
1592
|
+
const _minRepScore = sc_1.loadUintBig(8);
|
|
1593
|
+
const _autoReleaseAvailable = sc_1.loadBit();
|
|
1594
|
+
const _refundAvailable = sc_1.loadBit();
|
|
1595
|
+
return { $$type: 'EscrowData' as const, depositor: _depositor, beneficiary: _beneficiary, reputationContract: _reputationContract, amount: _amount, deadline: _deadline, released: _released, refunded: _refunded, deliveryConfirmed: _deliveryConfirmed, disputed: _disputed, votingDeadline: _votingDeadline, arbiterCount: _arbiterCount, votesRelease: _votesRelease, votesRefund: _votesRefund, minArbiters: _minArbiters, minStake: _minStake, sellerStake: _sellerStake, sellerStaked: _sellerStaked, requireSellerStake: _requireSellerStake, baseSellerStake: _baseSellerStake, requireRepCollateral: _requireRepCollateral, minRepScore: _minRepScore, autoReleaseAvailable: _autoReleaseAvailable, refundAvailable: _refundAvailable };
|
|
1040
1596
|
}
|
|
1041
1597
|
|
|
1042
1598
|
export function loadTupleEscrowData(source: TupleReader) {
|
|
1043
1599
|
const _depositor = source.readAddress();
|
|
1044
1600
|
const _beneficiary = source.readAddress();
|
|
1045
|
-
const
|
|
1601
|
+
const _reputationContract = source.readAddress();
|
|
1046
1602
|
const _amount = source.readBigNumber();
|
|
1047
1603
|
const _deadline = source.readBigNumber();
|
|
1048
1604
|
const _released = source.readBoolean();
|
|
1049
1605
|
const _refunded = source.readBoolean();
|
|
1050
|
-
|
|
1606
|
+
const _deliveryConfirmed = source.readBoolean();
|
|
1607
|
+
const _disputed = source.readBoolean();
|
|
1608
|
+
const _votingDeadline = source.readBigNumber();
|
|
1609
|
+
const _arbiterCount = source.readBigNumber();
|
|
1610
|
+
const _votesRelease = source.readBigNumber();
|
|
1611
|
+
const _votesRefund = source.readBigNumber();
|
|
1612
|
+
const _minArbiters = source.readBigNumber();
|
|
1613
|
+
source = source.readTuple();
|
|
1614
|
+
const _minStake = source.readBigNumber();
|
|
1615
|
+
const _sellerStake = source.readBigNumber();
|
|
1616
|
+
const _sellerStaked = source.readBoolean();
|
|
1617
|
+
const _requireSellerStake = source.readBoolean();
|
|
1618
|
+
const _baseSellerStake = source.readBigNumber();
|
|
1619
|
+
const _requireRepCollateral = source.readBoolean();
|
|
1620
|
+
const _minRepScore = source.readBigNumber();
|
|
1621
|
+
const _autoReleaseAvailable = source.readBoolean();
|
|
1622
|
+
const _refundAvailable = source.readBoolean();
|
|
1623
|
+
return { $$type: 'EscrowData' as const, depositor: _depositor, beneficiary: _beneficiary, reputationContract: _reputationContract, amount: _amount, deadline: _deadline, released: _released, refunded: _refunded, deliveryConfirmed: _deliveryConfirmed, disputed: _disputed, votingDeadline: _votingDeadline, arbiterCount: _arbiterCount, votesRelease: _votesRelease, votesRefund: _votesRefund, minArbiters: _minArbiters, minStake: _minStake, sellerStake: _sellerStake, sellerStaked: _sellerStaked, requireSellerStake: _requireSellerStake, baseSellerStake: _baseSellerStake, requireRepCollateral: _requireRepCollateral, minRepScore: _minRepScore, autoReleaseAvailable: _autoReleaseAvailable, refundAvailable: _refundAvailable };
|
|
1051
1624
|
}
|
|
1052
1625
|
|
|
1053
1626
|
export function loadGetterTupleEscrowData(source: TupleReader) {
|
|
1054
1627
|
const _depositor = source.readAddress();
|
|
1055
1628
|
const _beneficiary = source.readAddress();
|
|
1056
|
-
const
|
|
1629
|
+
const _reputationContract = source.readAddress();
|
|
1057
1630
|
const _amount = source.readBigNumber();
|
|
1058
1631
|
const _deadline = source.readBigNumber();
|
|
1059
1632
|
const _released = source.readBoolean();
|
|
1060
1633
|
const _refunded = source.readBoolean();
|
|
1061
|
-
|
|
1634
|
+
const _deliveryConfirmed = source.readBoolean();
|
|
1635
|
+
const _disputed = source.readBoolean();
|
|
1636
|
+
const _votingDeadline = source.readBigNumber();
|
|
1637
|
+
const _arbiterCount = source.readBigNumber();
|
|
1638
|
+
const _votesRelease = source.readBigNumber();
|
|
1639
|
+
const _votesRefund = source.readBigNumber();
|
|
1640
|
+
const _minArbiters = source.readBigNumber();
|
|
1641
|
+
const _minStake = source.readBigNumber();
|
|
1642
|
+
const _sellerStake = source.readBigNumber();
|
|
1643
|
+
const _sellerStaked = source.readBoolean();
|
|
1644
|
+
const _requireSellerStake = source.readBoolean();
|
|
1645
|
+
const _baseSellerStake = source.readBigNumber();
|
|
1646
|
+
const _requireRepCollateral = source.readBoolean();
|
|
1647
|
+
const _minRepScore = source.readBigNumber();
|
|
1648
|
+
const _autoReleaseAvailable = source.readBoolean();
|
|
1649
|
+
const _refundAvailable = source.readBoolean();
|
|
1650
|
+
return { $$type: 'EscrowData' as const, depositor: _depositor, beneficiary: _beneficiary, reputationContract: _reputationContract, amount: _amount, deadline: _deadline, released: _released, refunded: _refunded, deliveryConfirmed: _deliveryConfirmed, disputed: _disputed, votingDeadline: _votingDeadline, arbiterCount: _arbiterCount, votesRelease: _votesRelease, votesRefund: _votesRefund, minArbiters: _minArbiters, minStake: _minStake, sellerStake: _sellerStake, sellerStaked: _sellerStaked, requireSellerStake: _requireSellerStake, baseSellerStake: _baseSellerStake, requireRepCollateral: _requireRepCollateral, minRepScore: _minRepScore, autoReleaseAvailable: _autoReleaseAvailable, refundAvailable: _refundAvailable };
|
|
1062
1651
|
}
|
|
1063
1652
|
|
|
1064
1653
|
export function storeTupleEscrowData(source: EscrowData) {
|
|
1065
1654
|
const builder = new TupleBuilder();
|
|
1066
1655
|
builder.writeAddress(source.depositor);
|
|
1067
1656
|
builder.writeAddress(source.beneficiary);
|
|
1068
|
-
builder.writeAddress(source.
|
|
1657
|
+
builder.writeAddress(source.reputationContract);
|
|
1069
1658
|
builder.writeNumber(source.amount);
|
|
1070
1659
|
builder.writeNumber(source.deadline);
|
|
1071
1660
|
builder.writeBoolean(source.released);
|
|
1072
1661
|
builder.writeBoolean(source.refunded);
|
|
1662
|
+
builder.writeBoolean(source.deliveryConfirmed);
|
|
1663
|
+
builder.writeBoolean(source.disputed);
|
|
1664
|
+
builder.writeNumber(source.votingDeadline);
|
|
1665
|
+
builder.writeNumber(source.arbiterCount);
|
|
1666
|
+
builder.writeNumber(source.votesRelease);
|
|
1667
|
+
builder.writeNumber(source.votesRefund);
|
|
1668
|
+
builder.writeNumber(source.minArbiters);
|
|
1669
|
+
builder.writeNumber(source.minStake);
|
|
1670
|
+
builder.writeNumber(source.sellerStake);
|
|
1671
|
+
builder.writeBoolean(source.sellerStaked);
|
|
1672
|
+
builder.writeBoolean(source.requireSellerStake);
|
|
1673
|
+
builder.writeNumber(source.baseSellerStake);
|
|
1674
|
+
builder.writeBoolean(source.requireRepCollateral);
|
|
1675
|
+
builder.writeNumber(source.minRepScore);
|
|
1676
|
+
builder.writeBoolean(source.autoReleaseAvailable);
|
|
1677
|
+
builder.writeBoolean(source.refundAvailable);
|
|
1073
1678
|
return builder.build();
|
|
1074
1679
|
}
|
|
1075
1680
|
|
|
@@ -1088,11 +1693,30 @@ export type Escrow$Data = {
|
|
|
1088
1693
|
$$type: 'Escrow$Data';
|
|
1089
1694
|
depositor: Address;
|
|
1090
1695
|
beneficiary: Address;
|
|
1091
|
-
|
|
1696
|
+
reputationContract: Address;
|
|
1092
1697
|
amount: bigint;
|
|
1093
1698
|
deadline: bigint;
|
|
1094
1699
|
released: boolean;
|
|
1095
1700
|
refunded: boolean;
|
|
1701
|
+
deliveryConfirmed: boolean;
|
|
1702
|
+
disputed: boolean;
|
|
1703
|
+
votingDeadline: bigint;
|
|
1704
|
+
minArbiters: bigint;
|
|
1705
|
+
minStake: bigint;
|
|
1706
|
+
arbiters: Dictionary<bigint, Address>;
|
|
1707
|
+
arbiterIndex: Dictionary<Address, bigint>;
|
|
1708
|
+
stakes: Dictionary<bigint, bigint>;
|
|
1709
|
+
voted: Dictionary<bigint, boolean>;
|
|
1710
|
+
votes: Dictionary<bigint, boolean>;
|
|
1711
|
+
arbiterCount: bigint;
|
|
1712
|
+
votesRelease: bigint;
|
|
1713
|
+
votesRefund: bigint;
|
|
1714
|
+
sellerStake: bigint;
|
|
1715
|
+
sellerStaked: boolean;
|
|
1716
|
+
requireSellerStake: boolean;
|
|
1717
|
+
baseSellerStake: bigint;
|
|
1718
|
+
requireRepCollateral: boolean;
|
|
1719
|
+
minRepScore: bigint;
|
|
1096
1720
|
}
|
|
1097
1721
|
|
|
1098
1722
|
export function storeEscrow$Data(src: Escrow$Data) {
|
|
@@ -1100,11 +1724,34 @@ export function storeEscrow$Data(src: Escrow$Data) {
|
|
|
1100
1724
|
const b_0 = builder;
|
|
1101
1725
|
b_0.storeAddress(src.depositor);
|
|
1102
1726
|
b_0.storeAddress(src.beneficiary);
|
|
1103
|
-
b_0.storeAddress(src.
|
|
1727
|
+
b_0.storeAddress(src.reputationContract);
|
|
1104
1728
|
b_0.storeCoins(src.amount);
|
|
1105
1729
|
b_0.storeUint(src.deadline, 32);
|
|
1106
1730
|
b_0.storeBit(src.released);
|
|
1107
1731
|
b_0.storeBit(src.refunded);
|
|
1732
|
+
b_0.storeBit(src.deliveryConfirmed);
|
|
1733
|
+
b_0.storeBit(src.disputed);
|
|
1734
|
+
b_0.storeUint(src.votingDeadline, 32);
|
|
1735
|
+
b_0.storeUint(src.minArbiters, 8);
|
|
1736
|
+
const b_1 = new Builder();
|
|
1737
|
+
b_1.storeCoins(src.minStake);
|
|
1738
|
+
b_1.storeDict(src.arbiters, Dictionary.Keys.BigInt(257), Dictionary.Values.Address());
|
|
1739
|
+
b_1.storeDict(src.arbiterIndex, Dictionary.Keys.Address(), Dictionary.Values.BigInt(257));
|
|
1740
|
+
b_1.storeDict(src.stakes, Dictionary.Keys.BigInt(257), Dictionary.Values.BigInt(257));
|
|
1741
|
+
const b_2 = new Builder();
|
|
1742
|
+
b_2.storeDict(src.voted, Dictionary.Keys.BigInt(257), Dictionary.Values.Bool());
|
|
1743
|
+
b_2.storeDict(src.votes, Dictionary.Keys.BigInt(257), Dictionary.Values.Bool());
|
|
1744
|
+
b_2.storeUint(src.arbiterCount, 16);
|
|
1745
|
+
b_2.storeUint(src.votesRelease, 16);
|
|
1746
|
+
b_2.storeUint(src.votesRefund, 16);
|
|
1747
|
+
b_2.storeCoins(src.sellerStake);
|
|
1748
|
+
b_2.storeBit(src.sellerStaked);
|
|
1749
|
+
b_2.storeBit(src.requireSellerStake);
|
|
1750
|
+
b_2.storeCoins(src.baseSellerStake);
|
|
1751
|
+
b_2.storeBit(src.requireRepCollateral);
|
|
1752
|
+
b_2.storeUint(src.minRepScore, 8);
|
|
1753
|
+
b_1.storeRef(b_2.endCell());
|
|
1754
|
+
b_0.storeRef(b_1.endCell());
|
|
1108
1755
|
};
|
|
1109
1756
|
}
|
|
1110
1757
|
|
|
@@ -1112,45 +1759,124 @@ export function loadEscrow$Data(slice: Slice) {
|
|
|
1112
1759
|
const sc_0 = slice;
|
|
1113
1760
|
const _depositor = sc_0.loadAddress();
|
|
1114
1761
|
const _beneficiary = sc_0.loadAddress();
|
|
1115
|
-
const
|
|
1762
|
+
const _reputationContract = sc_0.loadAddress();
|
|
1116
1763
|
const _amount = sc_0.loadCoins();
|
|
1117
1764
|
const _deadline = sc_0.loadUintBig(32);
|
|
1118
1765
|
const _released = sc_0.loadBit();
|
|
1119
1766
|
const _refunded = sc_0.loadBit();
|
|
1120
|
-
|
|
1767
|
+
const _deliveryConfirmed = sc_0.loadBit();
|
|
1768
|
+
const _disputed = sc_0.loadBit();
|
|
1769
|
+
const _votingDeadline = sc_0.loadUintBig(32);
|
|
1770
|
+
const _minArbiters = sc_0.loadUintBig(8);
|
|
1771
|
+
const sc_1 = sc_0.loadRef().beginParse();
|
|
1772
|
+
const _minStake = sc_1.loadCoins();
|
|
1773
|
+
const _arbiters = Dictionary.load(Dictionary.Keys.BigInt(257), Dictionary.Values.Address(), sc_1);
|
|
1774
|
+
const _arbiterIndex = Dictionary.load(Dictionary.Keys.Address(), Dictionary.Values.BigInt(257), sc_1);
|
|
1775
|
+
const _stakes = Dictionary.load(Dictionary.Keys.BigInt(257), Dictionary.Values.BigInt(257), sc_1);
|
|
1776
|
+
const sc_2 = sc_1.loadRef().beginParse();
|
|
1777
|
+
const _voted = Dictionary.load(Dictionary.Keys.BigInt(257), Dictionary.Values.Bool(), sc_2);
|
|
1778
|
+
const _votes = Dictionary.load(Dictionary.Keys.BigInt(257), Dictionary.Values.Bool(), sc_2);
|
|
1779
|
+
const _arbiterCount = sc_2.loadUintBig(16);
|
|
1780
|
+
const _votesRelease = sc_2.loadUintBig(16);
|
|
1781
|
+
const _votesRefund = sc_2.loadUintBig(16);
|
|
1782
|
+
const _sellerStake = sc_2.loadCoins();
|
|
1783
|
+
const _sellerStaked = sc_2.loadBit();
|
|
1784
|
+
const _requireSellerStake = sc_2.loadBit();
|
|
1785
|
+
const _baseSellerStake = sc_2.loadCoins();
|
|
1786
|
+
const _requireRepCollateral = sc_2.loadBit();
|
|
1787
|
+
const _minRepScore = sc_2.loadUintBig(8);
|
|
1788
|
+
return { $$type: 'Escrow$Data' as const, depositor: _depositor, beneficiary: _beneficiary, reputationContract: _reputationContract, amount: _amount, deadline: _deadline, released: _released, refunded: _refunded, deliveryConfirmed: _deliveryConfirmed, disputed: _disputed, votingDeadline: _votingDeadline, minArbiters: _minArbiters, minStake: _minStake, arbiters: _arbiters, arbiterIndex: _arbiterIndex, stakes: _stakes, voted: _voted, votes: _votes, arbiterCount: _arbiterCount, votesRelease: _votesRelease, votesRefund: _votesRefund, sellerStake: _sellerStake, sellerStaked: _sellerStaked, requireSellerStake: _requireSellerStake, baseSellerStake: _baseSellerStake, requireRepCollateral: _requireRepCollateral, minRepScore: _minRepScore };
|
|
1121
1789
|
}
|
|
1122
1790
|
|
|
1123
1791
|
export function loadTupleEscrow$Data(source: TupleReader) {
|
|
1124
1792
|
const _depositor = source.readAddress();
|
|
1125
1793
|
const _beneficiary = source.readAddress();
|
|
1126
|
-
const
|
|
1794
|
+
const _reputationContract = source.readAddress();
|
|
1127
1795
|
const _amount = source.readBigNumber();
|
|
1128
1796
|
const _deadline = source.readBigNumber();
|
|
1129
1797
|
const _released = source.readBoolean();
|
|
1130
1798
|
const _refunded = source.readBoolean();
|
|
1131
|
-
|
|
1799
|
+
const _deliveryConfirmed = source.readBoolean();
|
|
1800
|
+
const _disputed = source.readBoolean();
|
|
1801
|
+
const _votingDeadline = source.readBigNumber();
|
|
1802
|
+
const _minArbiters = source.readBigNumber();
|
|
1803
|
+
const _minStake = source.readBigNumber();
|
|
1804
|
+
const _arbiters = Dictionary.loadDirect(Dictionary.Keys.BigInt(257), Dictionary.Values.Address(), source.readCellOpt());
|
|
1805
|
+
const _arbiterIndex = Dictionary.loadDirect(Dictionary.Keys.Address(), Dictionary.Values.BigInt(257), source.readCellOpt());
|
|
1806
|
+
source = source.readTuple();
|
|
1807
|
+
const _stakes = Dictionary.loadDirect(Dictionary.Keys.BigInt(257), Dictionary.Values.BigInt(257), source.readCellOpt());
|
|
1808
|
+
const _voted = Dictionary.loadDirect(Dictionary.Keys.BigInt(257), Dictionary.Values.Bool(), source.readCellOpt());
|
|
1809
|
+
const _votes = Dictionary.loadDirect(Dictionary.Keys.BigInt(257), Dictionary.Values.Bool(), source.readCellOpt());
|
|
1810
|
+
const _arbiterCount = source.readBigNumber();
|
|
1811
|
+
const _votesRelease = source.readBigNumber();
|
|
1812
|
+
const _votesRefund = source.readBigNumber();
|
|
1813
|
+
const _sellerStake = source.readBigNumber();
|
|
1814
|
+
const _sellerStaked = source.readBoolean();
|
|
1815
|
+
const _requireSellerStake = source.readBoolean();
|
|
1816
|
+
const _baseSellerStake = source.readBigNumber();
|
|
1817
|
+
const _requireRepCollateral = source.readBoolean();
|
|
1818
|
+
const _minRepScore = source.readBigNumber();
|
|
1819
|
+
return { $$type: 'Escrow$Data' as const, depositor: _depositor, beneficiary: _beneficiary, reputationContract: _reputationContract, amount: _amount, deadline: _deadline, released: _released, refunded: _refunded, deliveryConfirmed: _deliveryConfirmed, disputed: _disputed, votingDeadline: _votingDeadline, minArbiters: _minArbiters, minStake: _minStake, arbiters: _arbiters, arbiterIndex: _arbiterIndex, stakes: _stakes, voted: _voted, votes: _votes, arbiterCount: _arbiterCount, votesRelease: _votesRelease, votesRefund: _votesRefund, sellerStake: _sellerStake, sellerStaked: _sellerStaked, requireSellerStake: _requireSellerStake, baseSellerStake: _baseSellerStake, requireRepCollateral: _requireRepCollateral, minRepScore: _minRepScore };
|
|
1132
1820
|
}
|
|
1133
1821
|
|
|
1134
1822
|
export function loadGetterTupleEscrow$Data(source: TupleReader) {
|
|
1135
1823
|
const _depositor = source.readAddress();
|
|
1136
1824
|
const _beneficiary = source.readAddress();
|
|
1137
|
-
const
|
|
1825
|
+
const _reputationContract = source.readAddress();
|
|
1138
1826
|
const _amount = source.readBigNumber();
|
|
1139
1827
|
const _deadline = source.readBigNumber();
|
|
1140
1828
|
const _released = source.readBoolean();
|
|
1141
1829
|
const _refunded = source.readBoolean();
|
|
1142
|
-
|
|
1830
|
+
const _deliveryConfirmed = source.readBoolean();
|
|
1831
|
+
const _disputed = source.readBoolean();
|
|
1832
|
+
const _votingDeadline = source.readBigNumber();
|
|
1833
|
+
const _minArbiters = source.readBigNumber();
|
|
1834
|
+
const _minStake = source.readBigNumber();
|
|
1835
|
+
const _arbiters = Dictionary.loadDirect(Dictionary.Keys.BigInt(257), Dictionary.Values.Address(), source.readCellOpt());
|
|
1836
|
+
const _arbiterIndex = Dictionary.loadDirect(Dictionary.Keys.Address(), Dictionary.Values.BigInt(257), source.readCellOpt());
|
|
1837
|
+
const _stakes = Dictionary.loadDirect(Dictionary.Keys.BigInt(257), Dictionary.Values.BigInt(257), source.readCellOpt());
|
|
1838
|
+
const _voted = Dictionary.loadDirect(Dictionary.Keys.BigInt(257), Dictionary.Values.Bool(), source.readCellOpt());
|
|
1839
|
+
const _votes = Dictionary.loadDirect(Dictionary.Keys.BigInt(257), Dictionary.Values.Bool(), source.readCellOpt());
|
|
1840
|
+
const _arbiterCount = source.readBigNumber();
|
|
1841
|
+
const _votesRelease = source.readBigNumber();
|
|
1842
|
+
const _votesRefund = source.readBigNumber();
|
|
1843
|
+
const _sellerStake = source.readBigNumber();
|
|
1844
|
+
const _sellerStaked = source.readBoolean();
|
|
1845
|
+
const _requireSellerStake = source.readBoolean();
|
|
1846
|
+
const _baseSellerStake = source.readBigNumber();
|
|
1847
|
+
const _requireRepCollateral = source.readBoolean();
|
|
1848
|
+
const _minRepScore = source.readBigNumber();
|
|
1849
|
+
return { $$type: 'Escrow$Data' as const, depositor: _depositor, beneficiary: _beneficiary, reputationContract: _reputationContract, amount: _amount, deadline: _deadline, released: _released, refunded: _refunded, deliveryConfirmed: _deliveryConfirmed, disputed: _disputed, votingDeadline: _votingDeadline, minArbiters: _minArbiters, minStake: _minStake, arbiters: _arbiters, arbiterIndex: _arbiterIndex, stakes: _stakes, voted: _voted, votes: _votes, arbiterCount: _arbiterCount, votesRelease: _votesRelease, votesRefund: _votesRefund, sellerStake: _sellerStake, sellerStaked: _sellerStaked, requireSellerStake: _requireSellerStake, baseSellerStake: _baseSellerStake, requireRepCollateral: _requireRepCollateral, minRepScore: _minRepScore };
|
|
1143
1850
|
}
|
|
1144
1851
|
|
|
1145
1852
|
export function storeTupleEscrow$Data(source: Escrow$Data) {
|
|
1146
1853
|
const builder = new TupleBuilder();
|
|
1147
1854
|
builder.writeAddress(source.depositor);
|
|
1148
1855
|
builder.writeAddress(source.beneficiary);
|
|
1149
|
-
builder.writeAddress(source.
|
|
1856
|
+
builder.writeAddress(source.reputationContract);
|
|
1150
1857
|
builder.writeNumber(source.amount);
|
|
1151
1858
|
builder.writeNumber(source.deadline);
|
|
1152
1859
|
builder.writeBoolean(source.released);
|
|
1153
1860
|
builder.writeBoolean(source.refunded);
|
|
1861
|
+
builder.writeBoolean(source.deliveryConfirmed);
|
|
1862
|
+
builder.writeBoolean(source.disputed);
|
|
1863
|
+
builder.writeNumber(source.votingDeadline);
|
|
1864
|
+
builder.writeNumber(source.minArbiters);
|
|
1865
|
+
builder.writeNumber(source.minStake);
|
|
1866
|
+
builder.writeCell(source.arbiters.size > 0 ? beginCell().storeDictDirect(source.arbiters, Dictionary.Keys.BigInt(257), Dictionary.Values.Address()).endCell() : null);
|
|
1867
|
+
builder.writeCell(source.arbiterIndex.size > 0 ? beginCell().storeDictDirect(source.arbiterIndex, Dictionary.Keys.Address(), Dictionary.Values.BigInt(257)).endCell() : null);
|
|
1868
|
+
builder.writeCell(source.stakes.size > 0 ? beginCell().storeDictDirect(source.stakes, Dictionary.Keys.BigInt(257), Dictionary.Values.BigInt(257)).endCell() : null);
|
|
1869
|
+
builder.writeCell(source.voted.size > 0 ? beginCell().storeDictDirect(source.voted, Dictionary.Keys.BigInt(257), Dictionary.Values.Bool()).endCell() : null);
|
|
1870
|
+
builder.writeCell(source.votes.size > 0 ? beginCell().storeDictDirect(source.votes, Dictionary.Keys.BigInt(257), Dictionary.Values.Bool()).endCell() : null);
|
|
1871
|
+
builder.writeNumber(source.arbiterCount);
|
|
1872
|
+
builder.writeNumber(source.votesRelease);
|
|
1873
|
+
builder.writeNumber(source.votesRefund);
|
|
1874
|
+
builder.writeNumber(source.sellerStake);
|
|
1875
|
+
builder.writeBoolean(source.sellerStaked);
|
|
1876
|
+
builder.writeBoolean(source.requireSellerStake);
|
|
1877
|
+
builder.writeNumber(source.baseSellerStake);
|
|
1878
|
+
builder.writeBoolean(source.requireRepCollateral);
|
|
1879
|
+
builder.writeNumber(source.minRepScore);
|
|
1154
1880
|
return builder.build();
|
|
1155
1881
|
}
|
|
1156
1882
|
|
|
@@ -1169,8 +1895,13 @@ export function dictValueParserEscrow$Data(): DictionaryValue<Escrow$Data> {
|
|
|
1169
1895
|
$$type: 'Escrow_init_args';
|
|
1170
1896
|
depositor: Address;
|
|
1171
1897
|
beneficiary: Address;
|
|
1172
|
-
arbiter: Address;
|
|
1173
1898
|
deadline: bigint;
|
|
1899
|
+
minArbiters: bigint;
|
|
1900
|
+
minStake: bigint;
|
|
1901
|
+
reputationContract: Address;
|
|
1902
|
+
requireRepCollateral: boolean;
|
|
1903
|
+
minRepScore: bigint;
|
|
1904
|
+
baseSellerStake: bigint;
|
|
1174
1905
|
}
|
|
1175
1906
|
|
|
1176
1907
|
function initEscrow_init_args(src: Escrow_init_args) {
|
|
@@ -1178,18 +1909,25 @@ function initEscrow_init_args(src: Escrow_init_args) {
|
|
|
1178
1909
|
const b_0 = builder;
|
|
1179
1910
|
b_0.storeAddress(src.depositor);
|
|
1180
1911
|
b_0.storeAddress(src.beneficiary);
|
|
1181
|
-
b_0.
|
|
1912
|
+
b_0.storeInt(src.deadline, 257);
|
|
1182
1913
|
const b_1 = new Builder();
|
|
1183
|
-
b_1.storeInt(src.
|
|
1914
|
+
b_1.storeInt(src.minArbiters, 257);
|
|
1915
|
+
b_1.storeInt(src.minStake, 257);
|
|
1916
|
+
b_1.storeAddress(src.reputationContract);
|
|
1917
|
+
b_1.storeBit(src.requireRepCollateral);
|
|
1918
|
+
const b_2 = new Builder();
|
|
1919
|
+
b_2.storeInt(src.minRepScore, 257);
|
|
1920
|
+
b_2.storeInt(src.baseSellerStake, 257);
|
|
1921
|
+
b_1.storeRef(b_2.endCell());
|
|
1184
1922
|
b_0.storeRef(b_1.endCell());
|
|
1185
1923
|
};
|
|
1186
1924
|
}
|
|
1187
1925
|
|
|
1188
|
-
async function Escrow_init(depositor: Address, beneficiary: Address,
|
|
1189
|
-
const __code = Cell.fromHex('b5ee9c7241020e0100031000022cff008e88f4a413f4bcf2c80bed53208e8130e1ed43d90106020378e00204017bb96c0ed44d0d200018e12fa40fa40fa40fa00d31fd200d20055606c178e1afa40fa40fa40d401d0810101d7003014433004d1550270017070e2db3c6c718030008f8276f10017bbbed2ed44d0d200018e12fa40fa40fa40fa00d31fd200d20055606c178e1afa40fa40fa40d401d0810101d7003014433004d1550270017070e2db3c6c77805000e5476545476542604f201d072d721d200d200fa4021103450666f04f86102f862ed44d0d200018e12fa40fa40fa40fa00d31fd200d20055606c178e1afa40fa40fa40d401d0810101d7003014433004d1550270017070e208925f08e006d70d1ff2e082218210f8aa2f92bae3022182101856d189bae30221821083fb1615bae3020107080a0d00705b81247e26b39227b39170e2f2f4f8416f24135f0312a010461035443302c87f01ca0055605067ce14ce12ce01fa02cb1fca00ca00c9ed5402ea5bf8428200a5c35316c70592317f945114c705e2f2f481165906b39226b39170e216f2f48200a1c721c200f2f47f70810082708827553010246d50436d03c8cf8580ca00cf8440ce01fa028069cf40025c6e016eb0935bcf819d58cf8680cf8480f400f400cf81e2f400c901fb0010461035440302090c002600000000457363726f772072656c656173656402f85bf842f82322bc8126195327c70592327f945125c705e292307fdef2f481165926b39207b3923770e217f2f48200a1c721c200f2f47f70810082708828553010246d50436d03c8cf8580ca00cf8440ce01fa028069cf40025c6e016eb0935bcf819d58cf8680cf8480f400f400cf81e2f400c901fb001046103544300b0c002600000000457363726f7720726566756e6465640034c87f01ca0055605067ce14ce12ce01fa02cb1fca00ca00c9ed5400ca8210946a98b6ba8e56d33f30c8018210aff90f5758cb1fcb3fc91057104610354430f84270705003804201503304c8cf8580ca00cf8440ce01fa02806acf40f400c901fb00c87f01ca0055605067ce14ce12ce01fa02cb1fca00ca00c9ed54e05f08f2c082250a6c2b');
|
|
1926
|
+
async function Escrow_init(depositor: Address, beneficiary: Address, deadline: bigint, minArbiters: bigint, minStake: bigint, reputationContract: Address, requireRepCollateral: boolean, minRepScore: bigint, baseSellerStake: bigint) {
|
|
1927
|
+
const __code = Cell.fromHex('b5ee9c724102460100141600022cff008e88f4a413f4bcf2c80bed53208e8130e1ed43d90107020378e002040325b96c0ed44d0d20001e30fdb3c57105f0f6ca18080a030008f8276f1003d5bbed2ed44d0d20001e30fdb3c571757175717571757175717571757175717571757175717571757175717571757175717571757175717571757175717571757171113111611131112111511121111111411111110111311100f11120f0e11110e0d11100d10cf10be552a8080a0501f4f8235616be9256129170e2935614b39170e2935613b39170e2935611b39170e2f8235617be935613b39170e2935615b39170e2935614b39170e2935612b39170e2561b02561b02561b02561b02561b02561b02561b02561b02561b02561b02561402561402561402561e02561e0256160256160256160256160206000c561602561659048201d072d721d200d200fa4021103450666f04f86102f862ed44d0d20001e30f111b945f0f5f0ce01119d70d1ff2e082218210f19f83efbae302218210f8aa2f92ba080a0b0d01f6fa40fa40fa40fa00d31fd200d200d200d200d31fd307d401d0fa00f404f404f404d430d0f404f404d30fd30fd30ffa00d200d200fa00d200d307300f111a0f0f11190f0f11180f0f11170f0f11160f0f11150f0f11140f0f11130f0f11120f0f11110f0f11100f571a1118111911181117111811171116111711160900541115111611151114111511141113111411131112111311121111111211111110111111100f11100f550e00f4fa40fa40810101d700d401d0810101d700810101d700fa40d200d430d0810101d700810101d7003010691068106709d155076d6d6d6d6d707070707054744453007056121114111711140b11160b1114111511140a11140a0911130908111208071111070611100610bf10ae106d10bc10ab106a10691058552401fe5b33815c50f8425617c705f2f48116595612b3935611b39170e2f2f420f2e78d8200e85002b312f2f48200c718f8416f24135f03c200f2f4f8416f24135f031116111811161115111711151114111611141113111511131112111411121111111311111110111211100f11110f0e11100e10df10ce10bd10ac109b108a10790c011c1068105710461035047f4344db3c4404fa8ee55b21978200f23123f2f4def8416f24135f0301111501a011171119111711161118111611151117111511161113111511131112111411121111111311111110111211100f11110f0e11100e10df10ce10bd10ac109b108a107910681057104610354403db3ce0218210d2d77e02bae3022182101856d189bae30221440e0f1201da5b5710820097dbf8425618c705f2f48116595612b3935611b39170e2f2f41116111811161115111711151114111611141113111511131112111411121111111311111110111211107f11120f11110f0e11100e10df10ce10bd10ac109b108a107910681057104610354403db3c4402fe5b8116591113b3935611b39170e201111301f2f48164272fb3f2f48200af75f8425618c705f2f48200a1c75614c200f2f47f708100827088561a553010246d50436d03c8cf8580ca00cf8440ce01fa028069cf40025c6e016eb0935bcf819d58cf8680cf8480f400f400cf81e2f400c901fb001117111911171116111811161011002600000000457363726f772072656c6561736564018411151117111511141116111411131115111311141111111311111110111211100f11110f0e11100e10df10ce10bd10ac109b108a107910681057104610354403db3c44044a821083fb1615bae302218210464d5ef3bae3022182109ec0cde6bae302218210c28a4884ba1316191d02fe5b8116595613b3931112b393571270e201111201f2f48164272fb3f2f48200a1c75614c200f2f4f8235613b99c8200f74df8425618c705f2f4982f95812a05f2f0dee27f708100827088561b553010246d50436d03c8cf8580ca00cf8440ce01fa028069cf40025c6e016eb0935bcf819d58cf8680cf8480f400f400cf81e21415002600000000457363726f7720726566756e64656401aaf400c901fb0011171119111711161118111611151117111511141116111411131115111311121114111211131110111211100f11110f0e11100e10df10ce10bd10ac109b108a10791068105710461035443012db3c4402fc5b8200bc49f8235615bef2f48200cc285611f2f48116591113b3935611b39170e201111301f2f42eb3f2e4a18200a1c75614c200f2f47f708100827088561a553010246d50436d03c8cf8580ca00cf8440ce01fa028069cf40025c6e016eb0935bcf819d58cf8680cf8480f400f400cf81e2f400c901fb0011171119111717180040000000004175746f2d72656c656173656420616674657220646561646c696e65019011161118111611151117111511141116111411131115111311141111111311111110111211100f11110f0e11100e10df10ce10bd10ac109b108a107910681057104610354403db3c4401fe5b3e8200e28cf8425618c705917f96f8425617c705e2f2f48116595612b3935611b39170e2f2f48200ae570fb31ff2f47ff8238203f480a08209c9c380727ff828561b561b561a27c8554082102f7e50595006cb1f14ce12cece01fa02cb1fc95619553010246d50436d03c8cf8580ca00cf8440ce01fa028069cf40025c6e1a02fc016eb0935bcf819d58cf8680cf8480f400f400cf81e2f400c901fb00f842708042708810246d50436d03c8cf8580ca00cf8440ce01fa028069cf40025c6e016eb0935bcf819d58cf8680cf8480f400f400cf81e2f400c901fb001117111911171116111811161115111711151114111611141113111511131112111411121b1c00240000000044697370757465206f70656e6564015811111113111111101112111001111101111010df10ce10bd10ac109b108a107910681057104610354400db3c4402fc8efa5b81575a5610f2f48116595613b3935612b39170e2f2f4813c8df8235610b9f2f4810f8927c164f2f4813ce7f8425619c705b3f2f482009100f8425618c705b3f2f481010bf8422c598101014133f40a6fa19401d70030925b6de281654b016ef2f4f8416f24135f038126e7531ebef2f4810101f84229103f01e0211e2001f6206e953059f45a30944133f414e281010bf84229103e810101216e955b59f4593098c801cf004133f441e281010120103c54491350ff216e955b59f45a3098c801cf004133f442e208810101277071216e955b59f45a3098c801cf004133f442e206a41117111911171116111811161115111711151114111611141f016c1113111511131112111411121111111311111110111211100f11110f0e11100e10df10ce5e2a108b5e3608105710461035440302db3c4402fe820aaade5bba8ef75b81575a5610f2f48116595613b3935612b39170e2f2f48153fa537ebef2f481010bf8422c598101014133f40a6fa19401d70030925b6de2814a09216eb3f2f4206ef2d0802981010122714133f40c6fa19401d70030925b6de2812583216eb3f2f48200e7e901206ef2d080c000f2f4098101012a7f7121280372216e955b59f45a3098c801cf004133f442e218810101500a7f71216e955b59f45a3098c801cf004133f442e205a426ab00a45210bee30fdb3c22254404fe57121116111811161115111711151114111611141113111511131112111411127f11141111111311111110111211100f11110f0e11100e10df10ce10bd10ac109b108a5e351067104610354403db3c708100827088561c553010246d50436d03c8cf8580ca00cf8440ce01fa028069cf40025c6e016eb0935bcf818ae2f4003d23392400380000000052656c6561736564206279206172626974657220766f74650008c901fb0002fcf842708042708810246d50436d03c8cf8580ca00cf8440ce01fa028069cf40025c6e016eb0935bcf819d58cf8680cf8480f400f400cf81e2f400c901fb001117111911171116111811161115111711151114111611141113111511131112111411121111111311111110111211100f11110f0e11100e10df10ce10bd10ac2627002800000000566f74656420746f2072656c656173650012109b108a5e35075514044ee02182104cbc6df3bae30221821080432205bae302218210dcaf1044bae302018210946a98b6ba29313b4201ee5b81575a5610f2f48116595613b3935612b39170e2f2f48153fa537ebef2f481010bf8422c598101014133f40a6fa19401d70030925b6de2814a09216eb3f2f4206ef2d0802981010122714133f40c6fa19401d70030925b6de2812583216eb3f2f48200e7e901206ef2d080c000f2f4098101012a7f712a0372216e955b59f45a3098c801cf004133f442e218810101500a7071216e955b59f45a3098c801cf004133f442e204a426ab00a45210bee30fdb3c2b2e4404fe57111116111811161115111711151114111611141113111511131112111411121111111311117f11131110111211100f11110f0e11100e10df10ce10bd10ac109b108a10491068105710461035443012db3c708100827088561d553010246d50436d03c8cf8580ca00cf8440ce01fa028069cf40025c6e016eb0935bcf818a3d2c392d003800000000526566756e646564206279206172626974657220766f7465000ee2f400c901fb0002fcf842708042708810246d50436d03c8cf8580ca00cf8440ce01fa028069cf40025c6e016eb0935bcf819d58cf8680cf8480f400f400cf81e2f400c901fb001117111911171116111811161115111711151114111611141113111511131112111411121111111311111110111211100f11110f0e11100e10df10ce10bd10ac2f30002600000000566f74656420746f20726566756e640020109b108a10491068105706103544030201f85b8168575613917f925612e2f2f481010bf8422c598101014133f40a6fa19401d70030925b6de2814a09216eb3f2f4206ef2d080810101545b0052304133f40c6fa19401d70030925b6de2812583216eb3f2f482009d7321206ef2d080c200f2f42a81010123714133f40c6fa19401d70030925b6de28174c1216eb33202fe9801206ef2d080c0ff923170e2f2f42981010123714133f40c6fa19401d70030925b6de2206ef2d08020c0ff9256159170e292307f98c0009256139170e2e28101017021104f10231025216e955b59f45a3098c801cf004133f442e201913ae30d111711191117111611181116111511171115111411161114111311151113333a02fc1118111911181117111811171116111711161115111611151114111511141113111411131112111311121111111211111110111111100f11100f10ef10de10cd0b0c5509111adb3c1119111a11191118111a11181117111a11171116111a11161115111a11151114111a11141113111a11131112111a11121111111a1111343601f6702093530ab98e732b81010122714133f40c6fa19401d70030925b6de2206eb38e5520206ef2d080c0ff9256179170e292307f9d206ef2d080c0009256159170e2e28e32810101545e0052304133f40c6fa19401d70030925b6de2206eb39820206ef2d080c2009170e298206ef2d08012a0019130e2df9130e2a4350004e83003f41110111a11100f111a0f0e111a0e0d111a0d0c111a0c0b111a0b0a111a0a09111a09111a0807065540db3c7021c200993001111b01a904111a93571c30e2111b206ef2d08001111aa0f842727088103410246d50436d03c8cf8580ca00cf8440ce01fa028069cf40025c6e016eb0935bcf818ae2f400c901fb0037383900ec702093530ab98e6c2b81010122714133f40c6fa19401d70030925b6de2206eb38e4e20206ef2d080c0ff9256179170e292307f9d206ef2d080c0009256159170e2e28e2b810101545e0052304133f40c6fa19401d70030925b6de2206eb397206ef2d080c200923070e29301a401dede9130e2a4e8300036000000004172626974657220726577617264202877696e6e657229001a58cf8680cf8480f400f400cf8101401112111411121111111311111110111211100f11110f0e11100e10df551cdb3c4401fc5b81575a5610f2f48116595613b3935612b39170e2f2f48200d92bf8235610bef2f4536db9917f935354bae28e1356109357127f9b57111110111111107f1111e28e145354bc9357127f9b57111110111111107f1111e2e211171119111711161118111611151117111511141116111411131115111311141111111311113c04de1110111211100f11110f0e11100e10df10ce10bd10ac109b108a107910681057104610354403db3c56148ec1708100827088561d553010246d50436d03c8cf8580ca00cf8440ce01fa028069cf40025c6e016eb0935bcf819d58cf8680cf8480f400f400cf81e2f400c901fb00e30d3d3e3f4100c256118e5c8209312d00727ff82856185618c855208210bfa059865004cb1f12ceca00ca00c9561b553010246d50436d03c8cf8580ca00cf8440ce01fa028069cf40025c6e016eb0935bcf819d58cf8680cf8480f400f400cf81e2f400c901fb00de002c0000000046616c6c6261636b3a20726566756e6465640182708100827088561c553010246d50436d03c8cf8580ca00cf8440ce01fa028069cf40025c6e016eb0935bcf819d58cf8680cf8480f400f400cf81e2f400c901fb0040002c0000000046616c6c6261636b3a2072656c65617365640104db3c4401e48ee8d33f30c8018210aff90f5758cb1fcb3fc91118111a11181117111911171116111811161115111711151114111611141113111511131112111411121111111311111110111211100f11110f0e11100e10df10ce10bd10ac109b108a10791068105710461035443012e05f0f5f0cf2c08243014af84270705003804201503304c8cf8580ca00cf8440ce01fa02806acf40f400c901fb00db3c44013ac87f01ca00111a111911181117111611151114111311121111111055e04500ca01111901111ace01111701ce01111501ce011113fa0201111101cb1f1fca001dca001bca0019ca0017cb1f15cb07c85004fa0212f400f40012f40002c8f40013f40013cb0f13cb0f13cb0f5003fa0213ca0013ca005003fa0213ca0013cb0712cdcdc9ed5420b0bc1e');
|
|
1190
1928
|
const builder = beginCell();
|
|
1191
1929
|
builder.storeUint(0, 1);
|
|
1192
|
-
initEscrow_init_args({ $$type: 'Escrow_init_args', depositor, beneficiary,
|
|
1930
|
+
initEscrow_init_args({ $$type: 'Escrow_init_args', depositor, beneficiary, deadline, minArbiters, minStake, reputationContract, requireRepCollateral, minRepScore, baseSellerStake })(builder);
|
|
1193
1931
|
const __data = builder.endCell();
|
|
1194
1932
|
return { code: __code, data: __data };
|
|
1195
1933
|
}
|
|
@@ -1231,11 +1969,38 @@ export const Escrow_errors = {
|
|
|
1231
1969
|
135: { message: "Code of a contract was not found" },
|
|
1232
1970
|
136: { message: "Invalid standard address" },
|
|
1233
1971
|
138: { message: "Not a basechain address" },
|
|
1972
|
+
1185: { message: "Disputed — waiting for arbiter vote" },
|
|
1973
|
+
1933: { message: "Seller stake not required" },
|
|
1974
|
+
3977: { message: "Max arbiters reached" },
|
|
1234
1975
|
5721: { message: "Already settled" },
|
|
1235
|
-
|
|
1236
|
-
|
|
1976
|
+
9603: { message: "Not registered" },
|
|
1977
|
+
9959: { message: "Stake too low" },
|
|
1978
|
+
10757: { message: "Delivery confirmed — open a dispute to contest" },
|
|
1979
|
+
15501: { message: "Voting period ended" },
|
|
1980
|
+
15591: { message: "Depositor cannot be arbiter" },
|
|
1981
|
+
18953: { message: "Not an arbiter" },
|
|
1982
|
+
21498: { message: "Not enough arbiters yet" },
|
|
1983
|
+
22362: { message: "No active dispute" },
|
|
1984
|
+
23632: { message: "Only beneficiary (seller) can stake" },
|
|
1985
|
+
25639: { message: "Disputed — use voting" },
|
|
1986
|
+
25931: { message: "Already joined" },
|
|
1987
|
+
26711: { message: "Not settled yet" },
|
|
1988
|
+
29889: { message: "Did not vote" },
|
|
1989
|
+
37120: { message: "Beneficiary cannot be arbiter" },
|
|
1990
|
+
38875: { message: "Only depositor can confirm delivery" },
|
|
1991
|
+
40307: { message: "Already claimed or no stake" },
|
|
1237
1992
|
41415: { message: "No funds" },
|
|
1238
|
-
|
|
1993
|
+
44631: { message: "Already disputed" },
|
|
1994
|
+
44917: { message: "Only depositor can release" },
|
|
1995
|
+
48201: { message: "Deadline not reached" },
|
|
1996
|
+
50968: { message: "Must send TON as stake" },
|
|
1997
|
+
52264: { message: "Delivery not confirmed by buyer" },
|
|
1998
|
+
55595: { message: "Voting period not ended" },
|
|
1999
|
+
57996: { message: "Only depositor or beneficiary" },
|
|
2000
|
+
59369: { message: "Already voted" },
|
|
2001
|
+
59472: { message: "Already staked" },
|
|
2002
|
+
62001: { message: "Seller must stake first" },
|
|
2003
|
+
63309: { message: "Only depositor can refund before deadline" },
|
|
1239
2004
|
} as const
|
|
1240
2005
|
|
|
1241
2006
|
export const Escrow_errors_backward = {
|
|
@@ -1275,11 +2040,38 @@ export const Escrow_errors_backward = {
|
|
|
1275
2040
|
"Code of a contract was not found": 135,
|
|
1276
2041
|
"Invalid standard address": 136,
|
|
1277
2042
|
"Not a basechain address": 138,
|
|
2043
|
+
"Disputed — waiting for arbiter vote": 1185,
|
|
2044
|
+
"Seller stake not required": 1933,
|
|
2045
|
+
"Max arbiters reached": 3977,
|
|
1278
2046
|
"Already settled": 5721,
|
|
1279
|
-
"
|
|
1280
|
-
"
|
|
2047
|
+
"Not registered": 9603,
|
|
2048
|
+
"Stake too low": 9959,
|
|
2049
|
+
"Delivery confirmed — open a dispute to contest": 10757,
|
|
2050
|
+
"Voting period ended": 15501,
|
|
2051
|
+
"Depositor cannot be arbiter": 15591,
|
|
2052
|
+
"Not an arbiter": 18953,
|
|
2053
|
+
"Not enough arbiters yet": 21498,
|
|
2054
|
+
"No active dispute": 22362,
|
|
2055
|
+
"Only beneficiary (seller) can stake": 23632,
|
|
2056
|
+
"Disputed — use voting": 25639,
|
|
2057
|
+
"Already joined": 25931,
|
|
2058
|
+
"Not settled yet": 26711,
|
|
2059
|
+
"Did not vote": 29889,
|
|
2060
|
+
"Beneficiary cannot be arbiter": 37120,
|
|
2061
|
+
"Only depositor can confirm delivery": 38875,
|
|
2062
|
+
"Already claimed or no stake": 40307,
|
|
1281
2063
|
"No funds": 41415,
|
|
1282
|
-
"
|
|
2064
|
+
"Already disputed": 44631,
|
|
2065
|
+
"Only depositor can release": 44917,
|
|
2066
|
+
"Deadline not reached": 48201,
|
|
2067
|
+
"Must send TON as stake": 50968,
|
|
2068
|
+
"Delivery not confirmed by buyer": 52264,
|
|
2069
|
+
"Voting period not ended": 55595,
|
|
2070
|
+
"Only depositor or beneficiary": 57996,
|
|
2071
|
+
"Already voted": 59369,
|
|
2072
|
+
"Already staked": 59472,
|
|
2073
|
+
"Seller must stake first": 62001,
|
|
2074
|
+
"Only depositor can refund before deadline": 63309,
|
|
1283
2075
|
} as const
|
|
1284
2076
|
|
|
1285
2077
|
const Escrow_types: ABIType[] = [
|
|
@@ -1301,8 +2093,19 @@ const Escrow_types: ABIType[] = [
|
|
|
1301
2093
|
{"name":"Deposit","header":4171902866,"fields":[{"name":"queryId","type":{"kind":"simple","type":"uint","optional":false,"format":64}}]},
|
|
1302
2094
|
{"name":"Release","header":408342921,"fields":[{"name":"queryId","type":{"kind":"simple","type":"uint","optional":false,"format":64}}]},
|
|
1303
2095
|
{"name":"Refund","header":2214270485,"fields":[{"name":"queryId","type":{"kind":"simple","type":"uint","optional":false,"format":64}}]},
|
|
1304
|
-
{"name":"
|
|
1305
|
-
{"name":"
|
|
2096
|
+
{"name":"DeliveryConfirmed","header":3537337858,"fields":[{"name":"x402TxHash","type":{"kind":"simple","type":"string","optional":false}}]},
|
|
2097
|
+
{"name":"AutoRelease","header":1179475699,"fields":[]},
|
|
2098
|
+
{"name":"OpenDispute","header":2663435750,"fields":[]},
|
|
2099
|
+
{"name":"JoinDispute","header":3263842436,"fields":[]},
|
|
2100
|
+
{"name":"VoteRelease","header":44752475,"fields":[]},
|
|
2101
|
+
{"name":"VoteRefund","header":1287417331,"fields":[]},
|
|
2102
|
+
{"name":"ClaimReward","header":2151883269,"fields":[]},
|
|
2103
|
+
{"name":"FallbackSettle","header":3702460484,"fields":[]},
|
|
2104
|
+
{"name":"SellerStake","header":4053763055,"fields":[]},
|
|
2105
|
+
{"name":"NotifyDisputeOpened","header":796807257,"fields":[{"name":"escrowAddress","type":{"kind":"simple","type":"address","optional":false}},{"name":"depositor","type":{"kind":"simple","type":"address","optional":false}},{"name":"beneficiary","type":{"kind":"simple","type":"address","optional":false}},{"name":"amount","type":{"kind":"simple","type":"uint","optional":false,"format":"coins"}},{"name":"votingDeadline","type":{"kind":"simple","type":"uint","optional":false,"format":32}}]},
|
|
2106
|
+
{"name":"NotifyDisputeSettled","header":3214956934,"fields":[{"name":"escrowAddress","type":{"kind":"simple","type":"address","optional":false}},{"name":"released","type":{"kind":"simple","type":"bool","optional":false}},{"name":"refunded","type":{"kind":"simple","type":"bool","optional":false}}]},
|
|
2107
|
+
{"name":"EscrowData","header":null,"fields":[{"name":"depositor","type":{"kind":"simple","type":"address","optional":false}},{"name":"beneficiary","type":{"kind":"simple","type":"address","optional":false}},{"name":"reputationContract","type":{"kind":"simple","type":"address","optional":false}},{"name":"amount","type":{"kind":"simple","type":"uint","optional":false,"format":"coins"}},{"name":"deadline","type":{"kind":"simple","type":"uint","optional":false,"format":32}},{"name":"released","type":{"kind":"simple","type":"bool","optional":false}},{"name":"refunded","type":{"kind":"simple","type":"bool","optional":false}},{"name":"deliveryConfirmed","type":{"kind":"simple","type":"bool","optional":false}},{"name":"disputed","type":{"kind":"simple","type":"bool","optional":false}},{"name":"votingDeadline","type":{"kind":"simple","type":"uint","optional":false,"format":32}},{"name":"arbiterCount","type":{"kind":"simple","type":"uint","optional":false,"format":16}},{"name":"votesRelease","type":{"kind":"simple","type":"uint","optional":false,"format":16}},{"name":"votesRefund","type":{"kind":"simple","type":"uint","optional":false,"format":16}},{"name":"minArbiters","type":{"kind":"simple","type":"uint","optional":false,"format":8}},{"name":"minStake","type":{"kind":"simple","type":"uint","optional":false,"format":"coins"}},{"name":"sellerStake","type":{"kind":"simple","type":"uint","optional":false,"format":"coins"}},{"name":"sellerStaked","type":{"kind":"simple","type":"bool","optional":false}},{"name":"requireSellerStake","type":{"kind":"simple","type":"bool","optional":false}},{"name":"baseSellerStake","type":{"kind":"simple","type":"uint","optional":false,"format":"coins"}},{"name":"requireRepCollateral","type":{"kind":"simple","type":"bool","optional":false}},{"name":"minRepScore","type":{"kind":"simple","type":"uint","optional":false,"format":8}},{"name":"autoReleaseAvailable","type":{"kind":"simple","type":"bool","optional":false}},{"name":"refundAvailable","type":{"kind":"simple","type":"bool","optional":false}}]},
|
|
2108
|
+
{"name":"Escrow$Data","header":null,"fields":[{"name":"depositor","type":{"kind":"simple","type":"address","optional":false}},{"name":"beneficiary","type":{"kind":"simple","type":"address","optional":false}},{"name":"reputationContract","type":{"kind":"simple","type":"address","optional":false}},{"name":"amount","type":{"kind":"simple","type":"uint","optional":false,"format":"coins"}},{"name":"deadline","type":{"kind":"simple","type":"uint","optional":false,"format":32}},{"name":"released","type":{"kind":"simple","type":"bool","optional":false}},{"name":"refunded","type":{"kind":"simple","type":"bool","optional":false}},{"name":"deliveryConfirmed","type":{"kind":"simple","type":"bool","optional":false}},{"name":"disputed","type":{"kind":"simple","type":"bool","optional":false}},{"name":"votingDeadline","type":{"kind":"simple","type":"uint","optional":false,"format":32}},{"name":"minArbiters","type":{"kind":"simple","type":"uint","optional":false,"format":8}},{"name":"minStake","type":{"kind":"simple","type":"uint","optional":false,"format":"coins"}},{"name":"arbiters","type":{"kind":"dict","key":"int","value":"address"}},{"name":"arbiterIndex","type":{"kind":"dict","key":"address","value":"int"}},{"name":"stakes","type":{"kind":"dict","key":"int","value":"int"}},{"name":"voted","type":{"kind":"dict","key":"int","value":"bool"}},{"name":"votes","type":{"kind":"dict","key":"int","value":"bool"}},{"name":"arbiterCount","type":{"kind":"simple","type":"uint","optional":false,"format":16}},{"name":"votesRelease","type":{"kind":"simple","type":"uint","optional":false,"format":16}},{"name":"votesRefund","type":{"kind":"simple","type":"uint","optional":false,"format":16}},{"name":"sellerStake","type":{"kind":"simple","type":"uint","optional":false,"format":"coins"}},{"name":"sellerStaked","type":{"kind":"simple","type":"bool","optional":false}},{"name":"requireSellerStake","type":{"kind":"simple","type":"bool","optional":false}},{"name":"baseSellerStake","type":{"kind":"simple","type":"uint","optional":false,"format":"coins"}},{"name":"requireRepCollateral","type":{"kind":"simple","type":"bool","optional":false}},{"name":"minRepScore","type":{"kind":"simple","type":"uint","optional":false,"format":8}}]},
|
|
1306
2109
|
]
|
|
1307
2110
|
|
|
1308
2111
|
const Escrow_opcodes = {
|
|
@@ -1314,6 +2117,17 @@ const Escrow_opcodes = {
|
|
|
1314
2117
|
"Deposit": 4171902866,
|
|
1315
2118
|
"Release": 408342921,
|
|
1316
2119
|
"Refund": 2214270485,
|
|
2120
|
+
"DeliveryConfirmed": 3537337858,
|
|
2121
|
+
"AutoRelease": 1179475699,
|
|
2122
|
+
"OpenDispute": 2663435750,
|
|
2123
|
+
"JoinDispute": 3263842436,
|
|
2124
|
+
"VoteRelease": 44752475,
|
|
2125
|
+
"VoteRefund": 1287417331,
|
|
2126
|
+
"ClaimReward": 2151883269,
|
|
2127
|
+
"FallbackSettle": 3702460484,
|
|
2128
|
+
"SellerStake": 4053763055,
|
|
2129
|
+
"NotifyDisputeOpened": 796807257,
|
|
2130
|
+
"NotifyDisputeSettled": 3214956934,
|
|
1317
2131
|
}
|
|
1318
2132
|
|
|
1319
2133
|
const Escrow_getters: ABIGetter[] = [
|
|
@@ -1327,9 +2141,18 @@ export const Escrow_getterMapping: { [key: string]: string } = {
|
|
|
1327
2141
|
}
|
|
1328
2142
|
|
|
1329
2143
|
const Escrow_receivers: ABIReceiver[] = [
|
|
2144
|
+
{"receiver":"internal","message":{"kind":"typed","type":"SellerStake"}},
|
|
1330
2145
|
{"receiver":"internal","message":{"kind":"typed","type":"Deposit"}},
|
|
2146
|
+
{"receiver":"internal","message":{"kind":"typed","type":"DeliveryConfirmed"}},
|
|
1331
2147
|
{"receiver":"internal","message":{"kind":"typed","type":"Release"}},
|
|
1332
2148
|
{"receiver":"internal","message":{"kind":"typed","type":"Refund"}},
|
|
2149
|
+
{"receiver":"internal","message":{"kind":"typed","type":"AutoRelease"}},
|
|
2150
|
+
{"receiver":"internal","message":{"kind":"typed","type":"OpenDispute"}},
|
|
2151
|
+
{"receiver":"internal","message":{"kind":"typed","type":"JoinDispute"}},
|
|
2152
|
+
{"receiver":"internal","message":{"kind":"typed","type":"VoteRelease"}},
|
|
2153
|
+
{"receiver":"internal","message":{"kind":"typed","type":"VoteRefund"}},
|
|
2154
|
+
{"receiver":"internal","message":{"kind":"typed","type":"ClaimReward"}},
|
|
2155
|
+
{"receiver":"internal","message":{"kind":"typed","type":"FallbackSettle"}},
|
|
1333
2156
|
{"receiver":"internal","message":{"kind":"typed","type":"Deploy"}},
|
|
1334
2157
|
]
|
|
1335
2158
|
|
|
@@ -1340,12 +2163,12 @@ export class Escrow implements Contract {
|
|
|
1340
2163
|
public static readonly errors = Escrow_errors_backward;
|
|
1341
2164
|
public static readonly opcodes = Escrow_opcodes;
|
|
1342
2165
|
|
|
1343
|
-
static async init(depositor: Address, beneficiary: Address,
|
|
1344
|
-
return await Escrow_init(depositor, beneficiary,
|
|
2166
|
+
static async init(depositor: Address, beneficiary: Address, deadline: bigint, minArbiters: bigint, minStake: bigint, reputationContract: Address, requireRepCollateral: boolean, minRepScore: bigint, baseSellerStake: bigint) {
|
|
2167
|
+
return await Escrow_init(depositor, beneficiary, deadline, minArbiters, minStake, reputationContract, requireRepCollateral, minRepScore, baseSellerStake);
|
|
1345
2168
|
}
|
|
1346
2169
|
|
|
1347
|
-
static async fromInit(depositor: Address, beneficiary: Address,
|
|
1348
|
-
const __gen_init = await Escrow_init(depositor, beneficiary,
|
|
2170
|
+
static async fromInit(depositor: Address, beneficiary: Address, deadline: bigint, minArbiters: bigint, minStake: bigint, reputationContract: Address, requireRepCollateral: boolean, minRepScore: bigint, baseSellerStake: bigint) {
|
|
2171
|
+
const __gen_init = await Escrow_init(depositor, beneficiary, deadline, minArbiters, minStake, reputationContract, requireRepCollateral, minRepScore, baseSellerStake);
|
|
1349
2172
|
const address = contractAddress(0, __gen_init);
|
|
1350
2173
|
return new Escrow(address, __gen_init);
|
|
1351
2174
|
}
|
|
@@ -1368,18 +2191,45 @@ export class Escrow implements Contract {
|
|
|
1368
2191
|
this.init = init;
|
|
1369
2192
|
}
|
|
1370
2193
|
|
|
1371
|
-
async send(provider: ContractProvider, via: Sender, args: { value: bigint, bounce?: boolean| null | undefined }, message: Deposit | Release | Refund | Deploy) {
|
|
2194
|
+
async send(provider: ContractProvider, via: Sender, args: { value: bigint, bounce?: boolean| null | undefined }, message: SellerStake | Deposit | DeliveryConfirmed | Release | Refund | AutoRelease | OpenDispute | JoinDispute | VoteRelease | VoteRefund | ClaimReward | FallbackSettle | Deploy) {
|
|
1372
2195
|
|
|
1373
2196
|
let body: Cell | null = null;
|
|
2197
|
+
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'SellerStake') {
|
|
2198
|
+
body = beginCell().store(storeSellerStake(message)).endCell();
|
|
2199
|
+
}
|
|
1374
2200
|
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'Deposit') {
|
|
1375
2201
|
body = beginCell().store(storeDeposit(message)).endCell();
|
|
1376
2202
|
}
|
|
2203
|
+
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'DeliveryConfirmed') {
|
|
2204
|
+
body = beginCell().store(storeDeliveryConfirmed(message)).endCell();
|
|
2205
|
+
}
|
|
1377
2206
|
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'Release') {
|
|
1378
2207
|
body = beginCell().store(storeRelease(message)).endCell();
|
|
1379
2208
|
}
|
|
1380
2209
|
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'Refund') {
|
|
1381
2210
|
body = beginCell().store(storeRefund(message)).endCell();
|
|
1382
2211
|
}
|
|
2212
|
+
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'AutoRelease') {
|
|
2213
|
+
body = beginCell().store(storeAutoRelease(message)).endCell();
|
|
2214
|
+
}
|
|
2215
|
+
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'OpenDispute') {
|
|
2216
|
+
body = beginCell().store(storeOpenDispute(message)).endCell();
|
|
2217
|
+
}
|
|
2218
|
+
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'JoinDispute') {
|
|
2219
|
+
body = beginCell().store(storeJoinDispute(message)).endCell();
|
|
2220
|
+
}
|
|
2221
|
+
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'VoteRelease') {
|
|
2222
|
+
body = beginCell().store(storeVoteRelease(message)).endCell();
|
|
2223
|
+
}
|
|
2224
|
+
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'VoteRefund') {
|
|
2225
|
+
body = beginCell().store(storeVoteRefund(message)).endCell();
|
|
2226
|
+
}
|
|
2227
|
+
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'ClaimReward') {
|
|
2228
|
+
body = beginCell().store(storeClaimReward(message)).endCell();
|
|
2229
|
+
}
|
|
2230
|
+
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'FallbackSettle') {
|
|
2231
|
+
body = beginCell().store(storeFallbackSettle(message)).endCell();
|
|
2232
|
+
}
|
|
1383
2233
|
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'Deploy') {
|
|
1384
2234
|
body = beginCell().store(storeDeploy(message)).endCell();
|
|
1385
2235
|
}
|