【发布时间】:2021-08-14 11:01:46
【问题描述】:
我目前正在构建符合 ERC721 的合约并已在此处发布该合约:https://ropsten.etherscan.io/address/0xa513bc0a0d3af384fefcd8bbc1cc0c9763307c39 - 我现在正在尝试验证和发布合约源代码
我的文件的开头是这样的:
// 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 验证的导入依赖项的合同的文档。现在这只是一个单一的文件合同。
【问题讨论】:
标签: ethereum solidity smartcontracts cryptocurrency etherscan