question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remappings example for brownie

See original GitHub issue

Hi Juan!

Thank you so much for the remapping addition, this is huge!

So for a brownie project, in my contracts I have something like:

import "@openzeppelin/contracts/access/Ownable.sol";

And the package is located at:

/Users/patrick/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.3.2

I can’t seem to get the settings write for Source "@chainlink/contracts/src/v0.8/ChainlinkClient.sol" not found: File import callback not supported to go away. Any thoughts?

The following doesn’t seem to be working:

  "solidity.remappings": [
    "@openzeppelin/=/Users/patrick/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.3.2"
  ]

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
PatrickAlphaCcommented, Oct 16, 2021

Additionally… it would be great to add home directory functionality, ie:

~/

instead of absolute… Thanks again for taking a look!

0reactions
juanfranblancocommented, Feb 18, 2022

Do you have a node example to quickly test it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compiling Contracts — Brownie 1.19.2 documentation
The Solidity compiler allows path remappings. Brownie exposes this functionality via the compiler.solc.remappings field in the configuration file:.
Read more >
Brownie compiler remappings: "@"? - Ethereum Stack Exchange
In the doc'n: brownie compiler remappings. for the file brownie-config.yaml. It gives two examples, ex 1. has no "@" symbol:
Read more >
Using OpenZeppelin Contracts with Python and Brownie
For example, to install OpenZeppelin Contracts: ... No copying files, no remapping import paths, no thought about namespace collisions… it just works.
Read more >
Remapping Black Childhood in The Brownies' Book - MDPI
In Rand McNally's (1885) popular New Household Atlas of the World, for example, “the entire continent of Africa was reduced to a single...
Read more >
Brownie: the python framework for smart contracts - Kevin's Blog
Example, let's said that you need to import the Open Zeppelin ... Brownie automatically ensures that all remapped paths are allowed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found