- Pull the repository and perform the installation steps. There is no need to do these steps more than once on each computer.
- Do not save any private keys on this repository.
- Enjoy!
- Background
- Installation Instructions
- Compilation and Deployment Instructions
- Testing
- Front End interaction
- Maintainers
- License
- Example- In Development
- Documentation- In Development
- Development- In Development
Relying on the notion of the payment channels using Ethereum, this project implements the concept by incorperating SGX (or any equivalent third party abilities). As a result, allowing usage of payment channels over Ethereum while minimizing gas costs and transaction amounts on the Blockchain.
-
Download the latest node.js from: https://nodejs.org/en/download/
-
Git clone/ pull the project from our github repository.
-
Use npm init in the root directory (/DepositContract)
-
If using Windows- open a windows command line as administrator and run:
- npm install --global --production windows-build-tools
- If that doesn't work - you have to go to the course video, lecture 37 and follow the second option.
-
Install a bunch of libraries: (If using Windows- open cmd as admin, if Linux- sudo before each one)
- npm install --save solc
- npm install --save mocha ganache-cli web3@1.0.0-beta.35
- npm install --save fs-extra
- npm install --save truffle-hdwallet-provider@0.0.3
- npm i truffle If any of these commands doesn't execute successfully, look online for solutions.
-
Install libraries used for development of front end (not sure if this is a must in order to see it):
- npm install --save semantic-ui-react
- npm install --save semantic-ui-css
- npm install --save next-routes
Again, if any of that doesn't work - you should search for a solution.
If you wish to re-compile the contract (you don't have to do it, and it's better you don't do it unless you have a good reason):
- cd ..\ethereum
- node compile.js
- (verify you see all 3 .json files inside \ethereum\build)
- node deploy.js
- Save the addresses you get for the factory and for the SGX simulator.
- The factory address should be placed in \ethereum\factory.js at line 6.
- Note: Sometimes when you use node compile.js or deploy you get some weird error. in this case - open node.js terminal as administrator from windows search, close the code editor and run the command from the terminal you opened. It fixes it.
- cd to Truffle/contract directory.
- In the command line:
- Windows- mklink Deposit.sol ....\ethereum\contracts\Deposit.sol
- Linux- sudo ln -s Deposit.sol ../../ethereum/contact/Deposit.sol
- cd ..
- truffle compile
- truffle migrate
- cd back into root directory (not sure if this is a must) and run: npm run dev
- cd to Truffle directory
- truffle test
Wait until the command line tells you that compilation was successful.
- cd back into root directory (not sure if this is a must).
- Open chrome (or any other browser with metamask) and enter localhost:3000
Solidity is licensed under GNU General Public License v3.0
In Development
In Development
In Development