0

每当我尝试部署合同时,我都会收到此错误图像;https://ibb.co/SfzQ1MW

gitpod /workspace/luck $ npx hardhat run scripts/deploy.js --network testnet

Downloading compiler 0.8.4
Compiling 16 files with 0.8.4
Compilation finished successfully
FetchError: request to https://moeing.tech:9545/ failed, reason: unable to verify the first certificate
    at ClientRequest.<anonymous> (/workspace/luck/node_modules/node-fetch/lib/index.js:1461:11)
    at ClientRequest.emit (node:events:390:28)
    at TLSSocket.socketErrorListener (node:_http_client:447:9)
    at TLSSocket.emit (node:events:390:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE',
  code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'

我将非常感谢您的帮助

4

1 回答 1

0

该问题并非专门来自安全帽,而是 node-fetch 面临的问题,安全帽在后台使用该问题来发送请求。主要原因是您的证书存在问题,如本问题Unable to verify Leaf signature中所述。

对我有用的是使用VPN,我认为我的路由器有问题。一旦我连接到 VPN,我就成功地部署了合约。

于 2022-01-30T05:42:34.133 回答