Skip to content

Commit

Permalink
fix:fix impl for ResolcContractArtifact
Browse files Browse the repository at this point in the history
  • Loading branch information
Brianspha committed Dec 2, 2024
1 parent 91562ff commit 9b66169
Showing 1 changed file with 1 addition and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,39 +103,7 @@ impl ResolcArtifactOutput {
contract: Contract,
source_file: Option<&SourceFile>,
) -> ResolcContractArtifact {
let Contract {
abi,
metadata,
userdoc,
devdoc,
storage_layout,
eravm,
evm,
ir_optimized,
hash,
factory_dependencies,
missing_libraries,
} = contract;
let (bytecode, assembly) = eravm
.map(|eravm| (eravm.bytecode(is_unlinked), eravm.assembly))
.or_else(|| evm.map(|evm| (evm.bytecode.map(|bc| bc.object), evm.assembly)))
.unwrap_or_else(|| (None, None));
let bytecode = bytecode
.map(|object| ZkArtifactBytecode::with_object(object, is_unlinked, missing_libraries));

ZkContractArtifact {
abi,
hash,
factory_dependencies,
storage_layout: Some(storage_layout),
bytecode,
assembly,
metadata,
userdoc: Some(userdoc),
devdoc: Some(devdoc),
ir_optimized,
id: source_file.as_ref().map(|s| s.id),
}
todo("Implement this if needed")
}

fn create_byte_code(
Expand Down

0 comments on commit 9b66169

Please sign in to comment.