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 {
|
private verifyCodeHash(code: Bytes, codeHash: Bytes32): boolean {
|
||||||
return (
|
return (
|
||||||
(code === "0x" && codeHash === "0x" + KECCAK256_NULL_S) ||
|
(code === "0x" && codeHash === "0x" + KECCAK256_NULL_S) ||
|
||||||
byteArrayEquals(
|
byteArrayEquals(keccak256(fromHexString(code)), fromHexString(codeHash))
|
||||||
keccak256(fromHexString(codeHash)),
|
|
||||||
fromHexString(codeHash),
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue