1

I am using web3j java library to deploy and to interact with the smart contract. When I tried to send a transaction that invoke a function in smart contract by setting the gas price to 0 and gas limit to DefaultGasProvider.GAS_LIMIT. I am getting the below exception.

How to fix this issue?

With Remix and MetaMask it works without any issue. What am I missing when using web3j, any pointers would be of great help.

org.web3j.protocol.exceptions.TransactionException: Transaction has failed with status: 0x0. Gas used: 4300000. (not-enough gas?)
Minisha
  • 2,117
  • 2
  • 25
  • 56

1 Answers1

-1

Only solidity ^0.4.25 supports sending transactions with gas price 0.

Minisha
  • 2,117
  • 2
  • 25
  • 56