From 1f175b73c1cc7fb77272a37974f2b01f493d181b Mon Sep 17 00:00:00 2001 From: GME_PRO Date: Mon, 11 Jun 2018 19:30:10 +0200 Subject: [PATCH] update --- .idea/caches/build_file_checksums.ser | Bin 0 -> 541 bytes .idea/codeStyles/Project.xml | 29 ++++++++++++++++++ .idea/misc.xml | 7 +++-- .../monnthicmobile/AccessBlockchain.java | 15 +++++++++ .../monnthic/monnthicmobile/DemoActivity.java | 1 + 5 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 .idea/caches/build_file_checksums.ser create mode 100644 .idea/codeStyles/Project.xml diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser new file mode 100644 index 0000000000000000000000000000000000000000..30c27096ada58ec0a9a997b839fbc16d8d596002 GIT binary patch literal 541 zcmZ4UmVvdnh`~NNKUXg?FQq6yGexf?KR>5fFEb@IQ7^qHF(oHeub?PDD>b=9F91S2 zm1gFoxMk*~I%lLNXBU^|7Q2L-Ts|(GuF1r}l-a(W(##Th_( zR`y#54~r#SWM*J;W8likPfT%3OfJbU@?_vF$tX%K&dAS6sVJ~_U;qK0at2z_zyOYkOxc*3?Qo+1S zVsUCoNoHPpF-&72LmdMfNbS6v3HxmBv*+n1=t+e;9bQ<%pyO;66Iz^FR2<_Dv??dD zG&eN{sx1Z)ngyvvC7G$krEr6;$oAaqXV}E@vVn8Pn;%YfB@8?$PK7Ic>ny)=nhSH( zG&_wfPsWq+K!4@rCnx5B;t0dkvvYC-w7AZ!w=a6TEXTifTM2_89yjb0_;aAdKcm)r MYer{b + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 3963879..99202cc 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -5,11 +5,12 @@ diff --git a/app/src/main/java/com/example/monnthic/monnthicmobile/AccessBlockchain.java b/app/src/main/java/com/example/monnthic/monnthicmobile/AccessBlockchain.java index ea99e77..fef39ea 100644 --- a/app/src/main/java/com/example/monnthic/monnthicmobile/AccessBlockchain.java +++ b/app/src/main/java/com/example/monnthic/monnthicmobile/AccessBlockchain.java @@ -37,6 +37,21 @@ public class AccessBlockchain { BigInteger nonce = transactionCount.getTransactionCount(); System.out.println(nonce); */ + Web3j web3jNode1 = Web3jFactory.build(new HttpService(node1)); + System.out.println("Node 1 : ethAccounts : "+web3jNode1.ethAccounts().send().getAccounts()); + EthGetBalance ethGetBalance1 = web3jNode1.ethGetBalance("0x5421c79d465a288c28e10aa43f9b7dff1b313c8e", DefaultBlockParameterName.LATEST).sendAsync().get(); + + + Web3j web3jNode2 = Web3jFactory.build(new HttpService(node2)); + System.out.println("Noded 2 ethAccounts : "+web3jNode2.ethAccounts().send().getAccounts()); + EthGetBalance ethGetBalance2 = web3jNode2.ethGetBalance("0xef816528949bda3b87e19b86848fb28767156232", DefaultBlockParameterName.LATEST).sendAsync().get(); + + BigInteger wei1 = ethGetBalance1.getBalance(); + System.out.println("Node 1 balance is : "+wei1); + + BigInteger wei2 = ethGetBalance2.getBalance(); + System.out.println("Node 2 balance is : "+wei2); + //BigInteger test = getTheBalanceOfWallet(address); //System.out.println(test); diff --git a/app/src/main/java/com/example/monnthic/monnthicmobile/DemoActivity.java b/app/src/main/java/com/example/monnthic/monnthicmobile/DemoActivity.java index 77bb752..3a76907 100644 --- a/app/src/main/java/com/example/monnthic/monnthicmobile/DemoActivity.java +++ b/app/src/main/java/com/example/monnthic/monnthicmobile/DemoActivity.java @@ -8,6 +8,7 @@ import android.widget.Button; public class DemoActivity extends AppCompatActivity { private static final String WALLET_A = "0x5421c79d465a288c28e10aa43f9b7dff1b313c8e"; + private static final String WALLET_B = ""; @Override protected void onCreate(Bundle savedInstanceState) {