Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
dyodx committed Jan 8, 2025
1 parent 63fa251 commit 8509373
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 27 deletions.
15 changes: 2 additions & 13 deletions tokens/token-swap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion tokens/token-swap/native/tests/create_amm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ describe('Create AMM', async () => {

await expectRevert(client.processTransaction(tx));
});
});
});
2 changes: 1 addition & 1 deletion tokens/token-swap/native/tests/create_pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ describe('Create Pool', async () => {
const txPromise = client.processTransaction(tx);
await expectRevert(txPromise);
})
});
});
2 changes: 1 addition & 1 deletion tokens/token-swap/native/tests/deposit_liquidity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,4 @@ describe('Deposit liquidity', async () => {
expect(poolABalance2).to.equal(poolABalance + amount_a2);
expect(poolBBalance2).to.equal(poolBBalance + 60.75 * 10 ** 6);
})
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ describe('Swap', async () => {
expect(poolABalance).to.equal(amount_a + input);
expect(poolBBalance).to.be.lessThan(amount_b);
})
});
});
2 changes: 1 addition & 1 deletion tokens/token-swap/native/tests/ts/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './instructions';
export * from './state';
export * from './state';
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ export function createCreateAmmInstruction(amm: PublicKey, admin: PublicKey, pay
});

return ix;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ export function createCreatePoolInstruction(amm: PublicKey, pool: PublicKey, poo
});

return ix;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ export function createDepositLiquidityInstruction(pool, poolAuthority, depositor
})

return ix;
}
}
1 change: 0 additions & 1 deletion tokens/token-swap/native/tests/ts/instructions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ export enum AmmInstruction {
SwapExactTokensForTokens = 3,
WithdrawLiquidity = 4,
}

Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ export function createWithdrawLiquidityInstruction(pool, poolAuthority, deposito
})

return ix;
}
}
2 changes: 1 addition & 1 deletion tokens/token-swap/native/tests/ts/state/amm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ export const AmmSchema = new Map([
['fee', 'u16'],
]
}]
]);
]);
2 changes: 1 addition & 1 deletion tokens/token-swap/native/tests/ts/state/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from "./amm";
export * from "./pool";
export * from "./pool";
2 changes: 1 addition & 1 deletion tokens/token-swap/native/tests/ts/state/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ export const PoolSchema = new Map([
['mint_b', ['u8', 32]],
]
}]
]);
]);
2 changes: 1 addition & 1 deletion tokens/token-swap/native/tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ export const expectRevert = async (promise: Promise<any>) => {
// Otherwise swallow the error as expected
return;
}
};
};

0 comments on commit 8509373

Please sign in to comment.