通常,您可以通过浏览器-config.yaml文件导入npm样式,如下所示:
dependencies:
- uniswap/v2-core@1.0.1
compiler:
solc:
remappings:
- 'uniswap=uniswap/v2-core@1.0.1'但是,我在导入Uniswap/v2-外围时遇到了困难,因为这里显示的唯一标记是1.0.0-beta.0。我尝试过以以下方式导入,但没有成功:
dependencies:
- uniswap/v2-periphery@1.0.0
compiler:
solc:
remappings:
- 'uniswap=uniswap/v2-periphery@1.0.0'和
dependencies:
- uniswap/v2-periphery@1.0.0-beta.0
compiler:
solc:
remappings:
- 'uniswap=uniswap/v2-periphery@1.0.0-beta.0'两样都不管用。如何导入此回购协议?https://github.com/Uniswap/v2-periphery
发布于 2021-11-12 21:43:08
您完全按照这里所做的,添加整个发布字符串。
例如:
dependencies:
- OpenZeppelin/openzeppelin-contracts@3.2.1-solc-0.7
compiler:
solc:
remappings:
- "@openzeppelin=OpenZeppelin/openzeppelin-contracts@3.2.1-solc-0.7"您现在不能工作的原因是https://github.com/Uniswap/v2-periphery没有任何版本,它只有标记。
然后,你可以做的就是分叉回购,自己做一个释放,并指向你自己的版本,直到他们真正发布了什么。
https://ethereum.stackexchange.com/questions/113319
复制相似问题