Hemi Connector was developed using Domain-Driven Design (DDD) principles to facilitate interaction with the Hemi network and external services. This document provides instructions for setting up, running, and contributing to the project.
The code is organized into the following layers:
- Application
- Domain
- Infrastructure
- Presentation
This layer contains the use cases of the application. It is the entry point for the business logic and it is responsible for coordinating the domain layer and the infrastructure layer (always using dependency injection).
This layer contains the business logic of the application. It is the core of the application and it is responsible for the entities and value objects.
This layer contains the implementation of the interfaces/repositories. It is responsible for the connections with database and/or other external services.
This layer contains the user interface or the API routes of the application.
- Node.js
- Install the dependencies:
npm install
- On the root folder, run the following command to start the script that give points to smart contract creation:
npm run give-points
To run the tests, you can use the following command:
npm run test
npm run lint
npm run test:cov
The environment variables are defined in the .env
file. The following variables are used:
ABSINTHE_API_URL
: The Absinthe API URL to send requests when giving pointsABSINTHE_API_KEY
: The Absinthe API KEY to add to the request headersABSINTHE_EVENT_NAME
: The Absinthe Event Name to send in the points requestsTESTNET
: Boolean value to set if the scripts should run on testnet or noHOURS_INTERVAL
: Interval in hours to search for blocks/transactions that have smart contracts creation
Example of the .env file
ABSINTHE_API_URL=
ABSINTHE_API_KEY=
ABSINTHE_EVENT_NAME=
TESTNET=
HOURS_INTERVAL=
If you want to contribute to this project and make it better, your help is very welcome.
You can find more information about how to contribute in the CONTRIBUTING.md
file.
This project is licensed under the MIT License - see the LICENSE file for details.