fix: landing page user test fixes (#162)
- Add VueQueryPlugin to landing main.ts (wagmi/vue requires it) - Add Vite proxy for /api/graphql → ponder:42069/graphql - Replace axios with native fetch in WalletCard.vue - Add navigateTo() for CTA buttons (uses VITE_APP_URL env) - Load contract addresses from bootstrap in landing entrypoint - Add via_ir to foundry.toml (OptimizerV3Push3 stack-too-deep) - Add VITE_APP_URL env to docker-compose landing service Fixes: blank landing pages, broken LiveStats, missing CTA links, missing contract addresses in footer
This commit is contained in:
parent
5e8a94b7a9
commit
a46c30cff6
12 changed files with 82 additions and 344 deletions
|
|
@ -4,13 +4,22 @@ set -euo pipefail
|
|||
MNEMONIC_FILE=/workspace/onchain/.secret.local
|
||||
ANVIL_STATE_DIR=/home/foundry/.foundry/anvil/tmp
|
||||
|
||||
# Cleanup old state snapshots (files older than 24 hours)
|
||||
# Prevents disk bloat from accumulating JSON snapshots
|
||||
# Cleanup ALL old state snapshots on start + periodic cleanup in background
|
||||
# Anvil fork mode generates thousands of JSON snapshots that fill disk fast
|
||||
if [[ -d "$ANVIL_STATE_DIR" ]]; then
|
||||
echo "[anvil] Cleaning up state snapshots older than 24 hours..."
|
||||
find "$ANVIL_STATE_DIR" -type f -name "*.json" -mtime +1 -delete 2>/dev/null || true
|
||||
echo "[anvil] Cleaning up all state snapshots..."
|
||||
rm -rf "$ANVIL_STATE_DIR"/* 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Background cleanup: every 6 hours, delete snapshots older than 1 hour
|
||||
(while true; do
|
||||
sleep 21600
|
||||
if [[ -d "$ANVIL_STATE_DIR" ]]; then
|
||||
find "$ANVIL_STATE_DIR" -type f -name "*.json" -mmin +60 -delete 2>/dev/null || true
|
||||
find "$ANVIL_STATE_DIR" -type d -empty -delete 2>/dev/null || true
|
||||
fi
|
||||
done) &
|
||||
|
||||
ANVIL_CMD=(anvil --fork-url "${FORK_URL:-https://sepolia.base.org}" --chain-id 31337 --block-time 1 --host 0.0.0.0 --port 8545 --threads 4 --timeout 2000 --retries 2 --fork-retry-backoff 100 --steps-tracing --no-storage-caching)
|
||||
|
||||
if [[ -f "$MNEMONIC_FILE" ]]; then
|
||||
|
|
|
|||
|
|
@ -17,4 +17,13 @@ export CHOKIDAR_USEPOLLING=${CHOKIDAR_USEPOLLING:-1}
|
|||
export HOST=0.0.0.0
|
||||
export PORT=${PORT:-5174}
|
||||
|
||||
# Source contract addresses from bootstrap output
|
||||
CONTRACTS_ENV="$ROOT_DIR/tmp/containers/contracts.env"
|
||||
if [[ -f "$CONTRACTS_ENV" ]]; then
|
||||
source "$CONTRACTS_ENV"
|
||||
export VITE_KRAIKEN_ADDRESS="${KRAIKEN:-}"
|
||||
export VITE_STAKE_ADDRESS="${STAKE:-}"
|
||||
echo "[landing-entrypoint] Contract addresses loaded: KRK=${KRAIKEN:-unset} STAKE=${STAKE:-unset}"
|
||||
fi
|
||||
|
||||
exec npm run dev -- --host 0.0.0.0 --port 5174
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue