feat: новая функция

This commit is contained in:
2025-11-12 13:38:12 +03:00
parent 44876c0bc2
commit f23307ded5
11 changed files with 1223 additions and 74 deletions

View File

@@ -54,7 +54,7 @@ router.post('/read-dle-info', async (req, res) => {
if (!rpcUrl) {
return res.status(500).json({ success: false, error: `RPC URL для сети ${targetChainId} не найден` });
}
provider = new ethers.JsonRpcProvider(await rpcProviderService.getRpcUrlByChainId(chainId));
provider = new ethers.JsonRpcProvider(rpcUrl);
const code = await provider.getCode(dleAddress);
if (!code || code === '0x') {
return res.status(400).json({ success: false, error: `По адресу ${dleAddress} нет контракта в сети ${targetChainId}` });