Maintaining Privacy in Database and Data exchange using Blockchain Mechanisms and Smart Contract
## How to import the project into Eclipse
## 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
-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.
-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
-Our eclipse project uses the web3j library. Java library to interact with Ethereum blockchain and solidity smart contracts
Run the "Application.java"
-Run the "Application.java"
### Functionality
### Functionality
...
@@ -26,44 +30,45 @@ This decentralised application shows an Access control mechanism in order to inc
...
@@ -26,44 +30,45 @@ This decentralised application shows an Access control mechanism in order to inc
### Ethereum wallet
### Ethereum wallet
To use our java dapp need to have an Ethereum wallet. Set up a password.
-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.
-This can be generated using the web3j command line tool.
https://docs.web3j.io/command_line.html
-https://docs.web3j.io/command_line.html
OR
OR
Using the MyEtherWallet website to create an Ethereum wallet file
-Using the MyEtherWallet website to create an Ethereum wallet file
https://www.myetherwallet.com/
-https://www.myetherwallet.com/
### Manage account
### Manage account
By using MetaMask Google Chrome Extension
-By using MetaMask Google Chrome Extension
check how it works here:
- Check how it works here:
https://metamask.io/
-https://metamask.io/
OR
OR
By visiting Etherscan's website and add the addres to th search bar
https://etherscan.io/
- 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.
-Import the wallet file into the MetaMask account.
Change from Main Netwotk to Ropsten Network and click the Buy button.
-Change from Main Netwotk to Ropsten Network and click the Buy button.
Then, click Ropsten test Fuacet.
-Then, click Ropsten test Faucet.
Request ether several times.
-Request Ether several times.
Ether need to deploy and interact with the functions of our smart contract
-Ether are required for the deployment and the interaction with the functions of our smart contract
### Smart contracts
### Smart contracts
There are several smart contracts in this dapp, the most updated one is the "Acladv.java".
-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 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
-You can test them in https://remix.ethereum.org/ as well
### Infura
### Infura
Cloud-based ethereum clients. Need to sign in and create a auto generated token in order to use our java dapp.
-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
-https://infura.io/register.html
### Testnet
### Testnet
...
@@ -71,32 +76,32 @@ In this prototype java dapp we deploy our contract on the Ropsten Test Network
...
@@ -71,32 +76,32 @@ In this prototype java dapp we deploy our contract on the Ropsten Test Network
### Solidity compiler and Java wrappers
### Solidity compiler and Java wrappers
A) Compiling Solidity source code
-- A) Compiling Solidity source code
1) npm install -g solc
-1) npm install -g solc
2) solc or solcjs <contract>.sol --bin --abi --optimize -o <output-dir>/
-2) solc or solcjs <contract>.sol --bin --abi --optimize -o <output-dir>/