Syncs the Ethereum mainnet to a local hardhat node for fast querying and regtest development.
env file
FORKING_URL=/** mainnet rpc url **/
FORKING_BLOCK_NUMBER=/** block number to fork from ,empty -> latest**/
npx hardhat node
npx hardhat run scripts/worker.ts --network localhost
- timestamp of block => currenly all transactions done to contracts using block.timestamp fail
- bundle transactions into same block as mainnet => currently transactions are mined 1 per block