Skip to main content

No project description provided

Project description

Olas Operate

Electron + NextJS + Python Backend application to one-click run Agents.

Technologies Used

  • Electron
  • NextJS (20.11 LTS)
  • AntD
  • TypeScript
  • Python (3.10)
  • Poetry (1.7.1)
  • Docker (24)

Getting Started

Installing system dependencies

The following installation scripts assume you have the following on each OS:

  • Linux: a debian based operating system such as Ubuntu with apt to install packages.
  • MacOS: Homebrew
  • Windows: Chocolatey

NodeJS via NVM

NodeJS is best installed and managed through NVM, which allows you to install and select the version of NodeJS you wish to use. For this project is the current LTS version 20.11.

Linux
sudo apt install curl 
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash 
source ~/.bashrc
nvm install --lts
nvm use --lts
MacOS
brew install nvm

Set up NVM for console usage. Dependant on the shell, you should edit the config file to contain the following code. If you're using Bash or Zsh, you might add them to your ~/.bash_profile, ~/.bashrc, or ~/.zshrc file:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

Close and reopen Terminal, or run source ~/.bash_profile, source ~/.zshrc, or source ~/.bashrc to reload the shell configuration.

Verify your installation by running nvm --version. Then run:

nvm install --lts
nvm use --lts

Yarn

npm install --global yarn

Python

Linux
sudo apt install python3
MacOS
brew install python

PIPX

Linux
sudo apt install pipx
MacOS
brew install pipx

Poetry

pipx install poetry

If promoted to run pipx ensurepath, run this command.

Docker

Linux

You can change the ubuntu.22.04~jammy version to your OS in the following command:

VERSION_STRING=5:24.0.7-1~ubuntu.22.04~jammy
sudo apt-get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER

If you are unsure of your current release version and codename to update the VERSION_STRING above, you can run:

lsb_release -a
MacOS

You must install Docker V24 manually, as brew does not allow for versioning with Docker.

Setup ENV file

Create a .env file in the root directory, or rename .env.example to .env.

NODE_ENV

For development usage, set NODE_ENV=development. For production usage, set NODE_ENV=production.

FORK_URL

Required for forking Gnosis using a Hardhat node during development.

You can get a Gnosis RPC from Nodies.

Then, set FORK_URL=https://.... in your .env file.

Be sure to set an external RPC here.

Install project dependencies

This will install the required dependencies for the backend, frontend, and electron.

yarn install-deps

Run the development app

In the root directory, run:

yarn start

This will run Electron, which launches NextJS and the Backend as child processes.

Starting Hardhat (for development)

In the interest of not losing funds, we can run a Hardhat node that forks Gnosis -- provided the FORK_URL has been set to an external RPC in your .env file.

Run the following to start your Hardhat node:

npx hardhat node

Once Hardhat is running, you can use http://localhost:8545 during the agent spawning process as your RPC.

Funding addresses while running a Hardhat fork

There are a number of scripts to fund addresses for testing:

  • XDAI funding:
poetry run python scripts/fund.py 0xYOURADDRESS
  • OLAS funding: TBA

Further notes / issues

  • Only one agent can be run at a time.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

olas_operate_middleware-0.1.0rc10.tar.gz (46.7 kB view hashes)

Uploaded Source

Built Distribution

olas_operate_middleware-0.1.0rc10-py3-none-any.whl (64.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page