fix: compare code against codehash
This commit is contained in:
parent
39b1dac32a
commit
dc4c6b3f36
|
@ -640,10 +640,7 @@ export default class VerifyingProvider implements IClientVerifyingProvider {
|
|||
private verifyCodeHash(code: Bytes, codeHash: Bytes32): boolean {
|
||||
return (
|
||||
(code === "0x" && codeHash === "0x" + KECCAK256_NULL_S) ||
|
||||
byteArrayEquals(
|
||||
keccak256(fromHexString(codeHash)),
|
||||
fromHexString(codeHash),
|
||||
)
|
||||
byteArrayEquals(keccak256(fromHexString(code)), fromHexString(codeHash))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue