Skip to content

Commit 096444b

Browse files
committed
test: add unit tests for delegate-stack-increase
1 parent 95b6908 commit 096444b

File tree

4 files changed

+521
-22
lines changed

4 files changed

+521
-22
lines changed

contrib/boot-contracts-unit-tests/contracts/indirect.clar

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@
9393
(contract-call? 'ST000000000000000000002AMW42H.pox-4 delegate-stack-extend stacker pox-addr extend-count)
9494
)
9595

96+
(define-public (delegate-stack-increase
97+
(stacker principal)
98+
(pox-addr { version: (buff 1), hashbytes: (buff 32) })
99+
(increase-by uint))
100+
(contract-call? 'ST000000000000000000002AMW42H.pox-4 delegate-stack-increase stacker pox-addr increase-by)
101+
)
102+
96103
(define-public (set-signer-key-authorization (pox-addr { version: (buff 1), hashbytes: (buff 32)})
97104
(period uint)
98105
(reward-cycle uint)

contrib/boot-contracts-unit-tests/tests/helpers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ export const delegateStackExtend = (
329329
export const delegateStackIncrease = (
330330
stacker: string,
331331
poxAddr: string,
332-
increaseBy: bigint,
332+
increaseBy: bigint | number,
333333
sender: string
334334
) => {
335335
const delegateStackIncreaseArgs = [
@@ -375,11 +375,11 @@ export const disallowContractCaller = (caller: string, sender: string) => {
375375
export const stackAggregationCommitIndexed = (
376376
stacker: StackerInfo,
377377
rewardCycle: bigint | number,
378-
period: bigint | number,
379378
maxAmount: bigint | number,
380379
authId: bigint | number,
381380
sender: string
382381
) => {
382+
const period = 1;
383383
const sigArgs = {
384384
authId,
385385
maxAmount,
@@ -412,11 +412,11 @@ export const stackAggregationIncrease = (
412412
stacker: StackerInfo,
413413
rewardCycle: bigint | number,
414414
rewardCycleIndex: bigint | number,
415-
period: bigint | number,
416415
maxAmount: bigint | number,
417416
authId: bigint | number,
418417
sender: string
419418
) => {
419+
const period = 1;
420420
const sigArgs = {
421421
authId,
422422
maxAmount,

0 commit comments

Comments
 (0)