Skip to content

Commit b9f336a

Browse files
authored
Add files via upload
1 parent 1a10768 commit b9f336a

24 files changed

+62200
-0
lines changed

.babelrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["es2015", "stage-2", "stage-3"]
3+
}

.env_example

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PRIVATE_KEYS='PK_1,PK_2'
2+
INFURA_API_KEY=PROJECT_ID

.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env
17+
.env.local
18+
.env.development.local
19+
.env.test.local
20+
.env.production.local
21+
22+
npm-debug.log*
23+
yarn-debug.log*
24+
yarn-error.log*

migrations/1_initial_migration.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const Migrations = artifacts.require("Migrations");
2+
3+
module.exports = function(deployer) {
4+
deployer.deploy(Migrations);
5+
};

migrations/2_deploy.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
var Reviews = artifacts.require("./Reviews.sol");
2+
3+
module.exports = function(deployer) {
4+
deployer.deploy(Reviews);
5+
};

package-lock.json

+18,023
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "ratings",
3+
"version": "0.1.0",
4+
"description": "Decentralized Rating",
5+
"author": "",
6+
"homepage": ".",
7+
"dependencies": {
8+
"@openzeppelin/contracts": "3.3.0",
9+
"@truffle/hdwallet-provider": "1.1.0",
10+
"babel-polyfill": "6.26.0",
11+
"babel-preset-env": "1.7.0",
12+
"babel-preset-es2015": "6.24.1",
13+
"babel-preset-stage-2": "6.24.1",
14+
"babel-preset-stage-3": "6.24.1",
15+
"babel-register": "6.26.0",
16+
"bootstrap": "4.5.2",
17+
"chai": "4.2.0",
18+
"chai-as-promised": "7.1.1",
19+
"chai-bignumber": "3.0.0",
20+
"dotenv": "8.2.0",
21+
"react": "16.13.1",
22+
"react-bootstrap": "1.3.0",
23+
"react-dom": "16.13.1",
24+
"react-scripts": "3.4.3",
25+
"truffle": "5.1.63",
26+
"truffle-hdwallet-provider-privkey": "0.3.0",
27+
"web3": "1.2.6"
28+
},
29+
"scripts": {
30+
"start": "react-scripts start",
31+
"build": "react-scripts build",
32+
"test": "react-scripts test",
33+
"eject": "react-scripts eject"
34+
},
35+
"eslintConfig": {
36+
"extends": "react-app"
37+
},
38+
"browserslist": [
39+
">0.2%",
40+
"not dead",
41+
"not ie <= 11",
42+
"not op_mini all"
43+
]
44+
}

public/favicon.ico

318 KB
Binary file not shown.

public/index.html

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<meta
7+
name="viewport"
8+
content="width=device-width, initial-scale=1, shrink-to-fit=no"
9+
/>
10+
<meta name="theme-color" content="#000000" />
11+
<!--
12+
manifest.json provides metadata used when your web app is installed on a
13+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
14+
-->
15+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
16+
<!--
17+
Notice the use of %PUBLIC_URL% in the tags above.
18+
It will be replaced with the URL of the `public` folder during the build.
19+
Only files inside the `public` folder can be referenced from the HTML.
20+
21+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
22+
work correctly both with client-side routing and a non-root public URL.
23+
Learn how to configure a non-root public URL by running `npm run build`.
24+
-->
25+
<title>RateChain</title>
26+
</head>
27+
<body>
28+
<noscript>You need to enable JavaScript to run this app.</noscript>
29+
<div id="root"></div>
30+
<!--
31+
This HTML file is a template.
32+
If you open it directly in the browser, you will see an empty page.
33+
34+
You can add webfonts, meta tags, or analytics to this file.
35+
The build step will place the bundled scripts into the <body> tag.
36+
37+
To begin the development, run `npm start` or `yarn start`.
38+
To create a production bundle, use `npm run build` or `yarn build`.
39+
-->
40+
</body>
41+
</html>

public/manifest.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"short_name": "Starter Kit",
3+
"name": "Dapp University Starter Kit",
4+
"icons": [
5+
{
6+
"src": "favicon.ico",
7+
"sizes": "64x64 32x32 24x24 16x16",
8+
"type": "image/x-icon"
9+
}
10+
],
11+
"start_url": ".",
12+
"display": "standalone",
13+
"theme_color": "#000000",
14+
"background_color": "#ffffff"
15+
}

scripts/script.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const ContractName = artifacts.require("ContractName")
2+
3+
module.exports = async function(callback) {
4+
try {
5+
// Get Accounts
6+
const accounts = await web3.eth.getAccounts()
7+
8+
// Fetch the deployed contract
9+
const contract = await ContractName.deployed()
10+
console.log('Contract fetched', contract.address)
11+
}
12+
catch(error) {
13+
console.log(error)
14+
}
15+
16+
callback()
17+
}

0 commit comments

Comments
 (0)