It's probably a dumb question.
I am looking at this example specifically. The following code shows that it's added 300 as the Compute Unit limit, 20000 microLamports as the compute unit price.
This is the transaction detail at Solscan.io. It shows the Priority Fee is 0.000004 SOL. How is the Priority Fee 0.000004 SOL calculated? With 300 Compute Units and 20000 microLamports as the compute unit price, I can not get this number.
// import { ... } from "@solana/web3.js"
const modifyComputeUnits = ComputeBudgetProgram.setComputeUnitLimit({
units: 300,
});
const addPriorityFee = ComputeBudgetProgram.setComputeUnitPrice({
microLamports: 20000,
});
const transaction = new Transaction()
.add(modifyComputeUnits)
.add(addPriorityFee)
.add(
SystemProgram.transfer({
fromPubkey: payer.publicKey,
toPubkey: toAccount,
lamports: 10000000,
}),
);