diff --git a/sample-project-gradle-master/README.md b/sample-project-gradle-master/README.md index f398c090713509265c76a0c2815250ce17dd1e84..bfe5564111b1438098b8f306ca205d19e61cbd02 100644 --- a/sample-project-gradle-master/README.md +++ b/sample-project-gradle-master/README.md @@ -1,13 +1,17 @@ -#MARINOS ILIADIS +#MSc Project +- Marinos Iliadis +- University of Southampton 2017-2018 +- MSc Data Science -##Eclipse Gradle project +## Project Title +Maintaining Privacy in Database and Data exchange using Blockchain Mechanisms and Smart Contract ## How to import the project into Eclipse -Open Eclipse -> Go to File -> Open Project From File System -> Show other specialised import wizard-> Gradle -> Existing Gradle -> sample-project-gradle-master -Import this project to Eclipse (I use Eclipse Oxygen 3A) as an existing grandle project. -Our eclipse project uses the web3j library. Java library to interact with Ethereum blockchain and solidity smart contracts -Run the "Application.java" +- Open Eclipse -> Go to File -> Open Project From File System -> Show other specialised import wizard-> Gradle -> Existing Gradle -> sample-project-gradle-master +- Import this project to Eclipse (I use Eclipse Oxygen 3A) as an existing Gradle project. +- Our eclipse project uses the web3j library. Java library to interact with Ethereum blockchain and solidity smart contracts +- Run the "Application.java" ### Functionality @@ -26,44 +30,45 @@ This decentralised application shows an Access control mechanism in order to inc ### Ethereum wallet -To use our java dapp need to have an Ethereum wallet. Set up a password. -This can be generated using the web3j command line tool. -https://docs.web3j.io/command_line.html +- To use our java dapp need to have an Ethereum wallet. Set up a password. +- This can be generated using the web3j command line tool. +- https://docs.web3j.io/command_line.html OR -Using the MyEtherWallet website to create an Ethereum wallet file -https://www.myetherwallet.com/ +- Using the MyEtherWallet website to create an Ethereum wallet file +- https://www.myetherwallet.com/ ### Manage account -By using MetaMask Google Chrome Extension -check how it works here: -https://metamask.io/ +- By using MetaMask Google Chrome Extension +- Check how it works here: +- https://metamask.io/ -OR -By visiting Etherscan's website and add the addres to th search bar -https://etherscan.io/ +OR + +- By visiting Etherscan's website and add the address to the search bar +- https://etherscan.io/ -### Request some ether +### Request some Ether from Faucet -Import the wallet file into the MetaMask account. -Change from Main Netwotk to Ropsten Network and click the Buy button. -Then, click Ropsten test Fuacet. -Request ether several times. -Ether need to deploy and interact with the functions of our smart contract +- Import the wallet file into the MetaMask account. +- Change from Main Netwotk to Ropsten Network and click the Buy button. +- Then, click Ropsten test Faucet. +- Request Ether several times. +- Ether are required for the deployment and the interaction with the functions of our smart contract ### Smart contracts -There are several smart contracts in this dapp, the most updated one is the "Acladv.java". -You can find all smart contracts of my project in the folder src/main/resources insolidity type (.sol) -You can test them in https://remix.ethereum.org/ as well +- There are several smart contracts in this dapp, the most updated one is the "Acladv.java". +- You can find all smart contracts of my project in the folder src/main/resources insolidity type (.sol) +- You can test them in https://remix.ethereum.org/ as well ### Infura -Cloud-based ethereum clients. Need to sign in and create a auto generated token in order to use our java dapp. -https://infura.io/register.html +- Cloud-based ethereum clients. Need to sign in and create a auto generated token in order to use our java dapp. +- https://infura.io/register.html ### Testnet @@ -71,32 +76,32 @@ In this prototype java dapp we deploy our contract on the Ropsten Test Network ### Solidity compiler and Java wrappers -A) Compiling Solidity source code -1) npm install -g solc -2) solc or solcjs <contract>.sol --bin --abi --optimize -o <output-dir>/ -Links: -https://web3j.readthedocs.io/en/latest/smart_contracts.html -https://www.npmjs.com/package/solc -http://solidity.readthedocs.io/en/develop/installing-solidity.html +-- A) Compiling Solidity source code +- 1) npm install -g solc +- 2) solc or solcjs <contract>.sol --bin --abi --optimize -o <output-dir>/ +-- Links: +- https://web3j.readthedocs.io/en/latest/smart_contracts.html +- https://www.npmjs.com/package/solc +- http://solidity.readthedocs.io/en/develop/installing-solidity.html -B) Auto generated Java wrapper for solidity smart contract +-- B) Auto generated Java wrapper for solidity smart contract Need first to save your solidity code into a Notepad++ file with extention <yourcontract>.sol Solidity smart contract wrappers -3) web3j solidity generate [--javaTypes|--solidityTypes] /path/to/<smart-contract>.bin /path/to/<smart-contract>.abi -o /path/to/src/main/java -p com.your.organisation.name -Link: -https://docs.web3j.io/smart_contracts.html#smart-contract-wrappers +- 3) web3j solidity generate [--javaTypes|--solidityTypes] /path/to/<smart-contract>.bin /path/to/<smart-contract>.abi -o /path/to/src/main/java -p com.your.organisation.name +-- Link: +- https://docs.web3j.io/smart_contracts.html#smart-contract-wrappers ### Viewing logs on blockchain -Logback configuration is provided in the project dependencies giving the opportunity to logging of protocol +- Logback configuration is provided in the project dependencies giving the opportunity to logging of protocol messages. -To enable change the following line in the logback configuration: +- To enable this need to change the following line in the logback config: ```xml <logger name="org.web3j.protocol" level="DEBUG"/> ``` ### Extra Dependencies (check build.grandle) -Assert java 3.10.0 -Javatuples 1.2 -JUnit 4.12 for testing \ No newline at end of file +- Assert java 3.10.0 +- Javatuples 1.2 +- JUnit 4.12 for testing \ No newline at end of file