程序包 org.zlwl.wallet
类 ERC20TokenTool
java.lang.Object
org.zlwl.wallet.ERC20TokenTool
- 作者:
- ruanzh.eth
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static Stringstatic org.web3j.protocol.core.methods.response.EthCallbalanceOf2(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 org.web3j.protocol.core.methods.response.EthSendTransactiontransfer(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 org.web3j.protocol.core.methods.response.EthSendTransaction 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 org.web3j.protocol.core.methods.response.EthCall balanceOf2(String address, String contract, org.web3j.protocol.Web3j web3j) throws IOException - 抛出:
IOException
-
main
-