KiiChain
  • Learn
    • What is KiiChain?
    • KiiChain
      • Vision of KiiChain
      • The Problems We Solve
      • Use Cases
      • Roadmap
      • Whitepaper
      • Business Model
    • Tokenomics
      • Intro Coin Details
      • Coin Unlocking Schedule
      • Utility
      • Evergreen Model
    • Getting Started
      • Get a Wallet
      • Download a Mobile Wallet
      • Set Up a Web Wallet
      • Connect Wallet to Explorer App
  • BUILD ON KIICHAIN
    • Developer Hub
    • Testnet Oro
    • Endpoints - Cosmos
      • EVM
        • VM
        • ERC20
        • FeeMarket
      • IBC
      • Kiichain
        • TokenFactory
      • Cosmwasm
      • Cosmos
        • Auth
        • Authz
        • Bank
        • Tendermint
        • Consensus
        • Distribution
        • Evidence
        • Feegrant
        • Gov
        • Slashing
        • Staking
        • Tx
        • Upgrade
    • Developer Tools
      • RWA Protocol
      • Rust SDK
      • JS/TS SDK
        • Kiijs-evm
        • Kiijs-proto
      • Deploy a smart contract
      • Deploy a dApp
      • Testnet faucet
    • Smart Contracts
    • Modules
      • TokenFactory
      • EVM
  • Validate the Network
    • Getting Started
      • What is a delegator?
      • What is a validator?
    • Run a Validator / Full Node
      • Getting started
      • Step-by-Step Guide
        • Becoming a Validator
        • Recovering Legacy Addresses
      • Maintaining a validator
      • Incentive
      • Technical requirements
      • Validator Security
    • Economics
      • Staking Requirements
      • Delegation / Staking
      • Rewards
      • Block Rewards Formula
      • APR
    • Delegator Information
      • Choosing a validator
      • Directives of delegators
      • Incentive to stake
      • Security considerations
      • Risks to consider
  • KII AMBASSADORS
    • What does it mean to be a KiiAmbassador?
    • Your Core Responsibilities
    • Participation Perks
    • Points System & Performance
    • How to lose the Role
    • Evaluation Process
  • KIIEX
    • Set Up KIIEX Account
      • Contact OTC Desk
    • Connect to KIIEX APIs
      • Introduction
        • New endpoints
        • Revised calls
        • Behavior Changes
        • Revised Calls 3.5.0
      • Background Information
        • Message Frame
        • Standard Response Objects and Common Error Codes
        • Modules
        • Users, Accounts, and Permissions
        • Products and Instruments
        • Quotes and Orders
        • Time– and Date-Stamp Formats
        • The Trading Day
      • Users
        • Activate2FA
        • AddUserAffiliateTag
        • Authenticate2FA
        • AuthenticateUser
        • CancelUserReport
        • GetAllUnredactedUserConfigsForUser
        • GetL2Snapshot
        • GetLevel1
        • GetUnredactedUserConfigByKey
        • GetUserAccountInfos
        • GetUserAccounts
        • GetUserAffiliateCount
        • GetUserAfilliateTag
        • GetUserConfig
        • GetUserDevices
        • GetUserReportTickets
        • GetUserReportWriterResultRecords
        • GetValidate2FARequiredEndpoints
        • LogOut
        • RegisterNewDevice
        • SubscribeAccountEvents
        • SubscribeBlockTrades
        • SuscribeLevel1
        • SubscribeLevel2
        • SubscribeTicker
        • SubscribeTrades
        • UnsuscribeBlockTrades
        • UnsubscribeLevel1
        • UnsubscribeLevel2
        • UnsubscribeTicket
        • UnsuscribeTrades
        • UpdateUserAffiliateTag
        • Validate2FA
      • Accounts
        • GetAccountInfo
        • GenerateTransactionActivityReport
        • GenerateTradeActivityReport
        • GenerateTreasuryActivityReport
        • GetAllAccountConfigs
        • GetAccountPositions
        • GetTreasuryProductsForAccount
        • ScheduleTradeActivityReport
      • Trades
        • GetAccountTrades
        • GetAccountTransactions
        • GetAllOpenTradeReports
        • GetOpenTradeReports
        • GetTickerHistory
        • GetTradesHistory
      • OMS Orders
        • CancelAllOrders
        • CancelOrder
        • CancelQuote
        • CancelReplaceOrder
        • CreateQuote
        • GetOMSFeeTiers
        • GetOpenOrders
        • GetOpenQuotes
        • GetOrderFee
        • GetOrderHistory
        • GetOrderHistoryByOrderId
        • GetOrdersHistory
        • GetOrderStatus
        • ModifyOrder
        • SendOrder
        • SubmitBlockTrade
        • UpdateQuote
      • Products
        • GetProduct
        • GetProducts
      • Instruments
        • GetInstrument
        • GetInstruments
      • Tickets
        • CreateDepositTicket
        • CancelWithdraw
        • CreateWithdrawTicket
        • Deposit withdraw template
        • GetAccountDepositTransactions
        • GetAccountWithdrawTransactions
        • GetAllDepositRequestInfoTemplates
        • GetDeposits
        • GetDepositInfo
        • GetDepositTicket
        • GetDepositRequestInfoTemplate
        • GetOMSWithdrawFees
        • GetStandardTemplateExample
        • GetTetherRPCWithdrawTemplateExample
        • GetWithdrawFee
        • GetWithdraws
        • GetWithdrawTemplate
        • GetWithdrawTemplateTypes
        • GetWithdrawTicket
        • GetWithdrawTickets
        • SubmitDepositTicketComment
        • SubmitWithdrawTicketComment
      • Misc
        • Ping
Powered by GitBook
LogoLogo
On this page
Export as PDF
  1. BUILD ON KIICHAIN
  2. Endpoints - Cosmos

Cosmwasm

PreviousTokenFactoryNextCosmos

Last updated 23 days ago

Codes gets the metadata for all stored wasm codes

get
Query parameters
pagination.keyanyOptional

key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offsetanyOptional

offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limitanyOptional

limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_totalanyOptional

count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.

pagination.reverseanyOptional

reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Responses
200
A successful response.
application/json
default
An unexpected error response.
application/json
get
GET /cosmwasm/wasm/v1/code HTTP/1.1
Host: lcd.uno.sentry.testnet.v3.kiivalidator.com
Accept: */*
{
  "code_infos": [
    {
      "code_id": "text",
      "creator": "text",
      "data_hash": "Ynl0ZXM=",
      "instantiate_permission": {
        "permission": "ACCESS_TYPE_UNSPECIFIED",
        "addresses": [
          "text"
        ]
      }
    }
  ],
  "pagination": {
    "next_key": "Ynl0ZXM=",
    "total": "text"
  }
}

Code gets the binary code and metadata for a singe wasm code

get
Path parameters
code_idanyRequired
Responses
200
A successful response.
application/json
default
An unexpected error response.
application/json
get
GET /cosmwasm/wasm/v1/code/{code_id} HTTP/1.1
Host: lcd.uno.sentry.testnet.v3.kiivalidator.com
Accept: */*
{
  "code_info": {
    "code_id": "text",
    "creator": "text",
    "data_hash": "Ynl0ZXM=",
    "instantiate_permission": {
      "permission": "ACCESS_TYPE_UNSPECIFIED",
      "addresses": [
        "text"
      ]
    }
  },
  "data": "Ynl0ZXM="
}

ContractsByCode lists all smart contracts for a code id

get
Path parameters
code_idanyRequired
Query parameters
pagination.keyanyOptional

key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offsetanyOptional

offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limitanyOptional

limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_totalanyOptional

count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.

pagination.reverseanyOptional

reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Responses
200
A successful response.
application/json
default
An unexpected error response.
application/json
get
GET /cosmwasm/wasm/v1/code/{code_id}/contracts HTTP/1.1
Host: lcd.uno.sentry.testnet.v3.kiivalidator.com
Accept: */*
{
  "contracts": [
    "text"
  ],
  "pagination": {
    "next_key": "Ynl0ZXM=",
    "total": "text"
  }
}

Params gets the module params

get
Responses
200
A successful response.
application/json
default
An unexpected error response.
application/json
get
GET /cosmwasm/wasm/v1/codes/params HTTP/1.1
Host: lcd.uno.sentry.testnet.v3.kiivalidator.com
Accept: */*
{
  "params": {
    "code_upload_access": {
      "permission": "ACCESS_TYPE_UNSPECIFIED",
      "addresses": [
        "text"
      ]
    },
    "instantiate_default_permission": "ACCESS_TYPE_UNSPECIFIED"
  }
}

PinnedCodes gets the pinned code ids

get
Query parameters
pagination.keyanyOptional

key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offsetanyOptional

offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limitanyOptional

limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_totalanyOptional

count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.

pagination.reverseanyOptional

reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Responses
200
A successful response.
application/json
default
An unexpected error response.
application/json
get
GET /cosmwasm/wasm/v1/codes/pinned HTTP/1.1
Host: lcd.uno.sentry.testnet.v3.kiivalidator.com
Accept: */*
{
  "code_ids": [
    "text"
  ],
  "pagination": {
    "next_key": "Ynl0ZXM=",
    "total": "text"
  }
}

BuildAddress builds a contract address

get
Query parameters
code_hashanyOptional

CodeHash is the hash of the code.

creator_addressanyOptional

CreatorAddress is the address of the contract instantiator.

saltanyOptional

Salt is a hex encoded salt.

init_argsanyOptional

InitArgs are optional json encoded init args to be used in contract address building if provided.

Responses
200
A successful response.
application/json
default
An unexpected error response.
application/json
get
GET /cosmwasm/wasm/v1/contract/build_address HTTP/1.1
Host: lcd.uno.sentry.testnet.v3.kiivalidator.com
Accept: */*
{
  "address": "text"
}

ContractInfo gets the contract meta data

get
Path parameters
addressanyRequired

address is the address of the contract to query

Responses
200
A successful response.
application/json
default
An unexpected error response.
application/json
get
GET /cosmwasm/wasm/v1/contract/{address} HTTP/1.1
Host: lcd.uno.sentry.testnet.v3.kiivalidator.com
Accept: */*
{
  "address": "text",
  "contract_info": {
    "code_id": "text",
    "creator": "text",
    "admin": "text",
    "label": "text",
    "created": {
      "block_height": "text",
      "tx_index": "text"
    },
    "ibc_port_id": "text",
    "extension": {
      "type_url": "text",
      "value": "Ynl0ZXM="
    }
  }
}

ContractHistory gets the contract code history

get
Path parameters
addressanyRequired

address is the address of the contract to query

Query parameters
pagination.keyanyOptional

key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offsetanyOptional

offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limitanyOptional

limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_totalanyOptional

count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.

pagination.reverseanyOptional

reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Responses
200
A successful response.
application/json
default
An unexpected error response.
application/json
get
GET /cosmwasm/wasm/v1/contract/{address}/history HTTP/1.1
Host: lcd.uno.sentry.testnet.v3.kiivalidator.com
Accept: */*
{
  "entries": [
    {
      "operation": "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED",
      "code_id": "text",
      "updated": {
        "block_height": "text",
        "tx_index": "text"
      },
      "msg": "Ynl0ZXM="
    }
  ],
  "pagination": {
    "next_key": "Ynl0ZXM=",
    "total": "text"
  }
}

RawContractState gets single key from the raw store data of a contract

get
Path parameters
addressanyRequired

address is the address of the contract

query_dataanyRequired
Responses
200
A successful response.
application/json
default
An unexpected error response.
application/json
get
GET /cosmwasm/wasm/v1/contract/{address}/raw/{query_data} HTTP/1.1
Host: lcd.uno.sentry.testnet.v3.kiivalidator.com
Accept: */*
{
  "data": "Ynl0ZXM="
}

SmartContractState get smart query result from the contract

get
Path parameters
addressanyRequired

address is the address of the contract

query_dataanyRequired

QueryData contains the query data passed to the contract

Responses
200
A successful response.
application/json
default
An unexpected error response.
application/json
get
GET /cosmwasm/wasm/v1/contract/{address}/smart/{query_data} HTTP/1.1
Host: lcd.uno.sentry.testnet.v3.kiivalidator.com
Accept: */*
{
  "data": "Ynl0ZXM="
}

AllContractState gets all raw store data for a single contract

get
Path parameters
addressanyRequired

address is the address of the contract

Query parameters
pagination.keyanyOptional

key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offsetanyOptional

offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limitanyOptional

limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_totalanyOptional

count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.

pagination.reverseanyOptional

reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Responses
200
A successful response.
application/json
default
An unexpected error response.
application/json
get
GET /cosmwasm/wasm/v1/contract/{address}/state HTTP/1.1
Host: lcd.uno.sentry.testnet.v3.kiivalidator.com
Accept: */*
{
  "models": [
    {
      "key": "Ynl0ZXM=",
      "value": "Ynl0ZXM="
    }
  ],
  "pagination": {
    "next_key": "Ynl0ZXM=",
    "total": "text"
  }
}

ContractsByCreator gets the contracts by creator

get
Path parameters
creator_addressanyRequired

CreatorAddress is the address of contract creator

Query parameters
pagination.keyanyOptional

key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.

pagination.offsetanyOptional

offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.

pagination.limitanyOptional

limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.

pagination.count_totalanyOptional

count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.

pagination.reverseanyOptional

reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

Responses
200
A successful response.
application/json
default
An unexpected error response.
application/json
get
GET /cosmwasm/wasm/v1/contracts/creator/{creator_address} HTTP/1.1
Host: lcd.uno.sentry.testnet.v3.kiivalidator.com
Accept: */*
{
  "contract_addresses": [
    "text"
  ],
  "pagination": {
    "next_key": "Ynl0ZXM=",
    "total": "text"
  }
}
  • GETCodes gets the metadata for all stored wasm codes
  • GETCode gets the binary code and metadata for a singe wasm code
  • GETContractsByCode lists all smart contracts for a code id
  • GETParams gets the module params
  • GETPinnedCodes gets the pinned code ids
  • GETBuildAddress builds a contract address
  • GETContractInfo gets the contract meta data
  • GETContractHistory gets the contract code history
  • GETRawContractState gets single key from the raw store data of a contract
  • GETSmartContractState get smart query result from the contract
  • GETAllContractState gets all raw store data for a single contract
  • GETContractsByCreator gets the contracts by creator