Skip to content

Commit f6c575e

Browse files
authored
docs(referenda): fix curve threshold docs (#48)
1 parent 65c189d commit f6c575e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/pages/sdks/governance/referenda.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,15 @@ Then for both `minApproval` and `minSupport` curves, it adds functions to get th
172172
// Raw curve data (LinearDescending, SteppedDecreasing or Reciprocal with parameters)
173173
console.log(track.curve)
174174

175-
// Get the threshold [0-1] value when time is at 10th block.
175+
// Get the threshold value (in perbillion, [0n - 1_000_000_000n]) when time is at 10th block.
176176
console.log(track.getThreshold(10))
177177

178178
// Get the first block at which the threshold 50% happens
179-
// Returns -Infinity if the curve starts at a lower threshold (meaning it has reached the threshold since the beginning)
180179
// Returns +Infinity if the curve ends at a higher threshold (meaning it will never reach the threshold)
181-
console.log(track.getBlock(0.5))
180+
console.log(track.getBlock(500_000_000n))
182181

183182
// Get Array<{ block:number, threshold: number }> needed to draw a chart.
183+
// The threshold is in the range from 0 to 1 (0% and 100% respectively).
184184
// It will have the minimum amount of datapoints needed to draw a line chart.
185185
console.log(track.getData())
186186
```

0 commit comments

Comments
 (0)