Commit 1124f30c authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: more pr review

parent 43ab823d
......@@ -165,6 +165,16 @@ const replaceImmutables = async (
)
}
// Ensure that the value being sliced out is 0
const val = hexDataSlice(
deployedBytecode,
offset.start,
offset.start + offset.length
)
if (!BigNumber.from(val).eq(0)) {
throw new Error(`Unexpected value in immutable bytecode ${val}`)
}
deployedBytecode = ethers.utils.hexConcat([
hexDataSlice(deployedBytecode, 0, offset.start),
hexZeroPad(value, 32),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment