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?

Last updated