ClearDAO FAQ
  • Getting Started
    • How it Works
    • Product
    • Roadmap
    • Team
    • ClearDAO Token
    • ClearDAO Token Bridge
    • Contact
  • Development Resources
    • SDK
      • ClearDAO Developer Guide
      • Deploy Contracts
        • Options and Notes
          • Quick Start
          • Configure Contract
          • Contract Upgrade
          • Contract Address
        • TRS
      • Configure Contract Parameters
      • Interact With Contracts
        • Options
        • Notes
        • TRS
        • CDS
          • README
          • CDS Buyer
          • Challenger
          • Liquidity Provider
          • Ticket
          • Ticket Market
          • Ticket Sale
          • Seller
      • Contract Reference
        • Oracle
        • Index Contract
        • Option Contract
        • Market Maker Contract
        • Note Contract
      • APIs
        • CDS
          • Config
          • Ticket
          • Ticket Sale
          • Transaction
          • CDS Market
          • Issue CDS
          • CDS Category
          • Ticket Market
        • Options and Notes
          • Configure
          • Price
          • User
          • Index
          • Option Parameter Configuration
          • Faucet
          • Market Maker
        • TRS
        • CLEARIndex
    • Barrier Options
    • NFT Marketplace
    • ClearIndex
  • Governance
    • CLH Staking Module
Powered by GitBook
On this page
  1. Development Resources
  2. SDK
  3. Interact With Contracts
  4. CDS

Ticket Sale

Ticket Sale

readStageInfo

Read NFT primary market information for tickets trading

import { readStageInfo } from "derivstudio/cds";
let queryTransaction = readStageInfo(_stageNum);
let ret = sdk.query(queryTransaction);

** Request **

Params

Type

Description

_stageNum

uint256

stage num

** Response **

Params

Type

Description

prices

uint256[3][3]

prices[0][0]:pay tokens 0,available times 1 ticket price;prices[0][1]:pay tokens 1,available times 1 ticket price ;prices[0][2]:main chain tokens, available times1 ticket price; and so on

remaining

uint256[3]

0:available times1 tikcet balance;1:avallable times 2 tikcet balance ;2:available 3 tikcet balance

payToken

address[2]

pay token0,paytoken1

sale

boolean

on selling

Buy

Buy a ticket

import { buy } from "derivstudio/market";
let transaction = buy(_stageNum,_catId,_tokenIndex);

Params

Type

Description

_stageNum

uint256

sell id,the default is 11

_catId

uint8

ticket times,1-3

_tokenIndex

uint8

Payment token identification,0: token 1,1: token2,2:main chain token

PreviousTicket MarketNextSeller

Last updated 1 year ago