Skip to content

Installation Guide

Mojtaba Eshghie edited this page Jun 25, 2024 · 2 revisions

Manual Installation

To manually install and run HighGuard, follow these steps:

  1. Clone the repository:

    git clone https://github.com/mojtaba-eshghie/HighGuard.git
    cd HighGuard
  2. Install Node.js and npm:

    Ensure you have Node.js version 16.20.2 and npm version 8.19.4 installed. You can download and install Node.js from Node.js official website.

    Verify the installation:

    node --version
    npm --version
  3. Install project dependencies:

    npm install
  4. Install Foundry and Anvil:

    Follow the instructions to install Foundry from the Foundry Book.

    curl -L https://foundry.paradigm.xyz | bash
    source ~/.bashrc
    foundryup
  5. Run the CLI commands:

    You can now run the CLI commands as needed:

    pkill anvil; node CI/run.js -t synthesized -e separate -v -c micro-configs/config-synthesized-governance.yml
    pkill anvil; node CI/run.js -t synthesized -e separate -v -c micro-configs/config-synthesized-escrow.yml
    pkill anvil; node CI/run.js -t synthesized -e separate -v -c micro-configs/config-synthesized-multistageauction.yml
    pkill anvil; node CI/run.js -t synthesized -e separate -v -c micro-configs/config-synthesized-prizedistribution.yml
    pkill anvil; node CI/run.js -t synthesized -e separate -v -c micro-configs/config-synthesized-productorder.yml
    pkill anvil; clear; node CI/run.js -t cross-chain -e unified

Running via Docker

To build and run HighGuard using Docker, follow these steps:

  1. Clone the repository:

    git clone https://github.com/mojtaba-eshghie/HighGuard.git
    cd HighGuard
  2. Build the Docker image:

    docker build -t HighGuard-cli-docker .
  3. Run the Docker container with specific commands:

    Replace the command as needed:

    docker run --rm -v $(pwd):/usr/src/app HighGuard-cli-docker bash -c "pkill anvil; node CI/run.js -t synthesized -e separate -v -c micro-configs/config-synthesized-governance.yml"

    Example commands:

    docker run --rm -v $(pwd):/usr/src/app HighGuard-cli-docker bash -c "pkill anvil; node CI/run.js -t synthesized -e separate -v -c micro-configs/config-synthesized-escrow.yml"
    docker run --rm -v $(pwd):/usr/src/app HighGuard-cli-docker bash -c "pkill anvil; node CI/run.js -t synthesized -e separate -v -c micro-configs/config-synthesized-multistageauction.yml"
    docker run --rm -v $(pwd):/usr/src/app HighGuard-cli-docker bash -c "pkill anvil; node CI/run.js -t synthesized -e separate -v -c micro-configs/config-synthesized-prizedistribution.yml"
    docker run --rm -v $(pwd):/usr/src/app HighGuard-cli-docker bash -c "pkill anvil; node CI/run.js -t synthesized -e separate -v -c micro-configs/config-synthesized-productorder.yml"
    docker run --rm -v $(pwd):/usr/src/app HighGuard-cli-docker bash -c "pkill anvil; clear; node CI/run.js -t cross-chain -e unified"

    Export the results directory from the container to your current directory (outside the container) using the following command:

    docker run --rm -v $(pwd)/results:/results HighGuard-cli-docker bash -c "cp -r /usr/src/app/results/* /results"
Clone this wiki locally