mint & burn streamlining

This commit is contained in:
tim
2025-12-01 17:05:05 -04:00
parent 6795886eab
commit c2dd33bfac
53 changed files with 111 additions and 110 deletions

View File

@@ -271,7 +271,7 @@ contract DeploySepolia is Script {
console2.log('post-creation supply', pool.totalSupply());
// 1) Proportional mint (request some LP)
uint256 lpToMint = 1_234; // arbitrary non-even amount
uint256 lpToMint = pool.totalSupply() / 10001; // arbitrary non-even amount
// payer = this contract, receiver = this contract
uint256 minted = pool.mint(msg.sender, msg.sender, lpToMint, 0);
@@ -279,7 +279,7 @@ contract DeploySepolia is Script {
console2.log('post-mint supply', pool.totalSupply());
// 2) Proportional burn (withdraw a small, non-even amount of LP)
uint256 lpToBurn = 7;
uint256 lpToBurn = lpToMint * 77 / 100;
pool.burn(msg.sender, msg.sender, lpToBurn, 0, false);
// 3) Flash loan: borrow token 0 and immediately repay in callback