0

I use a contract to call the KeeperRegitry2.0 to manage the upKeep state. There is a sample Contract :

interface IKeeperRegistry {
  function pauseUpkeep(uint256 id) external;
}

contract KeeperManager{
    IKeeperRegistry immutable public i_registry;
    //_registry is 0xE16Df59B887e3Caa439E0b29B42bA2e7976FD8b2
    constructor(IKeeperRegistry _registry) {
      i_registry = _registry;
  
    }

    function pause(uint256 _upkeepID) external {
     
            i_registry.pauseUpkeep(_upkeepID);     
    }
    
}

I use Remix to deploy this Contract. There is an error about

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
Returned error: {"jsonrpc":"2.0","error":"invalid opcode: opcode 0x5f not defined","id":2219264146385420}

and then I use hardhat to deploy successfully ,but when I write Contract by mumbai.polygonscan there is an error:

We were not able to estimate gas. There might be an error in the contract and this transaction may fail.

What is problem about the error?

enter image description here

https://docs.chain.link/chainlink-automation/register-upkeep I use v2.0 registry and registrar interfaces that also the same issue.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • Your question is the same as this https://stackoverflow.com/questions/76328677/remix-returned-error-jsonrpc2-0-errorinvalid-opcode-push0-id24 – Benjamin Jun 27 '23 at 20:04

1 Answers1

0

Over here I assume that the caller becomes your contract, which is why the transaction will fail anyways for Pausing the upkeep.

Also to check the deployment, the code you provided is not sufficient to check it

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 19 '23 at 21:27
  • You mean it cannot be called through the contract, only with EOA – user7424538 May 21 '23 at 11:00
  • us this solution https://stackoverflow.com/questions/76328677/remix-returned-error-jsonrpc2-0-errorinvalid-opcode-push0-id24 – Benjamin Jun 27 '23 at 20:03