Skip to content

Commit

Permalink
minimal changes necessary for sbod
Browse files Browse the repository at this point in the history
  • Loading branch information
mschneider committed Nov 30, 2024
1 parent 83a3b2d commit cce1f1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ts/client/src/accounts/oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ export function isOracleStaleOrUnconfident(
}
if (debug && deviation) {
console.log(
`- ${debugPrefix?.padStart(30)}: deviation within confidence tolerance ${deviation.mul(I80F48.fromNumber(100)).div(confFilter).toFixed(3)}%`,
`- ${debugPrefix?.padStart(30)}: deviation within confidence tolerance ${deviation.div(price).mul(I80F48.fromNumber(100)).toFixed(3)}%`,
);
}

Expand Down
9 changes: 9 additions & 0 deletions ts/client/src/utils/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,15 @@ export const createComputeBudgetIx = (
return computeBudgetIx;
};

export const createComputeLimitIx = (
units: number,
): TransactionInstruction => {
const computeBudgetIx = ComputeBudgetProgram.setComputeUnitLimit({
units,
});
return computeBudgetIx;
};

export class MangoError extends Error {
message: string;
txid: string;
Expand Down

0 comments on commit cce1f1c

Please sign in to comment.