Skip to content

SolanaJSONRPCError: airdrop to "walletaddress" failed: Invalid request #659

Description

@RaviWebcyst

const feePayer = Keypair.fromSecretKey(
bs58.decode(
privateKey
)
);

const airdropSig = await connection.requestAirdrop(
feePayer.publicKey,
1000000000
);

await connection.confirmTransaction(airdropSig);

const alice = Keypair.fromSecretKey(
bs58.decode(
privateKey
)
);

const mintPubkey = new PublicKey(
"AHAXf2nFJCJvvvkL34tDVoTuSRhVdPSNQUsiqFs4dtZ5"
);

{
let ata = await createAssociatedTokenAccountIdempotent(
connection, // connection
feePayer, // fee payer
mintPubkey, // mint
alice.publicKey, // owner
undefined,
TOKEN_2022_PROGRAM_ID
);
console.log(ATA: ${ata.toBase58()});
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions