Ethereum 使用导入的OpenZeppelin文件在Etherscan上验证并发布合同
我目前正在构建一个符合ERC721的合同,并已在此处发布了该合同:-我现在正在尝试验证和发布该合同的源代码 我的文件的开头如下所示:Ethereum 使用导入的OpenZeppelin文件在Etherscan上验证并发布合同,ethereum,solidity,smartcontracts,cryptocurrency,etherscan,Ethereum,Solidity,Smartcontracts,Cryptocurrency,Etherscan,我目前正在构建一个符合ERC721的合同,并已在此处发布了该合同:-我现在正在尝试验证和发布该合同的源代码 我的文件的开头如下所示: // SPDX-License-Identifier: MIT // We will be using Solidity version 0.8.4 pragma solidity 0.8.4; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; contract Viper
// SPDX-License-Identifier: MIT
// We will be using Solidity version 0.8.4
pragma solidity 0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
contract ViperToken is ERC721 {
但是,尝试使用Solidity单个文件进行验证和发布时,出现以下错误:
ParserError: Source "@openzeppelin/contracts/token/ERC721/ERC721.sol" not found: File import callback not supported
--> myc:6:1:
|
6 | import "@openzeppelin/contracts/token/ERC721/ERC721.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
有人能给我指一下到1的方向吗。解决这个问题或2。有关如何适当编写包含可通过Etherscan验证的已导入依赖项的合同的文档。现在这只是一份单一文件的合同。简单地说,我必须到一个兔子洞里去解决这个问题,因为我对Solidity还很陌生 我必须做到以下几点: