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

Take --sources and --output into account when generating deployer. #12

Open
BarakChamo opened this issue May 29, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@BarakChamo
Copy link

This is a follow-up on a previous issue I opened regarding deployer generation in projects with a non-standard file structure.

My current issue is that despite being able to set the build directory for the deployer using the --output flag, the files generated have the wrong path set for importing contracts.

This is because the call to generate_deployer does not take the relative output path into account when populating the handlebars template with generated_folder_path as it is here

It would be very helpful if the output could overwrite the cli.root in that case, since while the root is still correct for locating contracts with --sources, the relative paths are incorrect.

In my case, this:

import './contracts/src/Counter.sol' as _Counter;
import { Counter } from './contracts/src/Counter.sol';

Should really be:

import '../contracts/src/Counter.sol' as _Counter;
import { Counter } from '../contracts/src/Counter.sol';

Thank you!

@BarakChamo BarakChamo changed the title Take cli.root and --output into account when generating deployer. Take --sources and --output into account when generating deployer. May 29, 2023
@wighawag
Copy link
Owner

wighawag commented Jun 9, 2023

Thanks @BarakChamo for the report, I ll investigate later

@wighawag wighawag added the bug Something isn't working label Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants