fix: fix: red-team.sh V3_FACTORY hardcodes Base mainnet address instead of Sepolia (#854)

bootstrap-light.sh now extracts the Uniswap V3 pool address from
DeployLocal.sol deploy output and writes both Pool and V3Factory
(Base Sepolia: 0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24) into
deployments-local.json alongside the existing contract addresses.

red-team.sh now reads V3_FACTORY and POOL from deployments-local.json
instead of hardcoding the Base mainnet factory address
(0x33128a8fC17869897dcE68Ed026d694621f6FDfD), and removes the getPool()
RPC call that always failed with "contract does not have any code" on
the Sepolia fork.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-16 12:02:17 +00:00
parent 740a871ddc
commit a2f89968db
2 changed files with 18 additions and 13 deletions

View file

@ -47,13 +47,21 @@ LM=$(echo "$DEPLOY_OUT" | grep -oP 'LiquidityManager deployed: \K0x[a-fA-F0-9]+'
[[ -n "$LM" ]] || die "Could not extract LiquidityManager address from deploy output"
POOL=$(echo "$DEPLOY_OUT" | grep -oP 'Pool: \K0x[a-fA-F0-9]+' | head -1)
[[ -n "$POOL" ]] || die "Could not extract Pool address from deploy output"
# Base Sepolia Uniswap V3 Factory — must match v3Factory constant in DeployLocal.sol
V3_FACTORY="0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24"
cat > "$ONCHAIN_DIR/deployments-local.json" << EOF
{
"contracts": {
"Kraiken": "$KRK",
"Stake": "$STAKE",
"LiquidityManager": "$LM",
"OptimizerProxy": "$OPT"
"OptimizerProxy": "$OPT",
"Pool": "$POOL",
"V3Factory": "$V3_FACTORY"
}
}
EOF