I have been working through this project and at the point of trying to deploy the smart contract to the Roptsten test network, with connection through Infura.
I'm getting the following error when trying to deploy the ArbitrageFlashLoaner SC to Ropsten through Infura.io. Hardhat v2.7.1.
HardhatError: HH404: File @openzeppelin/contracts/math/SafeMath.sol, imported from contracts/UniswapV2Library.sol, not found.
So I understand that it is unable to find @openzeppelin/contracts/math/SafeMath.sol
from contracts/UniswapV2Library.sol, but I see that SafeMath.sol
is in the relative path of node_modules
:
UniswapV2Library.sol
is a folder containing .json:
And the contents of UniswapV2Library.json
:
{
"_format": "hh-sol-artifact-1",
"contractName": "UniswapV2Library",
"sourceName": "contracts/UniswapV2Library.sol",
"abi": [],
.
.
.
I'm stuck on what the path issue is in running npx hardhat...
. The stacktrace doesn't really hep me. Is there a way to run this through some sort of IDE or put a watch on variable to see what the actual paths and variables are in all the files it uses (step through the process) while it's running, or where it's looking?