/cosmwasm/wasm/v1/code REST API Endpoint | Injective Docs
/cosmwasm/wasm/v1/code REST API Endpoint
Gets the metadata for all stored wasm codes. The API credit 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 codecreator
string
The address of the account that uploaded the smart contract codedata_hash
string
A hash of the uploaded smart contract code, used for verification and integrity checkinginstantiate_permission
object
Contains information about who has permission to instantiate (deploy) the contractpermission
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
- addresses
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
- total
Request
Curl
curl --location 'https://docs-demo.injective-testnet.quiknode.pro/cosmwasm/wasm/v1/code'
curl --location 'https://docs-demo.injective-testnet.quiknode.pro/cosmwasm/wasm/v1/code'
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));
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)
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)
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
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