A Gateway to Effortless Blockchain Fee Management
Plutus is a RESTful fee aggregator for scraping on-chain fee collection events.
The project structure is, for the most part, self documenting, but below is an expansion on each directory:
images
: contains the Docker images used by the both the API and the MongoDB database.scripts
: contains various scripts used to setup, run and test.
- Create a
.env
file into the.config/
directory:
yarn setup
- Go to the
.config/
directory and edit the values in the.env
file.
- Simply run:
yarn start
⚠️ NOTE: Theyarn start
command will run/re-run the setup script, but will not overwrite the file.env
that was created and edited in section 1.2.
- Navigate to http://localhost:3000/api/v1/versions to make sure everything is running.
The API comes with some OpenAPI documentation. This can be accessed at http://localhost:3000/api.
This documentation outlines the available endpoints available.
Command | Description |
---|---|
yarn setup |
Creates an .env file to the .config/ directory. |
yarn start |
Runs setup and starts Docker Compose. Intended for development purposes only. |
yarn test |
Runs the test script that starts up the Docker Compose test configuration and runs both unit and e2e tests. E2e tests require a running API and database. |
yarn test:e2e |
Runs the e2e tests (all files that are named e2e.test.ts ). This command requires a running API at https://127.0.0.1:3000 and a database. |
yarn test:unit |
Simply runs the unit tests. These are self-contained and do not require any external dependencies. |
Here is a list of all the localhost port mappings for each of the apps
Port | URL | Docker Compose Service | Description |
---|---|---|---|
3000 |
http://localhost:3000 | api |
The core application that scrapes the blockchain for emitted events. |
27017 |
http://localhost:27017 | database |
The MongoDB database that stores the collected fees. |
Please read the Contributing Guide to learn about the development process.
Please refer to the COPYING file.