无法将 Uniswap V2 Periphery 作为包添加到 Brownie
Can't add Uniswap V2 Periphery as a package to Brownie
我正在按照 Brownie 的文档将包添加到我的 Solidity 项目中。我必须添加 Uniswap/v2-core
和 Uniswap/v2-periphery
。为此,我在终端中调用了以下几行:
这个工作正常,它安装了包
brownie pm install Uniswap/v2-core@1.0.1
然而,当我调用下面的行时,我收到错误 ValueError: Invalid version for this package. Available versions are: 1.0.0-beta.0
奇怪的是因为 on Github 有 @1.1.0-beta.0
版本而不是 1.0.0-beta.0
brownie pm install Uniswap/v2-periphery@1.1.0-beta.0
问题是我能否以某种方式强制 Brownie 识别有效版本,或者是否有任何其他方法可以解决此问题?
此版本也在 Stack Exchange ETH
上被问到
You do exactly as you have here, you add the whole release string.
For example:
dependencies:
- OpenZeppelin/openzeppelin-contracts@3.2.1-solc-0.7
compiler:
solc:
remappings:
- "@openzeppelin=OpenZeppelin/openzeppelin-contracts@3.2.1-> solc-0.7"
The reason that yours isn't working right now is that https://github.com/Uniswap/v2-periphery doesn't have any releases, it only has tags.
What you could do then, is fork the repo, make a release yourself and point to your own release until they actually release something.
失败的原因是 there are no releases of that package on Github(截至目前)。
我会这样做:
- 分叉回购
- 自己剪一个版本github
- 在您的
brownie-config.yaml
中指向该存储库,类似于我们在上面的引用中显示的内容。
我正在按照 Brownie 的文档将包添加到我的 Solidity 项目中。我必须添加 Uniswap/v2-core
和 Uniswap/v2-periphery
。为此,我在终端中调用了以下几行:
这个工作正常,它安装了包
brownie pm install Uniswap/v2-core@1.0.1
然而,当我调用下面的行时,我收到错误 ValueError: Invalid version for this package. Available versions are: 1.0.0-beta.0
奇怪的是因为 on Github 有 @1.1.0-beta.0
版本而不是 1.0.0-beta.0
brownie pm install Uniswap/v2-periphery@1.1.0-beta.0
问题是我能否以某种方式强制 Brownie 识别有效版本,或者是否有任何其他方法可以解决此问题?
此版本也在 Stack Exchange ETH
上被问到You do exactly as you have here, you add the whole release string.
For example:
dependencies: - OpenZeppelin/openzeppelin-contracts@3.2.1-solc-0.7 compiler: solc: remappings: - "@openzeppelin=OpenZeppelin/openzeppelin-contracts@3.2.1-> solc-0.7"
The reason that yours isn't working right now is that https://github.com/Uniswap/v2-periphery doesn't have any releases, it only has tags.
What you could do then, is fork the repo, make a release yourself and point to your own release until they actually release something.
失败的原因是 there are no releases of that package on Github(截至目前)。
我会这样做:
- 分叉回购
- 自己剪一个版本github
- 在您的
brownie-config.yaml
中指向该存储库,类似于我们在上面的引用中显示的内容。