# /cosmwasm/wasm/v1/code REST API Endpoint

#### Gets the metadata for all stored wasm codes. The [API credit](/content/api-credits/INJ/index.html) value for this method is 20.

Updated on

Jun 28, 2025

### Parameters

This method does not accept any parameters

### Returns

code_infos

array

An array of code_infos which contains the following fields:

- **code_id**  
  string  
  A unique identifier for the uploaded smart contract code

- **creator**  
  string  
  The address of the account that uploaded the smart contract code

- **data_hash**  
  string  
  A hash of the uploaded smart contract code, used for verification and integrity checking

- **instantiate_permission**  
  object  
  Contains information about who has permission to instantiate (deploy) the contract

- **permission**  
    string  
    Specifies who can instantiate the contract
  
  - **addresses**  
    array  
    If the permission is set to OnlyAddress, this field specifies the address that has permission to instantiate the contract

- **pagination**  
  object  
  The pagination object which contains the following fields:

- **next_key**  
    string  
    The key to be passed to PageRequest.key to query the next page most efficiently
  
  - **total**  
    string  
    The total number of results available if PageRequest.count_total was set, its value is undefined otherwise

### Request

Curl

```bash
curl --location 'https://docs-demo.injective-testnet.quiknode.pro/cosmwasm/wasm/v1/code'
```

```bash
curl --location 'https://docs-demo.injective-testnet.quiknode.pro/cosmwasm/wasm/v1/code'
```

```javascript
const requestOptions = {
    method: "GET",
    redirect: "follow"
};

fetch("https://docs-demo.injective-testnet.quiknode.pro/cosmwasm/wasm/v1/code", requestOptions)
    .then((response) => response.text())
    .then((result) => console.log(result))
    .catch((error) => console.error(error));
```

```javascript
const requestOptions = {
    method: "GET",
    redirect: "follow"
};

```python
import requests

url = "https://docs-demo.injective-testnet.quiknode.pro/cosmwasm/wasm/v1/code"

payload = {}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
```

```python
import requests

url = "https://docs-demo.injective-testnet.quiknode.pro/cosmwasm/wasm/v1/code"

payload = {}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
```

```ruby
require "uri"
require "net/http"

url = URI("https://docs-demo.injective-testnet.quiknode.pro/cosmwasm/wasm/v1/code")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body
```

```ruby
require "uri"
require "net/http"

url = URI("https://docs-demo.injective-testnet.quiknode.pro/cosmwasm/wasm/v1/code")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Get.new(url)

response = https.request(request)
puts response.read_body
```
