-
Notifications
You must be signed in to change notification settings - Fork 795
feat(solc): add configurable Artifact type #907
feat(solc): add configurable Artifact type #907
Conversation
As discussed in DMs, let's merge the types together. |
Update
The with This is mirrored on foundry foundry-rs/foundry#762 |
25adde4
to
a03127f
Compare
a03127f
to
c86439e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
self.additional_files.write_extras(contract, file) | ||
} | ||
|
||
fn contract_to_artifact(&self, _file: &str, _name: &str, contract: Contract) -> Self::Artifact { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come the contract _name and _file are not needed in this case? is our abstraction maybe not ideal and should be reconsidered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right this is not needed in this case as we only want the artifact object, but the full info could still be relevant, e.g. for an artifact that also contains the name of the contract.
Motivation
Ref foundry-rs/foundry#705
Solution
Project
take theArtifactOutput
as valueConfigurableArtifacts
type that can be configured to include additional values from theContract
Open questions for follow:
ConfigurableContractArtifact
is basically a super set of theCompactContractBytecode
we use by default, which are identical without additional config, should we change the default ArtifactType? I can refactor this to not break anything on foundryPR Checklist