I am a new developer trying to learn and dive into the Solana ecosystem. I'm currently trying to complete this lab: https://www.soldev.app/course/token-program.
I'm on step 2 of the lab, where you create a token mint. Based on the logs, the Token Mint is completing successfully, but it's failing on const mintInfo = await token.getMint(connection, mint);
Here is the function I am trying to run:
async function main() {
const connection = new web3.Connection(web3.clusterApiUrl("devnet"))
const user = await initializeKeypair(connection)
const mint = await createNewMint(
connection,
user,
user.publicKey,
user.publicKey,
2
)
const mintInfo = await token.getMint(connection, mint);
}
Here is the error output I'm getting:
(base) ➜ token git:(main) ✗ npm run start
> [email protected] start
> ts-node src/index.ts
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
PublicKey: 3qPfaEpTANysCPvSEUdDFmPk9wH5nCoR9L75Q7oiWpVt
Token Mint: https://explorer.solana.com/address/6jsanoaZKCmrKkaGqbtuZNrpnwqpX9GGJgqhjyYNpmvj?cluster=devnet
TokenAccountNotFoundError
at unpackMint (/Users/kapforty/Documents/Projects/Solana Development Course/token/node_modules/@solana/spl-token/src/state/mint.ts:95:22)
at Object.<anonymous> (/Users/kapforty/Documents/Projects/Solana Development Course/token/node_modules/@solana/spl-token/src/state/mint.ts:82:12)
at Generator.next (<anonymous>)
at fulfilled (/Users/kapforty/Documents/Projects/Solana Development Course/token/node_modules/@solana/spl-token/lib/cjs/state/mint.js:5:58)
at processTicksAndRejections (node:internal/process/task_queues:95:5)