-
Notifications
You must be signed in to change notification settings - Fork 153
Getting fee for message #431
Unanswered
bokoskokos
asked this question in
Q&A
-
I am trying to use the GetFeeForMessageAsync method but I seem to get the same result (5000) no matter the transaction message. I must be doing something wrong, does anyone see the issue here?
var blockHash = await rpcClient.GetLatestBlockHashAsync();
var txRaw = new TransactionBuilder().
SetRecentBlockHash(blockHash.Result.Value.Blockhash).
SetFeePayer(<PAYER>).
AddInstruction(TransactionInstructionFactory.Create(
programId: <PROGRAM_ID>,
keys: new List<AccountMeta>{ <ACOUNTS> }
));
var txBytes = txRaw.Build(new List<Account> { PAYER });
var message = Convert.ToBase64String(txRaw.CompileMessage());
var feeResponse = await rpcClient.GetFeeForMessageAsync(message); // always 5000
var response = await rpcClient.SendTransactionAsync(txBytes);
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
Did you get any answers?
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment