Linux(Ubuntu 20.04/22.04) or MacOS
Other operating systems might be used smoothly, but not recommended.
python 3.10 or above
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustc --version
sudo apt install libssl-dev libssl libcrypto
sudo apt update
sudo apt install mysql-server
sudo mysql
CREATE USER 'dota'@'localhost' IDENTIFIED BY 'Dota$2024';
GRANT ALL PRIVILEGES ON *.* TO 'dota'@'localhost';
FLUSH PRIVILEGES;
CREATE DATABASE dota;
exit
git clone https://github.com/DOTA-DOT20/dota-indexer.git
python3 -m venv myenv
source myenv/bin/activate
cd dota-indexer
pip install -r requirements.txt
cp .env.example .env
nano .env
# mysql
HOST="localhost"
MYSQLUSER="dota"
PASSWORD="Dota$2024"
DATABASE="dota"
# The name of the connected network: Polkadot mainnet should be "Polkadot" while testnet should be "Development"
CHAIN="Development"
URL="wss://rect.me"
# log configuration
# How many days to make a backup
ROTATION=1
#Maximum number of weeks of data to retain
RENTENTION=4
# Block to start indexing
# START_BLOCK should be the same across the entire network and is part of the consensus.
# When the indexer is first started, it should be near the latest block of the network.
START_BLOCK=719300
# How many blocks to delay the final block
DELAY_BLOCK=3
Press Ctrl+x / y / Enter to quit the editor
Note that the configuration in the .env file should be modified according to your actual situation.
python indexer.py
You could use screen or nohup & to run the indexer on the background
mysql -u dota -p dota
Host: 127.0.0.1
user: dota
password: Dota$2024
database: dota
Send transactions according to the rules of dot20 standard