Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update wasm endpoint for non-classic chain cosmwasm chain #16

Closed
y-pakorn opened this issue Jun 1, 2022 · 2 comments
Closed

Update wasm endpoint for non-classic chain cosmwasm chain #16

y-pakorn opened this issue Jun 1, 2022 · 2 comments

Comments

@y-pakorn
Copy link

y-pakorn commented Jun 1, 2022

Current pisco-1 testnet hive is using the old Terra wasm endpoint /terra/wasm/v1beta1/ causing wasm query to fail and return Not Implemented error. The non-classic chain should use the direct cosmwasm endpoint /cosmwasm/wasm/v1/.

This query on testnet hive will fail with such error.

{
  wasm {
    codeInfo(codeID: 12) {
      code_creator
    }
  }
}
{
  "errors": [
    {
      "message": "[Not Implemented] error",
      "locations": [
        {
          "line": 3,
          "column": 5
        }
      ],
      "path": [
        "wasm",
        "codeInfo"
      ],
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "exception": {
          "status": 501,
          "name": "LCDClientError",
          "message": "[Not Implemented] error",
          "stacktrace": [
            "LCDClientError: [Not Implemented] error",
            "    at WasmService.codeInfo (/app/dist/wasm/wasm.service.js:36:19)",
            "    at runMicrotasks (<anonymous>)",
            "    at processTicksAndRejections (internal/process/task_queues.js:95:5)",
            "    at async target (/app/node_modules/@nestjs/core/helpers/external-context-creator.js:77:28)"
          ]
        }
      }
    }
  ],
  "data": null
}
@hanjukim
Copy link
Contributor

hanjukim commented Jun 3, 2022

@y-pakorn It's been fixed by #18 and deployed to pisco-hive.terra.dev

@hanjukim
Copy link
Contributor

hanjukim commented Jun 3, 2022

{
  wasm {
    codeInfo(codeID: 12) {
      code_creator
    }
  }
}

Now returns,

{
  "data": {
    "wasm": {
      "codeInfo": {
        "code_creator": "terra1em2sanwzpv5226dxlp3rwf765r7x5gvrqfdk7p"
      }
    }
  }
}

As expected.

@hanjukim hanjukim closed this as completed Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants