mirror of
https://github.com/fdundjer/solana-sniper-bot.git
synced 2025-11-10 04:22:05 +10:00
3
bot.ts
3
bot.ts
@ -173,6 +173,7 @@ export class Bot {
|
||||
{
|
||||
mint: poolState.baseMint.toString(),
|
||||
signature: result.signature,
|
||||
error: result.error,
|
||||
},
|
||||
`Error confirming buy tx`,
|
||||
);
|
||||
@ -258,6 +259,7 @@ export class Bot {
|
||||
{
|
||||
mint: rawAccount.mint.toString(),
|
||||
signature: result.signature,
|
||||
error: result.error,
|
||||
},
|
||||
`Error confirming sell tx`,
|
||||
);
|
||||
@ -274,6 +276,7 @@ export class Bot {
|
||||
}
|
||||
}
|
||||
|
||||
// noinspection JSUnusedLocalSymbols
|
||||
private async swap(
|
||||
poolKeys: LiquidityPoolKeysV4,
|
||||
ataIn: PublicKey,
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { BlockhashWithExpiryBlockHeight, Keypair, MessageV0, Signer, VersionedTransaction } from '@solana/web3.js';
|
||||
import { BlockhashWithExpiryBlockHeight, Keypair, VersionedTransaction } from '@solana/web3.js';
|
||||
|
||||
export interface TransactionExecutor {
|
||||
executeAndConfirm(
|
||||
transaction: VersionedTransaction,
|
||||
payer: Keypair,
|
||||
latestBlockHash: BlockhashWithExpiryBlockHeight,
|
||||
): Promise<{ confirmed: boolean; signature?: string }>;
|
||||
): Promise<{ confirmed: boolean; signature?: string, error?: string }>;
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ export class WarpTransactionExecutor implements TransactionExecutor {
|
||||
const warpFeeTx = new VersionedTransaction(warpFeeMessage);
|
||||
warpFeeTx.sign([payer]);
|
||||
|
||||
const response = await axios.post<{ confirmed: boolean; signature: string }>(
|
||||
const response = await axios.post<{ confirmed: boolean; signature: string, error?: string }>(
|
||||
'https://tx.warp.id/transaction/execute',
|
||||
{
|
||||
transactions: [bs58.encode(warpFeeTx.serialize()), bs58.encode(transaction.serialize())],
|
||||
|
||||
Reference in New Issue
Block a user