yuyasugano/pancake-bakery-arbitrage

Getting 'header not found' Error on truffle migrate --network mainnet

Closed this issue · 1 comments

Compiling your contracts...

√ Fetching solc version list from solc-bin. Attempt #1
√ Fetching solc version list from solc-bin. Attempt #1

Compiling .\contracts\Flashswap.sol
Compiling .\contracts\Migrations.sol
Compiling .\contracts\Swapcontract.sol
Compiling .\contracts\UniswapV2Library.sol
Compiling .\contracts\interfaces\IERC20.sol
Compiling .\contracts\interfaces\IUniswapV2Callee.sol
Compiling .\contracts\interfaces\IUniswapV2Factory.sol
Compiling .\contracts\interfaces\IUniswapV2Pair.sol
Compiling .\contracts\interfaces\IUniswapV2Router01.sol
Compiling .\contracts\interfaces\IUniswapV2Router02.sol
Compiling .\contracts\utils\Context.sol
Compiling .\contracts\utils\Ownable.sol
Compiling .\contracts\utils\SafeMath.sol
Compilation warnings encountered:

project:/contracts/Flashswap.sol:44:9: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
    address _sender,
    ^-------------^

,project:/contracts/Flashswap.sol:47:9: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
bytes calldata _data
^------------------^

Artifacts written to D:\github\pancake-bakery-arbitrage\build\contracts
Compiled successfully using:

  • solc: 0.7.6+commit.7338295f.Emscripten.clang

Starting migrations...

Network name: 'mainnet'
Network id: 56
Block gas limit: 80312499 (0x4c978b3)

1_initial_migration.js

Deploying 'Migrations'

Error: Unhandled error. ({ code: -32000, message: 'header not found' })
at new NodeError (node:internal/errors:371:5)
at Web3ProviderEngine.emit (node:events:379:17)
at D:\github\pancake-bakery-arbitrage\node_modules@trufflesuite\web3-provider-engine\index.js:57:14
at afterRequest (D:\github\pancake-bakery-arbitrage\node_modules@trufflesuite\web3-provider-engine\index.js:151:21)
at D:\github\pancake-bakery-arbitrage\node_modules@trufflesuite\web3-provider-engine\index.js:176:21
at D:\github\pancake-bakery-arbitrage\node_modules@trufflesuite\web3-provider-engine\index.js:238:9
at D:\github\pancake-bakery-arbitrage\node_modules\async\internal\once.js:12:16
at replenish (D:\github\pancake-bakery-arbitrage\node_modules\async\internal\eachOfLimit.js:61:25)
at D:\github\pancake-bakery-arbitrage\node_modules\async\internal\eachOfLimit.js:71:9
at eachLimit (D:\github\pancake-bakery-arbitrage\node_modules\async\eachLimit.js:43:36)
at D:\github\pancake-bakery-arbitrage\node_modules\async\internal\doLimit.js:9:16
at end (D:\github\pancake-bakery-arbitrage\node_modules@trufflesuite\web3-provider-engine\index.js:217:5)
at Request._callback (D:\github\pancake-bakery-arbitrage\node_modules@trufflesuite\web3-provider-engine\subproviders\rpc.js:70:28)
at Request.self.callback (D:\github\pancake-bakery-arbitrage\node_modules\request\request.js:185:22)
at Request.emit (node:events:390:28)
at Request. (D:\github\pancake-bakery-arbitrage\node_modules\request\request.js:1154:10)
at Request.emit (node:events:390:28)
at IncomingMessage. (D:\github\pancake-bakery-arbitrage\node_modules\request\request.js:1076:12)
at Object.onceWrapper (node:events:509:28)
at IncomingMessage.emit (node:events:402:35)
at endReadableNT (node:internal/streams/readable:1343:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

@ilyago As written in my article, please use REMIX to deploy contract codes in BSC. I encountered a few errors when I tried to deployo contract codes from Truffle migration. Thanks.