-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
function testing react frontend works, but is sensitive to array data (requires JSON.parse-able) ; some gas-like problem remains in valdidate, though also for call;
- Loading branch information
0 parents
commit 12152d5
Showing
68 changed files
with
212,836 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,10 @@ | ||
.env | ||
.mnemonic | ||
|
||
node_modules | ||
|
||
# build artifacts | ||
build | ||
|
||
# Migration artifacts | ||
src/contracts |
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 @@ | ||
### arbitrary contract messaging | ||
|
||
##### This repo provides boilerplate for a truffle migration invoving multiple contracts which talk to each other. The frontend allows selecting a contract and interacting with its public funcation. | ||
|
||
Cross contract storage is based (in its most basic form) on Pranav Singhal's [truffle box](https://www.trufflesuite.com/boxes/upgradable-proxy-box) of OpenZeppelin's upgradable proxy pattern. | ||
The repo will be extended to allow a choice of contracts (identified by a stored pointer) to validate arbitrary shaped data. | ||
|
||
For converting this data, I have modified @Arachnid's [String and Slice utlity](https://github.com/Arachnid/solidity-stringutils), Viktor Agayev's[Strings and Bytes](https://gist.github.com/ageyev/779797061490f5be64fb02e978feb6ac) and Kevin Kaiser's [solidity type casting](https://github.com/KevK0/solidity-type-casting/tree/master/contracts) to compile with solc0.5.x | ||
|
||
|
||
#### Installation | ||
Let's assume you'll want truffle and ganache-cli installed globally | ||
``` | ||
npm i -g truffle ganache-cli | ||
``` | ||
``` | ||
npm install --save-dev @nomiclabs/buidler | ||
npm install --save-dev @nomiclabs/buidler-waffle | ||
``` | ||
are not needed, but were originally used to provide availablility for multiple compilers. NB this are problematic to install globally. | ||
|
||
``` | ||
truffle compile | ||
``` | ||
if you have nmot already compiled. | ||
Then always: | ||
``` | ||
ganache-cli | ||
truffle migrate | ||
``` | ||
`ganache` can be run automatically, running the cli explicilty in its own terminal allows you to mointor addresses and transactions. | ||
|
||
``` | ||
cd app | ||
npm run start | ||
``` | ||
opens the React app in the browser. | ||
|
||
#### Troubleshooting | ||
If the app chokes on on network constants being undefined, check that your `network` in `truffle-config.js` (if set) and `providerUrl` in `app/src/Web3/adminPanel.js` match your ganache URL (which is running, right? You do have a blockchain running?) | ||
Alternatively, this may be a migration problem (eg due to async errors) which can fail silently during migration or remigration. Look in the console for whether all, or only some, artifacts are missing the correct network. After fixing any possbile problems, make sure to use ```truffle migrate --reset``` to explicitly rebuild. |
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,68 @@ | ||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). | ||
|
||
## Available Scripts | ||
|
||
In the project directory, you can run: | ||
|
||
### `npm start` | ||
|
||
Runs the app in the development mode.<br> | ||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. | ||
|
||
The page will reload if you make edits.<br> | ||
You will also see any lint errors in the console. | ||
|
||
### `npm test` | ||
|
||
Launches the test runner in the interactive watch mode.<br> | ||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | ||
|
||
### `npm run build` | ||
|
||
Builds the app for production to the `build` folder.<br> | ||
It correctly bundles React in production mode and optimizes the build for the best performance. | ||
|
||
The build is minified and the filenames include the hashes.<br> | ||
Your app is ready to be deployed! | ||
|
||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | ||
|
||
### `npm run eject` | ||
|
||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!** | ||
|
||
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. | ||
|
||
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. | ||
|
||
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. | ||
|
||
## Learn More | ||
|
||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). | ||
|
||
To learn React, check out the [React documentation](https://reactjs.org/). | ||
|
||
### Code Splitting | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting | ||
|
||
### Analyzing the Bundle Size | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size | ||
|
||
### Making a Progressive Web App | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app | ||
|
||
### Advanced Configuration | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration | ||
|
||
### Deployment | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment | ||
|
||
### `npm run build` fails to minify | ||
|
||
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify |
Oops, something went wrong.