-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4b43292
Showing
25 changed files
with
30,707 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
webpack.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/node_modules | ||
|
||
/dist | ||
/artifacts | ||
/cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: { | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 !"; | ||
} | ||
|
||
} |
Oops, something went wrong.