From bf39981d9b31a31d8de92bafaf4b8dd6a1dec143 Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Wed, 20 Nov 2024 20:16:17 +0700 Subject: [PATCH] Create README.md --- smart-contracts/README.md | 53 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 smart-contracts/README.md diff --git a/smart-contracts/README.md b/smart-contracts/README.md new file mode 100644 index 000000000..4367cf76f --- /dev/null +++ b/smart-contracts/README.md @@ -0,0 +1,53 @@ +# Smart Contracts for dApps + +## Overview +This directory contains the smart contracts for the dApps Builder project. The contracts are written in Solidity and are designed to facilitate the core functionalities of the decentralized application. + +## Contracts +- **DAppContract.sol**: The main contract that handles user deposits, withdrawals, and balance management. +- **Migrations.sol**: A contract to manage the deployment of other contracts. + +## Migrations +The migration scripts are used to deploy the contracts to the blockchain. The initial migration script is included in this directory. + +## Testing +The test directory contains tests for the DAppContract to ensure that all functionalities work as expected. Tests are written using Mocha and Chai. + +## Truffle Configuration +The `truffle-config.js` file contains the configuration for deploying the contracts to different networks, including development, Ropsten, and Mainnet. + +## Getting Started + +### Prerequisites +- Node.js (v14 or higher) +- Truffle (v5.0 or higher) +- Ganache (for local development) + +### Installation +1. Install Truffle globally: + ```bash + 1 npm install -g truffle + ``` + +2. Install dependencies: + ```bash + 1 npm install + ``` + +### Running Migrations +To deploy the contracts to the local development network, run: + + ```bash + 1 truffle migrate --network development + ``` + +### Running Tests +To execute the tests, use: + + ```bash + 1 truffle test + ``` + +### Author + +KOSASIH