1

enter image description here

I am getting this error while migrating

Contract:
pragma solidity ^0.5.16;
contract Hello {
   string message;

   constructor() public {

   message = "Hello, World";

   }
   function getGreetings() public view returns (string memory)
   {
     return message;
   }
   function setGreetings(string memory _message) public{
     message = _message;
   }

}

2_deploy_contracts.js

var Hello = artifacts.require("./Hello.sol");
module.exports = function(deployer) {
   deployer.deploy(Hello);
};
  • And Yes I am Deploying it on local ethereum. not in ganache-cli – Prasanna Desai Sep 6 '20 at 13:03
  • What is your genesis file? It should be missing the fork that enabled SHR opcode. – Ismael Sep 6 '20 at 17:55
0

SO the Problem was in my genesis block, I wrote genesis.json myself so some parameters were missing. then I used puppeth to create new genesis block and that how i solve.

Your Answer

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

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