Open strickland84 opened 3 months ago
Hey @strickland84 there seems to be an issue in how umi derives the token account?
import { findAssociatedTokenPda } from '@metaplex-foundation/mpl-toolbox'
const token = findAssociatedTokenPda(umi, {
mint: mint.publicKey,
owner: umi.identity.publicKey,
tokenProgramId: SPL_TOKEN_2022_PROGRAM_ID,
});
const transaction = transactionBuilder()
.add(createV1(umi, {
mint,
authority: umi.identity,
name: token.name,
symbol: token.symbol,
uri: metaDataUri,
sellerFeeBasisPoints: percentAmount(0),
decimals: token.decimals,
splTokenProgram: SPL_TOKEN_2022_PROGRAM_ID,
tokenOwner: umi.identity.publicKey,
tokenStandard: TokenStandard.Fungible
}))
.add(mintV1(umi, {
mint: mint.publicKey,
authority: umi.identity.publicKey,
token,
tokenOwner: mint.publicKey,
splTokenProgram: SPL_TOKEN_2022_PROGRAM_ID,
tokenStandard: TokenStandard.Fungible
}))
I am trying to create a Fungible SPL-2022 token with metaplex. I believe I'm missing some key piece of the puzzle here so help would be appreciated. My pseudo-code looks like this:
When I run this function I receive error:
If I skip preflight, I receive error:
Can anyone help enlighten me? What am I missing here? Thanks!