Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brownie-config.yaml remappings bug #1137

Closed
zgfzgf opened this issue Jul 5, 2021 · 2 comments · Fixed by #1152
Closed

brownie-config.yaml remappings bug #1137

zgfzgf opened this issue Jul 5, 2021 · 2 comments · Fixed by #1152

Comments

@zgfzgf
Copy link

zgfzgf commented Jul 5, 2021

Environment information

  • brownie Version: 1.14.6
  • solc Version: 0.6.6
  • Python Version: 3.8.10
  • OS: ubuntu
dependencies:
  - Uniswap/Uniswap-v2-core@1.0.0
  - Uniswap/Uniswap-lib@2.1.0


compiler:
  solc:
    version: 0.6.6
    remappings:
      - "@uniswapcore=Uniswap/Uniswap-v2-core@1.0.0"
      - "@uniswaplib=**Uniswap**/Uniswap-lib@2.1.0"
brownie compile 

contracts/UniswapV2Migrator.sol:3:1: ParserError: Source "Uniswap/Uniswap-lib@2.1.0/contracts/libraries/TransferHelper.sol" not found: File not found.
import '@uniswaplib/contracts/libraries/TransferHelper.sol'
make .brownie/packages/Uniswaplib
mv  Uniswap/Uniswap-lib@2.1.0 Uniswaplib
compiler:
  solc:
    version: 0.6.6
    remappings:
      - "@uniswapcore=Uniswap/Uniswap-v2-core@1.0.0"
      - "@uniswaplib=**Uniswaplib**/Uniswap-lib@2.1.0"

brownie compile OK

@zgfzgf
Copy link
Author

zgfzgf commented Jul 5, 2021

Here's OK. I guess they can't have the same prefix directory.

dependencies:

  • iearn-finance/yearn-vaults@0.4.2
  • OpenZeppelin/openzeppelin-contracts@3.1.0

compiler:
solc:
version: 0.6.12
remappings:
- "@yearnvaults=iearn-finance/yearn-vaults@0.4.2"
- "@OpenZeppelin=OpenZeppelin/openzeppelin-contracts@3.1.0"

@iamdefinitelyahuman
Copy link
Member

Brownie is passing the remappings to solc, so the expected behaviours here are in the Solidity docs.

https://docs.soliditylang.org/en/v0.6.6/using-the-compiler.html#using-the-commandline-compiler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants