Created
August 25, 2022 08:19
-
-
Save arivictor/f155b63e156729121ab9484765918d0e 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
| // "@metaplex-foundation/js": "^0.15.0", | |
| import {Metaplex} from "@metaplex-foundation/js"; | |
| import {Connection, PublicKey} from "@solana/web3.js"; | |
| const RPC_URL = 'https://...'; | |
| const MASTER_EDITION_ADDRESS = 'DdK...NFHaH'; | |
| const RESULT_OUTPUT_PATH = './hashlist.json'; | |
| (async () => { | |
| const connection = new Connection(RPC_URL); | |
| const metaplex = new Metaplex(connection); | |
| const result: any = await metaplex.nfts().findByMint({ | |
| mintAddress: new PublicKey('<EDITION PUBLIC KEY (Token Address)>') | |
| }).run() | |
| if (result.model !== "sft") { | |
| console.log('parent edition', result.edition.parent.toString()) | |
| console.log(result.edition.number.toString()) | |
| } | |
| })() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment