-
Notifications
You must be signed in to change notification settings - Fork 45
how to transfer tokens using this SDK i.e. spl-token transfer? #21
Comments
I believe it's not yet fully integrated, but haven't tested it https://github.com/tighten/solana-php-sdk#transactions |
Anymore info on this would be highly appreciated ❤️ |
Seems like it's being worked on #28 |
@suchpro Were you able to figure this out |
I can transfer tokens now, but the amount sent is not encoded properly I believe to the right decimal so it sends a wrong value |
@impozzible haven't tested it yet |
Figured it out, incase someone else runs into this issue
|
'Transfer' instruction is deprecated for now and token developers recommend to use 'TransferChecked' instruction, sample code:
In case when you doesn't have token Account address you must to create it, for this action get associated token address with following function
Then add instruction for create token address into your transaction, but if account already created not add this instruction to transaction object
|
Does anyone have an example of full code on this working? I keep getting a
error |
Can you post your full code for sending a token please? |
not an issue but a question or a feature request
is it possible to transfer tokens using this SDK like with the Solana CLI using a terminal?
Terminal Example:
$spl-token transfer --allow-unfunded-recipient --fund-recipient [token address] [amount of tokens] [recipients wallet]
The text was updated successfully, but these errors were encountered: