Skip to content

Commit

Permalink
Fix get blobs l1
Browse files Browse the repository at this point in the history
  • Loading branch information
gianbelinche committed Sep 25, 2024
1 parent d6f7f48 commit 630c60e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions get_all_blobs/getallblobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ async function getTransactions(validatorTimelockAddress, commitBatchesSharedBrid
let jsonArray = [];
for (let i = 0; i <= latestBlock; i++) {
const block = await web3.eth.getBlock(i, true);
block.transactions.forEach(async tx => {
await Promise.all(block.transactions.map(async tx => {
if (tx.to && (tx.to.toLowerCase() == validatorTimelockAddress.toLowerCase())) {
const input = tx.input;
const txSelector = input.slice(0, 10);
Expand All @@ -175,10 +175,14 @@ async function getTransactions(validatorTimelockAddress, commitBatchesSharedBrid
commitment: commitment,
blob: blobHex
});
console.log(tx.to);
console.log(commitment);
console.log(blobHex.length);
}
}
});
}));
}
console.log(jsonArray);
const jsonString = JSON.stringify(jsonArray, null, 2);
fs.writeFileSync("blob_data.json", jsonString, 'utf8');
}
Expand Down

0 comments on commit 630c60e

Please sign in to comment.