Getting Started

Supported Platforms

We currently support Linux(x86) and Mac(AppleSilicon).
You may be able to use Dojo in Windows using WSL, but we are not actively developing for it.

We aim to always support the latest version of Python. Currently we support 3.10+.


Licensing

Dojo requires a license key. To get started - contact us.


Prerequisites

There's a few more things you need to set up for Dojo. If you've done some coding in web3 before, chances are you're good to go already!

  1. RPC Node provider: setup an account with a provider, such as Infura, or use your own archive node. You'll need the ETHEREUM_RPC_URL environment variable (or ARBITRUM_RPC_URL for an arbitrum node) to the URL where it provides its API. e.g. https://mainnet.infura.io/v3/ac8ee<...>961
  2. A local ethereum development environment: we recently switched from hardhat to anvil. Check out the installation guide here.

Setup

Setting up Dojo shouldn't take more than 5 minutes:

1. Install Dojo

Dojo is provided as a Python package on PyPi. To install, simply run

Terminal
pip install dojo-compass

2. Install Anvil

Dojo requires Anvil as EVM. It is what's going to process the raw transactions on your local machine.
Installing it is simple. Just follow the instructions here.

3. Setup configuration

Create a .env file in the root directory of your project, or export the environment variables:

.env
ETHEREUM_RPC_URL=<YOUR ETHEREUM URL>
ARBITRUM_RPC_URL=<YOUR ARBITRUM URL> # you only need to set the url corresponding to the chain(s) you're using
LICENSE_KEY=<YOUR LICENSE KEY>

For ETHEREUM_RPC_URL, you will need to provide an etherum archive node address. We recommend to setup an account with a provider, such as Infura and specify the ETHEREUM_RPC_URL it provides.
For ARBITRUM_RPC_URL you will similarly need to provide an arbitrum archive node address, if you are using the arbitrum chain in your simulation. Be aware: the speed of your archive node can limit the speed of simulation! Dojo will send some test requests to your archive node at startup and emit a warning if the node responds very slowly.

The archive node is only used to read historical state prior to simulation start, but if you prefer you can also setup your own node, of course.

4. Verify install

If everything is set up correctly, the following command should throw no errors.

Terminal
python -c "from dojo.config import assert_license_is_valid as check; check()"

Congratulations! You've got everything working as expected.