fix the gmtransaction
@@ -2,7 +2,6 @@ package org.fisco.bcos.channel.test;
import org.fisco.bcos.channel.client.Service;
import org.fisco.bcos.channel.test.contract.NewSolTest;
-import org.fisco.bcos.channel.test.contract.Ok;
import org.fisco.bcos.web3j.crypto.Credentials;
import org.fisco.bcos.web3j.crypto.gm.GenCredential;
import org.fisco.bcos.web3j.protocol.Web3j;
@@ -15,8 +14,6 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
import java.math.BigInteger;
-import static org.junit.Assert.assertTrue;
-
public class GMTransaction {
public static void main(String[] args) throws Exception {
@@ -38,13 +35,14 @@ public class GMTransaction {
ContractGasProvider contractGasProvider = new StaticGasProvider(gasPrice, gasLimit);
NewSolTest erc20 = NewSolTest.deploy(web3, credentials1, contractGasProvider).send();
- for(int i =0 ;i < Integer.getInteger(args[0]); i++)
+ for (int i = 0; i < Integer.getInteger(args[0]); i++) {
System.out.println("####contract address is: " + erc20.getContractAddress());
TransactionReceipt receipt = erc20.transfer("0x0f49a17d17f82da2a7d92ecf19268274150eaf5e", new BigInteger("100")).send();
BigInteger oldBalance = erc20.balanceOf("0x0f49a17d17f82da2a7d92ecf19268274150eaf5e").send();
System.out.println("0x0f49a17d17f82da2a7d92ecf19268274150eaf5e balance" + oldBalance.intValue());
}
+ }
}
