You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to simply allow to pass in the path to a source file, e.g. hevm exec --contract Contract.sol:Contract which would recompile the source if outdated.
Currently I'm using the workaround hevm exec --code $(solc --bin-runtime src/Contract.sol | grep '^60\S*' -m 1), which could be made more robust (and currently isn't looking for a specific contract to compile).
The text was updated successfully, but these errors were encountered:
hm, yeah this could be a nice ux, I guess theres a few feature requests here:
making hevm exec aware of some project structure
being able to refer to artifacts from a solc output file by name
automatically calling the project build tool before running a contract
I think it would change the character of the exec subcommand a little, which up until now has been more of a one shot tool for ad hoc analysis, and the unit testing interface under dapp-test has been used for more structured work in an existing project, but it seems doable without breaking existing workflows. I would be open to merging if someone wants to do the work and make a PR.
A simpler (and probably nicer) version would be to call solc on the given contract filename and parse the resulting output json directly. We could add a cli arg to allow users to choose a solc version, and perhaps respect any discovered remappings.txt files?
It would be nice to simply allow to pass in the path to a source file, e.g.
hevm exec --contract Contract.sol:Contract
which would recompile the source if outdated.Currently I'm using the workaround
hevm exec --code $(solc --bin-runtime src/Contract.sol | grep '^60\S*' -m 1)
, which could be made more robust (and currently isn't looking for a specific contract to compile).The text was updated successfully, but these errors were encountered: