Created
November 2, 2022 10:56
-
-
Save mgild/3df766ebf7a8d750f387f192afce58bc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (async function main() { | |
| const con = new sol.Connection("<URL>"); | |
| const sigs = await con.getSignaturesForAddress( | |
| new sol.PublicKey("4yc4MtfTaGVh2WyrZ9scxZNusLrzP243E3ra6gTtvcP2"), | |
| { | |
| before: "<START TX>", | |
| until: | |
| "2AVSgDStayxKcvd8tnr2tw3e68ejfUVsjmrAxMkBXNZmryAiiChAWCcNrLisFdJ2UW3JKh9tJUu3yWbsucsnxryG", | |
| } | |
| ); | |
| console.log(sigs); | |
| for (const sig of sigs) { | |
| const tx = await con.getTransaction(sig.signature!); | |
| const logs = tx!.meta!.logMessages!; | |
| if (logs[1]!.includes("'result'")) { | |
| console.log(new Date(sig.blockTime! * 1000)); | |
| console.log(Number(logs[1].match(/\((.*)\)/)![1]!)); | |
| } | |
| } | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment