Error [ERR_UNHANDLED_ERROR]: Unhandled error. ({ code: -32000, message: 'header not found' })
bsc: { provider: () => new HDWalletProvider(mnemonic, https://bsc-dataseed.binance.org), network_id: 56, confirmations: 10, timeoutBlocks: 200, skipDryRun: true },
truffle migrate --network bsc --reset
Error [ERR_UNHANDLED_ERROR]: Unhandled error. ({ code: -32000, message: 'header not found' })
If you use truffle to deploy contracts on BSC
The recommended configuration
bsc: {
provider: () => {
return new HDWalletProvider(mnemonic, "https://bsc-dataseed2.binance.org")
},
network_id: 56,
skipDryRun: true,
gasPrice: 10 * 1e9,
timeoutBlocks: 1,
confirmations: 0,
},
Hardhat is highly recommended for deploying contracts on BSC
Example
- https://github.com/smartcontractkit/hardhat-starter-kit/blob/main/deploy/00_Deploy_Mocks.js
- https://github.com/smartcontractkit/hardhat-starter-kit/blob/main/README.md
Hardhat Docs
https://hardhat.org/getting-started/
Advice
The initial transition from Truffle to Hardhat is bound to be uncomfortable, and once you've stuck with Hardhat for 3 days, you'll never want to use Truffle again
same issue :(
Please follow the Setting up the development environment Guide using Truffle:
bsc: {
provider: () => new HDWalletProvider(mnemonic, https://bsc-dataseed1.binance.org),
network_id: 56,
confirmations: 10,
timeoutBlocks: 200,
skipDryRun: true
}
https://docs.binance.org/smart-chain/developer/deploy/truffle-new.html
@BinanceG11 why did you close this issue? I've been trying to use truffle migrate and still breaks.
Error [ERR_UNHANDLED_ERROR]: Unhandled error. ({ code: -32000, message: 'header not found' })
@BinanceG11 didn't get the solution i have tried every possibility, Increase the gas and other thing for optimisation but unable to resolve it. There may be some sort of provider error (RPC endpoint).
Error [ERR_UNHANDLED_ERROR]: Unhandled error. ({ code: -32000, message: 'header not found' })
I had the same issue and changing RPC URL fixed that.
Specifically, I was on : https://bsc-dataseed.binance.org/ And changed to : https://bsc-dataseed1.binance.org
Since yesterday (2022/02/22) i'm having this issue. I did change the node, made tweaks on settings, none of these help.
After a few seconds,
Error [ERR_UNHANDLED_ERROR]: Unhandled error. ({ code: -32000, message: 'header not found' })
I have the issue too. I'm doing like this https://docs.binance.org/smart-chain/developer/deploy/truffle-new.html In the testnet this works however in the main does not want work
I have the issue too. I'm doing like this https://docs.binance.org/smart-chain/developer/deploy/truffle-new.html In the testnet this works however in the main does not want work
same issue for me
How to do! ! ! ! ! ! ! ! ! ! ! !
Anyone still having issues, refer to this solution here. Worked for me.