Skip to content

Commit 4ea6c6d

Browse files
authored
feat: add timeout to avoid headers timeout error (#13)
SCS failed to deploy on Hedera Mainnet without this timeout: ``` HeadersTimeoutError: Headers Timeout Error at Timeout.onParserTimeout [as callback] (/home/coder/usecase/node_modules/undici/lib/client.js:1048:28) at Timeout.onTimeout [as _onTimeout] (/home/coder/usecase/node_modules/undici/lib/timers.js:20:13) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7) { code: 'UND_ERR_HEADERS_TIMEOUT' } 14081 | console.warn("The node you are deploying to does not have access to a private key to sign this transaction."); 14082 | } 14083 | if (verify && import_lodash.isEmpty(process.env.ETHERSCAN_API_KEY)) { 14084 | throw new Error("It is not possible to verify the deployment on this network unless you supply an Etherscan API key in the hardht.config.ts file"); 14085 | } ``` NomicFoundation/hardhat#2672 They have open issue to fix it: NomicFoundation/hardhat#3136 This error happened for me only on Hedera Mainnet, testnet works fine. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a `timeout` parameter with a value of `100_000` to the BTP configuration in the projects. - The `timeout` property affects the BTP RPC settings for improved functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 77494fe commit 4ea6c6d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

hardhat.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const config: HardhatUserConfig = {
1818
btp: {
1919
url: process.env.BTP_RPC_URL || "",
2020
gasPrice: process.env.BTP_GAS_PRICE ? parseInt(process.env.BTP_GAS_PRICE) : "auto",
21+
timeout: 100_000,
2122
},
2223
},
2324
etherscan: {

0 commit comments

Comments
 (0)