您好老师,请问一下集训营第二节课hardhat安装之后,import "hardhat/console.sol";在vscode下面有下划线怎么解决啊

//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "hardhat/console.sol";

contract Greeter {
    string private greeting;

    constructor(string memory _greeting) {
        console.log("Deploying a Greeter with greeting:", _greeting);
        greeting = _greeting;
    }

    function greet() public view returns (string memory) {
        return greeting;
    }

    function setGreeting(string memory _greeting) public {
        console.log("Changing greeting from '%s' to '%s'", greeting, _greeting);
        greeting = _greeting;
    }
}

微信截图_20230226162619.png

请先 登录 后评论

3 个回答

chain - CTO
  擅长:智能合约安全,跨链,量子密码,同态加密
请先 登录 后评论
Tiny熊 - 布道者
  擅长:智能合约,以太坊
请先 登录 后评论
FILAgiao - 法律顾问、冥想专家
请先 登录 后评论
  • 3 关注
  • 0 收藏,1012 浏览
  • Bob_080610 提出于 2023-02-26 16:26

相似问题