Skip to content

Commit

Permalink
#34 add web3j + solc
Browse files Browse the repository at this point in the history
  • Loading branch information
chad1994 committed Oct 20, 2018
1 parent 9bb156d commit dc714de
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 dc714de

Please sign in to comment.