diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser new file mode 100644 index 0000000..30c2709 Binary files /dev/null and b/.idea/caches/build_file_checksums.ser differ diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..30aa626 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + \ 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) {