0

I'm trying to deploy my smart contract to a private proof of authority chain with geth, but i always get the following error message intrinsic gas too low

This is the JSON RPC request i'm sending. bytecode is the byte code of my smart contract.

data = {
    "jsonrpc": "2.0",
    "method": "eth_sendTransaction",
    "params": [{
         "from": w3.eth.defaultAccount,
         "data": Web3.toHex(bytecode),
    }],
    "id": 420
}

When I deploy the same contract on ropsten it uses 3163322 gas. Ropsten link

I'm able to deploy smaller contract like SafeMath, so my first thought was that the gaslimit of my blocks were too small. This is not the case.

eth.getBlock("latest").gasLimit

150063322

Does anyone see the mistake?

1 Answer 1

1
data = {
     "jsonrpc": "2.0",
     "method": "eth_sendTransaction",
     "params": [{
          "from": w3.eth.defaultAccount,
          "data": Web3.toHex(bytecode),
          "gas": Web3.toHex(8000000),
     }],
     "id": 420
}

Ok, gas should be added to the params, I added it to data, that did not work

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.