public Maptransfer(String from, String _to, String _value) throws Exception {
String txHash = null;
try {
Admin admin = Admin.build(new HttpService(url));
Web3j web3j = Web3j.build(new HttpService(url));
PersonalUnlockAccount personalUnlockAccount = admin.personalUnlockAccount(
from,defaultPassword , BigInteger.valueOf(10)).send();
if (personalUnlockAccount.accountUnlocked()) {
//查询是否已存在该用户
Nonce nonce = nonceRepository.finOne(from);
if (nonce == null){
EthGetTransactionCount ethGetTransactionCount = web3j
.ethGetTransactionCount(from, DefaultBlockParameterName.PENDING).sendAsync().get();
BigInteger nonce2 = ethGetTransactionCount.getTransactionCount();
nonce =new Nonce();
nonce.setAccount(from);
nonce.setNonce(nonce2.longValue());