Skip to content

Commit

Permalink
update setComputeUnitPrice
Browse files Browse the repository at this point in the history
  • Loading branch information
XingqiWang committed Nov 20, 2024
1 parent 6ebe673 commit 009fa50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 07-cu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const connection = new Connection("https://api.mainnet-beta.solana.com", "confir

默认情况下,交易CU数量分配为 `200000*指令数量`

> 注意Compute Budget程序指令不会被计算在此处的指令数量内
> 注意若只设置setComputeUnitPrice,此setComputeUnitPrice指令不会被计算在此处的指令数量内
通过setComputeUnitPrice设置每CU的价格为5 microLamports,可以看到[这条仅包含1个转账指令的交易](https://solscan.io/tx/34eohoyTp2oZ1jtFNtcEUp9oe2QfRf5HRarexCbKnUm93ga3sGjP8Aduwd8xcbRrZk9HNdRJ9rqWZ8peGhruPfuK)优先费用为0.000000001 SOL,即 `200000*1*5 = 1 Lamports`

Expand Down

0 comments on commit 009fa50

Please sign in to comment.