bin- environment configuration templateidls- IDLs for Project 0 integrations (Kamino, Drift, Juplend)src- source codeDockerfile- production (network-mainnet) image buildDockerfile.staging- staging (network-staging) image build
The env.template file is a template for the required and optional environment variables that are used by Eva.
- Install dependencies
- OS librarires:
sudo apt install build-essential libssl-dev pkg-config unzip - Protoc: https://grpc.io/docs/protoc-installation/#install-pre-compiled-binaries-any-os;
- Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- OS librarires:
- Clone the Git repo.
- Create and configure your environment file by using env.template as prototype.
- If you run through
run-eva.sh, copy values intodocker.prod.env(or changerun-eva.shto source a different file).
- Configure
docker.prod.env. - Run from VS Code task
Run (with all checks)or executebash ./run-eva.sh. - Optional background run:
nohup bash ./run-eva.sh >> ~/log/liquidator.log 2>&1 &
Initial Loading Time The initial loading phase can take some time, depending on your RPC. Eva will load everything needed into the state, including all Marginfi Accounts. Expect the loading time to be between 1-3 minutes depending on the RPC.
Local Docker: Run
docker build -f <CONFIG FILE> -t eva:latest .to build an image anddocker run --env-file docker.staging.env --rm -v <WALLET>:<WALLET> evato run it.
Cargo now supports network-specific build features:
network-mainnet(default)network-staging
- Mainnet:
cargo build --release --bin eva01 --no-default-features --features network-mainnet - Staging:
cargo build --release --bin eva01 --no-default-features --features network-staging
Use different Dockerfiles per Railway environment:
- Production environment: leave default
Dockerfile(or setRAILWAY_DOCKERFILE_PATH=Dockerfile) - Staging environment: set
RAILWAY_DOCKERFILE_PATH=Dockerfile.staging