diff --git a/crates/common/src/compile.rs b/crates/common/src/compile.rs index d504e1688e64..1af4d5db6d4c 100644 --- a/crates/common/src/compile.rs +++ b/crates/common/src/compile.rs @@ -382,7 +382,7 @@ fn contract_size(artifact: &T, initcode: bool) -> Option { BytecodeObject::Unlinked(unlinked) => { // we don't need to account for placeholders here, because library placeholders take up // 40 characters: `__$$__` which is the same as a 20byte address in hex. - let mut size = unlinked.as_bytes().len(); + let mut size = unlinked.len(); if unlinked.starts_with("0x") { size -= 2; }