Created
October 27, 2023 06:21
-
-
Save terranmoccasin/f994095fccaf3611c61fd44c26a3f7b9 to your computer and use it in GitHub Desktop.
This file contains 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 { Connection } from "@solana/web3.js"; | |
import { TokenFetcher } from "./fetcher"; | |
import { MetaplexProvider } from "./metadata"; | |
async function main() { | |
const connection = new Connection(<connection_url>); | |
const fetcher = new TokenFetcher(connection).addProvider( | |
new MetaplexProvider(connection, { intervalMs: 1000, concurrency: 10, loadImage: true }) | |
); | |
const mints = [ | |
"24a1k6wSDQUSwoRXJyvkr25kF5do8f6Ddff6A2fTc1pM", | |
"2FPyTwcZLUg1MDrwsyoP4D6s1tM7hAkHYRjkNb5w6Pxk", | |
"2HeykdKjzHKGm2LKHw8pDYwjKPiFEoXAz74dirhUgQvq", | |
]; | |
const tokens = await fetcher.findMany(mints); | |
console.log(tokens); | |
debugger; | |
} | |
main() | |
.then(() => { | |
console.log("done"); | |
}) | |
.catch((err) => { | |
console.error(err); | |
process.exit(1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment