Skip to content

Commit

Permalink
fix: correct import for getSetComputeUnitLimitInstruction helper (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
codebender828 authored Jul 26, 2024
1 parent f1dc13d commit a61a732
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ Since validators have an incentive to pack as many transactions into each block
Use this utility to estimate the actual compute unit cost of a given transaction message.

```ts
import { getSetComputeLimitInstruction } from '@solana-program/compute-budget';
import { getSetComputeUnitLimitInstruction } from '@solana-program/compute-budget';
import { createSolanaRpc, getComputeUnitEstimateForTransactionMessageFactory, pipe } from '@solana/web3.js';

// Create an estimator function.
Expand All @@ -910,7 +910,7 @@ const computeUnitsEstimate = await getComputeUnitEstimateForTransactionMessage(t

// Set the transaction message's compute unit budget.
const transactionMessageWithComputeUnitLimit = prependTransactionMessageInstruction(
getSetComputeLimitInstruction({ units: computeUnitsEstimate }),
getSetComputeUnitLimitInstruction({ units: computeUnitsEstimate }),
transactionMessage,
);
```
Expand Down

0 comments on commit a61a732

Please sign in to comment.