@socket.tech/dl-common 1.0.6 → 1.0.7
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/dist/dl-common/constants/confirmations.d.ts +5 -0
- package/dist/dl-common/constants/confirmations.js +17 -0
- package/dist/dl-common/constants/enums.d.ts +44 -0
- package/dist/dl-common/constants/enums.js +52 -0
- package/dist/dl-common/constants/index.d.ts +3 -0
- package/dist/dl-common/constants/index.js +19 -0
- package/dist/dl-common/constants/types.d.ts +126 -0
- package/dist/dl-common/constants/types.js +45 -0
- package/dist/dl-common/constants/waitTime.d.ts +8 -0
- package/dist/dl-common/constants/waitTime.js +49 -0
- package/dist/dl-common/index.d.ts +4 -0
- package/dist/dl-common/index.js +20 -0
- package/dist/dl-common/models/attestSignature.d.ts +35 -0
- package/dist/dl-common/models/attestSignature.js +53 -0
- package/dist/dl-common/models/attestation.d.ts +70 -0
- package/dist/dl-common/models/attestation.js +86 -0
- package/dist/dl-common/models/index.d.ts +7 -0
- package/dist/dl-common/models/index.js +23 -0
- package/dist/dl-common/models/lastBlock.d.ts +28 -0
- package/dist/dl-common/models/lastBlock.js +27 -0
- package/dist/dl-common/models/message.d.ts +166 -0
- package/dist/dl-common/models/message.js +183 -0
- package/dist/dl-common/models/packet.d.ts +241 -0
- package/dist/dl-common/models/packet.js +250 -0
- package/dist/dl-common/models/proposal.d.ts +127 -0
- package/dist/dl-common/models/proposal.js +141 -0
- package/dist/dl-common/models/switchboard.d.ts +69 -0
- package/dist/dl-common/models/switchboard.js +92 -0
- package/dist/dl-common/models/transaction.d.ts +0 -0
- package/dist/dl-common/models/transaction.js +280 -0
- package/dist/dl-common/services/cacheService.d.ts +14 -0
- package/dist/dl-common/services/cacheService.js +77 -0
- package/dist/dl-common/services/eventBridgeService.d.ts +8 -0
- package/dist/dl-common/services/eventBridgeService.js +40 -0
- package/dist/dl-common/services/index.d.ts +3 -0
- package/dist/dl-common/services/index.js +20 -0
- package/dist/dl-common/services/queueService.d.ts +10 -0
- package/dist/dl-common/services/queueService.js +62 -0
- package/dist/dl-common/utils/address.d.ts +2 -0
- package/dist/dl-common/utils/address.js +8 -0
- package/dist/dl-common/utils/axios.d.ts +2 -0
- package/dist/dl-common/utils/axios.js +54 -0
- package/dist/dl-common/utils/dataStructHelper.d.ts +2 -0
- package/dist/dl-common/utils/dataStructHelper.js +10 -0
- package/dist/dl-common/utils/discord.d.ts +2 -0
- package/dist/dl-common/utils/discord.js +35 -0
- package/dist/dl-common/utils/ethersAwsKmsSigner.d.ts +2 -0
- package/dist/dl-common/utils/ethersAwsKmsSigner.js +26 -0
- package/dist/dl-common/utils/eventGetter.d.ts +4 -0
- package/dist/dl-common/utils/eventGetter.js +50 -0
- package/dist/dl-common/utils/extraUtils.d.ts +32 -0
- package/dist/dl-common/utils/extraUtils.js +103 -0
- package/dist/dl-common/utils/idUtils.d.ts +14 -0
- package/dist/dl-common/utils/idUtils.js +50 -0
- package/dist/dl-common/utils/index.d.ts +13 -0
- package/dist/dl-common/utils/index.js +29 -0
- package/dist/dl-common/utils/relaySigner.d.ts +21 -0
- package/dist/dl-common/utils/relaySigner.js +68 -0
- package/dist/dl-common/utils/s3Service.d.ts +5 -0
- package/dist/dl-common/utils/s3Service.js +45 -0
- package/dist/dl-common/utils/secretManagerService.d.ts +2 -0
- package/dist/dl-common/utils/secretManagerService.js +33 -0
- package/dist/dl-common/utils/signer/adapter.d.ts +18 -0
- package/dist/dl-common/utils/signer/adapter.js +71 -0
- package/dist/dl-common/utils/signer/address.d.ts +10 -0
- package/dist/dl-common/utils/signer/address.js +42 -0
- package/dist/dl-common/utils/signer/asn1-parser.d.ts +11 -0
- package/dist/dl-common/utils/signer/asn1-parser.js +80 -0
- package/dist/dl-common/utils/signer/crypto.d.ts +6 -0
- package/dist/dl-common/utils/signer/crypto.js +34 -0
- package/dist/dl-common/utils/signer/index.d.ts +4 -0
- package/dist/dl-common/utils/signer/index.js +20 -0
- package/dist/dl-common/utils/signer/kms-ethers-signer.d.ts +19 -0
- package/dist/dl-common/utils/signer/kms-ethers-signer.js +32 -0
- package/dist/dl-common/utils/signer/kms-signer.d.ts +14 -0
- package/dist/dl-common/utils/signer/kms-signer.js +46 -0
- package/dist/dl-common/utils/signer/signature.d.ts +17 -0
- package/dist/dl-common/utils/signer/signature.js +65 -0
- package/dist/dl-common/utils/signer/signer.d.ts +7 -0
- package/dist/dl-common/utils/signer/signer.js +2 -0
- package/dist/dl-common/utils/time.d.ts +2 -0
- package/dist/dl-common/utils/time.js +7 -0
- package/dist/index.js +30 -14
- package/dist/src/constants/batcherModes.d.ts +7 -0
- package/dist/src/constants/batcherModes.js +56 -0
- package/dist/src/constants/config.d.ts +39 -0
- package/dist/src/constants/config.js +77 -0
- package/dist/src/constants/enums.d.ts +21 -0
- package/dist/src/constants/enums.js +27 -0
- package/dist/src/constants/gasEstimation.d.ts +8 -0
- package/dist/src/constants/gasEstimation.js +61 -0
- package/dist/src/constants/index.d.ts +11 -0
- package/dist/src/constants/index.js +28 -0
- package/dist/src/constants/limits.d.ts +21 -0
- package/dist/src/constants/limits.js +91 -0
- package/dist/src/constants/prometheus.config.d.ts +43 -0
- package/dist/src/constants/prometheus.config.js +316 -0
- package/dist/src/constants/relayer.d.ts +6 -0
- package/dist/src/constants/relayer.js +15 -0
- package/dist/src/constants/s3Config.d.ts +13 -0
- package/dist/src/constants/s3Config.js +61 -0
- package/dist/src/constants/stageConfig.d.ts +7 -0
- package/dist/src/constants/stageConfig.js +24 -0
- package/dist/src/constants/types.d.ts +45 -0
- package/dist/src/constants/types.js +2 -0
- package/dist/src/constants/watchers.d.ts +15 -0
- package/dist/src/constants/watchers.js +137 -0
- package/dist/src/controllers/index.d.ts +0 -0
- package/dist/src/controllers/index.js +3 -0
- package/dist/src/db/associations.d.ts +1 -0
- package/dist/src/db/associations.js +46 -0
- package/dist/src/db/connection.d.ts +4 -0
- package/dist/src/db/connection.js +73 -0
- package/dist/src/db/index.d.ts +2 -0
- package/dist/src/db/index.js +18 -0
- package/dist/src/db/init.d.ts +2 -0
- package/dist/src/db/init.js +27 -0
- package/dist/src/handlers/common.d.ts +2 -0
- package/dist/src/handlers/common.js +59 -0
- package/dist/src/handlers/cronHandler.d.ts +10 -0
- package/dist/src/handlers/cronHandler.js +268 -0
- package/dist/src/handlers/executeHandler.d.ts +3 -0
- package/dist/src/handlers/executeHandler.js +66 -0
- package/dist/src/handlers/handler.d.ts +2 -0
- package/dist/src/handlers/handler.js +29 -0
- package/dist/src/handlers/proposeHandler.d.ts +3 -0
- package/dist/src/handlers/proposeHandler.js +69 -0
- package/dist/src/handlers/routes.d.ts +2 -0
- package/dist/src/handlers/routes.js +26 -0
- package/dist/src/handlers/sealHandler.d.ts +4 -0
- package/dist/src/handlers/sealHandler.js +245 -0
- package/dist/src/handlers/statusHandler.d.ts +5 -0
- package/dist/src/handlers/statusHandler.js +116 -0
- package/dist/src/handlers/taskHandler.d.ts +2 -0
- package/dist/src/handlers/taskHandler.js +110 -0
- package/dist/src/handlers/testHandler.d.ts +4 -0
- package/dist/src/handlers/testHandler.js +99 -0
- package/dist/src/main.d.ts +0 -0
- package/dist/src/main.js +12 -0
- package/dist/src/relayers/common.d.ts +7 -0
- package/dist/src/relayers/common.js +55 -0
- package/dist/src/relayers/index.d.ts +2 -0
- package/dist/src/relayers/index.js +19 -0
- package/dist/src/relayers/proposeRelayer.d.ts +7 -0
- package/dist/src/relayers/proposeRelayer.js +587 -0
- package/dist/src/relayers/sealRelayer.d.ts +8 -0
- package/dist/src/relayers/sealRelayer.js +276 -0
- package/dist/src/services/attestService.d.ts +45 -0
- package/dist/src/services/attestService.js +269 -0
- package/dist/src/services/batcherService.d.ts +9 -0
- package/dist/src/services/batcherService.js +197 -0
- package/dist/src/services/executeService.d.ts +16 -0
- package/dist/src/services/executeService.js +209 -0
- package/dist/src/services/gasEstimationService.d.ts +3 -0
- package/dist/src/services/gasEstimationService.js +12 -0
- package/dist/src/services/index.d.ts +4 -0
- package/dist/src/services/index.js +23 -0
- package/dist/src/services/indexSealService.d.ts +15 -0
- package/dist/src/services/indexSealService.js +120 -0
- package/dist/src/services/proposalCheckService.d.ts +9 -0
- package/dist/src/services/proposalCheckService.js +119 -0
- package/dist/src/services/sealService.d.ts +27 -0
- package/dist/src/services/sealService.js +190 -0
- package/dist/src/statusTrackers/failedMessage.d.ts +8 -0
- package/dist/src/statusTrackers/failedMessage.js +72 -0
- package/dist/src/statusTrackers/failedPacket.d.ts +13 -0
- package/dist/src/statusTrackers/failedPacket.js +110 -0
- package/dist/src/statusTrackers/index.d.ts +3 -0
- package/dist/src/statusTrackers/index.js +26 -0
- package/dist/src/statusTrackers/message.d.ts +4 -0
- package/dist/src/statusTrackers/message.js +257 -0
- package/dist/src/statusTrackers/packet.d.ts +33 -0
- package/dist/src/statusTrackers/packet.js +477 -0
- package/dist/src/utils/chain-utils.d.ts +5 -0
- package/dist/src/utils/chain-utils.js +42 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/index.js +18 -0
- package/dist/src/utils/logger.d.ts +9 -0
- package/dist/src/utils/logger.js +9 -0
- package/dist/utils/s3Service.js +1 -1
- package/dist/utils/signer/socketSigner.d.ts +32 -0
- package/dist/utils/signer/socketSigner.js +121 -0
- package/package.json +1 -1
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBatchDataArgs = exports.checkGasLimitAndAddToBatch = exports.calculateBatchGasLimit = void 0;
|
|
4
|
+
const dl_core_1 = require("@socket.tech/dl-core");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
const ethers_1 = require("ethers");
|
|
7
|
+
const gasEstimation_1 = require("../constants/gasEstimation");
|
|
8
|
+
const gasEstimationService_1 = require("./gasEstimationService");
|
|
9
|
+
const common_1 = require("../relayers/common");
|
|
10
|
+
const utils_1 = require("../utils");
|
|
11
|
+
const calculateBatchGasLimit = async (dstChainSlug, currentBatch) => {
|
|
12
|
+
try {
|
|
13
|
+
const start = Date.now();
|
|
14
|
+
let totalGasLimit = 0;
|
|
15
|
+
const socketBatcher = await (0, common_1.getSocketBatcher)(dstChainSlug, {}, false);
|
|
16
|
+
const socketAddress = (0, common_1.getSocketAddress)(dstChainSlug);
|
|
17
|
+
(0, utils_1.logInfo)({
|
|
18
|
+
info: "ESTIMATING_GAS_PROPOSE_RELAY",
|
|
19
|
+
packetIds: currentBatch.proposeBatchDataArgs.map((a) => a[0]),
|
|
20
|
+
messageIds: [],
|
|
21
|
+
});
|
|
22
|
+
const proposeAttestGasEstimate = await socketBatcher.estimateGas.sendBatch(socketAddress,
|
|
23
|
+
// switchboardAddress, // this may change if we have multiple switchboards. this works only for
|
|
24
|
+
// fast switchboard case
|
|
25
|
+
[], // for sealBatch
|
|
26
|
+
currentBatch.proposeBatchDataArgs, currentBatch.attestBatchDataArgs, [], {
|
|
27
|
+
value: currentBatch.totalMsgValue.toHexString(),
|
|
28
|
+
});
|
|
29
|
+
totalGasLimit += proposeAttestGasEstimate.toNumber();
|
|
30
|
+
for (const [executionDetails, messageDetails,] of currentBatch.executeBatchDataArgs) {
|
|
31
|
+
totalGasLimit += executionDetails[2].toNumber();
|
|
32
|
+
}
|
|
33
|
+
totalGasLimit = Math.floor(1.1 * totalGasLimit + 100000); // for safety
|
|
34
|
+
currentBatch.totalGasLimit = totalGasLimit;
|
|
35
|
+
(0, utils_1.logInfo)({
|
|
36
|
+
info: "FINAL_GAS_LIMIT",
|
|
37
|
+
totalGasLimit,
|
|
38
|
+
packetIds: currentBatch.proposeBatchDataArgs.map((a) => a[0]),
|
|
39
|
+
timeTaken: Date.now() - start,
|
|
40
|
+
messageIds: [],
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
console.log("Error in calculateBatchGasLimit", error);
|
|
45
|
+
}
|
|
46
|
+
return currentBatch;
|
|
47
|
+
};
|
|
48
|
+
exports.calculateBatchGasLimit = calculateBatchGasLimit;
|
|
49
|
+
const checkGasLimitAndAddToBatch = async (dstChainSlug, currentGasLimit, currentBatch, batchArgsArray) => {
|
|
50
|
+
const maxGasLimit = (0, gasEstimation_1.getMaxGasLimit)(dstChainSlug);
|
|
51
|
+
// console.log("maxGasLimit", maxGasLimit);
|
|
52
|
+
if (currentGasLimit > maxGasLimit) {
|
|
53
|
+
currentBatch = await (0, exports.calculateBatchGasLimit)(dstChainSlug, currentBatch);
|
|
54
|
+
// console.log(currentBatch.proposeRowIds, currentBatch.attestRowIds, currentBatch.messageRowIds);
|
|
55
|
+
batchArgsArray.push(currentBatch);
|
|
56
|
+
currentBatch = {
|
|
57
|
+
proposeBatchDataArgs: [],
|
|
58
|
+
attestBatchDataArgs: [],
|
|
59
|
+
executeBatchDataArgs: [],
|
|
60
|
+
totalMsgValue: ethers_1.BigNumber.from(0),
|
|
61
|
+
totalGasLimit: 0,
|
|
62
|
+
proposeRowIds: [],
|
|
63
|
+
attestRowIds: [],
|
|
64
|
+
messageRowIds: [],
|
|
65
|
+
};
|
|
66
|
+
currentGasLimit = 0;
|
|
67
|
+
}
|
|
68
|
+
return { currentGasLimit, batchArgsArray, currentBatch };
|
|
69
|
+
};
|
|
70
|
+
exports.checkGasLimitAndAddToBatch = checkGasLimitAndAddToBatch;
|
|
71
|
+
const getBatchDataArgs = async (packets, packetAttestSignatures, packetProposalCounts) => {
|
|
72
|
+
let currentGasLimit = 0;
|
|
73
|
+
let packetGasLimit = 0;
|
|
74
|
+
let skip = false;
|
|
75
|
+
let batchArgsArray = [];
|
|
76
|
+
let currentBatch = {
|
|
77
|
+
proposeBatchDataArgs: [],
|
|
78
|
+
attestBatchDataArgs: [],
|
|
79
|
+
executeBatchDataArgs: [],
|
|
80
|
+
totalMsgValue: ethers_1.BigNumber.from(0),
|
|
81
|
+
totalGasLimit: 0,
|
|
82
|
+
proposeRowIds: [],
|
|
83
|
+
attestRowIds: [],
|
|
84
|
+
messageRowIds: [],
|
|
85
|
+
};
|
|
86
|
+
for (const packet of packets) {
|
|
87
|
+
// before start of every iteration, check if currentGasLimit is greater than
|
|
88
|
+
// maxGasLimit and reset packetGasLimit. Ignored on first iteration.
|
|
89
|
+
currentGasLimit += packetGasLimit;
|
|
90
|
+
({ currentGasLimit, currentBatch, batchArgsArray } =
|
|
91
|
+
await (0, exports.checkGasLimitAndAddToBatch)(packet.dstChainSlug, currentGasLimit, currentBatch, batchArgsArray));
|
|
92
|
+
packetGasLimit = 0;
|
|
93
|
+
skip = false;
|
|
94
|
+
({ currentBatch, packetGasLimit, skip } = await addProposeArgs(packet, currentBatch, packetGasLimit));
|
|
95
|
+
if (skip)
|
|
96
|
+
continue;
|
|
97
|
+
({ currentBatch, packetGasLimit, skip } = await addAttestArgs(packet, packetAttestSignatures, packetProposalCounts, currentBatch, packetGasLimit));
|
|
98
|
+
if (skip)
|
|
99
|
+
continue;
|
|
100
|
+
if (!constants_1.executeRelayMode)
|
|
101
|
+
continue;
|
|
102
|
+
({ currentBatch, packetGasLimit, skip } = await addExecuteArgs(packet, currentBatch, packetGasLimit, packetProposalCounts));
|
|
103
|
+
if (skip)
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
if (currentBatch.proposeBatchDataArgs.length > 0 ||
|
|
107
|
+
currentBatch.attestBatchDataArgs.length > 0 ||
|
|
108
|
+
currentBatch.executeBatchDataArgs.length > 0) {
|
|
109
|
+
currentBatch = await (0, exports.calculateBatchGasLimit)(packets[0].dstChainSlug, currentBatch);
|
|
110
|
+
batchArgsArray.push(currentBatch);
|
|
111
|
+
}
|
|
112
|
+
return batchArgsArray;
|
|
113
|
+
};
|
|
114
|
+
exports.getBatchDataArgs = getBatchDataArgs;
|
|
115
|
+
const addProposeArgs = async (packet, currentBatch, packetGasLimit) => {
|
|
116
|
+
// If not proposed, and proposeRelayMode is also false, no point in continuing.
|
|
117
|
+
// If proposeRelayMode is false, but isProposed is true, we can still proceed if
|
|
118
|
+
// attest and execute is pending (and their relay mode is true)
|
|
119
|
+
if (!constants_1.proposeRelayMode && !packet.isProposed) {
|
|
120
|
+
return { currentBatch, packetGasLimit, skip: true };
|
|
121
|
+
}
|
|
122
|
+
if (!packet.isProposed) {
|
|
123
|
+
currentBatch.proposeBatchDataArgs.push([
|
|
124
|
+
packet.packetId,
|
|
125
|
+
packet.root,
|
|
126
|
+
packet.dstSwitchboard,
|
|
127
|
+
packet.sealSignature,
|
|
128
|
+
]);
|
|
129
|
+
currentBatch.proposeRowIds.push(packet.id);
|
|
130
|
+
const proposeGasLimit = await (0, gasEstimationService_1.getProposeGasLimit)(packet.dstChainSlug);
|
|
131
|
+
packetGasLimit += proposeGasLimit;
|
|
132
|
+
}
|
|
133
|
+
return { currentBatch, packetGasLimit, skip: false };
|
|
134
|
+
};
|
|
135
|
+
const addAttestArgs = async (packet, packetAttestSignatures, packetProposalCounts, currentBatch, packetGasLimit) => {
|
|
136
|
+
// if fast integration type and not attested, and got enough signatures, add to attest batch.
|
|
137
|
+
// if not attested and didnt get enough signatures, continue from here.
|
|
138
|
+
// attestRelayMode check inside attestService. we get empty packetAttestSignatures
|
|
139
|
+
// and therefore no attestations, and no message execution(if attestation pending).
|
|
140
|
+
var _a;
|
|
141
|
+
if ([dl_core_1.IntegrationTypes.fast, dl_core_1.IntegrationTypes.fast2].includes(packet.integrationType) &&
|
|
142
|
+
!packet.isAttested) {
|
|
143
|
+
if ((_a = packetAttestSignatures[packet.packetId]) === null || _a === void 0 ? void 0 : _a.length) {
|
|
144
|
+
const attestGasLimit = await (0, gasEstimationService_1.getAttestGasLimit)(packet.dstChainSlug);
|
|
145
|
+
packetAttestSignatures[packet.packetId].map(async (signature) => {
|
|
146
|
+
currentBatch.attestBatchDataArgs.push([
|
|
147
|
+
packet.dstSwitchboard,
|
|
148
|
+
packet.packetId,
|
|
149
|
+
packetProposalCounts[packet.packetId].count,
|
|
150
|
+
packet.root,
|
|
151
|
+
signature,
|
|
152
|
+
]);
|
|
153
|
+
packetGasLimit += attestGasLimit;
|
|
154
|
+
});
|
|
155
|
+
currentBatch.attestRowIds.push(packet.id);
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
// If not already attested, and didnt get enough signatures now as well, no point
|
|
159
|
+
// batching message execution. continue from here.
|
|
160
|
+
return { currentBatch, packetGasLimit, skip: true };
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return { currentBatch, packetGasLimit, skip: false };
|
|
164
|
+
};
|
|
165
|
+
const addExecuteArgs = async (packet, currentBatch, packetGasLimit, packetProposalCounts) => {
|
|
166
|
+
// while getting isProposed false packets, we might get native packets
|
|
167
|
+
// with isVerified false, but valid message. skip their execution.
|
|
168
|
+
// wont appear in query again as soon as proposed.
|
|
169
|
+
if ([dl_core_1.IntegrationTypes.native, dl_core_1.IntegrationTypes.optimistic].includes(packet.integrationType) &&
|
|
170
|
+
!packet.isVerified)
|
|
171
|
+
return { currentBatch, packetGasLimit, skip: true };
|
|
172
|
+
const messages = packet.Messages;
|
|
173
|
+
if (messages === null || messages === void 0 ? void 0 : messages.length)
|
|
174
|
+
for (const message of messages) {
|
|
175
|
+
const { retry, messageId, executeMsgGasLimit, executeSignature, inboundSuccess, packetId, decapacitorProof, executionFee, minMsgGasLimit, executionParams, payload, id, } = message;
|
|
176
|
+
currentBatch.messageRowIds.push(id);
|
|
177
|
+
if (executionParams.slice(0, 4) !== "0x00") {
|
|
178
|
+
const msgValue = ethers_1.BigNumber.from("0x" + executionParams.slice(4));
|
|
179
|
+
currentBatch.totalMsgValue = currentBatch.totalMsgValue.add(msgValue);
|
|
180
|
+
}
|
|
181
|
+
currentBatch.executeBatchDataArgs.push([
|
|
182
|
+
// executionDetails,
|
|
183
|
+
[
|
|
184
|
+
packetId,
|
|
185
|
+
packetProposalCounts[packetId].count,
|
|
186
|
+
ethers_1.BigNumber.from(executeMsgGasLimit),
|
|
187
|
+
decapacitorProof,
|
|
188
|
+
executeSignature,
|
|
189
|
+
],
|
|
190
|
+
// msgDetails
|
|
191
|
+
[messageId, executionFee, minMsgGasLimit, executionParams, payload],
|
|
192
|
+
]);
|
|
193
|
+
const executeGasLimit = ethers_1.BigNumber.from(executeMsgGasLimit).toNumber();
|
|
194
|
+
packetGasLimit += executeGasLimit;
|
|
195
|
+
}
|
|
196
|
+
return { currentBatch, packetGasLimit, skip: false };
|
|
197
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ChainSlug } from "@socket.tech/dl-core";
|
|
2
|
+
import { type ExecuteSigResponse } from "../../dl-common/constants";
|
|
3
|
+
export interface ExecuteSigRequest {
|
|
4
|
+
messageId: string;
|
|
5
|
+
destPlug: string;
|
|
6
|
+
srcPlug: string;
|
|
7
|
+
dstChainSlug: ChainSlug;
|
|
8
|
+
srcChainSlug: ChainSlug;
|
|
9
|
+
payload: string;
|
|
10
|
+
minMsgGasLimit: string;
|
|
11
|
+
executionParams: string;
|
|
12
|
+
packedMessage: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const sendRetrySimulationRequest: () => Promise<void>;
|
|
15
|
+
export declare const sendPendingSimulationRequest: () => Promise<void>;
|
|
16
|
+
export declare const saveMessageSimulationResponse: (executeResponseData: ExecuteSigResponse[]) => Promise<void>;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.saveMessageSimulationResponse = exports.sendPendingSimulationRequest = exports.sendRetrySimulationRequest = void 0;
|
|
4
|
+
const utils_1 = require("../../dl-common/utils");
|
|
5
|
+
const utils_2 = require("../utils");
|
|
6
|
+
const constants_1 = require("../constants");
|
|
7
|
+
const models_1 = require("../../dl-common/models");
|
|
8
|
+
const sequelize_1 = require("sequelize");
|
|
9
|
+
const prometheus_config_1 = require("../constants/prometheus.config");
|
|
10
|
+
const constants_2 = require("../../dl-common/constants");
|
|
11
|
+
const ethers_1 = require("ethers");
|
|
12
|
+
const sendRequest = async (messages) => {
|
|
13
|
+
const executeRequestData = [];
|
|
14
|
+
const start = Date.now();
|
|
15
|
+
for (const message of messages) {
|
|
16
|
+
executeRequestData.push({
|
|
17
|
+
messageId: message.messageId,
|
|
18
|
+
destPlug: message.destPlug,
|
|
19
|
+
srcPlug: message.srcPlug,
|
|
20
|
+
dstChainSlug: message.dstChainSlug,
|
|
21
|
+
srcChainSlug: message.srcChainSlug,
|
|
22
|
+
payload: message.payload,
|
|
23
|
+
minMsgGasLimit: message.minMsgGasLimit,
|
|
24
|
+
executionParams: message.executionParams,
|
|
25
|
+
packedMessage: message.packedMessage,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
(0, utils_2.logInfo)({
|
|
29
|
+
info: "EXECUTOR_POST_API_CALLING",
|
|
30
|
+
messageIds: messages.map((m) => m.messageId),
|
|
31
|
+
start,
|
|
32
|
+
packetIds: [],
|
|
33
|
+
});
|
|
34
|
+
if (constants_1.EXECUTOR_URL) {
|
|
35
|
+
const response = await (0, utils_1.axiosPost)(constants_1.EXECUTOR_URL, { messageData: executeRequestData }, { headers: { "x-auth-token": constants_1.EXECUTOR_AUTH_TOKEN } });
|
|
36
|
+
(0, utils_2.logInfo)({
|
|
37
|
+
info: "EXECUTOR_POST_API_CALLED",
|
|
38
|
+
messageIds: messages.map((m) => m.messageId),
|
|
39
|
+
packetIds: [],
|
|
40
|
+
end: Date.now() - start,
|
|
41
|
+
response,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
// @review throw here?
|
|
46
|
+
console.log("Call to executor failed");
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const sendRetrySimulationRequest = async () => {
|
|
50
|
+
try {
|
|
51
|
+
const messages = await getRetrySimulationMessages();
|
|
52
|
+
if (messages.length == 0)
|
|
53
|
+
return;
|
|
54
|
+
(0, utils_2.logInfo)({
|
|
55
|
+
info: "RETRY_SIMULATION_REQUEST",
|
|
56
|
+
msgCount: messages.length,
|
|
57
|
+
messageIds: messages.map((m) => m.messageId),
|
|
58
|
+
packetIds: [],
|
|
59
|
+
});
|
|
60
|
+
const messagesAsChunks = [...(0, utils_1.chunks)(messages, constants_1.executeBatchRelayLimit)];
|
|
61
|
+
for (const chunk of messagesAsChunks)
|
|
62
|
+
await sendRequest(chunk);
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
console.log("error while sending retry simulation request: ", error);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports.sendRetrySimulationRequest = sendRetrySimulationRequest;
|
|
69
|
+
const sendPendingSimulationRequest = async () => {
|
|
70
|
+
try {
|
|
71
|
+
const messages = await getPendingSimulationMessages();
|
|
72
|
+
if (messages.length > 0) {
|
|
73
|
+
(0, utils_2.logInfo)({
|
|
74
|
+
info: "PENDING_SIMULATION_REQUEST",
|
|
75
|
+
msgCount: messages.length,
|
|
76
|
+
messageIds: messages.map((m) => m.messageId),
|
|
77
|
+
packetIds: [],
|
|
78
|
+
});
|
|
79
|
+
const messagesAsChunks = [...(0, utils_1.chunks)(messages, constants_1.executeBatchRelayLimit)];
|
|
80
|
+
for (const chunk of messagesAsChunks)
|
|
81
|
+
await sendRequest(chunk);
|
|
82
|
+
(0, utils_2.logInfo)({
|
|
83
|
+
info: "PENDING_SIMULATION_REQUEST_SENT",
|
|
84
|
+
messageIds: messages.map((m) => m.messageId),
|
|
85
|
+
packetIds: [],
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
console.log("error while sendMessageSimulationRequest request: ", error);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
exports.sendPendingSimulationRequest = sendPendingSimulationRequest;
|
|
94
|
+
const saveMessageSimulationResponse = async (executeResponseData) => {
|
|
95
|
+
if (!(executeResponseData === null || executeResponseData === void 0 ? void 0 : executeResponseData.length))
|
|
96
|
+
return;
|
|
97
|
+
const messageIds = [];
|
|
98
|
+
executeResponseData.map((data) => {
|
|
99
|
+
messageIds.push(data.messageId);
|
|
100
|
+
});
|
|
101
|
+
const messages = await models_1.Message.findAll({
|
|
102
|
+
where: {
|
|
103
|
+
messageId: { [sequelize_1.Op.in]: messageIds },
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
const messageMap = new Map();
|
|
107
|
+
messages.forEach((message) => {
|
|
108
|
+
messageMap.set(message.messageId, message);
|
|
109
|
+
});
|
|
110
|
+
if (executeResponseData === null || executeResponseData === void 0 ? void 0 : executeResponseData.length) {
|
|
111
|
+
executeResponseData = executeResponseData.map((data) => {
|
|
112
|
+
var _a;
|
|
113
|
+
const firstSimulationTimestamp = Math.floor(Date.now() / 1000);
|
|
114
|
+
let executeRelayStatus = models_1.ExecutionRelayStatus.NO;
|
|
115
|
+
const MaxMsgGasLimit = (0, constants_1.getMaxMsgGasLimit)((_a = messageMap.get(data.messageId)) === null || _a === void 0 ? void 0 : _a.dstChainSlug);
|
|
116
|
+
// mark ignored if msgGasLimit mentioned is too big
|
|
117
|
+
if (ethers_1.BigNumber.from(data.executeMsgGasLimit).gt(MaxMsgGasLimit)) {
|
|
118
|
+
executeRelayStatus = models_1.ExecutionRelayStatus.IGNORED;
|
|
119
|
+
}
|
|
120
|
+
if (data.inboundRevertString === constants_2.ErrorReasons.ZERO_AMOUNT) {
|
|
121
|
+
executeRelayStatus = models_1.ExecutionRelayStatus.IGNORED;
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
...data,
|
|
125
|
+
firstSimulationTimestamp,
|
|
126
|
+
executeRelayStatus,
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
(0, utils_2.logInfo)({
|
|
130
|
+
info: "UPDATING_SIMULATION_STATES",
|
|
131
|
+
msgCount: executeResponseData.length,
|
|
132
|
+
messageIds: executeResponseData.map((m) => m.messageId),
|
|
133
|
+
packetIds: [],
|
|
134
|
+
});
|
|
135
|
+
await saveMessageUpdates(executeResponseData);
|
|
136
|
+
(0, utils_2.logInfo)({
|
|
137
|
+
info: "UPDATED_SIMULATION_STATES",
|
|
138
|
+
messageIds: executeResponseData.map((m) => m.messageId),
|
|
139
|
+
packetIds: [],
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
messages.forEach((message) => {
|
|
143
|
+
(0, prometheus_config_1.observeHistogram)(prometheus_config_1.relayMetrics.executeRelay.signHistogram, {
|
|
144
|
+
labels: {
|
|
145
|
+
[prometheus_config_1.Labels.SRC_CHAIN_SLUG]: message.srcChainSlug,
|
|
146
|
+
[prometheus_config_1.Labels.DST_CHAIN_SLUG]: message.dstChainSlug,
|
|
147
|
+
},
|
|
148
|
+
timeDiff: (0, utils_1.currentTimestampInSeconds)() - message.outboundTime,
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
};
|
|
152
|
+
exports.saveMessageSimulationResponse = saveMessageSimulationResponse;
|
|
153
|
+
const saveMessageUpdates = async (dbUpdates) => {
|
|
154
|
+
try {
|
|
155
|
+
// TODO: fix this
|
|
156
|
+
// @ts-expect-error
|
|
157
|
+
await models_1.Message.bulkCreate(dbUpdates, {
|
|
158
|
+
updateOnDuplicate: [
|
|
159
|
+
"retry",
|
|
160
|
+
"inboundSuccess",
|
|
161
|
+
"inboundRevertString",
|
|
162
|
+
"firstSimulationTimestamp",
|
|
163
|
+
"executeSignature",
|
|
164
|
+
"executeMsgGasLimit",
|
|
165
|
+
"executeRelayStatus",
|
|
166
|
+
],
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
catch (error) {
|
|
170
|
+
utils_2.logger.error("Error while saving execute signature updates", error);
|
|
171
|
+
throw new Error(`Error while saving execute signature updates ${error === null || error === void 0 ? void 0 : error.message}`);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
const getPendingSimulationMessages = async () => {
|
|
175
|
+
return await models_1.Message.findAll({
|
|
176
|
+
limit: constants_1.executeBatchQueryLimit,
|
|
177
|
+
where: {
|
|
178
|
+
isExecuted: false,
|
|
179
|
+
executeRelayStatus: {
|
|
180
|
+
[sequelize_1.Op.not]: models_1.ExecutionRelayStatus.IGNORED,
|
|
181
|
+
},
|
|
182
|
+
firstSimulationTimestamp: 0,
|
|
183
|
+
},
|
|
184
|
+
order: [["updatedAt", "ASC"]],
|
|
185
|
+
});
|
|
186
|
+
};
|
|
187
|
+
const getRetrySimulationMessages = async () => {
|
|
188
|
+
return await models_1.Message.findAll({
|
|
189
|
+
limit: constants_1.executeBatchQueryLimit,
|
|
190
|
+
where: {
|
|
191
|
+
isExecuted: false,
|
|
192
|
+
// already checked before, and within retry interval period
|
|
193
|
+
firstSimulationTimestamp: {
|
|
194
|
+
[sequelize_1.Op.gt]: Math.floor(Date.now() / 1000) - constants_1.retryInterval,
|
|
195
|
+
},
|
|
196
|
+
[sequelize_1.Op.or]: [
|
|
197
|
+
{
|
|
198
|
+
inboundSuccess: false,
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
retry: false,
|
|
202
|
+
},
|
|
203
|
+
],
|
|
204
|
+
// ignore already executed, failed, executing, and ignored messages
|
|
205
|
+
executeRelayStatus: models_1.ExecutionRelayStatus.NO,
|
|
206
|
+
},
|
|
207
|
+
order: [["updatedAt", "ASC"]],
|
|
208
|
+
});
|
|
209
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAttestGasLimit = exports.getProposeGasLimit = void 0;
|
|
4
|
+
// update this to fetch from redis or feeUpdater service
|
|
5
|
+
const getProposeGasLimit = async (dstChainSlug) => {
|
|
6
|
+
return 100000;
|
|
7
|
+
};
|
|
8
|
+
exports.getProposeGasLimit = getProposeGasLimit;
|
|
9
|
+
const getAttestGasLimit = async (dstChainSlug) => {
|
|
10
|
+
return 100000;
|
|
11
|
+
};
|
|
12
|
+
exports.getAttestGasLimit = getAttestGasLimit;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// export * from './message-service';
|
|
18
|
+
// export * from './packet-service';
|
|
19
|
+
// export * from './connection-service';
|
|
20
|
+
__exportStar(require("./sealService"), exports);
|
|
21
|
+
__exportStar(require("./attestService"), exports);
|
|
22
|
+
__exportStar(require("./executeService"), exports);
|
|
23
|
+
__exportStar(require("./sealService"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SealRelayStatus, type SealIndexedParams } from "../../dl-common";
|
|
2
|
+
export interface SealIndexedUpdate {
|
|
3
|
+
srcChainSlug: number;
|
|
4
|
+
sealer: string;
|
|
5
|
+
isSealed: boolean;
|
|
6
|
+
sealTime: number;
|
|
7
|
+
sealIndexTime: number;
|
|
8
|
+
sealTxHash: string;
|
|
9
|
+
rootSealed: string;
|
|
10
|
+
sealRelayStatus: SealRelayStatus;
|
|
11
|
+
dstSwitchboard: string;
|
|
12
|
+
sealSignature: string;
|
|
13
|
+
packetId: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const indexSeal: (sealIndexedUpdates: SealIndexedParams[]) => Promise<any>;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.indexSeal = void 0;
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
const dl_common_1 = require("../../dl-common");
|
|
7
|
+
const sequelize_1 = require("sequelize");
|
|
8
|
+
const indexSeal = async (sealIndexedUpdates) => {
|
|
9
|
+
var _a;
|
|
10
|
+
try {
|
|
11
|
+
const chainSlug = (_a = sealIndexedUpdates[0]) === null || _a === void 0 ? void 0 : _a.srcChainSlug;
|
|
12
|
+
(0, utils_1.logInfo)({
|
|
13
|
+
info: "INDEXING_SEAL",
|
|
14
|
+
chainSlug,
|
|
15
|
+
packetIds: sealIndexedUpdates.map((p) => p.packetId),
|
|
16
|
+
messageIds: [],
|
|
17
|
+
});
|
|
18
|
+
const indexSealRequestPacketIds = sealIndexedUpdates.map((s) => s.packetId);
|
|
19
|
+
const packets = await dl_common_1.Packet.findAll({
|
|
20
|
+
where: { packetId: { [sequelize_1.Op.in]: indexSealRequestPacketIds } },
|
|
21
|
+
attributes: ["packetId", "sealIndexTime"],
|
|
22
|
+
});
|
|
23
|
+
const packetIdToSealIndexTime = {};
|
|
24
|
+
packets.forEach((packet) => {
|
|
25
|
+
packetIdToSealIndexTime[packet.packetId] = packet.sealIndexTime;
|
|
26
|
+
});
|
|
27
|
+
const packetDbUpdates = [];
|
|
28
|
+
sealIndexedUpdates.map((sealIndexData) => {
|
|
29
|
+
const { srcChainSlug, packetId } = sealIndexData;
|
|
30
|
+
packetDbUpdates.push({
|
|
31
|
+
isSealed: true,
|
|
32
|
+
sealRelayStatus: dl_common_1.SealRelayStatus.SEALED,
|
|
33
|
+
sealIndexTime: packetIdToSealIndexTime[packetId] > 0
|
|
34
|
+
? packetIdToSealIndexTime[packetId]
|
|
35
|
+
: (0, dl_common_1.currentTimestampInSeconds)(),
|
|
36
|
+
...sealIndexData,
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
if (packetDbUpdates.length > 0)
|
|
40
|
+
await savePacketUpdates(packetDbUpdates);
|
|
41
|
+
(0, utils_1.logInfo)({
|
|
42
|
+
info: "QUEUEING_FOR_PROPOSE",
|
|
43
|
+
chainSlug,
|
|
44
|
+
packetIds: packetDbUpdates.map((p) => p.packetId),
|
|
45
|
+
messageIds: [],
|
|
46
|
+
});
|
|
47
|
+
await (0, dl_common_1.sendStandardSqsMessage)(constants_1.SQS_BASE_URL + constants_1.QueueName.BATCHER_TASK_QUEUE, {
|
|
48
|
+
type: constants_1.TaskNames.RELAY_PROPOSE,
|
|
49
|
+
data: { counter: Math.floor(Math.random() * 100) },
|
|
50
|
+
});
|
|
51
|
+
await observeMetrics(indexSealRequestPacketIds, chainSlug);
|
|
52
|
+
(0, utils_1.logInfo)({
|
|
53
|
+
info: "SEAL_INDEXED_AND_QUEUED",
|
|
54
|
+
chainSlug,
|
|
55
|
+
packetIds: sealIndexedUpdates.map((p) => p.packetId),
|
|
56
|
+
messageIds: [],
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
utils_1.logger.error("Error", error);
|
|
61
|
+
throw error;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
exports.indexSeal = indexSeal;
|
|
65
|
+
const observeMetrics = async (packetIds, chainSlug) => {
|
|
66
|
+
try {
|
|
67
|
+
const packetsIndexed = await dl_common_1.Packet.findAll({
|
|
68
|
+
where: {
|
|
69
|
+
packetId: {
|
|
70
|
+
[sequelize_1.Op.in]: packetIds,
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
attributes: ["srcChainSlug", "outboundTime", "dstChainSlug"],
|
|
74
|
+
});
|
|
75
|
+
packetsIndexed.forEach((packet) => {
|
|
76
|
+
(0, constants_1.observeHistogram)(constants_1.relayMetrics.sealRelay.statusUpdateHistogram, {
|
|
77
|
+
labels: {
|
|
78
|
+
[constants_1.Labels.SRC_CHAIN_SLUG]: packet.srcChainSlug,
|
|
79
|
+
[constants_1.Labels.DST_CHAIN_SLUG]: packet.dstChainSlug,
|
|
80
|
+
},
|
|
81
|
+
timeDiff: (0, dl_common_1.currentTimestampInSeconds)() - packet.outboundTime,
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
console.log("erorr in observing metrics : ", chainSlug, " ", error);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const savePacketUpdates = async (dbUpdates) => {
|
|
90
|
+
try {
|
|
91
|
+
(0, utils_1.logInfo)({
|
|
92
|
+
info: "STORING_SEAL_IN_DB",
|
|
93
|
+
packetIds: dbUpdates.map((p) => p.packetId),
|
|
94
|
+
messageIds: [],
|
|
95
|
+
});
|
|
96
|
+
//@ts-ignore
|
|
97
|
+
await dl_common_1.Packet.bulkCreate(dbUpdates, {
|
|
98
|
+
updateOnDuplicate: [
|
|
99
|
+
"sealer",
|
|
100
|
+
"isSealed",
|
|
101
|
+
"sealTime",
|
|
102
|
+
"sealIndexTime",
|
|
103
|
+
"sealTxHash",
|
|
104
|
+
"rootSealed",
|
|
105
|
+
"dstSwitchboard",
|
|
106
|
+
"sealRelayStatus",
|
|
107
|
+
"sealSignature",
|
|
108
|
+
],
|
|
109
|
+
});
|
|
110
|
+
(0, utils_1.logInfo)({
|
|
111
|
+
info: "STORED_SEAL_IN_DB",
|
|
112
|
+
packetIds: dbUpdates.map((p) => p.packetId),
|
|
113
|
+
messageIds: [],
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
utils_1.logger.error("Error while saving seal index updates", error);
|
|
118
|
+
throw new Error(`Error while saving seal index updates ${error === null || error === void 0 ? void 0 : error.message}`);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Packet, Proposal } from "../../dl-common/models";
|
|
2
|
+
import { type ChainSlug } from "@socket.tech/dl-core";
|
|
3
|
+
interface PacketJoinResult extends Packet {
|
|
4
|
+
Proposals?: Proposal[];
|
|
5
|
+
}
|
|
6
|
+
export declare const getIncompletePackets: (dstChainSlug: ChainSlug) => Promise<PacketJoinResult[]>;
|
|
7
|
+
export declare const updateSelectedProposalCountForPackets: (chainSlug?: ChainSlug) => Promise<void>;
|
|
8
|
+
export declare const updateSelectedProposalCount: (dstChainSlug: ChainSlug) => Promise<void>;
|
|
9
|
+
export {};
|