public interface PlatformService<G>
Optional<TransactionInfo> getTransactionByHash(String hash) throws Exception
hash - 交易hashException - 可能抛出的异常Integer getDecimalsByContract(Contract contract) throws Exception
contract - 合约Exception - 可能抛出的异常BigInteger getBalanceByAddressAndContract(String address, Contract contract) throws Exception
address - 账号地址contract - 合约Exception - 可能抛出的异常default BigDecimal getNumberByAddressAndContract(String address, Contract contract) throws Exception
address - 地址contract - 余额Exception - 可能抛出的异常default BigDecimal getNumberByBalanceAndContract(BigInteger balance, Contract contract) throws Exception
getBalanceByAddressAndContract(java.lang.String, Contract)
方法的余额单位不一定是个, 会附带小数, 可执行此方法转换为以个为单位balance - getBalanceByAddressAndContract 方法返回值contract - 合约地址Exception - 可能抛出的异常BigDecimal getNumberByBalanceAndContract(BigInteger balance, Contract contract, MathContext mathContext) throws Exception
getBalanceByAddressAndContract(java.lang.String, Contract)
方法的余额单位不一定是个, 会附带小数, 可执行此方法转换为以个为单位balance - getBalanceByAddressAndContract 方法返回值contract - 合约地址mathContext - 精度要求Exception - 可能抛出的异常default BigInteger valueToBalanceByContract(BigDecimal value, Contract contract) throws Exception
value - 金额contract - 合约Exception - 异常default TransferResult transfer(Account from, String to, Contract contract, BigDecimal value) throws Exception
from - 转出账号to - 转入地址contract - 合约value - 转账金额, 单位 个Exception - 异常G transactionGenerate(Account from, String to, Contract contract, BigDecimal value, TransferParams params) throws Exception
from - 转出账号to - 转入地址contract - 合约value - 转账金额, 单位 个params - 转账参数Exception - 异常G transactionSign(G generate) throws Exception
generate - 通过 transactionGenerate 方法生成的数据Exception - 异常TransferResult transactionBroadcast(G generate) throws Exception
generate - 通过 transactionSign 方法生成的数据Exception - 异常default TransferResult transfer(Account from, String to, Contract contract, BigDecimal value, TransferParams params) throws Exception
from - 转出账号to - 转入地址contract - 合约value - 转账金额, 单位 个params - 转账参数Exception - 异常boolean validate(String address)
address - 地址Copyright © 2021. All rights reserved.