Decentralized Application that provides a Micropayments platform for Companies and Contractors.
To get started developing for this projects, please clone the repo:
git clone https://github.com/adpinola/Micropayments.git
These two tools are not included in the package.json
file, so you will need to add them manually
If you don't have the modules installed, execute this inside the project directory
cd Micropayments
npm install
To run the project locally for development purposes, follow these steps:
- Open Ganache and start a blockchain.
- Once it´s available, copy one of the 10 account adresses available and replace that value in the field
__LOCAL_ACCOUNT__
in the filetruffle-config.js
. This account will be used to deploy the contract in your local dev environment. - In MetaMask, add the Ganache network. check the port in the Ganache UI
- Import the accounts using the MNEMONIC from Ganache.
- In your terminal, run
npm run dev
. This will deploy the contract in the Ganache network and then will start the development server at port 3000
This application uses Truffle to test the contract code. Run the following command.
npm run contract:test
This project comes with three tools for checking code styles and syntax errors: ESLint, Prettier and Solhint. These are use to check both React and Contract code.
To check your code with both tools, you have to run
npm run linter
To auto-fix the auto-fixable issues with both tools, execute this
npm run format
You can run the checkers and fixers separately.
Checking with ESLint
npm run lint:eslint
Checking with Prettier
npm run lint:prettier
Auto-fixing with ESLint
npm run format:eslint
Auto-fixing with Prettier
npm run format:prettier
The specific linter for solidity code is Solhint. Run this command to execute the check
npm run solhint
In fact, what npm run linter
and npm run format
do is just executing the ESLint checker (or fixer) and then the Prettier checker (or fixer)
If you feel to contribute to this project, please open a PR!