mockenv deployment rework; price and setprice scripts

This commit is contained in:
Tim Olson
2023-11-02 17:23:48 -04:00
parent b63bd8cbd3
commit aa007a4fcd
3 changed files with 4 additions and 18 deletions

View File

@@ -47,14 +47,9 @@ contract MockEnv {
pool = IUniswapV3Pool(nfpm.createAndInitializePoolIfNecessary(token0, token1, fee, initialPrice));
console2.log('v3 pool');
console2.log(address(pool));
int24 ts = pool.tickSpacing();
(, int24 lower, , , , ,) = pool.slot0();
int24 upper = lower;
for (int8 i = 0; i < 10; i++) {
lower -= ts;
upper += ts;
stake(1000 * 10**12, lower, upper);
}
// stake a super wide range so we have liquidity everywhere.
stake(1_000_000 * 10**12, lower-10000, lower+100000);
}