Skip to content

Commit 4b83790

Browse files
authored
Merge pull request elizaOS#2053 from zhourunlai/solana_transaction_more_lenient
feat: solana transaction more lenient
2 parents 0977385 + 685f5a0 commit 4b83790

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/plugin-solana/src/actions/fomo.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const createAndBuyToken = async ({
6666
priorityFee,
6767
requiredLiquidity = 85,
6868
allowOffCurve,
69-
commitment = "finalized",
69+
commitment = "confirmed",
7070
fomo,
7171
connection,
7272
}: {
@@ -182,7 +182,7 @@ export const buyToken = async ({
182182
slippage,
183183
connection,
184184
currency = "sol",
185-
commitment = "finalized",
185+
commitment = "confirmed",
186186
}: {
187187
fomo: Fomo;
188188
buyer: Keypair;
@@ -281,7 +281,7 @@ export const sellToken = async ({
281281
slippage,
282282
connection,
283283
currency = "token",
284-
commitment = "finalized",
284+
commitment = "confirmed",
285285
}: {
286286
fomo: Fomo;
287287
seller: Keypair;

packages/plugin-solana/src/actions/pumpfun.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const createAndBuyToken = async ({
5656
buyAmountSol,
5757
priorityFee,
5858
allowOffCurve,
59-
commitment = "finalized",
59+
commitment = "confirmed",
6060
sdk,
6161
connection,
6262
slippage,
@@ -416,7 +416,7 @@ export default {
416416

417417
const wallet = new Wallet(deployerKeypair);
418418
const provider = new AnchorProvider(connection, wallet, {
419-
commitment: "finalized",
419+
commitment: "confirmed",
420420
});
421421
const sdk = new PumpFunSDK(provider);
422422
// const slippage = runtime.getSetting("SLIPPAGE");

packages/plugin-solana/src/actions/swapUtils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const executeSwap = async (
8282
lastValidBlockHeight: latestBlockhash.lastValidBlockHeight,
8383
blockhash: latestBlockhash.blockhash,
8484
},
85-
"finalized"
85+
"confirmed"
8686
);
8787
if (confirmation.value.err) {
8888
elizaLogger.log("Confirmation error", confirmation.value.err);

0 commit comments

Comments
 (0)