Timeline for How to get token account data from within the on-chain program?
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 13, 2023 at 14:41 | comment | added | m_callens | an associated token account is just a token account. you can use the same code above. | |
Mar 13, 2023 at 9:57 | comment | added | Muhit Raihan | One more question @m_callens, how can I access the data of ATA within on-chain program after I passed it to program? | |
Mar 13, 2023 at 7:13 | comment | added | Muhit Raihan | Gotcha. Thank you! | |
Mar 13, 2023 at 7:13 | vote | accept | Muhit Raihan | ||
Mar 13, 2023 at 0:20 | comment | added | m_callens | no. this is a runtime limitation of solana where instructions are only provided with the data of accounts that are given as inputs. its helps make on chain contracts deterministic and efficient. | |
Mar 12, 2023 at 12:42 | comment | added | Muhit Raihan |
Is it not possible to get the token account data if I don't pass the token account to instructions? What I want to do is, within the onchain program, I want to do get_or_create_associated_token_account . Or at least get the data from within the program, want to be able to only pass the token owner, token mint and token receiver wallet to the on-chain program and then token account creation will happen within the on-chain program. Is that not possible?
|
|
Mar 12, 2023 at 1:22 | history | answered | m_callens | CC BY-SA 4.0 |