Replies: 2 comments
-
|
something like this is required public class ComputeBudgetProgram } |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thanks to all participants for the code. Here is the implementation https://github.com/brunopedrazza/Solnet |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Good afternoon
In connection with this event https://solana.com/news/block-optimization-on-the-solana-network it becomes almost impossible to use the library, since it is impossible to send a transaction without a priority commission!
it is impossible to use the services; It is recommended to add a priority fee to the transaction.
https://docs.helius.dev/solana-rpc-nodes/alpha-priority-fee-api
https://docs.chainstack.com/docs/solana-how-to-priority-fees-faster-transactions
ComputeBudgetProgram is missing (example of implementation in the Tupe script https://github.com/solana-labs/solana-web3.js/blob/3da6574/packages/library-legacy/src/programs/compute-budget.ts#L227), with with which you can specify in the transaction the size of the priority commission accepted by the node.
implementation that is not in SOLNET on wen web3.js
const AdvanceNonce = SystemProgram.nonceAdvance({
noncePubkey: nonceAccountPubkey,
authorizedPubkey: nonceAccountAuth.publicKey,
});
const modifyComputeUnits = ComputeBudgetProgram.setComputeUnitLimit({
units: 300,
});
const addPriorityFee = ComputeBudgetProgram.setComputeUnitPrice({
microlamports: 20000,
});
persistent transaction = new transaction()
.add(advanceNonce)
.add(modifyComputeUnits)
.add(addPriorityFee)
.add(
SystemProgram.transfer({
fromPubkey: payer.publicKey,
toPubkey: toAccount,
lamps: 10000000,
}),
);
is it possible to add this implementation to the library?
Beta Was this translation helpful? Give feedback.
All reactions