I'm using the Web3j cli to generate a Java Wrapper for my ethereum smart contract.
function withdraw() external payable {
address _caller = msg.sender;
uint256 _userBalance = recipientBalances[_caller];
if (isExpired() && _userBalance > 0) {
uint256 _contractBalance = address(this).balance;
recipientBalances[_caller] = 0;
address payable _recipient = payable(_caller);
if (_contractBalance > _userBalance) {
_recipient.transfer(etherToWei(_userBalance));
}
}
}
Upon generation it generates a method that accepts a BigInteger
param, but my solidity contract for that method does not accept any params.
public RemoteFunctionCall<TransactionReceipt> withdraw(BigInteger weiValue) {
final Function function = new Function(
FUNC_WITHDRAW,
Arrays.<Type>asList(),
Collections.<TypeReference<?>>emptyList());
return executeRemoteCallTransaction(function, weiValue);
}
This does not occur for any of my other generated Void
return type functions.
What is the BigInteger
param used for?