mirror of
https://github.com/d0zingcat/solana-agent-kit.git
synced 2026-05-21 23:26:45 +00:00
fix: Update tests for Meteora
This commit is contained in:
@@ -63,6 +63,8 @@ import {
|
||||
fetchPythPriceFeedID,
|
||||
flashOpenTrade,
|
||||
flashCloseTrade,
|
||||
createMeteoraDynamicAMMPool,
|
||||
createMeteoraDlmmPool,
|
||||
} from "../tools";
|
||||
import {
|
||||
CollectionDeployment,
|
||||
@@ -339,6 +341,57 @@ export class SolanaAgentKit {
|
||||
);
|
||||
}
|
||||
|
||||
async meteoraCreateDynamicPool(
|
||||
tokenAMint: PublicKey,
|
||||
tokenBMint: PublicKey,
|
||||
tokenAAmount: BN,
|
||||
tokenBAmount: BN,
|
||||
tradeFeeNumerator: number,
|
||||
activationPoint: BN | null,
|
||||
hasAlphaVault: boolean,
|
||||
activationType: number,
|
||||
): Promise<string> {
|
||||
return createMeteoraDynamicAMMPool(
|
||||
this,
|
||||
tokenAMint,
|
||||
tokenBMint,
|
||||
tokenAAmount,
|
||||
tokenBAmount,
|
||||
{
|
||||
tradeFeeNumerator,
|
||||
activationPoint,
|
||||
hasAlphaVault,
|
||||
activationType,
|
||||
padding: new Array(90).fill(0),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
async meteoraCreateDlmmPool(
|
||||
binStep: number,
|
||||
tokenAMint: PublicKey,
|
||||
tokenBMint: PublicKey,
|
||||
initialPrice: number,
|
||||
priceRoundingUp: boolean,
|
||||
feeBps: number,
|
||||
activationType: number,
|
||||
hasAlphaVault: boolean,
|
||||
activationPoint: BN | undefined,
|
||||
): Promise<string> {
|
||||
return createMeteoraDlmmPool(
|
||||
this,
|
||||
binStep,
|
||||
tokenAMint,
|
||||
tokenBMint,
|
||||
initialPrice,
|
||||
priceRoundingUp,
|
||||
feeBps,
|
||||
activationType,
|
||||
hasAlphaVault,
|
||||
activationPoint,
|
||||
);
|
||||
}
|
||||
|
||||
async orcaClosePosition(positionMintAddress: PublicKey) {
|
||||
return orcaClosePosition(this, positionMintAddress);
|
||||
}
|
||||
|
||||
@@ -34,4 +34,9 @@ export const JUP_API = "https://quote-api.jup.ag/v6";
|
||||
export const JUP_REFERRAL_ADDRESS =
|
||||
"REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3";
|
||||
|
||||
export const METEORA_DYNAMIC_AMM_PROGRAM_ID = new PublicKey("Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB");
|
||||
export const METEORA_DYNAMIC_AMM_PROGRAM_ID = new PublicKey(
|
||||
"Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB",
|
||||
);
|
||||
export const METEORA_DLMM_PROGRAM_ID = new PublicKey(
|
||||
"LbVRzDTvBDEcrthxfZ4RL6yiq3uZw8bS6MwtdY6UhFQ",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user