Keep3rV1Oracle Integration

Hello,

I have tried to add Keep3rV1Oracle in my autotask, even when the job is ‘workable’. I have got this error when I have tried to run work(). Anyone can help me?

gas required exceeds allowance (12493458) or always failing transaction

my script

full error message

Logs: 2020-11-10T19:54:45.913Z	AUTOTASK START
2020-11-10T19:54:47.429Z	INFO	Keep3rV1Oracle is workable
2020-11-10T19:54:47.774Z	ERROR	Error: processing response error (body={"jsonrpc":"2.0","id":44,"error":{"code":-32000,"message":"gas required exceeds allowance (12493458) or always failing transaction"}}, error={"code":-32000}, requestBody="{\"method\":\"eth_estimateGas\",\"params\":[{\"from\":\"0xd849511eba9f7daf7c45dcba182714a3d8ffe792\",\"to\":\"0x73353801921417f465377c8d898c6f4c0270282c\",\"data\":\"0x322e9f04\"}],\"id\":44,\"jsonrpc\":\"2.0\"}", requestMethod="POST", url="https://mainnet.infura.io/v3/4d613481619d49629d4a816115309fb2", code=SERVER_ERROR, version=web/5.0.2)
    at Logger.makeError (/opt/nodejs/node_modules/@ethersproject/logger/lib/index.js:179:21)
    at Logger.throwError (/opt/nodejs/node_modules/@ethersproject/logger/lib/index.js:188:20)
    at /opt/nodejs/node_modules/@ethersproject/web/lib/index.js:244:32
    at step (/opt/nodejs/node_modules/@ethersproject/web/lib/index.js:33:23)
    at Object.next (/opt/nodejs/node_modules/@ethersproject/web/lib/index.js:14:53)
    at fulfilled (/opt/nodejs/node_modules/@ethersproject/web/lib/index.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  reason: 'processing response error',
  code: 'SERVER_ERROR',
  body: {
    jsonrpc: '2.0',
    id: 44,
    error: {
      code: -32000,
      message: 'gas required exceeds allowance (12493458) or always failing transaction'
    }
  },
  error: Error: gas required exceeds allowance (12493458) or always failing transaction
      at getResult (/opt/nodejs/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:70:21)
      at /opt/nodejs/node_modules/@ethersproject/web/lib/index.js:222:46
      at step (/opt/nodejs/node_modules/@ethersproject/web/lib/index.js:33:23)
      at Object.next (/opt/nodejs/node_modules/@ethersproject/web/lib/index.js:14:53)
      at fulfilled (/opt/nodejs/node_modules/@ethersproject/web/lib/index.js:5:58)
      at processTicksAndRejections (internal/process/task_queues.js:97:5) {
    code: -32000,
    data: undefined
  },
  requestBody: '{"method":"eth_estimateGas","params":[{"from":"0xd849511eba9f7daf7c45dcba182714a3d8ffe792","to":"0x73353801921417f465377c8d898c6f4c0270282c","data":"0x322e9f04"}],"id":44,"jsonrpc":"2.0"}',
  requestMethod: 'POST',
  url: 'https://mainnet.infura.io/v3/4d613481619d49629d4a816115309fb2'
}
2020-11-10T19:54:47.774Z	ERROR	Invoke Error 	{"errorType":"Error","errorMessage":"processing response error (body={\"jsonrpc\":\"2.0\",\"id\":44,\"error\":{\"code\":-32000,\"message\":\"gas required exceeds allowance (12493458) or always failing transaction\"}}, error={\"code\":-32000}, requestBody=\"{\\\"method\\\":\\\"eth_estimateGas\\\",\\\"params\\\":[{\\\"from\\\":\\\"0xd849511eba9f7daf7c45dcba182714a3d8ffe792\\\",\\\"to\\\":\\\"0x73353801921417f465377c8d898c6f4c0270282c\\\",\\\"data\\\":\\\"0x322e9f04\\\"}],\\\"id\\\":44,\\\"jsonrpc\\\":\\\"2.0\\\"}\", requestMethod=\"POST\", url=\"https://mainnet.infura.io/v3/4d613481619d49629d4a816115309fb2\", code=SERVER_ERROR, version=web/5.0.2)","code":"SERVER_ERROR","reason":"processing response error","body":{"jsonrpc":"2.0","id":44,"error":{"code":-32000,"message":"gas required exceeds allowance (12493458) or always failing transaction"}},"error":{"errorType":"Error","errorMessage":"gas required exceeds allowance (12493458) or always failing transaction","code":-32000,"stack":["Error: gas required exceeds allowance (12493458) or always failing transaction","    at getResult (/opt/nodejs/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:70:21)","    at /opt/nodejs/node_modules/@ethersproject/web/lib/index.js:222:46","    at step (/opt/nodejs/node_modules/@ethersproject/web/lib/index.js:33:23)","    at Object.next (/opt/nodejs/node_modules/@ethersproject/web/lib/index.js:14:53)","    at fulfilled (/opt/nodejs/node_modules/@ethersproject/web/lib/index.js:5:58)","    at processTicksAndRejections (internal/process/task_queues.js:97:5)"]},"requestBody":"{\"method\":\"eth_estimateGas\",\"params\":[{\"from\":\"0xd849511eba9f7daf7c45dcba182714a3d8ffe792\",\"to\":\"0x73353801921417f465377c8d898c6f4c0270282c\",\"data\":\"0x322e9f04\"}],\"id\":44,\"jsonrpc\":\"2.0\"}","requestMethod":"POST","url":"https://mainnet.infura.io/v3/4d613481619d49629d4a816115309fb2","stack":["Error: processing response error (body={\"jsonrpc\":\"2.0\",\"id\":44,\"error\":{\"code\":-32000,\"message\":\"gas required exceeds allowance (12493458) or always failing transaction\"}}, error={\"code\":-32000}, requestBody=\"{\\\"method\\\":\\\"eth_estimateGas\\\",\\\"params\\\":[{\\\"from\\\":\\\"0xd849511eba9f7daf7c45dcba182714a3d8ffe792\\\",\\\"to\\\":\\\"0x73353801921417f465377c8d898c6f4c0270282c\\\",\\\"data\\\":\\\"0x322e9f04\\\"}],\\\"id\\\":44,\\\"jsonrpc\\\":\\\"2.0\\\"}\", requestMethod=\"POST\", url=\"https://mainnet.infura.io/v3/4d613481619d49629d4a816115309fb2\", code=SERVER_ERROR, version=web/5.0.2)","    at Logger.makeError (/opt/nodejs/node_modules/@ethersproject/logger/lib/index.js:179:21)","    at Logger.throwError (/opt/nodejs/node_modules/@ethersproject/logger/lib/index.js:188:20)","    at /opt/nodejs/node_modules/@ethersproject/web/lib/index.js:244:32","    at step (/opt/nodejs/node_modules/@ethersproject/web/lib/index.js:33:23)","    at Object.next (/opt/nodejs/node_modules/@ethersproject/web/lib/index.js:14:53)","    at fulfilled (/opt/nodejs/node_modules/@ethersproject/web/lib/index.js:5:58)","    at processTicksAndRejections (internal/process/task_queues.js:97:5)"]}
2020-11-10T19:54:47.792Z	AUTOTASK COMPLETE

I think the issue here is that this job seems to have a 200 KPR bonded requirement… Check the ‘minKeep’ variable in the job contract.

1 Like

ah make sense. ty a lot to answer my newbee question :slight_smile:

No problem! To be honest it had me questioning also for a while why the contract was failing while it was workable.

@andre.cronje, is it an idea to list these bonding requirements in the job description because now the only way seems to be digging in the contract code/variables. Is the variable universal for the different jobs? So will will it always be named ‘minKeep’ or is this up to the job contract creator?

1 Like

Good idea, I’ll add an interface for Keep3rV1JobRegistry so that it is included, but it is up to the Job to implement. For example a Job might start at 0 requirement and work up to > value if security requires it. A good idea is to include a standard interface to jobs, something along the lines of overriding isKeeper and hasCredits so that keepers can filter easier.

Great suggestion, thank you

3 Likes