Replies: 5 comments
-
Hey thanks for raising this up. Happy to review any PR you might create out of it, how do you think to solve this ? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply! My thought is to replace the relative path to the actual npm package path. Example for the import in Fallout below (link)
maybe change it to the below according to the remapping in package.json (link)
Try if I can leverage the functionality on Remix for importing from npm registry: https://remix-ide.readthedocs.io/en/latest/import.html#import-from-npm Does it sound like a plan? |
Beta Was this translation helpful? Give feedback.
-
It sounds good but probably it would be better to have a "Try it on Remix" button or similar like the Solidity docs ? |
Beta Was this translation helpful? Give feedback.
-
The replacement code from @hcheng826: |
Beta Was this translation helpful? Give feedback.
-
Moved this into a discussion |
Beta Was this translation helpful? Give feedback.
-
Hi Ethernaut contributors,
Thanks for the great project! I've learned a lot from it! One experience I have is that for some levels, the Solidity code showing in the level instruction cannot directly compile, since it's importing the OpenZeppelin code from a relative path.
Some examples:
Fallout
importsSafeMath
,Dex
importsERC20
,PuzzleWallet
importsUpgradableProxy
, etc. The user needs to find the correct version of the package to import, in order to make it compile on Remix.I can open a PR and try to fix the path and make it compile for Factory and Remix. Let me know if you want me to work on this. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions