3

screenshot while transferring sol to the program address

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 1

5

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.

3
  • 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
    – Jaspal
    Commented Dec 7, 2022 at 17:54
  • 1
    "Furthermore, the program account does not hold the tokens, it only controls the token account."
    – acheron
    Commented Dec 8, 2022 at 2:21
  • ok thanks, but I recentally tried to send the tokens to the program account, and it was successfull.
    – Jaspal
    Commented Dec 8, 2022 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.