This question already has an answer here:

We are using a private ETH proof of authority blockchain.

In order to deploy a contract I'm using 0 gas price and it deployed immediately.

Then, Tried to deploy many types of contracts with different functions. f.e:

pragma solidity 0.5.8;

contract graph{

    event CampaignCreated(uint256 relevantNumber, address owner, address moderator);
    event CampaignJoined(uint256 amount, address joinUser);
    event Number(uint256 general);

    function createCampaign(uint relevantNumber, address _moderator, address _owner) public{
        emit CampaignCreated(relevantNumber, _moderator, _owner);

    function sendNumber(uint relevantNumber) public{
        emit Number(relevantNumber);

    function joinCampaign(uint _amount, address _joinUser) public{
        emit CampaignJoined(_amount, _joinUser);

but all of the tx are failing. before each call, I'm again setting the gas price to 0.

marked as duplicate by Ismael, shane, Achala Dissanayake, Richard Horrocks, flygoing Jun 20 at 19:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Are constantinople opcodes enabled in your blockchain? Are you compiling with solc 0.5.8? New versions of solc use the new bit shift operators that were introduced in constantinople fork. You can either indicate solc to target the old byzantium fork or upgrade your genesis to enable the new opcodes. – Ismael Jun 12 at 19:44
  • Changed to 0.4.24 and it worked, thanks -Please write it as an answer so I could close it. – user3652172 Jun 13 at 6:48