fix(ata)!: namespace accounts by token program

ATA accounts are now namespaced by token program, so callers must
explicitly pass the token_program_id when invoking ATA::Transfer.

BREAKING CHANGE: `Instruction::Transfer`, `Instruction::Burn`, `Instruction::Create` now requires a
`token_program_id` field. Any existing call site that omits it will
fail to compile.

Closes #83
This commit is contained in:
Ricardo Guilherme Schmidt
2026-05-18 12:33:48 +02:00
committed by r4bbit
parent 29b4c01739
commit 893775aec8
8 changed files with 425 additions and 39 deletions
+14 -1
View File
@@ -24,7 +24,12 @@
"init": false
}
],
"args": []
"args": [
{
"name": "token_program_id",
"type": "program_id"
}
]
},
{
"name": "transfer",
@@ -49,6 +54,10 @@
}
],
"args": [
{
"name": "token_program_id",
"type": "program_id"
},
{
"name": "amount",
"type": "u128"
@@ -78,6 +87,10 @@
}
],
"args": [
{
"name": "token_program_id",
"type": "program_id"
},
{
"name": "amount",
"type": "u128"