lukso-network / tools-lsp-factory

Easy deployments of LSP standard Universal Profile and Digital Asset smart contracts
https://www.npmjs.com/package/@lukso/lsp-factory.js
Apache License 2.0
16 stars 16 forks source link

Cannot estimate gas while deploying a Universal Profile #154

Open sagaranand015 opened 2 years ago

sagaranand015 commented 2 years ago

The entire error response looks like:

<ref *1> Error: cannot estimate gas; transaction may fail or may require manual gas limit (error={"reason":"cannot estimate gas; transaction may fail or may require manual gas limit","code":"UNPREDICTABLE_GAS_LIMIT","error":{"reason":"processing response error","code":"SERVER_ERROR","body":"{\"jsonrpc\":\"2.0\",\"id\":54,\"error\":{\"code\":-32000,\"message\":\"gas required exceeds allowance (0)\"}}\n","error":{"code":-32000},"requestBody":"{\"method\":\"eth_estimateGas\",\"params\":[{\"type\":\"0x2\",\"maxFeePerGas\":\"0x9502f90e\",\"maxPriorityFeePerGas\":\"0x9502f900\",\"from\":\"0xf95d78d71d5f6a7c1f1657c93e0fcdf0067e088e\",\"data\":\"0x3d602d80600a3d3981f3363d3d373d3d3d363d73d4ea48069862de4fd64131c7f551e866873b5e475af43d82803e903d91602b57fd5bf3000000000000000000000000f95d78d71d5f6a7c1f1657c93e0fcdf0067e088e\"}],\"id\":54,\"jsonrpc\":\"2.0\"}","requestMethod":"POST","url":"https://rpc.l16.lukso.network"},"method":"estimateGas","transaction":{"from":"0xF95d78d71d5f6A7c1f1657C93E0FcDF0067e088e","maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x9502f900"},"maxFeePerGas":{"type":"BigNumber","hex":"0x9502f90e"},"data":"0x3d602d80600a3d3981f3363d3d373d3d3d363d73d4ea48069862de4fd64131c7f551e866873b5e475af43d82803e903d91602b57fd5bf3000000000000000000000000f95d78d71d5f6a7c1f1657c93e0fcdf0067e088e","type":2,"accessList":null}}, tx={"data":"0x3d602d80600a3d3981f3363d3d373d3d3d363d73d4ea48069862de4fd64131c7f551e866873b5e475af43d82803e903d91602b57fd5bf3000000000000000000000000f95d78d71d5f6a7c1f1657c93e0fcdf0067e088e","nonce":0,"from":"0xF95d78d71d5f6A7c1f1657C93E0FcDF0067e088e","type":2,"maxFeePerGas":{"type":"BigNumber","hex":"0x9502f90e"},"maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x9502f900"},"gasLimit":{},"chainId":{}}, code=UNPREDICTABLE_GAS_LIMIT, version=abstract-signer/5.5.0)
    at Logger.makeError (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/logger/lib/index.js:199:21)
    at Logger.throwError (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/logger/lib/index.js:208:20)
    at /home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/abstract-signer/lib/index.js:365:47
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Promise.all (index 6) {
  reason: 'cannot estimate gas; transaction may fail or may require manual gas limit',
  code: 'UNPREDICTABLE_GAS_LIMIT',
  error: Error: cannot estimate gas; transaction may fail or may require manual gas limit (error={"reason":"processing response error","code":"SERVER_ERROR","body":"{\"jsonrpc\":\"2.0\",\"id\":54,\"error\":{\"code\":-32000,\"message\":\"gas required exceeds allowance (0)\"}}\n","error":{"code":-32000},"requestBody":"{\"method\":\"eth_estimateGas\",\"params\":[{\"type\":\"0x2\",\"maxFeePerGas\":\"0x9502f90e\",\"maxPriorityFeePerGas\":\"0x9502f900\",\"from\":\"0xf95d78d71d5f6a7c1f1657c93e0fcdf0067e088e\",\"data\":\"0x3d602d80600a3d3981f3363d3d373d3d3d363d73d4ea48069862de4fd64131c7f551e866873b5e475af43d82803e903d91602b57fd5bf3000000000000000000000000f95d78d71d5f6a7c1f1657c93e0fcdf0067e088e\"}],\"id\":54,\"jsonrpc\":\"2.0\"}","requestMethod":"POST","url":"https://rpc.l16.lukso.network"}, method="estimateGas", transaction={"from":"0xF95d78d71d5f6A7c1f1657C93E0FcDF0067e088e","maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x9502f900"},"maxFeePerGas":{"type":"BigNumber","hex":"0x9502f90e"},"data":"0x3d602d80600a3d3981f3363d3d373d3d3d363d73d4ea48069862de4fd64131c7f551e866873b5e475af43d82803e903d91602b57fd5bf3000000000000000000000000f95d78d71d5f6a7c1f1657c93e0fcdf0067e088e","type":2,"accessList":null}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.5.0)
      at Logger.makeError (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/logger/lib/index.js:199:21)
      at Logger.throwError (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/logger/lib/index.js:208:20)
      at checkError (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:126:16)
      at JsonRpcProvider.<anonymous> (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:659:47)
      at step (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:48:23)
      at Object.throw (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:29:53)
      at rejected (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:21:65)
      at processTicksAndRejections (node:internal/process/task_queues:96:5) {
    reason: 'cannot estimate gas; transaction may fail or may require manual gas limit',
    code: 'UNPREDICTABLE_GAS_LIMIT',
    error: Error: processing response error (body="{\"jsonrpc\":\"2.0\",\"id\":54,\"error\":{\"code\":-32000,\"message\":\"gas required exceeds allowance (0)\"}}\n", error={"code":-32000}, requestBody="{\"method\":\"eth_estimateGas\",\"params\":[{\"type\":\"0x2\",\"maxFeePerGas\":\"0x9502f90e\",\"maxPriorityFeePerGas\":\"0x9502f900\",\"from\":\"0xf95d78d71d5f6a7c1f1657c93e0fcdf0067e088e\",\"data\":\"0x3d602d80600a3d3981f3363d3d373d3d3d363d73d4ea48069862de4fd64131c7f551e866873b5e475af43d82803e903d91602b57fd5bf3000000000000000000000000f95d78d71d5f6a7c1f1657c93e0fcdf0067e088e\"}],\"id\":54,\"jsonrpc\":\"2.0\"}", requestMethod="POST", url="https://rpc.l16.lukso.network", code=SERVER_ERROR, version=web/5.5.0)
        at Logger.makeError (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/logger/lib/index.js:199:21)
        at Logger.throwError (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/logger/lib/index.js:208:20)
        at /home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/web/lib/index.js:266:32
        at step (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/web/lib/index.js:33:23)
        at Object.next (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/web/lib/index.js:14:53)
        at fulfilled (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/web/lib/index.js:5:58)
        at processTicksAndRejections (node:internal/process/task_queues:96:5) {
      reason: 'processing response error',
      code: 'SERVER_ERROR',
      body: '{"jsonrpc":"2.0","id":54,"error":{"code":-32000,"message":"gas required exceeds allowance (0)"}}\n',
      error: Error: gas required exceeds allowance (0)
          at getResult (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:142:21)
          at processJsonFunc (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/web/lib/index.js:309:22)
          at /home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/web/lib/index.js:241:46
          at step (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/web/lib/index.js:33:23)
          at Object.next (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/web/lib/index.js:14:53)
          at fulfilled (/home/sagaranand/Documents/workspace-open/lukso/demo01/node_modules/@lukso/lsp-factory.js/node_modules/@ethersproject/web/lib/index.js:5:58)
          at processTicksAndRejections (node:internal/process/task_queues:96:5) {
        code: -32000,
        data: undefined
      },
      requestBody: '{"method":"eth_estimateGas","params":[{"type":"0x2","maxFeePerGas":"0x9502f90e","maxPriorityFeePerGas":"0x9502f900","from":"0xf95d78d71d5f6a7c1f1657c93e0fcdf0067e088e","data":"0x3d602d80600a3d3981f3363d3d373d3d3d363d73d4ea48069862de4fd64131c7f551e866873b5e475af43d82803e903d91602b57fd5bf3000000000000000000000000f95d78d71d5f6a7c1f1657c93e0fcdf0067e088e"}],"id":54,"jsonrpc":"2.0"}',
      requestMethod: 'POST',
      url: 'https://rpc.l16.lukso.network'
    },
    method: 'estimateGas',
    transaction: {
      from: '0xF95d78d71d5f6A7c1f1657C93E0FcDF0067e088e',
      maxPriorityFeePerGas: BigNumber { _hex: '0x9502f900', _isBigNumber: true },
      maxFeePerGas: BigNumber { _hex: '0x9502f90e', _isBigNumber: true },
      data: '0x3d602d80600a3d3981f3363d3d373d3d3d363d73d4ea48069862de4fd64131c7f551e866873b5e475af43d82803e903d91602b57fd5bf3000000000000000000000000f95d78d71d5f6a7c1f1657c93e0fcdf0067e088e',
      type: 2,
      accessList: null
    }
  },
  tx: {
    data: '0x3d602d80600a3d3981f3363d3d373d3d3d363d73d4ea48069862de4fd64131c7f551e866873b5e475af43d82803e903d91602b57fd5bf3000000000000000000000000f95d78d71d5f6a7c1f1657c93e0fcdf0067e088e',
    nonce: 0,
    from: '0xF95d78d71d5f6A7c1f1657C93E0FcDF0067e088e',
    type: 2,
    maxFeePerGas: BigNumber { _hex: '0x9502f90e', _isBigNumber: true },
    maxPriorityFeePerGas: BigNumber { _hex: '0x9502f900', _isBigNumber: true },
    gasLimit: Promise { <rejected> [Circular *1] },
    chainId: Promise { 2828 }
  }
}

Note: I can confirm that the EOA being used has the token balance of 10 LXY (can be seen here: https://explorer.execution.l16.lukso.network/address/0x174Be8Ac01Af45EcD980739d3b6a42C9fc860Cd8)

Any pointers here would be helpful. Thanks!

sagaranand015 commented 2 years ago

@Hugoo Could you please provide some insight here? Thanks!