hoodquidity/packages/contracts/script/setup-local.sh
Денис Зефиров dba2811447 Hoodquidity: liquidity campaigns for Robinhood Chain stock token markets
Full build: Vite/React acid-terminal frontend (BEARER design system,
Panchang/Sentient/Fragment Mono, neon layer, palette audit script),
HoodquidityVaults Foundry contracts (single+dual deposits via Chainlink-style
feeds, hybrid exit, 10% platform fee, boost, Genesis LP), Reown AppKit wallet
connect with Robinhood Chain testnet (46630), live data from Dexscreener and
onchain reads, partner portal, design-sync setup for claude.ai/design.

Deploy: static via Forgejo Actions platform, BUILD_DIR=apps/web/dist (.env).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 08:32:28 +04:00

26 lines
1,007 B
Bash
Executable file

#!/usr/bin/env bash
# Local dev environment: anvil + multicall3 + demo deployment.
# Usage: ./script/setup-local.sh
set -euo pipefail
cd "$(dirname "$0")/.."
RPC=http://localhost:8545
# anvil default account #0
PK=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
MULTICALL3=0xcA11bde05977b3631167028862bE2a173976CA11
if ! cast chain-id --rpc-url $RPC >/dev/null 2>&1; then
echo "anvil is not running, start it with: anvil --port 8545"
exit 1
fi
# wagmi batches reads through multicall3, which vanilla anvil lacks
if [ "$(cast code $MULTICALL3 --rpc-url $RPC)" = "0x" ]; then
echo "etching multicall3..."
BYTECODE=$(cast code $MULTICALL3 --rpc-url https://1rpc.io/eth)
cast rpc anvil_setCode $MULTICALL3 "$BYTECODE" --rpc-url $RPC >/dev/null
fi
echo "deploying demo environment..."
PRIVATE_KEY=$PK forge script script/Deploy.s.sol --rpc-url $RPC --broadcast | grep -E "(hUSD|HoodquidityVaults|campaign)"
echo "done. Update apps/web/src/lib/contracts.ts if addresses changed."