1

I am trying to deploy a smart contract in private network using mist, but when I deploy my contract and provide transaction fee as 0.04 ether it throws error as exceeding block gas limit. Here is the pic

enter image description here

What fee should I provide for proper deployment?

This is my contract-

    pragma solidity ^0.4.24;
    contract Greet
    {
  string message;
  constructor() public
  {
    message = "I'm ready!";

}
function setgreetings(string _message)public
{
    message = _message;

}
function getgreetings()public constant returns(string)
{
    return message;
}
}

my blockchain gas limit is -

    "gasLimit": "2100000",
  • It might be that your call generates an error. Without the source code is hard to say anything, verify the requires are satisfied. Another possibility is that your blockchain has a low block gas limit. – Ismael Oct 12 '18 at 20:04
  • I was able to deploy my contract successfully when I provide zero gas fee. How did that happen? @Ismael – crypto S. Oct 16 '18 at 6:41
  • Without more details is hard to say exactly what is going on. Perhaps your account doesn't have enough ether to pay for the transaction so setting the gas price to 0 will allow it to be processed. – Ismael Oct 16 '18 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.