Skip to content

Commit

Permalink
update blobType invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
laisolizq committed Apr 5, 2024
1 parent 36f683c commit f283b13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sm/sm_main/sm_main_exec.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ module.exports = async function execute(pols, input, rom, config = {}, metadata
await db.setProgram(stringToH4(input.batchHashDataComputed), hexString2byteArray(input.batchL2Data));
}

if(blob && input.blobType == 1) {
if (blob && input.blobType === 1) {
// Load poseidonBlobData into DB
let z = await hashContractBytecode(input.blobData);
if(typeof input.z === 'undefined') {
Expand All @@ -145,7 +145,7 @@ module.exports = async function execute(pols, input, rom, config = {}, metadata
throw new Error("input.z != poseidon(input.blobData)");
}
await db.setProgram(stringToH4(z), hexString2byteArray(input.blobData));
} else if (blob) {
} else if (blob && (input.blobType === 0 || input.blobType === 1 || input.blobType === 2)) {
// Load keccak256BlobData into DB
let blobL2HashData = await ethers.utils.keccak256(input.blobData);
if(typeof input.blobL2HashData === 'undefined') {
Expand Down

0 comments on commit f283b13

Please sign in to comment.