Skip to content

Commit

Permalink
Merge pull request #35 from Hanium-Blocker/issue-34
Browse files Browse the repository at this point in the history
#34 add web3j + solc
  • Loading branch information
chad1994 committed Oct 20, 2018
2 parents d7001a2 + dc714de commit 3483918
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.Toast;

import com.example.choejun_yeong.blocker_android.R;
Expand Down Expand Up @@ -57,7 +58,7 @@ public void onPermissionDenied(ArrayList<String> deniedPermissions) {
.check();

// web3
Web3j web3j = Web3jFactory.build(new HttpService("https://rinkeby.infura.io/v3/de770d2ce1834cc794cfd6dfe42fb83d"));
Web3j web3j = Web3jFactory.build(new HttpService("https://ropsten.infura.io/v3/de770d2ce1834cc794cfd6dfe42fb83d"));
Web3ClientVersion web3ClientVersion = null;
try {
web3ClientVersion = web3j.web3ClientVersion().sendAsync().get();
Expand All @@ -67,6 +68,9 @@ public void onPermissionDenied(ArrayList<String> deniedPermissions) {
e.printStackTrace();
}
String ClientVersionString = web3ClientVersion.getWeb3ClientVersion();
Toast.makeText(this, "Clientversion: " + ClientVersionString, Toast.LENGTH_SHORT).show();
Log.d("ClientVersion: " ,ClientVersionString);
}
}



0 comments on commit 3483918

Please sign in to comment.