Open StanislavMakarov opened 5 years ago
This might look like a studio and obvious question(s) but...
credentials
object has enough Eth for the GAS_PRICE
* GAS_LIMIT
set for the Tx?ref: #4
@JoaquimLey this is not the issue. This error means that the contract deployment has gone over the gas limit.
@StanislavMakarov have you modified the contract constructor method? What network are you connecting to?
@iikirilov Thanks for correcting me 🙏 That's the Tx I was referring to, the actual deployment but I see how confusing might wording might've been :).
Transfer transaction works OK, but deploy fails. What's wrong? Source code: ContractGasProvider contractGasProvider = new DefaultGasProvider(); try {
08:34:34.908 [main] INFO org.web3j.sample.Application - Deploying smart contract org.web3j.protocol.exceptions.TransactionException: Transaction has failed with status: 0x0. Gas used: 4300000. (not-enough gas?) at org.web3j.tx.Contract.executeTransaction(Contract.java:290) at org.web3j.tx.Contract.create(Contract.java:326) at org.web3j.tx.Contract.deploy(Contract.java:355) at org.web3j.tx.Contract.lambda$deployRemoteCall$7(Contract.java:449) at org.web3j.protocol.core.RemoteCall.send(RemoteCall.java:30) at org.web3j.sample.Application.run(Application.java:124) at org.web3j.sample.Application.main(Application.java:67) Exception in thread "main" java.lang.NullPointerException at org.web3j.sample.Application.run(Application.java:144) at org.web3j.sample.Application.main(Application.java:67) Disconnected from the target VM, address: '127.0.0.1:62773', transport: 'socket'