fix: move VWAP bootstrap from forge script to bootstrap-common.sh
vm.warp in forge script --broadcast only affects the local simulation phase, not the actual Anvil node. The pool.observe([300,0]) call in recenter() therefore reverted with OLD when Forge pre-flighted the broadcast transactions on Anvil. Fix: - Remove the vm.warp + 2-recenter + SeedSwapper VWAP bootstrap from DeployLocal.sol (only contract deployment now, simpler and reliable). - Add bootstrap_vwap() to bootstrap-common.sh that uses Anvil RPC evm_increaseTime + evm_mine to advance chain time before each recenter, then executes a 0.5 ETH WETH->KRK seed swap between them. - Call bootstrap_vwap() before fund_liquidity_manager() in both containers/bootstrap.sh and ci-bootstrap.sh so the LM is seeded with thin positions (1 ETH) during bootstrap, ensuring the 0.5 ETH swap moves the price >400 ticks (amplitude gate). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
df2f0a87e5
commit
02b055ceb9
4 changed files with 73 additions and 100 deletions
|
|
@ -54,12 +54,12 @@ write_deployments_json "$ONCHAIN_DIR/deployments-local.json"
|
|||
echo "=== deployments-local.json written ==="
|
||||
cat "$ONCHAIN_DIR/deployments-local.json"
|
||||
|
||||
echo "=== Bootstrapping VWAP ==="
|
||||
bootstrap_vwap
|
||||
|
||||
echo "=== Funding LiquidityManager ==="
|
||||
fund_liquidity_manager
|
||||
|
||||
echo "=== Calling recenter() to seed liquidity ==="
|
||||
call_recenter
|
||||
|
||||
echo "=== Seeding application state (initial swap) ==="
|
||||
seed_application_state
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue