> ## Documentation Index
> Fetch the complete documentation index at: https://injectivelabs-docs-ai-sdk.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# WasmX

Example code snippets to query the wasmX module on chain

## Using gRPC

### Fetch parameters related to the wasmX module

```ts theme={null}
import { ChainGrpcWasmXApi } from "@injectivelabs/sdk-ts/client/chain";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";

const endpoints = getNetworkEndpoints(Network.Testnet);
const chainGrpcWasmXApi = new ChainGrpcWasmXApi(endpoints.grpc);

const moduleParams = await chainGrpcWasmXApi.fetchModuleParams();

console.log(moduleParams);
```

### Fetch the wasmX module state

```ts theme={null}
import { ChainGrpcWasmXApi } from "@injectivelabs/sdk-ts/client/chain";
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";

const endpoints = getNetworkEndpoints(Network.Testnet);
const chainGrpcWasmXApi = new ChainGrpcWasmXApi(endpoints.grpc);

const moduleState = await chainGrpcWasmXApi.fetchModuleState();

console.log(moduleState);
```
