mint & burn streamlining
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user