|
2 | 2 |
|
3 | 3 | This is a sample React app that uses Reach to generate, deploy, and interact with a smart contract on Ethereum.
|
4 | 4 |
|
5 |
| -While the below instructions (generated by create-react-app) recommend using yarn, this project has also been tested with npm. |
| 5 | +Prerequisites: |
| 6 | + |
| 7 | +* Install and run the [Ganache](https://www.trufflesuite.com/ganache) app on localhost:8545 |
| 8 | + - configure it so the first user has a lot of ETH |
| 9 | +* Install the [MetaMask extension](https://metamask.io/) on both [Chrome](https://www.google.com/chrome/) and [Firefox](https://www.mozilla.org/en-US/firefox/). |
| 10 | +* Install [nvm](https://github.com/nvm-sh/nvm#installing-and-updating) and use it to install & use node 12.18.3 or higher |
6 | 11 |
|
7 | 12 | To see the demo in action:
|
8 | 13 |
|
9 |
| -``` |
10 |
| -npm install |
11 |
| -npm run start |
| 14 | +```bash |
| 15 | +npm install # this may take 5-15 mins to install |
| 16 | +npm run start # this may take a minute to comipile |
12 | 17 | ```
|
13 | 18 |
|
14 |
| -If you modify `src/index.rsh`, you must run the `compile-rsh` script: |
| 19 | +Open http://localhost:3000 in both Firefox and Chrome; |
| 20 | +run the app as Alice on one, and Bob on the other. |
15 | 21 |
|
16 |
| -``` |
| 22 | +If you modify `src/index.rsh`, you must run the `compile-rsh` script so that React will pick up the changes: |
| 23 | + |
| 24 | +```bash |
17 | 25 | npm run compile-rsh
|
18 | 26 | ```
|
19 |
| - |
20 |
| -------------------------------------------------- |
21 |
| - |
22 |
| -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). |
23 |
| - |
24 |
| -## Available Scripts |
25 |
| - |
26 |
| -In the project directory, you can run: |
27 |
| - |
28 |
| -### `yarn start` |
29 |
| - |
30 |
| -Runs the app in the development mode.<br /> |
31 |
| -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. |
32 |
| - |
33 |
| -The page will reload if you make edits.<br /> |
34 |
| -You will also see any lint errors in the console. |
35 |
| - |
36 |
| -### `yarn test` |
37 |
| - |
38 |
| -Launches the test runner in the interactive watch mode.<br /> |
39 |
| -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. |
40 |
| - |
41 |
| -### `yarn build` |
42 |
| - |
43 |
| -Builds the app for production to the `build` folder.<br /> |
44 |
| -It correctly bundles React in production mode and optimizes the build for the best performance. |
45 |
| - |
46 |
| -The build is minified and the filenames include the hashes.<br /> |
47 |
| -Your app is ready to be deployed! |
48 |
| - |
49 |
| -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. |
50 |
| - |
51 |
| -### `yarn eject` |
52 |
| - |
53 |
| -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** |
54 |
| - |
55 |
| -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. |
56 |
| - |
57 |
| -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. |
58 |
| - |
59 |
| -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. |
60 |
| - |
61 |
| -## Learn More |
62 |
| - |
63 |
| -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). |
64 |
| - |
65 |
| -To learn React, check out the [React documentation](https://reactjs.org/). |
66 |
| - |
67 |
| -### Code Splitting |
68 |
| - |
69 |
| -This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting |
70 |
| - |
71 |
| -### Analyzing the Bundle Size |
72 |
| - |
73 |
| -This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size |
74 |
| - |
75 |
| -### Making a Progressive Web App |
76 |
| - |
77 |
| -This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app |
78 |
| - |
79 |
| -### Advanced Configuration |
80 |
| - |
81 |
| -This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration |
82 |
| - |
83 |
| -### Deployment |
84 |
| - |
85 |
| -This section has moved here: https://facebook.github.io/create-react-app/docs/deployment |
86 |
| - |
87 |
| -### `yarn build` fails to minify |
88 |
| - |
89 |
| -This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify |
0 commit comments