Skip to content

adpinola/Micropayments

Repository files navigation

Subscription

Decentralized Application that provides a Micropayments platform for Companies and Contractors.

Table of contents

Getting Started

To get started developing for this projects, please clone the repo:

git clone https://github.com/adpinola/Micropayments.git

Prerequisites

These two tools are not included in the package.json file, so you will need to add them manually

Installing dependencies

If you don't have the modules installed, execute this inside the project directory

cd Micropayments
npm install

Running the application locally

To run the project locally for development purposes, follow these steps:

  1. Open Ganache and start a blockchain.
  2. Once it´s available, copy one of the 10 account adresses available and replace that value in the field __LOCAL_ACCOUNT__ in the file truffle-config.js. This account will be used to deploy the contract in your local dev environment.
  3. In MetaMask, add the Ganache network. check the port in the Ganache UI
  4. Import the accounts using the MNEMONIC from Ganache.
  5. 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

Testing

This application uses Truffle to test the contract code. Run the following command.

npm run contract:test

Linting

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)

Contributing

If you feel to contribute to this project, please open a PR!

About

Micropayments platform for Ethereum Blockchain.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published