Skip to content

02QueryingCosmWasm

Shane K Moore edited this page Mar 25, 2023 · 6 revisions

Querying CosmWasm smart contracts

  • get the query string payload for getting the allowance for a contract
import { QueryContractAllowance } from '@injectivelabs/sdk-ts'

const query = new QueryContractAllowance({}).toPayload()

console.log(query)
  • get the query string payload for getting contract state from chain grpc wasm api
import { QueryContractConfig } from '@injectivelabs/sdk-ts'

const query = new QueryContractConfig({}).toPayload()

console.log(query)
  • get the query string payload for getting contract marketing info
import { QueryContractMarketingInfo } from '@injectivelabs/sdk-ts'

const query = new QueryContractMarketingInfo({}).toPayload()

console.log(query)
  • get the query string payload for getting locked lp funds
import { QueryLockedLpFunds } from '@injectivelabs/sdk-ts'

const query = new QueryLockedLpFunds({}).toPayload()

console.log(query)
  • get the query string payload for getting registered contract vaults from the wasm rest client
import { QueryRegisteredVaults } from '@injectivelabs/sdk-ts'

const query = new QueryRegisteredVaults({}).toPayload()

console.log(query)
  • get the query string payload for getting the vault market id
import { QueryVaultMarketId } from '@injectivelabs/sdk-ts'

const query = new QueryVaultMarketId({}).toPayload()

console.log(query)
  • get the query string payload for getting the vault total LP supply
import { QueryVaultTotalLpSupply } from '@injectivelabs/sdk-ts'

const query = new QueryVaultTotalLpSupply({}).toPayload()

console.log(query)

⚠️ DOCUMENTATION ⚠️

Clone this wiki locally