Last active
July 7, 2025 21:02
-
-
Save mikemaccana/138c8fa8d0bcf0b93d51587f32ab9a35 to your computer and use it in GitHub Desktop.
Get the block from a transaction hash
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
import { Signature } from "@solana/kit"; | |
import { connect } from "solana-kite"; | |
const log = console.log; | |
const KOWALSKI_TRANSACTION = | |
"2BM8psEVuV7QDZgX97Q3sEhjk6zKkKPNXhzFJNE9H2PbSZRdcD6fz1bR7xXBNWp3zgSUDYFBtKqYz2zz1YBZgb63"; | |
const connection = connect("quicknode-mainnet"); | |
const transaction = await connection.rpc | |
.getTransaction(KOWALSKI_TRANSACTION as Signature, { | |
encoding: "json", | |
maxSupportedTransactionVersion: 0, | |
}) | |
.send(); | |
console.log(transaction?.slot); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment