Open novaknole opened 3 years ago
As we can see, it shows red line underneath it.
I have only 1 contract in contracts/Counter.sol
contracts/Counter.sol
pragma solidity ^0.6.8; import "hardhat/console.sol"; contract Counter { uint256 count = 0; event CountedTo(uint256 number); function getCount() public view returns (uint256) { return count; } function countUp() public returns (uint256) { console.log("countUp: count =", count); uint256 newCount = count + 1; require(newCount > count, "Uint256 overflow"); count = newCount; emit CountedTo(count); return count; } function countDown() public returns (uint256) { console.log("countDown: count =", count); uint256 newCount = count - 1; require(newCount < count, "Uint256 underflow"); count = newCount; emit CountedTo(count); return count; } }
This is my hardhat config.
hardhat
import '@nomiclabs/hardhat-ethers' import '@nomiclabs/hardhat-waffle' import 'hardhat-abi-exporter' import 'hardhat-typechain' import 'solidity-coverage'
This is my tsconfig.json
tsconfig.json
{ "compilerOptions": { "target": "es2018", "module": "commonjs", "strict": true, "esModuleInterop": true, "outDir": "dist" }, "include": ["./scripts", "./test", "./typechain"], "files": ["./hardhat.config.ts"] }
After running hardhat compile, it creates a typechain folder
hardhat compile
and
The problem is why does it show red line in here and how do I fix it ?
As we can see, it shows red line underneath it.
I have only 1 contract in
contracts/Counter.sol
This is my
hardhat
config.This is my
tsconfig.json
After running
hardhat compile
, it creates a typechain folderand
The problem is why does it show red line in here and how do I fix it ?