From 8509373bf78bf28cd8e8858cb22b739b1b9537b4 Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 6 Dec 2024 08:42:44 -0500 Subject: [PATCH] Update README --- tokens/token-swap/README.md | 15 ++------------- tokens/token-swap/native/tests/create_amm.ts | 2 +- tokens/token-swap/native/tests/create_pool.ts | 2 +- .../token-swap/native/tests/deposit_liquidity.ts | 2 +- .../native/tests/swap_exact_tokens_for_tokens.ts | 2 +- tokens/token-swap/native/tests/ts/index.ts | 2 +- .../native/tests/ts/instructions/create_amm.ts | 2 +- .../native/tests/ts/instructions/create_pool.ts | 2 +- .../tests/ts/instructions/deposit_liquidity.ts | 2 +- .../native/tests/ts/instructions/index.ts | 1 - .../tests/ts/instructions/withdraw_liquidity.ts | 2 +- tokens/token-swap/native/tests/ts/state/amm.ts | 2 +- tokens/token-swap/native/tests/ts/state/index.ts | 2 +- tokens/token-swap/native/tests/ts/state/pool.ts | 2 +- tokens/token-swap/native/tests/utils.ts | 2 +- 15 files changed, 15 insertions(+), 27 deletions(-) diff --git a/tokens/token-swap/README.md b/tokens/token-swap/README.md index 9e6041b2f..71f8f1d36 100644 --- a/tokens/token-swap/README.md +++ b/tokens/token-swap/README.md @@ -317,16 +317,5 @@ https://github.com/solana-developers/program-examples/blob/419cb6b6c20e8b1c65711 This code burns the specified amount of liquidity tokens (amount) by calling the token::burn function. The liquidity tokens are destroyed, reducing the total supply. Finally, this code returns Ok(()) if all operations in the function executed successfully. This indicates that the liquidity withdrawal was completed without any errors. - - - - - - - - - - - - - +## Potential extensions +- Add instruction for the admin to change fee diff --git a/tokens/token-swap/native/tests/create_amm.ts b/tokens/token-swap/native/tests/create_amm.ts index 3baba2183..8ad0e8dc7 100644 --- a/tokens/token-swap/native/tests/create_amm.ts +++ b/tokens/token-swap/native/tests/create_amm.ts @@ -53,4 +53,4 @@ describe('Create AMM', async () => { await expectRevert(client.processTransaction(tx)); }); -}); \ No newline at end of file +}); diff --git a/tokens/token-swap/native/tests/create_pool.ts b/tokens/token-swap/native/tests/create_pool.ts index 9b405364b..c3a6b0b98 100644 --- a/tokens/token-swap/native/tests/create_pool.ts +++ b/tokens/token-swap/native/tests/create_pool.ts @@ -82,4 +82,4 @@ describe('Create Pool', async () => { const txPromise = client.processTransaction(tx); await expectRevert(txPromise); }) -}); \ No newline at end of file +}); diff --git a/tokens/token-swap/native/tests/deposit_liquidity.ts b/tokens/token-swap/native/tests/deposit_liquidity.ts index a424b4d7d..e32ee6992 100644 --- a/tokens/token-swap/native/tests/deposit_liquidity.ts +++ b/tokens/token-swap/native/tests/deposit_liquidity.ts @@ -216,4 +216,4 @@ describe('Deposit liquidity', async () => { expect(poolABalance2).to.equal(poolABalance + amount_a2); expect(poolBBalance2).to.equal(poolBBalance + 60.75 * 10 ** 6); }) -}); \ No newline at end of file +}); diff --git a/tokens/token-swap/native/tests/swap_exact_tokens_for_tokens.ts b/tokens/token-swap/native/tests/swap_exact_tokens_for_tokens.ts index e346c4eae..307a97989 100644 --- a/tokens/token-swap/native/tests/swap_exact_tokens_for_tokens.ts +++ b/tokens/token-swap/native/tests/swap_exact_tokens_for_tokens.ts @@ -137,4 +137,4 @@ describe('Swap', async () => { expect(poolABalance).to.equal(amount_a + input); expect(poolBBalance).to.be.lessThan(amount_b); }) -}); \ No newline at end of file +}); diff --git a/tokens/token-swap/native/tests/ts/index.ts b/tokens/token-swap/native/tests/ts/index.ts index eb88d40fc..898deed08 100644 --- a/tokens/token-swap/native/tests/ts/index.ts +++ b/tokens/token-swap/native/tests/ts/index.ts @@ -1,2 +1,2 @@ export * from './instructions'; -export * from './state'; \ No newline at end of file +export * from './state'; diff --git a/tokens/token-swap/native/tests/ts/instructions/create_amm.ts b/tokens/token-swap/native/tests/ts/instructions/create_amm.ts index 376389494..c71184179 100644 --- a/tokens/token-swap/native/tests/ts/instructions/create_amm.ts +++ b/tokens/token-swap/native/tests/ts/instructions/create_amm.ts @@ -54,4 +54,4 @@ export function createCreateAmmInstruction(amm: PublicKey, admin: PublicKey, pay }); return ix; -} \ No newline at end of file +} diff --git a/tokens/token-swap/native/tests/ts/instructions/create_pool.ts b/tokens/token-swap/native/tests/ts/instructions/create_pool.ts index 662b7c98d..d5af76c10 100644 --- a/tokens/token-swap/native/tests/ts/instructions/create_pool.ts +++ b/tokens/token-swap/native/tests/ts/instructions/create_pool.ts @@ -60,4 +60,4 @@ export function createCreatePoolInstruction(amm: PublicKey, pool: PublicKey, poo }); return ix; -} \ No newline at end of file +} diff --git a/tokens/token-swap/native/tests/ts/instructions/deposit_liquidity.ts b/tokens/token-swap/native/tests/ts/instructions/deposit_liquidity.ts index 1055ee8b2..cc74ce061 100644 --- a/tokens/token-swap/native/tests/ts/instructions/deposit_liquidity.ts +++ b/tokens/token-swap/native/tests/ts/instructions/deposit_liquidity.ts @@ -60,4 +60,4 @@ export function createDepositLiquidityInstruction(pool, poolAuthority, depositor }) return ix; -} \ No newline at end of file +} diff --git a/tokens/token-swap/native/tests/ts/instructions/index.ts b/tokens/token-swap/native/tests/ts/instructions/index.ts index 55eb3fce9..3105d8c34 100644 --- a/tokens/token-swap/native/tests/ts/instructions/index.ts +++ b/tokens/token-swap/native/tests/ts/instructions/index.ts @@ -11,4 +11,3 @@ export enum AmmInstruction { SwapExactTokensForTokens = 3, WithdrawLiquidity = 4, } - diff --git a/tokens/token-swap/native/tests/ts/instructions/withdraw_liquidity.ts b/tokens/token-swap/native/tests/ts/instructions/withdraw_liquidity.ts index afa7612c3..d1a3c5a3a 100644 --- a/tokens/token-swap/native/tests/ts/instructions/withdraw_liquidity.ts +++ b/tokens/token-swap/native/tests/ts/instructions/withdraw_liquidity.ts @@ -56,4 +56,4 @@ export function createWithdrawLiquidityInstruction(pool, poolAuthority, deposito }) return ix; -} \ No newline at end of file +} diff --git a/tokens/token-swap/native/tests/ts/state/amm.ts b/tokens/token-swap/native/tests/ts/state/amm.ts index ad4b1486c..29492912f 100644 --- a/tokens/token-swap/native/tests/ts/state/amm.ts +++ b/tokens/token-swap/native/tests/ts/state/amm.ts @@ -28,4 +28,4 @@ export const AmmSchema = new Map([ ['fee', 'u16'], ] }] -]); \ No newline at end of file +]); diff --git a/tokens/token-swap/native/tests/ts/state/index.ts b/tokens/token-swap/native/tests/ts/state/index.ts index c9dbaa729..c7afe39c7 100644 --- a/tokens/token-swap/native/tests/ts/state/index.ts +++ b/tokens/token-swap/native/tests/ts/state/index.ts @@ -1,2 +1,2 @@ export * from "./amm"; -export * from "./pool"; \ No newline at end of file +export * from "./pool"; diff --git a/tokens/token-swap/native/tests/ts/state/pool.ts b/tokens/token-swap/native/tests/ts/state/pool.ts index 2ff0941e7..1e7a30c23 100644 --- a/tokens/token-swap/native/tests/ts/state/pool.ts +++ b/tokens/token-swap/native/tests/ts/state/pool.ts @@ -34,4 +34,4 @@ export const PoolSchema = new Map([ ['mint_b', ['u8', 32]], ] }] -]); \ No newline at end of file +]); diff --git a/tokens/token-swap/native/tests/utils.ts b/tokens/token-swap/native/tests/utils.ts index 35af17f78..d3f3bcb63 100644 --- a/tokens/token-swap/native/tests/utils.ts +++ b/tokens/token-swap/native/tests/utils.ts @@ -25,4 +25,4 @@ export const expectRevert = async (promise: Promise) => { // Otherwise swallow the error as expected return; } -}; \ No newline at end of file +};