I'm using Hardhat to compile solidity contracts.
In the contracts I'm importing Uniswap's contracts SDK to use them. But when I run
yarn hardhat compile
in terminal it says
Error HH700: Artifact for contract "@uniswap/lib/contracts/libraries/Babylonian.sol:Babylonian" not found.
For more info go to https://hardhat.org/HH700 or run Hardhat with --show-stack-traces
error Command failed with exit code 1.
Here is how I imported Uniswap
pragma solidity 0.6.6;
import '@uniswap/v2-periphery/contracts/UniswapV2Router02.sol';
contract THE_CONTRACT {
string public name = "SOME PROPERTY";
and here is hardhat config
import "@nomicfoundation/hardhat-toolbox";
import { INFURA } from "./src/config";
const config = {
solidity: "0.6.6",
paths: {
artifacts: "./src/artifects",
},
networks: {
goerli: {
chainID: 5,
url: INFURA,
accounts: [
"0xTHEACCOUNT",
],
timeout: 60000,
},
},
settings: {
optimizer: {
enabled: true,
runs: 1,
},
evmVersion: "byzantium",
},
};
export default config;
Best Answer
cache
andartifects
folder and compile the contracts againMight be one of these things...