Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add a dedicated account for fee paying ? #34

Open
kaiyes opened this issue May 18, 2024 · 3 comments
Open

How to add a dedicated account for fee paying ? #34

kaiyes opened this issue May 18, 2024 · 3 comments

Comments

@kaiyes
Copy link

kaiyes commented May 18, 2024

Hi, I've been trying in vein to add a fee payer account like we can for sending sols.

const swapTransactionBuf = Buffer.from(swapResult.swapTransaction, 'base64')
var transaction = VersionedTransaction.deserialize(swapTransactionBuf)

// Set fee payer
transaction.feePayer = feePayerkeypair.publicKey // Ensure the transaction's fee payer is set

transaction.recentBlockhash = (
await connection.getRecentBlockhash()
).blockhash

// Sign the transaction with both the wallet and the fee payer
transaction.sign([feePayer.keypair, accountKeypayer ]) // Sign the transaction with both the user's wallet and the fee payer

I always get the error "Cannot sign with non signer key"
@kaiyes
Copy link
Author

kaiyes commented May 21, 2024

This issue has the exact same problem as mine, but no answers there either
https://solana.stackexchange.com/questions/7432/setting-feepayer-of-versionedtransaction

@winter2009
Copy link

is there any udpate?

@distbit0
Copy link

I've also got the exact same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@winter2009 @kaiyes @distbit0 and others