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

Challenger

Challenger

readChallengeInfo

Read the information about the liquidity provider of the CDS

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

** Request **

Params

Type

Description

_eventId

uint256

event id

**Response **

Params

Type

Description

turnover

uint256

User turnover amount

readchallengeUser

Read challenger‘s collateral

import { readchallengeUser } from "derivstudio/cds";
let queryTransaction = readchallengeUser(_eventId,_user);
let ret = sdk.query(queryTransaction);

** Request **

Params

Type

Description

_eventId

uint256

event id

_user

address

user address

** Response **

Params

Type

Description

amount

uint256

user's collateral

Challenge

Liquidity providers or buyers of cds challenge the result (credit margin is required)

import { challenge } from "derivstudio/cds";
let transaction = challenge(_eventId,_isBuyer);

Params

Type

Description

_eventId

uint256

cds event id

_isBuyer

boolean

is buyer user

Confirm

DAO administrators confirm results

import { confirm } from "derivstudio/cds";
let transaction = confirm(_eventId,_occur);

Params

Type

Description

_eventId

uint256

cds event id

_occur

boolean

cds event occur or not?

PreviousCDS BuyerNextLiquidity Provider

Last updated 1 year ago