Skip to main content
added 80 characters in body
Source Link

You can add a setComputeUnitLimit() instruction to the transaction:

import {
  Transaction,
  ComputeBudgetProgram,
} from "@solana/web3.js";

let tx = new Transaction();
// needs to be the first instruction
// experiment with this number to find one where the transaction succeeds.
tx.add(ComputeBudgetProgram.setComputeUnitLimit({ units: 200_000 }));

// add other instructions
tx.add(...);

You can add a setComputeUnitLimit() instruction to the transaction:

let tx = new Transaction();
// needs to be the first instruction
// experiment with this number to find one where the transaction succeeds.
tx.add(ComputeBudgetProgram.setComputeUnitLimit({ units: 200_000 }));

// add other instructions
tx.add(...);

You can add a setComputeUnitLimit() instruction to the transaction:

import {
  Transaction,
  ComputeBudgetProgram,
} from "@solana/web3.js";

let tx = new Transaction();
// needs to be the first instruction
// experiment with this number to find one where the transaction succeeds.
tx.add(ComputeBudgetProgram.setComputeUnitLimit({ units: 200_000 }));

// add other instructions
tx.add(...);
Fix `number` -> `units`
Source Link

You can add a setComputeUnitLimit() instruction to the transaction:

let tx = new Transaction();
// needs to be the first instruction
// experiment with this number to find one where the transaction succeeds.
tx.add(ComputeBudgetProgram.setComputeUnitLimit({ numberunits: 200_000 }));

// add other instructions
tx.add(...);

You can add a setComputeUnitLimit() instruction to the transaction:

let tx = new Transaction();
// needs to be the first instruction
// experiment with this number to find one where the transaction succeeds.
tx.add(ComputeBudgetProgram.setComputeUnitLimit({ number: 200_000 }));

// add other instructions
tx.add(...);

You can add a setComputeUnitLimit() instruction to the transaction:

let tx = new Transaction();
// needs to be the first instruction
// experiment with this number to find one where the transaction succeeds.
tx.add(ComputeBudgetProgram.setComputeUnitLimit({ units: 200_000 }));

// add other instructions
tx.add(...);
Source Link

You can add a setComputeUnitLimit() instruction to the transaction:

let tx = new Transaction();
// needs to be the first instruction
// experiment with this number to find one where the transaction succeeds.
tx.add(ComputeBudgetProgram.setComputeUnitLimit({ number: 200_000 }));

// add other instructions
tx.add(...);