Skip to content

Commit

Permalink
feat(init): Init app
Browse files Browse the repository at this point in the history
  • Loading branch information
adetante committed Oct 1, 2020
0 parents commit 4b43292
Show file tree
Hide file tree
Showing 25 changed files with 30,707 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
]
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
webpack.config.js
41 changes: 41 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"parser": "babel-eslint",
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended"
],
"plugins": [
"jsx-a11y"
],
"env": {
"browser": true,
"es6": true
},
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"webpack": {
"config": "config/webpack.config.js"
}
}
},
"rules": {
"class-methods-use-this": "off",
"react/forbid-prop-types": "off",
"linebreak-style": "off",
"no-underscore-dangle": "off",
"no-nested-ternary": "off",
"react/prop-types": "off",
"max-len": ["error", 150, 2, {
"ignoreUrls": true,
"ignoreComments": false,
"ignoreRegExpLiterals": true,
"ignoreStrings": false,
"ignoreTemplateLiterals": false
}
]
}
}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/node_modules

/dist
/artifacts
/cache
9 changes: 9 additions & 0 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

{
"extends": "solhint:recommended",
"plugins": [],
"rules": {
"indent": ["error", 2],
"compiler-version": ["error","^0.7.1"]
}
}
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Machu-Picchu hackathon dApp

This repository contains a bootstrap project for Machu-Picchu hackathon dApp, with:
* Solidity Smart contracts in `contracts/` folder
* React UI in `src/` folder

## Init the project

Requirements: `node >= v14`

```
# clone the project, and then
npm install
```

## Smart Contracts

Smart Contracts are built & tested with [Buidler tool](http://buidler.dev/).

```
# Lint Solidity files
npm run contracts:lint
# Compile Solidity Smart Contracts
npm run contracts:compile
# Run unit tests
npm run contracts:test
```

## Frontend

Frontend is a React app, based on [Material-UI](http://material-ui.com) components.

```
# Linter
npm run frontend:lint
# Run locally
npm run frontend:start
# Build
npm run frontend:build
```

With `npm run frontend:start`, a local development server is started and the app is accessible on [http://localhost:8080](http://localhost:8080).
13 changes: 13 additions & 0 deletions buidler.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
usePlugin("@nomiclabs/buidler-waffle");
usePlugin("@nomiclabs/buidler-solhint");

module.exports = {
paths: {
tests: './tests/contracts',
},
solc: {
version: "0.7.1",
},
networks: {
},
};
10 changes: 10 additions & 0 deletions contracts/Sample.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.1;

contract Sample {

function sayHello() public pure returns(string memory) {
return "Hello !";
}

}
Loading

0 comments on commit 4b43292

Please sign in to comment.