Trouble burning tokens #235
Unanswered
pcarvalho75
asked this question in
Q&A
Replies: 1 comment 1 reply
-
make sure you are passing correct parameters. for instance i can see that first parameter is wrong, you are passing mintAddress, which is second parameter, first one is associated token adddress of the source public key where token is held, etc. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi guys,
I just keep getting errors when trying to burn tokens. My code is below, I have several questions.
In your example, you use Compile message. when doing so, I get the error:TX1.Length 202
Simulation:
{"jsonrpc":"2.0","error":{"code":-32602,"message":"io error: failed to fill whole buffer"},"id":6}
What is the difference between compile message and build?
Im also having trouble figuring out the proper account data, as when I use Build, I get:
{"jsonrpc":"2.0","result":{"context":{"slot":87464108},"value":{"accounts":null,"err":{"InstructionError":[0,"InvalidAccountData"]},"logs":["Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1]","Program log: Instruction: Burn","Program log: Error: InvalidAccountData","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 1446 of 200000 compute units","Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA failed: invalid account data for instruction"]}},"id":4}
The token im trying to burn is: 5tXwi4BnyWvR1qB8DMMN1n3AA5JzwQvtfLZAyykjpJcz found on the devnet.
Many thanks,
Paulo
`public async void Burn (string tokenAddress, ulong amount)
{
Beta Was this translation helpful? Give feedback.
All reactions