BlockOasisDappBackend is a decentralized application (DApp) backend, designed to manage blockchain-based operations like handling claims, disputes, deposits, and withdrawals.
The backend is centered around a DApp controller which integrates various routing functionalities for different aspects of user interaction and data processing. These functionalities are defined in separate scripts within the routes
directory.
The central controller script initializes the DApp and sets up routers (JSONRouter and URLRouter). It integrates route handlers for various operations and serves as the entry point for the application.
This directory contains scripts for handling different routes:
hello_route.py
: Manages basic greeting routes.register_deposit_route.py
: Handles ERC20 token deposit processes.generate_claim_route.py
: Responsible for creating new claims.withdraw_route.py
: Processes user withdrawal requests.finalize_claim_route.py
: Manages finalization of claims.generate_dispute_route.py
: Handles the creation and processing of disputes.validate_claim_route.py
: Validates and finalizes claims.
Contains essential utility modules that support the main functionality of the project:
inputs.py
: Defines various input classes for handling different types of data inputs.settings.py
: Contains theSettings
class for application configuration.utils.py
: Provides functions essential for data conversion and encoding specific to blockchain transactions.
Includes core modules of the financial and claims management system:
bank_db.py
: Manages all banking-related operations.claims_db.py
: Handles the storage, creation, and management of claims.model.py
: Central to the system, defining the data models used across the application.user_db.py
: Focuses on user management.
Ensure that Sunodo is installed on your system. Follow the installation guide here: Installing Sunodo
Ensure your project structure and configuration files are set up as per Sunodo's requirements.
Create a .sunodo.env
configuration file in the project's root directory. Define your application's build and run commands here.
Example .sunodo.env
:
SM_DEADLINE_ADVANCE_STATE=360000
SM_DEADLINE_MACHINE=300000
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=60000
S6_CMD_WAIT_FOR_SERVICES=60
-
To build your project:
sunodo build
-
To run your project:
sunodo run
These commands will execute the build and start scripts defined in your configuration file.
Contributions to enhance or extend the functionalities are welcome. Follow the standard pull request process and adhere to the project's coding standards.
For queries or issues related to the DApp backend, open an issue in the project repository or contact the project maintainers.