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 Market

Ticket Market

readSaleInfo

Read information of sale

import { readSaleInfo } from "derivstudio/cds";
let queryTransaction = readSaleInfo(_owner,_token,_token_id);
let ret = sdk.query(queryTransaction);

** Request **

Params

Type

Description

_owner

address

owner

_token

address

nft contract address

_token_id

uint256

token id

** Response **

Params

Type

Description

payToken

address

base token

price

uint256

sale price

term

uint256

rent term (s)

amount

uint256

rent amount at the time of rental

rental

bool

true: rent ,false: sell

readFeeReceiver

Read the address for collecting service fee

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

** Response **

Params

Type

Description

feeReceiver

address

fee receiver

readFeeRate

Read the fee rate

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

** Response **

Params

Type

Description

feeRate

uint256

fee rate,decimals=4

readAllowToken

Read whether to pay tokens

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

** Request **

Params

Type

Description

_token

address

tolen address

** Response **

Params

Type

Description

isPayToken

boolean

is pay token

Make

Rent or sell the NFT

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

Params

Type

Description

_token

address

pending order adress of nft

_tokenId

uint256

nft tokenId

_payToken

address

pay token

_price

uint256

pay price

_amount

uint256

pending oder amount of nft,if it is erc721, show 1

_term

uint256

rent term (s),sell is 0

_rental

bool

true means rent,false means sell

Take

Rent or sell the NFT

import { take } from "derivstudio/market";
let transaction = take(_seller,_token,_tokenId);

Params

Type

Description

_seller

address

address of renter

_token

address

nft address

_tokenId

uint256

nft tokenId

Cancel

Cancel the rent or sale of the ticket

import { cancel } from "derivstudio/market";
let transaction = cancel(_seller,_token,_tokenId);

Params

Type

Description

_seller

address

renter address

_token

address

nft address

_tokenId

uint256

nft tokenId

PreviousTicketNextTicket Sale

Last updated 1 year ago