Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8509373

Browse files
committedJan 8, 2025
Update README
1 parent 63fa251 commit 8509373

File tree

15 files changed

+15
-27
lines changed

15 files changed

+15
-27
lines changed
 

‎tokens/token-swap/README.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -317,16 +317,5 @@ https://github.com/solana-developers/program-examples/blob/419cb6b6c20e8b1c65711
317317
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.
318318
Finally, this code returns Ok(()) if all operations in the function executed successfully. This indicates that the liquidity withdrawal was completed without any errors.
319319

320-
321-
322-
323-
324-
325-
326-
327-
328-
329-
330-
331-
332-
320+
## Potential extensions
321+
- Add instruction for the admin to change fee

‎tokens/token-swap/native/tests/create_amm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ describe('Create AMM', async () => {
5353

5454
await expectRevert(client.processTransaction(tx));
5555
});
56-
});
56+
});

‎tokens/token-swap/native/tests/create_pool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ describe('Create Pool', async () => {
8282
const txPromise = client.processTransaction(tx);
8383
await expectRevert(txPromise);
8484
})
85-
});
85+
});

‎tokens/token-swap/native/tests/deposit_liquidity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,4 +216,4 @@ describe('Deposit liquidity', async () => {
216216
expect(poolABalance2).to.equal(poolABalance + amount_a2);
217217
expect(poolBBalance2).to.equal(poolBBalance + 60.75 * 10 ** 6);
218218
})
219-
});
219+
});

‎tokens/token-swap/native/tests/swap_exact_tokens_for_tokens.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,4 @@ describe('Swap', async () => {
137137
expect(poolABalance).to.equal(amount_a + input);
138138
expect(poolBBalance).to.be.lessThan(amount_b);
139139
})
140-
});
140+
});
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export * from './instructions';
2-
export * from './state';
2+
export * from './state';

‎tokens/token-swap/native/tests/ts/instructions/create_amm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ export function createCreateAmmInstruction(amm: PublicKey, admin: PublicKey, pay
5454
});
5555

5656
return ix;
57-
}
57+
}

‎tokens/token-swap/native/tests/ts/instructions/create_pool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ export function createCreatePoolInstruction(amm: PublicKey, pool: PublicKey, poo
6060
});
6161

6262
return ix;
63-
}
63+
}

‎tokens/token-swap/native/tests/ts/instructions/deposit_liquidity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ export function createDepositLiquidityInstruction(pool, poolAuthority, depositor
6060
})
6161

6262
return ix;
63-
}
63+
}

‎tokens/token-swap/native/tests/ts/instructions/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ export enum AmmInstruction {
1111
SwapExactTokensForTokens = 3,
1212
WithdrawLiquidity = 4,
1313
}
14-

‎tokens/token-swap/native/tests/ts/instructions/withdraw_liquidity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ export function createWithdrawLiquidityInstruction(pool, poolAuthority, deposito
5656
})
5757

5858
return ix;
59-
}
59+
}

‎tokens/token-swap/native/tests/ts/state/amm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ export const AmmSchema = new Map([
2828
['fee', 'u16'],
2929
]
3030
}]
31-
]);
31+
]);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export * from "./amm";
2-
export * from "./pool";
2+
export * from "./pool";

‎tokens/token-swap/native/tests/ts/state/pool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ export const PoolSchema = new Map([
3434
['mint_b', ['u8', 32]],
3535
]
3636
}]
37-
]);
37+
]);

‎tokens/token-swap/native/tests/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ export const expectRevert = async (promise: Promise<any>) => {
2525
// Otherwise swallow the error as expected
2626
return;
2727
}
28-
};
28+
};

0 commit comments

Comments
 (0)
Please sign in to comment.