@@ -11,7 +11,11 @@ import {DevOpsTools} from "../lib/foundry-devops/src/DevOpsTools.sol";
1111 * Position Management
1212 */
1313contract AddLiquidity is Script {
14- function run (int24 tickLower , int24 tickUpper , uint128 amount ) public {
14+ function run () public {
15+ int24 tickLower = int24 (uint24 (vm.envUint ("LOWER_TICK " )));
16+ int24 tickUpper = int24 (uint24 (vm.envUint ("UPPER_TICK " )));
17+ uint128 amount = uint128 (vm.envUint ("AMOUNT_TO_ADD " ));
18+
1519 address recentDeployment = DevOpsTools.get_most_recent_deployment ("CLAMMPool " , block .chainid );
1620 CLAMMPool clammPool = CLAMMPool (recentDeployment);
1721
@@ -23,7 +27,11 @@ contract AddLiquidity is Script {
2327}
2428
2529contract RemoveLiquidity is Script {
26- function run (int24 tickLower , int24 tickUpper , uint128 amount ) public {
30+ function run () public {
31+ int24 tickLower = int24 (uint24 (vm.envUint ("LOWER_TICK " )));
32+ int24 tickUpper = int24 (uint24 (vm.envUint ("UPPER_TICK " )));
33+ uint128 amount = uint128 (vm.envUint ("AMOUNT_TO_REMOVE " ));
34+
2735 address recentDeployment = DevOpsTools.get_most_recent_deployment ("CLAMMPool " , block .chainid );
2836 CLAMMPool clammPool = CLAMMPool (recentDeployment);
2937
@@ -38,7 +46,12 @@ contract RemoveLiquidity is Script {
3846 * Collect Fees or Removed/Burned Liquidity
3947 */
4048contract CollectFeesAndRemovedLiquidity is Script {
41- function run (int24 tickLower , int24 tickUpper , uint128 amount0Requested , uint128 amount1Requested ) public {
49+ function run () public {
50+ int24 tickLower = int24 (uint24 (vm.envUint ("LOWER_TICK " )));
51+ int24 tickUpper = int24 (uint24 (vm.envUint ("UPPER_TICK " )));
52+ uint128 amount0Requested = uint128 (vm.envUint ("AMOUNT0_TO_COLLECT " ));
53+ uint128 amount1Requested = uint128 (vm.envUint ("AMOUNT1_TO_COLLECT " ));
54+
4255 address recentDeployment = DevOpsTools.get_most_recent_deployment ("CLAMMPool " , block .chainid );
4356 CLAMMPool clammPool = CLAMMPool (recentDeployment);
4457
@@ -53,7 +66,10 @@ contract CollectFeesAndRemovedLiquidity is Script {
5366 * Swap Management
5467 */
5568contract SwapTokensZeroForOneExactInput is Script {
56- function run (uint256 amount , uint160 sqrtPriceLimitX96 ) public {
69+ function run () public {
70+ uint256 amount = uint256 (vm.envUint ("SWAP_AMOUNT " ));
71+ uint160 sqrtPriceLimitX96 = uint160 (vm.envUint ("SQRT_PRICE_LIMIT_X96 " ));
72+
5773 address recentDeployment = DevOpsTools.get_most_recent_deployment ("CLAMMPool " , block .chainid );
5874 CLAMMPool clammPool = CLAMMPool (recentDeployment);
5975
@@ -65,7 +81,10 @@ contract SwapTokensZeroForOneExactInput is Script {
6581}
6682
6783contract SwapTokensOneForZeroExactInput is Script {
68- function run (uint256 amount , uint160 sqrtPriceLimitX96 ) public {
84+ function run () public {
85+ uint256 amount = uint256 (vm.envUint ("SWAP_AMOUNT " ));
86+ uint160 sqrtPriceLimitX96 = uint160 (vm.envUint ("SQRT_PRICE_LIMIT_X96 " ));
87+
6988 address recentDeployment = DevOpsTools.get_most_recent_deployment ("CLAMMPool " , block .chainid );
7089 CLAMMPool clammPool = CLAMMPool (recentDeployment);
7190
@@ -77,7 +96,10 @@ contract SwapTokensOneForZeroExactInput is Script {
7796}
7897
7998contract SwapTokensZeroForOneExactOutput is Script {
80- function run (uint256 amount , uint160 sqrtPriceLimitX96 ) public {
99+ function run () public {
100+ uint256 amount = uint256 (vm.envUint ("SWAP_AMOUNT " ));
101+ uint160 sqrtPriceLimitX96 = uint160 (vm.envUint ("SQRT_PRICE_LIMIT_X96 " ));
102+
81103 address recentDeployment = DevOpsTools.get_most_recent_deployment ("CLAMMPool " , block .chainid );
82104 CLAMMPool clammPool = CLAMMPool (recentDeployment);
83105
@@ -89,7 +111,10 @@ contract SwapTokensZeroForOneExactOutput is Script {
89111}
90112
91113contract SwapTokensOneForZeroExactOutput is Script {
92- function run (uint256 amount , uint160 sqrtPriceLimitX96 ) public {
114+ function run () public {
115+ uint256 amount = uint256 (vm.envUint ("SWAP_AMOUNT " ));
116+ uint160 sqrtPriceLimitX96 = uint160 (vm.envUint ("SQRT_PRICE_LIMIT_X96 " ));
117+
93118 address recentDeployment = DevOpsTools.get_most_recent_deployment ("CLAMMPool " , block .chainid );
94119 CLAMMPool clammPool = CLAMMPool (recentDeployment);
95120
0 commit comments