Tutorial on writing remappings.txt for Hardhat projects.
#879
TilakMaddy
started this conversation in
General
Replies: 1 comment
-
|
UPDATE: We've launched a massive update after-rewriting the backend for AST Generation in aderyn-v0.5.4 The problem above should be mostly fixed. In other words, we will make an educated guess about these remappings by looking inside node_modules. However chances are sometimes the package name inside node_modules does not necessarily match with how you would import it in the contracts. So remappings may still be required if your aderyn fails to compile Thanks :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
MASSIVE UPDATE:
See comment below
(This happens automatically now)
Solidity projects that import code from libraries with a shorthand like
@ozrequire remappings in order to map the shorthand to an actual path on the file system.Hardhat tends to generate these mappings internally when
pnpm hardhat XXXcommands are run. Therefore, you don't see aremappings.txtby default when you create a HH project.Aderyn however does not have access to those remappings so for now, we require that users specify the remappings manually
in
reamppings.txtand place the file at the root.One example of that could be the following:
However you need to verify that the path on the right hand side actually exists such that all the file imports point to a real solidity file.
This may not be ideal experience. We're definitely working towards bettering the human experience but until then please feel free to reach out and ask questions. We're always looking to help.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions