buildChallengeScript
@totemsdk/kissvm / buildChallengeScript
Function: buildChallengeScript()
buildChallengeScript(
config):string
Build a challenge/slash script that enforces:
- Only a challenger can file during the challenge window
- Challenger must post a dispute bond
- Governor adjudicates (uphold → slash bond, dismiss → return bond)
- Slashed funds are distributed (challenger reward + treasury)
Port layout: 0 — challenge status (0=none, 1=filed, 2=upheld, 3=dismissed) 1 — challenger pk hex 2 — dispute bond amount 3 — adjudication deadline block 4 — challenger reward share (basis points)
Parameters
config
adjudicationBlocks
bigint
challengerRewardBps
number
disputeBondAmount
string
governancePk
string
treasuryPk
string
Returns
string