Skip to content

Commit

Permalink
move precalculatedResults
Browse files Browse the repository at this point in the history
  • Loading branch information
andresaiello committed Feb 29, 2024
1 parent 9f9589a commit cc1da2b
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 55 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
export const precalculatedResults = [
"0xb59145790f705b023fedee9d803642b24221bacc8b285464b58d90d637872b30",
"0xb78d08dc5e8051cec1427fe9343d65e3996fb21ba8f3483c4348dbe72f0e04ce",
"0xc1dfa2f66e9c729d1e85fd2eaf8c5fbd2aee71f7b21d62a94e6d2b216b256fe2",
"0xe07f7758634148491a340128ade1fd9e27c4a0ca02beb7a52c2cedb36dff5976",
"0xdcd9ca7a9be91d10cb22df5e7b850844f26d144eb1884fd0ce1a3a3820358f17",
"0xf5797d3188a54d586d11f4729a87eddfa46b9c8a2e17db79894a4ba428aa954e",
"0xc7aa5681e715c403614635335a04026ad025080a828f60a031437cb22f42df11",
"0xc47f55d77b27f3880bac796a09b53d0aeaae38cea8acd99d3d890d3518cfe580",
"0x78f7b45ccdb7c3266a8a5d7575470001daea7396e58fe232e9c3a749446727f7",
"0xb59145790f705b023fedee9d803642b24221bacc8b285464b58d90d637872b30",
"0xb78d08dc5e8051cec1427fe9343d65e3996fb21ba8f3483c4348dbe72f0e04ce",
"0xc1dfa2f66e9c729d1e85fd2eaf8c5fbd2aee71f7b21d62a94e6d2b216b256fe2",
"0xe07f7758634148491a340128ade1fd9e27c4a0ca02beb7a52c2cedb36dff5976",
"0xdcd9ca7a9be91d10cb22df5e7b850844f26d144eb1884fd0ce1a3a3820358f17",
"0xf5797d3188a54d586d11f4729a87eddfa46b9c8a2e17db79894a4ba428aa954e",
"0xc7aa5681e715c403614635335a04026ad025080a828f60a031437cb22f42df11",
"0xc47f55d77b27f3880bac796a09b53d0aeaae38cea8acd99d3d890d3518cfe580",
"0x78f7b45ccdb7c3266a8a5d7575470001daea7396e58fe232e9c3a749446727f7",
"0xddb732c20c3ac963a1a16eb78d7af2b2c7a73468afd7baf92ef38097c0fc12de",
"0x50e69755f7a815e1ddfc9ef091ea19a7b95099f3ad8befeddf8c2fcd01553c91",
"0xfc57adb390a22a8e54c4ff6cf7280270002d6553185bd90d800b45cf72d7e203",
"0x05a21a369f3045e53d31341e9bd8880254611a4eaa88b00090ec8c542b3fe882",
"0x70c718c714d957ed34930420da379125eb6eaff70cf0103e14e7e3f2afb22542",
"0x5e18c3f68f3b964af8b31d9276329e7e61ffb5d36881a9fc95cee56dea391984",
"0x9bffb2df710d2036ad2dbcfdf5ac3f3783c92e10b55e74fc84bb1fcdc61e31b4",
"0x52e44224ded45bc18ad03cfa6042f244a74b4d3e4778d0cf40a1201e03666c19",
"0x83ae01f16be764e94360ae2f3b8ae219a4c388b0dc2d010993c9b57e53dc1674",
"0xbec21c8e1a411c8397111d7ea666b58a5fcee9eab15e8cf26484c6b46754dad7",
"0x9ac1ec1b723afa4f7a41c5a92199a21575be47c55f815fddf3b6ae8d3404c4bf",
"0x86e41fcd6928e7435bcc925d16f523c7b5e2d611e29e563747eeeb4f19254bef",
"0xa62c69ed5c4632160cfe3ab21fe4e6b1ce24e46642722ea9624c1c6a2123d479",
"0x2e75fc8b803f406f75e01dd61272a1bd291e4943fe50bf65925053f95df7c5ba",
"0x9aaefece38fd2bd87077038a63fffb7c84cc8dd1ed01de134a8504a1f9a410c3",
"0xa1e0d5b75eb08b4f60ffaea7fbcf5090fb75e2e018887799989eea3b12c3e10a",
"0x81126c18c7ca7d1fb7ded6644a87802e91bf52154ee4af7a5b379354e24fb6e0",
"0x6c60cc1218dfa0af9c12bb529f8f21747df53faa1bb995cd60e86e76212a5600",
"0x41ae1ecbf323fc39f149e7f9638800c9540b943d26f6d39002edd64452d85fa4",
"0xcc03addcc86b53cad457b2cc459cde4c8cd68565e1f3abebfbf838bee7dc96ae",
"0x36107b56c9dcf776712abbb0eef95d12e3099f821e163574440046e9b3baee0b",
"0x2f705185db776988b6817fc6ac04d320e81fedb85a522941428321851bec6d9f",
"0x386684d9a6156cc8f54cd34003e147a84bfeaa7c4558f1f10642e913378ce2c5",
"0x4ccb24a326418411562ae0969100ff65a18e60a24558fe503f9defc3a250d411",
"0xd27a67caefe97d4abfdf1c7d1a53cb411a58604c5eabda2e48a26d96cab099e8",
"0xbf9a1b8bc7a1e918a2fc1795e0bb3df0ed4b7146161325580c47fa69c8e8369b",
"0x1e155d7c9e30ab5c65a096cc92f4a40e9cb8d8c0b0416182a5e4784455b4e6cc",
"0x0010d928235a05092dea55eeb4ed45944ff49cb7ec749b01793aadc2c8c74f54",
"0xaf5a6622984421de67f18ab65c565e74d9047d8f38a7266dd8cd14370823f4df",
"0xa059d7149e57c331d3fb13e36c1657160085dcbd5a8c6b01d0f48d271ab60614",
"0x47c482df41abffb5b6827e13afc379b2f843bac2759c6d0eb1d00459f9cb31c5",
"0x77b46aada73de00fa67aa4f72ac47257ddb96b4352851ca3664368bbf0d0ea23",
];
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { ethers, network } from "hardhat";

import { precalculatedResults } from "./search-zbtc-tx-cache";

interface TransactionAnalysisResult {
amount: string;
btcAddress: string;
Expand All @@ -12,59 +14,6 @@ const ADDRESS = "0x13A0c5930C028511Dc02665E7285134B6d11A5f4"; // BTC.BTC
const API_ENDPOINT = "zetachain.blockscout.com";
const END_BLOCK = 1857360;

const preCalculatedResults = [
"0xb59145790f705b023fedee9d803642b24221bacc8b285464b58d90d637872b30",
"0xb78d08dc5e8051cec1427fe9343d65e3996fb21ba8f3483c4348dbe72f0e04ce",
"0xc1dfa2f66e9c729d1e85fd2eaf8c5fbd2aee71f7b21d62a94e6d2b216b256fe2",
"0xe07f7758634148491a340128ade1fd9e27c4a0ca02beb7a52c2cedb36dff5976",
"0xdcd9ca7a9be91d10cb22df5e7b850844f26d144eb1884fd0ce1a3a3820358f17",
"0xf5797d3188a54d586d11f4729a87eddfa46b9c8a2e17db79894a4ba428aa954e",
"0xc7aa5681e715c403614635335a04026ad025080a828f60a031437cb22f42df11",
"0xc47f55d77b27f3880bac796a09b53d0aeaae38cea8acd99d3d890d3518cfe580",
"0x78f7b45ccdb7c3266a8a5d7575470001daea7396e58fe232e9c3a749446727f7",
"0xb59145790f705b023fedee9d803642b24221bacc8b285464b58d90d637872b30",
"0xb78d08dc5e8051cec1427fe9343d65e3996fb21ba8f3483c4348dbe72f0e04ce",
"0xc1dfa2f66e9c729d1e85fd2eaf8c5fbd2aee71f7b21d62a94e6d2b216b256fe2",
"0xe07f7758634148491a340128ade1fd9e27c4a0ca02beb7a52c2cedb36dff5976",
"0xdcd9ca7a9be91d10cb22df5e7b850844f26d144eb1884fd0ce1a3a3820358f17",
"0xf5797d3188a54d586d11f4729a87eddfa46b9c8a2e17db79894a4ba428aa954e",
"0xc7aa5681e715c403614635335a04026ad025080a828f60a031437cb22f42df11",
"0xc47f55d77b27f3880bac796a09b53d0aeaae38cea8acd99d3d890d3518cfe580",
"0x78f7b45ccdb7c3266a8a5d7575470001daea7396e58fe232e9c3a749446727f7",
"0xddb732c20c3ac963a1a16eb78d7af2b2c7a73468afd7baf92ef38097c0fc12de",
"0x50e69755f7a815e1ddfc9ef091ea19a7b95099f3ad8befeddf8c2fcd01553c91",
"0xfc57adb390a22a8e54c4ff6cf7280270002d6553185bd90d800b45cf72d7e203",
"0x05a21a369f3045e53d31341e9bd8880254611a4eaa88b00090ec8c542b3fe882",
"0x70c718c714d957ed34930420da379125eb6eaff70cf0103e14e7e3f2afb22542",
"0x5e18c3f68f3b964af8b31d9276329e7e61ffb5d36881a9fc95cee56dea391984",
"0x9bffb2df710d2036ad2dbcfdf5ac3f3783c92e10b55e74fc84bb1fcdc61e31b4",
"0x52e44224ded45bc18ad03cfa6042f244a74b4d3e4778d0cf40a1201e03666c19",
"0x83ae01f16be764e94360ae2f3b8ae219a4c388b0dc2d010993c9b57e53dc1674",
"0xbec21c8e1a411c8397111d7ea666b58a5fcee9eab15e8cf26484c6b46754dad7",
"0x9ac1ec1b723afa4f7a41c5a92199a21575be47c55f815fddf3b6ae8d3404c4bf",
"0x86e41fcd6928e7435bcc925d16f523c7b5e2d611e29e563747eeeb4f19254bef",
"0xa62c69ed5c4632160cfe3ab21fe4e6b1ce24e46642722ea9624c1c6a2123d479",
"0x2e75fc8b803f406f75e01dd61272a1bd291e4943fe50bf65925053f95df7c5ba",
"0x9aaefece38fd2bd87077038a63fffb7c84cc8dd1ed01de134a8504a1f9a410c3",
"0xa1e0d5b75eb08b4f60ffaea7fbcf5090fb75e2e018887799989eea3b12c3e10a",
"0x81126c18c7ca7d1fb7ded6644a87802e91bf52154ee4af7a5b379354e24fb6e0",
"0x6c60cc1218dfa0af9c12bb529f8f21747df53faa1bb995cd60e86e76212a5600",
"0x41ae1ecbf323fc39f149e7f9638800c9540b943d26f6d39002edd64452d85fa4",
"0xcc03addcc86b53cad457b2cc459cde4c8cd68565e1f3abebfbf838bee7dc96ae",
"0x36107b56c9dcf776712abbb0eef95d12e3099f821e163574440046e9b3baee0b",
"0x2f705185db776988b6817fc6ac04d320e81fedb85a522941428321851bec6d9f",
"0x386684d9a6156cc8f54cd34003e147a84bfeaa7c4558f1f10642e913378ce2c5",
"0x4ccb24a326418411562ae0969100ff65a18e60a24558fe503f9defc3a250d411",
"0xd27a67caefe97d4abfdf1c7d1a53cb411a58604c5eabda2e48a26d96cab099e8",
"0xbf9a1b8bc7a1e918a2fc1795e0bb3df0ed4b7146161325580c47fa69c8e8369b",
"0x1e155d7c9e30ab5c65a096cc92f4a40e9cb8d8c0b0416182a5e4784455b4e6cc",
"0x0010d928235a05092dea55eeb4ed45944ff49cb7ec749b01793aadc2c8c74f54",
"0xaf5a6622984421de67f18ab65c565e74d9047d8f38a7266dd8cd14370823f4df",
"0xa059d7149e57c331d3fb13e36c1657160085dcbd5a8c6b01d0f48d271ab60614",
"0x47c482df41abffb5b6827e13afc379b2f843bac2759c6d0eb1d00459f9cb31c5",
"0x77b46aada73de00fa67aa4f72ac47257ddb96b4352851ca3664368bbf0d0ea23",
];

// Function to check if a transaction involves the specified address
const isTransactionOfInterest = (tx: any, address: string) => {
try {
Expand Down Expand Up @@ -179,9 +128,9 @@ const analyzeTransaction = async (txHash: string) => {

// Call the main function
const main = async () => {
// @dev: findTransactionsInRange takes 20 minutes to run then I pre run it and store the results in preCalculatedResults
// @dev: findTransactionsInRange takes 20 minutes to run then I pre run it and store the results in precalculatedResults
// const txHashes = await findTransactionsInRange();
const txHashes = preCalculatedResults;
const txHashes = precalculatedResults;

const results: TransactionAnalysisResult[] = [];
for (const txHash of txHashes) {
Expand Down

0 comments on commit cc1da2b

Please sign in to comment.