This is the 2.0 backend (essentially a custom blockchain indexer) for Algodex and also includes the rewards calculations.
You can find the contribution guides for getting started in CONTRIBUTING.md
Algodex Documentation: https://docs.algodex.com
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
sudo apt install build-essential
sudo apt-get install pkg-config libssl-dev
cd rewards-calc
cargo build
First make sure CouchDB and Redis services are running according to .integration.test.env. The node.js should not be running as these will be started by the end-to-end test.
cp .testnet.docker.env .env
docker-compose up -f docker-compose.yml -f docker-compose.docker.yml
(todo) The reverse proxy sits in front of algodex-service. The basic request flow is nginx -> reverse-proxy-rust -> algodex-service API
Some instructions are at https://github.com/algodex/reverse-proxy-rust
npm run end-to-end-light
Broker (Event Publisher->Queue|Sockets): ./services/broker.js
Worker (BullMQ Worker): ./services/worker.js
Socket (Event Subscriber and Socket Publisher - only partially implemented): ./server.js
ws://localhost/asset/{id}
would subscribe to the
appropriate redis channel coming from the BrokerAPI endpoint: ./api/api_server.ts
Rewards Calculator ./rewards-calc/src/main.rs