From e1d53fe24841bf6d73d8aab3106f9e90f35d3603 Mon Sep 17 00:00:00 2001 From: Bobby Lat Date: Thu, 9 Jan 2025 17:07:13 +0800 Subject: [PATCH] refactor: accept Account or uint64 as parameter to VoterParams functions --- langspec.puya.json | 2 +- packages/algo-ts/src/op-types.ts | 4 ++-- src/awst_build/op-metadata.ts | 4 ++-- src/cli.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/langspec.puya.json b/langspec.puya.json index a50bdde4..928bfc0e 100644 --- a/langspec.puya.json +++ b/langspec.puya.json @@ -6307,7 +6307,7 @@ "stack_inputs": [ { "name": "A", - "stack_type": "any", + "stack_type": "address_or_index", "doc": null } ], diff --git a/packages/algo-ts/src/op-types.ts b/packages/algo-ts/src/op-types.ts index 590fea6c..c26c0213 100644 --- a/packages/algo-ts/src/op-types.ts +++ b/packages/algo-ts/src/op-types.ts @@ -3009,13 +3009,13 @@ export type VoterParamsType = { * Online stake in microalgos * Min AVM version: 6 */ - voterBalance(a: uint64 | bytes): readonly [uint64, boolean] + voterBalance(a: Account | uint64): readonly [uint64, boolean] /** * Had this account opted into block payouts * Min AVM version: 11 */ - voterIncentiveEligible(a: uint64 | bytes): readonly [boolean, boolean] + voterIncentiveEligible(a: Account | uint64): readonly [boolean, boolean] } /** diff --git a/src/awst_build/op-metadata.ts b/src/awst_build/op-metadata.ts index 6c23fe46..886ea525 100644 --- a/src/awst_build/op-metadata.ts +++ b/src/awst_build/op-metadata.ts @@ -4901,7 +4901,7 @@ export const OP_METADATA: Record',