Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mask Immutables in Local Verify Task (#691)
Fixes #689 The local verification task does not work correctly for contracts with `immutable`s. This is because, `immutable` values get written when the contract's init code executes on-chain, but uses `0` place holders in the `deployedBytecode` compiler output. This causes the code that is fetched from the deployed contract to differ slightly from the compiler's byte code output (fetched code has non-0 `immutable` values, while the compiler output has 0 `immutable` values). The fix is to mask the `immutable`s from the fetched code with 0's before comparing. With this fix, `local-verify` script now works for the `SimulateTxAccessor` contract: ``` $ npx hardhat local-verify --network localhost Verification status for CompatibilityFallbackHandler: SUCCESS Verification status for CreateCall: SUCCESS Verification status for MultiSend: SUCCESS Verification status for MultiSendCallOnly: SUCCESS Verification status for Safe: SUCCESS Verification status for SafeL2: SUCCESS Verification status for SafeProxyFactory: SUCCESS Verification status for SignMessageLib: SUCCESS Verification status for SimulateTxAccessor: SUCCESS Verification status for TokenCallbackHandler: SUCCESS ```
- Loading branch information