程序包 org.zlwl.wallet
类 ERC20TokenTool
java.lang.Object
org.zlwl.wallet.ERC20TokenTool
- 作者:
- ruanzh.eth
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static Stringstatic StringbalanceOf2(String address, String contract, org.web3j.protocol.Web3j web3j) static BigIntegerstatic StringlegacyTransfer(String to, BigInteger amount, String contract, org.web3j.crypto.Credentials credentials, org.web3j.protocol.Web3j web3j) ERC20代币转账static voidstatic Stringstatic Stringstatic BigIntegertotalSupply(String contract, org.web3j.protocol.Web3j web3j) static Stringtransfer(String to, BigInteger amount, String contract, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, org.web3j.crypto.Credentials credentials, org.web3j.protocol.Web3j web3j)
-
字段详细资料
-
构造器详细资料
-
ERC20TokenTool
public ERC20TokenTool()
-
-
方法详细资料
-
totalSupply
public static BigInteger totalSupply(String contract, org.web3j.protocol.Web3j web3j) throws ExecutionException, InterruptedException -
decimals
public static BigInteger decimals(String contract, org.web3j.protocol.Web3j web3j) throws ExecutionException, InterruptedException -
name
public static String name(String contract, org.web3j.protocol.Web3j web3j) throws ExecutionException, InterruptedException -
symbol
public static String symbol(String contract, org.web3j.protocol.Web3j web3j) throws ExecutionException, InterruptedException -
balanceOf
public static String balanceOf(String address, String contract, org.web3j.protocol.Web3j web3j) throws ExecutionException, InterruptedException -
legacyTransfer
public static String legacyTransfer(String to, BigInteger amount, String contract, org.web3j.crypto.Credentials credentials, org.web3j.protocol.Web3j web3j) throws ExecutionException, InterruptedException, IOException ERC20代币转账- 参数:
to- 收款地址amount- 转账金额contract- 代币合约地址credentials- 密钥web3j- client- 返回:
- 交易哈希
- 抛出:
ExecutionExceptionInterruptedExceptionIOException
-
transfer
public static String transfer(String to, BigInteger amount, String contract, BigInteger maxPriorityFeePerGas, BigInteger maxFeePerGas, org.web3j.crypto.Credentials credentials, org.web3j.protocol.Web3j web3j) throws ExecutionException, InterruptedException, IOException -
balanceOf2
public static String balanceOf2(String address, String contract, org.web3j.protocol.Web3j web3j) throws IOException - 抛出:
IOException
-
main
-