In my program, when I call the frontend function I'd like the PDA to be the fee payer and not the end user (so end user has not to approve transaction), although my PDA is stated as isSigner
in my IDL, I tried using a node wallet (anchorWallet) as intermediary to pay the fees but it requires access to it's Keypair and I believe that is not possible, maybe in some old deprecated version?
Add a comment
|
1 Answer
It is not possible as far as I am aware to have a PDA account pay the transaction fee.
Can you create a program that refunds the fee in the same transaction but still ask the user to sign (example)?
Here is Armani asking the same question:
https://twitter.com/armaniferrante/status/1506788094242082826
-
thanks the answer! For your question, I believe a refund would have the same mechanics as a withdraw function, with my actual implementation it would still require the signer to approve the "withdraw" so we we end up in a halting problem hahaha– SingCommented Aug 17, 2022 at 16:07