File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -890,7 +890,7 @@ Since validators have an incentive to pack as many transactions into each block
890890Use this utility to estimate the actual compute unit cost of a given transaction message.
891891
892892``` ts
893- import { getSetComputeLimitInstruction } from ' @solana-program/compute-budget' ;
893+ import { getSetComputeUnitLimitInstruction } from ' @solana-program/compute-budget' ;
894894import { createSolanaRpc , getComputeUnitEstimateForTransactionMessageFactory , pipe } from ' @solana/web3.js' ;
895895
896896// Create an estimator function.
@@ -910,7 +910,7 @@ const computeUnitsEstimate = await getComputeUnitEstimateForTransactionMessage(t
910910
911911// Set the transaction message's compute unit budget.
912912const transactionMessageWithComputeUnitLimit = prependTransactionMessageInstruction (
913- getSetComputeLimitInstruction ({ units: computeUnitsEstimate }),
913+ getSetComputeUnitLimitInstruction ({ units: computeUnitsEstimate }),
914914 transactionMessage ,
915915);
916916```
You can’t perform that action at this time.
0 commit comments