Recover pending unified keeper parity state #222
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Prediction Market Gates | |
| on: | |
| push: | |
| branches: [main, staging, develop, hackathon, enoomian/staging] | |
| paths: | |
| - "packages/hyperbet-evm/**" | |
| - "packages/hyperbet-deployments/**" | |
| - "packages/hyperbet-solana/**" | |
| - "packages/hyperbet-bsc/**" | |
| - "packages/hyperbet-avax/**" | |
| - "packages/hyperbet-ui/**" | |
| - "packages/hyperbet-chain-registry/**" | |
| - "packages/hyperbet-mm-core/**" | |
| - "packages/evm-contracts/**" | |
| - "packages/market-maker-bot/**" | |
| - "packages/simulation-dashboard/**" | |
| - "scripts/**" | |
| - ".github/actions/setup-hyperbet/**" | |
| - ".github/workflows/prediction-market-gates.yml" | |
| - "package.json" | |
| - "bun.lock" | |
| pull_request: | |
| branches: [main, staging, develop, hackathon, enoomian/staging] | |
| paths: | |
| - "packages/hyperbet-evm/**" | |
| - "packages/hyperbet-deployments/**" | |
| - "packages/hyperbet-solana/**" | |
| - "packages/hyperbet-bsc/**" | |
| - "packages/hyperbet-avax/**" | |
| - "packages/hyperbet-ui/**" | |
| - "packages/hyperbet-chain-registry/**" | |
| - "packages/hyperbet-mm-core/**" | |
| - "packages/evm-contracts/**" | |
| - "packages/market-maker-bot/**" | |
| - "packages/simulation-dashboard/**" | |
| - "scripts/**" | |
| - ".github/actions/setup-hyperbet/**" | |
| - ".github/workflows/prediction-market-gates.yml" | |
| - "package.json" | |
| - "bun.lock" | |
| schedule: | |
| - cron: "0 7 * * *" | |
| workflow_dispatch: | |
| inputs: | |
| strict_launch_gate: | |
| description: "Run the strict canonical mainnet registry launch gate" | |
| required: false | |
| default: false | |
| type: boolean | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| PREDICTION_MARKET_GATE_REF: ${{ github.event_name == 'schedule' && 'enoomian/prediction-market-sprint-base' || github.ref }} | |
| # AVAX production-readiness posture in this workflow: | |
| # - The AVAX mainnet lane is still launch-promotion dependent on canonical registry truth. | |
| # - Proof lanes are complete only after reviewed staged read-only + canary evidence for AVAX. | |
| # - Required staging inputs for AVAX proof include: | |
| # HYPERBET_AVAX_STAGING_RPC_URL, | |
| # HYPERBET_AVAX_STAGING_REPORTER_PRIVATE_KEY, | |
| # HYPERBET_AVAX_STAGING_CANARY_PRIVATE_KEY, | |
| # HYPERBET_AVAX_STAGING_DUEL_ORACLE_ADDRESS, | |
| # HYPERBET_AVAX_STAGING_GOLD_CLOB_ADDRESS, | |
| # HYPERBET_AVAX_STAGING_CHAIN_ID, | |
| # HYPERBET_AVAX_STAGING_STREAM_PUBLISH_KEY, | |
| # HYPERBET_AVAX_RAILWAY_STAGING_PROJECT_ID, | |
| # HYPERBET_AVAX_RAILWAY_STAGING_ENVIRONMENT_ID, | |
| # HYPERBET_AVAX_RAILWAY_STAGING_KEEPER_SERVICE_ID, | |
| jobs: | |
| solana-program-build-gate: | |
| name: Solana Program Build Gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ env.PREDICTION_MARKET_GATE_REF }} | |
| - name: Setup Hyperbet toolchain | |
| uses: ./.github/actions/setup-hyperbet | |
| with: | |
| install-rust: "true" | |
| install-solana: "true" | |
| install-anchor: "true" | |
| - name: Install dependencies | |
| run: bash scripts/ci-install-verified.sh root | |
| - name: Run Solana program build gate | |
| run: node --import tsx scripts/ci-gate-solana-build.ts | |
| - name: Upload Solana build artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: solana-program-build-gate | |
| path: .ci-artifacts/solana-program-build-gate | |
| if-no-files-found: ignore | |
| evm-contract-proof-gate: | |
| name: EVM Contract Proof Gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ env.PREDICTION_MARKET_GATE_REF }} | |
| - name: Setup Hyperbet toolchain | |
| uses: ./.github/actions/setup-hyperbet | |
| with: | |
| install-foundry: "true" | |
| - name: Install dependencies | |
| run: bash scripts/ci-install-verified.sh root | |
| - name: Run EVM contract proof gate | |
| run: node --import tsx scripts/ci-contracts.ts --target=proof | |
| - name: Upload EVM contract proof artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: evm-contract-proof-gate | |
| path: .ci-artifacts/evm-contract-proof-gate | |
| if-no-files-found: ignore | |
| evm-contract-security-gate: | |
| name: EVM Contract Security Gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ env.PREDICTION_MARKET_GATE_REF }} | |
| - name: Setup Hyperbet toolchain | |
| uses: ./.github/actions/setup-hyperbet | |
| with: | |
| install-foundry: "true" | |
| - name: Setup Python | |
| uses: actions/setup-python@v6.2.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Slither | |
| run: python -m pip install --upgrade pip slither-analyzer | |
| - name: Install dependencies | |
| run: bash scripts/ci-install-verified.sh root | |
| - name: Run EVM contract security gate | |
| run: node --import tsx scripts/ci-contracts.ts --target=security | |
| - name: Upload EVM contract security artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: evm-contract-security-gate | |
| path: .ci-artifacts/evm-contract-security-gate | |
| if-no-files-found: ignore | |
| evm-exploit-gate: | |
| name: EVM Exploit Gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ env.PREDICTION_MARKET_GATE_REF }} | |
| - name: Setup Hyperbet toolchain | |
| uses: ./.github/actions/setup-hyperbet | |
| with: | |
| install-foundry: "true" | |
| - name: Install dependencies | |
| run: bash scripts/ci-install-verified.sh root | |
| - name: Audit shared env | |
| run: node --import tsx scripts/ci-env-audit.ts --target=ci-shared | |
| - name: Run EVM exploit gate | |
| run: node --import tsx scripts/ci-gate-scenarios.ts --target=evm | |
| - name: Upload EVM gate artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: evm-exploit-gate | |
| path: .ci-artifacts/evm-exploit-gate | |
| if-no-files-found: ignore | |
| solana-exploit-gate: | |
| name: Solana Exploit Gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ env.PREDICTION_MARKET_GATE_REF }} | |
| - name: Setup Hyperbet toolchain | |
| uses: ./.github/actions/setup-hyperbet | |
| with: | |
| install-foundry: "true" | |
| install-rust: "true" | |
| install-solana: "true" | |
| install-anchor: "true" | |
| - name: Install dependencies | |
| run: bash scripts/ci-install-verified.sh root | |
| - name: Audit shared env | |
| run: node --import tsx scripts/ci-env-audit.ts --target=ci-shared | |
| - name: Run Solana exploit gate | |
| run: node --import tsx scripts/ci-gate-scenarios.ts --target=solana | |
| - name: Upload Solana gate artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: solana-exploit-gate | |
| path: .ci-artifacts/solana-exploit-gate | |
| if-no-files-found: ignore | |
| cross-chain-e2e: | |
| name: Unified Bets E2E (${{ matrix.chain }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| chain: [solana, bsc] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ env.PREDICTION_MARKET_GATE_REF }} | |
| - name: Setup Hyperbet toolchain | |
| uses: ./.github/actions/setup-hyperbet | |
| with: | |
| install-rust: "true" | |
| install-foundry: "true" | |
| install-solana: "true" | |
| install-anchor: "true" | |
| - name: Bootstrap workspace | |
| run: bun run dev:bootstrap | |
| - name: Install Playwright browser | |
| run: bunx playwright install --with-deps chromium | |
| - name: Audit unified page env | |
| env: | |
| ENOOMIAN_HYPERBET_PAGES_URL: ${{ vars.ENOOMIAN_HYPERBET_PAGES_URL }} | |
| ENOOMIAN_HYPERBET_KEEPER_URL: ${{ vars.ENOOMIAN_HYPERBET_KEEPER_URL }} | |
| ENOOMIAN_HYPERBET_KEEPER_WS_URL: ${{ vars.ENOOMIAN_HYPERBET_KEEPER_WS_URL }} | |
| VITE_GAME_API_URL: ${{ vars.ENOOMIAN_HYPERBET_KEEPER_URL }} | |
| VITE_GAME_WS_URL: ${{ vars.ENOOMIAN_HYPERBET_KEEPER_WS_URL }} | |
| VITE_SOLANA_CLUSTER: mainnet-beta | |
| VITE_USE_GAME_RPC_PROXY: "true" | |
| VITE_USE_GAME_EVM_RPC_PROXY: "true" | |
| VITE_BSC_CHAIN_ID: ${{ vars.ENOOMIAN_BSC_CHAIN_ID != '' && vars.ENOOMIAN_BSC_CHAIN_ID || vars.HYPERBET_BSC_STAGING_CHAIN_ID }} | |
| VITE_BSC_GOLD_CLOB_ADDRESS: ${{ vars.ENOOMIAN_BSC_GOLD_CLOB_ADDRESS != '' && vars.ENOOMIAN_BSC_GOLD_CLOB_ADDRESS || vars.HYPERBET_BSC_STAGING_GOLD_CLOB_ADDRESS }} | |
| run: bun run ci:env -- --target=pages:unified --deployment=staging | |
| - name: Run Gate 10 local E2E | |
| run: bun run ci:gate:e2e:${{ matrix.chain }} | |
| - name: Upload E2E artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: cross-chain-e2e-${{ matrix.chain }} | |
| path: .ci-artifacts/e2e-unified-${{ matrix.chain }} | |
| if-no-files-found: ignore | |
| base-add-chain-smoke: | |
| name: Base Add-Chain Smoke | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ env.PREDICTION_MARKET_GATE_REF }} | |
| - name: Setup Hyperbet toolchain | |
| uses: ./.github/actions/setup-hyperbet | |
| with: | |
| install-foundry: "true" | |
| - name: Install dependencies | |
| run: | | |
| bash scripts/ci-install-verified.sh root hyperbet-evm-app market-maker-bot | |
| - name: Audit shared env | |
| run: node --import tsx scripts/ci-env-audit.ts --target=ci-shared | |
| - name: Run Base add-chain proof | |
| run: node --import tsx scripts/ci-gate-base.ts | |
| - name: Upload Base smoke artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: base-add-chain-smoke | |
| path: .ci-artifacts/base-add-chain-smoke | |
| if-no-files-found: ignore | |
| registry-launch-gate: | |
| name: Registry Launch Gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ env.PREDICTION_MARKET_GATE_REF }} | |
| - name: Setup Hyperbet toolchain | |
| uses: ./.github/actions/setup-hyperbet | |
| - name: Install dependencies | |
| run: bash scripts/ci-install-verified.sh root | |
| - name: Run launch-scope registry gate | |
| run: | | |
| strict_launch_gate=false | |
| if [[ "${{ vars.HYPERBET_STRICT_REGISTRY_LAUNCH_GATE }}" == "true" ]]; then | |
| strict_launch_gate=true | |
| elif [[ "$GITHUB_EVENT_NAME" == "workflow_dispatch" && "${{ inputs.strict_launch_gate }}" == "true" ]]; then | |
| strict_launch_gate=true | |
| fi | |
| if [[ "$strict_launch_gate" == "false" ]]; then | |
| echo "::notice title=Registry gate mode::Using Stage-A closeout registry contract for Solana devnet and BSC testnet; AVAX remains deferred until strict launch gating is explicitly enabled." | |
| bun run ci:gate:registry:launch --solana-cluster=devnet --evm-environment=testnet --include-evm=bsc --ignore-solana-fields=usdcMint | |
| else | |
| bun run ci:gate:registry:launch | |
| fi | |
| - name: Upload registry gate artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: registry-launch-gate | |
| path: .ci-artifacts/registry-launch-gate | |
| if-no-files-found: ignore | |
| soak-harness-contract: | |
| name: Soak Harness Evidence Contract | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ env.PREDICTION_MARKET_GATE_REF }} | |
| - name: Setup Hyperbet toolchain | |
| uses: ./.github/actions/setup-hyperbet | |
| - name: Install dependencies | |
| run: bash scripts/ci-install-verified.sh root | |
| - name: Validate local soak contract | |
| run: bun run ci:gate:soak:contract | |
| - name: Upload soak contract artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: soak-harness-contract | |
| path: .ci-artifacts/soak-harness-contract | |
| if-no-files-found: ignore | |
| amm-forge-gate: | |
| name: AMM Forge Test Gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ env.PREDICTION_MARKET_GATE_REF }} | |
| - name: Setup Hyperbet toolchain | |
| uses: ./.github/actions/setup-hyperbet | |
| with: | |
| install-foundry: "true" | |
| - name: Install dependencies | |
| run: bash scripts/ci-install-verified.sh root | |
| - name: Run AMM Forge tests | |
| run: bun run ci:gate:amm:evm | |
| - name: Upload AMM Forge artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: amm-forge-gate | |
| path: .ci-artifacts/amm-forge-gate | |
| if-no-files-found: ignore | |
| amm-solana-gate: | |
| name: AMM Solana Build Gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ env.PREDICTION_MARKET_GATE_REF }} | |
| - name: Setup Hyperbet toolchain | |
| uses: ./.github/actions/setup-hyperbet | |
| with: | |
| install-rust: "true" | |
| install-solana: "true" | |
| install-anchor: "true" | |
| - name: Install dependencies | |
| run: bash scripts/ci-install-verified.sh root | |
| - name: Build lvr_amm program | |
| run: bun run ci:gate:amm:solana | |
| - name: Upload AMM Solana artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: amm-solana-gate | |
| path: .ci-artifacts/amm-solana-gate | |
| if-no-files-found: ignore | |
| perps-forge-gate: | |
| name: Perps Forge Test Gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ env.PREDICTION_MARKET_GATE_REF }} | |
| - name: Setup Hyperbet toolchain | |
| uses: ./.github/actions/setup-hyperbet | |
| with: | |
| install-foundry: "true" | |
| - name: Install dependencies | |
| run: bash scripts/ci-install-verified.sh root | |
| - name: Run perps Forge tests (fuzz 512) | |
| run: bun run ci:gate:perps:evm | |
| - name: Upload perps Forge artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: perps-forge-gate | |
| path: .ci-artifacts/perps-forge-gate | |
| if-no-files-found: ignore | |
| perps-solana-gate: | |
| name: Perps Solana Build Gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| ref: ${{ env.PREDICTION_MARKET_GATE_REF }} | |
| - name: Setup Hyperbet toolchain | |
| uses: ./.github/actions/setup-hyperbet | |
| with: | |
| install-rust: "true" | |
| install-solana: "true" | |
| install-anchor: "true" | |
| - name: Install dependencies | |
| run: bash scripts/ci-install-verified.sh root | |
| - name: Build gold_perps_market program | |
| run: bun run ci:gate:perps:solana | |
| - name: Upload Solana perps build artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: perps-solana-gate | |
| path: .ci-artifacts/perps-solana-gate | |
| if-no-files-found: ignore |