Merge pull request #2 from quangkeu95/feat/meteora

chore: Format code
This commit is contained in:
Hashira
2025-01-11 08:49:26 +07:00
committed by GitHub
3 changed files with 21 additions and 14 deletions

View File

@@ -4,7 +4,7 @@
// import BN from "bn.js";
// /**
// * Create Meteora FCFS alpha vault
// * Create Meteora FCFS alpha vault
// * @param agent SolanaAgentKit instance
// * @param tokenAMint Token A mint
// * @param tokenBMint Token B mint
@@ -17,7 +17,7 @@
// * @param individualDepositingCap Maximum number of deposit amount for individual
// * @param escrowFee Fee to create stake escrow account
// * @param whitelistMode Alpha vault whitelist mode
// * @returns
// * @returns
// */
// export async function createMeteoraFcfsAlphaVault(
// agent: SolanaAgentKit,
@@ -64,7 +64,7 @@
// }
// /**
// * Create Meteora Prorata alpha vault
// * Create Meteora Prorata alpha vault
// * @param agent SolanaAgentKit instance
// * @param tokenAMint Token A mint
// * @param tokenBMint Token B mint
@@ -76,7 +76,7 @@
// * @param maxBuyingCap Maximum buying amount
// * @param escrowFee Fee to create stake escrow account
// * @param whitelistMode Alpha vault whitelist mode
// * @returns
// * @returns
// */
// export async function createMeteoraProrataAlphaVault(
// agent: SolanaAgentKit,
@@ -118,4 +118,4 @@
// });
// return createAlphaVaultTxHash;
// }
// }

View File

@@ -28,7 +28,7 @@ export async function createMeteoraDlmmPool(
feeBps: number,
activationType: ActivationType,
hasAlphaVault: boolean,
activationPoint: BN | undefined
activationPoint: BN | undefined,
): Promise<string> {
const tokenAMintInfo = await getMint(agent.connection, tokenAMint);
const tokenBMintInfo = await getMint(agent.connection, tokenBMint);
@@ -55,8 +55,8 @@ export async function createMeteoraDlmmPool(
activationType,
hasAlphaVault,
agent.wallet_address,
activationPoint
)
activationPoint,
);
const initPoolTxHash = await sendAndConfirmTransaction(
agent.connection,
@@ -68,4 +68,4 @@ export async function createMeteoraDlmmPool(
});
return initPoolTxHash;
}
}

View File

@@ -25,11 +25,18 @@ export async function createMeteoraDynamicAMMPool(
tokenBMint: PublicKey,
tokenAAmount: BN,
tokenBAmount: BN,
customizableParams: CustomizableParams
customizableParams: CustomizableParams,
): Promise<string> {
const initPoolTx = await AmmImpl.createCustomizablePermissionlessConstantProductPool(
agent.connection, agent.wallet_address, tokenAMint, tokenBMint, tokenAAmount, tokenBAmount, customizableParams
)
const initPoolTx =
await AmmImpl.createCustomizablePermissionlessConstantProductPool(
agent.connection,
agent.wallet_address,
tokenAMint,
tokenBMint,
tokenAAmount,
tokenBAmount,
customizableParams,
);
const initPoolTxHash = await sendAndConfirmTransaction(
agent.connection,
@@ -41,4 +48,4 @@ export async function createMeteoraDynamicAMMPool(
});
return initPoolTxHash;
}
}