pub fn load_foundry_creation_code(path: impl AsRef<Path>) -> DeployResult<Bytes>Expand description
Load creation bytecode from a Foundry artifact.
Reads the JSON at path and decodes the creation bytecode from
bytecode.object (or the legacy direct-string bytecode field).
ยงErrors
Returns an error when:
- the file cannot be read,
- the contents are not valid JSON,
- the JSON has no
bytecodefield, orbytecodehas neither anobjectstring nor a direct string value, - the bytecode hex is empty, still contains unresolved library
placeholders (
__$...$__), or is otherwise not valid hex.