ваше сообщение коммита
This commit is contained in:
@@ -47,7 +47,6 @@ router.post('/get-extended-history', async (req, res) => {
|
||||
"function listSupportedChains() external view returns (uint256[] memory)",
|
||||
"function getProposalsCount() external view returns (uint256)",
|
||||
"event QuorumPercentageUpdated(uint256 oldQuorumPercentage, uint256 newQuorumPercentage)",
|
||||
"event CurrentChainIdUpdated(uint256 oldChainId, uint256 newChainId)",
|
||||
"event DLEInfoUpdated(string name, string symbol, string location, string coordinates, uint256 jurisdiction, string[] okvedCodes, uint256 kpp)",
|
||||
"event ModuleAdded(bytes32 moduleId, address moduleAddress)",
|
||||
"event ModuleRemoved(bytes32 moduleId)",
|
||||
@@ -112,24 +111,6 @@ router.post('/get-extended-history', async (req, res) => {
|
||||
});
|
||||
}
|
||||
|
||||
// События изменения текущей цепочки
|
||||
const chainEvents = await dle.queryFilter('CurrentChainIdUpdated', fromBlock, currentBlock);
|
||||
for (let i = 0; i < chainEvents.length; i++) {
|
||||
const event = chainEvents[i];
|
||||
history.push({
|
||||
id: history.length + 1,
|
||||
type: 'chain_updated',
|
||||
title: 'Изменена текущая цепочка',
|
||||
description: `Текущая цепочка изменена с ${Number(event.args.oldChainId)} на ${Number(event.args.newChainId)}`,
|
||||
timestamp: event.blockNumber * 1000,
|
||||
blockNumber: event.blockNumber,
|
||||
transactionHash: event.transactionHash,
|
||||
details: {
|
||||
oldChainId: Number(event.args.oldChainId),
|
||||
newChainId: Number(event.args.newChainId)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// События обновления информации DLE
|
||||
const infoEvents = await dle.queryFilter('DLEInfoUpdated', fromBlock, currentBlock);
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
|
||||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const dleV2Service = require('../services/dleV2Service');
|
||||
const DLEV2Service = require('../services/dleV2Service');
|
||||
const dleV2Service = new DLEV2Service();
|
||||
const logger = require('../utils/logger');
|
||||
const auth = require('../middleware/auth');
|
||||
const path = require('path');
|
||||
@@ -34,7 +35,7 @@ async function executeDeploymentInBackground(deploymentId, dleParams) {
|
||||
stage: 'initializing'
|
||||
});
|
||||
|
||||
deploymentTracker.addLog(deploymentId, '🚀 Начинаем деплой DLE контракта и модулей', 'info');
|
||||
deploymentTracker.addLog(deploymentId, '🚀 Начинаем деплой DLE контракта', 'info');
|
||||
|
||||
// Выполняем деплой с передачей deploymentId для WebSocket обновлений
|
||||
const result = await dleV2Service.createDLE(dleParams, deploymentId);
|
||||
@@ -77,11 +78,16 @@ router.post('/', auth.requireAuth, auth.requireAdmin, async (req, res, next) =>
|
||||
}
|
||||
}
|
||||
|
||||
// Создаем запись о деплое
|
||||
const deploymentId = deploymentTracker.createDeployment(dleParams);
|
||||
// Используем deploymentId из запроса, если передан, иначе создаем новый
|
||||
const deploymentId = req.body.deploymentId || deploymentTracker.createDeployment(dleParams);
|
||||
|
||||
// Запускаем деплой в фоне (без await!)
|
||||
executeDeploymentInBackground(deploymentId, dleParams);
|
||||
// Если deploymentId был передан из запроса, создаем запись о деплое с этим ID
|
||||
if (req.body.deploymentId) {
|
||||
deploymentTracker.createDeployment(dleParams, req.body.deploymentId);
|
||||
}
|
||||
|
||||
// Запускаем деплой в фоне (с await для правильной обработки ошибок!)
|
||||
await executeDeploymentInBackground(deploymentId, dleParams);
|
||||
|
||||
logger.info(`📤 Деплой запущен асинхронно: ${deploymentId}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user