Build & Export Process

  1. Smart Contract Compilation & Artifact Generation

    npm run build:contracts   # Compile Solidity contracts and generate ABI/bytecode
    • Artifacts located in artifacts/ and deployments/<network>.json.

    • Verify ABI files for frontend integration.

  2. Frontend Production Build

    npm run build             # Next.js production build (SSR/SSG)
    • Output: .next/ directory containing optimized JS bundles and HTML pages.

    • Ensure environment variables (NEXT_PUBLIC_*) are set before build.

  3. Backend & Matching Engine Packaging

    docker build -t dexerevm/matching-engine:latest -f matching-engine/Dockerfile .
    • Include compiled binaries and configuration files.

    • Tag builds by semantic versioning (e.g., v1.2.3).

  4. Exporting Docker Images

    docker-compose -f docker-compose.prod.yml build
    docker-compose -f docker-compose.prod.yml push
    • Push images to container registry (e.g., Docker Hub, GitHub Container Registry).

  5. Release Assets

    • Generate release archive containing:

      • artifacts/ folder with contract ABIs and bytecode.

      • Frontend static export (out/ directory if using next export).

      • Docker image references in docker-compose.prod.yml.

    • Publish release assets to GitHub Releases with release notes.

Last updated