Closed chess-equality closed 3 years ago
Hello,
Instead of using the createContractTransaction
, use the createFunctionCallTransaction
.
The code should look something like that
val transaction = Transaction.createFunctionCallTransaction(credentials.address,
BigInteger.ONE, ethGasPrice.gasPrice, DefaultGasProvider.GAS_LIMIT, contractAddress, BigInteger.valueOf(10000000000), txData)
@chess-equality is this still an issue?
Bug title
As with the title, I'm getting the error "gas required exceeds allowance or always failing transaction".
Steps To Reproduce
I'm trying to use
Transaction.createContractTransaction
along withweb3j.ethEstimateGas
to estimate the gas fee (I'm using Kotlin by the way):Expected behavior
I should get the estimated gas fee.
Environment
Describe the environment in which the issue occurs