代码已上传到项目开源地址(同步更新):
https://gitee.com/Linriqiang/springboot-btc-eth-trx
如对你有帮助,麻烦动一下发财的小手点一个star
1.获取代币余额
@Override
public String getTokenBalance(String fromAddress, String contractAddress) {
String methodName = "balanceOf";
List<Type> inputParameters = new ArrayList<>();
List<TypeReference<?>> outputParameters = new ArrayList<>();
Address address = new Address(fromAddress);
inputParameters.add(address);
TypeReference<Uint256> typeReference = new TypeReference<Uint256>() {