From 83f4a6fd0f2037237979a07a111a3e715897ad56 Mon Sep 17 00:00:00 2001 From: MI96 <mi3u17@soton.ac.uk> Date: Sun, 5 Aug 2018 19:14:17 +0100 Subject: [PATCH] readme file changes and changes in the Application.java --- sample-project-gradle-master/.classpath | 4 ---- sample-project-gradle-master/README.md | 6 ++++-- sample-project-gradle-master/bin/.gitignore | 3 +++ .../src/main/java/org/web3j/sample/Application.java | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 sample-project-gradle-master/bin/.gitignore diff --git a/sample-project-gradle-master/.classpath b/sample-project-gradle-master/.classpath index ad039b1..7978a31 100644 --- a/sample-project-gradle-master/.classpath +++ b/sample-project-gradle-master/.classpath @@ -5,9 +5,5 @@ <classpathentry kind="src" path="src/main/resources"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/> <classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/> - <classpathentry exported="true" kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5"/> - <classpathentry exported="true" kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="lib" path="C:/Users/Marinos/javatuples-1.2/lib/javatuples-1.2.jar"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/sample-project-gradle-master/README.md b/sample-project-gradle-master/README.md index 21a9a29..f146ae7 100644 --- a/sample-project-gradle-master/README.md +++ b/sample-project-gradle-master/README.md @@ -1,7 +1,9 @@ #MARINOS ILIADIS -##Eclipse Grandle project +##Eclipse Gradle project -Import this project to Eclipse (I use Eclipse Oxygen) as an existing grandle project. +## 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" diff --git a/sample-project-gradle-master/bin/.gitignore b/sample-project-gradle-master/bin/.gitignore new file mode 100644 index 0000000..b318177 --- /dev/null +++ b/sample-project-gradle-master/bin/.gitignore @@ -0,0 +1,3 @@ +/logback.xml +/org/ +/solidity/ diff --git a/sample-project-gradle-master/src/main/java/org/web3j/sample/Application.java b/sample-project-gradle-master/src/main/java/org/web3j/sample/Application.java index bfbed53..3f689b7 100644 --- a/sample-project-gradle-master/src/main/java/org/web3j/sample/Application.java +++ b/sample-project-gradle-master/src/main/java/org/web3j/sample/Application.java @@ -53,7 +53,7 @@ public class Application { Credentials credentials = WalletUtils.loadCredentials( "1234", //Need to add the password you have set for this wallet file - "C:\\Users\\Marinos\\Desktop\\sample-project-gradle-master\\wallet\\UTC--2018-06-16T11-26-34.298000000Z--fc87f1c9459a4e15731d004ebd923821f89aa007.json"); //Need to add the path of your generated Ethereum wallet file (.json). + "C:\\Users\\Marinos\\Desktop\\test_gitlab\\db-blockchain-privacy\\sample-project-gradle-master\\wallet\\UTC--2018-06-16T11-26-34.298000000Z--fc87f1c9459a4e15731d004ebd923821f89aa007.json"); //Need to add the path of your generated Ethereum wallet file (.json). log.info("Credentials loaded"); //Check the folder wallet inside the project folder to find an existing wallet file. //Send 1 wei from your address to another address @@ -167,6 +167,6 @@ public class Application { for (Acladv.LogNewUserEventResponse event : contract.getLogNewUserEvents(transactionReceipt)) { log.info("New User added to the baseData!" + "The number of users now is: " + contract.getUserCount().send() + " The new user's id is: " + event.userId); } - log.info("Marinos Iliadis: MSc Data Science Project 2017-2018" + contract.isUser("0xFC87F1c9459A4e15731d004EbD923821f89AA007").send()); + log.info("IS Marinos Iliadis: MSc Data Science Project 2017-2018 USER?: " + contract.isUser("0xFC87F1c9459A4e15731d004EbD923821f89AA007").send()); } } -- GitLab