I have tried to transfer sol to the program address it fails, but transferring another token works, why ?? Both are the types of tokens.
1 Answer
SOL is not an SPL token. When you try to send an SPL token to a program account, it sends it to the associated token account of the program by default. Furthermore, the program account does not hold the tokens, it only controls the token account.
You can only transfer SOL to an account if the account is marked mutable. Program accounts(executables) are read-only.
-
According to you, the program accounts are immutable so that we cannot send the sol into it?? Then how we are able to send the spl-token into that account if they are immutable– JaspalCommented Dec 7, 2022 at 17:54
-
1"Furthermore, the program account does not hold the tokens, it only controls the token account."– acheronCommented Dec 8, 2022 at 2:21
-
ok thanks, but I recentally tried to send the tokens to the program account, and it was successfull.– JaspalCommented Dec 8, 2022 at 7:02