Skip to content

Transaction simulation failed: Error processing Instruction 2: incorrect program id for instruction","data" #318

@yaoji-cell

Description

@yaoji-cell

I encountered a problem and always prompted this. Here are the instructions I printed out 2

[2025-04-29 23:47:14.247] Program ID: ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL
[2025-04-29 23:47:14.247] Data:
[2025-04-29 23:47:14.247] Accounts:
[2025-04-29 23:47:14.247] 0: EDZhjGuShnN8rs6niYBdiAGjL762yJm3ufyaCKsSPdp4 (writable: true, signer: true)
[2025-04-29 23:47:14.247] 1: HiXmpasiAQCim1aYigU3bn8iVrh91shSB9oPpsDgFtwL (writable: true, signer: false)
[2025-04-29 23:47:14.247] 2: EDZhjGuShnN8rs6niYBdiAGjL762yJm3ufyaCKsSPdp4 (writable: false, signer: false)
[2025-04-29 23:47:14.247] 3: 27x7s2Bv3m16hi7ih7jdhft4EZ7QUz5QMC76pzvBpump (writable: false, signer: false)
[2025-04-29 23:47:14.247] 4: 11111111111111111111111111111111 (writable: false, signer: false)
[2025-04-29 23:47:14.247] 5: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA (writable: false, signer: false)
[2025-04-29 23:47:14.247] 6: SysvarRent111111111111111111111111111111111 (writable: false, signer: false)

this is my go code
createATAIx := associatedtokenaccount.NewCreateInstruction(
payer.PublicKey(), // payer
payer.PublicKey(), // owner
mint, // mint
).Build()

instructions = append(instructions, createATAIx)

pls help me fix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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