Skip to content

A RESTful fee aggregator for scraping on-chain fee collection events.

License

Notifications You must be signed in to change notification settings

kieranroneill/plutus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plutus icon - rounded edges

Plutus

A Gateway to Effortless Blockchain Fee Management

Plutus is a RESTful fee aggregator for scraping on-chain fee collection events.

GitHub release GitHub release date - published at

GitHub license

Table of contents

🗂️ 1. Overview

1.1. Project structure

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.

Back to top ^

🛠️ 2. Development

2.1. Requirements

Back to top ^

2.2. Setting up environment variables (optional)

  1. Create a .env file into the .config/ directory:
yarn setup
  1. Go to the .config/ directory and edit the values in the .env file.

Back to top ^

2.3. Running locally

  1. Simply run:
yarn start

⚠️ NOTE: The yarn 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.

  1. Navigate to http://localhost:3000/api/v1/versions to make sure everything is running.

Back to top ^

📑 3. Appendix

3.1. Documentation

The API comes with some OpenAPI documentation. This can be accessed at http://localhost:3000/api.

This documentation outlines the available endpoints available.

3.2. Useful commands

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.

Back to top ^

3.3. Docker Compose service directory

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.

Back to top ^

👏 4. How To Contribute

Please read the Contributing Guide to learn about the development process.

Back to top ^

📄 5. License

Please refer to the COPYING file.

Back to top ^