From 36a166188aebafb245a6c755e8fefa5026be4f68 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Tue, 12 Nov 2024 16:55:34 +1000 Subject: [PATCH 01/30] feat: Support property checks and spreading of arc4 structs --- package.json | 2 +- packages/algo-ts/src/arc4/encoded-types.ts | 26 +- src/awst_build/eb/arc4/struct.ts | 33 ++- src/awst_build/type-resolver.ts | 5 + tests/approvals/arc4-struct.algo.ts | 6 + tests/approvals/named-types.algo.ts | 2 + .../out/arc4-struct/StructDemo.approval.teal | 122 +++++++++ .../out/arc4-struct/StructDemo.clear.teal | 5 + .../out/arc4-struct/StructDemo.ssa.ir | 127 ++++++++++ .../out/arc4-struct/arc4-struct.awst.json | 3 +- .../out/named-types/MyContract.approval.teal | 219 ++++++++++++++++ .../out/named-types/MyContract.arc32.json | 52 +++- .../out/named-types/MyContract.clear.teal | 5 + .../out/named-types/MyContract.ssa.ir | 65 +++-- .../out/named-types/named-types.awst | 8 +- .../out/named-types/named-types.awst.json | 237 +++++++++++++++--- 16 files changed, 840 insertions(+), 77 deletions(-) create mode 100644 tests/approvals/out/arc4-struct/StructDemo.approval.teal create mode 100644 tests/approvals/out/arc4-struct/StructDemo.clear.teal create mode 100644 tests/approvals/out/arc4-struct/StructDemo.ssa.ir create mode 100644 tests/approvals/out/named-types/MyContract.approval.teal create mode 100644 tests/approvals/out/named-types/MyContract.clear.teal diff --git a/package.json b/package.json index 7ddfacb8..07a2463f 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dev:examples": "tsx src/cli.ts build examples --output-awst --output-awst-json", "dev:approvals": "rimraf tests/approvals/out && tsx src/cli.ts build tests/approvals --output-awst --output-awst-json --no-output-teal --output-ssa-ir --out-dir out/[name]", "dev:expected-output": "tsx src/cli.ts build tests/expected-output --dry-run", - "dev:testing": "tsx src/cli.ts build tests/approvals/pre-approved-sale.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name]", + "dev:testing": "tsx src/cli.ts build tests/approvals/arc4-struct.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name]", "audit": "better-npm-audit audit", "format": "prettier --write .", "lint": "eslint \"src/**/*.ts\"", diff --git a/packages/algo-ts/src/arc4/encoded-types.ts b/packages/algo-ts/src/arc4/encoded-types.ts index 3559af29..fdc35a14 100644 --- a/packages/algo-ts/src/arc4/encoded-types.ts +++ b/packages/algo-ts/src/arc4/encoded-types.ts @@ -8,8 +8,10 @@ export type BitSize = 8 | 16 | 32 | 64 | 128 | 256 | 512 type NativeForArc4Int = N extends 8 | 16 | 32 | 64 ? uint64 : biguint type CompatForArc4Int = N extends 8 | 16 | 32 | 64 ? Uint64Compat : BigUintCompat +const TypeProperty = Symbol('ARC4Type') + abstract class ARC4Encoded implements BytesBacked { - abstract __type?: string + abstract [TypeProperty]?: string get bytes(): bytes { throw new Error('todo') } @@ -20,7 +22,7 @@ abstract class ARC4Encoded implements BytesBacked { } export class Str extends ARC4Encoded { - __type?: 'arc4.Str' + [TypeProperty]?: 'arc4.Str' #value: string constructor(s?: StringCompat) { super() @@ -31,7 +33,7 @@ export class Str extends ARC4Encoded { } } export class UintN extends ARC4Encoded { - __type?: `arc4.UintN<${N}>` + [TypeProperty]?: `arc4.UintN<${N}>` constructor(v?: CompatForArc4Int) { super() @@ -41,7 +43,7 @@ export class UintN extends ARC4Encoded { } } export class UFixedNxM extends ARC4Encoded { - __type?: `arc4.UFixedNxM<${N}x${M}>` + [TypeProperty]?: `arc4.UFixedNxM<${N}x${M}>` constructor(v: `${number}.${number}`, n?: N, m?: M) { super() } @@ -57,7 +59,7 @@ export class Byte extends UintN<8> { } } export class Bool { - __type?: `arc4.Bool` + [TypeProperty]?: `arc4.Bool` #v: boolean constructor(v?: boolean) { this.#v = v ?? false @@ -166,7 +168,7 @@ abstract class Arc4ReadonlyArray extends ARC4Encoded } export class StaticArray extends Arc4ReadonlyArray { - __type?: `arc4.StaticArray<${TItem['__type']}, ${TLength}>` + [TypeProperty]?: `arc4.StaticArray<${TItem[typeof TypeProperty]}, ${TLength}>` constructor() constructor(...items: TItem[] & { length: TLength }) constructor(...items: TItem[]) @@ -180,7 +182,7 @@ export class StaticArray exte } export class DynamicArray extends Arc4ReadonlyArray { - __type?: `arc4.DynamicArray<${TItem['__type']}>` + [TypeProperty]?: `arc4.DynamicArray<${TItem[typeof TypeProperty]}>` constructor(...items: TItem[]) { super(items) } @@ -208,12 +210,12 @@ export class DynamicArray extends Arc4ReadonlyArray = T extends [infer T1 extends ARC4Encoded, ...infer TRest extends ARC4Encoded[]] ? TRest extends [] - ? `${T1['__type']}` - : `${T1['__type']},${ExpandTupleType}` + ? `${T1[typeof TypeProperty]}` + : `${T1[typeof TypeProperty]},${ExpandTupleType}` : '' export class Tuple extends ARC4Encoded { - __type?: `arc4.Tuple<${ExpandTupleType}>` + [TypeProperty]?: `arc4.Tuple<${ExpandTupleType}>` #items: TTuple constructor(...items: TTuple) { super() @@ -234,7 +236,7 @@ export class Tuple extends ARC4E } export class Address extends Arc4ReadonlyArray { - __type?: `arc4.Address` + [TypeProperty]?: `arc4.Address` constructor(value?: Account | string | bytes) { let byteValues: Uint8Array if (value === undefined) { @@ -259,7 +261,7 @@ export class Address extends Arc4ReadonlyArray { type StructConstraint = Record class StructBase extends ARC4Encoded { - __type = 'arc4.Struct' + [TypeProperty] = 'arc4.Struct' } class StructImpl extends StructBase { constructor(initial: T) { diff --git a/src/awst_build/eb/arc4/struct.ts b/src/awst_build/eb/arc4/struct.ts index c25ed9f2..e9eb476e 100644 --- a/src/awst_build/eb/arc4/struct.ts +++ b/src/awst_build/eb/arc4/struct.ts @@ -2,10 +2,11 @@ import { nodeFactory } from '../../../awst/node-factory' import type { Expression } from '../../../awst/nodes' import type { SourceLocation } from '../../../awst/source-location' import { invariant } from '../../../util' -import type { PType } from '../../ptypes' +import type { PType, PTypeOrClass } from '../../ptypes' +import { ObjectPType } from '../../ptypes' import { ARC4StructClass, ARC4StructType } from '../../ptypes/arc4-types' import { instanceEb } from '../../type-registry' -import type { InstanceBuilder } from '../index' +import { InstanceBuilder } from '../index' import { NodeBuilder } from '../index' import { requireExpressionOfType } from '../util' import { parseFunctionArgs } from '../util/arg-parsing' @@ -53,6 +54,10 @@ export class StructExpressionBuilder extends Arc4EncodedBaseExpressionBuilder = {} for (const prop of tsType.getProperties()) { + if (prop.name.startsWith('__@')) { + // Symbol property - ignore + // TODO: Check AST nodes to confirm? + continue + } const type = this.checker.getTypeOfSymbol(prop) const ptype = this.resolveType(type, sourceLocation) if (ptype.singleton) { diff --git a/tests/approvals/arc4-struct.algo.ts b/tests/approvals/arc4-struct.algo.ts index d0b64d51..ff0f9e62 100644 --- a/tests/approvals/arc4-struct.algo.ts +++ b/tests/approvals/arc4-struct.algo.ts @@ -21,4 +21,10 @@ class StructDemo extends Contract { y: new ARC4Uint64(v1.y.native + v2.y.native), }) } + + // TODO: Uncomment once puya supports ARC4Decode() on structs + // public implicitCastingAndSpreading(v1: Vector) { + // const v2 = new Vector(v1) + // const v3 = new Vector({ ...v2 }) + // } } diff --git a/tests/approvals/named-types.algo.ts b/tests/approvals/named-types.algo.ts index 5f9e767c..1bb387d8 100644 --- a/tests/approvals/named-types.algo.ts +++ b/tests/approvals/named-types.algo.ts @@ -40,6 +40,8 @@ export class MyContract extends Contract { } } + public test(x: XY, y: YX) {} + public testing() { const a = this.getXY() const b = this.getYX() diff --git a/tests/approvals/out/arc4-struct/StructDemo.approval.teal b/tests/approvals/out/arc4-struct/StructDemo.approval.teal new file mode 100644 index 00000000..6c6e2b86 --- /dev/null +++ b/tests/approvals/out/arc4-struct/StructDemo.approval.teal @@ -0,0 +1,122 @@ +#pragma version 10 + +tests/approvals/arc4-struct.algo.ts::StructDemo.approvalProgram: + intcblock 1 0 + bytecblock 0x0000000000000000 + callsub __puya_arc4_router__ + return + + +// tests/approvals/arc4-struct.algo.ts::StructDemo.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + proto 0 1 + txn NumAppArgs + bz __puya_arc4_router___bare_routing@6 + pushbytess 0x89388ddd 0xef322d6d // method "testVectorCreationAndEquality()void", method "addVectors((uint64,uint64),(uint64,uint64))(uint64,uint64)" + txna ApplicationArgs 0 + match __puya_arc4_router___testVectorCreationAndEquality_route@2 __puya_arc4_router___addVectors_route@3 + intc_1 // 0 + retsub + +__puya_arc4_router___testVectorCreationAndEquality_route@2: + // tests/approvals/arc4-struct.algo.ts:10 + // public testVectorCreationAndEquality() { + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub testVectorCreationAndEquality + intc_0 // 1 + retsub + +__puya_arc4_router___addVectors_route@3: + // tests/approvals/arc4-struct.algo.ts:18 + // public addVectors(v1: Vector, v2: Vector) { + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + txna ApplicationArgs 1 + txna ApplicationArgs 2 + // tests/approvals/arc4-struct.algo.ts:18 + // public addVectors(v1: Vector, v2: Vector) { + callsub addVectors + pushbytes 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___bare_routing@6: + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + txn OnCompletion + bnz __puya_arc4_router___after_if_else@10 + txn ApplicationID + ! + assert // is creating + intc_0 // 1 + retsub + +__puya_arc4_router___after_if_else@10: + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + intc_1 // 0 + retsub + + +// tests/approvals/arc4-struct.algo.ts::StructDemo.testVectorCreationAndEquality() -> void: +testVectorCreationAndEquality: + // tests/approvals/arc4-struct.algo.ts:10 + // public testVectorCreationAndEquality() { + proto 0 0 + // tests/approvals/arc4-struct.algo.ts:12 + // log(v1.x) + bytec_0 // 0x0000000000000000 + log + // tests/approvals/arc4-struct.algo.ts:13 + // log(v1.y) + bytec_0 // 0x0000000000000000 + log + retsub + + +// tests/approvals/arc4-struct.algo.ts::StructDemo.addVectors(v1: bytes, v2: bytes) -> bytes: +addVectors: + // tests/approvals/arc4-struct.algo.ts:18 + // public addVectors(v1: Vector, v2: Vector) { + proto 2 1 + // tests/approvals/arc4-struct.algo.ts:20 + // x: new ARC4Uint64(v1.x.native + v2.x.native), + frame_dig -2 + extract 0 8 // on error: Index access is out of bounds + btoi + frame_dig -1 + extract 0 8 // on error: Index access is out of bounds + btoi + + + itob + // tests/approvals/arc4-struct.algo.ts:21 + // y: new ARC4Uint64(v1.y.native + v2.y.native), + frame_dig -2 + extract 8 8 // on error: Index access is out of bounds + btoi + frame_dig -1 + extract 8 8 // on error: Index access is out of bounds + btoi + + + itob + // tests/approvals/arc4-struct.algo.ts:19-22 + // return new Vector({ + // x: new ARC4Uint64(v1.x.native + v2.x.native), + // y: new ARC4Uint64(v1.y.native + v2.y.native), + // }) + concat + retsub diff --git a/tests/approvals/out/arc4-struct/StructDemo.clear.teal b/tests/approvals/out/arc4-struct/StructDemo.clear.teal new file mode 100644 index 00000000..a4fb2c83 --- /dev/null +++ b/tests/approvals/out/arc4-struct/StructDemo.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/arc4-struct.algo.ts::StructDemo.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/arc4-struct/StructDemo.ssa.ir b/tests/approvals/out/arc4-struct/StructDemo.ssa.ir new file mode 100644 index 00000000..9d434c6e --- /dev/null +++ b/tests/approvals/out/arc4-struct/StructDemo.ssa.ir @@ -0,0 +1,127 @@ +contract tests/approvals/arc4-struct.algo.ts::StructDemo: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/arc4-struct.algo.ts::StructDemo.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/arc4-struct.algo.ts::StructDemo.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.constructor() -> void: + block@0: // L9 + return + + subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.__puya_arc4_router__() -> bool: + block@0: // L9 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@6 + block@1: // abi_routing_L9 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "testVectorCreationAndEquality()void" => block@2, method "addVectors((uint64,uint64),(uint64,uint64))(uint64,uint64)" => block@3, * => block@4} + block@2: // testVectorCreationAndEquality_route_L10 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // is not creating + tests/approvals/arc4-struct.algo.ts::StructDemo.testVectorCreationAndEquality() + return 1u + block@3: // addVectors_route_L18 + let tmp%7#0: uint64 = (txn OnCompletion) + let tmp%8#0: bool = (== tmp%7#0 NoOp) + (assert tmp%8#0) // OnCompletion is NoOp + let tmp%9#0: uint64 = (txn ApplicationID) + let tmp%10#0: bool = (!= tmp%9#0 0u) + (assert tmp%10#0) // is not creating + let tmp%11#0: bytes = (txna ApplicationArgs 1) + let tmp%12#0: bytes = (txna ApplicationArgs 2) + let tmp%13#0: bytes = tests/approvals/arc4-struct.algo.ts::StructDemo.addVectors(tmp%11#0, tmp%12#0) + let tmp%14#0: bytes = (concat 0x151f7c75 tmp%13#0) + (log tmp%14#0) + return 1u + block@4: // switch_case_default_L9 + goto block@5 + block@5: // switch_case_next_L9 + goto block@10 + block@6: // bare_routing_L9 + let tmp%15#0: uint64 = (txn OnCompletion) + switch tmp%15#0 {0u => block@7, * => block@8} + block@7: // __algots__.defaultCreate_L9 + let tmp%16#0: uint64 = (txn ApplicationID) + let tmp%17#0: bool = (== tmp%16#0 0u) + (assert tmp%17#0) // is creating + tests/approvals/arc4-struct.algo.ts::StructDemo.__algots__.defaultCreate() + return 1u + block@8: // switch_case_default_L9 + goto block@9 + block@9: // switch_case_next_L9 + goto block@10 + block@10: // after_if_else_L9 + return 0u + + subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.testVectorCreationAndEquality() -> void: + block@0: // L10 + let current_tail_offset%0#0: uint64 = 16u + let encoded_tuple_buffer%0#0: bytes = 0x + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 0x0000000000000000) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 0x0000000000000000) + let v1#0: bytes = encoded_tuple_buffer%2#0 + let tmp%0#0: bytes = (extract3 v1#0 0u 8u) // on error: Index access is out of bounds + (log tmp%0#0) + let tmp%1#0: bytes = (extract3 v1#0 8u 8u) // on error: Index access is out of bounds + (log tmp%1#0) + let current_tail_offset%1#0: uint64 = 16u + let encoded_tuple_buffer%3#0: bytes = 0x + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 0x0000000000000000) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 0x0000000000000000) + let v2#0: bytes = encoded_tuple_buffer%5#0 + let tmp%2#0: bool = (== v1#0 v2#0) + (assert tmp%2#0) + return + + subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.addVectors(v1: bytes, v2: bytes) -> bytes: + block@0: // L18 + let tmp%0#0: bytes = (extract3 v1#0 0u 8u) // on error: Index access is out of bounds + let tmp%1#0: uint64 = (btoi tmp%0#0) + let tmp%2#0: bytes = (extract3 v2#0 0u 8u) // on error: Index access is out of bounds + let tmp%3#0: uint64 = (btoi tmp%2#0) + let to_encode%0#0: uint64 = (+ tmp%1#0 tmp%3#0) + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%4#0: bytes = (extract3 v1#0 8u 8u) // on error: Index access is out of bounds + let tmp%5#0: uint64 = (btoi tmp%4#0) + let tmp%6#0: bytes = (extract3 v2#0 8u 8u) // on error: Index access is out of bounds + let tmp%7#0: uint64 = (btoi tmp%6#0) + let to_encode%1#0: uint64 = (+ tmp%5#0 tmp%7#0) + let val_as_bytes%1#0: bytes = (itob to_encode%1#0) + let tmp%8#0: bytes = (extract3 v1#0 0u 8u) // on error: Index access is out of bounds + let tmp%9#0: uint64 = (btoi tmp%8#0) + let tmp%10#0: bytes = (extract3 v2#0 0u 8u) // on error: Index access is out of bounds + let tmp%11#0: uint64 = (btoi tmp%10#0) + let to_encode%2#0: uint64 = (+ tmp%9#0 tmp%11#0) + let val_as_bytes%2#0: bytes = (itob to_encode%2#0) + let tmp%12#0: bytes = (extract3 v1#0 8u 8u) // on error: Index access is out of bounds + let tmp%13#0: uint64 = (btoi tmp%12#0) + let tmp%14#0: bytes = (extract3 v2#0 8u 8u) // on error: Index access is out of bounds + let tmp%15#0: uint64 = (btoi tmp%14#0) + let to_encode%3#0: uint64 = (+ tmp%13#0 tmp%15#0) + let val_as_bytes%3#0: bytes = (itob to_encode%3#0) + let current_tail_offset%0#0: uint64 = 16u + let encoded_tuple_buffer%0#0: bytes = 0x + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 val_as_bytes%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 val_as_bytes%3#0) + return encoded_tuple_buffer%2#0 + + subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.__algots__.defaultCreate() -> void: + block@0: // L9 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst.json b/tests/approvals/out/arc4-struct/arc4-struct.awst.json index acf7b3f7..7dc15747 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst.json +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst.json @@ -4460,6 +4460,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/named-types/MyContract.approval.teal b/tests/approvals/out/named-types/MyContract.approval.teal new file mode 100644 index 00000000..4f018ba5 --- /dev/null +++ b/tests/approvals/out/named-types/MyContract.approval.teal @@ -0,0 +1,219 @@ +#pragma version 10 + +tests/approvals/named-types.algo.ts::MyContract.approvalProgram: + intcblock 1 0 + bytecblock 0x151f7c75 + callsub __puya_arc4_router__ + return + + +// tests/approvals/named-types.algo.ts::MyContract.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/named-types.algo.ts:21 + // export class MyContract extends Contract { + proto 0 1 + txn NumAppArgs + bz __puya_arc4_router___bare_routing@9 + pushbytess 0xf02228b0 0xd908575b 0x577b1ffc 0xdc75f81d 0x040e2e4e // method "getXY()(uint64,uint64)", method "getYX()(uint64,uint64)", method "getAnon()(uint64,uint64)", method "test((uint64,uint64),(uint64,uint64))void", method "testing()((uint64,uint64),(uint64,uint64),(uint64,uint64))" + txna ApplicationArgs 0 + match __puya_arc4_router___getXY_route@2 __puya_arc4_router___getYX_route@3 __puya_arc4_router___getAnon_route@4 __puya_arc4_router___test_route@5 __puya_arc4_router___testing_route@6 + intc_1 // 0 + retsub + +__puya_arc4_router___getXY_route@2: + // tests/approvals/named-types.algo.ts:22 + // public getXY(): XY { + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub getXY + swap + itob + swap + itob + concat + bytec_0 // 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___getYX_route@3: + // tests/approvals/named-types.algo.ts:29 + // public getYX(): YX { + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub getYX + swap + itob + swap + itob + concat + bytec_0 // 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___getAnon_route@4: + // tests/approvals/named-types.algo.ts:36 + // public getAnon() { + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub getAnon + swap + itob + swap + itob + concat + bytec_0 // 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___test_route@5: + // tests/approvals/named-types.algo.ts:43 + // public test(x: XY, y: YX) {} + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + intc_0 // 1 + retsub + +__puya_arc4_router___testing_route@6: + // tests/approvals/named-types.algo.ts:45 + // public testing() { + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub testing + uncover 5 + itob + uncover 5 + itob + concat + uncover 4 + itob + uncover 4 + itob + concat + uncover 3 + itob + uncover 3 + itob + concat + cover 2 + concat + swap + concat + bytec_0 // 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___bare_routing@9: + // tests/approvals/named-types.algo.ts:21 + // export class MyContract extends Contract { + txn OnCompletion + bnz __puya_arc4_router___after_if_else@13 + txn ApplicationID + ! + assert // is creating + intc_0 // 1 + retsub + +__puya_arc4_router___after_if_else@13: + // tests/approvals/named-types.algo.ts:21 + // export class MyContract extends Contract { + intc_1 // 0 + retsub + + +// tests/approvals/named-types.algo.ts::MyContract.getXY() -> uint64, uint64: +getXY: + // tests/approvals/named-types.algo.ts:22 + // public getXY(): XY { + proto 0 2 + // tests/approvals/named-types.algo.ts:24 + // x: 1, + intc_0 // 1 + // tests/approvals/named-types.algo.ts:25 + // y: 2, + pushint 2 // 2 + // tests/approvals/named-types.algo.ts:23-26 + // return { + // x: 1, + // y: 2, + // } + retsub + + +// tests/approvals/named-types.algo.ts::MyContract.getYX() -> uint64, uint64: +getYX: + // tests/approvals/named-types.algo.ts:29 + // public getYX(): YX { + proto 0 2 + // tests/approvals/named-types.algo.ts:31-32 + // x: 222, + // y: 111, + pushints 111 222 // 111, 222 + // tests/approvals/named-types.algo.ts:30-33 + // return { + // x: 222, + // y: 111, + // } + retsub + + +// tests/approvals/named-types.algo.ts::MyContract.getAnon() -> uint64, uint64: +getAnon: + // tests/approvals/named-types.algo.ts:36 + // public getAnon() { + proto 0 2 + // tests/approvals/named-types.algo.ts:38-39 + // x: Uint64(3), + // y: Uint64(4), + pushints 3 4 // 3, 4 + // tests/approvals/named-types.algo.ts:37-40 + // return { + // x: Uint64(3), + // y: Uint64(4), + // } + retsub + + +// tests/approvals/named-types.algo.ts::MyContract.testing() -> uint64, uint64, uint64, uint64, uint64, uint64: +testing: + // tests/approvals/named-types.algo.ts:45 + // public testing() { + proto 0 6 + // tests/approvals/named-types.algo.ts:46 + // const a = this.getXY() + callsub getXY + // tests/approvals/named-types.algo.ts:47 + // const b = this.getYX() + callsub getYX + // tests/approvals/named-types.algo.ts:48 + // const c = this.getAnon() + callsub getAnon + // tests/approvals/named-types.algo.ts:49 + // return [a, b, c] as const + retsub diff --git a/tests/approvals/out/named-types/MyContract.arc32.json b/tests/approvals/out/named-types/MyContract.arc32.json index f26e6d91..2f5d1bf7 100644 --- a/tests/approvals/out/named-types/MyContract.arc32.json +++ b/tests/approvals/out/named-types/MyContract.arc32.json @@ -60,6 +60,39 @@ } } }, + "test((uint64,uint64),(uint64,uint64))void": { + "call_config": { + "no_op": "CALL" + }, + "structs": { + "x": { + "name": "XY", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + }, + "y": { + "name": "YX", + "elements": [ + [ + "y", + "uint64" + ], + [ + "x", + "uint64" + ] + ] + } + } + }, "testing()((uint64,uint64),(uint64,uint64),(uint64,uint64))": { "call_config": { "no_op": "CALL" @@ -67,7 +100,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbmFtZWQtdHlwZXMuYWxnby50czo6TXlDb250cmFjdC5hcHByb3Z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zdHMvYXBwcm92YWxzL25hbWVkLXR5cGVzLmFsZ28udHM6NDkKICAgIC8vIHJldHVybiBbYSwgYiwgY10gYXMgY29uc3QKICAgIHJldHN1Ygo=", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbmFtZWQtdHlwZXMuYWxnby50czo6TXlDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { @@ -117,6 +150,23 @@ "type": "(uint64,uint64)" } }, + { + "name": "test", + "args": [ + { + "type": "(uint64,uint64)", + "name": "x" + }, + { + "type": "(uint64,uint64)", + "name": "y" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, { "name": "testing", "args": [], diff --git a/tests/approvals/out/named-types/MyContract.clear.teal b/tests/approvals/out/named-types/MyContract.clear.teal new file mode 100644 index 00000000..2074429e --- /dev/null +++ b/tests/approvals/out/named-types/MyContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/named-types.algo.ts::MyContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/named-types/MyContract.ssa.ir b/tests/approvals/out/named-types/MyContract.ssa.ir index b8fbcbc7..98a2873a 100644 --- a/tests/approvals/out/named-types/MyContract.ssa.ir +++ b/tests/approvals/out/named-types/MyContract.ssa.ir @@ -19,10 +19,10 @@ contract tests/approvals/named-types.algo.ts::MyContract: block@0: // L21 let tmp%0#0: uint64 = (txn NumAppArgs) let tmp%1#0: bool = (!= tmp%0#0 0u) - goto tmp%1#0 ? block@1 : block@8 + goto tmp%1#0 ? block@1 : block@9 block@1: // abi_routing_L21 let tmp%2#0: bytes = (txna ApplicationArgs 0) - switch tmp%2#0 {method "getXY()(uint64,uint64)" => block@2, method "getYX()(uint64,uint64)" => block@3, method "getAnon()(uint64,uint64)" => block@4, method "testing()((uint64,uint64),(uint64,uint64),(uint64,uint64))" => block@5, * => block@6} + switch tmp%2#0 {method "getXY()(uint64,uint64)" => block@2, method "getYX()(uint64,uint64)" => block@3, method "getAnon()(uint64,uint64)" => block@4, method "test((uint64,uint64),(uint64,uint64))void" => block@5, method "testing()((uint64,uint64),(uint64,uint64),(uint64,uint64))" => block@6, * => block@7} block@2: // getXY_route_L22 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) @@ -74,13 +74,32 @@ contract tests/approvals/named-types.algo.ts::MyContract: let tmp%17#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%8#0) (log tmp%17#0) return 1u - block@5: // testing_route_L43 + block@5: // test_route_L43 let tmp%18#0: uint64 = (txn OnCompletion) let tmp%19#0: bool = (== tmp%18#0 NoOp) (assert tmp%19#0) // OnCompletion is NoOp let tmp%20#0: uint64 = (txn ApplicationID) let tmp%21#0: bool = (!= tmp%20#0 0u) (assert tmp%21#0) // is not creating + let tmp%22#0: bytes = (txna ApplicationArgs 1) + let item0%0#0: bytes = (extract3 tmp%22#0 0u 8u) // on error: Index access is out of bounds + let item0%0%0#0: uint64 = (btoi item0%0#0) + let item1%0#0: bytes = (extract3 tmp%22#0 8u 8u) // on error: Index access is out of bounds + let item1%0%0#0: uint64 = (btoi item1%0#0) + let tmp%23#0: bytes = (txna ApplicationArgs 2) + let item0%1#0: bytes = (extract3 tmp%23#0 0u 8u) // on error: Index access is out of bounds + let item0%1%0#0: uint64 = (btoi item0%1#0) + let item1%1#0: bytes = (extract3 tmp%23#0 8u 8u) // on error: Index access is out of bounds + let item1%1%0#0: uint64 = (btoi item1%1#0) + tests/approvals/named-types.algo.ts::MyContract.test(item0%0%0#0, item1%0%0#0, item0%1%0#0, item1%1%0#0) + return 1u + block@6: // testing_route_L45 + let tmp%24#0: uint64 = (txn OnCompletion) + let tmp%25#0: bool = (== tmp%24#0 NoOp) + (assert tmp%25#0) // OnCompletion is NoOp + let tmp%26#0: uint64 = (txn ApplicationID) + let tmp%27#0: bool = (!= tmp%26#0 0u) + (assert tmp%27#0) // is not creating let (elements_to_encode%6#0: uint64, elements_to_encode%7#0: uint64, elements_to_encode%8#0: uint64, elements_to_encode%9#0: uint64, elements_to_encode%10#0: uint64, elements_to_encode%11#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.testing() let val_as_bytes%6#0: bytes = (itob elements_to_encode%6#0) let val_as_bytes%7#0: bytes = (itob elements_to_encode%7#0) @@ -105,27 +124,27 @@ contract tests/approvals/named-types.algo.ts::MyContract: let encoded_tuple_buffer%19#0: bytes = (concat encoded_tuple_buffer%18#0 encoded_tuple_buffer%11#0) let encoded_tuple_buffer%20#0: bytes = (concat encoded_tuple_buffer%19#0 encoded_tuple_buffer%14#0) let encoded_tuple_buffer%21#0: bytes = (concat encoded_tuple_buffer%20#0 encoded_tuple_buffer%17#0) - let tmp%22#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%21#0) - (log tmp%22#0) + let tmp%28#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%21#0) + (log tmp%28#0) return 1u - block@6: // switch_case_default_L21 - goto block@7 - block@7: // switch_case_next_L21 - goto block@12 - block@8: // bare_routing_L21 - let tmp%23#0: uint64 = (txn OnCompletion) - switch tmp%23#0 {0u => block@9, * => block@10} - block@9: // __algots__.defaultCreate_L21 - let tmp%24#0: uint64 = (txn ApplicationID) - let tmp%25#0: bool = (== tmp%24#0 0u) - (assert tmp%25#0) // is creating + block@7: // switch_case_default_L21 + goto block@8 + block@8: // switch_case_next_L21 + goto block@13 + block@9: // bare_routing_L21 + let tmp%29#0: uint64 = (txn OnCompletion) + switch tmp%29#0 {0u => block@10, * => block@11} + block@10: // __algots__.defaultCreate_L21 + let tmp%30#0: uint64 = (txn ApplicationID) + let tmp%31#0: bool = (== tmp%30#0 0u) + (assert tmp%31#0) // is creating tests/approvals/named-types.algo.ts::MyContract.__algots__.defaultCreate() return 1u - block@10: // switch_case_default_L21 - goto block@11 - block@11: // switch_case_next_L21 + block@11: // switch_case_default_L21 goto block@12 - block@12: // after_if_else_L21 + block@12: // switch_case_next_L21 + goto block@13 + block@13: // after_if_else_L21 return 0u subroutine tests/approvals/named-types.algo.ts::MyContract.getXY() -> : @@ -140,8 +159,12 @@ contract tests/approvals/named-types.algo.ts::MyContract: block@0: // L36 return 3u 4u - subroutine tests/approvals/named-types.algo.ts::MyContract.testing() -> : + subroutine tests/approvals/named-types.algo.ts::MyContract.test(x.x: uint64, x.y: uint64, y.y: uint64, y.x: uint64) -> void: block@0: // L43 + return + + subroutine tests/approvals/named-types.algo.ts::MyContract.testing() -> : + block@0: // L45 let (a.x#0: uint64, a.y#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getXY() let (b.y#0: uint64, b.x#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getYX() let (c.x#0: uint64, c.y#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getAnon() diff --git a/tests/approvals/out/named-types/named-types.awst b/tests/approvals/out/named-types/named-types.awst index b54b3171..a96f856d 100644 --- a/tests/approvals/out/named-types/named-types.awst +++ b/tests/approvals/out/named-types/named-types.awst @@ -15,12 +15,12 @@ contract MyContract getXY(): XY{ x: uint64, y: uint64 } { - return { x: (#9 = { x: 1, y: 2 }).x, y: #9.y } + return { x: (#0 = { x: 1, y: 2 }).x, y: #0.y } } getYX(): YX{ y: uint64, x: uint64 } { - return { y: (#10 = { x: 222, y: 111 }).y, x: #10.x } + return { y: (#1 = { x: 222, y: 111 }).y, x: #1.x } } getAnon(): { x: uint64, y: uint64 } @@ -28,6 +28,10 @@ contract MyContract return { x: 3, y: 4 } } + test(): void + { + } + testing(): readonlytuple[XY{ x: uint64, y: uint64 }, YX{ y: uint64, x: uint64 }, { x: uint64, y: uint64 }] { a: XY{ x: uint64, y: uint64 } = this.getXY() diff --git a/tests/approvals/out/named-types/named-types.awst.json b/tests/approvals/out/named-types/named-types.awst.json index c48dff3b..71fb76fd 100644 --- a/tests/approvals/out/named-types/named-types.awst.json +++ b/tests/approvals/out/named-types/named-types.awst.json @@ -519,7 +519,7 @@ } ] }, - "id": "9" + "id": "0" }, "name": "x" }, @@ -652,7 +652,7 @@ } ] }, - "id": "9" + "id": "0" }, "name": "y" } @@ -927,7 +927,7 @@ } ] }, - "id": "10" + "id": "1" }, "name": "y" }, @@ -1060,7 +1060,7 @@ } ] }, - "id": "10" + "id": "1" }, "name": "x" } @@ -1300,6 +1300,168 @@ "line": 43, "end_line": 43, "column": 2, + "end_column": 27 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "x", + "wtype": { + "_type": "WTuple", + "name": "XY", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 14, + "end_column": 19 + } + }, + { + "_type": "SubroutineArgument", + "name": "y", + "wtype": { + "_type": "WTuple", + "name": "YX", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "y", + "x" + ] + }, + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 21, + "end_column": 26 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 28, + "end_column": 30 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/named-types.algo.ts::MyContract", + "member_name": "test", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 2, + "end_column": 27 + }, + "name": "test", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": { + "x": { + "name": "XY", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + }, + "y": { + "name": "YX", + "elements": [ + [ + "y", + "uint64" + ], + [ + "x", + "uint64" + ] + ] + } + } + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 45, + "end_line": 45, + "column": 2, "end_column": 18 }, "args": [], @@ -1397,8 +1559,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 43, - "end_line": 48, + "line": 45, + "end_line": 50, "column": 19, "end_column": 3 }, @@ -1407,8 +1569,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 44, - "end_line": 44, + "line": 46, + "end_line": 46, "column": 10, "end_column": 26 }, @@ -1416,8 +1578,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 44, - "end_line": 44, + "line": 46, + "end_line": 46, "column": 10, "end_column": 11 }, @@ -1454,8 +1616,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 44, - "end_line": 44, + "line": 46, + "end_line": 46, "column": 14, "end_column": 26 }, @@ -1497,8 +1659,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 47, + "end_line": 47, "column": 10, "end_column": 26 }, @@ -1506,8 +1668,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 47, + "end_line": 47, "column": 10, "end_column": 11 }, @@ -1544,8 +1706,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 47, + "end_line": 47, "column": 14, "end_column": 26 }, @@ -1587,8 +1749,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 46, - "end_line": 46, + "line": 48, + "end_line": 48, "column": 10, "end_column": 28 }, @@ -1596,8 +1758,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 46, - "end_line": 46, + "line": 48, + "end_line": 48, "column": 10, "end_column": 11 }, @@ -1634,8 +1796,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 46, - "end_line": 46, + "line": 48, + "end_line": 48, "column": 14, "end_column": 28 }, @@ -1677,8 +1839,8 @@ "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 49, + "end_line": 49, "column": 4, "end_column": 29 }, @@ -1686,8 +1848,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 49, + "end_line": 49, "column": 11, "end_column": 20 }, @@ -1786,8 +1948,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 49, + "end_line": 49, "column": 12, "end_column": 13 }, @@ -1824,8 +1986,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 49, + "end_line": 49, "column": 15, "end_column": 16 }, @@ -1862,8 +2024,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 49, + "end_line": 49, "column": 18, "end_column": 19 }, @@ -1915,8 +2077,8 @@ "_type": "ARC4ABIMethodConfig", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 45, + "end_line": 45, "column": 2, "end_column": 18 }, @@ -2180,6 +2342,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file From 32bdda31e5daaf80f77ade882502b7ffb4b56f75 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Tue, 12 Nov 2024 16:58:12 +1000 Subject: [PATCH 02/30] test: Include teal output for approvals --- package.json | 4 +- .../_run.spec.ts => approvals.spec.ts} | 12 +- .../AbiDecorators.approval.teal | 148 ++++++ .../abi-decorators/AbiDecorators.clear.teal | 5 + .../accounts/AccountsContract.approval.teal | 247 ++++++++++ .../out/accounts/AccountsContract.clear.teal | 5 + .../Arc4TypesTestContract.approval.teal | 152 ++++++ .../Arc4TypesTestContract.clear.teal | 5 + .../AssertMatchContract.approval.teal | 144 ++++++ .../AssertMatchContract.clear.teal | 5 + .../call-expressions/Example.approval.teal | 57 +++ .../out/call-expressions/Example.clear.teal | 5 + .../EnsureBudgetContract.approval.teal | 71 +++ .../EnsureBudgetContract.clear.teal | 5 + .../global-state/TestContract.approval.teal | 125 +++++ .../out/global-state/TestContract.clear.teal | 5 + .../BaseWithAbiCreate.approval.teal | 37 ++ .../BaseWithAbiCreate.clear.teal | 5 + .../BaseWithBareCreate.approval.teal | 32 ++ .../BaseWithBareCreate.clear.teal | 5 + .../ExplicitAbiCreateFromBase.approval.teal | 37 ++ .../ExplicitAbiCreateFromBase.clear.teal | 5 + .../ExplicitBareCreateFromBase.approval.teal | 32 ++ .../ExplicitBareCreateFromBase.clear.teal | 5 + .../out/implicit-create/NoBare.approval.teal | 48 ++ .../out/implicit-create/NoBare.clear.teal | 5 + .../out/implicit-create/NoNoOp.approval.teal | 47 ++ .../out/implicit-create/NoNoOp.clear.teal | 5 + .../ConcreteArc4Contract.approval.teal | 111 +++++ .../ConcreteArc4Contract.clear.teal | 5 + .../ConcreteSimpleContract.approval.teal | 35 ++ .../ConcreteSimpleContract.clear.teal | 5 + .../out/itxn/ItxnDemoContract.approval.teal | 459 ++++++++++++++++++ .../out/itxn/ItxnDemoContract.clear.teal | 5 + .../local-state/LocalStateDemo.approval.teal | 312 ++++++++++++ .../out/local-state/LocalStateDemo.clear.teal | 5 + .../non-arc4/HelloWorldContract.approval.teal | 17 + .../non-arc4/HelloWorldContract.clear.teal | 5 + .../pre-approved-sale/PreApprovedSale.teal | 54 +-- .../out/property-ordering/Demo.approval.teal | 7 + .../out/property-ordering/Demo.clear.teal | 5 + .../ShadowedVariablesAlgo.approval.teal | 43 ++ .../ShadowedVariablesAlgo.clear.teal | 5 + .../_run.spec.ts => expected-output.spec.ts} | 14 +- 44 files changed, 2303 insertions(+), 42 deletions(-) rename tests/{approvals/_run.spec.ts => approvals.spec.ts} (89%) create mode 100644 tests/approvals/out/abi-decorators/AbiDecorators.approval.teal create mode 100644 tests/approvals/out/abi-decorators/AbiDecorators.clear.teal create mode 100644 tests/approvals/out/accounts/AccountsContract.approval.teal create mode 100644 tests/approvals/out/accounts/AccountsContract.clear.teal create mode 100644 tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal create mode 100644 tests/approvals/out/arc4-types/Arc4TypesTestContract.clear.teal create mode 100644 tests/approvals/out/assert-match/AssertMatchContract.approval.teal create mode 100644 tests/approvals/out/assert-match/AssertMatchContract.clear.teal create mode 100644 tests/approvals/out/call-expressions/Example.approval.teal create mode 100644 tests/approvals/out/call-expressions/Example.clear.teal create mode 100644 tests/approvals/out/ensure-budget/EnsureBudgetContract.approval.teal create mode 100644 tests/approvals/out/ensure-budget/EnsureBudgetContract.clear.teal create mode 100644 tests/approvals/out/global-state/TestContract.approval.teal create mode 100644 tests/approvals/out/global-state/TestContract.clear.teal create mode 100644 tests/approvals/out/implicit-create/BaseWithAbiCreate.approval.teal create mode 100644 tests/approvals/out/implicit-create/BaseWithAbiCreate.clear.teal create mode 100644 tests/approvals/out/implicit-create/BaseWithBareCreate.approval.teal create mode 100644 tests/approvals/out/implicit-create/BaseWithBareCreate.clear.teal create mode 100644 tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.approval.teal create mode 100644 tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.clear.teal create mode 100644 tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.approval.teal create mode 100644 tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.clear.teal create mode 100644 tests/approvals/out/implicit-create/NoBare.approval.teal create mode 100644 tests/approvals/out/implicit-create/NoBare.clear.teal create mode 100644 tests/approvals/out/implicit-create/NoNoOp.approval.teal create mode 100644 tests/approvals/out/implicit-create/NoNoOp.clear.teal create mode 100644 tests/approvals/out/inheritance-b/ConcreteArc4Contract.approval.teal create mode 100644 tests/approvals/out/inheritance-b/ConcreteArc4Contract.clear.teal create mode 100644 tests/approvals/out/inheritance-b/ConcreteSimpleContract.approval.teal create mode 100644 tests/approvals/out/inheritance-b/ConcreteSimpleContract.clear.teal create mode 100644 tests/approvals/out/itxn/ItxnDemoContract.approval.teal create mode 100644 tests/approvals/out/itxn/ItxnDemoContract.clear.teal create mode 100644 tests/approvals/out/local-state/LocalStateDemo.approval.teal create mode 100644 tests/approvals/out/local-state/LocalStateDemo.clear.teal create mode 100644 tests/approvals/out/non-arc4/HelloWorldContract.approval.teal create mode 100644 tests/approvals/out/non-arc4/HelloWorldContract.clear.teal create mode 100644 tests/approvals/out/property-ordering/Demo.approval.teal create mode 100644 tests/approvals/out/property-ordering/Demo.clear.teal create mode 100644 tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.approval.teal create mode 100644 tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.clear.teal rename tests/{expected-output/_run.spec.ts => expected-output.spec.ts} (93%) diff --git a/package.json b/package.json index 07a2463f..5b8a1bb1 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,8 @@ "build:4-copy-pkg-json": "tstk copy-package-json -c", "build:5-copy-readme": "copyfiles ./README.md ./dist", "test": "vitest run", - "test:approvals": "vitest run tests/approvals/_run.spec.ts", - "test:expected-output": "vitest run tests/expected-output/_run.spec.ts", + "test:approvals": "vitest run tests/approvals.spec.ts", + "test:expected-output": "vitest run tests/expected-output.spec.ts", "test:coverage": "vitest run --coverage", "test:ci": "vitest run --coverage --reporter junit --outputFile test-results.xml", "install-local-packages": "npm run algo-ts", diff --git a/tests/approvals/_run.spec.ts b/tests/approvals.spec.ts similarity index 89% rename from tests/approvals/_run.spec.ts rename to tests/approvals.spec.ts index c6744edc..1bde7917 100644 --- a/tests/approvals/_run.spec.ts +++ b/tests/approvals.spec.ts @@ -1,10 +1,10 @@ import { sync } from 'cross-spawn' import { describe, expect, it } from 'vitest' -import { compile } from '../../src' -import { buildCompileOptions } from '../../src/compile-options' -import { isErrorOrCritical, LoggingContext, LogLevel } from '../../src/logger' -import { defaultPuyaOptions } from '../../src/puya/options' -import { invariant } from '../../src/util' +import { compile } from '../src' +import { buildCompileOptions } from '../src/compile-options' +import { isErrorOrCritical, LoggingContext, LogLevel } from '../src/logger' +import { defaultPuyaOptions } from '../src/puya/options' +import { invariant } from '../src/util' describe('Approvals', () => { using logCtx = LoggingContext.create() @@ -19,7 +19,7 @@ describe('Approvals', () => { }), { ...defaultPuyaOptions, - outputTeal: false, + outputTeal: true, outputArc32: true, }, ) diff --git a/tests/approvals/out/abi-decorators/AbiDecorators.approval.teal b/tests/approvals/out/abi-decorators/AbiDecorators.approval.teal new file mode 100644 index 00000000..118532b3 --- /dev/null +++ b/tests/approvals/out/abi-decorators/AbiDecorators.approval.teal @@ -0,0 +1,148 @@ +#pragma version 10 + +tests/approvals/abi-decorators.algo.ts::AbiDecorators.approvalProgram: + intcblock 1 0 + bytecblock 0x151f7c75 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/abi-decorators.algo.ts::AbiDecorators.constructor() -> void: +constructor: + // tests/approvals/abi-decorators.algo.ts:4 + // export default class AbiDecorators extends Contract { + proto 0 0 + // tests/approvals/abi-decorators.algo.ts:16 + // globalValue = GlobalState({ initialValue: Uint64(123) }) + pushbytes "globalValue" + pushint 123 // 123 + app_global_put + retsub + + +// tests/approvals/abi-decorators.algo.ts::AbiDecorators.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/abi-decorators.algo.ts:4 + // export default class AbiDecorators extends Contract { + proto 0 1 + txn NumAppArgs + bz __puya_arc4_router___after_if_else@10 + pushbytess 0xf9020d5a 0xe179f9d4 0x63c27aba 0x14d1b6ea 0xc1367374 // method "justNoop()void", method "createMethod()void", method "allActions()void", method "overrideReadonlyName()uint64", method "methodWithDefaults(uint64,uint64,uint64)uint64" + txna ApplicationArgs 0 + match __puya_arc4_router___justNoop_route@2 __puya_arc4_router___createMethod_route@3 __puya_arc4_router___allActions_route@4 __puya_arc4_router___overrideReadonlyName_route@5 __puya_arc4_router___methodWithDefaults_route@6 + intc_1 // 0 + retsub + +__puya_arc4_router___justNoop_route@2: + // tests/approvals/abi-decorators.algo.ts:5 + // @abimethod({ allowActions: 'NoOp' }) + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + intc_0 // 1 + retsub + +__puya_arc4_router___createMethod_route@3: + // tests/approvals/abi-decorators.algo.ts:7 + // @abimethod({ onCreate: 'require' }) + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + ! + assert // is creating + intc_0 // 1 + retsub + +__puya_arc4_router___allActions_route@4: + // tests/approvals/abi-decorators.algo.ts:9 + // @abimethod({ allowActions: ['NoOp', 'OptIn', 'CloseOut', 'DeleteApplication', 'UpdateApplication'] }) + txn ApplicationID + assert // is not creating + intc_0 // 1 + retsub + +__puya_arc4_router___overrideReadonlyName_route@5: + // tests/approvals/abi-decorators.algo.ts:11 + // @abimethod({ readonly: true, name: 'overrideReadonlyName' }) + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub readonly + itob + bytec_0 // 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___methodWithDefaults_route@6: + // tests/approvals/abi-decorators.algo.ts:18 + // @abimethod({ defaultArguments: { a: { from: 'globalValue' }, b: { from: 'readonly' }, c: { constant: 145 } } }) + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/approvals/abi-decorators.algo.ts:4 + // export default class AbiDecorators extends Contract { + txna ApplicationArgs 1 + btoi + txna ApplicationArgs 2 + btoi + txna ApplicationArgs 3 + btoi + // tests/approvals/abi-decorators.algo.ts:18 + // @abimethod({ defaultArguments: { a: { from: 'globalValue' }, b: { from: 'readonly' }, c: { constant: 145 } } }) + callsub methodWithDefaults + itob + bytec_0 // 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___after_if_else@10: + // tests/approvals/abi-decorators.algo.ts:4 + // export default class AbiDecorators extends Contract { + intc_1 // 0 + retsub + + +// tests/approvals/abi-decorators.algo.ts::AbiDecorators.readonly() -> uint64: +readonly: + // tests/approvals/abi-decorators.algo.ts:11-12 + // @abimethod({ readonly: true, name: 'overrideReadonlyName' }) + // public readonly(): uint64 { + proto 0 1 + // tests/approvals/abi-decorators.algo.ts:13 + // return 5 + pushint 5 // 5 + retsub + + +// tests/approvals/abi-decorators.algo.ts::AbiDecorators.methodWithDefaults(a: uint64, b: uint64, c: uint64) -> uint64: +methodWithDefaults: + // tests/approvals/abi-decorators.algo.ts:18-19 + // @abimethod({ defaultArguments: { a: { from: 'globalValue' }, b: { from: 'readonly' }, c: { constant: 145 } } }) + // public methodWithDefaults(a: uint64, b: uint64, c: uint64): uint64 { + proto 3 1 + // tests/approvals/abi-decorators.algo.ts:20 + // return a * b + c + frame_dig -3 + frame_dig -2 + * + frame_dig -1 + + + retsub diff --git a/tests/approvals/out/abi-decorators/AbiDecorators.clear.teal b/tests/approvals/out/abi-decorators/AbiDecorators.clear.teal new file mode 100644 index 00000000..2998c6e5 --- /dev/null +++ b/tests/approvals/out/abi-decorators/AbiDecorators.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/abi-decorators.algo.ts::AbiDecorators.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/accounts/AccountsContract.approval.teal b/tests/approvals/out/accounts/AccountsContract.approval.teal new file mode 100644 index 00000000..053aa91c --- /dev/null +++ b/tests/approvals/out/accounts/AccountsContract.approval.teal @@ -0,0 +1,247 @@ +#pragma version 10 + +tests/approvals/accounts.algo.ts::AccountsContract.approvalProgram: + intcblock 0 1 + callsub __puya_arc4_router__ + return + + +// tests/approvals/accounts.algo.ts::AccountsContract.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { + proto 0 1 + txn NumAppArgs + bz __puya_arc4_router___bare_routing@5 + pushbytes 0xdfe9a035 // method "getAccountInfo(account,asset)(byte[],uint64,uint64,byte[],uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,bool,bool)" + txna ApplicationArgs 0 + match __puya_arc4_router___getAccountInfo_route@2 + intc_0 // 0 + retsub + +__puya_arc4_router___getAccountInfo_route@2: + // tests/approvals/accounts.algo.ts:5 + // public getAccountInfo(account: Account, asset: Asset) { + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { + txna ApplicationArgs 1 + btoi + txnas Accounts + txna ApplicationArgs 2 + btoi + txnas Assets + // tests/approvals/accounts.algo.ts:5 + // public getAccountInfo(account: Account, asset: Asset) { + callsub getAccountInfo + dig 14 + len + itob + extract 6 2 + uncover 15 + concat + uncover 14 + itob + uncover 14 + itob + dig 14 + len + itob + extract 6 2 + uncover 15 + concat + uncover 14 + itob + uncover 14 + itob + uncover 14 + itob + uncover 14 + itob + uncover 14 + itob + uncover 14 + itob + uncover 14 + itob + uncover 14 + itob + uncover 14 + itob + pushbytes 0x00 + intc_0 // 0 + uncover 16 + setbit + pushbytes 0x00 + intc_0 // 0 + uncover 16 + setbit + dig 14 + len + pushint 93 // 93 + + + pushbytes 0x005d + uncover 15 + concat + uncover 14 + concat + swap + itob + extract 6 2 + concat + uncover 11 + concat + uncover 10 + concat + uncover 9 + concat + uncover 8 + concat + uncover 7 + concat + uncover 6 + concat + uncover 5 + concat + uncover 4 + concat + uncover 3 + concat + uncover 2 + concat + swap + intc_0 // 0 + getbit + pushint 737 // 737 + swap + setbit + uncover 2 + concat + swap + concat + pushbytes 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___bare_routing@5: + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { + txn OnCompletion + bnz __puya_arc4_router___after_if_else@9 + txn ApplicationID + ! + assert // is creating + intc_1 // 1 + retsub + +__puya_arc4_router___after_if_else@9: + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/accounts.algo.ts::AccountsContract.getAccountInfo(account: bytes, asset: uint64) -> bytes, uint64, uint64, bytes, uint64, uint64, uint64, uint64, uint64, uint64, uint64, uint64, uint64, uint64, uint64: +getAccountInfo: + // tests/approvals/accounts.algo.ts:5 + // public getAccountInfo(account: Account, asset: Asset) { + proto 2 15 + // tests/approvals/accounts.algo.ts:8 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // isOptInApp: account.isOptedIn(Global.currentApplicationId), + frame_dig -2 + global CurrentApplicationID + app_opted_in + // tests/approvals/accounts.algo.ts:21 + // isOptInAsset: account.isOptedIn(asset), + frame_dig -2 + frame_dig -1 + asset_holding_get AssetBalance + bury 1 + // tests/approvals/accounts.algo.ts:6-22 + // return { + // bytes: account.bytes, + // balance: account.balance, + // minBalance: account.minBalance, + // authAddress: account.authAddress.bytes, + // totalNumUint: account.totalNumUint, + // totalNumByteSlice: account.totalNumByteSlice, + // totalExtraAppPages: account.totalExtraAppPages, + // totalAppsCreated: account.totalAppsCreated, + // totalAppsOptedIn: account.totalAppsOptedIn, + // totalAssetsCreated: account.totalAssetsCreated, + // totalAssets: account.totalAssets, + // totalBoxes: account.totalBoxes, + // totalBoxBytes: account.totalBoxBytes, + // isOptInApp: account.isOptedIn(Global.currentApplicationId), + // isOptInAsset: account.isOptedIn(asset), + // } + frame_dig -2 + cover 14 + retsub diff --git a/tests/approvals/out/accounts/AccountsContract.clear.teal b/tests/approvals/out/accounts/AccountsContract.clear.teal new file mode 100644 index 00000000..c5fc9c10 --- /dev/null +++ b/tests/approvals/out/accounts/AccountsContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/accounts.algo.ts::AccountsContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal b/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal new file mode 100644 index 00000000..89337de6 --- /dev/null +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal @@ -0,0 +1,152 @@ +#pragma version 10 + +tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.approvalProgram: + intcblock 1 16 8 0 + // tests/approvals/arc4-types.algo.ts:86 + // test(1, 2n, new UintN<256>(4)) + intc_0 // 1 + pushbytess 0x02 0x0000000000000000000000000000000000000000000000000000000000000004 // 0x02, 0x0000000000000000000000000000000000000000000000000000000000000004 + callsub test + // tests/approvals/arc4-types.algo.ts:88 + // testArrays(new UintN<64>(65)) + pushbytes 0x0000000000000041 + callsub testArrays + // tests/approvals/arc4-types.algo.ts:89 + // testAddress() + callsub testAddress + // tests/approvals/arc4-types.algo.ts:91 + // return true + intc_0 // 1 + return + + +// tests/approvals/arc4-types.algo.ts::test(n: uint64, b: bytes, c: bytes) -> void: +test: + // tests/approvals/arc4-types.algo.ts:12 + // function test(n: uint64, b: biguint, c: UintN<256>) { + proto 3 0 + // tests/approvals/arc4-types.algo.ts:20 + // const z = new UintN<8>(n) + frame_dig -3 + itob + extract 7 1 + // tests/approvals/arc4-types.algo.ts:21 + // const z_native = z.native + btoi + // tests/approvals/arc4-types.algo.ts:22 + // assert(z_native === n) + frame_dig -3 + == + assert + // tests/approvals/arc4-types.algo.ts:23 + // const a = new UintN<128>(b) + frame_dig -2 + len + intc_1 // 16 + <= + assert // overflow + intc_1 // 16 + bzero + frame_dig -2 + b| + // tests/approvals/arc4-types.algo.ts:25 + // assert(a_native === b) + frame_dig -2 + b== + assert + // tests/approvals/arc4-types.algo.ts:27 + // assert(c.bytes.length === 256 / 8) + frame_dig -1 + len + pushint 32 // 32 + == + assert + retsub + + +// tests/approvals/arc4-types.algo.ts::testArrays(n: bytes) -> void: +testArrays: + // tests/approvals/arc4-types.algo.ts:40 + // function testArrays(n: ARC4Uint64) { + proto 1 0 + // tests/approvals/arc4-types.algo.ts:41 + // const myArray = new DynamicArray(n, n, n) + frame_dig -1 + dup + concat + dup + frame_dig -1 + concat + pushbytes 0x0003 + swap + concat + // tests/approvals/arc4-types.algo.ts:43 + // myArray.push(n) + extract 2 0 + frame_dig -1 + concat + dup + len + intc_2 // 8 + / + itob + extract 6 2 + swap + concat + // tests/approvals/arc4-types.algo.ts:47 + // assert(myStatic[0].equals(myArray.pop())) + swap + extract 0 8 // on error: Index access is out of bounds + swap + intc_2 // 8 + callsub dynamic_array_pop_fixed_size + pop + == + assert + retsub + + +// tests/approvals/arc4-types.algo.ts::testAddress() -> void: +testAddress: + // tests/approvals/arc4-types.algo.ts:60 + // function testAddress() { + proto 0 0 + // tests/approvals/arc4-types.algo.ts:61 + // const a = new Address() + pushbytes base32(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ + // tests/approvals/arc4-types.algo.ts:62 + // const b = new Address(Txn.sender) + txn Sender + // tests/approvals/arc4-types.algo.ts:64 + // assert(!a.equals(b), 'Zero address should not match sender') + == + ! + assert // Zero address should not match sender + retsub + + +// _puya_lib.arc4.dynamic_array_pop_fixed_size(array: bytes, fixed_byte_size: uint64) -> bytes, bytes: +dynamic_array_pop_fixed_size: + proto 2 2 + frame_dig -2 + intc_3 // 0 + extract_uint16 + intc_0 // 1 + - + itob + extract 6 0 + frame_dig -2 + swap + replace2 0 + dup + len + frame_dig -1 + - + dup2 + frame_dig -1 + extract3 + uncover 2 + intc_3 // 0 + uncover 3 + substring3 + retsub diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.clear.teal b/tests/approvals/out/arc4-types/Arc4TypesTestContract.clear.teal new file mode 100644 index 00000000..eac7fd54 --- /dev/null +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/assert-match/AssertMatchContract.approval.teal b/tests/approvals/out/assert-match/AssertMatchContract.approval.teal new file mode 100644 index 00000000..76ec58c0 --- /dev/null +++ b/tests/approvals/out/assert-match/AssertMatchContract.approval.teal @@ -0,0 +1,144 @@ +#pragma version 10 + +tests/approvals/assert-match.algo.ts::AssertMatchContract.approvalProgram: + intcblock 1 + // tests/approvals/assert-match.algo.ts:22 + // const txn = gtxn.PaymentTxn(1) + intc_0 // 1 + // tests/approvals/assert-match.algo.ts:23 + // test(txn) + callsub test + // tests/approvals/assert-match.algo.ts:24 + // return true + intc_0 // 1 + return + + +// tests/approvals/assert-match.algo.ts::test(x: uint64) -> void: +test: + // tests/approvals/assert-match.algo.ts:9 + // function test(x: gtxn.PaymentTxn) { + proto 1 0 + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + frame_dig -1 + gtxns Amount + // tests/approvals/assert-match.algo.ts:11 + // amount: { between: [0, 50000] }, + pushint 50000 // 50000 + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + <= + bz test_bool_false@8 + frame_dig -1 + gtxns Sender + // tests/approvals/assert-match.algo.ts:12 + // sender: Txn.sender, + txn Sender + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + == + bz test_bool_false@8 + frame_dig -1 + gtxns Receiver + // tests/approvals/assert-match.algo.ts:13 + // receiver: Global.currentApplicationAddress, + global CurrentApplicationAddress + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + == + bz test_bool_false@8 + frame_dig -1 + gtxns CloseRemainderTo + // tests/approvals/assert-match.algo.ts:14 + // closeRemainderTo: Global.zeroAddress, + global ZeroAddress + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + == + bz test_bool_false@8 + frame_dig -1 + gtxns FirstValid + // tests/approvals/assert-match.algo.ts:15 + // firstValid: { greaterThan: 1 }, + intc_0 // 1 + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + > + bz test_bool_false@8 + frame_dig -1 + gtxns LastValid + // tests/approvals/assert-match.algo.ts:16 + // lastValid: { lessThan: 2 ** 40 }, + pushint 1099511627776 // 1099511627776 + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + < + bz test_bool_false@8 + intc_0 // 1 + b test_bool_merge@9 + +test_bool_false@8: + pushint 0 // 0 + +test_bool_merge@9: + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + assert // assert target is match for conditions + retsub diff --git a/tests/approvals/out/assert-match/AssertMatchContract.clear.teal b/tests/approvals/out/assert-match/AssertMatchContract.clear.teal new file mode 100644 index 00000000..54c7e9df --- /dev/null +++ b/tests/approvals/out/assert-match/AssertMatchContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/assert-match.algo.ts::AssertMatchContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/call-expressions/Example.approval.teal b/tests/approvals/out/call-expressions/Example.approval.teal new file mode 100644 index 00000000..815f30fe --- /dev/null +++ b/tests/approvals/out/call-expressions/Example.approval.teal @@ -0,0 +1,57 @@ +#pragma version 10 + +tests/approvals/call-expressions.algo.ts::Example.approvalProgram: + // tests/approvals/call-expressions.algo.ts:12 + // return this.localMethod() + super.baseMethod() === freeMethod() - this.baseMethod() + callsub localMethod + callsub baseMethod + + + callsub freeMethod + callsub tests/approvals/call-expressions.algo.ts::Example.baseMethod + - + == + return + + +// tests/approvals/call-expressions.algo.ts::Example.localMethod() -> uint64: +localMethod: + // tests/approvals/call-expressions.algo.ts:17 + // private localMethod(): uint64 { + proto 0 1 + // tests/approvals/call-expressions.algo.ts:18 + // return 5 + pushint 5 // 5 + retsub + + +// tests/approvals/call-expressions.algo.ts::ExampleBase.baseMethod() -> uint64: +baseMethod: + // tests/approvals/call-expressions.algo.ts:5 + // protected baseMethod(): uint64 { + proto 0 1 + // tests/approvals/call-expressions.algo.ts:6 + // return 2 + pushint 2 // 2 + retsub + + +// tests/approvals/call-expressions.algo.ts::freeMethod() -> uint64: +freeMethod: + // tests/approvals/call-expressions.algo.ts:22 + // function freeMethod(): uint64 { + proto 0 1 + // tests/approvals/call-expressions.algo.ts:23 + // return 7 + pushint 7 // 7 + retsub + + +// tests/approvals/call-expressions.algo.ts::Example.baseMethod() -> uint64: +tests/approvals/call-expressions.algo.ts::Example.baseMethod: + // tests/approvals/call-expressions.algo.ts:14 + // protected baseMethod(): uint64 { + proto 0 1 + // tests/approvals/call-expressions.algo.ts:15 + // return 1 + pushint 1 // 1 + retsub diff --git a/tests/approvals/out/call-expressions/Example.clear.teal b/tests/approvals/out/call-expressions/Example.clear.teal new file mode 100644 index 00000000..bf95f000 --- /dev/null +++ b/tests/approvals/out/call-expressions/Example.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/call-expressions.algo.ts::Example.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/ensure-budget/EnsureBudgetContract.approval.teal b/tests/approvals/out/ensure-budget/EnsureBudgetContract.approval.teal new file mode 100644 index 00000000..98b47ed4 --- /dev/null +++ b/tests/approvals/out/ensure-budget/EnsureBudgetContract.approval.teal @@ -0,0 +1,71 @@ +#pragma version 10 + +tests/approvals/ensure-budget.algo.ts::EnsureBudgetContract.approvalProgram: + intcblock 100 0 1 + bytecblock 0x068101 + // tests/approvals/ensure-budget.algo.ts:5 + // ensureBudget(100) + intc_0 // 100 + intc_1 // 0 + callsub ensure_budget + // tests/approvals/ensure-budget.algo.ts:6 + // ensureBudget(100, OpUpFeeSource.GroupCredit) + intc_0 // 100 + intc_1 // 0 + callsub ensure_budget + // tests/approvals/ensure-budget.algo.ts:7 + // ensureBudget(100, OpUpFeeSource.AppAccount) + intc_0 // 100 + intc_2 // 1 + callsub ensure_budget + // tests/approvals/ensure-budget.algo.ts:8 + // ensureBudget(100, OpUpFeeSource.Any) + intc_0 // 100 + pushint 2 // 2 + callsub ensure_budget + // tests/approvals/ensure-budget.algo.ts:10 + // return true + intc_2 // 1 + return + + +// _puya_lib.util.ensure_budget(required_budget: uint64, fee_source: uint64) -> void: +ensure_budget: + proto 2 0 + frame_dig -2 + pushint 10 // 10 + + + +ensure_budget_while_top@1: + frame_dig 0 + global OpcodeBudget + > + bz ensure_budget_after_while@7 + itxn_begin + pushint 6 // appl + itxn_field TypeEnum + pushint 5 // DeleteApplication + itxn_field OnCompletion + bytec_0 // 0x068101 + itxn_field ApprovalProgram + bytec_0 // 0x068101 + itxn_field ClearStateProgram + frame_dig -1 + switch ensure_budget_switch_case_0@3 ensure_budget_switch_case_1@4 + b ensure_budget_switch_case_next@6 + +ensure_budget_switch_case_0@3: + intc_1 // 0 + itxn_field Fee + b ensure_budget_switch_case_next@6 + +ensure_budget_switch_case_1@4: + global MinTxnFee + itxn_field Fee + +ensure_budget_switch_case_next@6: + itxn_submit + b ensure_budget_while_top@1 + +ensure_budget_after_while@7: + retsub diff --git a/tests/approvals/out/ensure-budget/EnsureBudgetContract.clear.teal b/tests/approvals/out/ensure-budget/EnsureBudgetContract.clear.teal new file mode 100644 index 00000000..c0d63ccf --- /dev/null +++ b/tests/approvals/out/ensure-budget/EnsureBudgetContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/ensure-budget.algo.ts::EnsureBudgetContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/global-state/TestContract.approval.teal b/tests/approvals/out/global-state/TestContract.approval.teal new file mode 100644 index 00000000..f89846b9 --- /dev/null +++ b/tests/approvals/out/global-state/TestContract.approval.teal @@ -0,0 +1,125 @@ +#pragma version 10 + +tests/approvals/global-state.algo.ts::TestContract.approvalProgram: + intcblock 0 2 + bytecblock "testState" "baseTestState" "testing 123" + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/global-state.algo.ts:22 + // assert(this.testState.hasValue, 'State should have value') + intc_0 // 0 + // tests/approvals/global-state.algo.ts:11 + // testState = GlobalState({ initialValue: Uint64(2) }) + bytec_0 // "testState" + // tests/approvals/global-state.algo.ts:22 + // assert(this.testState.hasValue, 'State should have value') + app_global_get_ex + bury 1 + assert // State should have value + // tests/approvals/global-state.algo.ts:23 + // assert(this.testState.value === 2, 'Value should equal 2') + intc_0 // 0 + // tests/approvals/global-state.algo.ts:11 + // testState = GlobalState({ initialValue: Uint64(2) }) + bytec_0 // "testState" + // tests/approvals/global-state.algo.ts:23 + // assert(this.testState.value === 2, 'Value should equal 2') + app_global_get_ex + assert // check GlobalState exists + intc_1 // 2 + == + assert // Value should equal 2 + // tests/approvals/global-state.algo.ts:25 + // this.testState.value = op.btoi(Txn.applicationArgs(0)) + intc_0 // 0 + txnas ApplicationArgs + btoi + // tests/approvals/global-state.algo.ts:11 + // testState = GlobalState({ initialValue: Uint64(2) }) + bytec_0 // "testState" + // tests/approvals/global-state.algo.ts:25 + // this.testState.value = op.btoi(Txn.applicationArgs(0)) + swap + app_global_put + // tests/approvals/global-state.algo.ts:27 + // return true + pushint 1 // 1 + return + + +// tests/approvals/global-state.algo.ts::TestContract.constructor() -> void: +constructor: + // tests/approvals/global-state.algo.ts:14-19 + // constructor() { + // const someValue: uint64 = 2 ** 56 + // super() + // assert(this.baseTestState.value === 'testing 123', 'Base class state should be initialized after super call') + // this.noInitialInt.value = someValue * this.testState.value + // } + proto 0 0 + // tests/approvals/global-state.algo.ts:16 + // super() + callsub tests/approvals/global-state.algo.ts::BaseTestContract.constructor + // tests/approvals/global-state.algo.ts:11 + // testState = GlobalState({ initialValue: Uint64(2) }) + bytec_0 // "testState" + intc_1 // 2 + app_global_put + // tests/approvals/global-state.algo.ts:12 + // testState2 = GlobalState({ initialValue: Uint64(5), key: Bytes('TESTSTATE') }) + pushbytes "TESTSTATE" + pushint 5 // 5 + app_global_put + // tests/approvals/global-state.algo.ts:17 + // assert(this.baseTestState.value === 'testing 123', 'Base class state should be initialized after super call') + intc_0 // 0 + // tests/approvals/global-state.algo.ts:5 + // baseTestState = GlobalState({ initialValue: 'testing 123' }) + bytec_1 // "baseTestState" + // tests/approvals/global-state.algo.ts:17 + // assert(this.baseTestState.value === 'testing 123', 'Base class state should be initialized after super call') + app_global_get_ex + assert // check GlobalState exists + bytec_2 // "testing 123" + == + assert // Base class state should be initialized after super call + // tests/approvals/global-state.algo.ts:18 + // this.noInitialInt.value = someValue * this.testState.value + intc_0 // 0 + // tests/approvals/global-state.algo.ts:11 + // testState = GlobalState({ initialValue: Uint64(2) }) + bytec_0 // "testState" + // tests/approvals/global-state.algo.ts:18 + // this.noInitialInt.value = someValue * this.testState.value + app_global_get_ex + assert // check GlobalState exists + // tests/approvals/global-state.algo.ts:15 + // const someValue: uint64 = 2 ** 56 + pushint 72057594037927936 // 72057594037927936 + // tests/approvals/global-state.algo.ts:18 + // this.noInitialInt.value = someValue * this.testState.value + * + // tests/approvals/global-state.algo.ts:10 + // noInitialInt = GlobalState() + pushbytes "noInitialInt" + // tests/approvals/global-state.algo.ts:18 + // this.noInitialInt.value = someValue * this.testState.value + swap + app_global_put + retsub + + +// tests/approvals/global-state.algo.ts::BaseTestContract.constructor() -> void: +tests/approvals/global-state.algo.ts::BaseTestContract.constructor: + // tests/approvals/global-state.algo.ts:4 + // export abstract class BaseTestContract extends BaseContract { + proto 0 0 + // tests/approvals/global-state.algo.ts:5 + // baseTestState = GlobalState({ initialValue: 'testing 123' }) + bytec_1 // "baseTestState" + bytec_2 // "testing 123" + app_global_put + retsub diff --git a/tests/approvals/out/global-state/TestContract.clear.teal b/tests/approvals/out/global-state/TestContract.clear.teal new file mode 100644 index 00000000..599e8bcc --- /dev/null +++ b/tests/approvals/out/global-state/TestContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/global-state.algo.ts::TestContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/implicit-create/BaseWithAbiCreate.approval.teal b/tests/approvals/out/implicit-create/BaseWithAbiCreate.approval.teal new file mode 100644 index 00000000..9ddf262d --- /dev/null +++ b/tests/approvals/out/implicit-create/BaseWithAbiCreate.approval.teal @@ -0,0 +1,37 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.approvalProgram: + callsub __puya_arc4_router__ + return + + +// tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/implicit-create.algo.ts:17 + // class BaseWithAbiCreate extends Contract { + proto 0 1 + txn NumAppArgs + bz __puya_arc4_router___after_if_else@6 + pushbytes 0x4c5c61ba // method "create()void" + txna ApplicationArgs 0 + match __puya_arc4_router___create_route@2 + pushint 0 // 0 + retsub + +__puya_arc4_router___create_route@2: + // tests/approvals/implicit-create.algo.ts:18 + // @abimethod({ onCreate: 'require' }) + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + ! + assert // is creating + pushint 1 // 1 + retsub + +__puya_arc4_router___after_if_else@6: + // tests/approvals/implicit-create.algo.ts:17 + // class BaseWithAbiCreate extends Contract { + pushint 0 // 0 + retsub diff --git a/tests/approvals/out/implicit-create/BaseWithAbiCreate.clear.teal b/tests/approvals/out/implicit-create/BaseWithAbiCreate.clear.teal new file mode 100644 index 00000000..b0909d5d --- /dev/null +++ b/tests/approvals/out/implicit-create/BaseWithAbiCreate.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/implicit-create/BaseWithBareCreate.approval.teal b/tests/approvals/out/implicit-create/BaseWithBareCreate.approval.teal new file mode 100644 index 00000000..2a2f2fa0 --- /dev/null +++ b/tests/approvals/out/implicit-create/BaseWithBareCreate.approval.teal @@ -0,0 +1,32 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.approvalProgram: + callsub __puya_arc4_router__ + return + + +// tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/implicit-create.algo.ts:13 + // class BaseWithBareCreate extends Contract { + proto 0 1 + txn NumAppArgs + bnz __puya_arc4_router___after_if_else@6 + txn OnCompletion + bnz __puya_arc4_router___after_if_else@6 + // tests/approvals/implicit-create.algo.ts:14 + // @baremethod({ onCreate: 'require' }) + txn ApplicationID + ! + assert // is creating + // tests/approvals/implicit-create.algo.ts:14-15 + // @baremethod({ onCreate: 'require' }) + // public create() {} + pushint 1 // 1 + retsub + +__puya_arc4_router___after_if_else@6: + // tests/approvals/implicit-create.algo.ts:13 + // class BaseWithBareCreate extends Contract { + pushint 0 // 0 + retsub diff --git a/tests/approvals/out/implicit-create/BaseWithBareCreate.clear.teal b/tests/approvals/out/implicit-create/BaseWithBareCreate.clear.teal new file mode 100644 index 00000000..fcd5348e --- /dev/null +++ b/tests/approvals/out/implicit-create/BaseWithBareCreate.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.approval.teal b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.approval.teal new file mode 100644 index 00000000..e87ae031 --- /dev/null +++ b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.approval.teal @@ -0,0 +1,37 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::ExplicitAbiCreateFromBase.approvalProgram: + callsub __puya_arc4_router__ + return + + +// tests/approvals/implicit-create.algo.ts::ExplicitAbiCreateFromBase.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/implicit-create.algo.ts:23 + // export class ExplicitAbiCreateFromBase extends BaseWithAbiCreate {} + proto 0 1 + txn NumAppArgs + bz __puya_arc4_router___after_if_else@6 + pushbytes 0x4c5c61ba // method "create()void" + txna ApplicationArgs 0 + match __puya_arc4_router___create_route@2 + pushint 0 // 0 + retsub + +__puya_arc4_router___create_route@2: + // tests/approvals/implicit-create.algo.ts:18 + // @abimethod({ onCreate: 'require' }) + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + ! + assert // is creating + pushint 1 // 1 + retsub + +__puya_arc4_router___after_if_else@6: + // tests/approvals/implicit-create.algo.ts:23 + // export class ExplicitAbiCreateFromBase extends BaseWithAbiCreate {} + pushint 0 // 0 + retsub diff --git a/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.clear.teal b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.clear.teal new file mode 100644 index 00000000..88995789 --- /dev/null +++ b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::ExplicitAbiCreateFromBase.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.approval.teal b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.approval.teal new file mode 100644 index 00000000..fa3d282d --- /dev/null +++ b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.approval.teal @@ -0,0 +1,32 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::ExplicitBareCreateFromBase.approvalProgram: + callsub __puya_arc4_router__ + return + + +// tests/approvals/implicit-create.algo.ts::ExplicitBareCreateFromBase.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/implicit-create.algo.ts:21 + // export class ExplicitBareCreateFromBase extends BaseWithBareCreate {} + proto 0 1 + txn NumAppArgs + bnz __puya_arc4_router___after_if_else@6 + txn OnCompletion + bnz __puya_arc4_router___after_if_else@6 + // tests/approvals/implicit-create.algo.ts:14 + // @baremethod({ onCreate: 'require' }) + txn ApplicationID + ! + assert // is creating + // tests/approvals/implicit-create.algo.ts:14-15 + // @baremethod({ onCreate: 'require' }) + // public create() {} + pushint 1 // 1 + retsub + +__puya_arc4_router___after_if_else@6: + // tests/approvals/implicit-create.algo.ts:21 + // export class ExplicitBareCreateFromBase extends BaseWithBareCreate {} + pushint 0 // 0 + retsub diff --git a/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.clear.teal b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.clear.teal new file mode 100644 index 00000000..886bca20 --- /dev/null +++ b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::ExplicitBareCreateFromBase.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/implicit-create/NoBare.approval.teal b/tests/approvals/out/implicit-create/NoBare.approval.teal new file mode 100644 index 00000000..e6e76264 --- /dev/null +++ b/tests/approvals/out/implicit-create/NoBare.approval.teal @@ -0,0 +1,48 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::NoBare.approvalProgram: + intcblock 0 1 + callsub __puya_arc4_router__ + return + + +// tests/approvals/implicit-create.algo.ts::NoBare.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/implicit-create.algo.ts:4 + // export class NoBare extends Contract { + proto 0 1 + txn NumAppArgs + bz __puya_arc4_router___bare_routing@5 + pushbytes 0xb8b5e4b9 // method "handleNoop()void" + txna ApplicationArgs 0 + match __puya_arc4_router___handleNoop_route@2 + intc_0 // 0 + retsub + +__puya_arc4_router___handleNoop_route@2: + // tests/approvals/implicit-create.algo.ts:5 + // @abimethod({ allowActions: 'NoOp' }) + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + intc_1 // 1 + retsub + +__puya_arc4_router___bare_routing@5: + // tests/approvals/implicit-create.algo.ts:4 + // export class NoBare extends Contract { + txn OnCompletion + bnz __puya_arc4_router___after_if_else@9 + txn ApplicationID + ! + assert // is creating + intc_1 // 1 + retsub + +__puya_arc4_router___after_if_else@9: + // tests/approvals/implicit-create.algo.ts:4 + // export class NoBare extends Contract { + intc_0 // 0 + retsub diff --git a/tests/approvals/out/implicit-create/NoBare.clear.teal b/tests/approvals/out/implicit-create/NoBare.clear.teal new file mode 100644 index 00000000..f8702e4f --- /dev/null +++ b/tests/approvals/out/implicit-create/NoBare.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::NoBare.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/implicit-create/NoNoOp.approval.teal b/tests/approvals/out/implicit-create/NoNoOp.approval.teal new file mode 100644 index 00000000..9eea73dd --- /dev/null +++ b/tests/approvals/out/implicit-create/NoNoOp.approval.teal @@ -0,0 +1,47 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::NoNoOp.approvalProgram: + intcblock 0 1 + callsub __puya_arc4_router__ + return + + +// tests/approvals/implicit-create.algo.ts::NoNoOp.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/implicit-create.algo.ts:8 + // export class NoNoOp extends Contract { + proto 0 1 + txn NumAppArgs + bnz __puya_arc4_router___after_if_else@7 + pushint 4 // 4 + intc_0 // 0 + txn OnCompletion + match __puya_arc4_router___handleUpdate@3 __puya_arc4_router_____algots__.defaultCreate@4 + intc_0 // 0 + retsub + +__puya_arc4_router___handleUpdate@3: + // tests/approvals/implicit-create.algo.ts:9 + // @baremethod({ allowActions: 'UpdateApplication' }) + txn ApplicationID + assert // is not creating + // tests/approvals/implicit-create.algo.ts:9-10 + // @baremethod({ allowActions: 'UpdateApplication' }) + // public handleUpdate() {} + intc_1 // 1 + retsub + +__puya_arc4_router_____algots__.defaultCreate@4: + // tests/approvals/implicit-create.algo.ts:8 + // export class NoNoOp extends Contract { + txn ApplicationID + ! + assert // is creating + intc_1 // 1 + retsub + +__puya_arc4_router___after_if_else@7: + // tests/approvals/implicit-create.algo.ts:8 + // export class NoNoOp extends Contract { + intc_0 // 0 + retsub diff --git a/tests/approvals/out/implicit-create/NoNoOp.clear.teal b/tests/approvals/out/implicit-create/NoNoOp.clear.teal new file mode 100644 index 00000000..606ab937 --- /dev/null +++ b/tests/approvals/out/implicit-create/NoNoOp.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/implicit-create.algo.ts::NoNoOp.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/inheritance-b/ConcreteArc4Contract.approval.teal b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.approval.teal new file mode 100644 index 00000000..33912af0 --- /dev/null +++ b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.approval.teal @@ -0,0 +1,111 @@ +#pragma version 10 + +tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.approvalProgram: + intcblock 1 0 + bytecblock 0x151f7c75 + callsub __puya_arc4_router__ + return + + +// tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/inheritance-b.algo.ts:14 + // export class ConcreteArc4Contract extends Arc4Contract { + proto 0 1 + txn NumAppArgs + bz __puya_arc4_router___bare_routing@6 + pushbytess 0xc73da9b9 0xf161dc37 // method "getVeryImportantValue()string", method "simpleAbiMethod(uint64,uint64)uint64" + txna ApplicationArgs 0 + match __puya_arc4_router___getVeryImportantValue_route@2 __puya_arc4_router___simpleAbiMethod_route@3 + intc_1 // 0 + retsub + +__puya_arc4_router___getVeryImportantValue_route@2: + // tests/approvals/inheritance-b.algo.ts:15 + // public getVeryImportantValue() { + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub getVeryImportantValue + dup + len + itob + extract 6 2 + swap + concat + bytec_0 // 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___simpleAbiMethod_route@3: + // tests/approvals/inheritance-a.algo.ts:17 + // public simpleAbiMethod(a: uint64, b: uint64): uint64 { + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/approvals/inheritance-b.algo.ts:14 + // export class ConcreteArc4Contract extends Arc4Contract { + txna ApplicationArgs 1 + btoi + txna ApplicationArgs 2 + btoi + // tests/approvals/inheritance-a.algo.ts:17 + // public simpleAbiMethod(a: uint64, b: uint64): uint64 { + callsub simpleAbiMethod + itob + bytec_0 // 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___bare_routing@6: + // tests/approvals/inheritance-b.algo.ts:14 + // export class ConcreteArc4Contract extends Arc4Contract { + txn OnCompletion + bnz __puya_arc4_router___after_if_else@10 + txn ApplicationID + ! + assert // is creating + intc_0 // 1 + retsub + +__puya_arc4_router___after_if_else@10: + // tests/approvals/inheritance-b.algo.ts:14 + // export class ConcreteArc4Contract extends Arc4Contract { + intc_1 // 0 + retsub + + +// tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.getVeryImportantValue() -> bytes: +getVeryImportantValue: + // tests/approvals/inheritance-b.algo.ts:15 + // public getVeryImportantValue() { + proto 0 1 + // tests/approvals/inheritance-a.algo.ts:22 + // export const VERY_IMPORTANT_VALUE = '42' + pushbytes "42" + // tests/approvals/inheritance-b.algo.ts:16 + // return VERY_IMPORTANT_VALUE + retsub + + +// tests/approvals/inheritance-a.algo.ts::Arc4Contract.simpleAbiMethod(a: uint64, b: uint64) -> uint64: +simpleAbiMethod: + // tests/approvals/inheritance-a.algo.ts:17 + // public simpleAbiMethod(a: uint64, b: uint64): uint64 { + proto 2 1 + // tests/approvals/inheritance-a.algo.ts:18 + // return a + b + frame_dig -2 + frame_dig -1 + + + retsub diff --git a/tests/approvals/out/inheritance-b/ConcreteArc4Contract.clear.teal b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.clear.teal new file mode 100644 index 00000000..4395c80a --- /dev/null +++ b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/inheritance-b/ConcreteSimpleContract.approval.teal b/tests/approvals/out/inheritance-b/ConcreteSimpleContract.approval.teal new file mode 100644 index 00000000..9f21af42 --- /dev/null +++ b/tests/approvals/out/inheritance-b/ConcreteSimpleContract.approval.teal @@ -0,0 +1,35 @@ +#pragma version 10 + +tests/approvals/inheritance-b.algo.ts::ConcreteSimpleContract.approvalProgram: + // tests/approvals/inheritance-b.algo.ts:7 + // const a = op.btoi(Txn.applicationArgs(0)) + pushint 0 // 0 + txnas ApplicationArgs + btoi + // tests/approvals/inheritance-b.algo.ts:8 + // const b = op.btoi(Txn.applicationArgs(1)) + pushint 1 // 1 + txnas ApplicationArgs + btoi + // tests/approvals/inheritance-b.algo.ts:9 + // log(this.simpleMethod(a, b)) + callsub simpleMethod + itob + log + // tests/approvals/inheritance-b.algo.ts:10 + // return 1 + pushint 1 // 1 + return + + +// tests/approvals/inheritance-a.algo.ts::SimpleContract.simpleMethod(a: uint64, b: uint64) -> uint64: +simpleMethod: + // tests/approvals/inheritance-a.algo.ts:6 + // public simpleMethod(a: uint64, b: uint64): uint64 { + proto 2 1 + // tests/approvals/inheritance-a.algo.ts:7 + // return a * b + frame_dig -2 + frame_dig -1 + * + retsub diff --git a/tests/approvals/out/inheritance-b/ConcreteSimpleContract.clear.teal b/tests/approvals/out/inheritance-b/ConcreteSimpleContract.clear.teal new file mode 100644 index 00000000..c267c61a --- /dev/null +++ b/tests/approvals/out/inheritance-b/ConcreteSimpleContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/inheritance-b.algo.ts::ConcreteSimpleContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/itxn/ItxnDemoContract.approval.teal b/tests/approvals/out/itxn/ItxnDemoContract.approval.teal new file mode 100644 index 00000000..6c12d30c --- /dev/null +++ b/tests/approvals/out/itxn/ItxnDemoContract.approval.teal @@ -0,0 +1,459 @@ +#pragma version 10 + +tests/approvals/itxn.algo.ts::ItxnDemoContract.approvalProgram: + intcblock 0 3 1 1000 + bytecblock "name" "unit" 0x098101 "AST1" "AST2" "AST3" "3rd" "with args param set" "\t\xc2\x81\x01" + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/itxn.algo.ts:11 + // if (Txn.numAppArgs) { + txn NumAppArgs + bz main_after_if_else@15 + // tests/approvals/itxn.algo.ts:12 + // switch (Txn.applicationArgs(0)) { + intc_0 // 0 + txnas ApplicationArgs + // tests/approvals/itxn.algo.ts:13 + // case Bytes('test1'): + pushbytess "test1" "test2" "test3" "test4" // "test1", "test2", "test3", "test4" + // tests/approvals/itxn.algo.ts:12-22 + // switch (Txn.applicationArgs(0)) { + // case Bytes('test1'): + // this.test1() + // break + // case Bytes('test2'): + // this.test2() + // break + // case Bytes('test3'): + // case Bytes('test4'): + // break + // } + uncover 4 + match main_switch_case_0@4 main_switch_case_1@6 main_after_if_else@15 main_after_if_else@15 + // tests/approvals/itxn.algo.ts:24 + // return true + intc_2 // 1 + return + +main_switch_case_0@4: + // tests/approvals/itxn.algo.ts:14 + // this.test1() + callsub test1 + // tests/approvals/itxn.algo.ts:15 + // break + b main_after_if_else@15 + +main_switch_case_1@6: + // tests/approvals/itxn.algo.ts:17 + // this.test2() + callsub test2 + +main_after_if_else@15: + // tests/approvals/itxn.algo.ts:24 + // return true + intc_2 // 1 + return + + +// tests/approvals/itxn.algo.ts::ItxnDemoContract.constructor() -> void: +constructor: + // tests/approvals/itxn.algo.ts:7 + // export class ItxnDemoContract extends BaseContract { + proto 0 0 + // tests/approvals/itxn.algo.ts:8 + // name = GlobalState({ initialValue: Bytes() }) + bytec_0 // "name" + pushbytes 0x + app_global_put + retsub + + +// tests/approvals/itxn.algo.ts::ItxnDemoContract.test1() -> void: +test1: + // tests/approvals/itxn.algo.ts:27 + // private test1() { + proto 0 0 + // tests/approvals/itxn.algo.ts:8 + // name = GlobalState({ initialValue: Bytes() }) + bytec_0 // "name" + // tests/approvals/itxn.algo.ts:28 + // this.name.value = Bytes('AST1') + bytec_3 // "AST1" + app_global_put + // tests/approvals/itxn.algo.ts:32 + // assetName: this.name.value, + intc_0 // 0 + // tests/approvals/itxn.algo.ts:8 + // name = GlobalState({ initialValue: Bytes() }) + bytec_0 // "name" + // tests/approvals/itxn.algo.ts:32 + // assetName: this.name.value, + app_global_get_ex + assert // check GlobalState exists + // tests/approvals/itxn.algo.ts:35 + // manager: Global.currentApplicationAddress, + global CurrentApplicationAddress + // tests/approvals/itxn.algo.ts:36 + // reserve: Global.currentApplicationAddress, + dup + // tests/approvals/itxn.algo.ts:8 + // name = GlobalState({ initialValue: Bytes() }) + bytec_0 // "name" + // tests/approvals/itxn.algo.ts:39 + // this.name.value = Bytes('AST2') + bytec 4 // "AST2" + app_global_put + // tests/approvals/itxn.algo.ts:40 + // const asset1_txn = assetParams.submit() + itxn_begin + dup + itxn_field ConfigAssetReserve + dig 1 + itxn_field ConfigAssetManager + // tests/approvals/itxn.algo.ts:34 + // decimals: 3, + intc_1 // 3 + itxn_field ConfigAssetDecimals + // tests/approvals/itxn.algo.ts:33 + // unitName: 'unit', + bytec_1 // "unit" + itxn_field ConfigAssetUnitName + uncover 2 + itxn_field ConfigAssetName + // tests/approvals/itxn.algo.ts:31 + // total: 1000, + intc_3 // 1000 + itxn_field ConfigAssetTotal + // tests/approvals/itxn.algo.ts:30-37 + // const assetParams = itxn.assetConfig({ + // total: 1000, + // assetName: this.name.value, + // unitName: 'unit', + // decimals: 3, + // manager: Global.currentApplicationAddress, + // reserve: Global.currentApplicationAddress, + // }) + intc_0 // 0 + itxn_field Fee + // tests/approvals/itxn.algo.ts:40 + // const asset1_txn = assetParams.submit() + itxn_submit + itxn ConfigAssetName + itxn CreatedAssetID + // tests/approvals/itxn.algo.ts:42 + // assetName: this.name.value, + intc_0 // 0 + // tests/approvals/itxn.algo.ts:8 + // name = GlobalState({ initialValue: Bytes() }) + bytec_0 // "name" + // tests/approvals/itxn.algo.ts:42 + // assetName: this.name.value, + app_global_get_ex + assert // check GlobalState exists + // tests/approvals/itxn.algo.ts:44 + // const asset2_txn = assetParams.submit() + itxn_begin + dig 3 + itxn_field ConfigAssetReserve + dig 4 + itxn_field ConfigAssetManager + // tests/approvals/itxn.algo.ts:34 + // decimals: 3, + intc_1 // 3 + itxn_field ConfigAssetDecimals + // tests/approvals/itxn.algo.ts:33 + // unitName: 'unit', + bytec_1 // "unit" + itxn_field ConfigAssetUnitName + itxn_field ConfigAssetName + // tests/approvals/itxn.algo.ts:31 + // total: 1000, + intc_3 // 1000 + itxn_field ConfigAssetTotal + // tests/approvals/itxn.algo.ts:30-37 + // const assetParams = itxn.assetConfig({ + // total: 1000, + // assetName: this.name.value, + // unitName: 'unit', + // decimals: 3, + // manager: Global.currentApplicationAddress, + // reserve: Global.currentApplicationAddress, + // }) + intc_0 // 0 + itxn_field Fee + // tests/approvals/itxn.algo.ts:44 + // const asset2_txn = assetParams.submit() + itxn_submit + itxn ConfigAssetName + itxn CreatedAssetID + // tests/approvals/itxn.algo.ts:46 + // assert(asset1_txn.assetName === Bytes('AST1'), 'asset1_txn is correct') + uncover 3 + bytec_3 // "AST1" + == + assert // asset1_txn is correct + // tests/approvals/itxn.algo.ts:47 + // assert(asset2_txn.assetName === Bytes('AST2'), 'asset2_txn is correct') + swap + bytec 4 // "AST2" + == + assert // asset2_txn is correct + // tests/approvals/itxn.algo.ts:48 + // assert(asset1_txn.createdAsset.name === Bytes('AST1'), 'created asset 1 is correct') + swap + asset_params_get AssetName + assert // asset exists + bytec_3 // "AST1" + == + assert // created asset 1 is correct + // tests/approvals/itxn.algo.ts:49 + // assert(asset2_txn.createdAsset.name === Bytes('AST2'), 'created asset 2 is correct') + asset_params_get AssetName + assert // asset exists + bytec 4 // "AST2" + == + assert // created asset 2 is correct + // tests/approvals/itxn.algo.ts:61 + // const [appCreateTxn, asset3_txn] = itxn.submitGroup(appCreateParams, assetParams) + itxn_begin + // tests/approvals/itxn.algo.ts:53 + // clearStateProgram: Bytes.fromHex('098101'), + bytec_2 // 0x098101 + itxn_field ClearStateProgram + // tests/approvals/itxn.algo.ts:52 + // approvalProgram: Bytes.fromHex('098101'), + bytec_2 // 0x098101 + itxn_field ApprovalProgram + // tests/approvals/itxn.algo.ts:54 + // fee: 0, + intc_0 // 0 + itxn_field Fee + // tests/approvals/itxn.algo.ts:61 + // const [appCreateTxn, asset3_txn] = itxn.submitGroup(appCreateParams, assetParams) + itxn_next + dup + itxn_field ConfigAssetReserve + dig 1 + itxn_field ConfigAssetManager + // tests/approvals/itxn.algo.ts:34 + // decimals: 3, + intc_1 // 3 + itxn_field ConfigAssetDecimals + // tests/approvals/itxn.algo.ts:33 + // unitName: 'unit', + bytec_1 // "unit" + itxn_field ConfigAssetUnitName + // tests/approvals/itxn.algo.ts:58 + // assetName: 'AST3', + bytec 5 // "AST3" + itxn_field ConfigAssetName + // tests/approvals/itxn.algo.ts:31 + // total: 1000, + intc_3 // 1000 + itxn_field ConfigAssetTotal + // tests/approvals/itxn.algo.ts:30-37 + // const assetParams = itxn.assetConfig({ + // total: 1000, + // assetName: this.name.value, + // unitName: 'unit', + // decimals: 3, + // manager: Global.currentApplicationAddress, + // reserve: Global.currentApplicationAddress, + // }) + intc_0 // 0 + itxn_field Fee + // tests/approvals/itxn.algo.ts:61 + // const [appCreateTxn, asset3_txn] = itxn.submitGroup(appCreateParams, assetParams) + itxn_submit + itxn ConfigAssetName + gitxn 0 ApplicationID + // tests/approvals/itxn.algo.ts:63 + // assert(appCreateTxn.appId, 'app is created') + assert // app is created + // tests/approvals/itxn.algo.ts:64 + // assert(asset3_txn.assetName === Bytes('AST3'), 'asset3_txn is correct') + bytec 5 // "AST3" + == + assert // asset3_txn is correct + // tests/approvals/itxn.algo.ts:72 + // itxn.submitGroup(appCreateParams, assetParams) + itxn_begin + // tests/approvals/itxn.algo.ts:67 + // note: '3rd', + bytec 6 // "3rd" + itxn_field Note + // tests/approvals/itxn.algo.ts:53 + // clearStateProgram: Bytes.fromHex('098101'), + bytec_2 // 0x098101 + itxn_field ClearStateProgram + // tests/approvals/itxn.algo.ts:52 + // approvalProgram: Bytes.fromHex('098101'), + bytec_2 // 0x098101 + itxn_field ApprovalProgram + // tests/approvals/itxn.algo.ts:54 + // fee: 0, + intc_0 // 0 + itxn_field Fee + // tests/approvals/itxn.algo.ts:72 + // itxn.submitGroup(appCreateParams, assetParams) + itxn_next + // tests/approvals/itxn.algo.ts:70 + // note: '3rd', + bytec 6 // "3rd" + itxn_field Note + itxn_field ConfigAssetReserve + itxn_field ConfigAssetManager + // tests/approvals/itxn.algo.ts:34 + // decimals: 3, + intc_1 // 3 + itxn_field ConfigAssetDecimals + // tests/approvals/itxn.algo.ts:33 + // unitName: 'unit', + bytec_1 // "unit" + itxn_field ConfigAssetUnitName + // tests/approvals/itxn.algo.ts:58 + // assetName: 'AST3', + bytec 5 // "AST3" + itxn_field ConfigAssetName + // tests/approvals/itxn.algo.ts:31 + // total: 1000, + intc_3 // 1000 + itxn_field ConfigAssetTotal + // tests/approvals/itxn.algo.ts:30-37 + // const assetParams = itxn.assetConfig({ + // total: 1000, + // assetName: this.name.value, + // unitName: 'unit', + // decimals: 3, + // manager: Global.currentApplicationAddress, + // reserve: Global.currentApplicationAddress, + // }) + intc_0 // 0 + itxn_field Fee + // tests/approvals/itxn.algo.ts:72 + // itxn.submitGroup(appCreateParams, assetParams) + itxn_submit + retsub + + +// tests/approvals/itxn.algo.ts::ItxnDemoContract.test2() -> void: +test2: + // tests/approvals/itxn.algo.ts:75 + // private test2() { + proto 0 0 + intc_0 // 0 + dupn 2 + pushbytes "" + dupn 2 + // tests/approvals/itxn.algo.ts:77 + // if (Txn.numAppArgs) { + txn NumAppArgs + bz test2_else_body@2 + // tests/approvals/itxn.algo.ts:78 + // const args = [Bytes('1'), Bytes('2')] as const + pushbytes "1" + frame_bury 0 + pushbytes "2" + frame_bury 1 + // tests/approvals/itxn.algo.ts:82 + // appArgs: args, + pushint 2 // 2 + frame_bury 3 + // tests/approvals/itxn.algo.ts:83 + // onCompletion: OnCompleteAction.NoOp, + intc_0 // 0 + frame_bury 5 + intc_2 // 1 + frame_bury 4 + // tests/approvals/itxn.algo.ts:84 + // note: 'with args param set', + bytec 7 // "with args param set" + b test2_after_if_else@3 + +test2_else_body@2: + // tests/approvals/itxn.algo.ts:90 + // appArgs: [Bytes('3'), '4', Bytes('5')], + pushbytes "3" + frame_bury 0 + pushbytes "4" + frame_bury 1 + pushbytes "5" + frame_bury 2 + intc_1 // 3 + frame_bury 3 + // tests/approvals/itxn.algo.ts:91 + // note: 'no args param set', + pushbytes "no args param set" + // tests/approvals/itxn.algo.ts:87 + // createAppParams = itxn.applicationCall({ + intc_0 // 0 + frame_bury 4 + +test2_after_if_else@3: + // tests/approvals/itxn.algo.ts:94 + // const createAppTxn = createAppParams.submit() + itxn_begin + itxn_field Note + frame_dig 4 + intc_2 // 1 + >= + bz test2_next_field@5 + frame_dig 5 + itxn_field OnCompletion + +test2_next_field@5: + frame_dig 0 + itxn_field ApplicationArgs + frame_dig 1 + itxn_field ApplicationArgs + frame_dig 3 + intc_1 // 3 + >= + // tests/approvals/itxn.algo.ts:94 + // const createAppTxn = createAppParams.submit() + bz test2_next_field@7 + frame_dig 2 + itxn_field ApplicationArgs + +test2_next_field@7: + // tests/approvals/itxn.algo.ts:5 + // const APPROVE = Bytes('\x09\x81\x01') + bytec 8 // "\t\xc2\x81\x01" + itxn_field ClearStateProgram + bytec 8 // "\t\xc2\x81\x01" + itxn_field ApprovalProgram + // tests/approvals/itxn.algo.ts:79-85 + // createAppParams = itxn.applicationCall({ + // approvalProgram: APPROVE, + // clearStateProgram: APPROVE, + // appArgs: args, + // onCompletion: OnCompleteAction.NoOp, + // note: 'with args param set', + // }) + intc_0 // 0 + itxn_field Fee + // tests/approvals/itxn.algo.ts:94 + // const createAppTxn = createAppParams.submit() + itxn_submit + itxn Note + // tests/approvals/itxn.algo.ts:95 + // assert(createAppTxn.appArgs(0) === Bytes('1'), 'correct args used 1') + itxna ApplicationArgs 0 + pushbytes "1" + == + assert // correct args used 1 + // tests/approvals/itxn.algo.ts:96 + // assert(createAppTxn.appArgs(1) === Bytes('2'), 'correct args used 2') + itxna ApplicationArgs 1 + pushbytes "2" + == + assert // correct args used 2 + // tests/approvals/itxn.algo.ts:97 + // assert(createAppTxn.note === Bytes('with args param set')) + bytec 7 // "with args param set" + == + assert + retsub diff --git a/tests/approvals/out/itxn/ItxnDemoContract.clear.teal b/tests/approvals/out/itxn/ItxnDemoContract.clear.teal new file mode 100644 index 00000000..e2af30bc --- /dev/null +++ b/tests/approvals/out/itxn/ItxnDemoContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/itxn.algo.ts::ItxnDemoContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/local-state/LocalStateDemo.approval.teal b/tests/approvals/out/local-state/LocalStateDemo.approval.teal new file mode 100644 index 00000000..fc01fd7b --- /dev/null +++ b/tests/approvals/out/local-state/LocalStateDemo.approval.teal @@ -0,0 +1,312 @@ +#pragma version 10 + +tests/approvals/local-state.algo.ts::LocalStateDemo.approvalProgram: + intcblock 0 1 + bytecblock "l1" "localUint2" "b1" "localBytes2" "localEncoded" + callsub __puya_arc4_router__ + return + + +// tests/approvals/local-state.algo.ts::LocalStateDemo.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/local-state.algo.ts:7 + // export class LocalStateDemo extends Contract { + proto 0 1 + txn NumAppArgs + bz __puya_arc4_router___bare_routing@7 + pushbytess 0xaaefcb43 0x67816cc5 0x11170534 // method "setState((uint64,byte[]),uint64[10])void", method "getState()(uint64,uint64,byte[],byte[],uint64[10])", method "clearState()void" + txna ApplicationArgs 0 + match __puya_arc4_router___setState_route@2 __puya_arc4_router___getState_route@3 __puya_arc4_router___clearState_route@4 + intc_0 // 0 + retsub + +__puya_arc4_router___setState_route@2: + // tests/approvals/local-state.algo.ts:14 + // public setState({ a, b }: { a: uint64; b: bytes }, c: SampleArray) { + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + // tests/approvals/local-state.algo.ts:7 + // export class LocalStateDemo extends Contract { + txna ApplicationArgs 1 + dup + extract 0 8 // on error: Index access is out of bounds + btoi + dig 1 + pushint 8 // 8 + extract_uint16 + dig 2 + len + uncover 3 + cover 2 + substring3 + extract 2 0 + txna ApplicationArgs 2 + // tests/approvals/local-state.algo.ts:14 + // public setState({ a, b }: { a: uint64; b: bytes }, c: SampleArray) { + callsub setState + intc_1 // 1 + retsub + +__puya_arc4_router___getState_route@3: + // tests/approvals/local-state.algo.ts:22 + // public getState() { + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub getState + uncover 4 + itob + uncover 4 + itob + dig 4 + len + itob + extract 6 2 + uncover 5 + concat + dig 4 + len + itob + extract 6 2 + uncover 5 + concat + uncover 3 + uncover 3 + concat + pushbytes 0x0064 + concat + dig 2 + len + pushint 100 // 100 + + + itob + extract 6 2 + concat + uncover 3 + concat + uncover 2 + concat + swap + concat + pushbytes 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___clearState_route@4: + // tests/approvals/local-state.algo.ts:32 + // public clearState() { + txn OnCompletion + ! + assert // OnCompletion is NoOp + txn ApplicationID + assert // is not creating + callsub clearState + intc_1 // 1 + retsub + +__puya_arc4_router___bare_routing@7: + // tests/approvals/local-state.algo.ts:7 + // export class LocalStateDemo extends Contract { + txn OnCompletion + bnz __puya_arc4_router___after_if_else@11 + txn ApplicationID + ! + assert // is creating + intc_1 // 1 + retsub + +__puya_arc4_router___after_if_else@11: + // tests/approvals/local-state.algo.ts:7 + // export class LocalStateDemo extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/local-state.algo.ts::LocalStateDemo.setState(p.a: uint64, p.b: bytes, c: bytes) -> void: +setState: + // tests/approvals/local-state.algo.ts:14 + // public setState({ a, b }: { a: uint64; b: bytes }, c: SampleArray) { + proto 3 0 + // tests/approvals/local-state.algo.ts:15 + // this.localUint(Txn.sender).value = a + txn Sender + // tests/approvals/local-state.algo.ts:8 + // localUint = LocalState({ key: 'l1' }) + bytec_0 // "l1" + // tests/approvals/local-state.algo.ts:15 + // this.localUint(Txn.sender).value = a + frame_dig -3 + app_local_put + // tests/approvals/local-state.algo.ts:16 + // this.localUint2(Txn.sender).value = a + txn Sender + // tests/approvals/local-state.algo.ts:9 + // localUint2 = LocalState() + bytec_1 // "localUint2" + // tests/approvals/local-state.algo.ts:16 + // this.localUint2(Txn.sender).value = a + frame_dig -3 + app_local_put + // tests/approvals/local-state.algo.ts:17 + // this.localBytes(Txn.sender).value = b + txn Sender + // tests/approvals/local-state.algo.ts:10 + // localBytes = LocalState({ key: 'b1' }) + bytec_2 // "b1" + // tests/approvals/local-state.algo.ts:17 + // this.localBytes(Txn.sender).value = b + frame_dig -2 + app_local_put + // tests/approvals/local-state.algo.ts:18 + // this.localBytes2(Txn.sender).value = b + txn Sender + // tests/approvals/local-state.algo.ts:11 + // localBytes2 = LocalState() + bytec_3 // "localBytes2" + // tests/approvals/local-state.algo.ts:18 + // this.localBytes2(Txn.sender).value = b + frame_dig -2 + app_local_put + // tests/approvals/local-state.algo.ts:19 + // this.localEncoded(Txn.sender).value = c.copy() + txn Sender + // tests/approvals/local-state.algo.ts:12 + // localEncoded = LocalState() + bytec 4 // "localEncoded" + // tests/approvals/local-state.algo.ts:19 + // this.localEncoded(Txn.sender).value = c.copy() + frame_dig -1 + app_local_put + retsub + + +// tests/approvals/local-state.algo.ts::LocalStateDemo.getState() -> uint64, uint64, bytes, bytes, bytes: +getState: + // tests/approvals/local-state.algo.ts:22 + // public getState() { + proto 0 5 + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:8 + // localUint = LocalState({ key: 'l1' }) + bytec_0 // "l1" + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + app_local_get_ex + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:9 + // localUint2 = LocalState() + bytec_1 // "localUint2" + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + app_local_get_ex + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:10 + // localBytes = LocalState({ key: 'b1' }) + bytec_2 // "b1" + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + app_local_get_ex + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:11 + // localBytes2 = LocalState() + bytec_3 // "localBytes2" + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + app_local_get_ex + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:12 + // localEncoded = LocalState() + bytec 4 // "localEncoded" + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + app_local_get_ex + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:23-29 + // return { + // localUint: this.localUint(Txn.sender).value, + // localUint2: this.localUint2(Txn.sender).value, + // localBytes: this.localBytes(Txn.sender).value, + // localBytes2: this.localBytes2(Txn.sender).value, + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + // } + retsub + + +// tests/approvals/local-state.algo.ts::LocalStateDemo.clearState() -> void: +clearState: + // tests/approvals/local-state.algo.ts:32 + // public clearState() { + proto 0 0 + // tests/approvals/local-state.algo.ts:33 + // this.localUint(Txn.sender).delete() + txn Sender + // tests/approvals/local-state.algo.ts:8 + // localUint = LocalState({ key: 'l1' }) + bytec_0 // "l1" + // tests/approvals/local-state.algo.ts:33 + // this.localUint(Txn.sender).delete() + app_local_del + // tests/approvals/local-state.algo.ts:34 + // this.localUint2(Txn.sender).delete() + txn Sender + // tests/approvals/local-state.algo.ts:9 + // localUint2 = LocalState() + bytec_1 // "localUint2" + // tests/approvals/local-state.algo.ts:34 + // this.localUint2(Txn.sender).delete() + app_local_del + // tests/approvals/local-state.algo.ts:35 + // this.localBytes(Txn.sender).delete() + txn Sender + // tests/approvals/local-state.algo.ts:10 + // localBytes = LocalState({ key: 'b1' }) + bytec_2 // "b1" + // tests/approvals/local-state.algo.ts:35 + // this.localBytes(Txn.sender).delete() + app_local_del + // tests/approvals/local-state.algo.ts:36 + // this.localBytes2(Txn.sender).delete() + txn Sender + // tests/approvals/local-state.algo.ts:11 + // localBytes2 = LocalState() + bytec_3 // "localBytes2" + // tests/approvals/local-state.algo.ts:36 + // this.localBytes2(Txn.sender).delete() + app_local_del + // tests/approvals/local-state.algo.ts:37 + // this.localEncoded(Txn.sender).delete() + txn Sender + // tests/approvals/local-state.algo.ts:12 + // localEncoded = LocalState() + bytec 4 // "localEncoded" + // tests/approvals/local-state.algo.ts:37 + // this.localEncoded(Txn.sender).delete() + app_local_del + retsub diff --git a/tests/approvals/out/local-state/LocalStateDemo.clear.teal b/tests/approvals/out/local-state/LocalStateDemo.clear.teal new file mode 100644 index 00000000..1f872c5f --- /dev/null +++ b/tests/approvals/out/local-state/LocalStateDemo.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/local-state.algo.ts::LocalStateDemo.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/non-arc4/HelloWorldContract.approval.teal b/tests/approvals/out/non-arc4/HelloWorldContract.approval.teal new file mode 100644 index 00000000..aeaf0b5f --- /dev/null +++ b/tests/approvals/out/non-arc4/HelloWorldContract.approval.teal @@ -0,0 +1,17 @@ +#pragma version 10 + +tests/approvals/non-arc4.algo.ts::HelloWorldContract.approvalProgram: + // tests/approvals/non-arc4.algo.ts:5 + // const name = String(op.Txn.applicationArgs(0)) + pushint 0 // 0 + txnas ApplicationArgs + // tests/approvals/non-arc4.algo.ts:6 + // log(`Hello, ${name}`) + pushbytes "Hello, " + swap + concat + log + // tests/approvals/non-arc4.algo.ts:7 + // return true + pushint 1 // 1 + return diff --git a/tests/approvals/out/non-arc4/HelloWorldContract.clear.teal b/tests/approvals/out/non-arc4/HelloWorldContract.clear.teal new file mode 100644 index 00000000..095a92a3 --- /dev/null +++ b/tests/approvals/out/non-arc4/HelloWorldContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/non-arc4.algo.ts::HelloWorldContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/pre-approved-sale/PreApprovedSale.teal b/tests/approvals/out/pre-approved-sale/PreApprovedSale.teal index e2f1f0f4..b89ff7bd 100644 --- a/tests/approvals/out/pre-approved-sale/PreApprovedSale.teal +++ b/tests/approvals/out/pre-approved-sale/PreApprovedSale.teal @@ -3,22 +3,22 @@ tests/approvals/pre-approved-sale.algo.ts::PreApprovedSale: intcblock 1 0 TMPL_PRICE TMPL_ASSET bytecblock TMPL_SELLER - // tests/approvals/pre-approved-sale.algo.ts:6 + // tests/approvals/pre-approved-sale.algo.ts:12 // const seller = TemplateVar('SELLER') bytec_0 // TMPL_SELLER - // tests/approvals/pre-approved-sale.algo.ts:7 + // tests/approvals/pre-approved-sale.algo.ts:13 // const price = TemplateVar('PRICE') intc_2 // TMPL_PRICE - // tests/approvals/pre-approved-sale.algo.ts:8 + // tests/approvals/pre-approved-sale.algo.ts:14 // const asset = TemplateVar('ASSET') intc_3 // TMPL_ASSET - // tests/approvals/pre-approved-sale.algo.ts:6 + // tests/approvals/pre-approved-sale.algo.ts:12 // const seller = TemplateVar('SELLER') bytec_0 // TMPL_SELLER - // tests/approvals/pre-approved-sale.algo.ts:10 + // tests/approvals/pre-approved-sale.algo.ts:16 // const payTxn = gtxn.PaymentTxn(0) intc_1 // 0 - // tests/approvals/pre-approved-sale.algo.ts:12-15 + // tests/approvals/pre-approved-sale.algo.ts:18-21 // assertMatch(payTxn, { // receiver: seller, // amount: price, @@ -26,10 +26,10 @@ tests/approvals/pre-approved-sale.algo.ts::PreApprovedSale: gtxns Receiver == bz main_bool_false@3 - // tests/approvals/pre-approved-sale.algo.ts:10 + // tests/approvals/pre-approved-sale.algo.ts:16 // const payTxn = gtxn.PaymentTxn(0) intc_1 // 0 - // tests/approvals/pre-approved-sale.algo.ts:12-15 + // tests/approvals/pre-approved-sale.algo.ts:18-21 // assertMatch(payTxn, { // receiver: seller, // amount: price, @@ -45,16 +45,16 @@ main_bool_false@3: intc_1 // 0 main_bool_merge@4: - // tests/approvals/pre-approved-sale.algo.ts:12-15 + // tests/approvals/pre-approved-sale.algo.ts:18-21 // assertMatch(payTxn, { // receiver: seller, // amount: price, // }) assert // assert target is match for conditions - // tests/approvals/pre-approved-sale.algo.ts:11 + // tests/approvals/pre-approved-sale.algo.ts:17 // const assetTxn = gtxn.AssetTransferTxn(1) intc_0 // 1 - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -63,10 +63,10 @@ main_bool_merge@4: // rekeyTo: Global.zeroAddress, // }) gtxns AssetAmount - // tests/approvals/pre-approved-sale.algo.ts:18 + // tests/approvals/pre-approved-sale.algo.ts:24 // assetAmount: Uint64(1), intc_0 // 1 - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -76,10 +76,10 @@ main_bool_merge@4: // }) == bz main_bool_false@10 - // tests/approvals/pre-approved-sale.algo.ts:11 + // tests/approvals/pre-approved-sale.algo.ts:17 // const assetTxn = gtxn.AssetTransferTxn(1) intc_0 // 1 - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -91,10 +91,10 @@ main_bool_merge@4: dig 3 == bz main_bool_false@10 - // tests/approvals/pre-approved-sale.algo.ts:11 + // tests/approvals/pre-approved-sale.algo.ts:17 // const assetTxn = gtxn.AssetTransferTxn(1) intc_0 // 1 - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -106,10 +106,10 @@ main_bool_merge@4: dig 1 == bz main_bool_false@10 - // tests/approvals/pre-approved-sale.algo.ts:11 + // tests/approvals/pre-approved-sale.algo.ts:17 // const assetTxn = gtxn.AssetTransferTxn(1) intc_0 // 1 - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -118,10 +118,10 @@ main_bool_merge@4: // rekeyTo: Global.zeroAddress, // }) gtxns AssetCloseTo - // tests/approvals/pre-approved-sale.algo.ts:21 + // tests/approvals/pre-approved-sale.algo.ts:27 // assetCloseTo: Global.zeroAddress, global ZeroAddress - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -131,10 +131,10 @@ main_bool_merge@4: // }) == bz main_bool_false@10 - // tests/approvals/pre-approved-sale.algo.ts:11 + // tests/approvals/pre-approved-sale.algo.ts:17 // const assetTxn = gtxn.AssetTransferTxn(1) intc_0 // 1 - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -143,10 +143,10 @@ main_bool_merge@4: // rekeyTo: Global.zeroAddress, // }) gtxns RekeyTo - // tests/approvals/pre-approved-sale.algo.ts:22 + // tests/approvals/pre-approved-sale.algo.ts:28 // rekeyTo: Global.zeroAddress, global ZeroAddress - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -163,7 +163,7 @@ main_bool_false@10: intc_1 // 0 main_bool_merge@11: - // tests/approvals/pre-approved-sale.algo.ts:17-23 + // tests/approvals/pre-approved-sale.algo.ts:23-29 // assertMatch(assetTxn, { // assetAmount: Uint64(1), // sender: seller, @@ -172,7 +172,7 @@ main_bool_merge@11: // rekeyTo: Global.zeroAddress, // }) assert // assert target is match for conditions - // tests/approvals/pre-approved-sale.algo.ts:25 + // tests/approvals/pre-approved-sale.algo.ts:31 // return true intc_0 // 1 return diff --git a/tests/approvals/out/property-ordering/Demo.approval.teal b/tests/approvals/out/property-ordering/Demo.approval.teal new file mode 100644 index 00000000..2f032977 --- /dev/null +++ b/tests/approvals/out/property-ordering/Demo.approval.teal @@ -0,0 +1,7 @@ +#pragma version 10 + +tests/approvals/property-ordering.algo.ts::Demo.approvalProgram: + // tests/approvals/property-ordering.algo.ts:24 + // return true + pushint 1 // 1 + return diff --git a/tests/approvals/out/property-ordering/Demo.clear.teal b/tests/approvals/out/property-ordering/Demo.clear.teal new file mode 100644 index 00000000..70c45f2c --- /dev/null +++ b/tests/approvals/out/property-ordering/Demo.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/property-ordering.algo.ts::Demo.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.approval.teal b/tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.approval.teal new file mode 100644 index 00000000..c996dc9a --- /dev/null +++ b/tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.approval.teal @@ -0,0 +1,43 @@ +#pragma version 10 + +tests/approvals/shadowed-variables.algo.ts::ShadowedVariablesAlgo.approvalProgram: + bytecblock "123" + // tests/approvals/shadowed-variables.algo.ts:8 + // const [b, u, f] = this.getValues() + callsub getValues + // tests/approvals/shadowed-variables.algo.ts:4 + // const a = Bytes('123') + bytec_0 // "123" + // tests/approvals/shadowed-variables.algo.ts:9 + // assert(a === b, 'a should be module const (bytes)') + uncover 3 + == + assert // a should be module const (bytes) + // tests/approvals/shadowed-variables.algo.ts:12 + // assert(a === 123, 'a should be local const (uint)') + swap + pushint 123 // 123 + == + assert // a should be local const (uint) + // tests/approvals/shadowed-variables.algo.ts:15 + // assert(!a, 'a should be local let (bool)') + ! + assert // a should be local let (bool) + // tests/approvals/shadowed-variables.algo.ts:25 + // return true + pushint 1 // 1 + return + + +// tests/approvals/shadowed-variables.algo.ts::ShadowedVariablesAlgo.getValues() -> bytes, uint64, uint64: +getValues: + // tests/approvals/shadowed-variables.algo.ts:28 + // private getValues(): [bytes, uint64, boolean] { + proto 0 3 + // tests/approvals/shadowed-variables.algo.ts:4 + // const a = Bytes('123') + bytec_0 // "123" + // tests/approvals/shadowed-variables.algo.ts:29 + // return [a, Uint64(123), false] + pushints 123 0 // 123, 0 + retsub diff --git a/tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.clear.teal b/tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.clear.teal new file mode 100644 index 00000000..5638c66c --- /dev/null +++ b/tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/shadowed-variables.algo.ts::ShadowedVariablesAlgo.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/expected-output/_run.spec.ts b/tests/expected-output.spec.ts similarity index 93% rename from tests/expected-output/_run.spec.ts rename to tests/expected-output.spec.ts index 1e24d3fe..ba4cd521 100644 --- a/tests/expected-output/_run.spec.ts +++ b/tests/expected-output.spec.ts @@ -1,12 +1,12 @@ import ts from 'typescript' import { describe, it } from 'vitest' -import { compile } from '../../src' -import { SourceLocation } from '../../src/awst/source-location' -import { buildCompileOptions } from '../../src/compile-options' -import type { LogEvent } from '../../src/logger' -import { LoggingContext, LogLevel } from '../../src/logger' -import { defaultPuyaOptions } from '../../src/puya/options' -import { enumFromValue, invariant } from '../../src/util' +import { compile } from '../src' +import { SourceLocation } from '../src/awst/source-location' +import { buildCompileOptions } from '../src/compile-options' +import type { LogEvent } from '../src/logger' +import { LoggingContext, LogLevel } from '../src/logger' +import { defaultPuyaOptions } from '../src/puya/options' +import { enumFromValue, invariant } from '../src/util' /** * Verify that specific code produces specific compiler output. From 73ef7a683baa81e3873a1fcd16d497f26418b884 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Tue, 12 Nov 2024 17:58:10 +1000 Subject: [PATCH 03/30] test: Uncomment and add test for implicit struct casting to object type + use unoptimized teal --- src/cli.ts | 9 +- tests/approvals.spec.ts | 3 +- tests/approvals/arc4-struct.algo.ts | 11 +- .../AbiDecorators.approval.teal | 107 +- .../abi-decorators/AbiDecorators.arc32.json | 2 +- .../out/abi-decorators/AbiDecorators.ssa.ir | 18 +- .../out/abi-decorators/abi-decorators.awst | 56 - .../abi-decorators/abi-decorators.awst.json | 3 +- .../accounts/AccountsContract.approval.teal | 174 +- .../out/accounts/AccountsContract.arc32.json | 69 +- .../out/accounts/AccountsContract.ssa.ir | 6 +- tests/approvals/out/accounts/accounts.awst | 39 - .../approvals/out/accounts/accounts.awst.json | 3 +- .../out/arc4-struct/StructDemo.approval.teal | 207 +- .../out/arc4-struct/StructDemo.arc32.json | 35 +- .../out/arc4-struct/StructDemo.ssa.ir | 76 +- .../out/arc4-struct/arc4-struct.awst | 48 - .../out/arc4-struct/arc4-struct.awst.json | 1878 ++++++++++++++++- .../Arc4TypesTestContract.approval.teal | 201 +- .../arc4-types/Arc4TypesTestContract.ssa.ir | 4 +- .../approvals/out/arc4-types/arc4-types.awst | 98 - .../out/arc4-types/arc4-types.awst.json | 3 +- .../array-destructuring.awst | 23 - .../out/array-literals/array-literals.awst | 9 - .../AssertMatchContract.approval.teal | 33 +- .../out/assert-match/assert-match.awst | 36 - .../out/assert-match/assert-match.awst.json | 3 +- .../biguint-expressions.awst | 16 - .../boolean-conversions.awst | 26 - .../boolean-expressions.awst | 15 - .../out/box-proxies/box-proxies.awst | 44 - .../byte-expressions/byte-expressions.awst | 11 - .../call-expressions/Example.approval.teal | 22 + .../call-expressions/call-expressions.awst | 50 - .../call-expressions.awst.json | 3 +- .../conditional-expression.awst | 10 - .../destructured-params.awst | 11 - .../destructuring-iterators.awst | 11 - tests/approvals/out/do-loops/do-loops.awst | 12 - .../EnsureBudgetContract.approval.teal | 26 +- .../out/ensure-budget/ensure-budget.awst | 30 - .../out/ensure-budget/ensure-budget.awst.json | 3 +- tests/approvals/out/for-loops/for-loops.awst | 61 - .../out/for-of-loops/for-of-loops.awst | 10 - .../out/global-state/global-state.awst | 47 - .../out/global-state/global-state.awst.json | 3 +- .../BaseWithAbiCreate.approval.teal | 51 +- .../BaseWithAbiCreate.arc32.json | 2 +- .../implicit-create/BaseWithAbiCreate.ssa.ir | 4 +- .../BaseWithBareCreate.approval.teal | 49 +- .../BaseWithBareCreate.arc32.json | 2 +- .../implicit-create/BaseWithBareCreate.ssa.ir | 2 +- .../ExplicitAbiCreateFromBase.approval.teal | 60 +- .../ExplicitAbiCreateFromBase.arc32.json | 2 +- .../ExplicitAbiCreateFromBase.ssa.ir | 4 +- .../ExplicitBareCreateFromBase.approval.teal | 58 +- .../ExplicitBareCreateFromBase.arc32.json | 2 +- .../ExplicitBareCreateFromBase.ssa.ir | 2 +- .../out/implicit-create/NoBare.approval.teal | 68 +- .../out/implicit-create/NoBare.arc32.json | 2 +- .../out/implicit-create/NoBare.ssa.ir | 6 +- .../out/implicit-create/NoNoOp.approval.teal | 58 +- .../out/implicit-create/NoNoOp.arc32.json | 2 +- .../out/implicit-create/NoNoOp.ssa.ir | 4 +- .../out/implicit-create/implicit-create.awst | 222 -- .../implicit-create/implicit-create.awst.json | 18 +- .../out/inheritance-a/inheritance-a.awst | 0 .../ConcreteArc4Contract.approval.teal | 87 +- .../ConcreteArc4Contract.arc32.json | 2 +- .../inheritance-b/ConcreteArc4Contract.ssa.ir | 10 +- .../ConcreteSimpleContract.approval.teal | 22 + .../out/inheritance-b/inheritance-b.awst | 99 - .../out/inheritance-b/inheritance-b.awst.json | 6 +- .../out/intrinsic-calls/intrinsic-calls.awst | 7 - .../out/itxn/ItxnDemoContract.approval.teal | 111 +- tests/approvals/out/itxn/itxn.awst | 85 - tests/approvals/out/itxn/itxn.awst.json | 3 +- .../local-state/LocalStateDemo.approval.teal | 153 +- .../out/local-state/LocalStateDemo.arc32.json | 44 +- .../out/local-state/LocalStateDemo.ssa.ir | 14 +- .../out/local-state/local-state.awst | 65 - .../out/local-state/local-state.awst.json | 3 +- tests/approvals/out/logic-sig/AllowNoFee.teal | 3 +- tests/approvals/out/logic-sig/logic-sig.awst | 13 - .../out/logic-sig/logic-sig.awst.json | 6 +- .../out/named-types/MyContract.approval.teal | 237 ++- .../out/named-types/MyContract.arc32.json | 17 +- .../out/named-types/MyContract.ssa.ir | 22 +- .../out/named-types/named-types.awst | 61 - .../out/named-types/named-types.awst.json | 8 +- .../non-arc4/HelloWorldContract.approval.teal | 13 + tests/approvals/out/non-arc4/non-arc4.awst | 33 - .../approvals/out/non-arc4/non-arc4.awst.json | 3 +- .../numeric-literal-expressions.awst | 16 - .../object-destructuring.awst | 34 - .../pre-approved-sale/PreApprovedSale.ssa.ir | 24 +- .../pre-approved-sale/PreApprovedSale.teal | 6 +- .../pre-approved-sale/pre-approved-sale.awst | 11 - .../pre-approved-sale.awst.json | 239 +-- .../prefix-postfix-operators.awst | 21 - .../out/property-ordering/Demo.approval.teal | 38 + .../property-ordering/property-ordering.awst | 36 - .../property-ordering.awst.json | 3 +- .../ShadowedVariablesAlgo.approval.teal | 50 +- .../shadowed-variables.awst | 42 - .../shadowed-variables.awst.json | 3 +- .../switch-statements/switch-statements.awst | 56 - .../out/while-loops/while-loops.awst | 9 - tests/onchain/arc4-types.spec.ts | 4 + tests/onchain/util/test-fixture.ts | 1 + 110 files changed, 3746 insertions(+), 2157 deletions(-) delete mode 100644 tests/approvals/out/abi-decorators/abi-decorators.awst delete mode 100644 tests/approvals/out/accounts/accounts.awst delete mode 100644 tests/approvals/out/arc4-struct/arc4-struct.awst delete mode 100644 tests/approvals/out/arc4-types/arc4-types.awst delete mode 100644 tests/approvals/out/array-destructuring/array-destructuring.awst delete mode 100644 tests/approvals/out/array-literals/array-literals.awst delete mode 100644 tests/approvals/out/assert-match/assert-match.awst delete mode 100644 tests/approvals/out/biguint-expressions/biguint-expressions.awst delete mode 100644 tests/approvals/out/boolean-conversions/boolean-conversions.awst delete mode 100644 tests/approvals/out/boolean-expressions/boolean-expressions.awst delete mode 100644 tests/approvals/out/box-proxies/box-proxies.awst delete mode 100644 tests/approvals/out/byte-expressions/byte-expressions.awst delete mode 100644 tests/approvals/out/call-expressions/call-expressions.awst delete mode 100644 tests/approvals/out/conditional-expression/conditional-expression.awst delete mode 100644 tests/approvals/out/destructured-params/destructured-params.awst delete mode 100644 tests/approvals/out/destructuring-iterators/destructuring-iterators.awst delete mode 100644 tests/approvals/out/do-loops/do-loops.awst delete mode 100644 tests/approvals/out/ensure-budget/ensure-budget.awst delete mode 100644 tests/approvals/out/for-loops/for-loops.awst delete mode 100644 tests/approvals/out/for-of-loops/for-of-loops.awst delete mode 100644 tests/approvals/out/global-state/global-state.awst delete mode 100644 tests/approvals/out/implicit-create/implicit-create.awst delete mode 100644 tests/approvals/out/inheritance-a/inheritance-a.awst delete mode 100644 tests/approvals/out/inheritance-b/inheritance-b.awst delete mode 100644 tests/approvals/out/intrinsic-calls/intrinsic-calls.awst delete mode 100644 tests/approvals/out/itxn/itxn.awst delete mode 100644 tests/approvals/out/local-state/local-state.awst delete mode 100644 tests/approvals/out/logic-sig/logic-sig.awst delete mode 100644 tests/approvals/out/named-types/named-types.awst delete mode 100644 tests/approvals/out/non-arc4/non-arc4.awst delete mode 100644 tests/approvals/out/numeric-literal-expressions/numeric-literal-expressions.awst delete mode 100644 tests/approvals/out/object-destructuring/object-destructuring.awst delete mode 100644 tests/approvals/out/pre-approved-sale/pre-approved-sale.awst delete mode 100644 tests/approvals/out/prefix-postfix-operators/prefix-postfix-operators.awst delete mode 100644 tests/approvals/out/property-ordering/property-ordering.awst delete mode 100644 tests/approvals/out/shadowed-variables/shadowed-variables.awst delete mode 100644 tests/approvals/out/switch-statements/switch-statements.awst delete mode 100644 tests/approvals/out/while-loops/while-loops.awst diff --git a/src/cli.ts b/src/cli.ts index 4ba43669..bcb5481f 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -7,6 +7,8 @@ import { ConsoleLogSink } from './logger/sinks/console-log-sink' import type { PuyaPassThroughOptions } from './puya/options' import { defaultPuyaOptions, LocalsCoalescingStrategy } from './puya/options' +const cmdInteger = () => z.preprocess((x) => (typeof x === 'string' && x.length > 0 ? Number(x) : x), z.number().int()) + const cliOptionsSchema = z.object({ outputAwst: z.boolean(), outputAwstJson: z.boolean(), @@ -24,9 +26,9 @@ const cliOptionsSchema = z.object({ outputMemoryIr: z.boolean(), outputBytecode: z.boolean(), matchAlgodBytecode: z.boolean(), - debugLevel: z.number().int(), - optimizationLevel: z.number().int(), - targetAvmVersion: z.number().int(), + debugLevel: cmdInteger(), + optimizationLevel: cmdInteger(), + targetAvmVersion: cmdInteger(), cliTemplateDefinitions: z.preprocess((x) => x ?? [], z.array(z.string())), templateVarsPrefix: z.string(), localsCoalescingStrategy: z.nativeEnum(LocalsCoalescingStrategy), @@ -107,6 +109,7 @@ function cli() { .action((a, o) => { using logCtx = LoggingContext.create() + logger.configure([new ConsoleLogSink(LogLevel.Warn)]) try { const paths = cliArgumentsSchema.parse(a) const cliOptions = cliOptionsSchema.parse(o) diff --git a/tests/approvals.spec.ts b/tests/approvals.spec.ts index 1bde7917..abe0c182 100644 --- a/tests/approvals.spec.ts +++ b/tests/approvals.spec.ts @@ -10,7 +10,7 @@ describe('Approvals', () => { using logCtx = LoggingContext.create() const result = compile( buildCompileOptions({ - outputAwstJson: false, + outputAwstJson: true, outputAwst: false, paths: ['tests/approvals'], outDir: 'out/[name]', @@ -19,6 +19,7 @@ describe('Approvals', () => { }), { ...defaultPuyaOptions, + optimizationLevel: 0, outputTeal: true, outputArc32: true, }, diff --git a/tests/approvals/arc4-struct.algo.ts b/tests/approvals/arc4-struct.algo.ts index ff0f9e62..9a970d6c 100644 --- a/tests/approvals/arc4-struct.algo.ts +++ b/tests/approvals/arc4-struct.algo.ts @@ -22,9 +22,10 @@ class StructDemo extends Contract { }) } - // TODO: Uncomment once puya supports ARC4Decode() on structs - // public implicitCastingAndSpreading(v1: Vector) { - // const v2 = new Vector(v1) - // const v3 = new Vector({ ...v2 }) - // } + public implicitCastingAndSpreading(v1: Vector) { + const v2 = new Vector(v1) + const v3 = new Vector({ ...v2 }) + assert(v1.bytes === v2.bytes) + assert(v3.bytes === v1.bytes) + } } diff --git a/tests/approvals/out/abi-decorators/AbiDecorators.approval.teal b/tests/approvals/out/abi-decorators/AbiDecorators.approval.teal index 118532b3..82783ed5 100644 --- a/tests/approvals/out/abi-decorators/AbiDecorators.approval.teal +++ b/tests/approvals/out/abi-decorators/AbiDecorators.approval.teal @@ -1,7 +1,7 @@ #pragma version 10 tests/approvals/abi-decorators.algo.ts::AbiDecorators.approvalProgram: - intcblock 1 0 + intcblock 0 1 bytecblock 0x151f7c75 txn ApplicationID bnz main_after_if_else@2 @@ -31,69 +31,91 @@ __puya_arc4_router__: // export default class AbiDecorators extends Contract { proto 0 1 txn NumAppArgs - bz __puya_arc4_router___after_if_else@10 - pushbytess 0xf9020d5a 0xe179f9d4 0x63c27aba 0x14d1b6ea 0xc1367374 // method "justNoop()void", method "createMethod()void", method "allActions()void", method "overrideReadonlyName()uint64", method "methodWithDefaults(uint64,uint64,uint64)uint64" + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@9 txna ApplicationArgs 0 + pushbytes 0xf9020d5a // method "justNoop()void" + pushbytes 0xe179f9d4 // method "createMethod()void" + pushbytes 0x63c27aba // method "allActions()void" + pushbytes 0x14d1b6ea // method "overrideReadonlyName()uint64" + pushbytes 0xc1367374 // method "methodWithDefaults(uint64,uint64,uint64)uint64" + uncover 5 match __puya_arc4_router___justNoop_route@2 __puya_arc4_router___createMethod_route@3 __puya_arc4_router___allActions_route@4 __puya_arc4_router___overrideReadonlyName_route@5 __puya_arc4_router___methodWithDefaults_route@6 - intc_1 // 0 - retsub + b __puya_arc4_router___switch_case_default@7 __puya_arc4_router___justNoop_route@2: // tests/approvals/abi-decorators.algo.ts:5 // @abimethod({ allowActions: 'NoOp' }) txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating - intc_0 // 1 + intc_0 // 0 + != + assert // can only call when not creating + callsub justNoop + intc_1 // 1 retsub __puya_arc4_router___createMethod_route@3: // tests/approvals/abi-decorators.algo.ts:7 // @abimethod({ onCreate: 'require' }) txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - ! - assert // is creating - intc_0 // 1 + intc_0 // 0 + == + assert // can only call when creating + callsub createMethod + intc_1 // 1 retsub __puya_arc4_router___allActions_route@4: // tests/approvals/abi-decorators.algo.ts:9 // @abimethod({ allowActions: ['NoOp', 'OptIn', 'CloseOut', 'DeleteApplication', 'UpdateApplication'] }) txn ApplicationID - assert // is not creating - intc_0 // 1 + intc_0 // 0 + != + assert // can only call when not creating + callsub allActions + intc_1 // 1 retsub __puya_arc4_router___overrideReadonlyName_route@5: // tests/approvals/abi-decorators.algo.ts:11 // @abimethod({ readonly: true, name: 'overrideReadonlyName' }) txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating + intc_0 // 0 + != + assert // can only call when not creating callsub readonly itob bytec_0 // 0x151f7c75 swap concat log - intc_0 // 1 + intc_1 // 1 retsub __puya_arc4_router___methodWithDefaults_route@6: // tests/approvals/abi-decorators.algo.ts:18 // @abimethod({ defaultArguments: { a: { from: 'globalValue' }, b: { from: 'readonly' }, c: { constant: 145 } } }) txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating + intc_0 // 0 + != + assert // can only call when not creating // tests/approvals/abi-decorators.algo.ts:4 // export default class AbiDecorators extends Contract { txna ApplicationArgs 1 @@ -104,19 +126,54 @@ __puya_arc4_router___methodWithDefaults_route@6: btoi // tests/approvals/abi-decorators.algo.ts:18 // @abimethod({ defaultArguments: { a: { from: 'globalValue' }, b: { from: 'readonly' }, c: { constant: 145 } } }) + uncover 2 + uncover 2 + uncover 2 callsub methodWithDefaults itob bytec_0 // 0x151f7c75 swap concat log - intc_0 // 1 + intc_1 // 1 retsub +__puya_arc4_router___switch_case_default@7: + b __puya_arc4_router___after_if_else@10 + +__puya_arc4_router___bare_routing@9: + __puya_arc4_router___after_if_else@10: // tests/approvals/abi-decorators.algo.ts:4 // export default class AbiDecorators extends Contract { - intc_1 // 0 + intc_0 // 0 + retsub + + +// tests/approvals/abi-decorators.algo.ts::AbiDecorators.justNoop() -> void: +justNoop: + // tests/approvals/abi-decorators.algo.ts:5-6 + // @abimethod({ allowActions: 'NoOp' }) + // public justNoop(): void {} + proto 0 0 + retsub + + +// tests/approvals/abi-decorators.algo.ts::AbiDecorators.createMethod() -> void: +createMethod: + // tests/approvals/abi-decorators.algo.ts:7-8 + // @abimethod({ onCreate: 'require' }) + // public createMethod(): void {} + proto 0 0 + retsub + + +// tests/approvals/abi-decorators.algo.ts::AbiDecorators.allActions() -> void: +allActions: + // tests/approvals/abi-decorators.algo.ts:9-10 + // @abimethod({ allowActions: ['NoOp', 'OptIn', 'CloseOut', 'DeleteApplication', 'UpdateApplication'] }) + // public allActions(): void {} + proto 0 0 retsub diff --git a/tests/approvals/out/abi-decorators/AbiDecorators.arc32.json b/tests/approvals/out/abi-decorators/AbiDecorators.arc32.json index eb54016c..f1b65177 100644 --- a/tests/approvals/out/abi-decorators/AbiDecorators.arc32.json +++ b/tests/approvals/out/abi-decorators/AbiDecorators.arc32.json @@ -49,7 +49,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWJpLWRlY29yYXRvcnMuYWxnby50czo6QWJpRGVjb3JhdG9ycy5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMSAwCiAgICBieXRlY2Jsb2NrIDB4MTUxZjdjNzUKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2FiaS1kZWNvcmF0b3JzLmFsZ28udHM6OkFiaURlY29yYXRvcnMuY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hYmktZGVjb3JhdG9ycy5hbGdvLnRzOjQKICAgIC8vIGV4cG9ydCBkZWZhdWx0IGNsYXNzIEFiaURlY29yYXRvcnMgZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hYmktZGVjb3JhdG9ycy5hbGdvLnRzOjE2CiAgICAvLyBnbG9iYWxWYWx1ZSA9IEdsb2JhbFN0YXRlKHsgaW5pdGlhbFZhbHVlOiBVaW50NjQoMTIzKSB9KQogICAgcHVzaGJ5dGVzICJnbG9iYWxWYWx1ZSIKICAgIHB1c2hpbnQgMTIzIC8vIDEyMwogICAgYXBwX2dsb2Jhb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QoeyBkZWZhdWx0QXJndW1lbnRzOiB7IGE6IHsgZnJvbTogJ2dsb2JhbFZhbHVlJyB9LCBiOiB7IGZyb206ICdyZWFkb25seScgfSwgYzogeyBjb25zdGFudDogMTQ1IH0gfSB9KQogICAgLy8gcHVibGljIG1ldGhvZFdpdGhEZWZhdWx0cyhhOiB1aW50NjQsIGI6IHVpbnQ2NCwgYzogdWludDY0KTogdWludDY0IHsKICAgIHByb3RvIDMgMQogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FiaS1kZWNvcmF0b3JzLmFsZ28udHM6MjAKICAgIC8vIHJldHVybiBhICogYiArIGMKICAgIGZyYW1lX2RpZyAtMwogICAgZnJhbWVfZGlnIC0yCiAgICAqCiAgICBmcmFtZV9kaWcgLTEKICAgICsKICAgIHJldHN1Ygo=", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWJpLWRlY29yYXRvcnMuYWxnby50czo6QWJpRGVjb3JhdG9ycy5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/abi-decorators/AbiDecorators.ssa.ir b/tests/approvals/out/abi-decorators/AbiDecorators.ssa.ir index d5ea9aab..0c34977e 100644 --- a/tests/approvals/out/abi-decorators/AbiDecorators.ssa.ir +++ b/tests/approvals/out/abi-decorators/AbiDecorators.ssa.ir @@ -27,34 +27,34 @@ contract tests/approvals/abi-decorators.algo.ts::AbiDecorators: block@2: // justNoop_route_L5 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (!= tmp%5#0 0u) - (assert tmp%6#0) // is not creating + (assert tmp%6#0) // can only call when not creating tests/approvals/abi-decorators.algo.ts::AbiDecorators.justNoop() return 1u block@3: // createMethod_route_L7 let tmp%7#0: uint64 = (txn OnCompletion) let tmp%8#0: bool = (== tmp%7#0 NoOp) - (assert tmp%8#0) // OnCompletion is NoOp + (assert tmp%8#0) // OnCompletion is not NoOp let tmp%9#0: uint64 = (txn ApplicationID) let tmp%10#0: bool = (== tmp%9#0 0u) - (assert tmp%10#0) // is creating + (assert tmp%10#0) // can only call when creating tests/approvals/abi-decorators.algo.ts::AbiDecorators.createMethod() return 1u block@4: // allActions_route_L9 let tmp%11#0: uint64 = (txn ApplicationID) let tmp%12#0: bool = (!= tmp%11#0 0u) - (assert tmp%12#0) // is not creating + (assert tmp%12#0) // can only call when not creating tests/approvals/abi-decorators.algo.ts::AbiDecorators.allActions() return 1u block@5: // overrideReadonlyName_route_L11 let tmp%13#0: uint64 = (txn OnCompletion) let tmp%14#0: bool = (== tmp%13#0 NoOp) - (assert tmp%14#0) // OnCompletion is NoOp + (assert tmp%14#0) // OnCompletion is not NoOp let tmp%15#0: uint64 = (txn ApplicationID) let tmp%16#0: bool = (!= tmp%15#0 0u) - (assert tmp%16#0) // is not creating + (assert tmp%16#0) // can only call when not creating let to_encode%0#0: uint64 = tests/approvals/abi-decorators.algo.ts::AbiDecorators.readonly() let val_as_bytes%0#0: bytes = (itob to_encode%0#0) let tmp%17#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) @@ -63,10 +63,10 @@ contract tests/approvals/abi-decorators.algo.ts::AbiDecorators: block@6: // methodWithDefaults_route_L18 let tmp%18#0: uint64 = (txn OnCompletion) let tmp%19#0: bool = (== tmp%18#0 NoOp) - (assert tmp%19#0) // OnCompletion is NoOp + (assert tmp%19#0) // OnCompletion is not NoOp let tmp%20#0: uint64 = (txn ApplicationID) let tmp%21#0: bool = (!= tmp%20#0 0u) - (assert tmp%21#0) // is not creating + (assert tmp%21#0) // can only call when not creating let tmp%22#0: bytes = (txna ApplicationArgs 1) let tmp%23#0: uint64 = (btoi tmp%22#0) let tmp%24#0: bytes = (txna ApplicationArgs 2) diff --git a/tests/approvals/out/abi-decorators/abi-decorators.awst b/tests/approvals/out/abi-decorators/abi-decorators.awst deleted file mode 100644 index e42f0290..00000000 --- a/tests/approvals/out/abi-decorators/abi-decorators.awst +++ /dev/null @@ -1,56 +0,0 @@ -contract AbiDecorators -{ - globals { - ["globalValue"]: uint64 - } - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - return arc4Router() - } - - clearProgram(): bool - { - return True - } - - justNoop(): void - { - } - - createMethod(): void - { - } - - allActions(): void - { - } - - readonly(): uint64 - { - return 5 - } - - methodWithDefaults(): uint64 - { - return a * b + c - } - - constructor(): void - { - void - GlobalState["globalValue"]: uint64 = 123 - } - - Contract::constructor(): void - { - } - - Contract::constructor(): void - { - this.constructor() - } - -} \ No newline at end of file diff --git a/tests/approvals/out/abi-decorators/abi-decorators.awst.json b/tests/approvals/out/abi-decorators/abi-decorators.awst.json index 47fa1b1b..d5d55351 100644 --- a/tests/approvals/out/abi-decorators/abi-decorators.awst.json +++ b/tests/approvals/out/abi-decorators/abi-decorators.awst.json @@ -1082,6 +1082,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/accounts/AccountsContract.approval.teal b/tests/approvals/out/accounts/AccountsContract.approval.teal index 053aa91c..ce1a1803 100644 --- a/tests/approvals/out/accounts/AccountsContract.approval.teal +++ b/tests/approvals/out/accounts/AccountsContract.approval.teal @@ -1,32 +1,50 @@ #pragma version 10 tests/approvals/accounts.algo.ts::AccountsContract.approvalProgram: - intcblock 0 1 + intcblock 0 93 1 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: callsub __puya_arc4_router__ return +// tests/approvals/accounts.algo.ts::AccountsContract.constructor() -> void: +constructor: + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { + proto 0 0 + retsub + + // tests/approvals/accounts.algo.ts::AccountsContract.__puya_arc4_router__() -> uint64: __puya_arc4_router__: // tests/approvals/accounts.algo.ts:4 // export class AccountsContract extends Contract { proto 0 1 txn NumAppArgs + intc_0 // 0 + != bz __puya_arc4_router___bare_routing@5 - pushbytes 0xdfe9a035 // method "getAccountInfo(account,asset)(byte[],uint64,uint64,byte[],uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,bool,bool)" txna ApplicationArgs 0 + pushbytes 0xdfe9a035 // method "getAccountInfo(account,asset)(byte[],uint64,uint64,byte[],uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,bool,bool)" + swap match __puya_arc4_router___getAccountInfo_route@2 - intc_0 // 0 - retsub + b __puya_arc4_router___switch_case_default@3 __puya_arc4_router___getAccountInfo_route@2: // tests/approvals/accounts.algo.ts:5 // public getAccountInfo(account: Account, asset: Asset) { txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating + intc_0 // 0 + != + assert // can only call when not creating // tests/approvals/accounts.algo.ts:4 // export class AccountsContract extends Contract { txna ApplicationArgs 1 @@ -38,88 +56,114 @@ __puya_arc4_router___getAccountInfo_route@2: // tests/approvals/accounts.algo.ts:5 // public getAccountInfo(account: Account, asset: Asset) { callsub getAccountInfo - dig 14 + cover 14 + cover 13 + cover 12 + cover 11 + cover 10 + cover 9 + cover 8 + cover 7 + cover 6 + cover 5 + cover 4 + cover 3 + cover 2 + swap + dup len itob extract 6 2 - uncover 15 + swap concat - uncover 14 + cover 11 itob - uncover 14 + cover 12 itob - dig 14 + cover 12 + dup len itob extract 6 2 - uncover 15 + swap concat - uncover 14 + cover 14 itob - uncover 14 + cover 9 itob - uncover 14 + cover 10 itob - uncover 14 + cover 11 itob - uncover 14 + cover 11 itob - uncover 14 + cover 12 itob - uncover 14 + cover 12 itob - uncover 14 + cover 12 itob - uncover 14 + cover 12 + swap itob + cover 12 pushbytes 0x00 intc_0 // 0 - uncover 16 + uncover 9 setbit + cover 11 pushbytes 0x00 intc_0 // 0 - uncover 16 + uncover 15 setbit - dig 14 + cover 9 + intc_1 // 93 + itob + extract 6 2 + pushbytes 0x + swap + concat + dig 1 len - pushint 93 // 93 + intc_1 // 93 + - pushbytes 0x005d - uncover 15 + swap + uncover 4 concat - uncover 14 + uncover 5 concat swap itob extract 6 2 concat - uncover 11 + uncover 2 concat - uncover 10 + uncover 2 concat - uncover 9 + uncover 2 concat - uncover 8 + uncover 2 concat - uncover 7 + uncover 2 concat - uncover 6 + uncover 2 concat - uncover 5 + uncover 3 + concat + uncover 3 concat uncover 4 concat uncover 3 concat uncover 2 - concat - swap intc_0 // 0 getbit - pushint 737 // 737 swap - setbit + pushint 737 // 737 uncover 2 + setbit + swap concat swap concat @@ -127,20 +171,34 @@ __puya_arc4_router___getAccountInfo_route@2: swap concat log - intc_1 // 1 + intc_2 // 1 retsub +__puya_arc4_router___switch_case_default@3: + b __puya_arc4_router___after_if_else@9 + __puya_arc4_router___bare_routing@5: // tests/approvals/accounts.algo.ts:4 // export class AccountsContract extends Contract { txn OnCompletion - bnz __puya_arc4_router___after_if_else@9 + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@6 + b __puya_arc4_router___switch_case_default@7 + +__puya_arc4_router_____algots__.defaultCreate@6: + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { txn ApplicationID - ! - assert // is creating - intc_1 // 1 + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_2 // 1 retsub +__puya_arc4_router___switch_case_default@7: + __puya_arc4_router___after_if_else@9: // tests/approvals/accounts.algo.ts:4 // export class AccountsContract extends Contract { @@ -215,8 +273,9 @@ getAccountInfo: assert // account funded // tests/approvals/accounts.algo.ts:20 // isOptInApp: account.isOptedIn(Global.currentApplicationId), - frame_dig -2 global CurrentApplicationID + frame_dig -2 + swap app_opted_in // tests/approvals/accounts.algo.ts:21 // isOptInAsset: account.isOptedIn(asset), @@ -243,5 +302,26 @@ getAccountInfo: // isOptInAsset: account.isOptedIn(asset), // } frame_dig -2 - cover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + retsub + + +// tests/approvals/accounts.algo.ts::AccountsContract.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { + proto 0 0 retsub diff --git a/tests/approvals/out/accounts/AccountsContract.arc32.json b/tests/approvals/out/accounts/AccountsContract.arc32.json index 7e8a065d..9eadd471 100644 --- a/tests/approvals/out/accounts/AccountsContract.arc32.json +++ b/tests/approvals/out/accounts/AccountsContract.arc32.json @@ -3,78 +3,11 @@ "getAccountInfo(account,asset)(byte[],uint64,uint64,byte[],uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,bool,bool)": { "call_config": { "no_op": "CALL" - }, - "structs": { - "output": { - "name": "", - "elements": [ - [ - "bytes", - "byte[]" - ], - [ - "balance", - "uint64" - ], - [ - "minBalance", - "uint64" - ], - [ - "authAddress", - "byte[]" - ], - [ - "totalNumUint", - "uint64" - ], - [ - "totalNumByteSlice", - "uint64" - ], - [ - "totalExtraAppPages", - "uint64" - ], - [ - "totalAppsCreated", - "uint64" - ], - [ - "totalAppsOptedIn", - "uint64" - ], - [ - "totalAssetsCreated", - "uint64" - ], - [ - "totalAssets", - "uint64" - ], - [ - "totalBoxes", - "uint64" - ], - [ - "totalBoxBytes", - "uint64" - ], - [ - "isOptInApp", - "bool" - ], - [ - "isOptInAsset", - "bool" - ] - ] - } } } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo6QWNjb3VudHNDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRl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ICAgIGludGNfMCAvLyAwCiAgICB1bmNvdmVyIDE2CiAgICBzZXRiaXQKICAgIGRpZyAxNAogICAgbGVuCiAgICBwdXNoaW50IDkzIC8vIDkzCiAgICArCiAgICBwdXNoYnl0ZXMgMHgwMDVkCiAgICB1bmNvdmVyIDE1CiAgICBjb25jYXQKICAgIHVuY292ZXIgMTQKICAgIGNvbmNhdAogICAgc3dhcAogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGNvbmNhdAogICAgdW5jb3ZlciAxMQogICAgY29uY2F0CiAgICB1bmNvdmVyIDEwCiAgICBjb25jYXQKICAgIHVuY292ZXIgOQogICAgY29uY2F0CiAgICB1bmNvdmVyIDgKICAgIGNvbmNhdAogICAgdW5jb3ZlciA3CiAgICBjb25jYXQKICAgIHVuY292ZXIgNgogICAgY29uY2F0CiAgICB1bmNvdmVyIDUKICAgIGNvbmNhdAogICAgdW5jb3ZlciA0CiAgICBjb25jYXQKICAgIHVuY292ZXIgMwogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmNhdAogICAgc3dhcAogICAgaW50Y18wIC8vIDAKICAgIGdldGJpdAogICAgcHVzaGludCA3MzcgLy8gNzM3CiAgICBzd2FwCiAgICBzZXRiaXQKICAgIHVuY292ZXIgMgogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIHB1c2hieXRlcyAweDE1MWY3Yzc1CiAgICBzd2FwCiAgICBjb25jYXQKICAgIGxvZwogICAgaW50Y18xIC8vIDEKICAgIHJldHN1YgoKX19wdXlhX2FyYzRfcm91dGVyX19fYmFyZV9yb3V0aW5nQDU6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo0CiAgICAvLyBleHBvcnQgY2xhc3MgQWNjb3VudHNDb250cmFjdCBleHRlbmRzIENvbnRyYWN0IHsKICAgIHR4biBPbkNvbXBsZXRpb24KICAgIGJueiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19hZnRlc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ZXIgMgogICAgc3dhcAogICAgZHVwCiAgICBsZW4KICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBzd2FwCiAgICBjb25jYXQKICAgIGNvdmVyIDExCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgaXRvYgogICAgY292ZXIgMTIKICAgIGR1cAogICAgbGVuCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgc3dhcAogICAgY29uY2F0CiAgICBjb3ZlciAxNAogICAgaXRvYgogICAgY292ZXIgOQogICAgaXRvYgogICAgY292ZXIgMTAKICAgIGl0b2IKICAgIGNvdmVyIDExCiAgICBpdG9iCiAgICBjb3ZlciAxMQogICAgaXRvYgogICAgY292ZXIgMTIKICAgIGl0b2IKICAgIGNvdmVyIDEyCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgaXRvYgogICAgY292ZXIgMTIKICAgIHN3YXAKICAgIGl0b2IKICAgIGNvdmVyIDEyCiAgICBwdXNoYnl0ZXMgMHgwMAogICAgaW50Y18wIC8vIDAKICAgIHVuY292ZXIgOQogICAgc2V0Yml0CiAgICBjb3ZlciAxMQogICAgcHVzaGJ5dGVzIDB4MDAKICAgIGludGNfMCAvLyAwCiAgICB1bmNvdmVyIDE1CiAgICBzZXRiaXQKICAgIGNvdmVyIDkKICAgIGludGNfMSAvLyA5MwogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIHB1c2hieXRlcyAweAogICAgc3dhcAogICAgY29uY2F0CiAgICBkaWcgMQogICAgbGVuCiAgICBpbnRjXzEgLy8gOTMKICAgICsKICAgIHN3YXAKICAgIHVuY292ZXIgNAogICAgY29uY2F0CiAgICB1bmNvdmVyIDUKICAgIGNvbmNhdAogICAgc3dhcAogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGNvbmNhdAogICAgdW5jb3ZlciAyCiAgICBjb25jYXQKICAgIHVuY292ZXIgMgogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmNhdAogICAgdW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gdW5jb3ZlciAxNAogICAgdW5jb3ZlciAxNAogICAgdW5jb3ZlciAxNAogICAgdW5jb3ZlciAxNAogICAgdW5jb3ZlciAxNAogICAgdW5jb3ZlciAxNAogICAgdW5jb3ZlciAxNAogICAgdW5jb3ZlciAxNAogICAgdW5jb3ZlciAxNAogICAgcmV0c3ViCgoKLy8gdGVzdHMvYXBwcm92YWxzL2FjY291bnRzLmFsZ28udHM6OkFjY291bnRzQ29udHJhY3QuX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlKCkgLT4gdm9pZDoKX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FjY291bnRzLmFsZ28udHM6NAogICAgLy8gZXhwb3J0IGNsYXNzIEFjY291bnRzQ29udHJhY3QgZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIHJldHN1Ygo=", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo6QWNjb3VudHNDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/accounts/AccountsContract.ssa.ir b/tests/approvals/out/accounts/AccountsContract.ssa.ir index 9def3d5e..b94d4956 100644 --- a/tests/approvals/out/accounts/AccountsContract.ssa.ir +++ b/tests/approvals/out/accounts/AccountsContract.ssa.ir @@ -26,10 +26,10 @@ contract tests/approvals/accounts.algo.ts::AccountsContract: block@2: // getAccountInfo_route_L5 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (!= tmp%5#0 0u) - (assert tmp%6#0) // is not creating + (assert tmp%6#0) // can only call when not creating let tmp%7#0: bytes = (txna ApplicationArgs 1) let tmp%8#0: uint64 = (btoi tmp%7#0) let tmp%9#0: bytes = ((txnas Accounts) tmp%8#0) @@ -99,7 +99,7 @@ contract tests/approvals/accounts.algo.ts::AccountsContract: block@6: // __algots__.defaultCreate_L4 let tmp%15#0: uint64 = (txn ApplicationID) let tmp%16#0: bool = (== tmp%15#0 0u) - (assert tmp%16#0) // is creating + (assert tmp%16#0) // can only call when creating tests/approvals/accounts.algo.ts::AccountsContract.__algots__.defaultCreate() return 1u block@7: // switch_case_default_L4 diff --git a/tests/approvals/out/accounts/accounts.awst b/tests/approvals/out/accounts/accounts.awst deleted file mode 100644 index 0d7eac48..00000000 --- a/tests/approvals/out/accounts/accounts.awst +++ /dev/null @@ -1,39 +0,0 @@ -contract AccountsContract -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - return arc4Router() - } - - clearProgram(): bool - { - return True - } - - getAccountInfo(): { bytes: bytes, balance: uint64, minBalance: uint64, authAddress: bytes, totalNumUint: uint64, totalNumByteSlice: uint64, totalExtraAppPages: uint64, totalAppsCreated: uint64, totalAppsOptedIn: uint64, totalAssetsCreated: uint64, totalAssets: uint64, totalBoxes: uint64, totalBoxBytes: uint64, isOptInApp: bool, isOptInAsset: bool } - { - return { bytes: reinterpret_cast(account), balance: checked_maybe(acct_params_get(account), comment=account funded), minBalance: checked_maybe(acct_params_get(account), comment=account funded), authAddress: reinterpret_cast(checked_maybe(acct_params_get(account), comment=account funded)), totalNumUint: checked_maybe(acct_params_get(account), comment=account funded), totalNumByteSlice: checked_maybe(acct_params_get(account), comment=account funded), totalExtraAppPages: checked_maybe(acct_params_get(account), comment=account funded), totalAppsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAppsOptedIn: checked_maybe(acct_params_get(account), comment=account funded), totalAssetsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAssets: checked_maybe(acct_params_get(account), comment=account funded), totalBoxes: checked_maybe(acct_params_get(account), comment=account funded), totalBoxBytes: checked_maybe(acct_params_get(account), comment=account funded), isOptInApp: app_opted_in(account, global()), isOptInAsset: asset_holding_get(account, asset).1 } - } - - constructor(): void - { - void - } - - Contract::constructor(): void - { - } - - Contract::constructor(): void - { - this.constructor() - } - - __algots__.defaultCreate(): void - { - } - -} \ No newline at end of file diff --git a/tests/approvals/out/accounts/accounts.awst.json b/tests/approvals/out/accounts/accounts.awst.json index e6f7c88c..63056eec 100644 --- a/tests/approvals/out/accounts/accounts.awst.json +++ b/tests/approvals/out/accounts/accounts.awst.json @@ -2106,6 +2106,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/arc4-struct/StructDemo.approval.teal b/tests/approvals/out/arc4-struct/StructDemo.approval.teal index 6c6e2b86..ce5ed86e 100644 --- a/tests/approvals/out/arc4-struct/StructDemo.approval.teal +++ b/tests/approvals/out/arc4-struct/StructDemo.approval.teal @@ -1,45 +1,68 @@ #pragma version 10 tests/approvals/arc4-struct.algo.ts::StructDemo.approvalProgram: - intcblock 1 0 - bytecblock 0x0000000000000000 + intcblock 0 8 1 + bytecblock 0x 0x0000000000000000 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: callsub __puya_arc4_router__ return +// tests/approvals/arc4-struct.algo.ts::StructDemo.constructor() -> void: +constructor: + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + proto 0 0 + retsub + + // tests/approvals/arc4-struct.algo.ts::StructDemo.__puya_arc4_router__() -> uint64: __puya_arc4_router__: // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { proto 0 1 txn NumAppArgs - bz __puya_arc4_router___bare_routing@6 - pushbytess 0x89388ddd 0xef322d6d // method "testVectorCreationAndEquality()void", method "addVectors((uint64,uint64),(uint64,uint64))(uint64,uint64)" + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@7 txna ApplicationArgs 0 - match __puya_arc4_router___testVectorCreationAndEquality_route@2 __puya_arc4_router___addVectors_route@3 - intc_1 // 0 - retsub + pushbytes 0x89388ddd // method "testVectorCreationAndEquality()void" + pushbytes 0xef322d6d // method "addVectors((uint64,uint64),(uint64,uint64))(uint64,uint64)" + pushbytes 0xcb81deb8 // method "implicitCastingAndSpreading((uint64,uint64))void" + uncover 3 + match __puya_arc4_router___testVectorCreationAndEquality_route@2 __puya_arc4_router___addVectors_route@3 __puya_arc4_router___implicitCastingAndSpreading_route@4 + b __puya_arc4_router___switch_case_default@5 __puya_arc4_router___testVectorCreationAndEquality_route@2: // tests/approvals/arc4-struct.algo.ts:10 // public testVectorCreationAndEquality() { txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating + intc_0 // 0 + != + assert // can only call when not creating callsub testVectorCreationAndEquality - intc_0 // 1 + intc_2 // 1 retsub __puya_arc4_router___addVectors_route@3: // tests/approvals/arc4-struct.algo.ts:18 // public addVectors(v1: Vector, v2: Vector) { txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating + intc_0 // 0 + != + assert // can only call when not creating // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { txna ApplicationArgs 1 @@ -51,24 +74,58 @@ __puya_arc4_router___addVectors_route@3: swap concat log - intc_0 // 1 + intc_2 // 1 + retsub + +__puya_arc4_router___implicitCastingAndSpreading_route@4: + // tests/approvals/arc4-struct.algo.ts:25 + // public implicitCastingAndSpreading(v1: Vector) { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + txna ApplicationArgs 1 + // tests/approvals/arc4-struct.algo.ts:25 + // public implicitCastingAndSpreading(v1: Vector) { + callsub implicitCastingAndSpreading + intc_2 // 1 retsub -__puya_arc4_router___bare_routing@6: +__puya_arc4_router___switch_case_default@5: + b __puya_arc4_router___after_if_else@11 + +__puya_arc4_router___bare_routing@7: // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { txn OnCompletion - bnz __puya_arc4_router___after_if_else@10 + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@8 + b __puya_arc4_router___switch_case_default@9 + +__puya_arc4_router_____algots__.defaultCreate@8: + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { txn ApplicationID - ! - assert // is creating - intc_0 // 1 + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_2 // 1 retsub -__puya_arc4_router___after_if_else@10: +__puya_arc4_router___switch_case_default@9: + +__puya_arc4_router___after_if_else@11: // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { - intc_1 // 0 + intc_0 // 0 retsub @@ -77,14 +134,38 @@ testVectorCreationAndEquality: // tests/approvals/arc4-struct.algo.ts:10 // public testVectorCreationAndEquality() { proto 0 0 + // tests/approvals/arc4-struct.algo.ts:11 + // const v1 = new Vector({ x: new ARC4Uint64(0), y: new ARC4Uint64(0) }) + bytec_0 // 0x + bytec_1 // 0x0000000000000000 + concat + bytec_1 // 0x0000000000000000 + concat // tests/approvals/arc4-struct.algo.ts:12 // log(v1.x) - bytec_0 // 0x0000000000000000 + dup + intc_0 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds log // tests/approvals/arc4-struct.algo.ts:13 // log(v1.y) - bytec_0 // 0x0000000000000000 + dup + intc_1 // 8 + dup + extract3 // on error: Index access is out of bounds log + // tests/approvals/arc4-struct.algo.ts:14 + // const v2 = new Vector({ y: new ARC4Uint64(0), x: new ARC4Uint64(0) }) + bytec_0 // 0x + bytec_1 // 0x0000000000000000 + concat + bytec_1 // 0x0000000000000000 + concat + // tests/approvals/arc4-struct.algo.ts:15 + // assert(v1.equals(v2)) + == + assert retsub @@ -96,20 +177,28 @@ addVectors: // tests/approvals/arc4-struct.algo.ts:20 // x: new ARC4Uint64(v1.x.native + v2.x.native), frame_dig -2 - extract 0 8 // on error: Index access is out of bounds + intc_0 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds btoi frame_dig -1 - extract 0 8 // on error: Index access is out of bounds + intc_0 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds btoi + itob // tests/approvals/arc4-struct.algo.ts:21 // y: new ARC4Uint64(v1.y.native + v2.y.native), frame_dig -2 - extract 8 8 // on error: Index access is out of bounds + intc_1 // 8 + dup + extract3 // on error: Index access is out of bounds btoi frame_dig -1 - extract 8 8 // on error: Index access is out of bounds + intc_1 // 8 + dup + extract3 // on error: Index access is out of bounds btoi + itob @@ -118,5 +207,67 @@ addVectors: // x: new ARC4Uint64(v1.x.native + v2.x.native), // y: new ARC4Uint64(v1.y.native + v2.y.native), // }) + bytec_0 // 0x + uncover 2 + concat + swap + concat + retsub + + +// tests/approvals/arc4-struct.algo.ts::StructDemo.implicitCastingAndSpreading(v1: bytes) -> void: +implicitCastingAndSpreading: + // tests/approvals/arc4-struct.algo.ts:25 + // public implicitCastingAndSpreading(v1: Vector) { + proto 1 0 + // tests/approvals/arc4-struct.algo.ts:26 + // const v2 = new Vector(v1) + frame_dig -1 + intc_0 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds + frame_dig -1 + intc_1 // 8 + dup + extract3 // on error: Index access is out of bounds + bytec_0 // 0x + uncover 2 + concat + swap concat + // tests/approvals/arc4-struct.algo.ts:27 + // const v3 = new Vector({ ...v2 }) + dup + intc_0 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds + swap + dup + intc_1 // 8 + dup + extract3 // on error: Index access is out of bounds + bytec_0 // 0x + uncover 3 + concat + swap + concat + // tests/approvals/arc4-struct.algo.ts:28 + // assert(v1.bytes === v2.bytes) + frame_dig -1 + uncover 2 + == + assert + // tests/approvals/arc4-struct.algo.ts:29 + // assert(v3.bytes === v1.bytes) + frame_dig -1 + == + assert + retsub + + +// tests/approvals/arc4-struct.algo.ts::StructDemo.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + proto 0 0 retsub diff --git a/tests/approvals/out/arc4-struct/StructDemo.arc32.json b/tests/approvals/out/arc4-struct/StructDemo.arc32.json index b965265a..b8db11e9 100644 --- a/tests/approvals/out/arc4-struct/StructDemo.arc32.json +++ b/tests/approvals/out/arc4-struct/StructDemo.arc32.json @@ -50,10 +50,30 @@ ] } } + }, + "implicitCastingAndSpreading((uint64,uint64))void": { + "call_config": { + "no_op": "CALL" + }, + "structs": { + "v1": { + "name": "Vector", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + } + } } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1zdHJ1Y3QuYWxnby50czo6U3RydWN0RGVtby5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMSAwCiAgICBieXRlY2Jsb2NrIDB4MDAwMDAwMDAwMDAwMDAwMAogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6OlN0cnVjdERlbW8uX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6OQogICAgLy8gY2xhc3MgU3RydWN0RGVtbyBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMQogICAgdHhuIE51bUFwcEFyZ3MKICAgIGJ6IF9fcHV5YV9hcmM0X3JvdXRlcl9fX2JhcmVfcm91dGluZ0A2CiAgICBwdXNoYnl0ZXNzIDB4ODkzODhkZGQgMHhlZj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IHByb3RvIDAgMAogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1zdHJ1Y3QuYWxnby50czo6U3RydWN0RGVtby5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { @@ -103,6 +123,19 @@ "returns": { "type": "(uint64,uint64)" } + }, + { + "name": "implicitCastingAndSpreading", + "args": [ + { + "type": "(uint64,uint64)", + "name": "v1" + } + ], + "readonly": false, + "returns": { + "type": "void" + } } ], "networks": {} diff --git a/tests/approvals/out/arc4-struct/StructDemo.ssa.ir b/tests/approvals/out/arc4-struct/StructDemo.ssa.ir index 9d434c6e..b708955d 100644 --- a/tests/approvals/out/arc4-struct/StructDemo.ssa.ir +++ b/tests/approvals/out/arc4-struct/StructDemo.ssa.ir @@ -19,50 +19,60 @@ contract tests/approvals/arc4-struct.algo.ts::StructDemo: block@0: // L9 let tmp%0#0: uint64 = (txn NumAppArgs) let tmp%1#0: bool = (!= tmp%0#0 0u) - goto tmp%1#0 ? block@1 : block@6 + goto tmp%1#0 ? block@1 : block@7 block@1: // abi_routing_L9 let tmp%2#0: bytes = (txna ApplicationArgs 0) - switch tmp%2#0 {method "testVectorCreationAndEquality()void" => block@2, method "addVectors((uint64,uint64),(uint64,uint64))(uint64,uint64)" => block@3, * => block@4} + switch tmp%2#0 {method "testVectorCreationAndEquality()void" => block@2, method "addVectors((uint64,uint64),(uint64,uint64))(uint64,uint64)" => block@3, method "implicitCastingAndSpreading((uint64,uint64))void" => block@4, * => block@5} block@2: // testVectorCreationAndEquality_route_L10 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (!= tmp%5#0 0u) - (assert tmp%6#0) // is not creating + (assert tmp%6#0) // can only call when not creating tests/approvals/arc4-struct.algo.ts::StructDemo.testVectorCreationAndEquality() return 1u block@3: // addVectors_route_L18 let tmp%7#0: uint64 = (txn OnCompletion) let tmp%8#0: bool = (== tmp%7#0 NoOp) - (assert tmp%8#0) // OnCompletion is NoOp + (assert tmp%8#0) // OnCompletion is not NoOp let tmp%9#0: uint64 = (txn ApplicationID) let tmp%10#0: bool = (!= tmp%9#0 0u) - (assert tmp%10#0) // is not creating + (assert tmp%10#0) // can only call when not creating let tmp%11#0: bytes = (txna ApplicationArgs 1) let tmp%12#0: bytes = (txna ApplicationArgs 2) let tmp%13#0: bytes = tests/approvals/arc4-struct.algo.ts::StructDemo.addVectors(tmp%11#0, tmp%12#0) let tmp%14#0: bytes = (concat 0x151f7c75 tmp%13#0) (log tmp%14#0) return 1u - block@4: // switch_case_default_L9 - goto block@5 - block@5: // switch_case_next_L9 - goto block@10 - block@6: // bare_routing_L9 + block@4: // implicitCastingAndSpreading_route_L25 let tmp%15#0: uint64 = (txn OnCompletion) - switch tmp%15#0 {0u => block@7, * => block@8} - block@7: // __algots__.defaultCreate_L9 - let tmp%16#0: uint64 = (txn ApplicationID) - let tmp%17#0: bool = (== tmp%16#0 0u) - (assert tmp%17#0) // is creating + let tmp%16#0: bool = (== tmp%15#0 NoOp) + (assert tmp%16#0) // OnCompletion is not NoOp + let tmp%17#0: uint64 = (txn ApplicationID) + let tmp%18#0: bool = (!= tmp%17#0 0u) + (assert tmp%18#0) // can only call when not creating + let tmp%19#0: bytes = (txna ApplicationArgs 1) + tests/approvals/arc4-struct.algo.ts::StructDemo.implicitCastingAndSpreading(tmp%19#0) + return 1u + block@5: // switch_case_default_L9 + goto block@6 + block@6: // switch_case_next_L9 + goto block@11 + block@7: // bare_routing_L9 + let tmp%20#0: uint64 = (txn OnCompletion) + switch tmp%20#0 {0u => block@8, * => block@9} + block@8: // __algots__.defaultCreate_L9 + let tmp%21#0: uint64 = (txn ApplicationID) + let tmp%22#0: bool = (== tmp%21#0 0u) + (assert tmp%22#0) // can only call when creating tests/approvals/arc4-struct.algo.ts::StructDemo.__algots__.defaultCreate() return 1u - block@8: // switch_case_default_L9 - goto block@9 - block@9: // switch_case_next_L9 + block@9: // switch_case_default_L9 goto block@10 - block@10: // after_if_else_L9 + block@10: // switch_case_next_L9 + goto block@11 + block@11: // after_if_else_L9 return 0u subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.testVectorCreationAndEquality() -> void: @@ -117,6 +127,32 @@ contract tests/approvals/arc4-struct.algo.ts::StructDemo: let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 val_as_bytes%3#0) return encoded_tuple_buffer%2#0 + subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.implicitCastingAndSpreading(v1: bytes) -> void: + block@0: // L25 + let item0%0#0: bytes = (extract3 v1#0 0u 8u) // on error: Index access is out of bounds + let item1%0#0: bytes = (extract3 v1#0 8u 8u) // on error: Index access is out of bounds + let item0%1#0: bytes = (extract3 v1#0 0u 8u) // on error: Index access is out of bounds + let item1%1#0: bytes = (extract3 v1#0 8u 8u) // on error: Index access is out of bounds + let current_tail_offset%0#0: uint64 = 16u + let encoded_tuple_buffer%0#0: bytes = 0x + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 item0%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 item1%1#0) + let v2#0: bytes = encoded_tuple_buffer%2#0 + let tmp%0#0: bytes = (extract3 v2#0 0u 8u) // on error: Index access is out of bounds + let tmp%1#0: bytes = (extract3 v2#0 8u 8u) // on error: Index access is out of bounds + let tmp%2#0: bytes = (extract3 v2#0 0u 8u) // on error: Index access is out of bounds + let tmp%3#0: bytes = (extract3 v2#0 8u 8u) // on error: Index access is out of bounds + let current_tail_offset%1#0: uint64 = 16u + let encoded_tuple_buffer%3#0: bytes = 0x + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 tmp%0#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 tmp%3#0) + let v3#0: bytes = encoded_tuple_buffer%5#0 + let tmp%4#0: bool = (== v1#0 v2#0) + (assert tmp%4#0) + let tmp%5#0: bool = (== v3#0 v1#0) + (assert tmp%5#0) + return + subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.__algots__.defaultCreate() -> void: block@0: // L9 return diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst b/tests/approvals/out/arc4-struct/arc4-struct.awst deleted file mode 100644 index 567b92e5..00000000 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst +++ /dev/null @@ -1,48 +0,0 @@ -contract StructDemo -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - return arc4Router() - } - - clearProgram(): bool - { - return True - } - - testVectorCreationAndEquality(): void - { - v1: Vector = new Vector(x=(#0 = { x: 0, y: 0 }).x, y=#0.y) - log(reinterpret_cast(v1.x)) - log(reinterpret_cast(v1.y)) - v2: Vector = new Vector(x=(#2 = { x: (#1 = { y: 0, x: 0 }).x, y: #1.y }).x, y=#2.y) - assert(reinterpret_cast(v1) == reinterpret_cast(v2)) - } - - addVectors(): Vector - { - return new Vector(x=(#3 = { x: ARC4_ENCODE(ARC4_DECODE(v1.x) + ARC4_DECODE(v2.x), wtype=arc4.uint64), y: ARC4_ENCODE(ARC4_DECODE(v1.y) + ARC4_DECODE(v2.y), wtype=arc4.uint64) }).x, y=#3.y) - } - - constructor(): void - { - void - } - - Contract::constructor(): void - { - } - - Contract::constructor(): void - { - this.constructor() - } - - __algots__.defaultCreate(): void - { - } - -} \ No newline at end of file diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst.json b/tests/approvals/out/arc4-struct/arc4-struct.awst.json index 7dc15747..7266b773 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst.json +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst.json @@ -648,7 +648,7 @@ } ] }, - "id": "0" + "id": "14" }, "name": "x" }, @@ -844,7 +844,7 @@ } ] }, - "id": "0" + "id": "14" }, "name": "y" } @@ -1585,7 +1585,7 @@ } ] }, - "id": "1" + "id": "15" }, "name": "x" }, @@ -1781,13 +1781,13 @@ } ] }, - "id": "1" + "id": "15" }, "name": "y" } ] }, - "id": "2" + "id": "16" }, "name": "x" }, @@ -2117,7 +2117,7 @@ } ] }, - "id": "1" + "id": "15" }, "name": "x" }, @@ -2313,13 +2313,13 @@ } ] }, - "id": "1" + "id": "15" }, "name": "y" } ] }, - "id": "2" + "id": "16" }, "name": "y" } @@ -3480,7 +3480,7 @@ } ] }, - "id": "3" + "id": "17" }, "name": "x" }, @@ -4132,7 +4132,7 @@ } ] }, - "id": "3" + "id": "17" }, "name": "y" } @@ -4211,6 +4211,1864 @@ } } }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 25, + "end_line": 25, + "column": 2, + "end_column": 48 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "v1", + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 25, + "end_line": 25, + "column": 41, + "end_column": 47 + }, + "frozen": false + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 25, + "end_line": 25, + "column": 37, + "end_column": 47 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 25, + "end_line": 30, + "column": 49, + "end_column": 3 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 10, + "end_column": 29 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 10, + "end_column": 12 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 10, + "end_column": 12 + }, + "frozen": false + }, + "name": "v2" + }, + "value": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 15, + "end_column": 29 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 19, + "end_column": 25 + }, + "frozen": false + }, + "values": { + "x": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 15, + "end_column": 29 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 26, + "end_column": 28 + }, + "wtype": { + "_type": "WTuple", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "source": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 26, + "end_column": 28 + }, + "wtype": { + "_type": "WTuple", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 26, + "end_column": 28 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 26, + "end_column": 28 + }, + "frozen": false + }, + "name": "v1" + } + }, + "id": "18" + }, + "name": "x" + }, + "y": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 15, + "end_column": 29 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 26, + "end_column": 28 + }, + "wtype": { + "_type": "WTuple", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "source": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 26, + "end_column": 28 + }, + "wtype": { + "_type": "WTuple", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 26, + "end_column": 28 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 26, + "end_line": 26, + "column": 26, + "end_column": 28 + }, + "frozen": false + }, + "name": "v1" + } + }, + "id": "18" + }, + "name": "y" + } + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 10, + "end_column": 36 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 10, + "end_column": 12 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 10, + "end_column": 12 + }, + "frozen": false + }, + "name": "v3" + }, + "value": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 15, + "end_column": 36 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 19, + "end_column": 25 + }, + "frozen": false + }, + "values": { + "x": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 15, + "end_column": 36 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "items": [ + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 35 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 31, + "end_column": 33 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 31, + "end_column": 33 + }, + "frozen": false + }, + "name": "v2" + }, + "name": "x" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 35 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 31, + "end_column": 33 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 31, + "end_column": 33 + }, + "frozen": false + }, + "name": "v2" + }, + "name": "y" + } + ] + }, + "id": "19" + }, + "name": "x" + }, + "y": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 15, + "end_column": 36 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "items": [ + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 35 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 31, + "end_column": 33 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 31, + "end_column": 33 + }, + "frozen": false + }, + "name": "v2" + }, + "name": "x" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 35 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 31, + "end_column": 33 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 27, + "end_line": 27, + "column": 31, + "end_column": 33 + }, + "frozen": false + }, + "name": "v2" + }, + "name": "y" + } + ] + }, + "id": "19" + }, + "name": "y" + } + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 4, + "end_column": 33 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 4, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "op_code": "assert", + "immediates": [], + "stack_args": [ + { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 11, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 11, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 11, + "end_column": 13 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 11, + "end_column": 13 + }, + "frozen": false + }, + "name": "v1" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 24, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 24, + "end_column": 26 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 24, + "end_column": 26 + }, + "frozen": false + }, + "name": "v2" + } + } + } + ], + "comment": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 4, + "end_column": 33 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 4, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "op_code": "assert", + "immediates": [], + "stack_args": [ + { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 13 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 13 + }, + "frozen": false + }, + "name": "v3" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 24, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 24, + "end_column": 26 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 24, + "end_column": 26 + }, + "frozen": false + }, + "name": "v1" + } + } + } + ], + "comment": null + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-struct.algo.ts::StructDemo", + "member_name": "implicitCastingAndSpreading", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 25, + "end_line": 25, + "column": 2, + "end_column": 48 + }, + "name": "implicitCastingAndSpreading", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": { + "v1": { + "name": "Vector", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + } + } + } + }, { "_type": "ContractMethod", "source_location": { diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal b/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal index 89337de6..f046c3ea 100644 --- a/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal @@ -1,12 +1,25 @@ #pragma version 10 tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.approvalProgram: - intcblock 1 16 8 0 + intcblock 1 8 0 2 + bytecblock 0x base32(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) 0x0000 0x00 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/arc4-types.algo.ts:85 + // testStr() + callsub testStr // tests/approvals/arc4-types.algo.ts:86 // test(1, 2n, new UintN<256>(4)) intc_0 // 1 - pushbytess 0x02 0x0000000000000000000000000000000000000000000000000000000000000004 // 0x02, 0x0000000000000000000000000000000000000000000000000000000000000004 + pushbytes 0x02 + pushbytes 0x0000000000000000000000000000000000000000000000000000000000000004 callsub test + // tests/approvals/arc4-types.algo.ts:87 + // testByte() + callsub testByte // tests/approvals/arc4-types.algo.ts:88 // testArrays(new UintN<64>(65)) pushbytes 0x0000000000000041 @@ -14,17 +27,79 @@ tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.approvalProgram: // tests/approvals/arc4-types.algo.ts:89 // testAddress() callsub testAddress + // tests/approvals/arc4-types.algo.ts:90 + // testTuple() + callsub testTuple // tests/approvals/arc4-types.algo.ts:91 // return true intc_0 // 1 return +// tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.constructor() -> void: +constructor: + // tests/approvals/arc4-types.algo.ts:78 + // export class Arc4TypesTestContract extends BaseContract { + proto 0 0 + retsub + + +// tests/approvals/arc4-types.algo.ts::testStr() -> void: +testStr: + // tests/approvals/arc4-types.algo.ts:30 + // function testStr() { + proto 0 0 + // tests/approvals/arc4-types.algo.ts:31 + // const s1 = new Str() + bytec_2 // 0x0000 + // tests/approvals/arc4-types.algo.ts:32 + // assert(s1.bytes === new UintN<16>(0).bytes, 'Empty string should equal the uint16 length prefix') + dup + == + assert // Empty string should equal the uint16 length prefix + // tests/approvals/arc4-types.algo.ts:33 + // const s2 = new Str('Hello') + pushbytes 0x000548656c6c6f + // tests/approvals/arc4-types.algo.ts:34 + // assert(s2.native === 'Hello') + extract 2 0 + pushbytes "Hello" + == + assert + retsub + + // tests/approvals/arc4-types.algo.ts::test(n: uint64, b: bytes, c: bytes) -> void: test: // tests/approvals/arc4-types.algo.ts:12 // function test(n: uint64, b: biguint, c: UintN<256>) { proto 3 0 + // tests/approvals/arc4-types.algo.ts:13 + // const x = new UintN<8>(4) + pushbytes 0x04 + // tests/approvals/arc4-types.algo.ts:14 + // assert(x.bytes.length === 1) + len + intc_0 // 1 + == + assert + // tests/approvals/arc4-types.algo.ts:15 + // const x2 = new UintN<8>(255n) + pushbytes 0xff + // tests/approvals/arc4-types.algo.ts:16 + // assert(x2.bytes === Bytes.fromHex('ff')) + dup + == + assert + // tests/approvals/arc4-types.algo.ts:18 + // const y = new UintN<16>() + bytec_2 // 0x0000 + // tests/approvals/arc4-types.algo.ts:19 + // assert(y.bytes.length === 2) + len + intc_3 // 2 + == + assert // tests/approvals/arc4-types.algo.ts:20 // const z = new UintN<8>(n) frame_dig -3 @@ -42,10 +117,10 @@ test: // const a = new UintN<128>(b) frame_dig -2 len - intc_1 // 16 + pushint 16 // 16 <= assert // overflow - intc_1 // 16 + pushint 16 // 16 bzero frame_dig -2 b| @@ -64,6 +139,24 @@ test: retsub +// tests/approvals/arc4-types.algo.ts::testByte() -> void: +testByte: + // tests/approvals/arc4-types.algo.ts:54 + // function testByte() { + proto 0 0 + // tests/approvals/arc4-types.algo.ts:55 + // const b = new Byte() + bytec_3 // 0x00 + // tests/approvals/arc4-types.algo.ts:56 + // const b2 = new Byte(0) + dup + // tests/approvals/arc4-types.algo.ts:57 + // assert(b.equals(b2)) + == + assert + retsub + + // tests/approvals/arc4-types.algo.ts::testArrays(n: bytes) -> void: testArrays: // tests/approvals/arc4-types.algo.ts:40 @@ -71,10 +164,11 @@ testArrays: proto 1 0 // tests/approvals/arc4-types.algo.ts:41 // const myArray = new DynamicArray(n, n, n) + bytec_0 // 0x + frame_dig -1 + concat frame_dig -1 - dup concat - dup frame_dig -1 concat pushbytes 0x0003 @@ -83,22 +177,37 @@ testArrays: // tests/approvals/arc4-types.algo.ts:43 // myArray.push(n) extract 2 0 + bytec_0 // 0x frame_dig -1 concat + concat dup len - intc_2 // 8 + intc_1 // 8 / itob extract 6 2 swap concat + // tests/approvals/arc4-types.algo.ts:45 + // const myStatic = new StaticArray(n, n) + bytec_0 // 0x + frame_dig -1 + concat + frame_dig -1 + concat + bytec_0 // 0x + swap + concat // tests/approvals/arc4-types.algo.ts:47 // assert(myStatic[0].equals(myArray.pop())) + intc_2 // 0 + intc_1 // 8 + * + intc_1 // 8 + extract3 // on error: Index access is out of bounds swap - extract 0 8 // on error: Index access is out of bounds - swap - intc_2 // 8 + intc_1 // 8 callsub dynamic_array_pop_fixed_size pop == @@ -111,17 +220,76 @@ testAddress: // tests/approvals/arc4-types.algo.ts:60 // function testAddress() { proto 0 0 - // tests/approvals/arc4-types.algo.ts:61 - // const a = new Address() - pushbytes base32(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ // tests/approvals/arc4-types.algo.ts:62 // const b = new Address(Txn.sender) txn Sender + // tests/approvals/arc4-types.algo.ts:61 + // const a = new Address() + bytec_1 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ // tests/approvals/arc4-types.algo.ts:64 // assert(!a.equals(b), 'Zero address should not match sender') == ! assert // Zero address should not match sender + // tests/approvals/arc4-types.algo.ts:61 + // const a = new Address() + bytec_1 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ + // tests/approvals/arc4-types.algo.ts:65 + // assert(a.equals(new Address()), 'Two zero addresses should match') + dup + == + assert // Two zero addresses should match + // tests/approvals/arc4-types.algo.ts:66 + // assert(a[0].equals(new Byte()), 'Zero address should start with zero byte') + intc_2 // 0 + intc_0 // 1 + * + // tests/approvals/arc4-types.algo.ts:61 + // const a = new Address() + bytec_1 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ + // tests/approvals/arc4-types.algo.ts:66 + // assert(a[0].equals(new Byte()), 'Zero address should start with zero byte') + swap + intc_0 // 1 + extract3 // on error: Index access is out of bounds + bytec_3 // 0x00 + == + assert // Zero address should start with zero byte + retsub + + +// tests/approvals/arc4-types.algo.ts::testTuple() -> void: +testTuple: + // tests/approvals/arc4-types.algo.ts:69 + // function testTuple() { + proto 0 0 + // tests/approvals/arc4-types.algo.ts:70 + // const t = new Tuple(new ARC4Uint64(34)) + bytec_0 // 0x + pushbytes 0x0000000000000022 + concat + // tests/approvals/arc4-types.algo.ts:71 + // const firstItem = t.at(0) + dup + intc_2 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds + swap + // tests/approvals/arc4-types.algo.ts:72 + // const firstItemIndexer = t.native[0] + intc_2 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds + // tests/approvals/arc4-types.algo.ts:73 + // assert(firstItem.equals(firstItemIndexer)) + == + assert + // tests/approvals/arc4-types.algo.ts:75 + // assert(t1.length === 2) + intc_3 // 2 + dup + == + assert retsub @@ -129,7 +297,7 @@ testAddress: dynamic_array_pop_fixed_size: proto 2 2 frame_dig -2 - intc_3 // 0 + intc_2 // 0 extract_uint16 intc_0 // 1 - @@ -145,8 +313,9 @@ dynamic_array_pop_fixed_size: dup2 frame_dig -1 extract3 + cover 2 + swap + intc_2 // 0 uncover 2 - intc_3 // 0 - uncover 3 substring3 retsub diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir b/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir index 2a53d1f9..5d418ba4 100644 --- a/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir @@ -23,10 +23,10 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: subroutine tests/approvals/arc4-types.algo.ts::testStr() -> void: block@0: // L30 - let s1#0: bytes = "\x00\x00" + let s1#0: bytes = 0x0000 let tmp%0#0: bool = (== s1#0 0x0000) (assert tmp%0#0) // Empty string should equal the uint16 length prefix - let s2#0: bytes = "\x00\x05Hello" + let s2#0: bytes = 0x000548656c6c6f let tmp%1#0: bytes = ((extract 2 0) s2#0) let tmp%2#0: bool = (== tmp%1#0 "Hello") (assert tmp%2#0) diff --git a/tests/approvals/out/arc4-types/arc4-types.awst b/tests/approvals/out/arc4-types/arc4-types.awst deleted file mode 100644 index dfe0b36a..00000000 --- a/tests/approvals/out/arc4-types/arc4-types.awst +++ /dev/null @@ -1,98 +0,0 @@ -subroutine testUFixed(): void -{ - a: arc4.ufixed32x4 = 1.244m - c: arc4.ufixed32x4 = 1.244m - assert(reinterpret_cast(a) == reinterpret_cast(c)) -} -subroutine test(n: uint64, b: biguint, c: arc4.uint256): void -{ - x: arc4.uint8 = 4 - assert(len(reinterpret_cast(x)) == 1) - x2: arc4.uint8 = 0xff - assert(reinterpret_cast(x2) == 0xff) - y: arc4.uint16 = 0 - assert(len(reinterpret_cast(y)) == 2) - z: arc4.uint8 = ARC4_ENCODE(n, wtype=arc4.uint8) - z_native: uint64 = ARC4_DECODE(z) - assert(z_native == n) - a: arc4.uint128 = ARC4_ENCODE(b, wtype=arc4.uint128) - a_native: biguint = ARC4_DECODE(a) - assert(a_native == b) - assert(len(reinterpret_cast(c)) == 32) -} -subroutine testStr(): void -{ - s1: arc4.dynamic_array = "" - assert(reinterpret_cast(s1) == reinterpret_cast(0)) - s2: arc4.dynamic_array = "Hello" - assert(ARC4_DECODE(s2) == "Hello") -} -subroutine testArrays(n: arc4.uint64): void -{ - myArray: arc4.dynamic_array = new arc4.dynamic_array(n, n, n) - myArray.push(...[n] - myStatic: arc4.static_array = new arc4.static_array(n, n) - assert(reinterpret_cast(myStatic[0]) == reinterpret_cast(myArray.pop())) - myStatic[1]: arc4.uint64 = 50 -} -subroutine testByte(): void -{ - b: arc4.byte = 0 - b2: arc4.byte = 0 - assert(reinterpret_cast(b) == reinterpret_cast(b2)) -} -subroutine testAddress(): void -{ - a: arc4.static_array = Address("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ") - b: arc4.static_array = reinterpret_cast>(txn()) - assert(!reinterpret_cast(a) == reinterpret_cast(b)) - assert(reinterpret_cast(a) == reinterpret_cast(Address("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ"))) - assert(reinterpret_cast(a[0]) == reinterpret_cast(0)) -} -subroutine testTuple(): void -{ - t: arc4.tuple = ARC4_ENCODE([34], wtype=arc4.tuple) - firstItem: arc4.uint64 = t.0 - firstItemIndexer: arc4.uint64 = ARC4_DECODE(t).0 - assert(reinterpret_cast(firstItem) == reinterpret_cast(firstItemIndexer)) - t1: arc4.tuple = ARC4_ENCODE([Address("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ"), 0], wtype=arc4.tuple) - assert(2 == 2) -} -contract Arc4TypesTestContract -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - x: arc4.uint64 = 0 - tests/approvals/arc4-types.algo.ts::testStr() - tests/approvals/arc4-types.algo.ts::test(1, 2, 4) - tests/approvals/arc4-types.algo.ts::testByte() - tests/approvals/arc4-types.algo.ts::testArrays(65) - tests/approvals/arc4-types.algo.ts::testAddress() - tests/approvals/arc4-types.algo.ts::testTuple() - return True - } - - clearProgram(): bool - { - return True - } - - getArc4Values(): readonlytuple[arc4.byte, arc4.uint8, arc4.static_array] - { - return [0, 255, Address("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ")] - } - - constructor(): void - { - void - } - - Contract::constructor(): void - { - this.constructor() - } - -} \ No newline at end of file diff --git a/tests/approvals/out/arc4-types/arc4-types.awst.json b/tests/approvals/out/arc4-types/arc4-types.awst.json index 7f4dc407..c99107f9 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst.json +++ b/tests/approvals/out/arc4-types/arc4-types.awst.json @@ -6214,6 +6214,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/array-destructuring/array-destructuring.awst b/tests/approvals/out/array-destructuring/array-destructuring.awst deleted file mode 100644 index 05af7aeb..00000000 --- a/tests/approvals/out/array-destructuring/array-destructuring.awst +++ /dev/null @@ -1,23 +0,0 @@ -subroutine testNested(arg: readonlytuple[uint64, readonlytuple[biguint, biguint]]): void -{ - [a, b]: readonlytuple[uint64, readonlytuple[biguint, biguint]] = arg - [c, [d, _]]: readonlytuple[uint64, readonlytuple[biguint, biguint]] = arg -} -subroutine test(): void -{ - [a, b, c, d]: readonlytuple[uint64, bytes, bool, biguint] = tests/approvals/array-destructuring.algo.ts::produceItems() - [_, _₁, e, _₂]: readonlytuple[uint64, bytes, bool, biguint] = tests/approvals/array-destructuring.algo.ts::produceItems() - f: readonlytuple[uint64, bytes, bool, biguint] = ([g, _₃, _₄, i] = tests/approvals/array-destructuring.algo.ts::produceItems()) -} -subroutine produceItems(): readonlytuple[uint64, bytes, bool, biguint] -{ - return [5, 0x, False, 6] -} -subroutine testLiteralDestructuring(): void -{ - a: uint64 = 1 - b: uint64 = 2 - [x, y]: readonlytuple[uint64, uint64] = ([b, a] = [a, b]) - assert(x == b) - assert(y == a) -} \ No newline at end of file diff --git a/tests/approvals/out/array-literals/array-literals.awst b/tests/approvals/out/array-literals/array-literals.awst deleted file mode 100644 index 5522a6ab..00000000 --- a/tests/approvals/out/array-literals/array-literals.awst +++ /dev/null @@ -1,9 +0,0 @@ -subroutine test(a: uint64, b: uint64): void -{ - inferTuple: readonlytuple[uint64, uint64] = [a, b] - explicitTuple: readonlytuple[uint64, uint64] = [a, b] - conditionalExplicitTuple: readonlytuple[uint64, uint64] = (a < b ? [a, b] : [b, a]) - [c, d]: readonlytuple[uint64, uint64] = [a, b] - [_, g]: readonlytuple[uint64, uint64] = [a, b] - [h, _₁]: readonlytuple[uint64, uint64] = [a, b] -} \ No newline at end of file diff --git a/tests/approvals/out/assert-match/AssertMatchContract.approval.teal b/tests/approvals/out/assert-match/AssertMatchContract.approval.teal index 76ec58c0..350f7b67 100644 --- a/tests/approvals/out/assert-match/AssertMatchContract.approval.teal +++ b/tests/approvals/out/assert-match/AssertMatchContract.approval.teal @@ -1,7 +1,12 @@ #pragma version 10 tests/approvals/assert-match.algo.ts::AssertMatchContract.approvalProgram: - intcblock 1 + intcblock 1 0 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: // tests/approvals/assert-match.algo.ts:22 // const txn = gtxn.PaymentTxn(1) intc_0 // 1 @@ -14,6 +19,14 @@ tests/approvals/assert-match.algo.ts::AssertMatchContract.approvalProgram: return +// tests/approvals/assert-match.algo.ts::AssertMatchContract.constructor() -> void: +constructor: + // tests/approvals/assert-match.algo.ts:20 + // export class AssertMatchContract extends BaseContract { + proto 0 0 + retsub + + // tests/approvals/assert-match.algo.ts::test(x: uint64) -> void: test: // tests/approvals/assert-match.algo.ts:9 @@ -45,6 +58,22 @@ test: <= bz test_bool_false@8 frame_dig -1 + gtxns Amount + // tests/approvals/assert-match.algo.ts:11 + // amount: { between: [0, 50000] }, + intc_1 // 0 + // tests/approvals/assert-match.algo.ts:10-17 + // assertMatch(x, { + // amount: { between: [0, 50000] }, + // sender: Txn.sender, + // receiver: Global.currentApplicationAddress, + // closeRemainderTo: Global.zeroAddress, + // firstValid: { greaterThan: 1 }, + // lastValid: { lessThan: 2 ** 40 }, + // }) + >= + bz test_bool_false@8 + frame_dig -1 gtxns Sender // tests/approvals/assert-match.algo.ts:12 // sender: Txn.sender, @@ -128,7 +157,7 @@ test: b test_bool_merge@9 test_bool_false@8: - pushint 0 // 0 + intc_1 // 0 test_bool_merge@9: // tests/approvals/assert-match.algo.ts:10-17 diff --git a/tests/approvals/out/assert-match/assert-match.awst b/tests/approvals/out/assert-match/assert-match.awst deleted file mode 100644 index a981a9f7..00000000 --- a/tests/approvals/out/assert-match/assert-match.awst +++ /dev/null @@ -1,36 +0,0 @@ -subroutine testSelf(): void -{ - assert(txn() == global()) -} -subroutine test(x: group_transaction_pay): void -{ - assert(gtxns(x) <= 50000 and gtxns(x) >= 0 and gtxns(x) == txn() and gtxns(x) == global() and gtxns(x) == global() and gtxns(x) > 1 and gtxns(x) < 1099511627776) -} -contract AssertMatchContract -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - txn: group_transaction_pay = reinterpret_cast(1) - tests/approvals/assert-match.algo.ts::test(txn) - return True - } - - clearProgram(): bool - { - return True - } - - constructor(): void - { - void - } - - Contract::constructor(): void - { - this.constructor() - } - -} \ No newline at end of file diff --git a/tests/approvals/out/assert-match/assert-match.awst.json b/tests/approvals/out/assert-match/assert-match.awst.json index 1f880809..c3d4747b 100644 --- a/tests/approvals/out/assert-match/assert-match.awst.json +++ b/tests/approvals/out/assert-match/assert-match.awst.json @@ -1476,6 +1476,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/biguint-expressions/biguint-expressions.awst b/tests/approvals/out/biguint-expressions/biguint-expressions.awst deleted file mode 100644 index fae2298c..00000000 --- a/tests/approvals/out/biguint-expressions/biguint-expressions.awst +++ /dev/null @@ -1,16 +0,0 @@ -subroutine test(a: uint64, b: bool, c: bytes): void -{ - 0 - reinterpret_cast(itob(True)) - reinterpret_cast(itob(False)) - 0 - 1 - 0 - 1 - 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084095 - 1231232134123123 - reinterpret_cast(itob(a)) - reinterpret_cast(itob(a * a)) - reinterpret_cast(itob(b)) - reinterpret_cast(c) -} \ No newline at end of file diff --git a/tests/approvals/out/boolean-conversions/boolean-conversions.awst b/tests/approvals/out/boolean-conversions/boolean-conversions.awst deleted file mode 100644 index ec33a1bd..00000000 --- a/tests/approvals/out/boolean-conversions/boolean-conversions.awst +++ /dev/null @@ -1,26 +0,0 @@ -subroutine test_truthyness(a: uint64, b: uint64, c: string, d: bytes, e: uint64): void -{ - assert(True) - assert(True) - assert(!Boolean(0)) - assert(Boolean(1)) - assert(!Boolean(bitlen(0))) - assert(Boolean(bitlen(1))) - assert(!Boolean(len(0x))) - assert(Boolean(len("abc"))) - empty: string = "" - assert(!Boolean(len(empty))) - assert(Boolean(len("abc"))) - assert(!False) - assert(True) -} -subroutine test_booleans_are_equal(): void -{ - assert(!!True == !!True) - assert(!!Boolean(1) == !!Boolean(5)) - assert(!!Boolean(bitlen(1)) == !!Boolean(bitlen(5))) - assert("abc" != 0x == "abcdef" != 0x) - assert("abc" != 0x == "abcdef" != 0x) - boolNoArgs: bool = False - assert(!boolNoArgs) -} \ No newline at end of file diff --git a/tests/approvals/out/boolean-expressions/boolean-expressions.awst b/tests/approvals/out/boolean-expressions/boolean-expressions.awst deleted file mode 100644 index a13ee8b3..00000000 --- a/tests/approvals/out/boolean-expressions/boolean-expressions.awst +++ /dev/null @@ -1,15 +0,0 @@ -subroutine test(a: uint64, b: uint64, c: string, d: bytes, e: uint64): bool -{ - x: uint64 = (Boolean((#12 = (Boolean(a) ? a : b))) ? #12 : e) - assert(Boolean((Boolean((#13 = (Boolean(a) ? b : a))) ? e : #13))) - y: uint64 = (Boolean(a) ? b : a) - z: uint64 = (Boolean(a) and Boolean(len(d)) or Boolean(y) ? (Boolean(x) ? x : y) : (Boolean(x) ? y : x)) - if (Boolean(a) or Boolean(len(c)) and Boolean(len(d))) { - return True - } - f: uint64 = 0 - if (Boolean((f = (Boolean(a) ? a : b)))) { - return True - } - return False -} \ No newline at end of file diff --git a/tests/approvals/out/box-proxies/box-proxies.awst b/tests/approvals/out/box-proxies/box-proxies.awst deleted file mode 100644 index 882c99cc..00000000 --- a/tests/approvals/out/box-proxies/box-proxies.awst +++ /dev/null @@ -1,44 +0,0 @@ -subroutine testBox(box: box_key, value: string): void -{ - box.value: string = value - Box["A"].value: string = value - assert(box.value == Box["A"].value) - assert(STATE_EXISTS(box.value) and STATE_EXISTS(Box["A"].value)) - assert(Boolean(checked_maybe(box_len(box.value), comment=Box must exist))) - STATE_DEL(box.value) - STATE_DEL(Box["A"].value) - assert(!STATE_EXISTS(box.value) and !STATE_EXISTS(Box["A"].value)) - defaultVal: string = "O" - assert(STATE_GET(Box["A"].value, default=defaultVal) == STATE_GET(box.value, default=defaultVal)) - [_, e]: readonlytuple[string, bool] = STATE_GET_EX(box.value) - assert(!e) - box.value: string = value - [_₁, e]: readonlytuple[string, bool] = STATE_GET_EX(box.value) - assert(e) -} -subroutine testBoxMap(box: box_key, key: string, value: bytes): void -{ - concat(box, reinterpret_cast(key)).value: bytes = value - concat("", reinterpret_cast(key)).value: bytes = value - assert(Boolean(checked_maybe(box_len(concat(box, reinterpret_cast(key)).value), comment=Box must exist))) - assert(STATE_GET_EX(concat(box, reinterpret_cast(key)).value).1) - assert(concat(box, reinterpret_cast(key)).value == concat("", reinterpret_cast(key)).value) - STATE_DEL(concat(box, reinterpret_cast(key)).value) - assert(STATE_GET(concat(box, reinterpret_cast("" + key + "x")).value, default="b") == STATE_GET(concat("", reinterpret_cast("" + key + "x")).value, default="b")) -} -subroutine testBoxRef(box: box_key, length: uint64): void -{ - if (!box_len(Box["abc"].value).1) { - box_create(Box["abc"].value, 1000) - } else { - if (checked_maybe(box_len(Box["abc"].value), comment=Box must exist) != length) { - box_resize(Box["abc"].value, length) - } - } - someBytes: bytes = 0xffffffff - box_put(box.value, someBytes) - box_put(Box["abc"].value, someBytes) - box_splice(box.value, 1, 2, 0x00) - box_splice(Box["abc"].value, 1, 2, 0x00) - assert(box.value == 0xff00ffff) -} \ No newline at end of file diff --git a/tests/approvals/out/byte-expressions/byte-expressions.awst b/tests/approvals/out/byte-expressions/byte-expressions.awst deleted file mode 100644 index b305d34f..00000000 --- a/tests/approvals/out/byte-expressions/byte-expressions.awst +++ /dev/null @@ -1,11 +0,0 @@ -subroutine test(a: uint64, b: biguint, c: string): void -{ - assert(len(0x) == 0) - assert(itob(a) == itob(a)) - assert(0x01 == 0x0000000000000001) - assert(reinterpret_cast(256) == 0x0100) - assert(reinterpret_cast(reinterpret_cast(b)) == b) - assert(reinterpret_cast(reinterpret_cast(c)) == c) - assert("123" == "123") - assert(0x01020304 == 0x01020304) -} \ No newline at end of file diff --git a/tests/approvals/out/call-expressions/Example.approval.teal b/tests/approvals/out/call-expressions/Example.approval.teal index 815f30fe..80386d9a 100644 --- a/tests/approvals/out/call-expressions/Example.approval.teal +++ b/tests/approvals/out/call-expressions/Example.approval.teal @@ -1,6 +1,11 @@ #pragma version 10 tests/approvals/call-expressions.algo.ts::Example.approvalProgram: + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: // tests/approvals/call-expressions.algo.ts:12 // return this.localMethod() + super.baseMethod() === freeMethod() - this.baseMethod() callsub localMethod @@ -13,6 +18,23 @@ tests/approvals/call-expressions.algo.ts::Example.approvalProgram: return +// tests/approvals/call-expressions.algo.ts::Example.constructor() -> void: +constructor: + // tests/approvals/call-expressions.algo.ts:10 + // export default class Example extends ExampleBase { + proto 0 0 + callsub tests/approvals/call-expressions.algo.ts::ExampleBase.constructor + retsub + + +// tests/approvals/call-expressions.algo.ts::ExampleBase.constructor() -> void: +tests/approvals/call-expressions.algo.ts::ExampleBase.constructor: + // tests/approvals/call-expressions.algo.ts:4 + // abstract class ExampleBase extends BaseContract { + proto 0 0 + retsub + + // tests/approvals/call-expressions.algo.ts::Example.localMethod() -> uint64: localMethod: // tests/approvals/call-expressions.algo.ts:17 diff --git a/tests/approvals/out/call-expressions/call-expressions.awst b/tests/approvals/out/call-expressions/call-expressions.awst deleted file mode 100644 index 9548b1fc..00000000 --- a/tests/approvals/out/call-expressions/call-expressions.awst +++ /dev/null @@ -1,50 +0,0 @@ -contract Example -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - return this.localMethod() + super.baseMethod() == tests/approvals/call-expressions.algo.ts::freeMethod() - this.baseMethod() - } - - clearProgram(): bool - { - return True - } - - baseMethod(): uint64 - { - return 1 - } - - localMethod(): uint64 - { - return 5 - } - - constructor(): void - { - super.constructor() - } - - ExampleBase::baseMethod(): uint64 - { - return 2 - } - - ExampleBase::constructor(): void - { - void - } - - Contract::constructor(): void - { - this.constructor() - } - -} -subroutine freeMethod(): uint64 -{ - return 7 -} \ No newline at end of file diff --git a/tests/approvals/out/call-expressions/call-expressions.awst.json b/tests/approvals/out/call-expressions/call-expressions.awst.json index f0867d7a..a58a00f7 100644 --- a/tests/approvals/out/call-expressions/call-expressions.awst.json +++ b/tests/approvals/out/call-expressions/call-expressions.awst.json @@ -854,7 +854,8 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null }, { "_type": "Subroutine", diff --git a/tests/approvals/out/conditional-expression/conditional-expression.awst b/tests/approvals/out/conditional-expression/conditional-expression.awst deleted file mode 100644 index 4653e6d7..00000000 --- a/tests/approvals/out/conditional-expression/conditional-expression.awst +++ /dev/null @@ -1,10 +0,0 @@ -subroutine test(x: uint64, y: uint64): bool -{ - a: uint64 = (x < 4 ? x : y) + x - b: uint64 = (Boolean(y % 2) ? 2 : 1) - c: uint64 = (x > y ? (y > 10 ? 3 : y) : x) - d: uint64 = (Boolean(y % 2) ? 2 : 1) + (x < 4 ? x : y) - e: uint64 = (Boolean(x) ? x : 4) - f: bool = (Boolean(y % 2) ? 2 : 1) == (x < 4 ? x : y) - return True -} \ No newline at end of file diff --git a/tests/approvals/out/destructured-params/destructured-params.awst b/tests/approvals/out/destructured-params/destructured-params.awst deleted file mode 100644 index a3786741..00000000 --- a/tests/approvals/out/destructured-params/destructured-params.awst +++ /dev/null @@ -1,11 +0,0 @@ -subroutine test(p: { a: uint64, b: bytes, c: bool }): void -{ - { a: a, b: b, c: c }: { a: uint64, b: bytes, c: bool } = p - log(concat(concat(itob(a), b), itob(c))) -} -subroutine init(): void -{ - tests/approvals/destructured-params.algo.ts::test({ a: (#11 = { a: 1, b: "", c: False }).a, b: #11.b, c: #11.c }) - temp: { a: uint64, b: bytes, c: bool } = { a: 2, b: "Hello", c: True } - tests/approvals/destructured-params.algo.ts::test(temp) -} \ No newline at end of file diff --git a/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst b/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst deleted file mode 100644 index f810af47..00000000 --- a/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst +++ /dev/null @@ -1,11 +0,0 @@ -subroutine test(): void -{ - items: readonlytuple[{ a: uint64, b: uint64 }, { a: uint64, b: uint64 }, { a: uint64, b: uint64 }] = [{ a: 1, b: 2 }, { a: 2, b: 2 }, { a: 3, b: 2 }] - total: uint64 = 0 - for ({ a: a, b: _ } in items) { - total: uint64 = total + a - #loop₁ᶜ: - } - #loop₁ᵇ: - assert(total == 6) -} \ No newline at end of file diff --git a/tests/approvals/out/do-loops/do-loops.awst b/tests/approvals/out/do-loops/do-loops.awst deleted file mode 100644 index 7c51ebfb..00000000 --- a/tests/approvals/out/do-loops/do-loops.awst +++ /dev/null @@ -1,12 +0,0 @@ -subroutine test_do(stop: uint64): void -{ - i: uint64 = 0 - while (True) { - i: uint64 = i + 1 - #loop₁ᶜ: - if (!i < stop) { - goto #loop₁ᵇ - } - } - #loop₁ᵇ: -} \ No newline at end of file diff --git a/tests/approvals/out/ensure-budget/EnsureBudgetContract.approval.teal b/tests/approvals/out/ensure-budget/EnsureBudgetContract.approval.teal index 98b47ed4..aaf5d0c6 100644 --- a/tests/approvals/out/ensure-budget/EnsureBudgetContract.approval.teal +++ b/tests/approvals/out/ensure-budget/EnsureBudgetContract.approval.teal @@ -3,6 +3,11 @@ tests/approvals/ensure-budget.algo.ts::EnsureBudgetContract.approvalProgram: intcblock 100 0 1 bytecblock 0x068101 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: // tests/approvals/ensure-budget.algo.ts:5 // ensureBudget(100) intc_0 // 100 @@ -29,6 +34,14 @@ tests/approvals/ensure-budget.algo.ts::EnsureBudgetContract.approvalProgram: return +// tests/approvals/ensure-budget.algo.ts::EnsureBudgetContract.constructor() -> void: +constructor: + // tests/approvals/ensure-budget.algo.ts:3 + // export class EnsureBudgetContract extends BaseContract { + proto 0 0 + retsub + + // _puya_lib.util.ensure_budget(required_budget: uint64, fee_source: uint64) -> void: ensure_budget: proto 2 0 @@ -37,9 +50,9 @@ ensure_budget: + ensure_budget_while_top@1: - frame_dig 0 global OpcodeBudget - > + frame_dig 0 + < bz ensure_budget_after_while@7 itxn_begin pushint 6 // appl @@ -50,9 +63,11 @@ ensure_budget_while_top@1: itxn_field ApprovalProgram bytec_0 // 0x068101 itxn_field ClearStateProgram + intc_1 // 0 + intc_2 // 1 frame_dig -1 - switch ensure_budget_switch_case_0@3 ensure_budget_switch_case_1@4 - b ensure_budget_switch_case_next@6 + match ensure_budget_switch_case_0@3 ensure_budget_switch_case_1@4 + b ensure_budget_switch_case_default@5 ensure_budget_switch_case_0@3: intc_1 // 0 @@ -62,6 +77,9 @@ ensure_budget_switch_case_0@3: ensure_budget_switch_case_1@4: global MinTxnFee itxn_field Fee + b ensure_budget_switch_case_next@6 + +ensure_budget_switch_case_default@5: ensure_budget_switch_case_next@6: itxn_submit diff --git a/tests/approvals/out/ensure-budget/ensure-budget.awst b/tests/approvals/out/ensure-budget/ensure-budget.awst deleted file mode 100644 index b1282051..00000000 --- a/tests/approvals/out/ensure-budget/ensure-budget.awst +++ /dev/null @@ -1,30 +0,0 @@ -contract EnsureBudgetContract -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - ensure_budget(100, 0) - ensure_budget(100, 0) - ensure_budget(100, 1) - ensure_budget(100, 2) - return True - } - - clearProgram(): bool - { - return True - } - - constructor(): void - { - void - } - - Contract::constructor(): void - { - this.constructor() - } - -} \ No newline at end of file diff --git a/tests/approvals/out/ensure-budget/ensure-budget.awst.json b/tests/approvals/out/ensure-budget/ensure-budget.awst.json index 6eabe1ef..1a1b64b0 100644 --- a/tests/approvals/out/ensure-budget/ensure-budget.awst.json +++ b/tests/approvals/out/ensure-budget/ensure-budget.awst.json @@ -750,6 +750,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/for-loops/for-loops.awst b/tests/approvals/out/for-loops/for-loops.awst deleted file mode 100644 index d599bf21..00000000 --- a/tests/approvals/out/for-loops/for-loops.awst +++ /dev/null @@ -1,61 +0,0 @@ -subroutine test_for_loop(start: uint64, stop: uint64, step: uint64): uint64 -{ - total: uint64 = 0 - i: uint64 = start - while (i < stop) { - total: uint64 = total + i - #loop₁ᶜ: - i: uint64 = i + step - } - #loop₁ᵇ: - return total -} -subroutine test_for_loop_break(start: uint64, stop: uint64, step: uint64): uint64 -{ - total: uint64 = 0 - i: uint64 = start - while (i < stop) { - total: uint64 = total + i - if (total > 10) { - goto #loop₁ᵇ - } - #loop₁ᶜ: - i: uint64 = i + step - } - #loop₁ᵇ: - return total -} -subroutine test_for_loop_continue(start: uint64, stop: uint64, step: uint64): uint64 -{ - total: uint64 = 0 - i: uint64 = start - while (i < stop) { - if (i % 5 == 0) { - goto #loop₁ᶜ - } - total: uint64 = total + i - #loop₁ᶜ: - i: uint64 = i + step - } - #loop₁ᵇ: - return total -} -subroutine test_for_loop_labelled(start: uint64, stop: uint64, step: uint64): uint64 -{ - total: uint64 = 0 - i: uint64 = start - while (i < stop) { - j: uint64 = start - while (j < stop) { - total: uint64 = total + j + j - goto outer₁ᵇ - #loop₁ᶜ: - j: uint64 = j + step - } - #loop₁ᵇ: - outer₁ᶜ: - i: uint64 = i + step - } - outer₁ᵇ: - return total -} \ No newline at end of file diff --git a/tests/approvals/out/for-of-loops/for-of-loops.awst b/tests/approvals/out/for-of-loops/for-of-loops.awst deleted file mode 100644 index 8052b4bb..00000000 --- a/tests/approvals/out/for-of-loops/for-of-loops.awst +++ /dev/null @@ -1,10 +0,0 @@ -subroutine test_for_of_loop(items: readonlytuple[uint64, uint64, uint64]): uint64 -{ - total: uint64 = 0 - for (item in items) { - total: uint64 = total + item - #loop₁ᶜ: - } - #loop₁ᵇ: - return total -} \ No newline at end of file diff --git a/tests/approvals/out/global-state/global-state.awst b/tests/approvals/out/global-state/global-state.awst deleted file mode 100644 index 3f3a2038..00000000 --- a/tests/approvals/out/global-state/global-state.awst +++ /dev/null @@ -1,47 +0,0 @@ -contract TestContract -{ - globals { - ["baseTestState"]: string - ["noInitial"]: bytes - ["noInitialInt"]: uint64 - ["testState"]: uint64 - ["TESTSTATE"]: uint64 - } - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - assert(STATE_EXISTS(GlobalState["testState"])) - assert(GlobalState["testState"] == 2) - GlobalState["testState"]: uint64 = btoi(txnas(0)) - return True - } - - clearProgram(): bool - { - return True - } - - constructor(): void - { - someValue: uint64 = 72057594037927936 - super.constructor() - GlobalState["testState"]: uint64 = 2 - GlobalState["TESTSTATE"]: uint64 = 5 - assert(GlobalState["baseTestState"] == "testing 123") - GlobalState["noInitialInt"]: uint64 = someValue * GlobalState["testState"] - } - - BaseTestContract::constructor(): void - { - void - GlobalState["baseTestState"]: string = "testing 123" - } - - Contract::constructor(): void - { - this.constructor() - } - -} \ No newline at end of file diff --git a/tests/approvals/out/global-state/global-state.awst.json b/tests/approvals/out/global-state/global-state.awst.json index 5023fcae..f36d35bc 100644 --- a/tests/approvals/out/global-state/global-state.awst.json +++ b/tests/approvals/out/global-state/global-state.awst.json @@ -1508,6 +1508,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/BaseWithAbiCreate.approval.teal b/tests/approvals/out/implicit-create/BaseWithAbiCreate.approval.teal index 9ddf262d..88df896c 100644 --- a/tests/approvals/out/implicit-create/BaseWithAbiCreate.approval.teal +++ b/tests/approvals/out/implicit-create/BaseWithAbiCreate.approval.teal @@ -1,37 +1,70 @@ #pragma version 10 tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.approvalProgram: + intcblock 0 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: callsub __puya_arc4_router__ return +// tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.constructor() -> void: +constructor: + // tests/approvals/implicit-create.algo.ts:17 + // class BaseWithAbiCreate extends Contract { + proto 0 0 + retsub + + // tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.__puya_arc4_router__() -> uint64: __puya_arc4_router__: // tests/approvals/implicit-create.algo.ts:17 // class BaseWithAbiCreate extends Contract { proto 0 1 txn NumAppArgs - bz __puya_arc4_router___after_if_else@6 - pushbytes 0x4c5c61ba // method "create()void" + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@5 txna ApplicationArgs 0 + pushbytes 0x4c5c61ba // method "create()void" + swap match __puya_arc4_router___create_route@2 - pushint 0 // 0 - retsub + b __puya_arc4_router___switch_case_default@3 __puya_arc4_router___create_route@2: // tests/approvals/implicit-create.algo.ts:18 // @abimethod({ onCreate: 'require' }) txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - ! - assert // is creating + intc_0 // 0 + == + assert // can only call when creating + callsub create pushint 1 // 1 retsub +__puya_arc4_router___switch_case_default@3: + b __puya_arc4_router___after_if_else@6 + +__puya_arc4_router___bare_routing@5: + __puya_arc4_router___after_if_else@6: // tests/approvals/implicit-create.algo.ts:17 // class BaseWithAbiCreate extends Contract { - pushint 0 // 0 + intc_0 // 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.create() -> void: +create: + // tests/approvals/implicit-create.algo.ts:18-19 + // @abimethod({ onCreate: 'require' }) + // public create() {} + proto 0 0 retsub diff --git a/tests/approvals/out/implicit-create/BaseWithAbiCreate.arc32.json b/tests/approvals/out/implicit-create/BaseWithAbiCreate.arc32.json index e1fd7ae8..6fb8c361 100644 --- a/tests/approvals/out/implicit-create/BaseWithAbiCreate.arc32.json +++ b/tests/approvals/out/implicit-create/BaseWithAbiCreate.arc32.json @@ -7,7 +7,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2VXaXRoQWJpQ3JlYXRlLmFwcHJvdmFsUHJvZ3JhbToKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czo6QmFzZVdpdGhBYmlDcmVhdGUuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2ltcGxpY2l0LWNyZWF0ZS5hbGdvLnRzOjE3CiAgICAvLyBjbGFzcyBCYXNlV2l0aEFiaUNyZWF0ZSBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMQogICAgdHhuIE51bUFwcEFyZ3MKICAgIGJ6IF9fcHV5YV9hcmM0X3JvdXRlcl9fX2FmdGVyX2lmX2Vsc2VANgogICAgcHVz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ICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2VXaXRoQWJpQ3JlYXRlLmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" }, "state": { diff --git a/tests/approvals/out/implicit-create/BaseWithAbiCreate.ssa.ir b/tests/approvals/out/implicit-create/BaseWithAbiCreate.ssa.ir index 91d2a684..a1953f8c 100644 --- a/tests/approvals/out/implicit-create/BaseWithAbiCreate.ssa.ir +++ b/tests/approvals/out/implicit-create/BaseWithAbiCreate.ssa.ir @@ -26,10 +26,10 @@ contract tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate: block@2: // create_route_L18 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (== tmp%5#0 0u) - (assert tmp%6#0) // is creating + (assert tmp%6#0) // can only call when creating tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.create() return 1u block@3: // switch_case_default_L17 diff --git a/tests/approvals/out/implicit-create/BaseWithBareCreate.approval.teal b/tests/approvals/out/implicit-create/BaseWithBareCreate.approval.teal index 2a2f2fa0..2dda0a45 100644 --- a/tests/approvals/out/implicit-create/BaseWithBareCreate.approval.teal +++ b/tests/approvals/out/implicit-create/BaseWithBareCreate.approval.teal @@ -1,32 +1,71 @@ #pragma version 10 tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.approvalProgram: + intcblock 0 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: callsub __puya_arc4_router__ return +// tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.constructor() -> void: +constructor: + // tests/approvals/implicit-create.algo.ts:13 + // class BaseWithBareCreate extends Contract { + proto 0 0 + retsub + + // tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.__puya_arc4_router__() -> uint64: __puya_arc4_router__: // tests/approvals/implicit-create.algo.ts:13 // class BaseWithBareCreate extends Contract { proto 0 1 txn NumAppArgs - bnz __puya_arc4_router___after_if_else@6 + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@2 + b __puya_arc4_router___after_if_else@6 + +__puya_arc4_router___bare_routing@2: + // tests/approvals/implicit-create.algo.ts:13 + // class BaseWithBareCreate extends Contract { txn OnCompletion - bnz __puya_arc4_router___after_if_else@6 + intc_0 // 0 + swap + match __puya_arc4_router___create@3 + b __puya_arc4_router___switch_case_default@4 + +__puya_arc4_router___create@3: // tests/approvals/implicit-create.algo.ts:14 // @baremethod({ onCreate: 'require' }) txn ApplicationID - ! - assert // is creating + intc_0 // 0 + == + assert // can only call when creating // tests/approvals/implicit-create.algo.ts:14-15 // @baremethod({ onCreate: 'require' }) // public create() {} + callsub create pushint 1 // 1 retsub +__puya_arc4_router___switch_case_default@4: + __puya_arc4_router___after_if_else@6: // tests/approvals/implicit-create.algo.ts:13 // class BaseWithBareCreate extends Contract { - pushint 0 // 0 + intc_0 // 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.create() -> void: +create: + // tests/approvals/implicit-create.algo.ts:14-15 + // @baremethod({ onCreate: 'require' }) + // public create() {} + proto 0 0 retsub diff --git a/tests/approvals/out/implicit-create/BaseWithBareCreate.arc32.json b/tests/approvals/out/implicit-create/BaseWithBareCreate.arc32.json index df985c5a..5e559f0e 100644 --- a/tests/approvals/out/implicit-create/BaseWithBareCreate.arc32.json +++ b/tests/approvals/out/implicit-create/BaseWithBareCreate.arc32.json @@ -1,7 +1,7 @@ { "hints": {}, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2V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ICAgIHJldHN1YgoKX19wdXlhX2FyYzRfcm91dGVyX19fc3dpdGNoX2Nhc2VfZGVmYXVsdEA0OgoKX19wdXlhX2FyYzRfcm91dGVyX19fYWZ0ZXJfaWZfZWxzZUA2OgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2ltcGxpY2l0LWNyZWF0ZS5hbGdvLnRzOjEzCiAgICAvLyBjbGFzcyBCYXNlV2l0aEJhcmVDcmVhdGUgZXh0ZW5kcyBDb250cmFjdCB7CiAgICBpbnRjXzAgLy8gMAogICAgcmV0c3ViCgoKLy8gdGVzdHMvYXBwcm92YWxzL2ltcGxpY2l0LWNyZWF0ZS5hbGdvLnRzOjpCYXNlV2l0aEJhcmVDcmVhdGUuY3JlYXRlKCkgLT4gdm9pZDoKY3JlYXRlOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2ltcGxpY2l0LWNyZWF0ZS5hbGdvLnRzOjE0LTE1CiAgICAvLyBAYmFyZW1ldGhvZCh7IG9uQ3JlYXRlOiAncmVxdWlyZScgfSkKICAgIC8vIHB1YmxpYyBjcmVhdGUoKSB7fQogICAgcHJvdG8gMCAwCiAgICByZXRzdWIK", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2VXaXRoQmFyZUNyZWF0ZS5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/implicit-create/BaseWithBareCreate.ssa.ir b/tests/approvals/out/implicit-create/BaseWithBareCreate.ssa.ir index 6a4c8d57..0279c974 100644 --- a/tests/approvals/out/implicit-create/BaseWithBareCreate.ssa.ir +++ b/tests/approvals/out/implicit-create/BaseWithBareCreate.ssa.ir @@ -28,7 +28,7 @@ contract tests/approvals/implicit-create.algo.ts::BaseWithBareCreate: block@3: // create_L14 let tmp%3#0: uint64 = (txn ApplicationID) let tmp%4#0: bool = (== tmp%3#0 0u) - (assert tmp%4#0) // is creating + (assert tmp%4#0) // can only call when creating tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.create() return 1u block@4: // switch_case_default_L13 diff --git a/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.approval.teal b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.approval.teal index e87ae031..83ea3d42 100644 --- a/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.approval.teal +++ b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.approval.teal @@ -1,37 +1,79 @@ #pragma version 10 tests/approvals/implicit-create.algo.ts::ExplicitAbiCreateFromBase.approvalProgram: + intcblock 0 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: callsub __puya_arc4_router__ return +// tests/approvals/implicit-create.algo.ts::ExplicitAbiCreateFromBase.constructor() -> void: +constructor: + // tests/approvals/implicit-create.algo.ts:23 + // export class ExplicitAbiCreateFromBase extends BaseWithAbiCreate {} + proto 0 0 + callsub tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.constructor + retsub + + +// tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.constructor() -> void: +tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.constructor: + // tests/approvals/implicit-create.algo.ts:17 + // class BaseWithAbiCreate extends Contract { + proto 0 0 + retsub + + // tests/approvals/implicit-create.algo.ts::ExplicitAbiCreateFromBase.__puya_arc4_router__() -> uint64: __puya_arc4_router__: // tests/approvals/implicit-create.algo.ts:23 // export class ExplicitAbiCreateFromBase extends BaseWithAbiCreate {} proto 0 1 txn NumAppArgs - bz __puya_arc4_router___after_if_else@6 - pushbytes 0x4c5c61ba // method "create()void" + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@5 txna ApplicationArgs 0 + pushbytes 0x4c5c61ba // method "create()void" + swap match __puya_arc4_router___create_route@2 - pushint 0 // 0 - retsub + b __puya_arc4_router___switch_case_default@3 __puya_arc4_router___create_route@2: // tests/approvals/implicit-create.algo.ts:18 // @abimethod({ onCreate: 'require' }) txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - ! - assert // is creating + intc_0 // 0 + == + assert // can only call when creating + callsub create pushint 1 // 1 retsub +__puya_arc4_router___switch_case_default@3: + b __puya_arc4_router___after_if_else@6 + +__puya_arc4_router___bare_routing@5: + __puya_arc4_router___after_if_else@6: // tests/approvals/implicit-create.algo.ts:23 // export class ExplicitAbiCreateFromBase extends BaseWithAbiCreate {} - pushint 0 // 0 + intc_0 // 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.create() -> void: +create: + // tests/approvals/implicit-create.algo.ts:18-19 + // @abimethod({ onCreate: 'require' }) + // public create() {} + proto 0 0 retsub diff --git a/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.arc32.json b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.arc32.json index ee0b6e01..81dad553 100644 --- a/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.arc32.json +++ b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.arc32.json @@ -7,7 +7,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkV4cGxpY2l0QWJpQ3JlYXRlRnJvbUJhc2UuYXBwcm92YWxQcm9ncmFtOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2ltcGxpY2l0LWNyZWF0ZS5hbGdvLnRzOjpFeHBsaWNpdEFiaUNyZWF0ZUZyb21CYXNlLl9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIHRlc3RzL2FwcHJvdmF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XRlRnJvbUJhc2UuY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" }, "state": { diff --git a/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.ssa.ir b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.ssa.ir index 80ed22ef..d4345888 100644 --- a/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.ssa.ir +++ b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.ssa.ir @@ -31,10 +31,10 @@ contract tests/approvals/implicit-create.algo.ts::ExplicitAbiCreateFromBase: block@2: // create_route_L18 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (== tmp%5#0 0u) - (assert tmp%6#0) // is creating + (assert tmp%6#0) // can only call when creating tests/approvals/implicit-create.algo.ts::BaseWithAbiCreate.create() return 1u block@3: // switch_case_default_L23 diff --git a/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.approval.teal b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.approval.teal index fa3d282d..747dc48b 100644 --- a/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.approval.teal +++ b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.approval.teal @@ -1,32 +1,80 @@ #pragma version 10 tests/approvals/implicit-create.algo.ts::ExplicitBareCreateFromBase.approvalProgram: + intcblock 0 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: callsub __puya_arc4_router__ return +// tests/approvals/implicit-create.algo.ts::ExplicitBareCreateFromBase.constructor() -> void: +constructor: + // tests/approvals/implicit-create.algo.ts:21 + // export class ExplicitBareCreateFromBase extends BaseWithBareCreate {} + proto 0 0 + callsub tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.constructor + retsub + + +// tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.constructor() -> void: +tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.constructor: + // tests/approvals/implicit-create.algo.ts:13 + // class BaseWithBareCreate extends Contract { + proto 0 0 + retsub + + // tests/approvals/implicit-create.algo.ts::ExplicitBareCreateFromBase.__puya_arc4_router__() -> uint64: __puya_arc4_router__: // tests/approvals/implicit-create.algo.ts:21 // export class ExplicitBareCreateFromBase extends BaseWithBareCreate {} proto 0 1 txn NumAppArgs - bnz __puya_arc4_router___after_if_else@6 + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@2 + b __puya_arc4_router___after_if_else@6 + +__puya_arc4_router___bare_routing@2: + // tests/approvals/implicit-create.algo.ts:21 + // export class ExplicitBareCreateFromBase extends BaseWithBareCreate {} txn OnCompletion - bnz __puya_arc4_router___after_if_else@6 + intc_0 // 0 + swap + match __puya_arc4_router___create@3 + b __puya_arc4_router___switch_case_default@4 + +__puya_arc4_router___create@3: // tests/approvals/implicit-create.algo.ts:14 // @baremethod({ onCreate: 'require' }) txn ApplicationID - ! - assert // is creating + intc_0 // 0 + == + assert // can only call when creating // tests/approvals/implicit-create.algo.ts:14-15 // @baremethod({ onCreate: 'require' }) // public create() {} + callsub create pushint 1 // 1 retsub +__puya_arc4_router___switch_case_default@4: + __puya_arc4_router___after_if_else@6: // tests/approvals/implicit-create.algo.ts:21 // export class ExplicitBareCreateFromBase extends BaseWithBareCreate {} - pushint 0 // 0 + intc_0 // 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.create() -> void: +create: + // tests/approvals/implicit-create.algo.ts:14-15 + // @baremethod({ onCreate: 'require' }) + // public create() {} + proto 0 0 retsub diff --git a/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.arc32.json b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.arc32.json index 2b66fb5d..ed15c9e0 100644 --- a/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.arc32.json +++ b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.arc32.json @@ -1,7 +1,7 @@ { "hints": {}, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkV4cGxpY2l0QmFyZUNyZWF0ZUZyb21CYXNlLmFwcHJvdmFsUHJvZ3JhbToKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czo6RXhwbGljaXRCYXJlQ3JlYXRlRnJvbUJhc2UuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2ltcGxpY2l0LWNyZWF0ZS5hbGdvLnRzOjIxCiAgICAvLyBleHBvcnQgY2xhc3MgRXhwbGljaXRCYXJlQ3JlYXRlRnJvbUJhc2UgZXh0ZW5kcyBCYXNlV2l0aEJhcmVDcmVhdGUge30KICAgIHByb3RvIDAgMQogICAgdHhuIE51bUFwcEFyZ3MKICAgIGJueiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19hZnRlcl9pZl9lbHNlQDYKICAgIHR4biBPbkNvbXBsZXRpb24KICAgIGJueiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19hZnRlcl9pZl9lbHNlQDYKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czoxNAogICAgLy8gQGJhcmVtZXRob2QoeyBvbkNyZWF0ZTogJ3JlcXVpcmUnIH0pCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgIQogICAgYXNzZXJ0IC8vIGlzIGNyZWF0aW5nCiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6MTQtMT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XRlLmFsZ28udHM6MjEKICAgIC8vIGV4cG9ydCBjbGFzcyBFeHBsaWNpdEJhcmVDcmVhdGVGcm9tQmFzZSBleHRlbmRzIEJhc2VXaXRoQmFyZUNyZWF0ZSB7fQogICAgaW50Y18wIC8vIDAKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czo6QmFzZVdpdGhCYXJlQ3JlYXRlLmNyZWF0ZSgpIC0+IHZvaWQ6CmNyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czoxNC0xNQogICAgLy8gQGJhcmVtZXRob2QoeyBvbkNyZWF0ZTogJ3JlcXVpcmUnIH0pCiAgICAvLyBwdWJsaWMgY3JlYXRlKCkge30KICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkV4cGxpY2l0QmFyZUNyZWF0ZUZyb21CYXNlLmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" }, "state": { diff --git a/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.ssa.ir b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.ssa.ir index 2fdb82be..215bd230 100644 --- a/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.ssa.ir +++ b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.ssa.ir @@ -33,7 +33,7 @@ contract tests/approvals/implicit-create.algo.ts::ExplicitBareCreateFromBase: block@3: // create_L14 let tmp%3#0: uint64 = (txn ApplicationID) let tmp%4#0: bool = (== tmp%3#0 0u) - (assert tmp%4#0) // is creating + (assert tmp%4#0) // can only call when creating tests/approvals/implicit-create.algo.ts::BaseWithBareCreate.create() return 1u block@4: // switch_case_default_L21 diff --git a/tests/approvals/out/implicit-create/NoBare.approval.teal b/tests/approvals/out/implicit-create/NoBare.approval.teal index e6e76264..d971266d 100644 --- a/tests/approvals/out/implicit-create/NoBare.approval.teal +++ b/tests/approvals/out/implicit-create/NoBare.approval.teal @@ -2,47 +2,97 @@ tests/approvals/implicit-create.algo.ts::NoBare.approvalProgram: intcblock 0 1 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: callsub __puya_arc4_router__ return +// tests/approvals/implicit-create.algo.ts::NoBare.constructor() -> void: +constructor: + // tests/approvals/implicit-create.algo.ts:4 + // export class NoBare extends Contract { + proto 0 0 + retsub + + // tests/approvals/implicit-create.algo.ts::NoBare.__puya_arc4_router__() -> uint64: __puya_arc4_router__: // tests/approvals/implicit-create.algo.ts:4 // export class NoBare extends Contract { proto 0 1 txn NumAppArgs + intc_0 // 0 + != bz __puya_arc4_router___bare_routing@5 - pushbytes 0xb8b5e4b9 // method "handleNoop()void" txna ApplicationArgs 0 + pushbytes 0xb8b5e4b9 // method "handleNoop()void" + swap match __puya_arc4_router___handleNoop_route@2 - intc_0 // 0 - retsub + b __puya_arc4_router___switch_case_default@3 __puya_arc4_router___handleNoop_route@2: // tests/approvals/implicit-create.algo.ts:5 // @abimethod({ allowActions: 'NoOp' }) txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating + intc_0 // 0 + != + assert // can only call when not creating + callsub handleNoop intc_1 // 1 retsub +__puya_arc4_router___switch_case_default@3: + b __puya_arc4_router___after_if_else@9 + __puya_arc4_router___bare_routing@5: // tests/approvals/implicit-create.algo.ts:4 // export class NoBare extends Contract { txn OnCompletion - bnz __puya_arc4_router___after_if_else@9 + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@6 + b __puya_arc4_router___switch_case_default@7 + +__puya_arc4_router_____algots__.defaultCreate@6: + // tests/approvals/implicit-create.algo.ts:4 + // export class NoBare extends Contract { txn ApplicationID - ! - assert // is creating + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate intc_1 // 1 retsub +__puya_arc4_router___switch_case_default@7: + __puya_arc4_router___after_if_else@9: // tests/approvals/implicit-create.algo.ts:4 // export class NoBare extends Contract { intc_0 // 0 retsub + + +// tests/approvals/implicit-create.algo.ts::NoBare.handleNoop() -> void: +handleNoop: + // tests/approvals/implicit-create.algo.ts:5-6 + // @abimethod({ allowActions: 'NoOp' }) + // public handleNoop() {} + proto 0 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::NoBare.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/implicit-create.algo.ts:4 + // export class NoBare extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/implicit-create/NoBare.arc32.json b/tests/approvals/out/implicit-create/NoBare.arc32.json index 3f6185b5..e89e3238 100644 --- a/tests/approvals/out/implicit-create/NoBare.arc32.json +++ b/tests/approvals/out/implicit-create/NoBare.arc32.json @@ -7,7 +7,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vQmFyZS5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vQmFyZS5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6NAogICAgLy8gZXhwb3J0IGNsYXNzIE5vQmFyZSBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMQogICAgdHhuIE51bUFwc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UuYWxnby50czo1LTYKICAgIC8vIEBhYmltZXRob2QoeyBhbGxvd0FjdGlvbnM6ICdOb09wJyB9KQogICAgLy8gcHVibGljIGhhbmRsZU5vb3AoKSB7fQogICAgcHJvdG8gMCAwCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vQmFyZS5fX2FsZ290c19fLmRlZmF1bHRDcmVhdGUoKSAtPiB2b2lkOgpfX2FsZ290c19fLmRlZmF1bHRDcmVhdGU6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6NAogICAgLy8gZXhwb3J0IGNsYXNzIE5vQmFyZSBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vQmFyZS5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/implicit-create/NoBare.ssa.ir b/tests/approvals/out/implicit-create/NoBare.ssa.ir index 46017190..156aa21c 100644 --- a/tests/approvals/out/implicit-create/NoBare.ssa.ir +++ b/tests/approvals/out/implicit-create/NoBare.ssa.ir @@ -26,10 +26,10 @@ contract tests/approvals/implicit-create.algo.ts::NoBare: block@2: // handleNoop_route_L5 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (!= tmp%5#0 0u) - (assert tmp%6#0) // is not creating + (assert tmp%6#0) // can only call when not creating tests/approvals/implicit-create.algo.ts::NoBare.handleNoop() return 1u block@3: // switch_case_default_L4 @@ -42,7 +42,7 @@ contract tests/approvals/implicit-create.algo.ts::NoBare: block@6: // __algots__.defaultCreate_L4 let tmp%8#0: uint64 = (txn ApplicationID) let tmp%9#0: bool = (== tmp%8#0 0u) - (assert tmp%9#0) // is creating + (assert tmp%9#0) // can only call when creating tests/approvals/implicit-create.algo.ts::NoBare.__algots__.defaultCreate() return 1u block@7: // switch_case_default_L4 diff --git a/tests/approvals/out/implicit-create/NoNoOp.approval.teal b/tests/approvals/out/implicit-create/NoNoOp.approval.teal index 9eea73dd..1474a0c8 100644 --- a/tests/approvals/out/implicit-create/NoNoOp.approval.teal +++ b/tests/approvals/out/implicit-create/NoNoOp.approval.teal @@ -2,32 +2,55 @@ tests/approvals/implicit-create.algo.ts::NoNoOp.approvalProgram: intcblock 0 1 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: callsub __puya_arc4_router__ return +// tests/approvals/implicit-create.algo.ts::NoNoOp.constructor() -> void: +constructor: + // tests/approvals/implicit-create.algo.ts:8 + // export class NoNoOp extends Contract { + proto 0 0 + retsub + + // tests/approvals/implicit-create.algo.ts::NoNoOp.__puya_arc4_router__() -> uint64: __puya_arc4_router__: // tests/approvals/implicit-create.algo.ts:8 // export class NoNoOp extends Contract { proto 0 1 txn NumAppArgs - bnz __puya_arc4_router___after_if_else@7 - pushint 4 // 4 intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@2 + b __puya_arc4_router___after_if_else@7 + +__puya_arc4_router___bare_routing@2: + // tests/approvals/implicit-create.algo.ts:8 + // export class NoNoOp extends Contract { txn OnCompletion - match __puya_arc4_router___handleUpdate@3 __puya_arc4_router_____algots__.defaultCreate@4 + pushint 4 // 4 intc_0 // 0 - retsub + uncover 2 + match __puya_arc4_router___handleUpdate@3 __puya_arc4_router_____algots__.defaultCreate@4 + b __puya_arc4_router___switch_case_default@5 __puya_arc4_router___handleUpdate@3: // tests/approvals/implicit-create.algo.ts:9 // @baremethod({ allowActions: 'UpdateApplication' }) txn ApplicationID - assert // is not creating + intc_0 // 0 + != + assert // can only call when not creating // tests/approvals/implicit-create.algo.ts:9-10 // @baremethod({ allowActions: 'UpdateApplication' }) // public handleUpdate() {} + callsub handleUpdate intc_1 // 1 retsub @@ -35,13 +58,34 @@ __puya_arc4_router_____algots__.defaultCreate@4: // tests/approvals/implicit-create.algo.ts:8 // export class NoNoOp extends Contract { txn ApplicationID - ! - assert // is creating + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate intc_1 // 1 retsub +__puya_arc4_router___switch_case_default@5: + __puya_arc4_router___after_if_else@7: // tests/approvals/implicit-create.algo.ts:8 // export class NoNoOp extends Contract { intc_0 // 0 retsub + + +// tests/approvals/implicit-create.algo.ts::NoNoOp.handleUpdate() -> void: +handleUpdate: + // tests/approvals/implicit-create.algo.ts:9-10 + // @baremethod({ allowActions: 'UpdateApplication' }) + // public handleUpdate() {} + proto 0 0 + retsub + + +// tests/approvals/implicit-create.algo.ts::NoNoOp.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/implicit-create.algo.ts:8 + // export class NoNoOp extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/implicit-create/NoNoOp.arc32.json b/tests/approvals/out/implicit-create/NoNoOp.arc32.json index c7ceccc0..2ddafe49 100644 --- a/tests/approvals/out/implicit-create/NoNoOp.arc32.json +++ b/tests/approvals/out/implicit-create/NoNoOp.arc32.json @@ -1,7 +1,7 @@ { "hints": {}, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vTm9PcC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5v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HJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czo6Tm9Ob09wLmhhbmRsZVVwZGF0ZSgpIC0+IHZvaWQ6CmhhbmRsZVVwZGF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czo5LTEwCiAgICAvLyBAYmFyZW1ldGhvZCh7IGFsbG93QWN0aW9uczogJ1VwZGF0ZUFwcGxpY2F0aW9uJyB9KQogICAgLy8gcHVibGljIGhhbmRsZVVwZGF0ZSgpIHt9CiAgICBwcm90byAwIDAKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czo6Tm9Ob09wLl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZSgpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9pbXBsaWNpdC1jcmVhdGUuYWxnby50czo4CiAgICAvLyBleHBvcnQgY2xhc3MgTm9Ob09wIGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIK", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vTm9PcC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/implicit-create/NoNoOp.ssa.ir b/tests/approvals/out/implicit-create/NoNoOp.ssa.ir index 7d29ff9c..38b25edd 100644 --- a/tests/approvals/out/implicit-create/NoNoOp.ssa.ir +++ b/tests/approvals/out/implicit-create/NoNoOp.ssa.ir @@ -28,13 +28,13 @@ contract tests/approvals/implicit-create.algo.ts::NoNoOp: block@3: // handleUpdate_L9 let tmp%3#0: uint64 = (txn ApplicationID) let tmp%4#0: bool = (!= tmp%3#0 0u) - (assert tmp%4#0) // is not creating + (assert tmp%4#0) // can only call when not creating tests/approvals/implicit-create.algo.ts::NoNoOp.handleUpdate() return 1u block@4: // __algots__.defaultCreate_L8 let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (== tmp%5#0 0u) - (assert tmp%6#0) // is creating + (assert tmp%6#0) // can only call when creating tests/approvals/implicit-create.algo.ts::NoNoOp.__algots__.defaultCreate() return 1u block@5: // switch_case_default_L8 diff --git a/tests/approvals/out/implicit-create/implicit-create.awst b/tests/approvals/out/implicit-create/implicit-create.awst deleted file mode 100644 index 3df60dc5..00000000 --- a/tests/approvals/out/implicit-create/implicit-create.awst +++ /dev/null @@ -1,222 +0,0 @@ -contract NoBare -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - return arc4Router() - } - - clearProgram(): bool - { - return True - } - - handleNoop(): void - { - } - - constructor(): void - { - void - } - - Contract::constructor(): void - { - } - - Contract::constructor(): void - { - this.constructor() - } - - __algots__.defaultCreate(): void - { - } - -} -contract NoNoOp -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - return arc4Router() - } - - clearProgram(): bool - { - return True - } - - handleUpdate(): void - { - } - - constructor(): void - { - void - } - - Contract::constructor(): void - { - } - - Contract::constructor(): void - { - this.constructor() - } - - __algots__.defaultCreate(): void - { - } - -} -contract BaseWithBareCreate -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - return arc4Router() - } - - clearProgram(): bool - { - return True - } - - create(): void - { - } - - constructor(): void - { - void - } - - Contract::constructor(): void - { - } - - Contract::constructor(): void - { - this.constructor() - } - -} -contract BaseWithAbiCreate -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - return arc4Router() - } - - clearProgram(): bool - { - return True - } - - create(): void - { - } - - constructor(): void - { - void - } - - Contract::constructor(): void - { - } - - Contract::constructor(): void - { - this.constructor() - } - -} -contract ExplicitBareCreateFromBase -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - return arc4Router() - } - - clearProgram(): bool - { - return True - } - - constructor(): void - { - super.constructor() - } - - BaseWithBareCreate::create(): void - { - } - - BaseWithBareCreate::constructor(): void - { - void - } - - Contract::constructor(): void - { - } - - Contract::constructor(): void - { - this.constructor() - } - -} -contract ExplicitAbiCreateFromBase -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - return arc4Router() - } - - clearProgram(): bool - { - return True - } - - constructor(): void - { - super.constructor() - } - - BaseWithAbiCreate::create(): void - { - } - - BaseWithAbiCreate::constructor(): void - { - void - } - - Contract::constructor(): void - { - } - - Contract::constructor(): void - { - this.constructor() - } - -} \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/implicit-create.awst.json b/tests/approvals/out/implicit-create/implicit-create.awst.json index 8832f912..828a0c74 100644 --- a/tests/approvals/out/implicit-create/implicit-create.awst.json +++ b/tests/approvals/out/implicit-create/implicit-create.awst.json @@ -604,7 +604,8 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null }, { "_type": "Contract", @@ -1207,7 +1208,8 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null }, { "_type": "Contract", @@ -1756,7 +1758,8 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null }, { "_type": "Contract", @@ -2309,7 +2312,8 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null }, { "_type": "Contract", @@ -2932,7 +2936,8 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null }, { "_type": "Contract", @@ -3559,6 +3564,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/inheritance-a/inheritance-a.awst b/tests/approvals/out/inheritance-a/inheritance-a.awst deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/approvals/out/inheritance-b/ConcreteArc4Contract.approval.teal b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.approval.teal index 33912af0..5fd8c385 100644 --- a/tests/approvals/out/inheritance-b/ConcreteArc4Contract.approval.teal +++ b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.approval.teal @@ -1,33 +1,61 @@ #pragma version 10 tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.approvalProgram: - intcblock 1 0 + intcblock 0 1 bytecblock 0x151f7c75 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: callsub __puya_arc4_router__ return +// tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.constructor() -> void: +constructor: + // tests/approvals/inheritance-b.algo.ts:14 + // export class ConcreteArc4Contract extends Arc4Contract { + proto 0 0 + callsub tests/approvals/inheritance-a.algo.ts::Arc4Contract.constructor + retsub + + +// tests/approvals/inheritance-a.algo.ts::Arc4Contract.constructor() -> void: +tests/approvals/inheritance-a.algo.ts::Arc4Contract.constructor: + // tests/approvals/inheritance-a.algo.ts:11 + // export abstract class Arc4Contract extends Contract { + proto 0 0 + retsub + + // tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.__puya_arc4_router__() -> uint64: __puya_arc4_router__: // tests/approvals/inheritance-b.algo.ts:14 // export class ConcreteArc4Contract extends Arc4Contract { proto 0 1 txn NumAppArgs + intc_0 // 0 + != bz __puya_arc4_router___bare_routing@6 - pushbytess 0xc73da9b9 0xf161dc37 // method "getVeryImportantValue()string", method "simpleAbiMethod(uint64,uint64)uint64" txna ApplicationArgs 0 + pushbytes 0xc73da9b9 // method "getVeryImportantValue()string" + pushbytes 0xf161dc37 // method "simpleAbiMethod(uint64,uint64)uint64" + uncover 2 match __puya_arc4_router___getVeryImportantValue_route@2 __puya_arc4_router___simpleAbiMethod_route@3 - intc_1 // 0 - retsub + b __puya_arc4_router___switch_case_default@4 __puya_arc4_router___getVeryImportantValue_route@2: // tests/approvals/inheritance-b.algo.ts:15 // public getVeryImportantValue() { txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating + intc_0 // 0 + != + assert // can only call when not creating callsub getVeryImportantValue dup len @@ -39,17 +67,20 @@ __puya_arc4_router___getVeryImportantValue_route@2: swap concat log - intc_0 // 1 + intc_1 // 1 retsub __puya_arc4_router___simpleAbiMethod_route@3: // tests/approvals/inheritance-a.algo.ts:17 // public simpleAbiMethod(a: uint64, b: uint64): uint64 { txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating + intc_0 // 0 + != + assert // can only call when not creating // tests/approvals/inheritance-b.algo.ts:14 // export class ConcreteArc4Contract extends Arc4Contract { txna ApplicationArgs 1 @@ -64,24 +95,38 @@ __puya_arc4_router___simpleAbiMethod_route@3: swap concat log - intc_0 // 1 + intc_1 // 1 retsub +__puya_arc4_router___switch_case_default@4: + b __puya_arc4_router___after_if_else@10 + __puya_arc4_router___bare_routing@6: // tests/approvals/inheritance-b.algo.ts:14 // export class ConcreteArc4Contract extends Arc4Contract { txn OnCompletion - bnz __puya_arc4_router___after_if_else@10 + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@7 + b __puya_arc4_router___switch_case_default@8 + +__puya_arc4_router_____algots__.defaultCreate@7: + // tests/approvals/inheritance-b.algo.ts:14 + // export class ConcreteArc4Contract extends Arc4Contract { txn ApplicationID - ! - assert // is creating - intc_0 // 1 + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 retsub +__puya_arc4_router___switch_case_default@8: + __puya_arc4_router___after_if_else@10: // tests/approvals/inheritance-b.algo.ts:14 // export class ConcreteArc4Contract extends Arc4Contract { - intc_1 // 0 + intc_0 // 0 retsub @@ -109,3 +154,11 @@ simpleAbiMethod: frame_dig -1 + retsub + + +// tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/inheritance-b.algo.ts:14 + // export class ConcreteArc4Contract extends Arc4Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/inheritance-b/ConcreteArc4Contract.arc32.json b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.arc32.json index bbe415ab..4c474057 100644 --- a/tests/approvals/out/inheritance-b/ConcreteArc4Contract.arc32.json +++ b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.arc32.json @@ -12,7 +12,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW5oZXJpdGFuY2UtYi5hbGdvLnRzOjpDb25jcmV0ZUFyYzRDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMSAwCiAgICBieXRlY2Jsb2NrIDB4MTUxZjdjNzUKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RzL2FwcHJvdmFscy9pbmhlcml0YW5jZS1iLmFsZ28udHM6OkNvbmNyZXRlQXJjNENvbnRyYWN0Ll9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9pbmhlcml0YW5jZS1iLmFsZ28udHM6MTQKICAgIC8vIGV4cG9ydCBjbGFzcyBDb25jcmV0ZUFyYzRDb250cmFjdCBleHRlbmRzIEFyYzRDb250cmFjdCB7CiAgICBwcm90byAwIDEKICAgIHR4biBOdW1BcHBBcmdzCiAgICBieiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19iYXJlX3JvdXRpbmdANgogICAgcHVzaGJ5dGVzcyAweGM3M2RhOWI5IDB4ZjE2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bmNyZXRlQXJjNENvbnRyYWN0IGV4dGVuZHMgQXJjNENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW5oZXJpdGFuY2UtYi5hbGdvLnRzOjpDb25jcmV0ZUFyYzRDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/inheritance-b/ConcreteArc4Contract.ssa.ir b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.ssa.ir index 5ae31081..09ecd7f1 100644 --- a/tests/approvals/out/inheritance-b/ConcreteArc4Contract.ssa.ir +++ b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.ssa.ir @@ -31,10 +31,10 @@ contract tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract: block@2: // getVeryImportantValue_route_L15 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (!= tmp%5#0 0u) - (assert tmp%6#0) // is not creating + (assert tmp%6#0) // can only call when not creating let to_encode%0#0: bytes = tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.getVeryImportantValue() let length%0#0: uint64 = (len to_encode%0#0) let as_bytes%0#0: bytes = (itob length%0#0) @@ -46,10 +46,10 @@ contract tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract: block@3: // simpleAbiMethod_route_L17 let tmp%8#0: uint64 = (txn OnCompletion) let tmp%9#0: bool = (== tmp%8#0 NoOp) - (assert tmp%9#0) // OnCompletion is NoOp + (assert tmp%9#0) // OnCompletion is not NoOp let tmp%10#0: uint64 = (txn ApplicationID) let tmp%11#0: bool = (!= tmp%10#0 0u) - (assert tmp%11#0) // is not creating + (assert tmp%11#0) // can only call when not creating let tmp%12#0: bytes = (txna ApplicationArgs 1) let tmp%13#0: uint64 = (btoi tmp%12#0) let tmp%14#0: bytes = (txna ApplicationArgs 2) @@ -69,7 +69,7 @@ contract tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract: block@7: // __algots__.defaultCreate_L14 let tmp%18#0: uint64 = (txn ApplicationID) let tmp%19#0: bool = (== tmp%18#0 0u) - (assert tmp%19#0) // is creating + (assert tmp%19#0) // can only call when creating tests/approvals/inheritance-b.algo.ts::ConcreteArc4Contract.__algots__.defaultCreate() return 1u block@8: // switch_case_default_L14 diff --git a/tests/approvals/out/inheritance-b/ConcreteSimpleContract.approval.teal b/tests/approvals/out/inheritance-b/ConcreteSimpleContract.approval.teal index 9f21af42..cf1072e6 100644 --- a/tests/approvals/out/inheritance-b/ConcreteSimpleContract.approval.teal +++ b/tests/approvals/out/inheritance-b/ConcreteSimpleContract.approval.teal @@ -1,6 +1,11 @@ #pragma version 10 tests/approvals/inheritance-b.algo.ts::ConcreteSimpleContract.approvalProgram: + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: // tests/approvals/inheritance-b.algo.ts:7 // const a = op.btoi(Txn.applicationArgs(0)) pushint 0 // 0 @@ -22,6 +27,23 @@ tests/approvals/inheritance-b.algo.ts::ConcreteSimpleContract.approvalProgram: return +// tests/approvals/inheritance-b.algo.ts::ConcreteSimpleContract.constructor() -> void: +constructor: + // tests/approvals/inheritance-b.algo.ts:5 + // export class ConcreteSimpleContract extends SimpleContract { + proto 0 0 + callsub tests/approvals/inheritance-a.algo.ts::SimpleContract.constructor + retsub + + +// tests/approvals/inheritance-a.algo.ts::SimpleContract.constructor() -> void: +tests/approvals/inheritance-a.algo.ts::SimpleContract.constructor: + // tests/approvals/inheritance-a.algo.ts:4 + // export abstract class SimpleContract extends BaseContract { + proto 0 0 + retsub + + // tests/approvals/inheritance-a.algo.ts::SimpleContract.simpleMethod(a: uint64, b: uint64) -> uint64: simpleMethod: // tests/approvals/inheritance-a.algo.ts:6 diff --git a/tests/approvals/out/inheritance-b/inheritance-b.awst b/tests/approvals/out/inheritance-b/inheritance-b.awst deleted file mode 100644 index c049896e..00000000 --- a/tests/approvals/out/inheritance-b/inheritance-b.awst +++ /dev/null @@ -1,99 +0,0 @@ -contract ConcreteSimpleContract -{ - globals { - ["someState"]: uint64 - } - approvalProgram(): uint64 - { - if (!Boolean(txn())) { - this.constructor() - } - a: uint64 = btoi(txnas(0)) - b: uint64 = btoi(txnas(1)) - log(itob(this.simpleMethod(a, b))) - return 1 - } - - clearProgram(): bool - { - return True - } - - constructor(): void - { - super.constructor() - } - - SimpleContract::simpleMethod(): uint64 - { - return a * b - } - - SimpleContract::constructor(): void - { - void - } - - Contract::constructor(): void - { - this.constructor() - } - -} -contract ConcreteArc4Contract -{ - globals { - ["someState"]: uint64 - } - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - return arc4Router() - } - - clearProgram(): bool - { - return True - } - - getVeryImportantValue(): string - { - return "42" - } - - constructor(): void - { - super.constructor() - } - - Arc4Contract::simpleMethod(): uint64 - { - return a * b - } - - Arc4Contract::simpleAbiMethod(): uint64 - { - return a + b - } - - Arc4Contract::constructor(): void - { - void - } - - Contract::constructor(): void - { - } - - Contract::constructor(): void - { - this.constructor() - } - - __algots__.defaultCreate(): void - { - } - -} \ No newline at end of file diff --git a/tests/approvals/out/inheritance-b/inheritance-b.awst.json b/tests/approvals/out/inheritance-b/inheritance-b.awst.json index d2031457..9cbfadba 100644 --- a/tests/approvals/out/inheritance-b/inheritance-b.awst.json +++ b/tests/approvals/out/inheritance-b/inheritance-b.awst.json @@ -1011,7 +1011,8 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null }, { "_type": "Contract", @@ -2064,6 +2065,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/intrinsic-calls/intrinsic-calls.awst b/tests/approvals/out/intrinsic-calls/intrinsic-calls.awst deleted file mode 100644 index c62c019a..00000000 --- a/tests/approvals/out/intrinsic-calls/intrinsic-calls.awst +++ /dev/null @@ -1,7 +0,0 @@ -subroutine test(a: uint64, b: bytes): void -{ - x: uint64 = setbit(a, 8, 1) - y: bytes = setbit(b, 12, 9) - z: bytes = itob(x) - g: bytes = sha256(z) -} \ No newline at end of file diff --git a/tests/approvals/out/itxn/ItxnDemoContract.approval.teal b/tests/approvals/out/itxn/ItxnDemoContract.approval.teal index 6c12d30c..64511b28 100644 --- a/tests/approvals/out/itxn/ItxnDemoContract.approval.teal +++ b/tests/approvals/out/itxn/ItxnDemoContract.approval.teal @@ -1,7 +1,7 @@ #pragma version 10 tests/approvals/itxn.algo.ts::ItxnDemoContract.approvalProgram: - intcblock 0 3 1 1000 + intcblock 0 1 3 1000 bytecblock "name" "unit" 0x098101 "AST1" "AST2" "AST3" "3rd" "with args param set" "\t\xc2\x81\x01" txn ApplicationID bnz main_after_if_else@2 @@ -18,7 +18,16 @@ main_after_if_else@2: txnas ApplicationArgs // tests/approvals/itxn.algo.ts:13 // case Bytes('test1'): - pushbytess "test1" "test2" "test3" "test4" // "test1", "test2", "test3", "test4" + pushbytes "test1" + // tests/approvals/itxn.algo.ts:16 + // case Bytes('test2'): + pushbytes "test2" + // tests/approvals/itxn.algo.ts:19 + // case Bytes('test3'): + pushbytes "test3" + // tests/approvals/itxn.algo.ts:20 + // case Bytes('test4'): + pushbytes "test4" // tests/approvals/itxn.algo.ts:12-22 // switch (Txn.applicationArgs(0)) { // case Bytes('test1'): @@ -32,11 +41,8 @@ main_after_if_else@2: // break // } uncover 4 - match main_switch_case_0@4 main_switch_case_1@6 main_after_if_else@15 main_after_if_else@15 - // tests/approvals/itxn.algo.ts:24 - // return true - intc_2 // 1 - return + match main_switch_case_0@4 main_switch_case_1@6 main_switch_case_2@8 main_switch_case_3@10 + b main_switch_case_default@12 main_switch_case_0@4: // tests/approvals/itxn.algo.ts:14 @@ -44,17 +50,36 @@ main_switch_case_0@4: callsub test1 // tests/approvals/itxn.algo.ts:15 // break - b main_after_if_else@15 + b main_block@14 main_switch_case_1@6: // tests/approvals/itxn.algo.ts:17 // this.test2() callsub test2 + // tests/approvals/itxn.algo.ts:18 + // break + b main_block@14 + +main_switch_case_2@8: + // tests/approvals/itxn.algo.ts:19 + // case Bytes('test3'): + b main_block@11 + +main_switch_case_3@10: + +main_block@11: + // tests/approvals/itxn.algo.ts:21 + // break + b main_block@14 + +main_switch_case_default@12: + +main_block@14: main_after_if_else@15: // tests/approvals/itxn.algo.ts:24 // return true - intc_2 // 1 + intc_1 // 1 return @@ -76,6 +101,7 @@ test1: // tests/approvals/itxn.algo.ts:27 // private test1() { proto 0 0 + intc_0 // 0 // tests/approvals/itxn.algo.ts:8 // name = GlobalState({ initialValue: Bytes() }) bytec_0 // "name" @@ -96,9 +122,13 @@ test1: // tests/approvals/itxn.algo.ts:35 // manager: Global.currentApplicationAddress, global CurrentApplicationAddress + dup + cover 2 // tests/approvals/itxn.algo.ts:36 // reserve: Global.currentApplicationAddress, + global CurrentApplicationAddress dup + cover 3 // tests/approvals/itxn.algo.ts:8 // name = GlobalState({ initialValue: Bytes() }) bytec_0 // "name" @@ -109,19 +139,16 @@ test1: // tests/approvals/itxn.algo.ts:40 // const asset1_txn = assetParams.submit() itxn_begin - dup itxn_field ConfigAssetReserve - dig 1 itxn_field ConfigAssetManager // tests/approvals/itxn.algo.ts:34 // decimals: 3, - intc_1 // 3 + intc_2 // 3 itxn_field ConfigAssetDecimals // tests/approvals/itxn.algo.ts:33 // unitName: 'unit', bytec_1 // "unit" itxn_field ConfigAssetUnitName - uncover 2 itxn_field ConfigAssetName // tests/approvals/itxn.algo.ts:31 // total: 1000, @@ -142,6 +169,7 @@ test1: // const asset1_txn = assetParams.submit() itxn_submit itxn ConfigAssetName + frame_bury 0 itxn CreatedAssetID // tests/approvals/itxn.algo.ts:42 // assetName: this.name.value, @@ -156,13 +184,13 @@ test1: // tests/approvals/itxn.algo.ts:44 // const asset2_txn = assetParams.submit() itxn_begin - dig 3 + frame_dig 2 itxn_field ConfigAssetReserve - dig 4 + frame_dig 1 itxn_field ConfigAssetManager // tests/approvals/itxn.algo.ts:34 // decimals: 3, - intc_1 // 3 + intc_2 // 3 itxn_field ConfigAssetDecimals // tests/approvals/itxn.algo.ts:33 // unitName: 'unit', @@ -189,15 +217,15 @@ test1: itxn_submit itxn ConfigAssetName itxn CreatedAssetID + swap // tests/approvals/itxn.algo.ts:46 // assert(asset1_txn.assetName === Bytes('AST1'), 'asset1_txn is correct') - uncover 3 + frame_dig 0 bytec_3 // "AST1" == assert // asset1_txn is correct // tests/approvals/itxn.algo.ts:47 // assert(asset2_txn.assetName === Bytes('AST2'), 'asset2_txn is correct') - swap bytec 4 // "AST2" == assert // asset2_txn is correct @@ -234,13 +262,13 @@ test1: // tests/approvals/itxn.algo.ts:61 // const [appCreateTxn, asset3_txn] = itxn.submitGroup(appCreateParams, assetParams) itxn_next - dup + frame_dig 2 itxn_field ConfigAssetReserve - dig 1 + frame_dig 1 itxn_field ConfigAssetManager // tests/approvals/itxn.algo.ts:34 // decimals: 3, - intc_1 // 3 + intc_2 // 3 itxn_field ConfigAssetDecimals // tests/approvals/itxn.algo.ts:33 // unitName: 'unit', @@ -268,8 +296,9 @@ test1: // tests/approvals/itxn.algo.ts:61 // const [appCreateTxn, asset3_txn] = itxn.submitGroup(appCreateParams, assetParams) itxn_submit - itxn ConfigAssetName gitxn 0 ApplicationID + itxn ConfigAssetName + swap // tests/approvals/itxn.algo.ts:63 // assert(appCreateTxn.appId, 'app is created') assert // app is created @@ -283,8 +312,18 @@ test1: itxn_begin // tests/approvals/itxn.algo.ts:67 // note: '3rd', + intc_1 // 1 + dup + >= + // tests/approvals/itxn.algo.ts:72 + // itxn.submitGroup(appCreateParams, assetParams) + bz test1_next_field@6 + // tests/approvals/itxn.algo.ts:67 + // note: '3rd', bytec 6 // "3rd" itxn_field Note + +test1_next_field@6: // tests/approvals/itxn.algo.ts:53 // clearStateProgram: Bytes.fromHex('098101'), bytec_2 // 0x098101 @@ -302,13 +341,25 @@ test1: itxn_next // tests/approvals/itxn.algo.ts:70 // note: '3rd', + intc_1 // 1 + dup + >= + // tests/approvals/itxn.algo.ts:72 + // itxn.submitGroup(appCreateParams, assetParams) + bz test1_next_field@9 + // tests/approvals/itxn.algo.ts:70 + // note: '3rd', bytec 6 // "3rd" itxn_field Note + +test1_next_field@9: + frame_dig 2 itxn_field ConfigAssetReserve + frame_dig 1 itxn_field ConfigAssetManager // tests/approvals/itxn.algo.ts:34 // decimals: 3, - intc_1 // 3 + intc_2 // 3 itxn_field ConfigAssetDecimals // tests/approvals/itxn.algo.ts:33 // unitName: 'unit', @@ -366,7 +417,7 @@ test2: // onCompletion: OnCompleteAction.NoOp, intc_0 // 0 frame_bury 5 - intc_2 // 1 + intc_1 // 1 frame_bury 4 // tests/approvals/itxn.algo.ts:84 // note: 'with args param set', @@ -382,7 +433,7 @@ test2_else_body@2: frame_bury 1 pushbytes "5" frame_bury 2 - intc_1 // 3 + intc_2 // 3 frame_bury 3 // tests/approvals/itxn.algo.ts:91 // note: 'no args param set', @@ -398,7 +449,7 @@ test2_after_if_else@3: itxn_begin itxn_field Note frame_dig 4 - intc_2 // 1 + intc_1 // 1 >= bz test2_next_field@5 frame_dig 5 @@ -410,7 +461,7 @@ test2_next_field@5: frame_dig 1 itxn_field ApplicationArgs frame_dig 3 - intc_1 // 3 + intc_2 // 3 >= // tests/approvals/itxn.algo.ts:94 // const createAppTxn = createAppParams.submit() @@ -441,13 +492,15 @@ test2_next_field@7: itxn Note // tests/approvals/itxn.algo.ts:95 // assert(createAppTxn.appArgs(0) === Bytes('1'), 'correct args used 1') - itxna ApplicationArgs 0 + intc_0 // 0 + itxnas ApplicationArgs pushbytes "1" == assert // correct args used 1 // tests/approvals/itxn.algo.ts:96 // assert(createAppTxn.appArgs(1) === Bytes('2'), 'correct args used 2') - itxna ApplicationArgs 1 + intc_1 // 1 + itxnas ApplicationArgs pushbytes "2" == assert // correct args used 2 diff --git a/tests/approvals/out/itxn/itxn.awst b/tests/approvals/out/itxn/itxn.awst deleted file mode 100644 index ee7459d8..00000000 --- a/tests/approvals/out/itxn/itxn.awst +++ /dev/null @@ -1,85 +0,0 @@ -contract ItxnDemoContract -{ - globals { - ["name"]: bytes - } - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - if (Boolean(txn())) { - switch (txnas(0)) { - case "test1": - #switch₁ᶜ₀: - this.test1() - goto #switch₁ᵇ - case "test2": - #switch₁ᶜ₁: - this.test2() - goto #switch₁ᵇ - case "test3": - #switch₁ᶜ₂: - goto #switch₁ᶜ₃ - case "test4": - #switch₁ᶜ₃: - goto #switch₁ᵇ - } - #switch₁ᵇ: - } - return True - } - - clearProgram(): bool - { - return True - } - - test1(): void - { - GlobalState["name"]: bytes = "AST1" - assetParams: inner_transaction_fields_acfg = create_inner_transaction(Fee=0, ConfigAssetTotal=1000, ConfigAssetName=GlobalState["name"], ConfigAssetUnitName="unit", ConfigAssetDecimals=3, ConfigAssetManager=global(), ConfigAssetReserve=global()) - GlobalState["name"]: bytes = "AST2" - asset1_txn: inner_transaction_acfg = submit_txn(assetParams) - update_inner_transaction(assetParams, ConfigAssetName=GlobalState["name"]) - asset2_txn: inner_transaction_acfg = submit_txn(assetParams) - assert(asset1_txn.ConfigAssetName == "AST1") - assert(asset2_txn.ConfigAssetName == "AST2") - assert(checked_maybe(asset_params_get(asset1_txn.CreatedAssetID), comment=asset exists) == "AST1") - assert(checked_maybe(asset_params_get(asset2_txn.CreatedAssetID), comment=asset exists) == "AST2") - appCreateParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, ApprovalProgram=0x098101, ClearStateProgram=0x098101) - update_inner_transaction(assetParams, ConfigAssetName="AST3") - [appCreateTxn, asset3_txn]: readonlytuple[inner_transaction_appl, inner_transaction_acfg] = submit_txn(appCreateParams, assetParams) - assert(Boolean(appCreateTxn.ApplicationID)) - assert(asset3_txn.ConfigAssetName == "AST3") - update_inner_transaction(appCreateParams, Note="3rd") - update_inner_transaction(assetParams, Note="3rd") - submit_txn(appCreateParams, assetParams) - } - - test2(): void - { - if (Boolean(txn())) { - args: readonlytuple[bytes, bytes] = ["1", "2"] - createAppParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, ApprovalProgram=" ", ClearStateProgram=" ", ApplicationArgs=[args.0, args.1], OnCompletion=0, Note="with args param set") - } else { - createAppParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, ApprovalProgram=" ", ClearStateProgram=" ", ApplicationArgs=["3", "4", "5"], Note="no args param set") - } - createAppTxn: inner_transaction_appl = submit_txn(createAppParams) - assert(createAppTxn.ApplicationArgs[0] == "1") - assert(createAppTxn.ApplicationArgs[1] == "2") - assert(createAppTxn.Note == "with args param set") - } - - constructor(): void - { - void - GlobalState["name"]: bytes = 0x - } - - Contract::constructor(): void - { - this.constructor() - } - -} \ No newline at end of file diff --git a/tests/approvals/out/itxn/itxn.awst.json b/tests/approvals/out/itxn/itxn.awst.json index 1a9d1611..cbae6f4f 100644 --- a/tests/approvals/out/itxn/itxn.awst.json +++ b/tests/approvals/out/itxn/itxn.awst.json @@ -4107,6 +4107,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/local-state/LocalStateDemo.approval.teal b/tests/approvals/out/local-state/LocalStateDemo.approval.teal index fc01fd7b..e792143f 100644 --- a/tests/approvals/out/local-state/LocalStateDemo.approval.teal +++ b/tests/approvals/out/local-state/LocalStateDemo.approval.teal @@ -1,51 +1,79 @@ #pragma version 10 tests/approvals/local-state.algo.ts::LocalStateDemo.approvalProgram: - intcblock 0 1 + intcblock 0 1 8 100 bytecblock "l1" "localUint2" "b1" "localBytes2" "localEncoded" + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: callsub __puya_arc4_router__ return +// tests/approvals/local-state.algo.ts::LocalStateDemo.constructor() -> void: +constructor: + // tests/approvals/local-state.algo.ts:7 + // export class LocalStateDemo extends Contract { + proto 0 0 + retsub + + // tests/approvals/local-state.algo.ts::LocalStateDemo.__puya_arc4_router__() -> uint64: __puya_arc4_router__: // tests/approvals/local-state.algo.ts:7 // export class LocalStateDemo extends Contract { proto 0 1 txn NumAppArgs + intc_0 // 0 + != bz __puya_arc4_router___bare_routing@7 - pushbytess 0xaaefcb43 0x67816cc5 0x11170534 // method "setState((uint64,byte[]),uint64[10])void", method "getState()(uint64,uint64,byte[],byte[],uint64[10])", method "clearState()void" txna ApplicationArgs 0 + pushbytes 0xaaefcb43 // method "setState((uint64,byte[]),uint64[10])void" + pushbytes 0x67816cc5 // method "getState()(uint64,uint64,byte[],byte[],uint64[10])" + pushbytes 0x11170534 // method "clearState()void" + uncover 3 match __puya_arc4_router___setState_route@2 __puya_arc4_router___getState_route@3 __puya_arc4_router___clearState_route@4 - intc_0 // 0 - retsub + b __puya_arc4_router___switch_case_default@5 __puya_arc4_router___setState_route@2: // tests/approvals/local-state.algo.ts:14 // public setState({ a, b }: { a: uint64; b: bytes }, c: SampleArray) { txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating + intc_0 // 0 + != + assert // can only call when not creating // tests/approvals/local-state.algo.ts:7 // export class LocalStateDemo extends Contract { txna ApplicationArgs 1 dup - extract 0 8 // on error: Index access is out of bounds + intc_0 // 0 + intc_2 // 8 + extract3 // on error: Index access is out of bounds btoi - dig 1 - pushint 8 // 8 + swap + dup + intc_2 // 8 extract_uint16 - dig 2 + swap + dup len - uncover 3 - cover 2 + swap + uncover 2 + uncover 2 substring3 extract 2 0 txna ApplicationArgs 2 // tests/approvals/local-state.algo.ts:14 // public setState({ a, b }: { a: uint64; b: bytes }, c: SampleArray) { + uncover 2 + uncover 2 + uncover 2 callsub setState intc_1 // 1 retsub @@ -54,42 +82,55 @@ __puya_arc4_router___getState_route@3: // tests/approvals/local-state.algo.ts:22 // public getState() { txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating + intc_0 // 0 + != + assert // can only call when not creating callsub getState - uncover 4 + cover 4 + cover 3 + cover 2 + swap itob - uncover 4 + cover 3 itob - dig 4 + cover 3 + dup len itob extract 6 2 - uncover 5 + swap concat - dig 4 + cover 3 + dup len itob extract 6 2 - uncover 5 + swap concat - uncover 3 - uncover 3 + cover 3 + pushbytes 0x + swap + concat + swap concat - pushbytes 0x0064 + intc_3 // 100 + itob + extract 6 2 concat - dig 2 + dig 1 len - pushint 100 // 100 + intc_3 // 100 + itob extract 6 2 concat uncover 3 concat - uncover 2 + swap concat swap concat @@ -104,25 +145,42 @@ __puya_arc4_router___clearState_route@4: // tests/approvals/local-state.algo.ts:32 // public clearState() { txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating + intc_0 // 0 + != + assert // can only call when not creating callsub clearState intc_1 // 1 retsub +__puya_arc4_router___switch_case_default@5: + b __puya_arc4_router___after_if_else@11 + __puya_arc4_router___bare_routing@7: // tests/approvals/local-state.algo.ts:7 // export class LocalStateDemo extends Contract { txn OnCompletion - bnz __puya_arc4_router___after_if_else@11 + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@8 + b __puya_arc4_router___switch_case_default@9 + +__puya_arc4_router_____algots__.defaultCreate@8: + // tests/approvals/local-state.algo.ts:7 + // export class LocalStateDemo extends Contract { txn ApplicationID - ! - assert // is creating + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate intc_1 // 1 retsub +__puya_arc4_router___switch_case_default@9: + __puya_arc4_router___after_if_else@11: // tests/approvals/local-state.algo.ts:7 // export class LocalStateDemo extends Contract { @@ -135,6 +193,9 @@ setState: // tests/approvals/local-state.algo.ts:14 // public setState({ a, b }: { a: uint64; b: bytes }, c: SampleArray) { proto 3 0 + frame_dig -3 + frame_dig -2 + swap // tests/approvals/local-state.algo.ts:15 // this.localUint(Txn.sender).value = a txn Sender @@ -143,7 +204,7 @@ setState: bytec_0 // "l1" // tests/approvals/local-state.algo.ts:15 // this.localUint(Txn.sender).value = a - frame_dig -3 + dig 2 app_local_put // tests/approvals/local-state.algo.ts:16 // this.localUint2(Txn.sender).value = a @@ -153,7 +214,7 @@ setState: bytec_1 // "localUint2" // tests/approvals/local-state.algo.ts:16 // this.localUint2(Txn.sender).value = a - frame_dig -3 + uncover 2 app_local_put // tests/approvals/local-state.algo.ts:17 // this.localBytes(Txn.sender).value = b @@ -163,7 +224,7 @@ setState: bytec_2 // "b1" // tests/approvals/local-state.algo.ts:17 // this.localBytes(Txn.sender).value = b - frame_dig -2 + dig 2 app_local_put // tests/approvals/local-state.algo.ts:18 // this.localBytes2(Txn.sender).value = b @@ -173,17 +234,18 @@ setState: bytec_3 // "localBytes2" // tests/approvals/local-state.algo.ts:18 // this.localBytes2(Txn.sender).value = b - frame_dig -2 + uncover 2 app_local_put // tests/approvals/local-state.algo.ts:19 // this.localEncoded(Txn.sender).value = c.copy() + frame_dig -1 txn Sender // tests/approvals/local-state.algo.ts:12 // localEncoded = LocalState() bytec 4 // "localEncoded" // tests/approvals/local-state.algo.ts:19 // this.localEncoded(Txn.sender).value = c.copy() - frame_dig -1 + uncover 2 app_local_put retsub @@ -256,6 +318,11 @@ getState: // localBytes2: this.localBytes2(Txn.sender).value, // localEncoded: this.localEncoded(Txn.sender).value.copy(), // } + uncover 4 + uncover 4 + uncover 4 + uncover 4 + uncover 4 retsub @@ -310,3 +377,11 @@ clearState: // this.localEncoded(Txn.sender).delete() app_local_del retsub + + +// tests/approvals/local-state.algo.ts::LocalStateDemo.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/local-state.algo.ts:7 + // export class LocalStateDemo extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/local-state/LocalStateDemo.arc32.json b/tests/approvals/out/local-state/LocalStateDemo.arc32.json index 33f8f919..493006f6 100644 --- a/tests/approvals/out/local-state/LocalStateDemo.arc32.json +++ b/tests/approvals/out/local-state/LocalStateDemo.arc32.json @@ -3,53 +3,11 @@ "setState((uint64,byte[]),uint64[10])void": { "call_config": { "no_op": "CALL" - }, - "structs": { - "__0": { - "name": "", - "elements": [ - [ - "a", - "uint64" - ], - [ - "b", - "byte[]" - ] - ] - } } }, "getState()(uint64,uint64,byte[],byte[],uint64[10])": { "call_config": { "no_op": "CALL" - }, - "structs": { - "output": { - "name": "", - "elements": [ - [ - "localUint", - "uint64" - ], - [ - "localUint2", - "uint64" - ], - [ - "localBytes", - "byte[]" - ], - [ - "localBytes2", - "byte[]" - ], - [ - "localEncoded", - "uint64[10]" - ] - ] - } } }, "clearState()void": { @@ -59,7 +17,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbG9jYWwtc3RhdGUuYWxnby50czo6TG9jYWxTdGF0ZURlbW8uYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMQogICAgYnl0ZWNibG9jayAibDEiICJsb2NhbFVpbnQyIiAiYjEiICJsb2NhbEJ5dGVzMiIgImxvY2FsRW5jb2RlZCIKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RzL2FwcHJvdmFscy9sb2NhbC1zdGF0ZS5hbGdvLnRzOjpMb2NhbFN0YXRlRGVtby5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvbG9jYWwtc3RhdGUuYWxnby50czo3CiAgICAvLyBleHBvcnQgY2xhc3MgTG9jYWxTdGF0ZURlb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sdENyZWF0ZSgpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9sb2NhbC1zdGF0ZS5hbGdvLnRzOjcKICAgIC8vIGV4cG9ydCBjbGFzcyBMb2NhbFN0YXRlRGVtbyBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbG9jYWwtc3RhdGUuYWxnby50czo6TG9jYWxTdGF0ZURlbW8uY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" }, "state": { diff --git a/tests/approvals/out/local-state/LocalStateDemo.ssa.ir b/tests/approvals/out/local-state/LocalStateDemo.ssa.ir index 29758dcc..059996dd 100644 --- a/tests/approvals/out/local-state/LocalStateDemo.ssa.ir +++ b/tests/approvals/out/local-state/LocalStateDemo.ssa.ir @@ -26,10 +26,10 @@ contract tests/approvals/local-state.algo.ts::LocalStateDemo: block@2: // setState_route_L14 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (!= tmp%5#0 0u) - (assert tmp%6#0) // is not creating + (assert tmp%6#0) // can only call when not creating let tmp%7#0: bytes = (txna ApplicationArgs 1) let item0%0#0: bytes = (extract3 tmp%7#0 0u 8u) // on error: Index access is out of bounds let item0%0%0#0: uint64 = (btoi item0%0#0) @@ -43,10 +43,10 @@ contract tests/approvals/local-state.algo.ts::LocalStateDemo: block@3: // getState_route_L22 let tmp%9#0: uint64 = (txn OnCompletion) let tmp%10#0: bool = (== tmp%9#0 NoOp) - (assert tmp%10#0) // OnCompletion is NoOp + (assert tmp%10#0) // OnCompletion is not NoOp let tmp%11#0: uint64 = (txn ApplicationID) let tmp%12#0: bool = (!= tmp%11#0 0u) - (assert tmp%12#0) // is not creating + (assert tmp%12#0) // can only call when not creating let (elements_to_encode%0#0: uint64, elements_to_encode%1#0: uint64, elements_to_encode%2#0: bytes, elements_to_encode%3#0: bytes, elements_to_encode%4#0: bytes) = tests/approvals/local-state.algo.ts::LocalStateDemo.getState() let val_as_bytes%0#0: bytes = (itob elements_to_encode%0#0) let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) @@ -81,10 +81,10 @@ contract tests/approvals/local-state.algo.ts::LocalStateDemo: block@4: // clearState_route_L32 let tmp%14#0: uint64 = (txn OnCompletion) let tmp%15#0: bool = (== tmp%14#0 NoOp) - (assert tmp%15#0) // OnCompletion is NoOp + (assert tmp%15#0) // OnCompletion is not NoOp let tmp%16#0: uint64 = (txn ApplicationID) let tmp%17#0: bool = (!= tmp%16#0 0u) - (assert tmp%17#0) // is not creating + (assert tmp%17#0) // can only call when not creating tests/approvals/local-state.algo.ts::LocalStateDemo.clearState() return 1u block@5: // switch_case_default_L7 @@ -97,7 +97,7 @@ contract tests/approvals/local-state.algo.ts::LocalStateDemo: block@8: // __algots__.defaultCreate_L7 let tmp%19#0: uint64 = (txn ApplicationID) let tmp%20#0: bool = (== tmp%19#0 0u) - (assert tmp%20#0) // is creating + (assert tmp%20#0) // can only call when creating tests/approvals/local-state.algo.ts::LocalStateDemo.__algots__.defaultCreate() return 1u block@9: // switch_case_default_L7 diff --git a/tests/approvals/out/local-state/local-state.awst b/tests/approvals/out/local-state/local-state.awst deleted file mode 100644 index 99a8f94b..00000000 --- a/tests/approvals/out/local-state/local-state.awst +++ /dev/null @@ -1,65 +0,0 @@ -contract LocalStateDemo -{ - globals { - ["l1"]: uint64 - ["localUint2"]: uint64 - ["b1"]: bytes - ["localBytes2"]: bytes - ["localEncoded"]: arc4.static_array - } - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - return arc4Router() - } - - clearProgram(): bool - { - return True - } - - setState(): void - { - { a: a, b: b }: { a: uint64, b: bytes } = p - LocalState[txn()]["l1"]: uint64 = a - LocalState[txn()]["localUint2"]: uint64 = a - LocalState[txn()]["b1"]: bytes = b - LocalState[txn()]["localBytes2"]: bytes = b - LocalState[txn()]["localEncoded"]: arc4.static_array = copy(c) - } - - getState(): { localUint: uint64, localUint2: uint64, localBytes: bytes, localBytes2: bytes, localEncoded: arc4.static_array } - { - return { localUint: LocalState[txn()]["l1"], localUint2: LocalState[txn()]["localUint2"], localBytes: LocalState[txn()]["b1"], localBytes2: LocalState[txn()]["localBytes2"], localEncoded: copy(LocalState[txn()]["localEncoded"]) } - } - - clearState(): void - { - STATE_DEL(LocalState[txn()]["l1"]) - STATE_DEL(LocalState[txn()]["localUint2"]) - STATE_DEL(LocalState[txn()]["b1"]) - STATE_DEL(LocalState[txn()]["localBytes2"]) - STATE_DEL(LocalState[txn()]["localEncoded"]) - } - - constructor(): void - { - void - } - - Contract::constructor(): void - { - } - - Contract::constructor(): void - { - this.constructor() - } - - __algots__.defaultCreate(): void - { - } - -} \ No newline at end of file diff --git a/tests/approvals/out/local-state/local-state.awst.json b/tests/approvals/out/local-state/local-state.awst.json index 964c4cb2..95d29ade 100644 --- a/tests/approvals/out/local-state/local-state.awst.json +++ b/tests/approvals/out/local-state/local-state.awst.json @@ -2698,6 +2698,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/logic-sig/AllowNoFee.teal b/tests/approvals/out/logic-sig/AllowNoFee.teal index 8f97b58c..7a38a2e2 100644 --- a/tests/approvals/out/logic-sig/AllowNoFee.teal +++ b/tests/approvals/out/logic-sig/AllowNoFee.teal @@ -18,6 +18,7 @@ feeIsZero: // tests/approvals/logic-sig.algo.ts:10 // assert(Txn.fee === 0, 'Fee must be zero') txn Fee - ! + pushint 0 // 0 + == assert // Fee must be zero retsub diff --git a/tests/approvals/out/logic-sig/logic-sig.awst b/tests/approvals/out/logic-sig/logic-sig.awst deleted file mode 100644 index fa77ae41..00000000 --- a/tests/approvals/out/logic-sig/logic-sig.awst +++ /dev/null @@ -1,13 +0,0 @@ - -logicsig tests/approvals/logic-sig.algo.ts::AlwaysAllow { - return True -} -subroutine feeIsZero(): void -{ - assert(txn() == 0) -} - -logicsig tests/approvals/logic-sig.algo.ts::AllowNoFee { - tests/approvals/logic-sig.algo.ts::feeIsZero() - return 1 -} \ No newline at end of file diff --git a/tests/approvals/out/logic-sig/logic-sig.awst.json b/tests/approvals/out/logic-sig/logic-sig.awst.json index a56a9d6c..4923adb3 100644 --- a/tests/approvals/out/logic-sig/logic-sig.awst.json +++ b/tests/approvals/out/logic-sig/logic-sig.awst.json @@ -78,7 +78,8 @@ "id": "tests/approvals/logic-sig.algo.ts::program", "name": "program" }, - "docstring": "" + "docstring": "", + "avm_version": null }, { "_type": "Subroutine", @@ -324,6 +325,7 @@ "id": "tests/approvals/logic-sig.algo.ts::program", "name": "program" }, - "docstring": "" + "docstring": "", + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/named-types/MyContract.approval.teal b/tests/approvals/out/named-types/MyContract.approval.teal index 4f018ba5..b337a404 100644 --- a/tests/approvals/out/named-types/MyContract.approval.teal +++ b/tests/approvals/out/named-types/MyContract.approval.teal @@ -1,149 +1,265 @@ #pragma version 10 tests/approvals/named-types.algo.ts::MyContract.approvalProgram: - intcblock 1 0 - bytecblock 0x151f7c75 + intcblock 0 1 8 + bytecblock 0x 0x151f7c75 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: callsub __puya_arc4_router__ return +// tests/approvals/named-types.algo.ts::MyContract.constructor() -> void: +constructor: + // tests/approvals/named-types.algo.ts:21 + // export class MyContract extends Contract { + proto 0 0 + retsub + + // tests/approvals/named-types.algo.ts::MyContract.__puya_arc4_router__() -> uint64: __puya_arc4_router__: // tests/approvals/named-types.algo.ts:21 // export class MyContract extends Contract { proto 0 1 txn NumAppArgs + intc_0 // 0 + != bz __puya_arc4_router___bare_routing@9 - pushbytess 0xf02228b0 0xd908575b 0x577b1ffc 0xdc75f81d 0x040e2e4e // method "getXY()(uint64,uint64)", method "getYX()(uint64,uint64)", method "getAnon()(uint64,uint64)", method "test((uint64,uint64),(uint64,uint64))void", method "testing()((uint64,uint64),(uint64,uint64),(uint64,uint64))" txna ApplicationArgs 0 + pushbytes 0xf02228b0 // method "getXY()(uint64,uint64)" + pushbytes 0xd908575b // method "getYX()(uint64,uint64)" + pushbytes 0x577b1ffc // method "getAnon()(uint64,uint64)" + pushbytes 0xdc75f81d // method "test((uint64,uint64),(uint64,uint64))void" + pushbytes 0x040e2e4e // method "testing()((uint64,uint64),(uint64,uint64),(uint64,uint64))" + uncover 5 match __puya_arc4_router___getXY_route@2 __puya_arc4_router___getYX_route@3 __puya_arc4_router___getAnon_route@4 __puya_arc4_router___test_route@5 __puya_arc4_router___testing_route@6 - intc_1 // 0 - retsub + b __puya_arc4_router___switch_case_default@7 __puya_arc4_router___getXY_route@2: // tests/approvals/named-types.algo.ts:22 // public getXY(): XY { txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating + intc_0 // 0 + != + assert // can only call when not creating callsub getXY swap itob swap itob + swap + bytec_0 // 0x + swap concat - bytec_0 // 0x151f7c75 + swap + concat + bytec_1 // 0x151f7c75 swap concat log - intc_0 // 1 + intc_1 // 1 retsub __puya_arc4_router___getYX_route@3: // tests/approvals/named-types.algo.ts:29 // public getYX(): YX { txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating + intc_0 // 0 + != + assert // can only call when not creating callsub getYX swap itob swap itob + swap + bytec_0 // 0x + swap + concat + swap concat - bytec_0 // 0x151f7c75 + bytec_1 // 0x151f7c75 swap concat log - intc_0 // 1 + intc_1 // 1 retsub __puya_arc4_router___getAnon_route@4: // tests/approvals/named-types.algo.ts:36 // public getAnon() { txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating + intc_0 // 0 + != + assert // can only call when not creating callsub getAnon swap itob swap itob + swap + bytec_0 // 0x + swap + concat + swap concat - bytec_0 // 0x151f7c75 + bytec_1 // 0x151f7c75 swap concat log - intc_0 // 1 + intc_1 // 1 retsub __puya_arc4_router___test_route@5: // tests/approvals/named-types.algo.ts:43 // public test(x: XY, y: YX) {} txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating - intc_0 // 1 + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/named-types.algo.ts:21 + // export class MyContract extends Contract { + txna ApplicationArgs 1 + dup + intc_0 // 0 + intc_2 // 8 + extract3 // on error: Index access is out of bounds + btoi + swap + intc_2 // 8 + dup + extract3 // on error: Index access is out of bounds + btoi + txna ApplicationArgs 2 + dup + intc_0 // 0 + intc_2 // 8 + extract3 // on error: Index access is out of bounds + btoi + swap + intc_2 // 8 + dup + extract3 // on error: Index access is out of bounds + btoi + // tests/approvals/named-types.algo.ts:43 + // public test(x: XY, y: YX) {} + uncover 3 + uncover 3 + uncover 3 + uncover 3 + callsub test + intc_1 // 1 retsub __puya_arc4_router___testing_route@6: // tests/approvals/named-types.algo.ts:45 // public testing() { txn OnCompletion - ! - assert // OnCompletion is NoOp + intc_0 // NoOp + == + assert // OnCompletion is not NoOp txn ApplicationID - assert // is not creating + intc_0 // 0 + != + assert // can only call when not creating callsub testing - uncover 5 + cover 5 + cover 4 + cover 3 + cover 2 + swap itob - uncover 5 + swap itob + swap + bytec_0 // 0x + swap concat - uncover 4 + swap + concat + cover 2 itob - uncover 4 + swap itob + swap + bytec_0 // 0x + swap concat - uncover 3 + swap + concat + uncover 2 itob uncover 3 itob + swap + bytec_0 // 0x + swap concat - cover 2 + swap + concat + bytec_0 // 0x + uncover 3 + concat + uncover 2 concat swap concat - bytec_0 // 0x151f7c75 + bytec_1 // 0x151f7c75 swap concat log - intc_0 // 1 + intc_1 // 1 retsub +__puya_arc4_router___switch_case_default@7: + b __puya_arc4_router___after_if_else@13 + __puya_arc4_router___bare_routing@9: // tests/approvals/named-types.algo.ts:21 // export class MyContract extends Contract { txn OnCompletion - bnz __puya_arc4_router___after_if_else@13 + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@10 + b __puya_arc4_router___switch_case_default@11 + +__puya_arc4_router_____algots__.defaultCreate@10: + // tests/approvals/named-types.algo.ts:21 + // export class MyContract extends Contract { txn ApplicationID - ! - assert // is creating - intc_0 // 1 + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 retsub +__puya_arc4_router___switch_case_default@11: + __puya_arc4_router___after_if_else@13: // tests/approvals/named-types.algo.ts:21 // export class MyContract extends Contract { - intc_1 // 0 + intc_0 // 0 retsub @@ -154,7 +270,7 @@ getXY: proto 0 2 // tests/approvals/named-types.algo.ts:24 // x: 1, - intc_0 // 1 + intc_1 // 1 // tests/approvals/named-types.algo.ts:25 // y: 2, pushint 2 // 2 @@ -171,10 +287,12 @@ getYX: // tests/approvals/named-types.algo.ts:29 // public getYX(): YX { proto 0 2 - // tests/approvals/named-types.algo.ts:31-32 - // x: 222, + // tests/approvals/named-types.algo.ts:32 // y: 111, - pushints 111 222 // 111, 222 + pushint 111 // 111 + // tests/approvals/named-types.algo.ts:31 + // x: 222, + pushint 222 // 222 // tests/approvals/named-types.algo.ts:30-33 // return { // x: 222, @@ -188,10 +306,12 @@ getAnon: // tests/approvals/named-types.algo.ts:36 // public getAnon() { proto 0 2 - // tests/approvals/named-types.algo.ts:38-39 + // tests/approvals/named-types.algo.ts:38 // x: Uint64(3), + pushint 3 // 3 + // tests/approvals/named-types.algo.ts:39 // y: Uint64(4), - pushints 3 4 // 3, 4 + pushint 4 // 4 // tests/approvals/named-types.algo.ts:37-40 // return { // x: Uint64(3), @@ -200,6 +320,14 @@ getAnon: retsub +// tests/approvals/named-types.algo.ts::MyContract.test(x.x: uint64, x.y: uint64, y.y: uint64, y.x: uint64) -> void: +test: + // tests/approvals/named-types.algo.ts:43 + // public test(x: XY, y: YX) {} + proto 4 0 + retsub + + // tests/approvals/named-types.algo.ts::MyContract.testing() -> uint64, uint64, uint64, uint64, uint64, uint64: testing: // tests/approvals/named-types.algo.ts:45 @@ -208,12 +336,29 @@ testing: // tests/approvals/named-types.algo.ts:46 // const a = this.getXY() callsub getXY + swap // tests/approvals/named-types.algo.ts:47 // const b = this.getYX() callsub getYX + cover 2 // tests/approvals/named-types.algo.ts:48 // const c = this.getAnon() callsub getAnon + cover 3 // tests/approvals/named-types.algo.ts:49 // return [a, b, c] as const + uncover 2 + uncover 5 + uncover 3 + uncover 5 + uncover 4 + uncover 5 + retsub + + +// tests/approvals/named-types.algo.ts::MyContract.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/named-types.algo.ts:21 + // export class MyContract extends Contract { + proto 0 0 retsub diff --git a/tests/approvals/out/named-types/MyContract.arc32.json b/tests/approvals/out/named-types/MyContract.arc32.json index 2f5d1bf7..3a41dd03 100644 --- a/tests/approvals/out/named-types/MyContract.arc32.json +++ b/tests/approvals/out/named-types/MyContract.arc32.json @@ -43,21 +43,6 @@ "getAnon()(uint64,uint64)": { "call_config": { "no_op": "CALL" - }, - "structs": { - "output": { - "name": "", - "elements": [ - [ - "x", - "uint64" - ], - [ - "y", - "uint64" - ] - ] - } } }, "test((uint64,uint64),(uint64,uint64))void": { @@ -100,7 +85,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbmFtZWQtdHlwZXMuYWxnby50czo6TXlDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMSAwCiAgICBieXRlY2Jsb2NrIDB4MTUxZ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C10eXBlcy5hbGdvLnRzOjQ1CiAgICAvLyBwdWJsaWMgdGVzdGluZygpIHsKICAgIHR4biBPbkNvbXBsZXRpb24KICAgIGludGNfMCAvLyBOb09wCiAgICA9PQogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBpcyBub3QgTm9PcAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGludGNfMCAvLyAwCiAgICAhPQogICAgYXNzZXJ0IC8vIGNhbiBvbmx5IGNhbGwgd2hlbiBub3QgY3JlYXRpbmcKICAgIGNhbGxzdWIgdGVzdGluZwogICAgY292ZXIgNQogICAgY292ZXIgNAogICAgY292ZXIgMwogICAgY292ZXIgMgogICAgc3dhcAogICAgaXRvYgogICAgc3dhcAogICAgaXRvYgogICAgc3dhcAogICAgYnl0ZWNfMCAvLyAweAogICAgc3dhcAogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIGNvdmVyIDIKICAgIGl0b2IKICAgIHN3YXAKICAgIGl0b2IKICAgIHN3YXAKICAgIGJ5dGVjXzAgLy8gMHgKICAgIHN3YXAKICAgIGNvbmNhdAogICAgc3dhcAogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGl0b2IKICAgIHVuY292ZXIgMwogICAgaXRvYgogICAgc3dhcAogICAgYnl0ZWNfMCAvLyAweAogICAgc3dhcAogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIGJ5dGVjXzAgLy8gMHgKICAgIHVuY292ZXIgMwogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmNhdAogICAgc3dhcAogICAgY29uY2F0CiAgICBieXRlY18xIC8vIDB4MTUxZjdjNzUKICAgIHN3YXAKICAgIGNvbmNhdAogICAgbG9nCiAgICBpbnRjXzEgLy8gMQogICAgcmV0c3ViCgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19zd2l0Y2hfY2FzZV9kZWZhdWx0QDc6CiAgICBiIF9fcHV5YV9hcmM0X3JvdXRlc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ydCBjbGFzcyBNeUNvbnRyYWN0IGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIK", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbmFtZWQtdHlwZXMuYWxnby50czo6TXlDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/named-types/MyContract.ssa.ir b/tests/approvals/out/named-types/MyContract.ssa.ir index 98a2873a..37f07179 100644 --- a/tests/approvals/out/named-types/MyContract.ssa.ir +++ b/tests/approvals/out/named-types/MyContract.ssa.ir @@ -26,10 +26,10 @@ contract tests/approvals/named-types.algo.ts::MyContract: block@2: // getXY_route_L22 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is NoOp + (assert tmp%4#0) // OnCompletion is not NoOp let tmp%5#0: uint64 = (txn ApplicationID) let tmp%6#0: bool = (!= tmp%5#0 0u) - (assert tmp%6#0) // is not creating + (assert tmp%6#0) // can only call when not creating let (elements_to_encode%0#0: uint64, elements_to_encode%1#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getXY() let val_as_bytes%0#0: bytes = (itob elements_to_encode%0#0) let val_as_bytes%1#0: bytes = (itob elements_to_encode%1#0) @@ -43,10 +43,10 @@ contract tests/approvals/named-types.algo.ts::MyContract: block@3: // getYX_route_L29 let tmp%8#0: uint64 = (txn OnCompletion) let tmp%9#0: bool = (== tmp%8#0 NoOp) - (assert tmp%9#0) // OnCompletion is NoOp + (assert tmp%9#0) // OnCompletion is not NoOp let tmp%10#0: uint64 = (txn ApplicationID) let tmp%11#0: bool = (!= tmp%10#0 0u) - (assert tmp%11#0) // is not creating + (assert tmp%11#0) // can only call when not creating let (elements_to_encode%2#0: uint64, elements_to_encode%3#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getYX() let val_as_bytes%2#0: bytes = (itob elements_to_encode%2#0) let val_as_bytes%3#0: bytes = (itob elements_to_encode%3#0) @@ -60,10 +60,10 @@ contract tests/approvals/named-types.algo.ts::MyContract: block@4: // getAnon_route_L36 let tmp%13#0: uint64 = (txn OnCompletion) let tmp%14#0: bool = (== tmp%13#0 NoOp) - (assert tmp%14#0) // OnCompletion is NoOp + (assert tmp%14#0) // OnCompletion is not NoOp let tmp%15#0: uint64 = (txn ApplicationID) let tmp%16#0: bool = (!= tmp%15#0 0u) - (assert tmp%16#0) // is not creating + (assert tmp%16#0) // can only call when not creating let (elements_to_encode%4#0: uint64, elements_to_encode%5#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getAnon() let val_as_bytes%4#0: bytes = (itob elements_to_encode%4#0) let val_as_bytes%5#0: bytes = (itob elements_to_encode%5#0) @@ -77,10 +77,10 @@ contract tests/approvals/named-types.algo.ts::MyContract: block@5: // test_route_L43 let tmp%18#0: uint64 = (txn OnCompletion) let tmp%19#0: bool = (== tmp%18#0 NoOp) - (assert tmp%19#0) // OnCompletion is NoOp + (assert tmp%19#0) // OnCompletion is not NoOp let tmp%20#0: uint64 = (txn ApplicationID) let tmp%21#0: bool = (!= tmp%20#0 0u) - (assert tmp%21#0) // is not creating + (assert tmp%21#0) // can only call when not creating let tmp%22#0: bytes = (txna ApplicationArgs 1) let item0%0#0: bytes = (extract3 tmp%22#0 0u 8u) // on error: Index access is out of bounds let item0%0%0#0: uint64 = (btoi item0%0#0) @@ -96,10 +96,10 @@ contract tests/approvals/named-types.algo.ts::MyContract: block@6: // testing_route_L45 let tmp%24#0: uint64 = (txn OnCompletion) let tmp%25#0: bool = (== tmp%24#0 NoOp) - (assert tmp%25#0) // OnCompletion is NoOp + (assert tmp%25#0) // OnCompletion is not NoOp let tmp%26#0: uint64 = (txn ApplicationID) let tmp%27#0: bool = (!= tmp%26#0 0u) - (assert tmp%27#0) // is not creating + (assert tmp%27#0) // can only call when not creating let (elements_to_encode%6#0: uint64, elements_to_encode%7#0: uint64, elements_to_encode%8#0: uint64, elements_to_encode%9#0: uint64, elements_to_encode%10#0: uint64, elements_to_encode%11#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.testing() let val_as_bytes%6#0: bytes = (itob elements_to_encode%6#0) let val_as_bytes%7#0: bytes = (itob elements_to_encode%7#0) @@ -137,7 +137,7 @@ contract tests/approvals/named-types.algo.ts::MyContract: block@10: // __algots__.defaultCreate_L21 let tmp%30#0: uint64 = (txn ApplicationID) let tmp%31#0: bool = (== tmp%30#0 0u) - (assert tmp%31#0) // is creating + (assert tmp%31#0) // can only call when creating tests/approvals/named-types.algo.ts::MyContract.__algots__.defaultCreate() return 1u block@11: // switch_case_default_L21 diff --git a/tests/approvals/out/named-types/named-types.awst b/tests/approvals/out/named-types/named-types.awst deleted file mode 100644 index a96f856d..00000000 --- a/tests/approvals/out/named-types/named-types.awst +++ /dev/null @@ -1,61 +0,0 @@ -contract MyContract -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - return arc4Router() - } - - clearProgram(): bool - { - return True - } - - getXY(): XY{ x: uint64, y: uint64 } - { - return { x: (#0 = { x: 1, y: 2 }).x, y: #0.y } - } - - getYX(): YX{ y: uint64, x: uint64 } - { - return { y: (#1 = { x: 222, y: 111 }).y, x: #1.x } - } - - getAnon(): { x: uint64, y: uint64 } - { - return { x: 3, y: 4 } - } - - test(): void - { - } - - testing(): readonlytuple[XY{ x: uint64, y: uint64 }, YX{ y: uint64, x: uint64 }, { x: uint64, y: uint64 }] - { - a: XY{ x: uint64, y: uint64 } = this.getXY() - b: YX{ y: uint64, x: uint64 } = this.getYX() - c: { x: uint64, y: uint64 } = this.getAnon() - return [a, b, c] - } - - constructor(): void - { - void - } - - Contract::constructor(): void - { - } - - Contract::constructor(): void - { - this.constructor() - } - - __algots__.defaultCreate(): void - { - } - -} \ No newline at end of file diff --git a/tests/approvals/out/named-types/named-types.awst.json b/tests/approvals/out/named-types/named-types.awst.json index 71fb76fd..7936b507 100644 --- a/tests/approvals/out/named-types/named-types.awst.json +++ b/tests/approvals/out/named-types/named-types.awst.json @@ -519,7 +519,7 @@ } ] }, - "id": "0" + "id": "9" }, "name": "x" }, @@ -652,7 +652,7 @@ } ] }, - "id": "0" + "id": "9" }, "name": "y" } @@ -927,7 +927,7 @@ } ] }, - "id": "1" + "id": "10" }, "name": "y" }, @@ -1060,7 +1060,7 @@ } ] }, - "id": "1" + "id": "10" }, "name": "x" } diff --git a/tests/approvals/out/non-arc4/HelloWorldContract.approval.teal b/tests/approvals/out/non-arc4/HelloWorldContract.approval.teal index aeaf0b5f..4188046c 100644 --- a/tests/approvals/out/non-arc4/HelloWorldContract.approval.teal +++ b/tests/approvals/out/non-arc4/HelloWorldContract.approval.teal @@ -1,6 +1,11 @@ #pragma version 10 tests/approvals/non-arc4.algo.ts::HelloWorldContract.approvalProgram: + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: // tests/approvals/non-arc4.algo.ts:5 // const name = String(op.Txn.applicationArgs(0)) pushint 0 // 0 @@ -15,3 +20,11 @@ tests/approvals/non-arc4.algo.ts::HelloWorldContract.approvalProgram: // return true pushint 1 // 1 return + + +// tests/approvals/non-arc4.algo.ts::HelloWorldContract.constructor() -> void: +constructor: + // tests/approvals/non-arc4.algo.ts:3 + // export default class HelloWorldContract extends BaseContract { + proto 0 0 + retsub diff --git a/tests/approvals/out/non-arc4/non-arc4.awst b/tests/approvals/out/non-arc4/non-arc4.awst deleted file mode 100644 index f5fe9150..00000000 --- a/tests/approvals/out/non-arc4/non-arc4.awst +++ /dev/null @@ -1,33 +0,0 @@ -contract HelloWorldContract -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - name: string = reinterpret_cast(txnas(0)) - log(reinterpret_cast("Hello, " + name)) - return True - } - - clearProgram(): bool - { - return True - } - - clearState(): bool - { - return True - } - - constructor(): void - { - void - } - - Contract::constructor(): void - { - this.constructor() - } - -} \ No newline at end of file diff --git a/tests/approvals/out/non-arc4/non-arc4.awst.json b/tests/approvals/out/non-arc4/non-arc4.awst.json index 61600782..60af645c 100644 --- a/tests/approvals/out/non-arc4/non-arc4.awst.json +++ b/tests/approvals/out/non-arc4/non-arc4.awst.json @@ -706,6 +706,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/numeric-literal-expressions/numeric-literal-expressions.awst b/tests/approvals/out/numeric-literal-expressions/numeric-literal-expressions.awst deleted file mode 100644 index fbe28620..00000000 --- a/tests/approvals/out/numeric-literal-expressions/numeric-literal-expressions.awst +++ /dev/null @@ -1,16 +0,0 @@ -subroutine test_uint64(): bool -{ - x: uint64 = 410 - y: uint64 = 100 // x - z: uint64 = x ** 2 - if (x == 4 or 2 <= y) { - return True - } - return False -} -subroutine test_biguint(): void -{ - x: biguint = 410 - y: biguint = 100 // x - z: biguint = 25 -} \ No newline at end of file diff --git a/tests/approvals/out/object-destructuring/object-destructuring.awst b/tests/approvals/out/object-destructuring/object-destructuring.awst deleted file mode 100644 index f363b04e..00000000 --- a/tests/approvals/out/object-destructuring/object-destructuring.awst +++ /dev/null @@ -1,34 +0,0 @@ -subroutine testPartialDestructure(arg: { x: uint64, y: uint64, z: uint64 }): void -{ - { x: x, y: _, z: _₁ }: { x: uint64, y: uint64, z: uint64 } = arg - { nested: { y: y, x: _₂, z: _₃ } }: { nested: { y: uint64, x: uint64, z: uint64 } } = { nested: (#2 = { nested: { y: arg.y, x: arg.x, z: arg.z } }).nested } -} -subroutine test(): void -{ - { a: a, b: b, c: c, d: d }: { a: uint64, b: bytes, c: bool, d: biguint } = tests/approvals/object-destructuring.algo.ts::produceItems() - { d: e, a: _, b: _₁, c: _₂ }: { d: biguint, a: uint64, b: bytes, c: bool } = { d: (#3 = tests/approvals/object-destructuring.algo.ts::produceItems()).d, a: #3.a, b: #3.b, c: #3.c } - f: { a: uint64, b: bytes, c: bool, d: biguint } = { a: (#5 = ({ a: g, d: i, b: _₃, c: _₄ } = { a: (#4 = tests/approvals/object-destructuring.algo.ts::produceItems()).a, d: #4.d, b: #4.b, c: #4.c })).a, b: #5.b, c: #5.c, d: #5.d } - tests/approvals/object-destructuring.algo.ts::receivePartial({ a: (#6 = tests/approvals/object-destructuring.algo.ts::produceItems()).a, d: #6.d }) -} -subroutine produceItems(): { a: uint64, b: bytes, c: bool, d: biguint } -{ - return { a: (#7 = { a: 1, b: "", c: False, d: 999 }).a, b: #7.b, c: #7.c, d: #7.d } -} -subroutine receivePartial(x: { a: uint64, d: biguint }): void -{ -} -subroutine testLiteralToLiteral(): void -{ - a: uint64 = 4 - b: uint64 = 1 - { a: e, b: f }: { a: uint64, b: uint64 } = ({ a: c, b: d } = { a: a, b: b }) -} -subroutine testNumericResolution(): void -{ - x: { a: uint64 } = (y = { a: (#8 = { a: 434 }).a }) -} -subroutine test2(args: { x: bool, y: bool, z: readonlytuple[string, string] }): void -{ - { a: a, b: b, args: { x: x, y: y, z: _ } }: { a: bool, b: bool, args: { x: bool, y: bool, z: readonlytuple[string, string] } } = { a: True, b: False, args: args } - args2: { x: bool, y: bool, z: readonlytuple[string, string] } = { x: True, y: True, z: args.z } -} \ No newline at end of file diff --git a/tests/approvals/out/pre-approved-sale/PreApprovedSale.ssa.ir b/tests/approvals/out/pre-approved-sale/PreApprovedSale.ssa.ir index 8ff1ed0b..60afa8bf 100644 --- a/tests/approvals/out/pre-approved-sale/PreApprovedSale.ssa.ir +++ b/tests/approvals/out/pre-approved-sale/PreApprovedSale.ssa.ir @@ -1,6 +1,6 @@ program logicsig tests/approvals/pre-approved-sale.algo.ts::PreApprovedSale: subroutine tests/approvals/pre-approved-sale.algo.ts::program() -> bool: - block@0: // L5 + block@0: // L11 let seller#0: bytes = TemplateVar[bytes](TMPL_SELLER) let price#0: uint64 = TemplateVar[uint64](TMPL_PRICE) let asset#0: uint64 = TemplateVar[uint64](TMPL_ASSET) @@ -9,47 +9,47 @@ program logicsig tests/approvals/pre-approved-sale.algo.ts::PreApprovedSale: let tmp%0#0: bytes = ((gtxns Receiver) payTxn#0) let tmp%1#0: bool = (== tmp%0#0 seller#0) goto tmp%1#0 ? block@1 : block@3 - block@1: // and_contd_L12 + block@1: // and_contd_L18 let tmp%2#0: uint64 = ((gtxns Amount) payTxn#0) let tmp%3#0: bool = (== tmp%2#0 price#0) goto tmp%3#0 ? block@2 : block@3 - block@2: // bool_true_L12 + block@2: // bool_true_L18 let and_result%0#0: bool = 1u goto block@4 - block@3: // bool_false_L12 + block@3: // bool_false_L18 let and_result%0#1: bool = 0u goto block@4 - block@4: // bool_merge_L12 + block@4: // bool_merge_L18 let and_result%0#2: bool = φ(and_result%0#0 <- block@2, and_result%0#1 <- block@3) (assert and_result%0#2) // assert target is match for conditions let tmp%4#0: uint64 = ((gtxns AssetAmount) assetTxn#0) let tmp%5#0: bool = (== tmp%4#0 1u) goto tmp%5#0 ? block@5 : block@10 - block@5: // and_contd_L17 + block@5: // and_contd_L23 let tmp%6#0: bytes = ((gtxns Sender) assetTxn#0) let tmp%7#0: bool = (== tmp%6#0 seller#0) goto tmp%7#0 ? block@6 : block@10 - block@6: // and_contd_L17 + block@6: // and_contd_L23 let tmp%8#0: uint64 = ((gtxns XferAsset) assetTxn#0) let tmp%9#0: bool = (== tmp%8#0 asset#0) goto tmp%9#0 ? block@7 : block@10 - block@7: // and_contd_L17 + block@7: // and_contd_L23 let tmp%10#0: bytes = ((gtxns AssetCloseTo) assetTxn#0) let tmp%11#0: bytes = (global ZeroAddress) let tmp%12#0: bool = (== tmp%10#0 tmp%11#0) goto tmp%12#0 ? block@8 : block@10 - block@8: // and_contd_L17 + block@8: // and_contd_L23 let tmp%13#0: bytes = ((gtxns RekeyTo) assetTxn#0) let tmp%14#0: bytes = (global ZeroAddress) let tmp%15#0: bool = (== tmp%13#0 tmp%14#0) goto tmp%15#0 ? block@9 : block@10 - block@9: // bool_true_L17 + block@9: // bool_true_L23 let and_result%1#0: bool = 1u goto block@11 - block@10: // bool_false_L17 + block@10: // bool_false_L23 let and_result%1#1: bool = 0u goto block@11 - block@11: // bool_merge_L17 + block@11: // bool_merge_L23 let and_result%1#2: bool = φ(and_result%1#0 <- block@9, and_result%1#1 <- block@10) (assert and_result%1#2) // assert target is match for conditions return 1u \ No newline at end of file diff --git a/tests/approvals/out/pre-approved-sale/PreApprovedSale.teal b/tests/approvals/out/pre-approved-sale/PreApprovedSale.teal index b89ff7bd..442f7ee1 100644 --- a/tests/approvals/out/pre-approved-sale/PreApprovedSale.teal +++ b/tests/approvals/out/pre-approved-sale/PreApprovedSale.teal @@ -6,15 +6,15 @@ tests/approvals/pre-approved-sale.algo.ts::PreApprovedSale: // tests/approvals/pre-approved-sale.algo.ts:12 // const seller = TemplateVar('SELLER') bytec_0 // TMPL_SELLER + dup // tests/approvals/pre-approved-sale.algo.ts:13 // const price = TemplateVar('PRICE') intc_2 // TMPL_PRICE + swap // tests/approvals/pre-approved-sale.algo.ts:14 // const asset = TemplateVar('ASSET') intc_3 // TMPL_ASSET - // tests/approvals/pre-approved-sale.algo.ts:12 - // const seller = TemplateVar('SELLER') - bytec_0 // TMPL_SELLER + swap // tests/approvals/pre-approved-sale.algo.ts:16 // const payTxn = gtxn.PaymentTxn(0) intc_1 // 0 diff --git a/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst b/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst deleted file mode 100644 index 66731d8a..00000000 --- a/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst +++ /dev/null @@ -1,11 +0,0 @@ - -logicsig tests/approvals/pre-approved-sale.algo.ts::PreApprovedSale { - seller: account = TemplateVar[account](TMPL_SELLER) - price: uint64 = TemplateVar[uint64](TMPL_PRICE) - asset: asset = TemplateVar[asset](TMPL_ASSET) - payTxn: group_transaction_pay = reinterpret_cast(0) - assetTxn: group_transaction_axfer = reinterpret_cast(1) - assert(gtxns(payTxn) == seller and gtxns(payTxn) == price) - assert(gtxns(assetTxn) == 1 and gtxns(assetTxn) == seller and gtxns(assetTxn) == asset and gtxns(assetTxn) == global() and gtxns(assetTxn) == global()) - return True -} \ No newline at end of file diff --git a/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst.json b/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst.json index 76cd6407..60b1324d 100644 --- a/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst.json +++ b/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst.json @@ -3,8 +3,8 @@ "_type": "LogicSignature", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 4, - "end_line": 4, + "line": 10, + "end_line": 10, "column": 0, "end_column": 47 }, @@ -14,8 +14,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 5, - "end_line": 5, + "line": 11, + "end_line": 11, "column": 2, "end_column": 11 }, @@ -31,8 +31,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 5, - "end_line": 26, + "line": 11, + "end_line": 32, "column": 12, "end_column": 3 }, @@ -41,8 +41,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 6, - "end_line": 6, + "line": 12, + "end_line": 12, "column": 10, "end_column": 49 }, @@ -50,8 +50,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 6, - "end_line": 6, + "line": 12, + "end_line": 12, "column": 10, "end_column": 16 }, @@ -68,8 +68,8 @@ "_type": "TemplateVar", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 6, - "end_line": 6, + "line": 12, + "end_line": 12, "column": 19, "end_column": 49 }, @@ -87,8 +87,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 7, - "end_line": 7, + "line": 13, + "end_line": 13, "column": 10, "end_column": 46 }, @@ -96,8 +96,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 7, - "end_line": 7, + "line": 13, + "end_line": 13, "column": 10, "end_column": 15 }, @@ -114,8 +114,8 @@ "_type": "TemplateVar", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 7, - "end_line": 7, + "line": 13, + "end_line": 13, "column": 18, "end_column": 46 }, @@ -133,8 +133,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 8, - "end_line": 8, + "line": 14, + "end_line": 14, "column": 10, "end_column": 45 }, @@ -142,8 +142,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 8, - "end_line": 8, + "line": 14, + "end_line": 14, "column": 10, "end_column": 15 }, @@ -160,8 +160,8 @@ "_type": "TemplateVar", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 8, - "end_line": 8, + "line": 14, + "end_line": 14, "column": 18, "end_column": 45 }, @@ -179,8 +179,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 10, - "end_line": 10, + "line": 16, + "end_line": 16, "column": 10, "end_column": 37 }, @@ -188,8 +188,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 10, - "end_line": 10, + "line": 16, + "end_line": 16, "column": 10, "end_column": 16 }, @@ -207,8 +207,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 10, - "end_line": 10, + "line": 16, + "end_line": 16, "column": 19, "end_column": 37 }, @@ -224,8 +224,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 10, - "end_line": 10, + "line": 16, + "end_line": 16, "column": 35, "end_column": 36 }, @@ -245,8 +245,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 11, - "end_line": 11, + "line": 17, + "end_line": 17, "column": 10, "end_column": 45 }, @@ -254,8 +254,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 11, - "end_line": 11, + "line": 17, + "end_line": 17, "column": 10, "end_column": 18 }, @@ -273,8 +273,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 11, - "end_line": 11, + "line": 17, + "end_line": 17, "column": 21, "end_column": 45 }, @@ -290,8 +290,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 11, - "end_line": 11, + "line": 17, + "end_line": 17, "column": 43, "end_column": 44 }, @@ -311,8 +311,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 15, + "line": 18, + "end_line": 21, "column": 4, "end_column": 6 }, @@ -320,8 +320,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 15, + "line": 18, + "end_line": 21, "column": 4, "end_column": 6 }, @@ -339,8 +339,8 @@ "_type": "BooleanBinaryOperation", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 15, + "line": 18, + "end_line": 21, "column": 4, "end_column": 6 }, @@ -355,8 +355,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 15, + "line": 18, + "end_line": 21, "column": 4, "end_column": 6 }, @@ -371,8 +371,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 15, + "line": 18, + "end_line": 21, "column": 4, "end_column": 6 }, @@ -392,8 +392,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 12, + "line": 18, + "end_line": 18, "column": 16, "end_column": 22 }, @@ -415,8 +415,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 13, - "end_line": 13, + "line": 19, + "end_line": 19, "column": 16, "end_column": 22 }, @@ -435,8 +435,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 15, + "line": 18, + "end_line": 21, "column": 4, "end_column": 6 }, @@ -451,8 +451,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 15, + "line": 18, + "end_line": 21, "column": 4, "end_column": 6 }, @@ -472,8 +472,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 12, - "end_line": 12, + "line": 18, + "end_line": 18, "column": 16, "end_column": 22 }, @@ -495,8 +495,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 14, - "end_line": 14, + "line": 20, + "end_line": 20, "column": 14, "end_column": 19 }, @@ -519,8 +519,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -528,8 +528,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -547,8 +547,8 @@ "_type": "BooleanBinaryOperation", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -563,8 +563,8 @@ "_type": "BooleanBinaryOperation", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -579,8 +579,8 @@ "_type": "BooleanBinaryOperation", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -595,8 +595,8 @@ "_type": "BooleanBinaryOperation", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -611,8 +611,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -627,8 +627,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -648,8 +648,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 17, + "line": 23, + "end_line": 23, "column": 16, "end_column": 24 }, @@ -671,8 +671,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 18, - "end_line": 18, + "line": 24, + "end_line": 24, "column": 26, "end_column": 27 }, @@ -692,8 +692,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -708,8 +708,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -729,8 +729,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 17, + "line": 23, + "end_line": 23, "column": 16, "end_column": 24 }, @@ -752,8 +752,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 19, - "end_line": 19, + "line": 25, + "end_line": 25, "column": 14, "end_column": 20 }, @@ -773,8 +773,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -789,8 +789,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -810,8 +810,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 17, + "line": 23, + "end_line": 23, "column": 16, "end_column": 24 }, @@ -833,8 +833,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 20, - "end_line": 20, + "line": 26, + "end_line": 26, "column": 17, "end_column": 22 }, @@ -854,8 +854,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -870,8 +870,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -891,8 +891,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 17, + "line": 23, + "end_line": 23, "column": 16, "end_column": 24 }, @@ -914,8 +914,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 21, - "end_line": 21, + "line": 27, + "end_line": 27, "column": 20, "end_column": 38 }, @@ -940,8 +940,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -956,8 +956,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 23, + "line": 23, + "end_line": 29, "column": 4, "end_column": 6 }, @@ -977,8 +977,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 17, - "end_line": 17, + "line": 23, + "end_line": 23, "column": 16, "end_column": 24 }, @@ -1000,8 +1000,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 22, - "end_line": 22, + "line": 28, + "end_line": 28, "column": 15, "end_column": 33 }, @@ -1029,8 +1029,8 @@ "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 25, - "end_line": 25, + "line": 31, + "end_line": 31, "column": 4, "end_column": 15 }, @@ -1038,8 +1038,8 @@ "_type": "BoolConstant", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 25, - "end_line": 25, + "line": 31, + "end_line": 31, "column": 11, "end_column": 15 }, @@ -1066,6 +1066,7 @@ "id": "tests/approvals/pre-approved-sale.algo.ts::program", "name": "program" }, - "docstring": "" + "docstring": "", + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/prefix-postfix-operators/prefix-postfix-operators.awst b/tests/approvals/out/prefix-postfix-operators/prefix-postfix-operators.awst deleted file mode 100644 index 294ba19b..00000000 --- a/tests/approvals/out/prefix-postfix-operators/prefix-postfix-operators.awst +++ /dev/null @@ -1,21 +0,0 @@ -subroutine test_uint64(x: uint64, y: uint64): bool -{ - x++ - x-- - x: uint64 = (y = y - 1) - x: uint64 = (y = y + 1) - y: uint64 = ~y - return !Boolean(y) -} -subroutine test_biguint(x: biguint, y: biguint): bool -{ - x++ - x-- - x: biguint = (y = y - 1) - x: biguint = (y = y + 1) - return !Boolean(bitlen(y)) -} -subroutine test_bytes(x: bytes): void -{ - y: bytes = ~x -} \ No newline at end of file diff --git a/tests/approvals/out/property-ordering/Demo.approval.teal b/tests/approvals/out/property-ordering/Demo.approval.teal index 2f032977..1ac9bce7 100644 --- a/tests/approvals/out/property-ordering/Demo.approval.teal +++ b/tests/approvals/out/property-ordering/Demo.approval.teal @@ -1,7 +1,45 @@ #pragma version 10 tests/approvals/property-ordering.algo.ts::Demo.approvalProgram: + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/property-ordering.algo.ts:20 + // test_assign_from_literal(4) + pushint 4 // 4 + callsub test_assign_from_literal + // tests/approvals/property-ordering.algo.ts:22 + // test_assign_from_var({ a: 3, b: 4 }) + pushint 3 // 3 + pushint 4 // 4 + callsub test_assign_from_var // tests/approvals/property-ordering.algo.ts:24 // return true pushint 1 // 1 return + + +// tests/approvals/property-ordering.algo.ts::Demo.constructor() -> void: +constructor: + // tests/approvals/property-ordering.algo.ts:18 + // export class Demo extends BaseContract { + proto 0 0 + retsub + + +// tests/approvals/property-ordering.algo.ts::test_assign_from_literal(x: uint64) -> void: +test_assign_from_literal: + // tests/approvals/property-ordering.algo.ts:10 + // function test_assign_from_literal(x: uint64) { + proto 1 0 + retsub + + +// tests/approvals/property-ordering.algo.ts::test_assign_from_var(x.a: uint64, x.b: uint64) -> void: +test_assign_from_var: + // tests/approvals/property-ordering.algo.ts:6 + // function test_assign_from_var(x: { a: uint64; b: uint64 }) { + proto 2 0 + retsub diff --git a/tests/approvals/out/property-ordering/property-ordering.awst b/tests/approvals/out/property-ordering/property-ordering.awst deleted file mode 100644 index cbbc3c74..00000000 --- a/tests/approvals/out/property-ordering/property-ordering.awst +++ /dev/null @@ -1,36 +0,0 @@ -subroutine test_assign_from_var(x: { a: uint64, b: uint64 }): void -{ - obj: BthenA{ b: uint64, a: uint64 } = { b: x.b, a: x.a } -} -subroutine test_assign_from_literal(x: uint64): void -{ - obj: { a: uint64, z: uint64 } = { a: (#0 = { z: (b = x * 2), a: b }).a, z: #0.z } -} -contract Demo -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - tests/approvals/property-ordering.algo.ts::test_assign_from_literal(4) - tests/approvals/property-ordering.algo.ts::test_assign_from_var({ a: (#1 = { a: 3, b: 4 }).a, b: #1.b }) - return True - } - - clearProgram(): bool - { - return True - } - - constructor(): void - { - void - } - - Contract::constructor(): void - { - this.constructor() - } - -} \ No newline at end of file diff --git a/tests/approvals/out/property-ordering/property-ordering.awst.json b/tests/approvals/out/property-ordering/property-ordering.awst.json index be37efda..56887bad 100644 --- a/tests/approvals/out/property-ordering/property-ordering.awst.json +++ b/tests/approvals/out/property-ordering/property-ordering.awst.json @@ -1674,6 +1674,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.approval.teal b/tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.approval.teal index c996dc9a..ac2c5172 100644 --- a/tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.approval.teal +++ b/tests/approvals/out/shadowed-variables/ShadowedVariablesAlgo.approval.teal @@ -2,33 +2,76 @@ tests/approvals/shadowed-variables.algo.ts::ShadowedVariablesAlgo.approvalProgram: bytecblock "123" + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: // tests/approvals/shadowed-variables.algo.ts:8 // const [b, u, f] = this.getValues() callsub getValues + cover 2 + cover 2 + swap + cover 2 // tests/approvals/shadowed-variables.algo.ts:4 // const a = Bytes('123') bytec_0 // "123" // tests/approvals/shadowed-variables.algo.ts:9 // assert(a === b, 'a should be module const (bytes)') - uncover 3 == assert // a should be module const (bytes) // tests/approvals/shadowed-variables.algo.ts:12 // assert(a === 123, 'a should be local const (uint)') - swap + dup pushint 123 // 123 == assert // a should be local const (uint) + // tests/approvals/shadowed-variables.algo.ts:14 + // let a = f + swap // tests/approvals/shadowed-variables.algo.ts:15 // assert(!a, 'a should be local let (bool)') + dup ! assert // a should be local let (bool) + // tests/approvals/shadowed-variables.algo.ts:17 + // a = !a + ! + // tests/approvals/shadowed-variables.algo.ts:18 + // assert(a, 'a should be modified local let (bool)') + dup + assert // a should be modified local let (bool) + // tests/approvals/shadowed-variables.algo.ts:20 + // assert(a, 'a should still be modified local let (bool)') + assert // a should still be modified local let (bool) + // tests/approvals/shadowed-variables.algo.ts:22 + // assert(a === 123, 'a should be local const (uint)') + pushint 123 // 123 + == + assert // a should be local const (uint) + // tests/approvals/shadowed-variables.algo.ts:4 + // const a = Bytes('123') + bytec_0 // "123" + // tests/approvals/shadowed-variables.algo.ts:24 + // assert(a === Bytes('123'), 'a should be module const (bytes)') + dup + == + assert // a should be module const (bytes) // tests/approvals/shadowed-variables.algo.ts:25 // return true pushint 1 // 1 return +// tests/approvals/shadowed-variables.algo.ts::ShadowedVariablesAlgo.constructor() -> void: +constructor: + // tests/approvals/shadowed-variables.algo.ts:6 + // class ShadowedVariablesAlgo extends BaseContract { + proto 0 0 + retsub + + // tests/approvals/shadowed-variables.algo.ts::ShadowedVariablesAlgo.getValues() -> bytes, uint64, uint64: getValues: // tests/approvals/shadowed-variables.algo.ts:28 @@ -39,5 +82,6 @@ getValues: bytec_0 // "123" // tests/approvals/shadowed-variables.algo.ts:29 // return [a, Uint64(123), false] - pushints 123 0 // 123, 0 + pushint 123 // 123 + pushint 0 // 0 retsub diff --git a/tests/approvals/out/shadowed-variables/shadowed-variables.awst b/tests/approvals/out/shadowed-variables/shadowed-variables.awst deleted file mode 100644 index 31daf2f6..00000000 --- a/tests/approvals/out/shadowed-variables/shadowed-variables.awst +++ /dev/null @@ -1,42 +0,0 @@ -contract ShadowedVariablesAlgo -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - [b, u, f]: readonlytuple[bytes, uint64, bool] = this.getValues() - assert("123" == b) - a: uint64 = u - assert(a == 123) - a₁: bool = f - assert(!a₁) - a₁: bool = !a₁ - assert(a₁) - assert(a₁) - assert(a == 123) - assert("123" == "123") - return True - } - - clearProgram(): bool - { - return True - } - - getValues(): readonlytuple[bytes, uint64, bool] - { - return ["123", 123, False] - } - - constructor(): void - { - void - } - - Contract::constructor(): void - { - this.constructor() - } - -} \ No newline at end of file diff --git a/tests/approvals/out/shadowed-variables/shadowed-variables.awst.json b/tests/approvals/out/shadowed-variables/shadowed-variables.awst.json index da17e006..0dc77dd2 100644 --- a/tests/approvals/out/shadowed-variables/shadowed-variables.awst.json +++ b/tests/approvals/out/shadowed-variables/shadowed-variables.awst.json @@ -1482,6 +1482,7 @@ "localBytes": null, "localUints": null }, - "reserved_scratch_space": [] + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/switch-statements/switch-statements.awst b/tests/approvals/out/switch-statements/switch-statements.awst deleted file mode 100644 index 2150fda3..00000000 --- a/tests/approvals/out/switch-statements/switch-statements.awst +++ /dev/null @@ -1,56 +0,0 @@ -subroutine test_uint64(x: uint64): uint64 -{ - switch (x) { - case 1: - #switch₁ᶜ₀: - goto #switch₁ᶜ₁ - case 2: - #switch₁ᶜ₁: - goto #switch₁ᶜ₂ - case 4: - #switch₁ᶜ₂: - return 3 - default: - #switch₁ᶜ₃: - return 1 - } -} -subroutine test_break(x: uint64): uint64 -{ - i: uint64 = 0 - switch (x) { - case 1: - #switch₁ᶜ₀: - goto #switch₁ᶜ₁ - case 2: - #switch₁ᶜ₁: - goto #switch₁ᶜ₂ - case 4: - #switch₁ᶜ₂: - i: uint64 = i + x - goto #switch₁ᵇ - case 5: - #switch₁ᶜ₃: - i: uint64 = i * x - } - #switch₁ᵇ: - return i -} -subroutine test_bytes(x: bytes): bytes -{ - switch (x) { - case "hmmm": - #switch₁ᶜ₀: - goto #switch₁ᶜ₁ - case 0xff: - #switch₁ᶜ₁: - goto #switch₁ᶜ₂ - case b64: - #switch₁ᶜ₂: - goto #switch₁ᶜ₃ - case b32: - #switch₁ᶜ₃: - return x - } - return x -} \ No newline at end of file diff --git a/tests/approvals/out/while-loops/while-loops.awst b/tests/approvals/out/while-loops/while-loops.awst deleted file mode 100644 index d08911cb..00000000 --- a/tests/approvals/out/while-loops/while-loops.awst +++ /dev/null @@ -1,9 +0,0 @@ -subroutine test_while(stop: uint64): void -{ - i: uint64 = 0 - while (i < stop) { - i: uint64 = i + 1 - #loop₁ᶜ: - } - #loop₁ᵇ: -} \ No newline at end of file diff --git a/tests/onchain/arc4-types.spec.ts b/tests/onchain/arc4-types.spec.ts index 7f6827c2..3627fdd6 100644 --- a/tests/onchain/arc4-types.spec.ts +++ b/tests/onchain/arc4-types.spec.ts @@ -21,4 +21,8 @@ describe('arc4-struct', () => { const result = await appClientStructDemo.send.call({ method: 'addVectors', args: [v1, v2] }) expect(result.return).toStrictEqual({ x: 150n, y: 150n }) }) + test('implicit casting and spreading', async ({ appClientStructDemo, expect }) => { + const v1 = { x: 123, y: 456 } + await appClientStructDemo.send.call({ method: 'implicitCastingAndSpreading', args: [v1] }) + }) }) diff --git a/tests/onchain/util/test-fixture.ts b/tests/onchain/util/test-fixture.ts index b71946c7..b94ae56a 100644 --- a/tests/onchain/util/test-fixture.ts +++ b/tests/onchain/util/test-fixture.ts @@ -191,6 +191,7 @@ function compilePath(path: string, expect: ExpectStatic): CompilationArtifacts { outputTeal: false, outputArc32: true, outputBytecode: true, + optimizationLevel: 0, }, ) for (const log of logCtx.logEvents) { From ad871e814720765cf34cc21d82fa725c37eb27c2 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Tue, 12 Nov 2024 18:09:26 +1000 Subject: [PATCH 04/30] test: Include awst files in approvals --- package.json | 2 +- tests/approvals.spec.ts | 2 +- .../out/abi-decorators/abi-decorators.awst | 56 +++++ tests/approvals/out/accounts/accounts.awst | 39 +++ .../out/arc4-struct/arc4-struct.awst | 56 +++++ .../approvals/out/arc4-types/arc4-types.awst | 98 ++++++++ .../array-destructuring.awst | 23 ++ .../out/array-literals/array-literals.awst | 9 + .../out/assert-match/assert-match.awst | 36 +++ .../biguint-expressions.awst | 16 ++ .../boolean-conversions.awst | 26 ++ .../boolean-expressions.awst | 15 ++ .../out/box-proxies/box-proxies.awst | 44 ++++ .../byte-expressions/byte-expressions.awst | 11 + .../call-expressions/call-expressions.awst | 50 ++++ .../conditional-expression.awst | 10 + .../destructured-params.awst | 11 + .../destructuring-iterators.awst | 11 + tests/approvals/out/do-loops/do-loops.awst | 12 + .../out/ensure-budget/ensure-budget.awst | 30 +++ tests/approvals/out/for-loops/for-loops.awst | 61 +++++ .../out/for-of-loops/for-of-loops.awst | 10 + .../out/global-state/global-state.awst | 47 ++++ .../out/implicit-create/implicit-create.awst | 222 ++++++++++++++++++ .../out/inheritance-a/inheritance-a.awst | 0 .../out/inheritance-b/inheritance-b.awst | 99 ++++++++ .../out/intrinsic-calls/intrinsic-calls.awst | 7 + tests/approvals/out/itxn/itxn.awst | 85 +++++++ .../out/local-state/local-state.awst | 65 +++++ tests/approvals/out/logic-sig/logic-sig.awst | 13 + .../out/named-types/named-types.awst | 61 +++++ tests/approvals/out/non-arc4/non-arc4.awst | 33 +++ .../numeric-literal-expressions.awst | 16 ++ .../object-destructuring.awst | 34 +++ .../pre-approved-sale/pre-approved-sale.awst | 11 + .../prefix-postfix-operators.awst | 21 ++ .../property-ordering/property-ordering.awst | 36 +++ .../shadowed-variables.awst | 42 ++++ .../switch-statements/switch-statements.awst | 56 +++++ .../out/while-loops/while-loops.awst | 9 + 40 files changed, 1483 insertions(+), 2 deletions(-) create mode 100644 tests/approvals/out/abi-decorators/abi-decorators.awst create mode 100644 tests/approvals/out/accounts/accounts.awst create mode 100644 tests/approvals/out/arc4-struct/arc4-struct.awst create mode 100644 tests/approvals/out/arc4-types/arc4-types.awst create mode 100644 tests/approvals/out/array-destructuring/array-destructuring.awst create mode 100644 tests/approvals/out/array-literals/array-literals.awst create mode 100644 tests/approvals/out/assert-match/assert-match.awst create mode 100644 tests/approvals/out/biguint-expressions/biguint-expressions.awst create mode 100644 tests/approvals/out/boolean-conversions/boolean-conversions.awst create mode 100644 tests/approvals/out/boolean-expressions/boolean-expressions.awst create mode 100644 tests/approvals/out/box-proxies/box-proxies.awst create mode 100644 tests/approvals/out/byte-expressions/byte-expressions.awst create mode 100644 tests/approvals/out/call-expressions/call-expressions.awst create mode 100644 tests/approvals/out/conditional-expression/conditional-expression.awst create mode 100644 tests/approvals/out/destructured-params/destructured-params.awst create mode 100644 tests/approvals/out/destructuring-iterators/destructuring-iterators.awst create mode 100644 tests/approvals/out/do-loops/do-loops.awst create mode 100644 tests/approvals/out/ensure-budget/ensure-budget.awst create mode 100644 tests/approvals/out/for-loops/for-loops.awst create mode 100644 tests/approvals/out/for-of-loops/for-of-loops.awst create mode 100644 tests/approvals/out/global-state/global-state.awst create mode 100644 tests/approvals/out/implicit-create/implicit-create.awst create mode 100644 tests/approvals/out/inheritance-a/inheritance-a.awst create mode 100644 tests/approvals/out/inheritance-b/inheritance-b.awst create mode 100644 tests/approvals/out/intrinsic-calls/intrinsic-calls.awst create mode 100644 tests/approvals/out/itxn/itxn.awst create mode 100644 tests/approvals/out/local-state/local-state.awst create mode 100644 tests/approvals/out/logic-sig/logic-sig.awst create mode 100644 tests/approvals/out/named-types/named-types.awst create mode 100644 tests/approvals/out/non-arc4/non-arc4.awst create mode 100644 tests/approvals/out/numeric-literal-expressions/numeric-literal-expressions.awst create mode 100644 tests/approvals/out/object-destructuring/object-destructuring.awst create mode 100644 tests/approvals/out/pre-approved-sale/pre-approved-sale.awst create mode 100644 tests/approvals/out/prefix-postfix-operators/prefix-postfix-operators.awst create mode 100644 tests/approvals/out/property-ordering/property-ordering.awst create mode 100644 tests/approvals/out/shadowed-variables/shadowed-variables.awst create mode 100644 tests/approvals/out/switch-statements/switch-statements.awst create mode 100644 tests/approvals/out/while-loops/while-loops.awst diff --git a/package.json b/package.json index 5b8a1bb1..fad81463 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "postinstall": "npx patch-package", "dev:examples": "tsx src/cli.ts build examples --output-awst --output-awst-json", - "dev:approvals": "rimraf tests/approvals/out && tsx src/cli.ts build tests/approvals --output-awst --output-awst-json --no-output-teal --output-ssa-ir --out-dir out/[name]", + "dev:approvals": "rimraf tests/approvals/out && tsx src/cli.ts build tests/approvals --output-awst --output-awst-json --output-ssa-ir --out-dir out/[name] --optimization-level 0", "dev:expected-output": "tsx src/cli.ts build tests/expected-output --dry-run", "dev:testing": "tsx src/cli.ts build tests/approvals/arc4-struct.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name]", "audit": "better-npm-audit audit", diff --git a/tests/approvals.spec.ts b/tests/approvals.spec.ts index abe0c182..7ee415f5 100644 --- a/tests/approvals.spec.ts +++ b/tests/approvals.spec.ts @@ -11,7 +11,7 @@ describe('Approvals', () => { const result = compile( buildCompileOptions({ outputAwstJson: true, - outputAwst: false, + outputAwst: true, paths: ['tests/approvals'], outDir: 'out/[name]', dryRun: false, diff --git a/tests/approvals/out/abi-decorators/abi-decorators.awst b/tests/approvals/out/abi-decorators/abi-decorators.awst new file mode 100644 index 00000000..e42f0290 --- /dev/null +++ b/tests/approvals/out/abi-decorators/abi-decorators.awst @@ -0,0 +1,56 @@ +contract AbiDecorators +{ + globals { + ["globalValue"]: uint64 + } + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + justNoop(): void + { + } + + createMethod(): void + { + } + + allActions(): void + { + } + + readonly(): uint64 + { + return 5 + } + + methodWithDefaults(): uint64 + { + return a * b + c + } + + constructor(): void + { + void + GlobalState["globalValue"]: uint64 = 123 + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + +} \ No newline at end of file diff --git a/tests/approvals/out/accounts/accounts.awst b/tests/approvals/out/accounts/accounts.awst new file mode 100644 index 00000000..0d7eac48 --- /dev/null +++ b/tests/approvals/out/accounts/accounts.awst @@ -0,0 +1,39 @@ +contract AccountsContract +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + getAccountInfo(): { bytes: bytes, balance: uint64, minBalance: uint64, authAddress: bytes, totalNumUint: uint64, totalNumByteSlice: uint64, totalExtraAppPages: uint64, totalAppsCreated: uint64, totalAppsOptedIn: uint64, totalAssetsCreated: uint64, totalAssets: uint64, totalBoxes: uint64, totalBoxBytes: uint64, isOptInApp: bool, isOptInAsset: bool } + { + return { bytes: reinterpret_cast(account), balance: checked_maybe(acct_params_get(account), comment=account funded), minBalance: checked_maybe(acct_params_get(account), comment=account funded), authAddress: reinterpret_cast(checked_maybe(acct_params_get(account), comment=account funded)), totalNumUint: checked_maybe(acct_params_get(account), comment=account funded), totalNumByteSlice: checked_maybe(acct_params_get(account), comment=account funded), totalExtraAppPages: checked_maybe(acct_params_get(account), comment=account funded), totalAppsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAppsOptedIn: checked_maybe(acct_params_get(account), comment=account funded), totalAssetsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAssets: checked_maybe(acct_params_get(account), comment=account funded), totalBoxes: checked_maybe(acct_params_get(account), comment=account funded), totalBoxBytes: checked_maybe(acct_params_get(account), comment=account funded), isOptInApp: app_opted_in(account, global()), isOptInAsset: asset_holding_get(account, asset).1 } + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + + __algots__.defaultCreate(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst b/tests/approvals/out/arc4-struct/arc4-struct.awst new file mode 100644 index 00000000..63ea7ff7 --- /dev/null +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst @@ -0,0 +1,56 @@ +contract StructDemo +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + testVectorCreationAndEquality(): void + { + v1: Vector = new Vector(x=(#14 = { x: 0, y: 0 }).x, y=#14.y) + log(reinterpret_cast(v1.x)) + log(reinterpret_cast(v1.y)) + v2: Vector = new Vector(x=(#16 = { x: (#15 = { y: 0, x: 0 }).x, y: #15.y }).x, y=#16.y) + assert(reinterpret_cast(v1) == reinterpret_cast(v2)) + } + + addVectors(): Vector + { + return new Vector(x=(#17 = { x: ARC4_ENCODE(ARC4_DECODE(v1.x) + ARC4_DECODE(v2.x), wtype=arc4.uint64), y: ARC4_ENCODE(ARC4_DECODE(v1.y) + ARC4_DECODE(v2.y), wtype=arc4.uint64) }).x, y=#17.y) + } + + implicitCastingAndSpreading(): void + { + v2: Vector = new Vector(x=(#18 = ARC4_DECODE(v1)).x, y=#18.y) + v3: Vector = new Vector(x=(#19 = { x: v2.x, y: v2.y }).x, y=#19.y) + assert(reinterpret_cast(v1) == reinterpret_cast(v2)) + assert(reinterpret_cast(v3) == reinterpret_cast(v1)) + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + + __algots__.defaultCreate(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/arc4-types/arc4-types.awst b/tests/approvals/out/arc4-types/arc4-types.awst new file mode 100644 index 00000000..dfe0b36a --- /dev/null +++ b/tests/approvals/out/arc4-types/arc4-types.awst @@ -0,0 +1,98 @@ +subroutine testUFixed(): void +{ + a: arc4.ufixed32x4 = 1.244m + c: arc4.ufixed32x4 = 1.244m + assert(reinterpret_cast(a) == reinterpret_cast(c)) +} +subroutine test(n: uint64, b: biguint, c: arc4.uint256): void +{ + x: arc4.uint8 = 4 + assert(len(reinterpret_cast(x)) == 1) + x2: arc4.uint8 = 0xff + assert(reinterpret_cast(x2) == 0xff) + y: arc4.uint16 = 0 + assert(len(reinterpret_cast(y)) == 2) + z: arc4.uint8 = ARC4_ENCODE(n, wtype=arc4.uint8) + z_native: uint64 = ARC4_DECODE(z) + assert(z_native == n) + a: arc4.uint128 = ARC4_ENCODE(b, wtype=arc4.uint128) + a_native: biguint = ARC4_DECODE(a) + assert(a_native == b) + assert(len(reinterpret_cast(c)) == 32) +} +subroutine testStr(): void +{ + s1: arc4.dynamic_array = "" + assert(reinterpret_cast(s1) == reinterpret_cast(0)) + s2: arc4.dynamic_array = "Hello" + assert(ARC4_DECODE(s2) == "Hello") +} +subroutine testArrays(n: arc4.uint64): void +{ + myArray: arc4.dynamic_array = new arc4.dynamic_array(n, n, n) + myArray.push(...[n] + myStatic: arc4.static_array = new arc4.static_array(n, n) + assert(reinterpret_cast(myStatic[0]) == reinterpret_cast(myArray.pop())) + myStatic[1]: arc4.uint64 = 50 +} +subroutine testByte(): void +{ + b: arc4.byte = 0 + b2: arc4.byte = 0 + assert(reinterpret_cast(b) == reinterpret_cast(b2)) +} +subroutine testAddress(): void +{ + a: arc4.static_array = Address("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ") + b: arc4.static_array = reinterpret_cast>(txn()) + assert(!reinterpret_cast(a) == reinterpret_cast(b)) + assert(reinterpret_cast(a) == reinterpret_cast(Address("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ"))) + assert(reinterpret_cast(a[0]) == reinterpret_cast(0)) +} +subroutine testTuple(): void +{ + t: arc4.tuple = ARC4_ENCODE([34], wtype=arc4.tuple) + firstItem: arc4.uint64 = t.0 + firstItemIndexer: arc4.uint64 = ARC4_DECODE(t).0 + assert(reinterpret_cast(firstItem) == reinterpret_cast(firstItemIndexer)) + t1: arc4.tuple = ARC4_ENCODE([Address("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ"), 0], wtype=arc4.tuple) + assert(2 == 2) +} +contract Arc4TypesTestContract +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + x: arc4.uint64 = 0 + tests/approvals/arc4-types.algo.ts::testStr() + tests/approvals/arc4-types.algo.ts::test(1, 2, 4) + tests/approvals/arc4-types.algo.ts::testByte() + tests/approvals/arc4-types.algo.ts::testArrays(65) + tests/approvals/arc4-types.algo.ts::testAddress() + tests/approvals/arc4-types.algo.ts::testTuple() + return True + } + + clearProgram(): bool + { + return True + } + + getArc4Values(): readonlytuple[arc4.byte, arc4.uint8, arc4.static_array] + { + return [0, 255, Address("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ")] + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + +} \ No newline at end of file diff --git a/tests/approvals/out/array-destructuring/array-destructuring.awst b/tests/approvals/out/array-destructuring/array-destructuring.awst new file mode 100644 index 00000000..05af7aeb --- /dev/null +++ b/tests/approvals/out/array-destructuring/array-destructuring.awst @@ -0,0 +1,23 @@ +subroutine testNested(arg: readonlytuple[uint64, readonlytuple[biguint, biguint]]): void +{ + [a, b]: readonlytuple[uint64, readonlytuple[biguint, biguint]] = arg + [c, [d, _]]: readonlytuple[uint64, readonlytuple[biguint, biguint]] = arg +} +subroutine test(): void +{ + [a, b, c, d]: readonlytuple[uint64, bytes, bool, biguint] = tests/approvals/array-destructuring.algo.ts::produceItems() + [_, _₁, e, _₂]: readonlytuple[uint64, bytes, bool, biguint] = tests/approvals/array-destructuring.algo.ts::produceItems() + f: readonlytuple[uint64, bytes, bool, biguint] = ([g, _₃, _₄, i] = tests/approvals/array-destructuring.algo.ts::produceItems()) +} +subroutine produceItems(): readonlytuple[uint64, bytes, bool, biguint] +{ + return [5, 0x, False, 6] +} +subroutine testLiteralDestructuring(): void +{ + a: uint64 = 1 + b: uint64 = 2 + [x, y]: readonlytuple[uint64, uint64] = ([b, a] = [a, b]) + assert(x == b) + assert(y == a) +} \ No newline at end of file diff --git a/tests/approvals/out/array-literals/array-literals.awst b/tests/approvals/out/array-literals/array-literals.awst new file mode 100644 index 00000000..5522a6ab --- /dev/null +++ b/tests/approvals/out/array-literals/array-literals.awst @@ -0,0 +1,9 @@ +subroutine test(a: uint64, b: uint64): void +{ + inferTuple: readonlytuple[uint64, uint64] = [a, b] + explicitTuple: readonlytuple[uint64, uint64] = [a, b] + conditionalExplicitTuple: readonlytuple[uint64, uint64] = (a < b ? [a, b] : [b, a]) + [c, d]: readonlytuple[uint64, uint64] = [a, b] + [_, g]: readonlytuple[uint64, uint64] = [a, b] + [h, _₁]: readonlytuple[uint64, uint64] = [a, b] +} \ No newline at end of file diff --git a/tests/approvals/out/assert-match/assert-match.awst b/tests/approvals/out/assert-match/assert-match.awst new file mode 100644 index 00000000..a981a9f7 --- /dev/null +++ b/tests/approvals/out/assert-match/assert-match.awst @@ -0,0 +1,36 @@ +subroutine testSelf(): void +{ + assert(txn() == global()) +} +subroutine test(x: group_transaction_pay): void +{ + assert(gtxns(x) <= 50000 and gtxns(x) >= 0 and gtxns(x) == txn() and gtxns(x) == global() and gtxns(x) == global() and gtxns(x) > 1 and gtxns(x) < 1099511627776) +} +contract AssertMatchContract +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + txn: group_transaction_pay = reinterpret_cast(1) + tests/approvals/assert-match.algo.ts::test(txn) + return True + } + + clearProgram(): bool + { + return True + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + +} \ No newline at end of file diff --git a/tests/approvals/out/biguint-expressions/biguint-expressions.awst b/tests/approvals/out/biguint-expressions/biguint-expressions.awst new file mode 100644 index 00000000..fae2298c --- /dev/null +++ b/tests/approvals/out/biguint-expressions/biguint-expressions.awst @@ -0,0 +1,16 @@ +subroutine test(a: uint64, b: bool, c: bytes): void +{ + 0 + reinterpret_cast(itob(True)) + reinterpret_cast(itob(False)) + 0 + 1 + 0 + 1 + 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084095 + 1231232134123123 + reinterpret_cast(itob(a)) + reinterpret_cast(itob(a * a)) + reinterpret_cast(itob(b)) + reinterpret_cast(c) +} \ No newline at end of file diff --git a/tests/approvals/out/boolean-conversions/boolean-conversions.awst b/tests/approvals/out/boolean-conversions/boolean-conversions.awst new file mode 100644 index 00000000..ec33a1bd --- /dev/null +++ b/tests/approvals/out/boolean-conversions/boolean-conversions.awst @@ -0,0 +1,26 @@ +subroutine test_truthyness(a: uint64, b: uint64, c: string, d: bytes, e: uint64): void +{ + assert(True) + assert(True) + assert(!Boolean(0)) + assert(Boolean(1)) + assert(!Boolean(bitlen(0))) + assert(Boolean(bitlen(1))) + assert(!Boolean(len(0x))) + assert(Boolean(len("abc"))) + empty: string = "" + assert(!Boolean(len(empty))) + assert(Boolean(len("abc"))) + assert(!False) + assert(True) +} +subroutine test_booleans_are_equal(): void +{ + assert(!!True == !!True) + assert(!!Boolean(1) == !!Boolean(5)) + assert(!!Boolean(bitlen(1)) == !!Boolean(bitlen(5))) + assert("abc" != 0x == "abcdef" != 0x) + assert("abc" != 0x == "abcdef" != 0x) + boolNoArgs: bool = False + assert(!boolNoArgs) +} \ No newline at end of file diff --git a/tests/approvals/out/boolean-expressions/boolean-expressions.awst b/tests/approvals/out/boolean-expressions/boolean-expressions.awst new file mode 100644 index 00000000..a13ee8b3 --- /dev/null +++ b/tests/approvals/out/boolean-expressions/boolean-expressions.awst @@ -0,0 +1,15 @@ +subroutine test(a: uint64, b: uint64, c: string, d: bytes, e: uint64): bool +{ + x: uint64 = (Boolean((#12 = (Boolean(a) ? a : b))) ? #12 : e) + assert(Boolean((Boolean((#13 = (Boolean(a) ? b : a))) ? e : #13))) + y: uint64 = (Boolean(a) ? b : a) + z: uint64 = (Boolean(a) and Boolean(len(d)) or Boolean(y) ? (Boolean(x) ? x : y) : (Boolean(x) ? y : x)) + if (Boolean(a) or Boolean(len(c)) and Boolean(len(d))) { + return True + } + f: uint64 = 0 + if (Boolean((f = (Boolean(a) ? a : b)))) { + return True + } + return False +} \ No newline at end of file diff --git a/tests/approvals/out/box-proxies/box-proxies.awst b/tests/approvals/out/box-proxies/box-proxies.awst new file mode 100644 index 00000000..882c99cc --- /dev/null +++ b/tests/approvals/out/box-proxies/box-proxies.awst @@ -0,0 +1,44 @@ +subroutine testBox(box: box_key, value: string): void +{ + box.value: string = value + Box["A"].value: string = value + assert(box.value == Box["A"].value) + assert(STATE_EXISTS(box.value) and STATE_EXISTS(Box["A"].value)) + assert(Boolean(checked_maybe(box_len(box.value), comment=Box must exist))) + STATE_DEL(box.value) + STATE_DEL(Box["A"].value) + assert(!STATE_EXISTS(box.value) and !STATE_EXISTS(Box["A"].value)) + defaultVal: string = "O" + assert(STATE_GET(Box["A"].value, default=defaultVal) == STATE_GET(box.value, default=defaultVal)) + [_, e]: readonlytuple[string, bool] = STATE_GET_EX(box.value) + assert(!e) + box.value: string = value + [_₁, e]: readonlytuple[string, bool] = STATE_GET_EX(box.value) + assert(e) +} +subroutine testBoxMap(box: box_key, key: string, value: bytes): void +{ + concat(box, reinterpret_cast(key)).value: bytes = value + concat("", reinterpret_cast(key)).value: bytes = value + assert(Boolean(checked_maybe(box_len(concat(box, reinterpret_cast(key)).value), comment=Box must exist))) + assert(STATE_GET_EX(concat(box, reinterpret_cast(key)).value).1) + assert(concat(box, reinterpret_cast(key)).value == concat("", reinterpret_cast(key)).value) + STATE_DEL(concat(box, reinterpret_cast(key)).value) + assert(STATE_GET(concat(box, reinterpret_cast("" + key + "x")).value, default="b") == STATE_GET(concat("", reinterpret_cast("" + key + "x")).value, default="b")) +} +subroutine testBoxRef(box: box_key, length: uint64): void +{ + if (!box_len(Box["abc"].value).1) { + box_create(Box["abc"].value, 1000) + } else { + if (checked_maybe(box_len(Box["abc"].value), comment=Box must exist) != length) { + box_resize(Box["abc"].value, length) + } + } + someBytes: bytes = 0xffffffff + box_put(box.value, someBytes) + box_put(Box["abc"].value, someBytes) + box_splice(box.value, 1, 2, 0x00) + box_splice(Box["abc"].value, 1, 2, 0x00) + assert(box.value == 0xff00ffff) +} \ No newline at end of file diff --git a/tests/approvals/out/byte-expressions/byte-expressions.awst b/tests/approvals/out/byte-expressions/byte-expressions.awst new file mode 100644 index 00000000..b305d34f --- /dev/null +++ b/tests/approvals/out/byte-expressions/byte-expressions.awst @@ -0,0 +1,11 @@ +subroutine test(a: uint64, b: biguint, c: string): void +{ + assert(len(0x) == 0) + assert(itob(a) == itob(a)) + assert(0x01 == 0x0000000000000001) + assert(reinterpret_cast(256) == 0x0100) + assert(reinterpret_cast(reinterpret_cast(b)) == b) + assert(reinterpret_cast(reinterpret_cast(c)) == c) + assert("123" == "123") + assert(0x01020304 == 0x01020304) +} \ No newline at end of file diff --git a/tests/approvals/out/call-expressions/call-expressions.awst b/tests/approvals/out/call-expressions/call-expressions.awst new file mode 100644 index 00000000..9548b1fc --- /dev/null +++ b/tests/approvals/out/call-expressions/call-expressions.awst @@ -0,0 +1,50 @@ +contract Example +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return this.localMethod() + super.baseMethod() == tests/approvals/call-expressions.algo.ts::freeMethod() - this.baseMethod() + } + + clearProgram(): bool + { + return True + } + + baseMethod(): uint64 + { + return 1 + } + + localMethod(): uint64 + { + return 5 + } + + constructor(): void + { + super.constructor() + } + + ExampleBase::baseMethod(): uint64 + { + return 2 + } + + ExampleBase::constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + +} +subroutine freeMethod(): uint64 +{ + return 7 +} \ No newline at end of file diff --git a/tests/approvals/out/conditional-expression/conditional-expression.awst b/tests/approvals/out/conditional-expression/conditional-expression.awst new file mode 100644 index 00000000..4653e6d7 --- /dev/null +++ b/tests/approvals/out/conditional-expression/conditional-expression.awst @@ -0,0 +1,10 @@ +subroutine test(x: uint64, y: uint64): bool +{ + a: uint64 = (x < 4 ? x : y) + x + b: uint64 = (Boolean(y % 2) ? 2 : 1) + c: uint64 = (x > y ? (y > 10 ? 3 : y) : x) + d: uint64 = (Boolean(y % 2) ? 2 : 1) + (x < 4 ? x : y) + e: uint64 = (Boolean(x) ? x : 4) + f: bool = (Boolean(y % 2) ? 2 : 1) == (x < 4 ? x : y) + return True +} \ No newline at end of file diff --git a/tests/approvals/out/destructured-params/destructured-params.awst b/tests/approvals/out/destructured-params/destructured-params.awst new file mode 100644 index 00000000..a3786741 --- /dev/null +++ b/tests/approvals/out/destructured-params/destructured-params.awst @@ -0,0 +1,11 @@ +subroutine test(p: { a: uint64, b: bytes, c: bool }): void +{ + { a: a, b: b, c: c }: { a: uint64, b: bytes, c: bool } = p + log(concat(concat(itob(a), b), itob(c))) +} +subroutine init(): void +{ + tests/approvals/destructured-params.algo.ts::test({ a: (#11 = { a: 1, b: "", c: False }).a, b: #11.b, c: #11.c }) + temp: { a: uint64, b: bytes, c: bool } = { a: 2, b: "Hello", c: True } + tests/approvals/destructured-params.algo.ts::test(temp) +} \ No newline at end of file diff --git a/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst b/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst new file mode 100644 index 00000000..f810af47 --- /dev/null +++ b/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst @@ -0,0 +1,11 @@ +subroutine test(): void +{ + items: readonlytuple[{ a: uint64, b: uint64 }, { a: uint64, b: uint64 }, { a: uint64, b: uint64 }] = [{ a: 1, b: 2 }, { a: 2, b: 2 }, { a: 3, b: 2 }] + total: uint64 = 0 + for ({ a: a, b: _ } in items) { + total: uint64 = total + a + #loop₁ᶜ: + } + #loop₁ᵇ: + assert(total == 6) +} \ No newline at end of file diff --git a/tests/approvals/out/do-loops/do-loops.awst b/tests/approvals/out/do-loops/do-loops.awst new file mode 100644 index 00000000..7c51ebfb --- /dev/null +++ b/tests/approvals/out/do-loops/do-loops.awst @@ -0,0 +1,12 @@ +subroutine test_do(stop: uint64): void +{ + i: uint64 = 0 + while (True) { + i: uint64 = i + 1 + #loop₁ᶜ: + if (!i < stop) { + goto #loop₁ᵇ + } + } + #loop₁ᵇ: +} \ No newline at end of file diff --git a/tests/approvals/out/ensure-budget/ensure-budget.awst b/tests/approvals/out/ensure-budget/ensure-budget.awst new file mode 100644 index 00000000..b1282051 --- /dev/null +++ b/tests/approvals/out/ensure-budget/ensure-budget.awst @@ -0,0 +1,30 @@ +contract EnsureBudgetContract +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + ensure_budget(100, 0) + ensure_budget(100, 0) + ensure_budget(100, 1) + ensure_budget(100, 2) + return True + } + + clearProgram(): bool + { + return True + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + +} \ No newline at end of file diff --git a/tests/approvals/out/for-loops/for-loops.awst b/tests/approvals/out/for-loops/for-loops.awst new file mode 100644 index 00000000..d599bf21 --- /dev/null +++ b/tests/approvals/out/for-loops/for-loops.awst @@ -0,0 +1,61 @@ +subroutine test_for_loop(start: uint64, stop: uint64, step: uint64): uint64 +{ + total: uint64 = 0 + i: uint64 = start + while (i < stop) { + total: uint64 = total + i + #loop₁ᶜ: + i: uint64 = i + step + } + #loop₁ᵇ: + return total +} +subroutine test_for_loop_break(start: uint64, stop: uint64, step: uint64): uint64 +{ + total: uint64 = 0 + i: uint64 = start + while (i < stop) { + total: uint64 = total + i + if (total > 10) { + goto #loop₁ᵇ + } + #loop₁ᶜ: + i: uint64 = i + step + } + #loop₁ᵇ: + return total +} +subroutine test_for_loop_continue(start: uint64, stop: uint64, step: uint64): uint64 +{ + total: uint64 = 0 + i: uint64 = start + while (i < stop) { + if (i % 5 == 0) { + goto #loop₁ᶜ + } + total: uint64 = total + i + #loop₁ᶜ: + i: uint64 = i + step + } + #loop₁ᵇ: + return total +} +subroutine test_for_loop_labelled(start: uint64, stop: uint64, step: uint64): uint64 +{ + total: uint64 = 0 + i: uint64 = start + while (i < stop) { + j: uint64 = start + while (j < stop) { + total: uint64 = total + j + j + goto outer₁ᵇ + #loop₁ᶜ: + j: uint64 = j + step + } + #loop₁ᵇ: + outer₁ᶜ: + i: uint64 = i + step + } + outer₁ᵇ: + return total +} \ No newline at end of file diff --git a/tests/approvals/out/for-of-loops/for-of-loops.awst b/tests/approvals/out/for-of-loops/for-of-loops.awst new file mode 100644 index 00000000..8052b4bb --- /dev/null +++ b/tests/approvals/out/for-of-loops/for-of-loops.awst @@ -0,0 +1,10 @@ +subroutine test_for_of_loop(items: readonlytuple[uint64, uint64, uint64]): uint64 +{ + total: uint64 = 0 + for (item in items) { + total: uint64 = total + item + #loop₁ᶜ: + } + #loop₁ᵇ: + return total +} \ No newline at end of file diff --git a/tests/approvals/out/global-state/global-state.awst b/tests/approvals/out/global-state/global-state.awst new file mode 100644 index 00000000..3f3a2038 --- /dev/null +++ b/tests/approvals/out/global-state/global-state.awst @@ -0,0 +1,47 @@ +contract TestContract +{ + globals { + ["baseTestState"]: string + ["noInitial"]: bytes + ["noInitialInt"]: uint64 + ["testState"]: uint64 + ["TESTSTATE"]: uint64 + } + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + assert(STATE_EXISTS(GlobalState["testState"])) + assert(GlobalState["testState"] == 2) + GlobalState["testState"]: uint64 = btoi(txnas(0)) + return True + } + + clearProgram(): bool + { + return True + } + + constructor(): void + { + someValue: uint64 = 72057594037927936 + super.constructor() + GlobalState["testState"]: uint64 = 2 + GlobalState["TESTSTATE"]: uint64 = 5 + assert(GlobalState["baseTestState"] == "testing 123") + GlobalState["noInitialInt"]: uint64 = someValue * GlobalState["testState"] + } + + BaseTestContract::constructor(): void + { + void + GlobalState["baseTestState"]: string = "testing 123" + } + + Contract::constructor(): void + { + this.constructor() + } + +} \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/implicit-create.awst b/tests/approvals/out/implicit-create/implicit-create.awst new file mode 100644 index 00000000..3df60dc5 --- /dev/null +++ b/tests/approvals/out/implicit-create/implicit-create.awst @@ -0,0 +1,222 @@ +contract NoBare +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + handleNoop(): void + { + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + + __algots__.defaultCreate(): void + { + } + +} +contract NoNoOp +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + handleUpdate(): void + { + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + + __algots__.defaultCreate(): void + { + } + +} +contract BaseWithBareCreate +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + create(): void + { + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + +} +contract BaseWithAbiCreate +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + create(): void + { + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + +} +contract ExplicitBareCreateFromBase +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + constructor(): void + { + super.constructor() + } + + BaseWithBareCreate::create(): void + { + } + + BaseWithBareCreate::constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + +} +contract ExplicitAbiCreateFromBase +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + constructor(): void + { + super.constructor() + } + + BaseWithAbiCreate::create(): void + { + } + + BaseWithAbiCreate::constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + +} \ No newline at end of file diff --git a/tests/approvals/out/inheritance-a/inheritance-a.awst b/tests/approvals/out/inheritance-a/inheritance-a.awst new file mode 100644 index 00000000..e69de29b diff --git a/tests/approvals/out/inheritance-b/inheritance-b.awst b/tests/approvals/out/inheritance-b/inheritance-b.awst new file mode 100644 index 00000000..c049896e --- /dev/null +++ b/tests/approvals/out/inheritance-b/inheritance-b.awst @@ -0,0 +1,99 @@ +contract ConcreteSimpleContract +{ + globals { + ["someState"]: uint64 + } + approvalProgram(): uint64 + { + if (!Boolean(txn())) { + this.constructor() + } + a: uint64 = btoi(txnas(0)) + b: uint64 = btoi(txnas(1)) + log(itob(this.simpleMethod(a, b))) + return 1 + } + + clearProgram(): bool + { + return True + } + + constructor(): void + { + super.constructor() + } + + SimpleContract::simpleMethod(): uint64 + { + return a * b + } + + SimpleContract::constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + +} +contract ConcreteArc4Contract +{ + globals { + ["someState"]: uint64 + } + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + getVeryImportantValue(): string + { + return "42" + } + + constructor(): void + { + super.constructor() + } + + Arc4Contract::simpleMethod(): uint64 + { + return a * b + } + + Arc4Contract::simpleAbiMethod(): uint64 + { + return a + b + } + + Arc4Contract::constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + + __algots__.defaultCreate(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/intrinsic-calls/intrinsic-calls.awst b/tests/approvals/out/intrinsic-calls/intrinsic-calls.awst new file mode 100644 index 00000000..c62c019a --- /dev/null +++ b/tests/approvals/out/intrinsic-calls/intrinsic-calls.awst @@ -0,0 +1,7 @@ +subroutine test(a: uint64, b: bytes): void +{ + x: uint64 = setbit(a, 8, 1) + y: bytes = setbit(b, 12, 9) + z: bytes = itob(x) + g: bytes = sha256(z) +} \ No newline at end of file diff --git a/tests/approvals/out/itxn/itxn.awst b/tests/approvals/out/itxn/itxn.awst new file mode 100644 index 00000000..ee7459d8 --- /dev/null +++ b/tests/approvals/out/itxn/itxn.awst @@ -0,0 +1,85 @@ +contract ItxnDemoContract +{ + globals { + ["name"]: bytes + } + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + if (Boolean(txn())) { + switch (txnas(0)) { + case "test1": + #switch₁ᶜ₀: + this.test1() + goto #switch₁ᵇ + case "test2": + #switch₁ᶜ₁: + this.test2() + goto #switch₁ᵇ + case "test3": + #switch₁ᶜ₂: + goto #switch₁ᶜ₃ + case "test4": + #switch₁ᶜ₃: + goto #switch₁ᵇ + } + #switch₁ᵇ: + } + return True + } + + clearProgram(): bool + { + return True + } + + test1(): void + { + GlobalState["name"]: bytes = "AST1" + assetParams: inner_transaction_fields_acfg = create_inner_transaction(Fee=0, ConfigAssetTotal=1000, ConfigAssetName=GlobalState["name"], ConfigAssetUnitName="unit", ConfigAssetDecimals=3, ConfigAssetManager=global(), ConfigAssetReserve=global()) + GlobalState["name"]: bytes = "AST2" + asset1_txn: inner_transaction_acfg = submit_txn(assetParams) + update_inner_transaction(assetParams, ConfigAssetName=GlobalState["name"]) + asset2_txn: inner_transaction_acfg = submit_txn(assetParams) + assert(asset1_txn.ConfigAssetName == "AST1") + assert(asset2_txn.ConfigAssetName == "AST2") + assert(checked_maybe(asset_params_get(asset1_txn.CreatedAssetID), comment=asset exists) == "AST1") + assert(checked_maybe(asset_params_get(asset2_txn.CreatedAssetID), comment=asset exists) == "AST2") + appCreateParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, ApprovalProgram=0x098101, ClearStateProgram=0x098101) + update_inner_transaction(assetParams, ConfigAssetName="AST3") + [appCreateTxn, asset3_txn]: readonlytuple[inner_transaction_appl, inner_transaction_acfg] = submit_txn(appCreateParams, assetParams) + assert(Boolean(appCreateTxn.ApplicationID)) + assert(asset3_txn.ConfigAssetName == "AST3") + update_inner_transaction(appCreateParams, Note="3rd") + update_inner_transaction(assetParams, Note="3rd") + submit_txn(appCreateParams, assetParams) + } + + test2(): void + { + if (Boolean(txn())) { + args: readonlytuple[bytes, bytes] = ["1", "2"] + createAppParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, ApprovalProgram=" ", ClearStateProgram=" ", ApplicationArgs=[args.0, args.1], OnCompletion=0, Note="with args param set") + } else { + createAppParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, ApprovalProgram=" ", ClearStateProgram=" ", ApplicationArgs=["3", "4", "5"], Note="no args param set") + } + createAppTxn: inner_transaction_appl = submit_txn(createAppParams) + assert(createAppTxn.ApplicationArgs[0] == "1") + assert(createAppTxn.ApplicationArgs[1] == "2") + assert(createAppTxn.Note == "with args param set") + } + + constructor(): void + { + void + GlobalState["name"]: bytes = 0x + } + + Contract::constructor(): void + { + this.constructor() + } + +} \ No newline at end of file diff --git a/tests/approvals/out/local-state/local-state.awst b/tests/approvals/out/local-state/local-state.awst new file mode 100644 index 00000000..99a8f94b --- /dev/null +++ b/tests/approvals/out/local-state/local-state.awst @@ -0,0 +1,65 @@ +contract LocalStateDemo +{ + globals { + ["l1"]: uint64 + ["localUint2"]: uint64 + ["b1"]: bytes + ["localBytes2"]: bytes + ["localEncoded"]: arc4.static_array + } + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + setState(): void + { + { a: a, b: b }: { a: uint64, b: bytes } = p + LocalState[txn()]["l1"]: uint64 = a + LocalState[txn()]["localUint2"]: uint64 = a + LocalState[txn()]["b1"]: bytes = b + LocalState[txn()]["localBytes2"]: bytes = b + LocalState[txn()]["localEncoded"]: arc4.static_array = copy(c) + } + + getState(): { localUint: uint64, localUint2: uint64, localBytes: bytes, localBytes2: bytes, localEncoded: arc4.static_array } + { + return { localUint: LocalState[txn()]["l1"], localUint2: LocalState[txn()]["localUint2"], localBytes: LocalState[txn()]["b1"], localBytes2: LocalState[txn()]["localBytes2"], localEncoded: copy(LocalState[txn()]["localEncoded"]) } + } + + clearState(): void + { + STATE_DEL(LocalState[txn()]["l1"]) + STATE_DEL(LocalState[txn()]["localUint2"]) + STATE_DEL(LocalState[txn()]["b1"]) + STATE_DEL(LocalState[txn()]["localBytes2"]) + STATE_DEL(LocalState[txn()]["localEncoded"]) + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + + __algots__.defaultCreate(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/logic-sig/logic-sig.awst b/tests/approvals/out/logic-sig/logic-sig.awst new file mode 100644 index 00000000..fa77ae41 --- /dev/null +++ b/tests/approvals/out/logic-sig/logic-sig.awst @@ -0,0 +1,13 @@ + +logicsig tests/approvals/logic-sig.algo.ts::AlwaysAllow { + return True +} +subroutine feeIsZero(): void +{ + assert(txn() == 0) +} + +logicsig tests/approvals/logic-sig.algo.ts::AllowNoFee { + tests/approvals/logic-sig.algo.ts::feeIsZero() + return 1 +} \ No newline at end of file diff --git a/tests/approvals/out/named-types/named-types.awst b/tests/approvals/out/named-types/named-types.awst new file mode 100644 index 00000000..79566bc7 --- /dev/null +++ b/tests/approvals/out/named-types/named-types.awst @@ -0,0 +1,61 @@ +contract MyContract +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + getXY(): XY{ x: uint64, y: uint64 } + { + return { x: (#9 = { x: 1, y: 2 }).x, y: #9.y } + } + + getYX(): YX{ y: uint64, x: uint64 } + { + return { y: (#10 = { x: 222, y: 111 }).y, x: #10.x } + } + + getAnon(): { x: uint64, y: uint64 } + { + return { x: 3, y: 4 } + } + + test(): void + { + } + + testing(): readonlytuple[XY{ x: uint64, y: uint64 }, YX{ y: uint64, x: uint64 }, { x: uint64, y: uint64 }] + { + a: XY{ x: uint64, y: uint64 } = this.getXY() + b: YX{ y: uint64, x: uint64 } = this.getYX() + c: { x: uint64, y: uint64 } = this.getAnon() + return [a, b, c] + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + + __algots__.defaultCreate(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/non-arc4/non-arc4.awst b/tests/approvals/out/non-arc4/non-arc4.awst new file mode 100644 index 00000000..f5fe9150 --- /dev/null +++ b/tests/approvals/out/non-arc4/non-arc4.awst @@ -0,0 +1,33 @@ +contract HelloWorldContract +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + name: string = reinterpret_cast(txnas(0)) + log(reinterpret_cast("Hello, " + name)) + return True + } + + clearProgram(): bool + { + return True + } + + clearState(): bool + { + return True + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + +} \ No newline at end of file diff --git a/tests/approvals/out/numeric-literal-expressions/numeric-literal-expressions.awst b/tests/approvals/out/numeric-literal-expressions/numeric-literal-expressions.awst new file mode 100644 index 00000000..fbe28620 --- /dev/null +++ b/tests/approvals/out/numeric-literal-expressions/numeric-literal-expressions.awst @@ -0,0 +1,16 @@ +subroutine test_uint64(): bool +{ + x: uint64 = 410 + y: uint64 = 100 // x + z: uint64 = x ** 2 + if (x == 4 or 2 <= y) { + return True + } + return False +} +subroutine test_biguint(): void +{ + x: biguint = 410 + y: biguint = 100 // x + z: biguint = 25 +} \ No newline at end of file diff --git a/tests/approvals/out/object-destructuring/object-destructuring.awst b/tests/approvals/out/object-destructuring/object-destructuring.awst new file mode 100644 index 00000000..f363b04e --- /dev/null +++ b/tests/approvals/out/object-destructuring/object-destructuring.awst @@ -0,0 +1,34 @@ +subroutine testPartialDestructure(arg: { x: uint64, y: uint64, z: uint64 }): void +{ + { x: x, y: _, z: _₁ }: { x: uint64, y: uint64, z: uint64 } = arg + { nested: { y: y, x: _₂, z: _₃ } }: { nested: { y: uint64, x: uint64, z: uint64 } } = { nested: (#2 = { nested: { y: arg.y, x: arg.x, z: arg.z } }).nested } +} +subroutine test(): void +{ + { a: a, b: b, c: c, d: d }: { a: uint64, b: bytes, c: bool, d: biguint } = tests/approvals/object-destructuring.algo.ts::produceItems() + { d: e, a: _, b: _₁, c: _₂ }: { d: biguint, a: uint64, b: bytes, c: bool } = { d: (#3 = tests/approvals/object-destructuring.algo.ts::produceItems()).d, a: #3.a, b: #3.b, c: #3.c } + f: { a: uint64, b: bytes, c: bool, d: biguint } = { a: (#5 = ({ a: g, d: i, b: _₃, c: _₄ } = { a: (#4 = tests/approvals/object-destructuring.algo.ts::produceItems()).a, d: #4.d, b: #4.b, c: #4.c })).a, b: #5.b, c: #5.c, d: #5.d } + tests/approvals/object-destructuring.algo.ts::receivePartial({ a: (#6 = tests/approvals/object-destructuring.algo.ts::produceItems()).a, d: #6.d }) +} +subroutine produceItems(): { a: uint64, b: bytes, c: bool, d: biguint } +{ + return { a: (#7 = { a: 1, b: "", c: False, d: 999 }).a, b: #7.b, c: #7.c, d: #7.d } +} +subroutine receivePartial(x: { a: uint64, d: biguint }): void +{ +} +subroutine testLiteralToLiteral(): void +{ + a: uint64 = 4 + b: uint64 = 1 + { a: e, b: f }: { a: uint64, b: uint64 } = ({ a: c, b: d } = { a: a, b: b }) +} +subroutine testNumericResolution(): void +{ + x: { a: uint64 } = (y = { a: (#8 = { a: 434 }).a }) +} +subroutine test2(args: { x: bool, y: bool, z: readonlytuple[string, string] }): void +{ + { a: a, b: b, args: { x: x, y: y, z: _ } }: { a: bool, b: bool, args: { x: bool, y: bool, z: readonlytuple[string, string] } } = { a: True, b: False, args: args } + args2: { x: bool, y: bool, z: readonlytuple[string, string] } = { x: True, y: True, z: args.z } +} \ No newline at end of file diff --git a/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst b/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst new file mode 100644 index 00000000..66731d8a --- /dev/null +++ b/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst @@ -0,0 +1,11 @@ + +logicsig tests/approvals/pre-approved-sale.algo.ts::PreApprovedSale { + seller: account = TemplateVar[account](TMPL_SELLER) + price: uint64 = TemplateVar[uint64](TMPL_PRICE) + asset: asset = TemplateVar[asset](TMPL_ASSET) + payTxn: group_transaction_pay = reinterpret_cast(0) + assetTxn: group_transaction_axfer = reinterpret_cast(1) + assert(gtxns(payTxn) == seller and gtxns(payTxn) == price) + assert(gtxns(assetTxn) == 1 and gtxns(assetTxn) == seller and gtxns(assetTxn) == asset and gtxns(assetTxn) == global() and gtxns(assetTxn) == global()) + return True +} \ No newline at end of file diff --git a/tests/approvals/out/prefix-postfix-operators/prefix-postfix-operators.awst b/tests/approvals/out/prefix-postfix-operators/prefix-postfix-operators.awst new file mode 100644 index 00000000..294ba19b --- /dev/null +++ b/tests/approvals/out/prefix-postfix-operators/prefix-postfix-operators.awst @@ -0,0 +1,21 @@ +subroutine test_uint64(x: uint64, y: uint64): bool +{ + x++ + x-- + x: uint64 = (y = y - 1) + x: uint64 = (y = y + 1) + y: uint64 = ~y + return !Boolean(y) +} +subroutine test_biguint(x: biguint, y: biguint): bool +{ + x++ + x-- + x: biguint = (y = y - 1) + x: biguint = (y = y + 1) + return !Boolean(bitlen(y)) +} +subroutine test_bytes(x: bytes): void +{ + y: bytes = ~x +} \ No newline at end of file diff --git a/tests/approvals/out/property-ordering/property-ordering.awst b/tests/approvals/out/property-ordering/property-ordering.awst new file mode 100644 index 00000000..cbbc3c74 --- /dev/null +++ b/tests/approvals/out/property-ordering/property-ordering.awst @@ -0,0 +1,36 @@ +subroutine test_assign_from_var(x: { a: uint64, b: uint64 }): void +{ + obj: BthenA{ b: uint64, a: uint64 } = { b: x.b, a: x.a } +} +subroutine test_assign_from_literal(x: uint64): void +{ + obj: { a: uint64, z: uint64 } = { a: (#0 = { z: (b = x * 2), a: b }).a, z: #0.z } +} +contract Demo +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + tests/approvals/property-ordering.algo.ts::test_assign_from_literal(4) + tests/approvals/property-ordering.algo.ts::test_assign_from_var({ a: (#1 = { a: 3, b: 4 }).a, b: #1.b }) + return True + } + + clearProgram(): bool + { + return True + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + +} \ No newline at end of file diff --git a/tests/approvals/out/shadowed-variables/shadowed-variables.awst b/tests/approvals/out/shadowed-variables/shadowed-variables.awst new file mode 100644 index 00000000..31daf2f6 --- /dev/null +++ b/tests/approvals/out/shadowed-variables/shadowed-variables.awst @@ -0,0 +1,42 @@ +contract ShadowedVariablesAlgo +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + [b, u, f]: readonlytuple[bytes, uint64, bool] = this.getValues() + assert("123" == b) + a: uint64 = u + assert(a == 123) + a₁: bool = f + assert(!a₁) + a₁: bool = !a₁ + assert(a₁) + assert(a₁) + assert(a == 123) + assert("123" == "123") + return True + } + + clearProgram(): bool + { + return True + } + + getValues(): readonlytuple[bytes, uint64, bool] + { + return ["123", 123, False] + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + +} \ No newline at end of file diff --git a/tests/approvals/out/switch-statements/switch-statements.awst b/tests/approvals/out/switch-statements/switch-statements.awst new file mode 100644 index 00000000..2150fda3 --- /dev/null +++ b/tests/approvals/out/switch-statements/switch-statements.awst @@ -0,0 +1,56 @@ +subroutine test_uint64(x: uint64): uint64 +{ + switch (x) { + case 1: + #switch₁ᶜ₀: + goto #switch₁ᶜ₁ + case 2: + #switch₁ᶜ₁: + goto #switch₁ᶜ₂ + case 4: + #switch₁ᶜ₂: + return 3 + default: + #switch₁ᶜ₃: + return 1 + } +} +subroutine test_break(x: uint64): uint64 +{ + i: uint64 = 0 + switch (x) { + case 1: + #switch₁ᶜ₀: + goto #switch₁ᶜ₁ + case 2: + #switch₁ᶜ₁: + goto #switch₁ᶜ₂ + case 4: + #switch₁ᶜ₂: + i: uint64 = i + x + goto #switch₁ᵇ + case 5: + #switch₁ᶜ₃: + i: uint64 = i * x + } + #switch₁ᵇ: + return i +} +subroutine test_bytes(x: bytes): bytes +{ + switch (x) { + case "hmmm": + #switch₁ᶜ₀: + goto #switch₁ᶜ₁ + case 0xff: + #switch₁ᶜ₁: + goto #switch₁ᶜ₂ + case b64: + #switch₁ᶜ₂: + goto #switch₁ᶜ₃ + case b32: + #switch₁ᶜ₃: + return x + } + return x +} \ No newline at end of file diff --git a/tests/approvals/out/while-loops/while-loops.awst b/tests/approvals/out/while-loops/while-loops.awst new file mode 100644 index 00000000..d08911cb --- /dev/null +++ b/tests/approvals/out/while-loops/while-loops.awst @@ -0,0 +1,9 @@ +subroutine test_while(stop: uint64): void +{ + i: uint64 = 0 + while (i < stop) { + i: uint64 = i + 1 + #loop₁ᶜ: + } + #loop₁ᵇ: +} \ No newline at end of file From 005551a4321a894a98982b78af9481e0586fcec7 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Sat, 16 Nov 2024 12:23:30 +0800 Subject: [PATCH 05/30] fix: Resolve issue with resolution of algo-ts types from namespace objects --- package.json | 2 +- src/awst_build/ast-visitors/base-visitor.ts | 5 + src/awst_build/eb/namespace-builder.ts | 13 +- tests/approvals/arc4-types.algo.ts | 5 +- .../Arc4TypesTestContract.approval.teal | 64 +++-- .../arc4-types/Arc4TypesTestContract.ssa.ir | 5 + .../approvals/out/arc4-types/arc4-types.awst | 2 + .../out/arc4-types/arc4-types.awst.json | 247 +++++++++++++++++- 8 files changed, 298 insertions(+), 45 deletions(-) diff --git a/package.json b/package.json index fad81463..51593383 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dev:examples": "tsx src/cli.ts build examples --output-awst --output-awst-json", "dev:approvals": "rimraf tests/approvals/out && tsx src/cli.ts build tests/approvals --output-awst --output-awst-json --output-ssa-ir --out-dir out/[name] --optimization-level 0", "dev:expected-output": "tsx src/cli.ts build tests/expected-output --dry-run", - "dev:testing": "tsx src/cli.ts build tests/approvals/arc4-struct.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name]", + "dev:testing": "tsx src/cli.ts build tests/approvals/arc4-types.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name]", "audit": "better-npm-audit audit", "format": "prettier --write .", "lint": "eslint \"src/**/*.ts\"", diff --git a/src/awst_build/ast-visitors/base-visitor.ts b/src/awst_build/ast-visitors/base-visitor.ts index 52250bc2..5e363539 100644 --- a/src/awst_build/ast-visitors/base-visitor.ts +++ b/src/awst_build/ast-visitors/base-visitor.ts @@ -28,6 +28,7 @@ import { BigIntLiteralExpressionBuilder } from '../eb/literal/big-int-literal-ex import { ConditionalExpressionBuilder } from '../eb/literal/conditional-expression-builder' import type { ObjectLiteralParts } from '../eb/literal/object-literal-expression-builder' import { ObjectLiteralExpressionBuilder } from '../eb/literal/object-literal-expression-builder' +import { NamespaceBuilder } from '../eb/namespace-builder' import { OmittedExpressionBuilder } from '../eb/omitted-expression-builder' import { StringExpressionBuilder, StringFunctionBuilder } from '../eb/string-expression-builder' import { requireExpressionOfType, requireInstanceBuilder } from '../eb/util' @@ -192,6 +193,10 @@ export abstract class BaseVisitor implements Visitor { visitPropertyAccessExpression(node: ts.PropertyAccessExpression): NodeBuilder { this.logNotSupported(node.questionDotToken, 'The optional chaining (?.) operator is not supported') const target = this.baseAccept(node.expression) + if (target instanceof NamespaceBuilder) { + codeInvariant(!ts.isPrivateIdentifier(node.name), 'Private identifiers are not supported here', this.sourceLocation(node.name)) + return this.context.getBuilderForNode(node.name) + } const property = this.textVisitor.accept(node.name) return target.memberAccess(property, this.sourceLocation(node)) } diff --git a/src/awst_build/eb/namespace-builder.ts b/src/awst_build/eb/namespace-builder.ts index 4e7c6916..673e7e28 100644 --- a/src/awst_build/eb/namespace-builder.ts +++ b/src/awst_build/eb/namespace-builder.ts @@ -1,9 +1,7 @@ import type { SourceLocation } from '../../awst/source-location' -import { codeInvariant, invariant } from '../../util' +import { invariant } from '../../util' import type { PType } from '../ptypes' import { NamespacePType } from '../ptypes' -import { SymbolName } from '../symbol-name' -import { typeRegistry } from '../type-registry' import { NodeBuilder } from './index' export class NamespaceBuilder extends NodeBuilder { @@ -17,13 +15,4 @@ export class NamespaceBuilder extends NodeBuilder { get ptype(): PType { return this._ptype } - - memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder { - const symbolName = new SymbolName({ module: this._ptype.module, name }) - - const type = typeRegistry.tryResolveSingletonName(symbolName) - codeInvariant(type, `${name} does not exist in namespace ${this._ptype}`) - - return typeRegistry.getSingletonEb(type, sourceLocation) - } } diff --git a/tests/approvals/arc4-types.algo.ts b/tests/approvals/arc4-types.algo.ts index 38a2fd4b..271b66ad 100644 --- a/tests/approvals/arc4-types.algo.ts +++ b/tests/approvals/arc4-types.algo.ts @@ -1,5 +1,5 @@ import type { biguint, uint64 } from '@algorandfoundation/algorand-typescript' -import { assert, BaseContract, Bytes, Txn } from '@algorandfoundation/algorand-typescript' +import { arc4, assert, BaseContract, Bytes, Txn } from '@algorandfoundation/algorand-typescript' import { Address, Byte, DynamicArray, StaticArray, Str, Tuple, UFixedNxM, UintN } from '@algorandfoundation/algorand-typescript/arc4' function testUFixed() { @@ -88,6 +88,9 @@ export class Arc4TypesTestContract extends BaseContract { testArrays(new UintN<64>(65)) testAddress() testTuple() + + const result = new arc4.DynamicArray>() + assert(result.length === 0) return true } } diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal b/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal index f046c3ea..1d0b0c59 100644 --- a/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal @@ -1,8 +1,8 @@ #pragma version 10 tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.approvalProgram: - intcblock 1 8 0 2 - bytecblock 0x base32(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) 0x0000 0x00 + intcblock 0 1 8 2 + bytecblock 0x 0x0000 base32(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) 0x00 txn ApplicationID bnz main_after_if_else@2 callsub constructor @@ -13,7 +13,7 @@ main_after_if_else@2: callsub testStr // tests/approvals/arc4-types.algo.ts:86 // test(1, 2n, new UintN<256>(4)) - intc_0 // 1 + intc_1 // 1 pushbytes 0x02 pushbytes 0x0000000000000000000000000000000000000000000000000000000000000004 callsub test @@ -30,9 +30,21 @@ main_after_if_else@2: // tests/approvals/arc4-types.algo.ts:90 // testTuple() callsub testTuple - // tests/approvals/arc4-types.algo.ts:91 + // tests/approvals/arc4-types.algo.ts:92 + // const result = new arc4.DynamicArray>() + bytec_1 // 0x0000 + bytec_0 // 0x + concat + // tests/approvals/arc4-types.algo.ts:93 + // assert(result.length === 0) + intc_0 // 0 + extract_uint16 + intc_0 // 0 + == + assert + // tests/approvals/arc4-types.algo.ts:94 // return true - intc_0 // 1 + intc_1 // 1 return @@ -51,7 +63,7 @@ testStr: proto 0 0 // tests/approvals/arc4-types.algo.ts:31 // const s1 = new Str() - bytec_2 // 0x0000 + bytec_1 // 0x0000 // tests/approvals/arc4-types.algo.ts:32 // assert(s1.bytes === new UintN<16>(0).bytes, 'Empty string should equal the uint16 length prefix') dup @@ -80,7 +92,7 @@ test: // tests/approvals/arc4-types.algo.ts:14 // assert(x.bytes.length === 1) len - intc_0 // 1 + intc_1 // 1 == assert // tests/approvals/arc4-types.algo.ts:15 @@ -93,7 +105,7 @@ test: assert // tests/approvals/arc4-types.algo.ts:18 // const y = new UintN<16>() - bytec_2 // 0x0000 + bytec_1 // 0x0000 // tests/approvals/arc4-types.algo.ts:19 // assert(y.bytes.length === 2) len @@ -183,7 +195,7 @@ testArrays: concat dup len - intc_1 // 8 + intc_2 // 8 / itob extract 6 2 @@ -201,13 +213,13 @@ testArrays: concat // tests/approvals/arc4-types.algo.ts:47 // assert(myStatic[0].equals(myArray.pop())) - intc_2 // 0 - intc_1 // 8 + intc_0 // 0 + intc_2 // 8 * - intc_1 // 8 + intc_2 // 8 extract3 // on error: Index access is out of bounds swap - intc_1 // 8 + intc_2 // 8 callsub dynamic_array_pop_fixed_size pop == @@ -225,7 +237,7 @@ testAddress: txn Sender // tests/approvals/arc4-types.algo.ts:61 // const a = new Address() - bytec_1 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ + bytec_2 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ // tests/approvals/arc4-types.algo.ts:64 // assert(!a.equals(b), 'Zero address should not match sender') == @@ -233,7 +245,7 @@ testAddress: assert // Zero address should not match sender // tests/approvals/arc4-types.algo.ts:61 // const a = new Address() - bytec_1 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ + bytec_2 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ // tests/approvals/arc4-types.algo.ts:65 // assert(a.equals(new Address()), 'Two zero addresses should match') dup @@ -241,16 +253,16 @@ testAddress: assert // Two zero addresses should match // tests/approvals/arc4-types.algo.ts:66 // assert(a[0].equals(new Byte()), 'Zero address should start with zero byte') - intc_2 // 0 - intc_0 // 1 + intc_0 // 0 + intc_1 // 1 * // tests/approvals/arc4-types.algo.ts:61 // const a = new Address() - bytec_1 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ + bytec_2 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ // tests/approvals/arc4-types.algo.ts:66 // assert(a[0].equals(new Byte()), 'Zero address should start with zero byte') swap - intc_0 // 1 + intc_1 // 1 extract3 // on error: Index access is out of bounds bytec_3 // 0x00 == @@ -271,14 +283,14 @@ testTuple: // tests/approvals/arc4-types.algo.ts:71 // const firstItem = t.at(0) dup - intc_2 // 0 - intc_1 // 8 + intc_0 // 0 + intc_2 // 8 extract3 // on error: Index access is out of bounds swap // tests/approvals/arc4-types.algo.ts:72 // const firstItemIndexer = t.native[0] - intc_2 // 0 - intc_1 // 8 + intc_0 // 0 + intc_2 // 8 extract3 // on error: Index access is out of bounds // tests/approvals/arc4-types.algo.ts:73 // assert(firstItem.equals(firstItemIndexer)) @@ -297,9 +309,9 @@ testTuple: dynamic_array_pop_fixed_size: proto 2 2 frame_dig -2 - intc_2 // 0 + intc_0 // 0 extract_uint16 - intc_0 // 1 + intc_1 // 1 - itob extract 6 0 @@ -315,7 +327,7 @@ dynamic_array_pop_fixed_size: extract3 cover 2 swap - intc_2 // 0 + intc_0 // 0 uncover 2 substring3 retsub diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir b/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir index 5d418ba4..4e0dd369 100644 --- a/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir @@ -15,6 +15,11 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: tests/approvals/arc4-types.algo.ts::testArrays(0x0000000000000041) tests/approvals/arc4-types.algo.ts::testAddress() tests/approvals/arc4-types.algo.ts::testTuple() + let array_data%0#0: bytes = (concat 0x0000 0x) + let result#0: bytes = array_data%0#0 + let tmp%0#0: uint64 = (extract_uint16 result#0 0u) + let tmp%1#0: bool = (== tmp%0#0 0u) + (assert tmp%1#0) return 1u subroutine tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.constructor() -> void: diff --git a/tests/approvals/out/arc4-types/arc4-types.awst b/tests/approvals/out/arc4-types/arc4-types.awst index dfe0b36a..754d4f2e 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst +++ b/tests/approvals/out/arc4-types/arc4-types.awst @@ -72,6 +72,8 @@ contract Arc4TypesTestContract tests/approvals/arc4-types.algo.ts::testArrays(65) tests/approvals/arc4-types.algo.ts::testAddress() tests/approvals/arc4-types.algo.ts::testTuple() + result: arc4.dynamic_array = new arc4.dynamic_array() + assert(extract_uint16(result, 0) == 0) return True } diff --git a/tests/approvals/out/arc4-types/arc4-types.awst.json b/tests/approvals/out/arc4-types/arc4-types.awst.json index c99107f9..a6ac2bab 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst.json +++ b/tests/approvals/out/arc4-types/arc4-types.awst.json @@ -5263,7 +5263,7 @@ "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 83, - "end_line": 92, + "end_line": 95, "column": 36, "end_column": 3 }, @@ -5637,12 +5637,249 @@ "args": [] } }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 92, + "end_line": 92, + "column": 10, + "end_column": 58 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 92, + "end_line": 92, + "column": 10, + "end_column": 16 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null + }, + "name": "result" + }, + "value": { + "_type": "NewArray", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 92, + "end_line": 92, + "column": 19, + "end_column": 58 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 92, + "end_line": 92, + "column": 19, + "end_column": 58 + } + }, + "values": [] + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 93, + "end_line": 93, + "column": 4, + "end_column": 31 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 93, + "end_line": 93, + "column": 4, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "op_code": "assert", + "immediates": [], + "stack_args": [ + { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 93, + "end_line": 93, + "column": 11, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 93, + "end_line": 93, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "extract_uint16", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 93, + "end_line": 93, + "column": 11, + "end_column": 17 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null + }, + "name": "result" + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 93, + "end_line": 93, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + } + ], + "comment": null + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 93, + "end_line": 93, + "column": 29, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + } + } + ], + "comment": null + } + }, { "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 91, - "end_line": 91, + "line": 94, + "end_line": 94, "column": 4, "end_column": 15 }, @@ -5650,8 +5887,8 @@ "_type": "BoolConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 91, - "end_line": 91, + "line": 94, + "end_line": 94, "column": 11, "end_column": 15 }, From df9a59b2e3ddd3f3b83f0b9f3ab6c0e17b53f14e Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Tue, 19 Nov 2024 17:42:37 +1000 Subject: [PATCH 06/30] fix: Expand supported args for uint64 constructor --- package-lock.json | 2 +- package.json | 2 +- packages/algo-ts/package.json | 2 +- packages/algo-ts/src/primitives.ts | 15 +- .../big-int-literal-expression-builder.ts | 5 +- src/awst_build/eb/tuple-expression-builder.ts | 16 +- .../eb/uint64-expression-builder.ts | 15 +- src/awst_build/eb/util/string-to-bigint.ts | 13 + tests/approvals/biguint-expressions.algo.ts | 10 +- .../approvals/out/arc4-types/arc4-types.awst | 2 +- .../out/arc4-types/arc4-types.awst.json | 6 +- .../DemoContract.approval.teal | 36 + .../DemoContract.clear.teal | 5 + .../biguint-expressions.awst | 27 + .../biguint-expressions.awst.json | 765 +++++++++++++++--- .../boolean-conversions.awst.json | 16 +- .../byte-expressions.awst.json | 4 +- .../DemoContract.approval.teal | 20 + .../DemoContract.clear.teal | 5 + .../uint64-expressions/DemoContract.ssa.ir | 20 + .../uint64-expressions.awst | 30 + .../uint64-expressions.awst.json | 691 ++++++++++++++++ tests/approvals/uint64-expressions.algo.ts | 12 + .../biguint-expressions.algo.ts | 6 +- .../uint64-expressions.algo.ts | 21 + tests/onchain/primitives.spec.ts | 9 + 26 files changed, 1629 insertions(+), 126 deletions(-) create mode 100644 src/awst_build/eb/util/string-to-bigint.ts create mode 100644 tests/approvals/out/biguint-expressions/DemoContract.approval.teal create mode 100644 tests/approvals/out/biguint-expressions/DemoContract.clear.teal create mode 100644 tests/approvals/out/uint64-expressions/DemoContract.approval.teal create mode 100644 tests/approvals/out/uint64-expressions/DemoContract.clear.teal create mode 100644 tests/approvals/out/uint64-expressions/DemoContract.ssa.ir create mode 100644 tests/approvals/out/uint64-expressions/uint64-expressions.awst create mode 100644 tests/approvals/out/uint64-expressions/uint64-expressions.awst.json create mode 100644 tests/approvals/uint64-expressions.algo.ts create mode 100644 tests/expected-output/uint64-expressions.algo.ts create mode 100644 tests/onchain/primitives.spec.ts diff --git a/package-lock.json b/package-lock.json index 1896e9c9..3faf577a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13152,7 +13152,7 @@ }, "packages/algo-ts/dist": { "name": "@algorandfoundation/algorand-typescript", - "version": "0.0.1-alpha.16", + "version": "0.0.1-alpha.17", "dev": true, "peerDependencies": { "tslib": "^2.6.2" diff --git a/package.json b/package.json index 51593383..1035fd43 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dev:examples": "tsx src/cli.ts build examples --output-awst --output-awst-json", "dev:approvals": "rimraf tests/approvals/out && tsx src/cli.ts build tests/approvals --output-awst --output-awst-json --output-ssa-ir --out-dir out/[name] --optimization-level 0", "dev:expected-output": "tsx src/cli.ts build tests/expected-output --dry-run", - "dev:testing": "tsx src/cli.ts build tests/approvals/arc4-types.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name]", + "dev:testing": "tsx src/cli.ts build tests/expected-output/uint64-expressions.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name]", "audit": "better-npm-audit audit", "format": "prettier --write .", "lint": "eslint \"src/**/*.ts\"", diff --git a/packages/algo-ts/package.json b/packages/algo-ts/package.json index e6b099b8..232fd38c 100644 --- a/packages/algo-ts/package.json +++ b/packages/algo-ts/package.json @@ -1,6 +1,6 @@ { "name": "@algorandfoundation/algorand-typescript", - "version": "0.0.1-alpha.16", + "version": "0.0.1-alpha.17", "description": "This package contains definitions for the types which comprise Algorand TypeScript which can be compiled to run on the Algorand Virtual Machine using the Puya compiler.", "private": false, "main": "index.js", diff --git a/packages/algo-ts/src/primitives.ts b/packages/algo-ts/src/primitives.ts index 56feee0f..c667ea19 100644 --- a/packages/algo-ts/src/primitives.ts +++ b/packages/algo-ts/src/primitives.ts @@ -13,6 +13,14 @@ export type uint64 = { __type?: 'uint64' } & number +/** + * Create a uint64 with the default value of 0 + */ +export function Uint64(): uint64 +/** + * Create a uint64 from a string literal + */ +export function Uint64(v: string): uint64 /** * Create a uint64 from a bigint literal */ @@ -25,8 +33,11 @@ export function Uint64(v: number): uint64 * Create a uint64 from a boolean value. True is 1, False is 0 */ export function Uint64(v: boolean): uint64 -export function Uint64(v: Uint64Compat): uint64 { - return Uint64Cls.fromCompat(v).asAlgoTs() +export function Uint64(v?: Uint64Compat | string): uint64 { + if (typeof v === 'string') { + v = BigInt(v) + } + return Uint64Cls.fromCompat(v ?? 0).asAlgoTs() } /** diff --git a/src/awst_build/eb/literal/big-int-literal-expression-builder.ts b/src/awst_build/eb/literal/big-int-literal-expression-builder.ts index cd2f4417..c6d35362 100644 --- a/src/awst_build/eb/literal/big-int-literal-expression-builder.ts +++ b/src/awst_build/eb/literal/big-int-literal-expression-builder.ts @@ -35,11 +35,10 @@ export class BigIntLiteralExpressionBuilder extends LiteralExpressionBuilder { } resolvableToPType(ptype: PTypeOrClass): boolean { - if (!isValidLiteralForPType(this.value, ptype)) return false if (this.ptype instanceof NumericLiteralPType || this.ptype.equals(numberPType)) { - return ptype.equals(uint64PType) || ptype.equals(numberPType) || ptype.equals(this.ptype) + return ptype.equals(biguintPType) || ptype.equals(uint64PType) || ptype.equals(numberPType) || ptype.equals(this.ptype) } else if (this.ptype instanceof BigIntLiteralPType || this.ptype.equals(bigIntPType)) { - return ptype.equals(biguintPType) || ptype.equals(bigIntPType) || ptype.equals(this.ptype) + return ptype.equals(biguintPType) || ptype.equals(uint64PType) || ptype.equals(bigIntPType) || ptype.equals(this.ptype) } return false } diff --git a/src/awst_build/eb/tuple-expression-builder.ts b/src/awst_build/eb/tuple-expression-builder.ts index 25a5cd00..d21c9345 100644 --- a/src/awst_build/eb/tuple-expression-builder.ts +++ b/src/awst_build/eb/tuple-expression-builder.ts @@ -3,7 +3,7 @@ import type { Expression } from '../../awst/nodes' import type { SourceLocation } from '../../awst/source-location' import { codeInvariant, invariant } from '../../util' import type { PType } from '../ptypes' -import { TuplePType } from '../ptypes' +import { TuplePType, uint64PType } from '../ptypes' import { instanceEb } from '../type-registry' import type { InstanceBuilder, NodeBuilder } from './index' import { InstanceExpressionBuilder } from './index' @@ -19,6 +19,20 @@ export class TupleExpressionBuilder extends InstanceExpressionBuilder [a.optional(uint64PType, boolPType)], + argSpec: (a) => [a.optional(uint64PType, boolPType, stringPType)], }) if (!value) { @@ -57,6 +58,14 @@ export class UInt64FunctionBuilder extends FunctionBuilder { }), ) } + } else if (value.ptype.equals(stringPType)) { + const valueStr = requireStringConstant(value) + return new UInt64ExpressionBuilder( + nodeFactory.uInt64Constant({ + value: stringToBigint(valueStr), + sourceLocation, + }), + ) } return value } diff --git a/src/awst_build/eb/util/string-to-bigint.ts b/src/awst_build/eb/util/string-to-bigint.ts new file mode 100644 index 00000000..2168467a --- /dev/null +++ b/src/awst_build/eb/util/string-to-bigint.ts @@ -0,0 +1,13 @@ +import type { SourceLocation } from '../../../awst/source-location' +import { CodeError } from '../../../errors' + +export function stringToBigint({ value, sourceLocation }: { value: string; sourceLocation: SourceLocation }): bigint { + try { + return BigInt(value) + } catch (e) { + if (e instanceof SyntaxError) { + throw new CodeError(`Cannot convert ${value} to an integer`, { sourceLocation }) + } + throw e + } +} diff --git a/tests/approvals/biguint-expressions.algo.ts b/tests/approvals/biguint-expressions.algo.ts index bc0b8bbf..338c8ae5 100644 --- a/tests/approvals/biguint-expressions.algo.ts +++ b/tests/approvals/biguint-expressions.algo.ts @@ -1,5 +1,6 @@ import type { bytes, uint64 } from '@algorandfoundation/algorand-typescript' -import { BigUint } from '@algorandfoundation/algorand-typescript' +import { BaseContract, BigUint } from '@algorandfoundation/algorand-typescript' +import { itob } from '@algorandfoundation/algorand-typescript/op' function test(a: uint64, b: boolean, c: bytes) { BigUint() @@ -16,3 +17,10 @@ function test(a: uint64, b: boolean, c: bytes) { BigUint(b) BigUint(c) } + +class DemoContract extends BaseContract { + public approvalProgram() { + test(1, false, itob(4)) + return true + } +} diff --git a/tests/approvals/out/arc4-types/arc4-types.awst b/tests/approvals/out/arc4-types/arc4-types.awst index 754d4f2e..87be6310 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst +++ b/tests/approvals/out/arc4-types/arc4-types.awst @@ -8,7 +8,7 @@ subroutine test(n: uint64, b: biguint, c: arc4.uint256): void { x: arc4.uint8 = 4 assert(len(reinterpret_cast(x)) == 1) - x2: arc4.uint8 = 0xff + x2: arc4.uint8 = 255 assert(reinterpret_cast(x2) == 0xff) y: arc4.uint16 = 0 assert(len(reinterpret_cast(y)) == 2) diff --git a/tests/approvals/out/arc4-types/arc4-types.awst.json b/tests/approvals/out/arc4-types/arc4-types.awst.json index a6ac2bab..8ee1e277 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst.json +++ b/tests/approvals/out/arc4-types/arc4-types.awst.json @@ -639,7 +639,7 @@ "name": "x2" }, "value": { - "_type": "BytesConstant", + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 15, @@ -663,8 +663,8 @@ "arc4_name": "uint8", "n": "8" }, - "value": "{{", - "encoding": "unknown" + "value": "255", + "teal_alias": null } }, { diff --git a/tests/approvals/out/biguint-expressions/DemoContract.approval.teal b/tests/approvals/out/biguint-expressions/DemoContract.approval.teal new file mode 100644 index 00000000..b6d7aa22 --- /dev/null +++ b/tests/approvals/out/biguint-expressions/DemoContract.approval.teal @@ -0,0 +1,36 @@ +#pragma version 10 + +tests/approvals/biguint-expressions.algo.ts::DemoContract.approvalProgram: + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/biguint-expressions.algo.ts:23 + // test(1, false, itob(4)) + pushint 4 // 4 + itob + pushint 1 // 1 + pushint 0 // 0 + uncover 2 + callsub test + // tests/approvals/biguint-expressions.algo.ts:24 + // return true + pushint 1 // 1 + return + + +// tests/approvals/biguint-expressions.algo.ts::DemoContract.constructor() -> void: +constructor: + // tests/approvals/biguint-expressions.algo.ts:21 + // class DemoContract extends BaseContract { + proto 0 0 + retsub + + +// tests/approvals/biguint-expressions.algo.ts::test(a: uint64, b: uint64, c: bytes) -> void: +test: + // tests/approvals/biguint-expressions.algo.ts:5 + // function test(a: uint64, b: boolean, c: bytes) { + proto 3 0 + retsub diff --git a/tests/approvals/out/biguint-expressions/DemoContract.clear.teal b/tests/approvals/out/biguint-expressions/DemoContract.clear.teal new file mode 100644 index 00000000..02d4c3c7 --- /dev/null +++ b/tests/approvals/out/biguint-expressions/DemoContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/biguint-expressions.algo.ts::DemoContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/biguint-expressions/biguint-expressions.awst b/tests/approvals/out/biguint-expressions/biguint-expressions.awst index fae2298c..f5ed4dbe 100644 --- a/tests/approvals/out/biguint-expressions/biguint-expressions.awst +++ b/tests/approvals/out/biguint-expressions/biguint-expressions.awst @@ -13,4 +13,31 @@ subroutine test(a: uint64, b: bool, c: bytes): void reinterpret_cast(itob(a * a)) reinterpret_cast(itob(b)) reinterpret_cast(c) +} +contract DemoContract +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + tests/approvals/biguint-expressions.algo.ts::test(1, False, itob(4)) + return True + } + + clearProgram(): bool + { + return True + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + } \ No newline at end of file diff --git a/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json b/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json index 3f5b05a6..2cbe3255 100644 --- a/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json +++ b/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json @@ -3,8 +3,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 4, - "end_line": 4, + "line": 5, + "end_line": 5, "column": 0, "end_column": 46 }, @@ -21,8 +21,8 @@ }, "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 4, - "end_line": 4, + "line": 5, + "end_line": 5, "column": 14, "end_column": 23 } @@ -39,8 +39,8 @@ }, "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 4, - "end_line": 4, + "line": 5, + "end_line": 5, "column": 25, "end_column": 35 } @@ -57,8 +57,8 @@ }, "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 4, - "end_line": 4, + "line": 5, + "end_line": 5, "column": 37, "end_column": 45 } @@ -75,8 +75,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 4, - "end_line": 18, + "line": 5, + "end_line": 19, "column": 47, "end_column": 1 }, @@ -85,8 +85,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 5, - "end_line": 5, + "line": 6, + "end_line": 6, "column": 2, "end_column": 11 }, @@ -94,8 +94,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 5, - "end_line": 5, + "line": 6, + "end_line": 6, "column": 2, "end_column": 11 }, @@ -114,8 +114,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 6, - "end_line": 6, + "line": 7, + "end_line": 7, "column": 2, "end_column": 15 }, @@ -123,8 +123,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 6, - "end_line": 6, + "line": 7, + "end_line": 7, "column": 2, "end_column": 15 }, @@ -139,8 +139,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 6, - "end_line": 6, + "line": 7, + "end_line": 7, "column": 2, "end_column": 15 }, @@ -158,8 +158,8 @@ "_type": "BoolConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 6, - "end_line": 6, + "line": 7, + "end_line": 7, "column": 10, "end_column": 14 }, @@ -181,8 +181,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 2, "end_column": 16 }, @@ -190,8 +190,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 2, "end_column": 16 }, @@ -206,8 +206,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 2, "end_column": 16 }, @@ -225,8 +225,8 @@ "_type": "BoolConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 10, "end_column": 15 }, @@ -248,19 +248,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 8, - "end_line": 8, - "column": 2, - "end_column": 12 + "line": 9, + "end_line": 9, + "column": 10, + "end_column": 11 }, "expr": { "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 8, - "end_line": 8, - "column": 2, - "end_column": 12 + "line": 9, + "end_line": 9, + "column": 10, + "end_column": 11 }, "wtype": { "_type": "WType", @@ -277,19 +277,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 9, - "end_line": 9, - "column": 2, - "end_column": 12 + "line": 10, + "end_line": 10, + "column": 10, + "end_column": 11 }, "expr": { "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 9, - "end_line": 9, - "column": 2, - "end_column": 12 + "line": 10, + "end_line": 10, + "column": 10, + "end_column": 11 }, "wtype": { "_type": "WType", @@ -306,8 +306,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 10, "end_column": 12 }, @@ -315,8 +315,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 10, "end_column": 12 }, @@ -335,8 +335,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 10, "end_column": 12 }, @@ -344,8 +344,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 10, "end_column": 12 }, @@ -364,8 +364,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 10, "end_column": 25 }, @@ -373,8 +373,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 10, "end_column": 25 }, @@ -393,8 +393,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 2, "end_column": 29 }, @@ -402,8 +402,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 2, "end_column": 29 }, @@ -422,8 +422,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 2, "end_column": 12 }, @@ -431,8 +431,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 2, "end_column": 12 }, @@ -447,8 +447,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 2, "end_column": 12 }, @@ -466,8 +466,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 10, "end_column": 11 }, @@ -489,8 +489,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 2, "end_column": 16 }, @@ -498,8 +498,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 2, "end_column": 16 }, @@ -514,8 +514,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 2, "end_column": 16 }, @@ -533,8 +533,8 @@ "_type": "UInt64BinaryOperation", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 10, "end_column": 15 }, @@ -549,8 +549,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 10, "end_column": 11 }, @@ -568,8 +568,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 14, "end_column": 15 }, @@ -592,8 +592,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 2, "end_column": 12 }, @@ -601,8 +601,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 2, "end_column": 12 }, @@ -617,8 +617,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 2, "end_column": 12 }, @@ -636,8 +636,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 10, "end_column": 11 }, @@ -659,8 +659,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 2, "end_column": 12 }, @@ -668,8 +668,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 2, "end_column": 12 }, @@ -684,8 +684,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 10, "end_column": 11 }, @@ -712,5 +712,578 @@ }, "id": "tests/approvals/biguint-expressions.algo.ts::test", "name": "test" + }, + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 21, + "end_line": 21, + "column": 0, + "end_column": 41 + }, + "id": "tests/approvals/biguint-expressions.algo.ts::DemoContract", + "name": "DemoContract", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 22, + "end_line": 22, + "column": 2, + "end_column": 26 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [], + "comment": null + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 22, + "end_line": 25, + "column": 27, + "end_column": 3 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 23, + "end_line": 23, + "column": 4, + "end_column": 27 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 23, + "end_line": 23, + "column": 4, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/biguint-expressions.algo.ts::test" + }, + "args": [ + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 23, + "end_line": 23, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null + } + }, + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "BoolConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 23, + "end_line": 23, + "column": 12, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": false + } + }, + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 23, + "end_line": 23, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "itob", + "immediates": [], + "stack_args": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 23, + "end_line": 23, + "column": 24, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "4", + "teal_alias": null + } + ], + "comment": null + } + } + ] + } + }, + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 24, + "end_line": 24, + "column": 4, + "end_column": 15 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 24, + "end_line": 24, + "column": 11, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/biguint-expressions.algo.ts::DemoContract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 21, + "end_line": 21, + "column": 0, + "end_column": 41 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 21, + "end_line": 21, + "column": 0, + "end_column": 41 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 21, + "end_line": 21, + "column": 0, + "end_column": 41 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 21, + "end_line": 21, + "column": 0, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/biguint-expressions.algo.ts::DemoContract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/boolean-conversions/boolean-conversions.awst.json b/tests/approvals/out/boolean-conversions/boolean-conversions.awst.json index 49589682..a1a11dcb 100644 --- a/tests/approvals/out/boolean-conversions/boolean-conversions.awst.json +++ b/tests/approvals/out/boolean-conversions/boolean-conversions.awst.json @@ -455,8 +455,8 @@ "file": "tests/approvals/boolean-conversions.algo.ts", "line": 9, "end_line": 9, - "column": 10, - "end_column": 20 + "column": 18, + "end_column": 19 }, "wtype": { "_type": "WType", @@ -546,8 +546,8 @@ "file": "tests/approvals/boolean-conversions.algo.ts", "line": 10, "end_line": 10, - "column": 9, - "end_column": 19 + "column": 17, + "end_column": 18 }, "wtype": { "_type": "WType", @@ -1623,8 +1623,8 @@ "file": "tests/approvals/boolean-conversions.algo.ts", "line": 24, "end_line": 24, - "column": 17, - "end_column": 27 + "column": 25, + "end_column": 26 }, "wtype": { "_type": "WType", @@ -1716,8 +1716,8 @@ "file": "tests/approvals/boolean-conversions.algo.ts", "line": 24, "end_line": 24, - "column": 41, - "end_column": 51 + "column": 49, + "end_column": 50 }, "wtype": { "_type": "WType", diff --git a/tests/approvals/out/byte-expressions/byte-expressions.awst.json b/tests/approvals/out/byte-expressions/byte-expressions.awst.json index 4ca2f978..0f1cbb00 100644 --- a/tests/approvals/out/byte-expressions/byte-expressions.awst.json +++ b/tests/approvals/out/byte-expressions/byte-expressions.awst.json @@ -475,8 +475,8 @@ "file": "tests/approvals/byte-expressions.algo.ts", "line": 8, "end_line": 8, - "column": 15, - "end_column": 27 + "column": 23, + "end_column": 26 }, "wtype": { "_type": "WType", diff --git a/tests/approvals/out/uint64-expressions/DemoContract.approval.teal b/tests/approvals/out/uint64-expressions/DemoContract.approval.teal new file mode 100644 index 00000000..71d1f11f --- /dev/null +++ b/tests/approvals/out/uint64-expressions/DemoContract.approval.teal @@ -0,0 +1,20 @@ +#pragma version 10 + +tests/approvals/uint64-expressions.algo.ts::DemoContract.approvalProgram: + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/uint64-expressions.algo.ts:10 + // return test().length + pushint 5 // 5 + return + + +// tests/approvals/uint64-expressions.algo.ts::DemoContract.constructor() -> void: +constructor: + // tests/approvals/uint64-expressions.algo.ts:8 + // class DemoContract extends BaseContract { + proto 0 0 + retsub diff --git a/tests/approvals/out/uint64-expressions/DemoContract.clear.teal b/tests/approvals/out/uint64-expressions/DemoContract.clear.teal new file mode 100644 index 00000000..aab32d34 --- /dev/null +++ b/tests/approvals/out/uint64-expressions/DemoContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/uint64-expressions.algo.ts::DemoContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/uint64-expressions/DemoContract.ssa.ir b/tests/approvals/out/uint64-expressions/DemoContract.ssa.ir new file mode 100644 index 00000000..e10338e8 --- /dev/null +++ b/tests/approvals/out/uint64-expressions/DemoContract.ssa.ir @@ -0,0 +1,20 @@ +contract tests/approvals/uint64-expressions.algo.ts::DemoContract: + program approval: + subroutine tests/approvals/uint64-expressions.algo.ts::DemoContract.approvalProgram() -> uint64: + block@0: // L9 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/uint64-expressions.algo.ts::DemoContract.constructor() + goto block@2 + block@2: // after_if_else_L1 + return 5u + + subroutine tests/approvals/uint64-expressions.algo.ts::DemoContract.constructor() -> void: + block@0: // L8 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/uint64-expressions/uint64-expressions.awst b/tests/approvals/out/uint64-expressions/uint64-expressions.awst new file mode 100644 index 00000000..bd50f7d7 --- /dev/null +++ b/tests/approvals/out/uint64-expressions/uint64-expressions.awst @@ -0,0 +1,30 @@ +subroutine test(): readonlytuple[uint64, uint64, uint64, uint64, uint64] +{ + return [0, 0, 1, 1, 1] +} +contract DemoContract +{ + approvalProgram(): uint64 + { + if (!Boolean(txn())) { + this.constructor() + } + return 5 + } + + clearProgram(): bool + { + return True + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + +} \ No newline at end of file diff --git a/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json b/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json new file mode 100644 index 00000000..a4a7c6b1 --- /dev/null +++ b/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json @@ -0,0 +1,691 @@ +[ + { + "_type": "Subroutine", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 4, + "end_line": 4, + "column": 0, + "end_column": 15 + }, + "args": [], + "return_type": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 4, + "end_line": 6, + "column": 16, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 2, + "end_column": 78 + }, + "value": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 9, + "end_column": 69 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "items": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 27, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 31, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 51, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 56, + "end_column": 68 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "id": "tests/approvals/uint64-expressions.algo.ts::test", + "name": "test" + }, + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 8, + "end_line": 8, + "column": 0, + "end_column": 41 + }, + "id": "tests/approvals/uint64-expressions.algo.ts::DemoContract", + "name": "DemoContract", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 9, + "end_line": 9, + "column": 2, + "end_column": 34 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [], + "comment": null + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 9, + "end_line": 11, + "column": 35, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 10, + "end_line": 10, + "column": 4, + "end_column": 24 + }, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 10, + "end_line": 10, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "5", + "teal_alias": null + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/uint64-expressions.algo.ts::DemoContract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 8, + "end_line": 8, + "column": 0, + "end_column": 41 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 8, + "end_line": 8, + "column": 0, + "end_column": 41 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 8, + "end_line": 8, + "column": 0, + "end_column": 41 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/uint64-expressions.algo.ts", + "line": 8, + "end_line": 8, + "column": 0, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/uint64-expressions.algo.ts::DemoContract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + } +] \ No newline at end of file diff --git a/tests/approvals/uint64-expressions.algo.ts b/tests/approvals/uint64-expressions.algo.ts new file mode 100644 index 00000000..d5c3eefc --- /dev/null +++ b/tests/approvals/uint64-expressions.algo.ts @@ -0,0 +1,12 @@ +import type { uint64 } from '@algorandfoundation/algorand-typescript' +import { BaseContract, Uint64 } from '@algorandfoundation/algorand-typescript' + +function test() { + return [Uint64(), Uint64(0), Uint64('1'), Uint64(1n), Uint64(true)] as const +} + +class DemoContract extends BaseContract { + public approvalProgram(): uint64 { + return test().length + } +} diff --git a/tests/expected-output/biguint-expressions.algo.ts b/tests/expected-output/biguint-expressions.algo.ts index e4063077..f8368732 100644 --- a/tests/expected-output/biguint-expressions.algo.ts +++ b/tests/expected-output/biguint-expressions.algo.ts @@ -1,11 +1,11 @@ import { BigUint } from '@algorandfoundation/algorand-typescript' function testErrors(b: string) { - // @expect-error Arg 0 of BigUInt has an incorrect type of -1... + // @expect-error biguint overflow or underflow... BigUint(-1) - // @expect-error Arg 0 of BigUInt has an incorrect type of -1... + // @expect-error biguint overflow or underflow... BigUint(-1n) - // @expect-error Arg 0 of BigUInt has an incorrect type of 13407807929... + // @expect-error biguint overflow or underflow... BigUint(2n ** 512n) // @expect-error Only compile time constant string values are supported BigUint(b) diff --git a/tests/expected-output/uint64-expressions.algo.ts b/tests/expected-output/uint64-expressions.algo.ts new file mode 100644 index 00000000..992dda1d --- /dev/null +++ b/tests/expected-output/uint64-expressions.algo.ts @@ -0,0 +1,21 @@ +import { Uint64 } from '@algorandfoundation/algorand-typescript' + +function test() { + // @expect-error uint64 overflow or underflow... + Uint64(-1) + // @expect-error uint64 overflow or underflow... + Uint64(-1n) + // @expect-error Cannot convert abc to an integer + Uint64('abc') + // @expect-error Cannot convert 0.1 to an integer + Uint64('0.1') + // @expect-error uint64 overflow or underflow... + Uint64('-1') + // @expect-error uint64 overflow or underflow... + Uint64(18446744073709551617n) + // @expect-error uint64 overflow or underflow... + Uint64('18446744073709551616') + const varStr = '123' + // @expect-error Expected constant of type string + Uint64(varStr) +} diff --git a/tests/onchain/primitives.spec.ts b/tests/onchain/primitives.spec.ts new file mode 100644 index 00000000..21d9116e --- /dev/null +++ b/tests/onchain/primitives.spec.ts @@ -0,0 +1,9 @@ +import { describe } from 'vitest' +import { createBaseTestFixture } from './util/test-fixture' + +describe('uint64', () => { + const test = createBaseTestFixture('tests/approvals/uint64-expressions.algo.ts', ['DemoContract']) + test('can be created', async ({ DemoContractInvoker }) => { + await DemoContractInvoker.send() + }) +}) From 94f03bd9b7367426b30fd1227fc61bdfbdcc2843 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Thu, 21 Nov 2024 11:38:10 -0800 Subject: [PATCH 07/30] fix: Use default name of Anonymous for unnamed object types --- src/awst_build/ptypes/index.ts | 1 + .../accounts/AccountsContract.approval.teal | 168 +++++------------- .../out/accounts/AccountsContract.arc32.json | 69 ++++++- tests/approvals/out/accounts/accounts.awst | 2 +- .../approvals/out/accounts/accounts.awst.json | 6 +- tests/onchain/accounts.spec.ts | 1 + 6 files changed, 118 insertions(+), 129 deletions(-) diff --git a/src/awst_build/ptypes/index.ts b/src/awst_build/ptypes/index.ts index 2f657cff..4e0d9aa3 100644 --- a/src/awst_build/ptypes/index.ts +++ b/src/awst_build/ptypes/index.ts @@ -624,6 +624,7 @@ export class ObjectPType extends PType { static anonymous(props: Record | Array<[string, PType]>) { const properties = Array.isArray(props) ? Object.fromEntries(props) : props return new ObjectPType({ + name: 'Anonymous', properties, }) } diff --git a/tests/approvals/out/accounts/AccountsContract.approval.teal b/tests/approvals/out/accounts/AccountsContract.approval.teal index ce1a1803..955d5985 100644 --- a/tests/approvals/out/accounts/AccountsContract.approval.teal +++ b/tests/approvals/out/accounts/AccountsContract.approval.teal @@ -1,49 +1,31 @@ #pragma version 10 tests/approvals/accounts.algo.ts::AccountsContract.approvalProgram: - intcblock 0 93 1 - txn ApplicationID - bnz main_after_if_else@2 - callsub constructor - -main_after_if_else@2: + intcblock 0 1 callsub __puya_arc4_router__ return -// tests/approvals/accounts.algo.ts::AccountsContract.constructor() -> void: -constructor: - // tests/approvals/accounts.algo.ts:4 - // export class AccountsContract extends Contract { - proto 0 0 - retsub - - // tests/approvals/accounts.algo.ts::AccountsContract.__puya_arc4_router__() -> uint64: __puya_arc4_router__: // tests/approvals/accounts.algo.ts:4 // export class AccountsContract extends Contract { proto 0 1 txn NumAppArgs - intc_0 // 0 - != bz __puya_arc4_router___bare_routing@5 - txna ApplicationArgs 0 pushbytes 0xdfe9a035 // method "getAccountInfo(account,asset)(byte[],uint64,uint64,byte[],uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,bool,bool)" - swap + txna ApplicationArgs 0 match __puya_arc4_router___getAccountInfo_route@2 - b __puya_arc4_router___switch_case_default@3 + intc_0 // 0 + retsub __puya_arc4_router___getAccountInfo_route@2: // tests/approvals/accounts.algo.ts:5 // public getAccountInfo(account: Account, asset: Asset) { txn OnCompletion - intc_0 // NoOp - == + ! assert // OnCompletion is not NoOp txn ApplicationID - intc_0 // 0 - != assert // can only call when not creating // tests/approvals/accounts.algo.ts:4 // export class AccountsContract extends Contract { @@ -56,114 +38,88 @@ __puya_arc4_router___getAccountInfo_route@2: // tests/approvals/accounts.algo.ts:5 // public getAccountInfo(account: Account, asset: Asset) { callsub getAccountInfo - cover 14 - cover 13 - cover 12 - cover 11 - cover 10 - cover 9 - cover 8 - cover 7 - cover 6 - cover 5 - cover 4 - cover 3 - cover 2 - swap - dup + dig 14 len itob extract 6 2 - swap + uncover 15 concat - cover 11 + uncover 14 itob - cover 12 + uncover 14 itob - cover 12 - dup + dig 14 len itob extract 6 2 - swap + uncover 15 concat - cover 14 + uncover 14 itob - cover 9 + uncover 14 itob - cover 10 + uncover 14 itob - cover 11 + uncover 14 itob - cover 11 + uncover 14 itob - cover 12 + uncover 14 itob - cover 12 + uncover 14 itob - cover 12 + uncover 14 itob - cover 12 - swap + uncover 14 itob - cover 12 pushbytes 0x00 intc_0 // 0 - uncover 9 + uncover 16 setbit - cover 11 pushbytes 0x00 intc_0 // 0 - uncover 15 + uncover 16 setbit - cover 9 - intc_1 // 93 - itob - extract 6 2 - pushbytes 0x - swap - concat - dig 1 + dig 14 len - intc_1 // 93 + pushint 93 // 93 + - swap - uncover 4 + pushbytes 0x005d + uncover 15 concat - uncover 5 + uncover 14 concat swap itob extract 6 2 concat - uncover 2 + uncover 11 concat - uncover 2 + uncover 10 concat - uncover 2 - concat - uncover 2 + uncover 9 concat - uncover 2 + uncover 8 concat - uncover 2 + uncover 7 concat - uncover 3 + uncover 6 concat - uncover 3 + uncover 5 concat uncover 4 concat uncover 3 concat uncover 2 + concat + swap intc_0 // 0 getbit - swap pushint 737 // 737 - uncover 2 - setbit swap + setbit + uncover 2 concat swap concat @@ -171,34 +127,20 @@ __puya_arc4_router___getAccountInfo_route@2: swap concat log - intc_2 // 1 + intc_1 // 1 retsub -__puya_arc4_router___switch_case_default@3: - b __puya_arc4_router___after_if_else@9 - __puya_arc4_router___bare_routing@5: // tests/approvals/accounts.algo.ts:4 // export class AccountsContract extends Contract { txn OnCompletion - intc_0 // 0 - swap - match __puya_arc4_router_____algots__.defaultCreate@6 - b __puya_arc4_router___switch_case_default@7 - -__puya_arc4_router_____algots__.defaultCreate@6: - // tests/approvals/accounts.algo.ts:4 - // export class AccountsContract extends Contract { + bnz __puya_arc4_router___after_if_else@9 txn ApplicationID - intc_0 // 0 - == + ! assert // can only call when creating - callsub __algots__.defaultCreate - intc_2 // 1 + intc_1 // 1 retsub -__puya_arc4_router___switch_case_default@7: - __puya_arc4_router___after_if_else@9: // tests/approvals/accounts.algo.ts:4 // export class AccountsContract extends Contract { @@ -273,9 +215,8 @@ getAccountInfo: assert // account funded // tests/approvals/accounts.algo.ts:20 // isOptInApp: account.isOptedIn(Global.currentApplicationId), - global CurrentApplicationID frame_dig -2 - swap + global CurrentApplicationID app_opted_in // tests/approvals/accounts.algo.ts:21 // isOptInAsset: account.isOptedIn(asset), @@ -302,26 +243,5 @@ getAccountInfo: // isOptInAsset: account.isOptedIn(asset), // } frame_dig -2 - uncover 14 - uncover 14 - uncover 14 - uncover 14 - uncover 14 - uncover 14 - uncover 14 - uncover 14 - uncover 14 - uncover 14 - uncover 14 - uncover 14 - uncover 14 - uncover 14 - retsub - - -// tests/approvals/accounts.algo.ts::AccountsContract.__algots__.defaultCreate() -> void: -__algots__.defaultCreate: - // tests/approvals/accounts.algo.ts:4 - // export class AccountsContract extends Contract { - proto 0 0 + cover 14 retsub diff --git a/tests/approvals/out/accounts/AccountsContract.arc32.json b/tests/approvals/out/accounts/AccountsContract.arc32.json index 9eadd471..4f4ed0fb 100644 --- a/tests/approvals/out/accounts/AccountsContract.arc32.json +++ b/tests/approvals/out/accounts/AccountsContract.arc32.json @@ -3,11 +3,78 @@ "getAccountInfo(account,asset)(byte[],uint64,uint64,byte[],uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,bool,bool)": { "call_config": { "no_op": "CALL" + }, + "structs": { + "output": { + "name": "Anonymous", + "elements": [ + [ + "bytes", + "byte[]" + ], + [ + "balance", + "uint64" + ], + [ + "minBalance", + "uint64" + ], + [ + "authAddress", + "byte[]" + ], + [ + "totalNumUint", + "uint64" + ], + [ + "totalNumByteSlice", + "uint64" + ], + [ + "totalExtraAppPages", + "uint64" + ], + [ + "totalAppsCreated", + "uint64" + ], + [ + "totalAppsOptedIn", + "uint64" + ], + [ + "totalAssetsCreated", + "uint64" + ], + [ + "totalAssets", + "uint64" + ], + [ + "totalBoxes", + "uint64" + ], + [ + "totalBoxBytes", + "uint64" + ], + [ + "isOptInApp", + "bool" + ], + [ + "isOptInAsset", + "bool" + ] + ] + } } } }, "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y5hbGdvLnRzOjUKICAgIC8vIHB1YmxpYyBnZXRBY2NvdW50SW5mbyhhY2NvdW50OiBBY2NvdW50LCBhc3NldDogQXNzZXQpIHsKICAgIGNhbGxzdWIgZ2V0QWNjb3VudEluZm8KICAgIGNvdmVyIDE0CiAgICBjb3ZlciAxMwogICAgY292ZXIgMTIKICAgIGNvdmVyIDExCiAgICBjb3ZlciAxMAogICAgY292ZXIgOQogICAgY292ZXIgOAogICAgY292ZXIgNwogICAgY292ZXIgNgogICAgY292ZXIgNQogICAgY292ZXIgNAogICAgY292ZXIgMwogICAgY292ZXIgMgogICAgc3dhcAogICAgZHVwCiAgICBsZW4KICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBzd2FwCiAgICBjb25jYXQKICAgIGNvdmVyIDExCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgaXRvYgogICAgY292ZXIgMTIKICAgIGR1cAogICAgbGVuCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgc3dhcAogICAgY29uY2F0CiAgICBjb3ZlciAxNAogICAgaXRvYgogICAgY292ZXIgOQogICAgaXRvYgogICAgY292ZXIgMTAKICAgIGl0b2IKICAgIGNvdmVyIDExCiAgICBpdG9iCiAgICBjb3ZlciAxMQogICAgaXRvYgogICAgY292ZXIgMTIKICAgIGl0b2IKICAgIGNvdmVyIDEyCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgaXRvYgogICAgY292ZXIgMTIKICAgIHN3YXAKICAgIGl0b2IKICAgIGNvdmVyIDEyCiAgICBwdXNoYnl0ZXMgMHgwMAogICAgaW50Y18wIC8vIDAKICAgIHVuY292ZXIgOQogICAgc2V0Yml0CiAgICBjb3ZlciAxMQogICAgcHVzaGJ5dGVzIDB4MDAKICAgIGludGNfMCAvLyAwCiAgICB1bmNvdmVyIDE1CiAgICBzZXRiaXQKICAgIGNvdmVyIDkKICAgIGludGNfMSAvLyA5MwogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIHB1c2hieXRlcyAweAogICAgc3dhcAogICAgY29uY2F0CiAgICBkaWcgMQogICAgbGVuCiAgICBpbnRjXzEgLy8gOTMKICAgICsKICAgIHN3YXAKICAgIHVuY292ZXIgNAogICAgY29uY2F0CiAgICB1bmNvdmVyIDUKICAgIGNvbmNhdAogICAgc3dhcAogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGNvbmNhdAogICAgdW5jb3ZlciAyCiAgICBjb25jYXQKICAgIHVuY292ZXIgMgogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmNhdAogICAgdW5jb3ZlciAyCiAgICBjb25jYXQKICAgIHVuY292ZXIgMgogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmNhdAogICAgdW5jb3ZlciAzCiAgICBjb25jYXQKICAgIHVuY292ZXIgMwogICAgY29uY2F0CiAgICB1bmNvdmVyIDQKICAgIGNvbmNhdAogICAgdW5jb3ZlciAzCiAgICBjb25jYXQKICAgIHVuY292ZXIgMgogICAgaW50Y18wIC8vIDAKICAgIGdldGJpdAogICAgc3dhcAogICAgcHVzaGludCA3MzcgLy8gNzM3CiAgICB1bmNvdmVyIDIKICAgIHNldGJpdAogICAgc3dhcAogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIHB1c2hieXRlcyAweDE1MWY3Yzc1CiAgICBzd2FwCiAgICBjb25jYXQKICAgIGxvZwogICAgaW50Y18yIC8vIDEKICAgIHJldHN1YgoKX19wdXlhX2FyYzRfcm91dGVyX19fc3dpdGNoX2Nhc2VfZGVmYXVsdEAzOgogICAgYiBfX3B1eWFfYXJjNF9yb3V0ZXJfX19hZnRlcl9pZl9lbHNlQDkKCl9fcHV5YV9hcmM0X3JvdXRlcl9fX2JhcmVfcm91dGluZ0A1OgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FjY291bnRzLmFsZ28udHM6NAogICAgLy8gZXhwb3J0IGNsYXNzIEFjY291bnRzQ29udHJhY3QgZXh0ZW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AgIHRvdGFsTnVtQnl0ZVNsaWNlOiBhY2NvdW50LnRvdGFsTnVtQnl0ZVNsaWNlLAogICAgLy8gICB0b3RhbEV4dHJhQXBwUGFnZXM6IGFjY291bnQudG90YWxFeHRyYUFwcFBhZ2VzLAogICAgLy8gICB0b3RhbEFwcHNDcmVhdGVkOiBhY2NvdW50LnRvdGFsQXBwc0NyZWF0ZWQsCiAgICAvLyAgIHRvdGFsQXBwc09wdGVkSW46IGFjY291bnQudG90YWxBcHBzT3B0ZWRJbiwKICAgIC8vICAgdG90YWxBc3NldHNDcmVhdGVkOiBhY2NvdW50LnRvdGFsQXNzZXRzQ3JlYXRlZCwKICAgIC8vICAgdG90YWxBc3NldHM6IGFjY291bnQudG90YWxBc3NldHMsCiAgICAvLyAgIHRvdGFsQm94ZXM6IGFjY291bnQudG90YWxCb3hlcywKICAgIC8vICAgdG90YWxCb3hCeXRlczogYWNjb3VudC50b3RhbEJveEJ5dGVzLAogICAgLy8gICBpc09wdEluQXBwOiBhY2NvdW50LmlzT3B0ZWRJbihHbG9iYWwuY3VycmVudEFwcGxpY2F0aW9uSWQpLAogICAgLy8gICBpc09wdEluQXNzZXQ6IGFjY291bnQuaXNPcHRlZEluKGFzc2V0KSwKICAgIC8vIH0KICAgIGZyYW1lX2RpZyAtMgogICAgY292ZXIgMTQKICAgIHJldHN1Ygo=", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo6QWNjb3VudHNDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/accounts/accounts.awst b/tests/approvals/out/accounts/accounts.awst index 0d7eac48..75951b03 100644 --- a/tests/approvals/out/accounts/accounts.awst +++ b/tests/approvals/out/accounts/accounts.awst @@ -13,7 +13,7 @@ contract AccountsContract return True } - getAccountInfo(): { bytes: bytes, balance: uint64, minBalance: uint64, authAddress: bytes, totalNumUint: uint64, totalNumByteSlice: uint64, totalExtraAppPages: uint64, totalAppsCreated: uint64, totalAppsOptedIn: uint64, totalAssetsCreated: uint64, totalAssets: uint64, totalBoxes: uint64, totalBoxBytes: uint64, isOptInApp: bool, isOptInAsset: bool } + getAccountInfo(): Anonymous{ bytes: bytes, balance: uint64, minBalance: uint64, authAddress: bytes, totalNumUint: uint64, totalNumByteSlice: uint64, totalExtraAppPages: uint64, totalAppsCreated: uint64, totalAppsOptedIn: uint64, totalAssetsCreated: uint64, totalAssets: uint64, totalBoxes: uint64, totalBoxBytes: uint64, isOptInApp: bool, isOptInAsset: bool } { return { bytes: reinterpret_cast(account), balance: checked_maybe(acct_params_get(account), comment=account funded), minBalance: checked_maybe(acct_params_get(account), comment=account funded), authAddress: reinterpret_cast(checked_maybe(acct_params_get(account), comment=account funded)), totalNumUint: checked_maybe(acct_params_get(account), comment=account funded), totalNumByteSlice: checked_maybe(acct_params_get(account), comment=account funded), totalExtraAppPages: checked_maybe(acct_params_get(account), comment=account funded), totalAppsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAppsOptedIn: checked_maybe(acct_params_get(account), comment=account funded), totalAssetsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAssets: checked_maybe(acct_params_get(account), comment=account funded), totalBoxes: checked_maybe(acct_params_get(account), comment=account funded), totalBoxBytes: checked_maybe(acct_params_get(account), comment=account funded), isOptInApp: app_opted_in(account, global()), isOptInAsset: asset_holding_get(account, asset).1 } } diff --git a/tests/approvals/out/accounts/accounts.awst.json b/tests/approvals/out/accounts/accounts.awst.json index 63056eec..bbf83e2a 100644 --- a/tests/approvals/out/accounts/accounts.awst.json +++ b/tests/approvals/out/accounts/accounts.awst.json @@ -346,7 +346,7 @@ ], "return_type": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -505,7 +505,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1790,7 +1790,7 @@ "default_args": {}, "structs": { "output": { - "name": "", + "name": "Anonymous", "elements": [ [ "bytes", diff --git a/tests/onchain/accounts.spec.ts b/tests/onchain/accounts.spec.ts index d57e54dc..180cdf24 100644 --- a/tests/onchain/accounts.spec.ts +++ b/tests/onchain/accounts.spec.ts @@ -28,5 +28,6 @@ describe('accounts', () => { } expect(returnValue.authAddress).toStrictEqual(new Array(32).fill(0)) + expect(returnValue.totalAppsCreated).toBeGreaterThan(0n) }) }) From 9ecccf09b91fb51d5200115c93ae9325080f221e Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Thu, 21 Nov 2024 11:38:27 -0800 Subject: [PATCH 08/30] chore: Update deps --- package-lock.json | 983 +++++++++--------- package.json | 33 +- packages/algo-ts/package-lock.json | 952 +++++++++-------- packages/algo-ts/package.json | 33 +- .../out/arc4-struct/StructDemo.approval.teal | 153 +-- .../out/arc4-struct/StructDemo.arc32.json | 2 +- .../out/arc4-struct/arc4-struct.awst | 10 +- .../out/arc4-struct/arc4-struct.awst.json | 28 +- .../biguint-expressions/DemoContract.ssa.ir | 33 + 9 files changed, 1070 insertions(+), 1157 deletions(-) create mode 100644 tests/approvals/out/biguint-expressions/DemoContract.ssa.ir diff --git a/package-lock.json b/package-lock.json index 3faf577a..10171c3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "chalk": "^5.3.0", "change-case": "^5.4.4", "commander": "^12.1.0", - "cross-spawn": "^7.0.3", + "cross-spawn": "7.0.6", "glob": "^11.0.0", "polytype": "^0.17.0", "typescript": "^5.6.2", @@ -26,34 +26,34 @@ "devDependencies": { "@algorandfoundation/algokit-utils": "^7.0.0-beta.7", "@algorandfoundation/algorand-typescript": "file:packages/algo-ts/dist", - "@commitlint/cli": "^19.5.0", - "@commitlint/config-conventional": "^19.5.0", + "@commitlint/cli": "^19.6.0", + "@commitlint/config-conventional": "^19.6.0", "@makerx/eslint-config": "4.0.0", "@makerx/prettier-config": "2.0.1", "@makerx/ts-toolkit": "^4.0.0-beta.21", - "@rollup/plugin-commonjs": "28.0.0", + "@rollup/plugin-commonjs": "28.0.1", "@rollup/plugin-json": "6.1.0", "@rollup/plugin-node-resolve": "15.3.0", - "@rollup/plugin-typescript": "^12.1.0", + "@rollup/plugin-typescript": "^12.1.1", "@tsconfig/node20": "20.1.4", "@types/cross-spawn": "^6.0.6", - "@types/node": "22.6.1", - "@typescript-eslint/eslint-plugin": "8.7.0", - "@typescript-eslint/parser": "8.7.0", - "@vitest/coverage-v8": "2.1.1", + "@types/node": "22.9.1", + "@typescript-eslint/eslint-plugin": "8.15.0", + "@typescript-eslint/parser": "8.15.0", + "@vitest/coverage-v8": "2.1.5", "better-npm-audit": "3.11.0", "conventional-changelog-conventionalcommits": "^8.0.0", "copyfiles": "2.4.1", - "eslint": "9.11.1", + "eslint": "9.15.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", "npm-run-all": "4.1.5", "prettier": "3.3.3", "rimraf": "6.0.1", - "rollup": "^4.22.4", - "semantic-release": "^24.1.1", - "tsx": "4.19.1", - "vitest": "2.1.1" + "rollup": "^4.27.3", + "semantic-release": "^24.2.0", + "tsx": "4.19.2", + "vitest": "2.1.5" } }, "../algorand-typescript-testing/dist": { @@ -123,9 +123,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", - "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, "license": "MIT", "engines": { @@ -133,9 +133,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, "license": "MIT", "engines": { @@ -237,11 +237,14 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", "dev": true, "license": "MIT", + "dependencies": { + "@babel/types": "^7.26.0" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -250,15 +253,14 @@ } }, "node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -283,14 +285,14 @@ } }, "node_modules/@commitlint/cli": { - "version": "19.5.0", - "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-19.5.0.tgz", - "integrity": "sha512-gaGqSliGwB86MDmAAKAtV9SV1SHdmN8pnGq4EJU4+hLisQ7IFfx4jvU4s+pk6tl0+9bv6yT+CaZkufOinkSJIQ==", + "version": "19.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-19.6.0.tgz", + "integrity": "sha512-v17BgGD9w5KnthaKxXnEg6KLq6DYiAxyiN44TpiRtqyW8NSq+Kx99mkEG8Qo6uu6cI5eMzMojW2muJxjmPnF8w==", "dev": true, "license": "MIT", "dependencies": { "@commitlint/format": "^19.5.0", - "@commitlint/lint": "^19.5.0", + "@commitlint/lint": "^19.6.0", "@commitlint/load": "^19.5.0", "@commitlint/read": "^19.5.0", "@commitlint/types": "^19.5.0", @@ -389,9 +391,9 @@ } }, "node_modules/@commitlint/config-conventional": { - "version": "19.5.0", - "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-19.5.0.tgz", - "integrity": "sha512-OBhdtJyHNPryZKg0fFpZNOBM1ZDbntMvqMuSmpfyP86XSfwzGw4CaoYRG4RutUPg0BTK07VMRIkNJT6wi2zthg==", + "version": "19.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-19.6.0.tgz", + "integrity": "sha512-DJT40iMnTYtBtUfw9ApbsLZFke1zKh6llITVJ+x9mtpHD08gsNXaIRqHTmwTZL3dNX5+WoyK7pCN/5zswvkBCQ==", "dev": true, "license": "MIT", "dependencies": { @@ -496,9 +498,9 @@ } }, "node_modules/@commitlint/is-ignored": { - "version": "19.5.0", - "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-19.5.0.tgz", - "integrity": "sha512-0XQ7Llsf9iL/ANtwyZ6G0NGp5Y3EQ8eDQSxv/SRcfJ0awlBY4tHFAvwWbw66FVUaWICH7iE5en+FD9TQsokZ5w==", + "version": "19.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-19.6.0.tgz", + "integrity": "sha512-Ov6iBgxJQFR9koOupDPHvcHU9keFupDgtB3lObdEZDroiG4jj1rzky60fbQozFKVYRTUdrBGICHG0YVmRuAJmw==", "dev": true, "license": "MIT", "dependencies": { @@ -510,15 +512,15 @@ } }, "node_modules/@commitlint/lint": { - "version": "19.5.0", - "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-19.5.0.tgz", - "integrity": "sha512-cAAQwJcRtiBxQWO0eprrAbOurtJz8U6MgYqLz+p9kLElirzSCc0vGMcyCaA1O7AqBuxo11l1XsY3FhOFowLAAg==", + "version": "19.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-19.6.0.tgz", + "integrity": "sha512-LRo7zDkXtcIrpco9RnfhOKeg8PAnE3oDDoalnrVU/EVaKHYBWYL1DlRR7+3AWn0JiBqD8yKOfetVxJGdEtZ0tg==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/is-ignored": "^19.5.0", + "@commitlint/is-ignored": "^19.6.0", "@commitlint/parse": "^19.5.0", - "@commitlint/rules": "^19.5.0", + "@commitlint/rules": "^19.6.0", "@commitlint/types": "^19.5.0" }, "engines": { @@ -618,9 +620,9 @@ } }, "node_modules/@commitlint/rules": { - "version": "19.5.0", - "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-19.5.0.tgz", - "integrity": "sha512-hDW5TPyf/h1/EufSHEKSp6Hs+YVsDMHazfJ2azIk9tHPXS6UqSz1dIRs1gpqS3eMXgtkT7JH6TW4IShdqOwhAw==", + "version": "19.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-19.6.0.tgz", + "integrity": "sha512-1f2reW7lbrI0X0ozZMesS/WZxgPa4/wi56vFuJENBmed6mWq5KsheN/nxqnl/C23ioxpPO/PL6tXpiiFy5Bhjw==", "dev": true, "license": "MIT", "dependencies": { @@ -1184,9 +1186,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", - "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, "license": "MIT", "engines": { @@ -1194,9 +1196,9 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", - "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.0.tgz", + "integrity": "sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1209,9 +1211,9 @@ } }, "node_modules/@eslint/core": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.6.0.tgz", - "integrity": "sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.0.tgz", + "integrity": "sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1219,9 +1221,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", - "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "dev": true, "license": "MIT", "dependencies": { @@ -1243,9 +1245,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.11.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.11.1.tgz", - "integrity": "sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA==", + "version": "9.15.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.15.0.tgz", + "integrity": "sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==", "dev": true, "license": "MIT", "engines": { @@ -1263,9 +1265,9 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.0.tgz", - "integrity": "sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz", + "integrity": "sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1275,6 +1277,44 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -1290,9 +1330,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", - "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1565,13 +1605,13 @@ "license": "MIT" }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "11.3.3", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.3.tgz", - "integrity": "sha512-o4WRoOJZlKqEEgj+i9CpcmnByvtzoUYC6I8PD2SA95M+BJ2x8h7oLcVOg9qcowWXBOdcTRsMZiwvM3EyLm9AfA==", + "version": "11.3.5", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.5.tgz", + "integrity": "sha512-cgwIRtKrpwhLoBi0CUNuY83DPGRMaWVjqVI/bGKsLJ4PzyWZNaEmhHroI2xlrVXkk6nFv0IsZpOp+ZWSWUS2AQ==", "dev": true, "license": "MIT", "dependencies": { - "@octokit/types": "^13.5.0" + "@octokit/types": "^13.6.0" }, "engines": { "node": ">= 18" @@ -1599,9 +1639,9 @@ } }, "node_modules/@octokit/plugin-throttling": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-9.3.1.tgz", - "integrity": "sha512-Qd91H4liUBhwLB2h6jZ99bsxoQdhgPk6TdwnClPyTBSDAdviGPceViEgUwj+pcQDmB/rfAXAXK7MTochpHM3yQ==", + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-9.3.2.tgz", + "integrity": "sha512-FqpvcTpIWFpMMwIeSoypoJXysSAQ3R+ALJhXXSG1HTP3YZOIeLmcNcimKaXxTcws+Sh6yoRl13SJ5r8sXc1Fhw==", "dev": true, "license": "MIT", "dependencies": { @@ -1645,9 +1685,9 @@ } }, "node_modules/@octokit/types": { - "version": "13.5.1", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.5.1.tgz", - "integrity": "sha512-F41lGiWBKPIWPBgjSvaDXTTQptBujnozENAK3S//nj7xsFdYdirImKlBB/hTjr+Vii68SM+8jG3UJWRa6DMuDA==", + "version": "13.6.1", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.6.1.tgz", + "integrity": "sha512-PHZE9Z+kWXb23Ndik8MKPirBPziOc0D2/3KH1P+6jK5nGWe96kadZuE4jev2/Jq7FvIfTlT2Ltg8Fv2x1v0a5g==", "dev": true, "license": "MIT", "dependencies": { @@ -1723,19 +1763,19 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.0.tgz", - "integrity": "sha512-BJcu+a+Mpq476DMXG+hevgPSl56bkUoi88dKT8t3RyUp8kGuOh+2bU8Gs7zXDlu+fyZggnJ+iOBGrb/O1SorYg==", + "version": "28.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.1.tgz", + "integrity": "sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==", "dev": true, "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.0.1", "commondir": "^1.0.1", "estree-walker": "^2.0.2", - "fdir": "^6.1.1", + "fdir": "^6.2.0", "is-reference": "1.2.1", "magic-string": "^0.30.3", - "picomatch": "^2.3.1" + "picomatch": "^4.0.2" }, "engines": { "node": ">=16.0.0 || 14 >= 14.17" @@ -1749,19 +1789,6 @@ } } }, - "node_modules/@rollup/plugin-commonjs/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/@rollup/plugin-json": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.1.0.tgz", @@ -1809,9 +1836,9 @@ } }, "node_modules/@rollup/plugin-typescript": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.0.tgz", - "integrity": "sha512-Kzs8KGJofe7cfTRODsnG1jNGxSvU8gVoNNd7Z/QaY25AYwe2LSSUpx/kPxqF38NYkpR8de3m51r9uwJpDlz6dg==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.1.tgz", + "integrity": "sha512-t7O653DpfB5MbFrqPe/VcKFFkvRuFNp9qId3xq4Eth5xlyymzxNpye2z8Hrl0RIMuXTSr5GGcFpkdlMeacUiFQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1872,208 +1899,252 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz", - "integrity": "sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.3.tgz", + "integrity": "sha512-EzxVSkIvCFxUd4Mgm4xR9YXrcp976qVaHnqom/Tgm+vU79k4vV4eYTjmRvGfeoW8m9LVcsAy/lGjcgVegKEhLQ==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz", - "integrity": "sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.27.3.tgz", + "integrity": "sha512-LJc5pDf1wjlt9o/Giaw9Ofl+k/vLUaYsE2zeQGH85giX2F+wn/Cg8b3c5CDP3qmVmeO5NzwVUzQQxwZvC2eQKw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "android" ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz", - "integrity": "sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.3.tgz", + "integrity": "sha512-OuRysZ1Mt7wpWJ+aYKblVbJWtVn3Cy52h8nLuNSzTqSesYw1EuN6wKp5NW/4eSre3mp12gqFRXOKTcN3AI3LqA==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz", - "integrity": "sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.27.3.tgz", + "integrity": "sha512-xW//zjJMlJs2sOrCmXdB4d0uiilZsOdlGQIC/jjmMWT47lkLLoB1nsNhPUcnoqyi5YR6I4h+FjBpILxbEy8JRg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "darwin" ] }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.27.3.tgz", + "integrity": "sha512-58E0tIcwZ+12nK1WiLzHOD8I0d0kdrY/+o7yFVPRHuVGY3twBwzwDdTIBGRxLmyjciMYl1B/U515GJy+yn46qw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.27.3.tgz", + "integrity": "sha512-78fohrpcVwTLxg1ZzBMlwEimoAJmY6B+5TsyAZ3Vok7YabRBUvjYTsRXPTjGEvv/mfgVBepbW28OlMEz4w8wGA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz", - "integrity": "sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.27.3.tgz", + "integrity": "sha512-h2Ay79YFXyQi+QZKo3ISZDyKaVD7uUvukEHTOft7kh00WF9mxAaxZsNs3o/eukbeKuH35jBvQqrT61fzKfAB/Q==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz", - "integrity": "sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.27.3.tgz", + "integrity": "sha512-Sv2GWmrJfRY57urktVLQ0VKZjNZGogVtASAgosDZ1aUB+ykPxSi3X1nWORL5Jk0sTIIwQiPH7iE3BMi9zGWfkg==", "cpu": [ "arm" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz", - "integrity": "sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.27.3.tgz", + "integrity": "sha512-FPoJBLsPW2bDNWjSrwNuTPUt30VnfM8GPGRoLCYKZpPx0xiIEdFip3dH6CqgoT0RnoGXptaNziM0WlKgBc+OWQ==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz", - "integrity": "sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.27.3.tgz", + "integrity": "sha512-TKxiOvBorYq4sUpA0JT+Fkh+l+G9DScnG5Dqx7wiiqVMiRSkzTclP35pE6eQQYjP4Gc8yEkJGea6rz4qyWhp3g==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz", - "integrity": "sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.27.3.tgz", + "integrity": "sha512-v2M/mPvVUKVOKITa0oCFksnQQ/TqGrT+yD0184/cWHIu0LoIuYHwox0Pm3ccXEz8cEQDLk6FPKd1CCm+PlsISw==", "cpu": [ "ppc64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz", - "integrity": "sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.27.3.tgz", + "integrity": "sha512-LdrI4Yocb1a/tFVkzmOE5WyYRgEBOyEhWYJe4gsDWDiwnjYKjNs7PS6SGlTDB7maOHF4kxevsuNBl2iOcj3b4A==", "cpu": [ "riscv64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz", - "integrity": "sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.27.3.tgz", + "integrity": "sha512-d4wVu6SXij/jyiwPvI6C4KxdGzuZOvJ6y9VfrcleHTwo68fl8vZC5ZYHsCVPUi4tndCfMlFniWgwonQ5CUpQcA==", "cpu": [ "s390x" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz", - "integrity": "sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.27.3.tgz", + "integrity": "sha512-/6bn6pp1fsCGEY5n3yajmzZQAh+mW4QPItbiWxs69zskBzJuheb3tNynEjL+mKOsUSFK11X4LYF2BwwXnzWleA==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz", - "integrity": "sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.27.3.tgz", + "integrity": "sha512-nBXOfJds8OzUT1qUreT/en3eyOXd2EH5b0wr2bVB5999qHdGKkzGzIyKYaKj02lXk6wpN71ltLIaQpu58YFBoQ==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "linux" ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz", - "integrity": "sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.27.3.tgz", + "integrity": "sha512-ogfbEVQgIZOz5WPWXF2HVb6En+kWzScuxJo/WdQTqEgeyGkaa2ui5sQav9Zkr7bnNCLK48uxmmK0TySm22eiuw==", "cpu": [ "arm64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz", - "integrity": "sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.27.3.tgz", + "integrity": "sha512-ecE36ZBMLINqiTtSNQ1vzWc5pXLQHlf/oqGp/bSbi7iedcjcNb6QbCBNG73Euyy2C+l/fn8qKWEwxr+0SSfs3w==", "cpu": [ "ia32" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz", - "integrity": "sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.27.3.tgz", + "integrity": "sha512-vliZLrDmYKyaUoMzEbMTg2JkerfBjn03KmAw9CykO0Zzkzoyd7o3iZNam/TpyWNjNT+Cz2iO3P9Smv2wgrR+Eg==", "cpu": [ "x64" ], "dev": true, + "license": "MIT", "optional": true, "os": [ "win32" @@ -2162,9 +2233,9 @@ } }, "node_modules/@semantic-release/github": { - "version": "10.3.5", - "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-10.3.5.tgz", - "integrity": "sha512-svvRglGmvqvxjmDgkXhrjf0lC88oZowFhOfifTldbgX9Dzj0inEtMLaC+3/MkDEmxmaQjWmF5Q/0CMIvPNSVdQ==", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/@semantic-release/github/-/github-11.0.1.tgz", + "integrity": "sha512-Z9cr0LgU/zgucbT9cksH0/pX9zmVda9hkDPcgIE0uvjMQ8w/mElDivGjx1w1pEQ+MuQJ5CBq3VCF16S6G4VH3A==", "dev": true, "license": "MIT", "dependencies": { @@ -2189,7 +2260,7 @@ "node": ">=20.8.1" }, "peerDependencies": { - "semantic-release": ">=20.1.0" + "semantic-release": ">=24.1.0" } }, "node_modules/@semantic-release/npm": { @@ -2427,9 +2498,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true, "license": "MIT" }, @@ -2441,13 +2512,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.6.1.tgz", - "integrity": "sha512-V48tCfcKb/e6cVUigLAaJDAILdMP0fUW6BidkPK4GpGjXcfbnoHasCZDwz3N3yVt5we2RHm4XTQCpv0KJz9zqw==", + "version": "22.9.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.1.tgz", + "integrity": "sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.19.8" } }, "node_modules/@types/normalize-package-data": { @@ -2472,17 +2543,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.7.0.tgz", - "integrity": "sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.15.0.tgz", + "integrity": "sha512-+zkm9AR1Ds9uLWN3fkoeXgFppaQ+uEVtfOV62dDmsy9QCNqlRHWNEck4yarvRNrvRcHQLGfqBNui3cimoz8XAg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/type-utils": "8.7.0", - "@typescript-eslint/utils": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/scope-manager": "8.15.0", + "@typescript-eslint/type-utils": "8.15.0", + "@typescript-eslint/utils": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -2506,16 +2577,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.7.0.tgz", - "integrity": "sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.15.0.tgz", + "integrity": "sha512-7n59qFpghG4uazrF9qtGKBZXn7Oz4sOMm8dwNWDQY96Xlm2oX67eipqcblDj+oY1lLCbf1oltMZFpUso66Kl1A==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/typescript-estree": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/scope-manager": "8.15.0", + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/typescript-estree": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", "debug": "^4.3.4" }, "engines": { @@ -2535,14 +2606,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.7.0.tgz", - "integrity": "sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.15.0.tgz", + "integrity": "sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0" + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2553,14 +2624,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.7.0.tgz", - "integrity": "sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.15.0.tgz", + "integrity": "sha512-UU6uwXDoI3JGSXmcdnP5d8Fffa2KayOhUUqr/AiBnG1Gl7+7ut/oyagVeSkh7bxQ0zSXV9ptRh/4N15nkCqnpw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.7.0", - "@typescript-eslint/utils": "8.7.0", + "@typescript-eslint/typescript-estree": "8.15.0", + "@typescript-eslint/utils": "8.15.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -2571,6 +2642,9 @@ "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, "peerDependenciesMeta": { "typescript": { "optional": true @@ -2578,9 +2652,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.7.0.tgz", - "integrity": "sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.15.0.tgz", + "integrity": "sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==", "dev": true, "license": "MIT", "engines": { @@ -2592,14 +2666,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.7.0.tgz", - "integrity": "sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.15.0.tgz", + "integrity": "sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -2647,16 +2721,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.7.0.tgz", - "integrity": "sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.15.0.tgz", + "integrity": "sha512-k82RI9yGhr0QM3Dnq+egEpz9qB6Un+WLYhmoNcvl8ltMEededhh7otBVVIDDsEEttauwdY/hQoSsOv13lxrFzQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/typescript-estree": "8.7.0" + "@typescript-eslint/scope-manager": "8.15.0", + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/typescript-estree": "8.15.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2667,17 +2741,22 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.7.0.tgz", - "integrity": "sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.15.0.tgz", + "integrity": "sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.7.0", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.15.0", + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2687,23 +2766,36 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@vitest/coverage-v8": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.1.tgz", - "integrity": "sha512-md/A7A3c42oTT8JUHSqjP5uKTWJejzUW4jalpvs+rZ27gsURsMU8DEb+8Jf8C6Kj2gwfSHJqobDNBuoqlm0cFw==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.5.tgz", + "integrity": "sha512-/RoopB7XGW7UEkUndRXF87A9CwkoZAJW01pj8/3pgmDVsjMH2IKy6H1A38po9tmUlwhSyYs0az82rbKd9Yaynw==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.3.0", "@bcoe/v8-coverage": "^0.2.3", - "debug": "^4.3.6", + "debug": "^4.3.7", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", "istanbul-lib-source-maps": "^5.0.6", "istanbul-reports": "^3.1.7", - "magic-string": "^0.30.11", - "magicast": "^0.3.4", - "std-env": "^3.7.0", + "magic-string": "^0.30.12", + "magicast": "^0.3.5", + "std-env": "^3.8.0", "test-exclude": "^7.0.1", "tinyrainbow": "^1.2.0" }, @@ -2711,8 +2803,8 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/browser": "2.1.1", - "vitest": "2.1.1" + "@vitest/browser": "2.1.5", + "vitest": "2.1.5" }, "peerDependenciesMeta": { "@vitest/browser": { @@ -2721,15 +2813,15 @@ } }, "node_modules/@vitest/expect": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.1.tgz", - "integrity": "sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.5.tgz", + "integrity": "sha512-nZSBTW1XIdpZvEJyoP/Sy8fUg0b8od7ZpGDkTUcfJ7wz/VoZAFzFfLyxVxGFhUjJzhYqSbIpfMtl/+k/dpWa3Q==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "2.1.1", - "@vitest/utils": "2.1.1", - "chai": "^5.1.1", + "@vitest/spy": "2.1.5", + "@vitest/utils": "2.1.5", + "chai": "^5.1.2", "tinyrainbow": "^1.2.0" }, "funding": { @@ -2737,22 +2829,21 @@ } }, "node_modules/@vitest/mocker": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.1.tgz", - "integrity": "sha512-LNN5VwOEdJqCmJ/2XJBywB11DLlkbY0ooDJW3uRX5cZyYCrc4PI/ePX0iQhE3BiEGiQmK4GE7Q/PqCkkaiPnrA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.5.tgz", + "integrity": "sha512-XYW6l3UuBmitWqSUXTNXcVBUCRytDogBsWuNXQijc00dtnU/9OqpXWp4OJroVrad/gLIomAq9aW8yWDBtMthhQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "^2.1.0-beta.1", + "@vitest/spy": "2.1.5", "estree-walker": "^3.0.3", - "magic-string": "^0.30.11" + "magic-string": "^0.30.12" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/spy": "2.1.1", - "msw": "^2.3.5", + "msw": "^2.4.9", "vite": "^5.0.0" }, "peerDependenciesMeta": { @@ -2775,9 +2866,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.1.tgz", - "integrity": "sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.5.tgz", + "integrity": "sha512-4ZOwtk2bqG5Y6xRGHcveZVr+6txkH7M2e+nPFd6guSoN638v/1XQ0K06eOpi0ptVU/2tW/pIU4IoPotY/GZ9fw==", "dev": true, "license": "MIT", "dependencies": { @@ -2788,13 +2879,13 @@ } }, "node_modules/@vitest/runner": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.1.tgz", - "integrity": "sha512-uTPuY6PWOYitIkLPidaY5L3t0JJITdGTSwBtwMjKzo5O6RCOEncz9PUN+0pDidX8kTHYjO0EwUIvhlGpnGpxmA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.5.tgz", + "integrity": "sha512-pKHKy3uaUdh7X6p1pxOkgkVAFW7r2I818vHDthYLvUyjRfkKOU6P45PztOch4DZarWQne+VOaIMwA/erSSpB9g==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "2.1.1", + "@vitest/utils": "2.1.5", "pathe": "^1.1.2" }, "funding": { @@ -2802,14 +2893,14 @@ } }, "node_modules/@vitest/snapshot": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.1.tgz", - "integrity": "sha512-BnSku1WFy7r4mm96ha2FzN99AZJgpZOWrAhtQfoxjUU5YMRpq1zmHRq7a5K9/NjqonebO7iVDla+VvZS8BOWMw==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.5.tgz", + "integrity": "sha512-zmYw47mhfdfnYbuhkQvkkzYroXUumrwWDGlMjpdUr4jBd3HZiV2w7CQHj+z7AAS4VOtWxI4Zt4bWt4/sKcoIjg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.1.1", - "magic-string": "^0.30.11", + "@vitest/pretty-format": "2.1.5", + "magic-string": "^0.30.12", "pathe": "^1.1.2" }, "funding": { @@ -2817,27 +2908,27 @@ } }, "node_modules/@vitest/spy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.1.tgz", - "integrity": "sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.5.tgz", + "integrity": "sha512-aWZF3P0r3w6DiYTVskOYuhBc7EMc3jvn1TkBg8ttylFFRqNN2XGD7V5a4aQdk6QiUzZQ4klNBSpCLJgWNdIiNw==", "dev": true, "license": "MIT", "dependencies": { - "tinyspy": "^3.0.0" + "tinyspy": "^3.0.2" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/utils": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.1.tgz", - "integrity": "sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.5.tgz", + "integrity": "sha512-yfj6Yrp0Vesw2cwJbP+cl04OC+IHFsuQsrsJBL9pyGeQXE56v1UAOQco+SR55Vf1nQzfV0QJg1Qum7AaWUwwYg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.1.1", - "loupe": "^3.1.1", + "@vitest/pretty-format": "2.1.5", + "loupe": "^3.1.2", "tinyrainbow": "^1.2.0" }, "funding": { @@ -2845,9 +2936,9 @@ } }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, "license": "MIT", "bin": { @@ -3263,9 +3354,9 @@ } }, "node_modules/chai": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz", - "integrity": "sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz", + "integrity": "sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==", "dev": true, "license": "MIT", "dependencies": { @@ -3748,9 +3839,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -4276,6 +4367,13 @@ "node": ">= 0.4" } }, + "node_modules/es-module-lexer": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true, + "license": "MIT" + }, "node_modules/es-object-atoms": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", @@ -4386,32 +4484,32 @@ } }, "node_modules/eslint": { - "version": "9.11.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.11.1.tgz", - "integrity": "sha512-MobhYKIoAO1s1e4VUrgx1l1Sk2JBR/Gqjjgw8+mfgoLE2xwsHur4gdfTxyTgShrhvdVFTaJSgMiQBl1jv/AWxg==", + "version": "9.15.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.15.0.tgz", + "integrity": "sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.11.0", - "@eslint/config-array": "^0.18.0", - "@eslint/core": "^0.6.0", - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "9.11.1", - "@eslint/plugin-kit": "^0.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.9.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.15.0", + "@eslint/plugin-kit": "^0.2.3", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.3.0", - "@nodelib/fs.walk": "^1.2.8", + "@humanwhocodes/retry": "^0.4.1", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.5", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.0.2", - "eslint-visitor-keys": "^4.0.0", - "espree": "^10.1.0", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -4421,14 +4519,11 @@ "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" @@ -4491,9 +4586,9 @@ } }, "node_modules/eslint-scope": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", - "integrity": "sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -4520,13 +4615,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true, - "license": "MIT" - }, "node_modules/eslint/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -4545,9 +4633,9 @@ } }, "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -4558,15 +4646,15 @@ } }, "node_modules/espree": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", - "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.12.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.0.0" + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4576,9 +4664,9 @@ } }, "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -4685,6 +4773,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/expect-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.1.0.tgz", + "integrity": "sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -5054,16 +5152,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, "node_modules/get-intrinsic": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", @@ -5917,16 +6005,6 @@ "node": ">=8" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-obj": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", @@ -6522,14 +6600,11 @@ "license": "MIT" }, "node_modules/loupe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz", - "integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.2.tgz", + "integrity": "sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==", "dev": true, - "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.1" - } + "license": "MIT" }, "node_modules/lru-cache": { "version": "11.0.1", @@ -6541,9 +6616,9 @@ } }, "node_modules/magic-string": { - "version": "0.30.11", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", - "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", + "version": "0.30.13", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.13.tgz", + "integrity": "sha512-8rYBO+MsWkgjDSOvLomYnzhdwEG51olQ4zL5KXnNJWV5MNmrb4rTZdrtkhxjnD/QyZUqR/Z/XDsUs/4ej2nx0g==", "dev": true, "license": "MIT", "dependencies": { @@ -6551,14 +6626,14 @@ } }, "node_modules/magicast": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.4.tgz", - "integrity": "sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", + "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.24.4", - "@babel/types": "^7.24.0", + "@babel/parser": "^7.25.4", + "@babel/types": "^7.25.4", "source-map-js": "^1.2.0" } }, @@ -6811,13 +6886,6 @@ "dev": true, "license": "MIT" }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true, - "license": "MIT" - }, "node_modules/node-emoji": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-2.1.3.tgz", @@ -7113,23 +7181,6 @@ "dev": true, "license": "MIT" }, - "node_modules/npm-run-all/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "engines": { - "node": ">=4.8" - } - }, "node_modules/npm-run-all/node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -7150,49 +7201,6 @@ "node": ">=4" } }, - "node_modules/npm-run-all/node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-all/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/npm-run-all/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-all/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/npm-run-all/node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -7206,19 +7214,6 @@ "node": ">=4" } }, - "node_modules/npm-run-all/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, "node_modules/npm-run-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz", @@ -10001,10 +9996,11 @@ } }, "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", - "dev": true + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" }, "node_modules/picomatch": { "version": "4.0.2", @@ -10012,8 +10008,6 @@ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, "license": "MIT", - "optional": true, - "peer": true, "engines": { "node": ">=12" }, @@ -10141,9 +10135,9 @@ } }, "node_modules/postcss": { - "version": "8.4.47", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", - "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", "dev": true, "funding": [ { @@ -10162,7 +10156,7 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.1.0", + "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, "engines": { @@ -10556,12 +10550,13 @@ } }, "node_modules/rollup": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.4.tgz", - "integrity": "sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.3.tgz", + "integrity": "sha512-SLsCOnlmGt9VoZ9Ek8yBK8tAdmPHeppkw+Xa7yDlCEhDTvwYei03JlWo1fdc7YTfLZ4tD8riJCUyAgTbszk1fQ==", "dev": true, + "license": "MIT", "dependencies": { - "@types/estree": "1.0.5" + "@types/estree": "1.0.6" }, "bin": { "rollup": "dist/bin/rollup" @@ -10571,22 +10566,24 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.22.4", - "@rollup/rollup-android-arm64": "4.22.4", - "@rollup/rollup-darwin-arm64": "4.22.4", - "@rollup/rollup-darwin-x64": "4.22.4", - "@rollup/rollup-linux-arm-gnueabihf": "4.22.4", - "@rollup/rollup-linux-arm-musleabihf": "4.22.4", - "@rollup/rollup-linux-arm64-gnu": "4.22.4", - "@rollup/rollup-linux-arm64-musl": "4.22.4", - "@rollup/rollup-linux-powerpc64le-gnu": "4.22.4", - "@rollup/rollup-linux-riscv64-gnu": "4.22.4", - "@rollup/rollup-linux-s390x-gnu": "4.22.4", - "@rollup/rollup-linux-x64-gnu": "4.22.4", - "@rollup/rollup-linux-x64-musl": "4.22.4", - "@rollup/rollup-win32-arm64-msvc": "4.22.4", - "@rollup/rollup-win32-ia32-msvc": "4.22.4", - "@rollup/rollup-win32-x64-msvc": "4.22.4", + "@rollup/rollup-android-arm-eabi": "4.27.3", + "@rollup/rollup-android-arm64": "4.27.3", + "@rollup/rollup-darwin-arm64": "4.27.3", + "@rollup/rollup-darwin-x64": "4.27.3", + "@rollup/rollup-freebsd-arm64": "4.27.3", + "@rollup/rollup-freebsd-x64": "4.27.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.27.3", + "@rollup/rollup-linux-arm-musleabihf": "4.27.3", + "@rollup/rollup-linux-arm64-gnu": "4.27.3", + "@rollup/rollup-linux-arm64-musl": "4.27.3", + "@rollup/rollup-linux-powerpc64le-gnu": "4.27.3", + "@rollup/rollup-linux-riscv64-gnu": "4.27.3", + "@rollup/rollup-linux-s390x-gnu": "4.27.3", + "@rollup/rollup-linux-x64-gnu": "4.27.3", + "@rollup/rollup-linux-x64-musl": "4.27.3", + "@rollup/rollup-win32-arm64-msvc": "4.27.3", + "@rollup/rollup-win32-ia32-msvc": "4.27.3", + "@rollup/rollup-win32-x64-msvc": "4.27.3", "fsevents": "~2.3.2" } }, @@ -10666,15 +10663,15 @@ } }, "node_modules/semantic-release": { - "version": "24.1.1", - "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-24.1.1.tgz", - "integrity": "sha512-4Ax2GxD411jUe9IdhOjMLuN+6wAj+aKjvOGngByrpD/iKL+UKN/2puQglhyI4gxNyy9XzEBMzBwbqpnEwbXGEg==", + "version": "24.2.0", + "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-24.2.0.tgz", + "integrity": "sha512-fQfn6e/aYToRtVJYKqneFM1Rg3KP2gh3wSWtpYsLlz6uaPKlISrTzvYAFn+mYWo07F0X1Cz5ucU89AVE8X1mbg==", "dev": true, "license": "MIT", "dependencies": { "@semantic-release/commit-analyzer": "^13.0.0-beta.1", "@semantic-release/error": "^4.0.0", - "@semantic-release/github": "^10.0.0", + "@semantic-release/github": "^11.0.0", "@semantic-release/npm": "^12.0.0", "@semantic-release/release-notes-generator": "^14.0.0-beta.1", "aggregate-error": "^5.0.0", @@ -11133,6 +11130,7 @@ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -11198,9 +11196,9 @@ "license": "MIT" }, "node_modules/std-env": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", - "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", + "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==", "dev": true, "license": "MIT" }, @@ -11761,13 +11759,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", @@ -11866,16 +11857,16 @@ "license": "MIT" }, "node_modules/tinyexec": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.0.tgz", - "integrity": "sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz", + "integrity": "sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==", "dev": true, "license": "MIT" }, "node_modules/tinypool": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.1.tgz", - "integrity": "sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz", + "integrity": "sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==", "dev": true, "license": "MIT", "engines": { @@ -11902,16 +11893,6 @@ "node": ">=14.0.0" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -11959,9 +11940,9 @@ "license": "0BSD" }, "node_modules/tsx": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.1.tgz", - "integrity": "sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.2.tgz", + "integrity": "sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==", "dev": true, "license": "MIT", "dependencies": { @@ -12255,9 +12236,9 @@ } }, "node_modules/vite": { - "version": "5.4.7", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.7.tgz", - "integrity": "sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ==", + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", "dev": true, "license": "MIT", "dependencies": { @@ -12315,14 +12296,15 @@ } }, "node_modules/vite-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.1.tgz", - "integrity": "sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.5.tgz", + "integrity": "sha512-rd0QIgx74q4S1Rd56XIiL2cYEdyWn13cunYBIuqh9mpmQr7gGS0IxXoP8R6OaZtNQQLyXSWbd4rXKYUbhFpK5w==", "dev": true, "license": "MIT", "dependencies": { "cac": "^6.7.14", - "debug": "^4.3.6", + "debug": "^4.3.7", + "es-module-lexer": "^1.5.4", "pathe": "^1.1.2", "vite": "^5.0.0" }, @@ -12767,30 +12749,31 @@ } }, "node_modules/vitest": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.1.tgz", - "integrity": "sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/expect": "2.1.1", - "@vitest/mocker": "2.1.1", - "@vitest/pretty-format": "^2.1.1", - "@vitest/runner": "2.1.1", - "@vitest/snapshot": "2.1.1", - "@vitest/spy": "2.1.1", - "@vitest/utils": "2.1.1", - "chai": "^5.1.1", - "debug": "^4.3.6", - "magic-string": "^0.30.11", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.5.tgz", + "integrity": "sha512-P4ljsdpuzRTPI/kbND2sDZ4VmieerR2c9szEZpjc+98Z9ebvnXmM5+0tHEKqYZumXqlvnmfWsjeFOjXVriDG7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "2.1.5", + "@vitest/mocker": "2.1.5", + "@vitest/pretty-format": "^2.1.5", + "@vitest/runner": "2.1.5", + "@vitest/snapshot": "2.1.5", + "@vitest/spy": "2.1.5", + "@vitest/utils": "2.1.5", + "chai": "^5.1.2", + "debug": "^4.3.7", + "expect-type": "^1.1.0", + "magic-string": "^0.30.12", "pathe": "^1.1.2", - "std-env": "^3.7.0", + "std-env": "^3.8.0", "tinybench": "^2.9.0", - "tinyexec": "^0.3.0", - "tinypool": "^1.0.0", + "tinyexec": "^0.3.1", + "tinypool": "^1.0.1", "tinyrainbow": "^1.2.0", "vite": "^5.0.0", - "vite-node": "2.1.1", + "vite-node": "2.1.5", "why-is-node-running": "^2.3.0" }, "bin": { @@ -12805,8 +12788,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "2.1.1", - "@vitest/ui": "2.1.1", + "@vitest/browser": "2.1.5", + "@vitest/ui": "2.1.5", "happy-dom": "*", "jsdom": "*" }, diff --git a/package.json b/package.json index 1035fd43..15ccd71f 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dev:examples": "tsx src/cli.ts build examples --output-awst --output-awst-json", "dev:approvals": "rimraf tests/approvals/out && tsx src/cli.ts build tests/approvals --output-awst --output-awst-json --output-ssa-ir --out-dir out/[name] --optimization-level 0", "dev:expected-output": "tsx src/cli.ts build tests/expected-output --dry-run", - "dev:testing": "tsx src/cli.ts build tests/expected-output/uint64-expressions.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name]", + "dev:testing": "tsx src/cli.ts build tests/approvals/accounts.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name]", "audit": "better-npm-audit audit", "format": "prettier --write .", "lint": "eslint \"src/**/*.ts\"", @@ -42,46 +42,49 @@ "devDependencies": { "@algorandfoundation/algokit-utils": "^7.0.0-beta.7", "@algorandfoundation/algorand-typescript": "file:packages/algo-ts/dist", - "@commitlint/cli": "^19.5.0", - "@commitlint/config-conventional": "^19.5.0", + "@commitlint/cli": "^19.6.0", + "@commitlint/config-conventional": "^19.6.0", "@makerx/eslint-config": "4.0.0", "@makerx/prettier-config": "2.0.1", "@makerx/ts-toolkit": "^4.0.0-beta.21", - "@rollup/plugin-commonjs": "28.0.0", + "@rollup/plugin-commonjs": "28.0.1", "@rollup/plugin-json": "6.1.0", "@rollup/plugin-node-resolve": "15.3.0", - "@rollup/plugin-typescript": "^12.1.0", + "@rollup/plugin-typescript": "^12.1.1", "@tsconfig/node20": "20.1.4", "@types/cross-spawn": "^6.0.6", - "@types/node": "22.6.1", - "@typescript-eslint/eslint-plugin": "8.7.0", - "@typescript-eslint/parser": "8.7.0", - "@vitest/coverage-v8": "2.1.1", + "@types/node": "22.9.1", + "@typescript-eslint/eslint-plugin": "8.15.0", + "@typescript-eslint/parser": "8.15.0", + "@vitest/coverage-v8": "2.1.5", "better-npm-audit": "3.11.0", "conventional-changelog-conventionalcommits": "^8.0.0", "copyfiles": "2.4.1", - "eslint": "9.11.1", + "eslint": "9.15.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", "npm-run-all": "4.1.5", "prettier": "3.3.3", "rimraf": "6.0.1", - "rollup": "^4.22.4", - "semantic-release": "^24.1.1", - "tsx": "4.19.1", - "vitest": "2.1.1" + "rollup": "^4.27.3", + "semantic-release": "^24.2.0", + "tsx": "4.19.2", + "vitest": "2.1.5" }, "dependencies": { "chalk": "^5.3.0", "change-case": "^5.4.4", "commander": "^12.1.0", - "cross-spawn": "^7.0.3", + "cross-spawn": "7.0.6", "glob": "^11.0.0", "polytype": "^0.17.0", "typescript": "^5.6.2", "upath": "^2.0.1", "zod": "^3.23.8" }, + "overrides": { + "cross-spawn": "7.0.6" + }, "bundleDependencies": [ "typescript" ] diff --git a/packages/algo-ts/package-lock.json b/packages/algo-ts/package-lock.json index 2279f273..33ad2ad2 100644 --- a/packages/algo-ts/package-lock.json +++ b/packages/algo-ts/package-lock.json @@ -1,40 +1,40 @@ { "name": "@algorandfoundation/algorand-typescript", - "version": "0.0.1-alpha.16", + "version": "0.0.1-alpha.17", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@algorandfoundation/algorand-typescript", - "version": "0.0.1-alpha.16", + "version": "0.0.1-alpha.17", "devDependencies": { - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "^9.11.1", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "^9.15.0", "@makerx/eslint-config": "4.0.0", "@makerx/prettier-config": "2.0.1", - "@makerx/ts-toolkit": "^4.0.0-beta.20", - "@rollup/plugin-commonjs": "28.0.0", + "@makerx/ts-toolkit": "^4.0.0-beta.21", + "@rollup/plugin-commonjs": "28.0.1", "@rollup/plugin-json": "6.1.0", "@rollup/plugin-node-resolve": "15.3.0", - "@rollup/plugin-typescript": "12.1.0", + "@rollup/plugin-typescript": "12.1.1", "@tsconfig/node20": "20.1.4", - "@types/node": "22.6.1", - "@typescript-eslint/eslint-plugin": "8.7.0", - "@typescript-eslint/parser": "8.7.0", - "@vitest/coverage-v8": "2.1.1", + "@types/node": "22.9.1", + "@typescript-eslint/eslint-plugin": "8.15.0", + "@typescript-eslint/parser": "8.15.0", + "@vitest/coverage-v8": "2.1.5", "better-npm-audit": "3.11.0", "copyfiles": "2.4.1", - "eslint": "9.11.1", + "eslint": "9.15.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", - "globals": "^15.9.0", + "globals": "^15.12.0", "npm-run-all": "4.1.5", "prettier": "3.3.3", "rimraf": "6.0.1", - "rollup": "4.22.4", - "tsx": "4.19.1", - "typescript": "^5.6.2", - "vitest": "2.1.1" + "rollup": "4.27.3", + "tsx": "4.19.2", + "typescript": "^5.6.3", + "vitest": "2.1.5" }, "peerDependencies": { "tslib": "^2.6.2" @@ -69,9 +69,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", - "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, "license": "MIT", "engines": { @@ -79,9 +79,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, "license": "MIT", "engines": { @@ -183,11 +183,14 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", "dev": true, "license": "MIT", + "dependencies": { + "@babel/types": "^7.26.0" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -196,15 +199,14 @@ } }, "node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -642,9 +644,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", - "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, "license": "MIT", "engines": { @@ -652,9 +654,9 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", - "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.0.tgz", + "integrity": "sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -691,9 +693,9 @@ } }, "node_modules/@eslint/core": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.6.0.tgz", - "integrity": "sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.0.tgz", + "integrity": "sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==", "dev": true, "license": "Apache-2.0", "engines": { @@ -701,9 +703,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", - "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "dev": true, "license": "MIT", "dependencies": { @@ -762,9 +764,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.11.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.11.1.tgz", - "integrity": "sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA==", + "version": "9.15.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.15.0.tgz", + "integrity": "sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==", "dev": true, "license": "MIT", "engines": { @@ -782,9 +784,9 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.0.tgz", - "integrity": "sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz", + "integrity": "sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -794,6 +796,44 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -809,9 +849,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", - "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1003,9 +1043,9 @@ "license": "MIT" }, "node_modules/@makerx/ts-toolkit": { - "version": "4.0.0-beta.20", - "resolved": "https://registry.npmjs.org/@makerx/ts-toolkit/-/ts-toolkit-4.0.0-beta.20.tgz", - "integrity": "sha512-faZyycGxk7lKvhm0nwy5hirwD6tVAdLLbEYh9kd13OzHuWiHPySt3ixdB2BXHDzoE65BU43h8X/pqlUNDbH4NA==", + "version": "4.0.0-beta.21", + "resolved": "https://registry.npmjs.org/@makerx/ts-toolkit/-/ts-toolkit-4.0.0-beta.21.tgz", + "integrity": "sha512-/2zTLS2cxGonnRNTHx9Q5byd+M0HJak8UxUJSbmoXUKRFpAPfLhsrXvQKtavyExtMf2a49D4QSVuIbBy5VY9Gw==", "dev": true, "license": "MIT", "dependencies": { @@ -1085,19 +1125,19 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "28.0.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.0.tgz", - "integrity": "sha512-BJcu+a+Mpq476DMXG+hevgPSl56bkUoi88dKT8t3RyUp8kGuOh+2bU8Gs7zXDlu+fyZggnJ+iOBGrb/O1SorYg==", + "version": "28.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.1.tgz", + "integrity": "sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==", "dev": true, "license": "MIT", "dependencies": { "@rollup/pluginutils": "^5.0.1", "commondir": "^1.0.1", "estree-walker": "^2.0.2", - "fdir": "^6.1.1", + "fdir": "^6.2.0", "is-reference": "1.2.1", "magic-string": "^0.30.3", - "picomatch": "^2.3.1" + "picomatch": "^4.0.2" }, "engines": { "node": ">=16.0.0 || 14 >= 14.17" @@ -1111,19 +1151,6 @@ } } }, - "node_modules/@rollup/plugin-commonjs/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/@rollup/plugin-json": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.1.0.tgz", @@ -1171,9 +1198,9 @@ } }, "node_modules/@rollup/plugin-typescript": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.0.tgz", - "integrity": "sha512-Kzs8KGJofe7cfTRODsnG1jNGxSvU8gVoNNd7Z/QaY25AYwe2LSSUpx/kPxqF38NYkpR8de3m51r9uwJpDlz6dg==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.1.tgz", + "integrity": "sha512-t7O653DpfB5MbFrqPe/VcKFFkvRuFNp9qId3xq4Eth5xlyymzxNpye2z8Hrl0RIMuXTSr5GGcFpkdlMeacUiFQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1234,9 +1261,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz", - "integrity": "sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.3.tgz", + "integrity": "sha512-EzxVSkIvCFxUd4Mgm4xR9YXrcp976qVaHnqom/Tgm+vU79k4vV4eYTjmRvGfeoW8m9LVcsAy/lGjcgVegKEhLQ==", "cpu": [ "arm" ], @@ -1248,9 +1275,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz", - "integrity": "sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.27.3.tgz", + "integrity": "sha512-LJc5pDf1wjlt9o/Giaw9Ofl+k/vLUaYsE2zeQGH85giX2F+wn/Cg8b3c5CDP3qmVmeO5NzwVUzQQxwZvC2eQKw==", "cpu": [ "arm64" ], @@ -1262,9 +1289,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz", - "integrity": "sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.3.tgz", + "integrity": "sha512-OuRysZ1Mt7wpWJ+aYKblVbJWtVn3Cy52h8nLuNSzTqSesYw1EuN6wKp5NW/4eSre3mp12gqFRXOKTcN3AI3LqA==", "cpu": [ "arm64" ], @@ -1276,9 +1303,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz", - "integrity": "sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.27.3.tgz", + "integrity": "sha512-xW//zjJMlJs2sOrCmXdB4d0uiilZsOdlGQIC/jjmMWT47lkLLoB1nsNhPUcnoqyi5YR6I4h+FjBpILxbEy8JRg==", "cpu": [ "x64" ], @@ -1289,10 +1316,38 @@ "darwin" ] }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.27.3.tgz", + "integrity": "sha512-58E0tIcwZ+12nK1WiLzHOD8I0d0kdrY/+o7yFVPRHuVGY3twBwzwDdTIBGRxLmyjciMYl1B/U515GJy+yn46qw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.27.3.tgz", + "integrity": "sha512-78fohrpcVwTLxg1ZzBMlwEimoAJmY6B+5TsyAZ3Vok7YabRBUvjYTsRXPTjGEvv/mfgVBepbW28OlMEz4w8wGA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz", - "integrity": "sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.27.3.tgz", + "integrity": "sha512-h2Ay79YFXyQi+QZKo3ISZDyKaVD7uUvukEHTOft7kh00WF9mxAaxZsNs3o/eukbeKuH35jBvQqrT61fzKfAB/Q==", "cpu": [ "arm" ], @@ -1304,9 +1359,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz", - "integrity": "sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.27.3.tgz", + "integrity": "sha512-Sv2GWmrJfRY57urktVLQ0VKZjNZGogVtASAgosDZ1aUB+ykPxSi3X1nWORL5Jk0sTIIwQiPH7iE3BMi9zGWfkg==", "cpu": [ "arm" ], @@ -1318,9 +1373,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz", - "integrity": "sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.27.3.tgz", + "integrity": "sha512-FPoJBLsPW2bDNWjSrwNuTPUt30VnfM8GPGRoLCYKZpPx0xiIEdFip3dH6CqgoT0RnoGXptaNziM0WlKgBc+OWQ==", "cpu": [ "arm64" ], @@ -1332,9 +1387,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz", - "integrity": "sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.27.3.tgz", + "integrity": "sha512-TKxiOvBorYq4sUpA0JT+Fkh+l+G9DScnG5Dqx7wiiqVMiRSkzTclP35pE6eQQYjP4Gc8yEkJGea6rz4qyWhp3g==", "cpu": [ "arm64" ], @@ -1346,9 +1401,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz", - "integrity": "sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.27.3.tgz", + "integrity": "sha512-v2M/mPvVUKVOKITa0oCFksnQQ/TqGrT+yD0184/cWHIu0LoIuYHwox0Pm3ccXEz8cEQDLk6FPKd1CCm+PlsISw==", "cpu": [ "ppc64" ], @@ -1360,9 +1415,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz", - "integrity": "sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.27.3.tgz", + "integrity": "sha512-LdrI4Yocb1a/tFVkzmOE5WyYRgEBOyEhWYJe4gsDWDiwnjYKjNs7PS6SGlTDB7maOHF4kxevsuNBl2iOcj3b4A==", "cpu": [ "riscv64" ], @@ -1374,9 +1429,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz", - "integrity": "sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.27.3.tgz", + "integrity": "sha512-d4wVu6SXij/jyiwPvI6C4KxdGzuZOvJ6y9VfrcleHTwo68fl8vZC5ZYHsCVPUi4tndCfMlFniWgwonQ5CUpQcA==", "cpu": [ "s390x" ], @@ -1388,9 +1443,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz", - "integrity": "sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.27.3.tgz", + "integrity": "sha512-/6bn6pp1fsCGEY5n3yajmzZQAh+mW4QPItbiWxs69zskBzJuheb3tNynEjL+mKOsUSFK11X4LYF2BwwXnzWleA==", "cpu": [ "x64" ], @@ -1402,9 +1457,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz", - "integrity": "sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.27.3.tgz", + "integrity": "sha512-nBXOfJds8OzUT1qUreT/en3eyOXd2EH5b0wr2bVB5999qHdGKkzGzIyKYaKj02lXk6wpN71ltLIaQpu58YFBoQ==", "cpu": [ "x64" ], @@ -1416,9 +1471,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz", - "integrity": "sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.27.3.tgz", + "integrity": "sha512-ogfbEVQgIZOz5WPWXF2HVb6En+kWzScuxJo/WdQTqEgeyGkaa2ui5sQav9Zkr7bnNCLK48uxmmK0TySm22eiuw==", "cpu": [ "arm64" ], @@ -1430,9 +1485,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz", - "integrity": "sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.27.3.tgz", + "integrity": "sha512-ecE36ZBMLINqiTtSNQ1vzWc5pXLQHlf/oqGp/bSbi7iedcjcNb6QbCBNG73Euyy2C+l/fn8qKWEwxr+0SSfs3w==", "cpu": [ "ia32" ], @@ -1444,9 +1499,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz", - "integrity": "sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.27.3.tgz", + "integrity": "sha512-vliZLrDmYKyaUoMzEbMTg2JkerfBjn03KmAw9CykO0Zzkzoyd7o3iZNam/TpyWNjNT+Cz2iO3P9Smv2wgrR+Eg==", "cpu": [ "x64" ], @@ -1465,9 +1520,9 @@ "license": "MIT" }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true, "license": "MIT" }, @@ -1479,13 +1534,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.6.1.tgz", - "integrity": "sha512-V48tCfcKb/e6cVUigLAaJDAILdMP0fUW6BidkPK4GpGjXcfbnoHasCZDwz3N3yVt5we2RHm4XTQCpv0KJz9zqw==", + "version": "22.9.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.1.tgz", + "integrity": "sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.19.8" } }, "node_modules/@types/resolve": { @@ -1496,17 +1551,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.7.0.tgz", - "integrity": "sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.15.0.tgz", + "integrity": "sha512-+zkm9AR1Ds9uLWN3fkoeXgFppaQ+uEVtfOV62dDmsy9QCNqlRHWNEck4yarvRNrvRcHQLGfqBNui3cimoz8XAg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/type-utils": "8.7.0", - "@typescript-eslint/utils": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/scope-manager": "8.15.0", + "@typescript-eslint/type-utils": "8.15.0", + "@typescript-eslint/utils": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -1530,16 +1585,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.7.0.tgz", - "integrity": "sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.15.0.tgz", + "integrity": "sha512-7n59qFpghG4uazrF9qtGKBZXn7Oz4sOMm8dwNWDQY96Xlm2oX67eipqcblDj+oY1lLCbf1oltMZFpUso66Kl1A==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/typescript-estree": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/scope-manager": "8.15.0", + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/typescript-estree": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", "debug": "^4.3.4" }, "engines": { @@ -1559,14 +1614,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.7.0.tgz", - "integrity": "sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.15.0.tgz", + "integrity": "sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0" + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1577,14 +1632,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.7.0.tgz", - "integrity": "sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.15.0.tgz", + "integrity": "sha512-UU6uwXDoI3JGSXmcdnP5d8Fffa2KayOhUUqr/AiBnG1Gl7+7ut/oyagVeSkh7bxQ0zSXV9ptRh/4N15nkCqnpw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.7.0", - "@typescript-eslint/utils": "8.7.0", + "@typescript-eslint/typescript-estree": "8.15.0", + "@typescript-eslint/utils": "8.15.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -1595,6 +1650,9 @@ "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, "peerDependenciesMeta": { "typescript": { "optional": true @@ -1602,9 +1660,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.7.0.tgz", - "integrity": "sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.15.0.tgz", + "integrity": "sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==", "dev": true, "license": "MIT", "engines": { @@ -1616,14 +1674,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.7.0.tgz", - "integrity": "sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.15.0.tgz", + "integrity": "sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/visitor-keys": "8.7.0", + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/visitor-keys": "8.15.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1645,16 +1703,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.7.0.tgz", - "integrity": "sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.15.0.tgz", + "integrity": "sha512-k82RI9yGhr0QM3Dnq+egEpz9qB6Un+WLYhmoNcvl8ltMEededhh7otBVVIDDsEEttauwdY/hQoSsOv13lxrFzQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.7.0", - "@typescript-eslint/types": "8.7.0", - "@typescript-eslint/typescript-estree": "8.7.0" + "@typescript-eslint/scope-manager": "8.15.0", + "@typescript-eslint/types": "8.15.0", + "@typescript-eslint/typescript-estree": "8.15.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1665,17 +1723,22 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.7.0.tgz", - "integrity": "sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.15.0.tgz", + "integrity": "sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.7.0", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.15.0", + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1685,23 +1748,36 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@vitest/coverage-v8": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.1.tgz", - "integrity": "sha512-md/A7A3c42oTT8JUHSqjP5uKTWJejzUW4jalpvs+rZ27gsURsMU8DEb+8Jf8C6Kj2gwfSHJqobDNBuoqlm0cFw==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-2.1.5.tgz", + "integrity": "sha512-/RoopB7XGW7UEkUndRXF87A9CwkoZAJW01pj8/3pgmDVsjMH2IKy6H1A38po9tmUlwhSyYs0az82rbKd9Yaynw==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.3.0", "@bcoe/v8-coverage": "^0.2.3", - "debug": "^4.3.6", + "debug": "^4.3.7", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", "istanbul-lib-source-maps": "^5.0.6", "istanbul-reports": "^3.1.7", - "magic-string": "^0.30.11", - "magicast": "^0.3.4", - "std-env": "^3.7.0", + "magic-string": "^0.30.12", + "magicast": "^0.3.5", + "std-env": "^3.8.0", "test-exclude": "^7.0.1", "tinyrainbow": "^1.2.0" }, @@ -1709,8 +1785,8 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/browser": "2.1.1", - "vitest": "2.1.1" + "@vitest/browser": "2.1.5", + "vitest": "2.1.5" }, "peerDependenciesMeta": { "@vitest/browser": { @@ -1719,15 +1795,15 @@ } }, "node_modules/@vitest/expect": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.1.tgz", - "integrity": "sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.1.5.tgz", + "integrity": "sha512-nZSBTW1XIdpZvEJyoP/Sy8fUg0b8od7ZpGDkTUcfJ7wz/VoZAFzFfLyxVxGFhUjJzhYqSbIpfMtl/+k/dpWa3Q==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "2.1.1", - "@vitest/utils": "2.1.1", - "chai": "^5.1.1", + "@vitest/spy": "2.1.5", + "@vitest/utils": "2.1.5", + "chai": "^5.1.2", "tinyrainbow": "^1.2.0" }, "funding": { @@ -1735,22 +1811,21 @@ } }, "node_modules/@vitest/mocker": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.1.tgz", - "integrity": "sha512-LNN5VwOEdJqCmJ/2XJBywB11DLlkbY0ooDJW3uRX5cZyYCrc4PI/ePX0iQhE3BiEGiQmK4GE7Q/PqCkkaiPnrA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-2.1.5.tgz", + "integrity": "sha512-XYW6l3UuBmitWqSUXTNXcVBUCRytDogBsWuNXQijc00dtnU/9OqpXWp4OJroVrad/gLIomAq9aW8yWDBtMthhQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "^2.1.0-beta.1", + "@vitest/spy": "2.1.5", "estree-walker": "^3.0.3", - "magic-string": "^0.30.11" + "magic-string": "^0.30.12" }, "funding": { "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/spy": "2.1.1", - "msw": "^2.3.5", + "msw": "^2.4.9", "vite": "^5.0.0" }, "peerDependenciesMeta": { @@ -1773,9 +1848,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.1.tgz", - "integrity": "sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.5.tgz", + "integrity": "sha512-4ZOwtk2bqG5Y6xRGHcveZVr+6txkH7M2e+nPFd6guSoN638v/1XQ0K06eOpi0ptVU/2tW/pIU4IoPotY/GZ9fw==", "dev": true, "license": "MIT", "dependencies": { @@ -1786,13 +1861,13 @@ } }, "node_modules/@vitest/runner": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.1.tgz", - "integrity": "sha512-uTPuY6PWOYitIkLPidaY5L3t0JJITdGTSwBtwMjKzo5O6RCOEncz9PUN+0pDidX8kTHYjO0EwUIvhlGpnGpxmA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.1.5.tgz", + "integrity": "sha512-pKHKy3uaUdh7X6p1pxOkgkVAFW7r2I818vHDthYLvUyjRfkKOU6P45PztOch4DZarWQne+VOaIMwA/erSSpB9g==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "2.1.1", + "@vitest/utils": "2.1.5", "pathe": "^1.1.2" }, "funding": { @@ -1800,14 +1875,14 @@ } }, "node_modules/@vitest/snapshot": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.1.tgz", - "integrity": "sha512-BnSku1WFy7r4mm96ha2FzN99AZJgpZOWrAhtQfoxjUU5YMRpq1zmHRq7a5K9/NjqonebO7iVDla+VvZS8BOWMw==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.1.5.tgz", + "integrity": "sha512-zmYw47mhfdfnYbuhkQvkkzYroXUumrwWDGlMjpdUr4jBd3HZiV2w7CQHj+z7AAS4VOtWxI4Zt4bWt4/sKcoIjg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.1.1", - "magic-string": "^0.30.11", + "@vitest/pretty-format": "2.1.5", + "magic-string": "^0.30.12", "pathe": "^1.1.2" }, "funding": { @@ -1815,27 +1890,27 @@ } }, "node_modules/@vitest/spy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.1.tgz", - "integrity": "sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.1.5.tgz", + "integrity": "sha512-aWZF3P0r3w6DiYTVskOYuhBc7EMc3jvn1TkBg8ttylFFRqNN2XGD7V5a4aQdk6QiUzZQ4klNBSpCLJgWNdIiNw==", "dev": true, "license": "MIT", "dependencies": { - "tinyspy": "^3.0.0" + "tinyspy": "^3.0.2" }, "funding": { "url": "https://opencollective.com/vitest" } }, "node_modules/@vitest/utils": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.1.tgz", - "integrity": "sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.5.tgz", + "integrity": "sha512-yfj6Yrp0Vesw2cwJbP+cl04OC+IHFsuQsrsJBL9pyGeQXE56v1UAOQco+SR55Vf1nQzfV0QJg1Qum7AaWUwwYg==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.1.1", - "loupe": "^3.1.1", + "@vitest/pretty-format": "2.1.5", + "loupe": "^3.1.2", "tinyrainbow": "^1.2.0" }, "funding": { @@ -1843,9 +1918,9 @@ } }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, "license": "MIT", "bin": { @@ -2092,9 +2167,9 @@ } }, "node_modules/chai": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz", - "integrity": "sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz", + "integrity": "sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==", "dev": true, "license": "MIT", "dependencies": { @@ -2298,21 +2373,6 @@ } } }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/data-view-buffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", @@ -2573,6 +2633,13 @@ "node": ">= 0.4" } }, + "node_modules/es-module-lexer": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true, + "license": "MIT" + }, "node_modules/es-object-atoms": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", @@ -2683,32 +2750,32 @@ } }, "node_modules/eslint": { - "version": "9.11.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.11.1.tgz", - "integrity": "sha512-MobhYKIoAO1s1e4VUrgx1l1Sk2JBR/Gqjjgw8+mfgoLE2xwsHur4gdfTxyTgShrhvdVFTaJSgMiQBl1jv/AWxg==", + "version": "9.15.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.15.0.tgz", + "integrity": "sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.11.0", - "@eslint/config-array": "^0.18.0", - "@eslint/core": "^0.6.0", - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "9.11.1", - "@eslint/plugin-kit": "^0.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.9.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.15.0", + "@eslint/plugin-kit": "^0.2.3", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.3.0", - "@nodelib/fs.walk": "^1.2.8", + "@humanwhocodes/retry": "^0.4.1", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.5", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.0.2", - "eslint-visitor-keys": "^4.0.0", - "espree": "^10.1.0", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -2718,14 +2785,11 @@ "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" @@ -2790,9 +2854,9 @@ } }, "node_modules/eslint-scope": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", - "integrity": "sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -2819,13 +2883,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true, - "license": "MIT" - }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2837,10 +2894,25 @@ "concat-map": "0.0.1" } }, + "node_modules/eslint/node_modules/cross-spawn": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2864,15 +2936,15 @@ } }, "node_modules/espree": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", - "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.12.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.0.0" + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2882,9 +2954,9 @@ } }, "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2947,6 +3019,16 @@ "node": ">=0.10.0" } }, + "node_modules/expect-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.1.0.tgz", + "integrity": "sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -3121,6 +3203,21 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/foreground-child/node_modules/cross-spawn": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3192,16 +3289,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, "node_modules/get-intrinsic": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", @@ -3307,9 +3394,9 @@ } }, "node_modules/globals": { - "version": "15.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.9.0.tgz", - "integrity": "sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==", + "version": "15.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.12.0.tgz", + "integrity": "sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==", "dev": true, "license": "MIT", "engines": { @@ -3730,16 +3817,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-reference": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", @@ -4082,14 +4159,11 @@ "license": "MIT" }, "node_modules/loupe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz", - "integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.2.tgz", + "integrity": "sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==", "dev": true, - "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.1" - } + "license": "MIT" }, "node_modules/lru-cache": { "version": "11.0.1", @@ -4102,9 +4176,9 @@ } }, "node_modules/magic-string": { - "version": "0.30.11", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz", - "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", + "version": "0.30.13", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.13.tgz", + "integrity": "sha512-8rYBO+MsWkgjDSOvLomYnzhdwEG51olQ4zL5KXnNJWV5MNmrb4rTZdrtkhxjnD/QyZUqR/Z/XDsUs/4ej2nx0g==", "dev": true, "license": "MIT", "dependencies": { @@ -4112,14 +4186,14 @@ } }, "node_modules/magicast": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.4.tgz", - "integrity": "sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz", + "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.24.4", - "@babel/types": "^7.24.0", + "@babel/parser": "^7.25.4", + "@babel/types": "^7.25.4", "source-map-js": "^1.2.0" } }, @@ -4257,13 +4331,6 @@ "dev": true, "license": "MIT" }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true, - "license": "MIT" - }, "node_modules/noms": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", @@ -4381,20 +4448,18 @@ "license": "MIT" }, "node_modules/npm-run-all/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", "dev": true, "license": "MIT", "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": ">=4.8" + "node": ">= 8" } }, "node_modules/npm-run-all/node_modules/escape-string-regexp": { @@ -4430,49 +4495,6 @@ "node": "*" } }, - "node_modules/npm-run-all/node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-all/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/npm-run-all/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-all/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/npm-run-all/node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -4486,19 +4508,6 @@ "node": ">=4" } }, - "node_modules/npm-run-all/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, "node_modules/object-inspect": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", @@ -4712,9 +4721,9 @@ } }, "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true, "license": "ISC" }, @@ -4724,8 +4733,6 @@ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "dev": true, "license": "MIT", - "optional": true, - "peer": true, "engines": { "node": ">=12" }, @@ -4767,9 +4774,9 @@ } }, "node_modules/postcss": { - "version": "8.4.47", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", - "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", "dev": true, "funding": [ { @@ -4788,7 +4795,7 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.1.0", + "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, "engines": { @@ -5022,13 +5029,13 @@ } }, "node_modules/rollup": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.4.tgz", - "integrity": "sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==", + "version": "4.27.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.3.tgz", + "integrity": "sha512-SLsCOnlmGt9VoZ9Ek8yBK8tAdmPHeppkw+Xa7yDlCEhDTvwYei03JlWo1fdc7YTfLZ4tD8riJCUyAgTbszk1fQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.5" + "@types/estree": "1.0.6" }, "bin": { "rollup": "dist/bin/rollup" @@ -5038,22 +5045,24 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.22.4", - "@rollup/rollup-android-arm64": "4.22.4", - "@rollup/rollup-darwin-arm64": "4.22.4", - "@rollup/rollup-darwin-x64": "4.22.4", - "@rollup/rollup-linux-arm-gnueabihf": "4.22.4", - "@rollup/rollup-linux-arm-musleabihf": "4.22.4", - "@rollup/rollup-linux-arm64-gnu": "4.22.4", - "@rollup/rollup-linux-arm64-musl": "4.22.4", - "@rollup/rollup-linux-powerpc64le-gnu": "4.22.4", - "@rollup/rollup-linux-riscv64-gnu": "4.22.4", - "@rollup/rollup-linux-s390x-gnu": "4.22.4", - "@rollup/rollup-linux-x64-gnu": "4.22.4", - "@rollup/rollup-linux-x64-musl": "4.22.4", - "@rollup/rollup-win32-arm64-msvc": "4.22.4", - "@rollup/rollup-win32-ia32-msvc": "4.22.4", - "@rollup/rollup-win32-x64-msvc": "4.22.4", + "@rollup/rollup-android-arm-eabi": "4.27.3", + "@rollup/rollup-android-arm64": "4.27.3", + "@rollup/rollup-darwin-arm64": "4.27.3", + "@rollup/rollup-darwin-x64": "4.27.3", + "@rollup/rollup-freebsd-arm64": "4.27.3", + "@rollup/rollup-freebsd-x64": "4.27.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.27.3", + "@rollup/rollup-linux-arm-musleabihf": "4.27.3", + "@rollup/rollup-linux-arm64-gnu": "4.27.3", + "@rollup/rollup-linux-arm64-musl": "4.27.3", + "@rollup/rollup-linux-powerpc64le-gnu": "4.27.3", + "@rollup/rollup-linux-riscv64-gnu": "4.27.3", + "@rollup/rollup-linux-s390x-gnu": "4.27.3", + "@rollup/rollup-linux-x64-gnu": "4.27.3", + "@rollup/rollup-linux-x64-musl": "4.27.3", + "@rollup/rollup-win32-arm64-msvc": "4.27.3", + "@rollup/rollup-win32-ia32-msvc": "4.27.3", + "@rollup/rollup-win32-x64-msvc": "4.27.3", "fsevents": "~2.3.2" } }, @@ -5323,9 +5332,9 @@ "license": "MIT" }, "node_modules/std-env": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", - "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", + "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==", "dev": true, "license": "MIT" }, @@ -5648,13 +5657,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "license": "MIT" - }, "node_modules/through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", @@ -5707,16 +5709,16 @@ "license": "MIT" }, "node_modules/tinyexec": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.0.tgz", - "integrity": "sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz", + "integrity": "sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==", "dev": true, "license": "MIT" }, "node_modules/tinypool": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.1.tgz", - "integrity": "sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz", + "integrity": "sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==", "dev": true, "license": "MIT", "engines": { @@ -5743,16 +5745,6 @@ "node": ">=14.0.0" } }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -5786,9 +5778,9 @@ "license": "0BSD" }, "node_modules/tsx": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.1.tgz", - "integrity": "sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.2.tgz", + "integrity": "sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==", "dev": true, "license": "MIT", "dependencies": { @@ -5896,9 +5888,9 @@ } }, "node_modules/typescript": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -5971,9 +5963,9 @@ } }, "node_modules/vite": { - "version": "5.4.7", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.7.tgz", - "integrity": "sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ==", + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", "dev": true, "license": "MIT", "dependencies": { @@ -6031,14 +6023,15 @@ } }, "node_modules/vite-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.1.tgz", - "integrity": "sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.1.5.tgz", + "integrity": "sha512-rd0QIgx74q4S1Rd56XIiL2cYEdyWn13cunYBIuqh9mpmQr7gGS0IxXoP8R6OaZtNQQLyXSWbd4rXKYUbhFpK5w==", "dev": true, "license": "MIT", "dependencies": { "cac": "^6.7.14", - "debug": "^4.3.6", + "debug": "^4.3.7", + "es-module-lexer": "^1.5.4", "pathe": "^1.1.2", "vite": "^5.0.0" }, @@ -6483,30 +6476,31 @@ } }, "node_modules/vitest": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.1.tgz", - "integrity": "sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/expect": "2.1.1", - "@vitest/mocker": "2.1.1", - "@vitest/pretty-format": "^2.1.1", - "@vitest/runner": "2.1.1", - "@vitest/snapshot": "2.1.1", - "@vitest/spy": "2.1.1", - "@vitest/utils": "2.1.1", - "chai": "^5.1.1", - "debug": "^4.3.6", - "magic-string": "^0.30.11", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.1.5.tgz", + "integrity": "sha512-P4ljsdpuzRTPI/kbND2sDZ4VmieerR2c9szEZpjc+98Z9ebvnXmM5+0tHEKqYZumXqlvnmfWsjeFOjXVriDG7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "2.1.5", + "@vitest/mocker": "2.1.5", + "@vitest/pretty-format": "^2.1.5", + "@vitest/runner": "2.1.5", + "@vitest/snapshot": "2.1.5", + "@vitest/spy": "2.1.5", + "@vitest/utils": "2.1.5", + "chai": "^5.1.2", + "debug": "^4.3.7", + "expect-type": "^1.1.0", + "magic-string": "^0.30.12", "pathe": "^1.1.2", - "std-env": "^3.7.0", + "std-env": "^3.8.0", "tinybench": "^2.9.0", - "tinyexec": "^0.3.0", - "tinypool": "^1.0.0", + "tinyexec": "^0.3.1", + "tinypool": "^1.0.1", "tinyrainbow": "^1.2.0", "vite": "^5.0.0", - "vite-node": "2.1.1", + "vite-node": "2.1.5", "why-is-node-running": "^2.3.0" }, "bin": { @@ -6521,8 +6515,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "2.1.1", - "@vitest/ui": "2.1.1", + "@vitest/browser": "2.1.5", + "@vitest/ui": "2.1.5", "happy-dom": "*", "jsdom": "*" }, diff --git a/packages/algo-ts/package.json b/packages/algo-ts/package.json index 232fd38c..f42b3399 100644 --- a/packages/algo-ts/package.json +++ b/packages/algo-ts/package.json @@ -21,36 +21,37 @@ "test": "vitest run" }, "devDependencies": { - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "^9.11.1", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "^9.15.0", "@makerx/eslint-config": "4.0.0", "@makerx/prettier-config": "2.0.1", - "@makerx/ts-toolkit": "^4.0.0-beta.20", - "@rollup/plugin-commonjs": "28.0.0", + "@makerx/ts-toolkit": "^4.0.0-beta.21", + "@rollup/plugin-commonjs": "28.0.1", "@rollup/plugin-json": "6.1.0", "@rollup/plugin-node-resolve": "15.3.0", - "@rollup/plugin-typescript": "12.1.0", + "@rollup/plugin-typescript": "12.1.1", "@tsconfig/node20": "20.1.4", - "@types/node": "22.6.1", - "@typescript-eslint/eslint-plugin": "8.7.0", - "@typescript-eslint/parser": "8.7.0", - "@vitest/coverage-v8": "2.1.1", + "@types/node": "22.9.1", + "@typescript-eslint/eslint-plugin": "8.15.0", + "@typescript-eslint/parser": "8.15.0", + "@vitest/coverage-v8": "2.1.5", "better-npm-audit": "3.11.0", "copyfiles": "2.4.1", - "eslint": "9.11.1", + "eslint": "9.15.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", - "globals": "^15.9.0", + "globals": "^15.12.0", "npm-run-all": "4.1.5", "prettier": "3.3.3", "rimraf": "6.0.1", - "rollup": "4.22.4", - "tsx": "4.19.1", - "typescript": "^5.6.2", - "vitest": "2.1.1" + "rollup": "4.27.3", + "tsx": "4.19.2", + "typescript": "^5.6.3", + "vitest": "2.1.5" }, "overrides": { - "micromatch": "4.0.8" + "micromatch": "4.0.8", + "cross-spawn": "7.0.5" }, "peerDependencies": { "tslib": "^2.6.2" diff --git a/tests/approvals/out/arc4-struct/StructDemo.approval.teal b/tests/approvals/out/arc4-struct/StructDemo.approval.teal index ce5ed86e..ddb6eb49 100644 --- a/tests/approvals/out/arc4-struct/StructDemo.approval.teal +++ b/tests/approvals/out/arc4-struct/StructDemo.approval.teal @@ -1,67 +1,44 @@ #pragma version 10 tests/approvals/arc4-struct.algo.ts::StructDemo.approvalProgram: - intcblock 0 8 1 - bytecblock 0x 0x0000000000000000 - txn ApplicationID - bnz main_after_if_else@2 - callsub constructor - -main_after_if_else@2: + intcblock 1 0 + bytecblock 0x0000000000000000 callsub __puya_arc4_router__ return -// tests/approvals/arc4-struct.algo.ts::StructDemo.constructor() -> void: -constructor: - // tests/approvals/arc4-struct.algo.ts:9 - // class StructDemo extends Contract { - proto 0 0 - retsub - - // tests/approvals/arc4-struct.algo.ts::StructDemo.__puya_arc4_router__() -> uint64: __puya_arc4_router__: // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { proto 0 1 txn NumAppArgs - intc_0 // 0 - != bz __puya_arc4_router___bare_routing@7 + pushbytess 0x89388ddd 0xef322d6d 0xcb81deb8 // method "testVectorCreationAndEquality()void", method "addVectors((uint64,uint64),(uint64,uint64))(uint64,uint64)", method "implicitCastingAndSpreading((uint64,uint64))void" txna ApplicationArgs 0 - pushbytes 0x89388ddd // method "testVectorCreationAndEquality()void" - pushbytes 0xef322d6d // method "addVectors((uint64,uint64),(uint64,uint64))(uint64,uint64)" - pushbytes 0xcb81deb8 // method "implicitCastingAndSpreading((uint64,uint64))void" - uncover 3 match __puya_arc4_router___testVectorCreationAndEquality_route@2 __puya_arc4_router___addVectors_route@3 __puya_arc4_router___implicitCastingAndSpreading_route@4 - b __puya_arc4_router___switch_case_default@5 + intc_1 // 0 + retsub __puya_arc4_router___testVectorCreationAndEquality_route@2: // tests/approvals/arc4-struct.algo.ts:10 // public testVectorCreationAndEquality() { txn OnCompletion - intc_0 // NoOp - == + ! assert // OnCompletion is not NoOp txn ApplicationID - intc_0 // 0 - != assert // can only call when not creating callsub testVectorCreationAndEquality - intc_2 // 1 + intc_0 // 1 retsub __puya_arc4_router___addVectors_route@3: // tests/approvals/arc4-struct.algo.ts:18 // public addVectors(v1: Vector, v2: Vector) { txn OnCompletion - intc_0 // NoOp - == + ! assert // OnCompletion is not NoOp txn ApplicationID - intc_0 // 0 - != assert // can only call when not creating // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { @@ -74,19 +51,16 @@ __puya_arc4_router___addVectors_route@3: swap concat log - intc_2 // 1 + intc_0 // 1 retsub __puya_arc4_router___implicitCastingAndSpreading_route@4: // tests/approvals/arc4-struct.algo.ts:25 // public implicitCastingAndSpreading(v1: Vector) { txn OnCompletion - intc_0 // NoOp - == + ! assert // OnCompletion is not NoOp txn ApplicationID - intc_0 // 0 - != assert // can only call when not creating // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { @@ -94,38 +68,24 @@ __puya_arc4_router___implicitCastingAndSpreading_route@4: // tests/approvals/arc4-struct.algo.ts:25 // public implicitCastingAndSpreading(v1: Vector) { callsub implicitCastingAndSpreading - intc_2 // 1 + intc_0 // 1 retsub -__puya_arc4_router___switch_case_default@5: - b __puya_arc4_router___after_if_else@11 - __puya_arc4_router___bare_routing@7: // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { txn OnCompletion - intc_0 // 0 - swap - match __puya_arc4_router_____algots__.defaultCreate@8 - b __puya_arc4_router___switch_case_default@9 - -__puya_arc4_router_____algots__.defaultCreate@8: - // tests/approvals/arc4-struct.algo.ts:9 - // class StructDemo extends Contract { + bnz __puya_arc4_router___after_if_else@11 txn ApplicationID - intc_0 // 0 - == + ! assert // can only call when creating - callsub __algots__.defaultCreate - intc_2 // 1 + intc_0 // 1 retsub -__puya_arc4_router___switch_case_default@9: - __puya_arc4_router___after_if_else@11: // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { - intc_0 // 0 + intc_1 // 0 retsub @@ -134,38 +94,14 @@ testVectorCreationAndEquality: // tests/approvals/arc4-struct.algo.ts:10 // public testVectorCreationAndEquality() { proto 0 0 - // tests/approvals/arc4-struct.algo.ts:11 - // const v1 = new Vector({ x: new ARC4Uint64(0), y: new ARC4Uint64(0) }) - bytec_0 // 0x - bytec_1 // 0x0000000000000000 - concat - bytec_1 // 0x0000000000000000 - concat // tests/approvals/arc4-struct.algo.ts:12 // log(v1.x) - dup - intc_0 // 0 - intc_1 // 8 - extract3 // on error: Index access is out of bounds + bytec_0 // 0x0000000000000000 log // tests/approvals/arc4-struct.algo.ts:13 // log(v1.y) - dup - intc_1 // 8 - dup - extract3 // on error: Index access is out of bounds + bytec_0 // 0x0000000000000000 log - // tests/approvals/arc4-struct.algo.ts:14 - // const v2 = new Vector({ y: new ARC4Uint64(0), x: new ARC4Uint64(0) }) - bytec_0 // 0x - bytec_1 // 0x0000000000000000 - concat - bytec_1 // 0x0000000000000000 - concat - // tests/approvals/arc4-struct.algo.ts:15 - // assert(v1.equals(v2)) - == - assert retsub @@ -177,28 +113,20 @@ addVectors: // tests/approvals/arc4-struct.algo.ts:20 // x: new ARC4Uint64(v1.x.native + v2.x.native), frame_dig -2 - intc_0 // 0 - intc_1 // 8 - extract3 // on error: Index access is out of bounds + extract 0 8 // on error: Index access is out of bounds btoi frame_dig -1 - intc_0 // 0 - intc_1 // 8 - extract3 // on error: Index access is out of bounds + extract 0 8 // on error: Index access is out of bounds btoi + itob // tests/approvals/arc4-struct.algo.ts:21 // y: new ARC4Uint64(v1.y.native + v2.y.native), frame_dig -2 - intc_1 // 8 - dup - extract3 // on error: Index access is out of bounds + extract 8 8 // on error: Index access is out of bounds btoi frame_dig -1 - intc_1 // 8 - dup - extract3 // on error: Index access is out of bounds + extract 8 8 // on error: Index access is out of bounds btoi + itob @@ -207,10 +135,6 @@ addVectors: // x: new ARC4Uint64(v1.x.native + v2.x.native), // y: new ARC4Uint64(v1.y.native + v2.y.native), // }) - bytec_0 // 0x - uncover 2 - concat - swap concat retsub @@ -223,33 +147,16 @@ implicitCastingAndSpreading: // tests/approvals/arc4-struct.algo.ts:26 // const v2 = new Vector(v1) frame_dig -1 - intc_0 // 0 - intc_1 // 8 - extract3 // on error: Index access is out of bounds + extract 0 8 // on error: Index access is out of bounds frame_dig -1 - intc_1 // 8 - dup - extract3 // on error: Index access is out of bounds - bytec_0 // 0x - uncover 2 - concat - swap + extract 8 8 // on error: Index access is out of bounds concat // tests/approvals/arc4-struct.algo.ts:27 // const v3 = new Vector({ ...v2 }) dup - intc_0 // 0 - intc_1 // 8 - extract3 // on error: Index access is out of bounds - swap - dup - intc_1 // 8 - dup - extract3 // on error: Index access is out of bounds - bytec_0 // 0x - uncover 3 - concat - swap + extract 0 8 // on error: Index access is out of bounds + dig 1 + extract 8 8 // on error: Index access is out of bounds concat // tests/approvals/arc4-struct.algo.ts:28 // assert(v1.bytes === v2.bytes) @@ -263,11 +170,3 @@ implicitCastingAndSpreading: == assert retsub - - -// tests/approvals/arc4-struct.algo.ts::StructDemo.__algots__.defaultCreate() -> void: -__algots__.defaultCreate: - // tests/approvals/arc4-struct.algo.ts:9 - // class StructDemo extends Contract { - proto 0 0 - retsub diff --git a/tests/approvals/out/arc4-struct/StructDemo.arc32.json b/tests/approvals/out/arc4-struct/StructDemo.arc32.json index b8db11e9..d1c78bc5 100644 --- a/tests/approvals/out/arc4-struct/StructDemo.arc32.json +++ b/tests/approvals/out/arc4-struct/StructDemo.arc32.json @@ -73,7 +73,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1zdHJ1Y3QuYWxnby50czo6U3RydWN0RGVtby5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCA4IDEKICAgIGJ5dGVjYmxvY2sgMHggMHgwMDAwMDAwMDAwMDAwMDAwCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fYWZ0ZXJfaWZfZWxzZUAyCiAgICBjYWxsc3ViIGNvbnN0cnVjdG9yCgptYWluX2FmdGVyX2lmX2Vsc2VAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVy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91dCBvZiBib3VuZHMKICAgIGRpZyAxCiAgICBleHRyYWN0IDggOCAvLyBvbiBlcnJvcjogSW5kZXggYWNjZXNzIGlzIG91dCBvZiBib3VuZHMKICAgIGNvbmNhdAogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6MjgKICAgIC8vIGFzc2VydCh2MS5ieXRlcyA9PT0gdjIuYnl0ZXMpCiAgICBmcmFtZV9kaWcgLTEKICAgIHVuY292ZXIgMgogICAgPT0KICAgIGFzc2VydAogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6MjkKICAgIC8vIGFzc2VydCh2My5ieXRlcyA9PT0gdjEuYnl0ZXMpCiAgICBmcmFtZV9kaWcgLTEKICAgID09CiAgICBhc3NlcnQKICAgIHJldHN1Ygo=", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1zdHJ1Y3QuYWxnby50czo6U3RydWN0RGVtby5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst b/tests/approvals/out/arc4-struct/arc4-struct.awst index 63ea7ff7..4c069db1 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst @@ -15,22 +15,22 @@ contract StructDemo testVectorCreationAndEquality(): void { - v1: Vector = new Vector(x=(#14 = { x: 0, y: 0 }).x, y=#14.y) + v1: Vector = new Vector(x=(#0 = { x: 0, y: 0 }).x, y=#0.y) log(reinterpret_cast(v1.x)) log(reinterpret_cast(v1.y)) - v2: Vector = new Vector(x=(#16 = { x: (#15 = { y: 0, x: 0 }).x, y: #15.y }).x, y=#16.y) + v2: Vector = new Vector(x=(#2 = { x: (#1 = { y: 0, x: 0 }).x, y: #1.y }).x, y=#2.y) assert(reinterpret_cast(v1) == reinterpret_cast(v2)) } addVectors(): Vector { - return new Vector(x=(#17 = { x: ARC4_ENCODE(ARC4_DECODE(v1.x) + ARC4_DECODE(v2.x), wtype=arc4.uint64), y: ARC4_ENCODE(ARC4_DECODE(v1.y) + ARC4_DECODE(v2.y), wtype=arc4.uint64) }).x, y=#17.y) + return new Vector(x=(#3 = { x: ARC4_ENCODE(ARC4_DECODE(v1.x) + ARC4_DECODE(v2.x), wtype=arc4.uint64), y: ARC4_ENCODE(ARC4_DECODE(v1.y) + ARC4_DECODE(v2.y), wtype=arc4.uint64) }).x, y=#3.y) } implicitCastingAndSpreading(): void { - v2: Vector = new Vector(x=(#18 = ARC4_DECODE(v1)).x, y=#18.y) - v3: Vector = new Vector(x=(#19 = { x: v2.x, y: v2.y }).x, y=#19.y) + v2: Vector = new Vector(x=(#4 = ARC4_DECODE(v1)).x, y=#4.y) + v3: Vector = new Vector(x=(#5 = { x: v2.x, y: v2.y }).x, y=#5.y) assert(reinterpret_cast(v1) == reinterpret_cast(v2)) assert(reinterpret_cast(v3) == reinterpret_cast(v1)) } diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst.json b/tests/approvals/out/arc4-struct/arc4-struct.awst.json index 7266b773..d1bf6791 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst.json +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst.json @@ -648,7 +648,7 @@ } ] }, - "id": "14" + "id": "0" }, "name": "x" }, @@ -844,7 +844,7 @@ } ] }, - "id": "14" + "id": "0" }, "name": "y" } @@ -1585,7 +1585,7 @@ } ] }, - "id": "15" + "id": "1" }, "name": "x" }, @@ -1781,13 +1781,13 @@ } ] }, - "id": "15" + "id": "1" }, "name": "y" } ] }, - "id": "16" + "id": "2" }, "name": "x" }, @@ -2117,7 +2117,7 @@ } ] }, - "id": "15" + "id": "1" }, "name": "x" }, @@ -2313,13 +2313,13 @@ } ] }, - "id": "15" + "id": "1" }, "name": "y" } ] }, - "id": "16" + "id": "2" }, "name": "y" } @@ -3480,7 +3480,7 @@ } ] }, - "id": "17" + "id": "3" }, "name": "x" }, @@ -4132,7 +4132,7 @@ } ] }, - "id": "17" + "id": "3" }, "name": "y" } @@ -4629,7 +4629,7 @@ "name": "v1" } }, - "id": "18" + "id": "4" }, "name": "x" }, @@ -4829,7 +4829,7 @@ "name": "v1" } }, - "id": "18" + "id": "4" }, "name": "y" } @@ -5282,7 +5282,7 @@ } ] }, - "id": "19" + "id": "5" }, "name": "x" }, @@ -5600,7 +5600,7 @@ } ] }, - "id": "19" + "id": "5" }, "name": "y" } diff --git a/tests/approvals/out/biguint-expressions/DemoContract.ssa.ir b/tests/approvals/out/biguint-expressions/DemoContract.ssa.ir new file mode 100644 index 00000000..f2346e3b --- /dev/null +++ b/tests/approvals/out/biguint-expressions/DemoContract.ssa.ir @@ -0,0 +1,33 @@ +contract tests/approvals/biguint-expressions.algo.ts::DemoContract: + program approval: + subroutine tests/approvals/biguint-expressions.algo.ts::DemoContract.approvalProgram() -> bool: + block@0: // L22 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/biguint-expressions.algo.ts::DemoContract.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bytes = (itob 4u) + tests/approvals/biguint-expressions.algo.ts::test(1u, 0u, tmp%0#0) + return 1u + + subroutine tests/approvals/biguint-expressions.algo.ts::DemoContract.constructor() -> void: + block@0: // L21 + return + + subroutine tests/approvals/biguint-expressions.algo.ts::test(a: uint64, b: bool, c: bytes) -> void: + block@0: // L5 + let reinterpret_biguint%0#0: biguint = (itob 1u) + let reinterpret_biguint%1#0: biguint = (itob 0u) + let reinterpret_biguint%2#0: biguint = (itob a#0) + let tmp%0#0: uint64 = (* a#0 a#0) + let reinterpret_biguint%3#0: biguint = (itob tmp%0#0) + let reinterpret_biguint%4#0: biguint = (itob b#0) + let reinterpret_biguint%5#0: biguint = c#0 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file From fadeeccfe5cd4d2d01ebf8e936fb2d2a43c95017 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Thu, 21 Nov 2024 14:34:25 -0800 Subject: [PATCH 09/30] fix: itob for uint64 should return 8 bytes when evaluating to a constant --- src/awst/intrinsic-factory.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/awst/intrinsic-factory.ts b/src/awst/intrinsic-factory.ts index 7eb6bc80..49cee9da 100644 --- a/src/awst/intrinsic-factory.ts +++ b/src/awst/intrinsic-factory.ts @@ -68,7 +68,7 @@ export const intrinsicFactory = { if (value instanceof awst.IntegerConstant) { return nodeFactory.bytesConstant({ sourceLocation, - value: bigIntToUint8Array(value.value), + value: bigIntToUint8Array(value.value, value.wtype.equals(wtypes.uint64WType) ? 8 : 'dynamic'), encoding: BytesEncoding.base16, }) } From 991547c20397f4515e608e9aed67e3dd55f862e0 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Thu, 21 Nov 2024 15:17:43 -0800 Subject: [PATCH 10/30] test: Expand test coverage of primitives --- package.json | 2 +- src/awst/wtypes.ts | 2 +- tests/approvals/biguint-expressions.algo.ts | 18 +- tests/approvals/byte-expressions.algo.ts | 17 +- tests/approvals/out/accounts/accounts.awst | 2 +- .../out/arc4-struct/arc4-struct.awst | 10 +- .../out/arc4-struct/arc4-struct.awst.json | 68 +- .../DemoContract.approval.teal | 56 +- .../biguint-expressions/DemoContract.ssa.ir | 28 +- .../biguint-expressions.awst | 14 +- .../biguint-expressions.awst.json | 1159 ++++++++++++++--- .../DemoContract.approval.teal | 7 + .../byte-expressions/DemoContract.clear.teal | 5 + .../out/byte-expressions/DemoContract.ssa.ir | 47 + .../byte-expressions/byte-expressions.awst | 29 +- .../byte-expressions.awst.json | 577 +++++++- .../destructured-params.awst.json | 14 +- .../destructuring-iterators.awst.json | 26 +- .../out/local-state/local-state.awst.json | 14 +- .../out/named-types/named-types.awst.json | 16 +- .../object-destructuring.awst.json | 206 +-- .../property-ordering.awst.json | 12 +- .../out/strings/StringContract.approval.teal | 166 +++ .../out/strings/StringContract.arc32.json | 77 ++ .../out/strings/StringContract.clear.teal | 5 + .../out/strings/StringContract.ssa.ir | 99 ++ tests/approvals/out/strings/strings.awst | 44 + tests/approvals/out/strings/strings.awst.json | 858 ++++++++++++ tests/approvals/strings.algo.ts | 11 + tests/onchain/primitives.spec.ts | 37 +- 30 files changed, 3185 insertions(+), 441 deletions(-) create mode 100644 tests/approvals/out/byte-expressions/DemoContract.approval.teal create mode 100644 tests/approvals/out/byte-expressions/DemoContract.clear.teal create mode 100644 tests/approvals/out/byte-expressions/DemoContract.ssa.ir create mode 100644 tests/approvals/out/strings/StringContract.approval.teal create mode 100644 tests/approvals/out/strings/StringContract.arc32.json create mode 100644 tests/approvals/out/strings/StringContract.clear.teal create mode 100644 tests/approvals/out/strings/StringContract.ssa.ir create mode 100644 tests/approvals/out/strings/strings.awst create mode 100644 tests/approvals/out/strings/strings.awst.json create mode 100644 tests/approvals/strings.algo.ts diff --git a/package.json b/package.json index 15ccd71f..fb3225ad 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dev:examples": "tsx src/cli.ts build examples --output-awst --output-awst-json", "dev:approvals": "rimraf tests/approvals/out && tsx src/cli.ts build tests/approvals --output-awst --output-awst-json --output-ssa-ir --out-dir out/[name] --optimization-level 0", "dev:expected-output": "tsx src/cli.ts build tests/expected-output --dry-run", - "dev:testing": "tsx src/cli.ts build tests/approvals/accounts.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name]", + "dev:testing": "tsx src/cli.ts build tests/approvals/biguint-expressions.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name]", "audit": "better-npm-audit audit", "format": "prettier --write .", "lint": "eslint \"src/**/*.ts\"", diff --git a/src/awst/wtypes.ts b/src/awst/wtypes.ts index 86dad2ea..90f15146 100644 --- a/src/awst/wtypes.ts +++ b/src/awst/wtypes.ts @@ -159,7 +159,7 @@ export namespace wtypes { toString(): string { if (this.names) { - return `${this.name ?? ''}{ ${this.names.map((n, i) => `${n}: ${this.types[i]}`).join(', ')} }` + return `${this.name === 'Anonymous' ? '' : this.name}{ ${this.names.map((n, i) => `${n}: ${this.types[i]}`).join(', ')} }` } return `${this.immutable ? 'readonly' : ''}${this.name ?? ''}[${this.types.join(', ')}]` } diff --git a/tests/approvals/biguint-expressions.algo.ts b/tests/approvals/biguint-expressions.algo.ts index 338c8ae5..ae1c269b 100644 --- a/tests/approvals/biguint-expressions.algo.ts +++ b/tests/approvals/biguint-expressions.algo.ts @@ -1,8 +1,8 @@ -import type { bytes, uint64 } from '@algorandfoundation/algorand-typescript' -import { BaseContract, BigUint } from '@algorandfoundation/algorand-typescript' +import type { biguint, bytes, uint64 } from '@algorandfoundation/algorand-typescript' +import { assert, BaseContract, BigUint, Bytes, op } from '@algorandfoundation/algorand-typescript' import { itob } from '@algorandfoundation/algorand-typescript/op' -function test(a: uint64, b: boolean, c: bytes) { +function testConstructor(a: uint64, b: boolean, c: bytes) { BigUint() BigUint(true) BigUint(false) @@ -18,9 +18,19 @@ function test(a: uint64, b: boolean, c: bytes) { BigUint(c) } +function testOps(smaller: biguint, larger: biguint) { + assert(smaller < larger) + assert(smaller <= smaller) + assert(larger > smaller) + assert(larger >= larger) + assert(smaller === BigUint(smaller)) + assert(smaller === BigUint(op.bzero(4).concat(Bytes(smaller))), 'Leading zeros should be ignored in equality') +} + class DemoContract extends BaseContract { public approvalProgram() { - test(1, false, itob(4)) + testConstructor(1, false, itob(4)) + testOps(500n, 1000n) return true } } diff --git a/tests/approvals/byte-expressions.algo.ts b/tests/approvals/byte-expressions.algo.ts index 6d088883..4c213e4a 100644 --- a/tests/approvals/byte-expressions.algo.ts +++ b/tests/approvals/byte-expressions.algo.ts @@ -1,13 +1,20 @@ import type { biguint, uint64 } from '@algorandfoundation/algorand-typescript' -import { assert, BigUint, Bytes, op, Uint64 } from '@algorandfoundation/algorand-typescript' +import { assert, BaseContract, BigUint, Bytes, op, Uint64 } from '@algorandfoundation/algorand-typescript' function test(a: uint64, b: biguint, c: string) { - assert(Bytes().length === 0) - assert(Bytes(a) === op.itob(a)) - assert(Bytes(Uint64(1)) === Bytes.fromHex('0000000000000001')) + assert(Bytes().length === 0, 'Empty bytes has length of 0') + assert(Bytes(a) === op.itob(a), 'Bytes(uint64) is equivalent to itob') + assert(Bytes(Uint64(1)) === Bytes.fromHex('0000000000000001'), 'Bytes(uint64) returns an 8 byte encoding') assert(Bytes(BigUint(256)) === Bytes.fromHex('0100')) - assert(BigUint(Bytes(b)) === b) + assert(BigUint(Bytes(b)) === b, 'Round trip of biguint to bytes and back results in the same value') assert(String(Bytes(c)) === c) assert(Bytes(Bytes('123')) === Bytes('123')) assert(Bytes([1, 2, 3, 4]) === Bytes.fromHex('01020304')) } + +class DemoContract extends BaseContract { + public approvalProgram() { + test(1, 50n, 'things') + return true + } +} diff --git a/tests/approvals/out/accounts/accounts.awst b/tests/approvals/out/accounts/accounts.awst index 75951b03..0d7eac48 100644 --- a/tests/approvals/out/accounts/accounts.awst +++ b/tests/approvals/out/accounts/accounts.awst @@ -13,7 +13,7 @@ contract AccountsContract return True } - getAccountInfo(): Anonymous{ bytes: bytes, balance: uint64, minBalance: uint64, authAddress: bytes, totalNumUint: uint64, totalNumByteSlice: uint64, totalExtraAppPages: uint64, totalAppsCreated: uint64, totalAppsOptedIn: uint64, totalAssetsCreated: uint64, totalAssets: uint64, totalBoxes: uint64, totalBoxBytes: uint64, isOptInApp: bool, isOptInAsset: bool } + getAccountInfo(): { bytes: bytes, balance: uint64, minBalance: uint64, authAddress: bytes, totalNumUint: uint64, totalNumByteSlice: uint64, totalExtraAppPages: uint64, totalAppsCreated: uint64, totalAppsOptedIn: uint64, totalAssetsCreated: uint64, totalAssets: uint64, totalBoxes: uint64, totalBoxBytes: uint64, isOptInApp: bool, isOptInAsset: bool } { return { bytes: reinterpret_cast(account), balance: checked_maybe(acct_params_get(account), comment=account funded), minBalance: checked_maybe(acct_params_get(account), comment=account funded), authAddress: reinterpret_cast(checked_maybe(acct_params_get(account), comment=account funded)), totalNumUint: checked_maybe(acct_params_get(account), comment=account funded), totalNumByteSlice: checked_maybe(acct_params_get(account), comment=account funded), totalExtraAppPages: checked_maybe(acct_params_get(account), comment=account funded), totalAppsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAppsOptedIn: checked_maybe(acct_params_get(account), comment=account funded), totalAssetsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAssets: checked_maybe(acct_params_get(account), comment=account funded), totalBoxes: checked_maybe(acct_params_get(account), comment=account funded), totalBoxBytes: checked_maybe(acct_params_get(account), comment=account funded), isOptInApp: app_opted_in(account, global()), isOptInAsset: asset_holding_get(account, asset).1 } } diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst b/tests/approvals/out/arc4-struct/arc4-struct.awst index 4c069db1..63ea7ff7 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst @@ -15,22 +15,22 @@ contract StructDemo testVectorCreationAndEquality(): void { - v1: Vector = new Vector(x=(#0 = { x: 0, y: 0 }).x, y=#0.y) + v1: Vector = new Vector(x=(#14 = { x: 0, y: 0 }).x, y=#14.y) log(reinterpret_cast(v1.x)) log(reinterpret_cast(v1.y)) - v2: Vector = new Vector(x=(#2 = { x: (#1 = { y: 0, x: 0 }).x, y: #1.y }).x, y=#2.y) + v2: Vector = new Vector(x=(#16 = { x: (#15 = { y: 0, x: 0 }).x, y: #15.y }).x, y=#16.y) assert(reinterpret_cast(v1) == reinterpret_cast(v2)) } addVectors(): Vector { - return new Vector(x=(#3 = { x: ARC4_ENCODE(ARC4_DECODE(v1.x) + ARC4_DECODE(v2.x), wtype=arc4.uint64), y: ARC4_ENCODE(ARC4_DECODE(v1.y) + ARC4_DECODE(v2.y), wtype=arc4.uint64) }).x, y=#3.y) + return new Vector(x=(#17 = { x: ARC4_ENCODE(ARC4_DECODE(v1.x) + ARC4_DECODE(v2.x), wtype=arc4.uint64), y: ARC4_ENCODE(ARC4_DECODE(v1.y) + ARC4_DECODE(v2.y), wtype=arc4.uint64) }).x, y=#17.y) } implicitCastingAndSpreading(): void { - v2: Vector = new Vector(x=(#4 = ARC4_DECODE(v1)).x, y=#4.y) - v3: Vector = new Vector(x=(#5 = { x: v2.x, y: v2.y }).x, y=#5.y) + v2: Vector = new Vector(x=(#18 = ARC4_DECODE(v1)).x, y=#18.y) + v3: Vector = new Vector(x=(#19 = { x: v2.x, y: v2.y }).x, y=#19.y) assert(reinterpret_cast(v1) == reinterpret_cast(v2)) assert(reinterpret_cast(v3) == reinterpret_cast(v1)) } diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst.json b/tests/approvals/out/arc4-struct/arc4-struct.awst.json index d1bf6791..5521c5d7 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst.json +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst.json @@ -492,7 +492,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -546,7 +546,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -648,7 +648,7 @@ } ] }, - "id": "0" + "id": "14" }, "name": "x" }, @@ -688,7 +688,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -742,7 +742,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -844,7 +844,7 @@ } ] }, - "id": "0" + "id": "14" }, "name": "y" } @@ -1295,7 +1295,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1349,7 +1349,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1585,7 +1585,7 @@ } ] }, - "id": "1" + "id": "15" }, "name": "x" }, @@ -1781,13 +1781,13 @@ } ] }, - "id": "1" + "id": "15" }, "name": "y" } ] }, - "id": "2" + "id": "16" }, "name": "x" }, @@ -1827,7 +1827,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1881,7 +1881,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2117,7 +2117,7 @@ } ] }, - "id": "1" + "id": "15" }, "name": "x" }, @@ -2313,13 +2313,13 @@ } ] }, - "id": "1" + "id": "15" }, "name": "y" } ] }, - "id": "2" + "id": "16" }, "name": "y" } @@ -2868,7 +2868,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2922,7 +2922,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3480,7 +3480,7 @@ } ] }, - "id": "3" + "id": "17" }, "name": "x" }, @@ -3520,7 +3520,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3574,7 +3574,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4132,7 +4132,7 @@ } ] }, - "id": "3" + "id": "17" }, "name": "y" } @@ -4469,7 +4469,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4523,7 +4523,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4629,7 +4629,7 @@ "name": "v1" } }, - "id": "4" + "id": "18" }, "name": "x" }, @@ -4669,7 +4669,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4723,7 +4723,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4829,7 +4829,7 @@ "name": "v1" } }, - "id": "4" + "id": "18" }, "name": "y" } @@ -5004,7 +5004,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5058,7 +5058,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5282,7 +5282,7 @@ } ] }, - "id": "5" + "id": "19" }, "name": "x" }, @@ -5322,7 +5322,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5376,7 +5376,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5600,7 +5600,7 @@ } ] }, - "id": "5" + "id": "19" }, "name": "y" } diff --git a/tests/approvals/out/biguint-expressions/DemoContract.approval.teal b/tests/approvals/out/biguint-expressions/DemoContract.approval.teal index b6d7aa22..7a1d095b 100644 --- a/tests/approvals/out/biguint-expressions/DemoContract.approval.teal +++ b/tests/approvals/out/biguint-expressions/DemoContract.approval.teal @@ -1,36 +1,40 @@ #pragma version 10 tests/approvals/biguint-expressions.algo.ts::DemoContract.approvalProgram: - txn ApplicationID - bnz main_after_if_else@2 - callsub constructor - -main_after_if_else@2: - // tests/approvals/biguint-expressions.algo.ts:23 - // test(1, false, itob(4)) - pushint 4 // 4 - itob - pushint 1 // 1 - pushint 0 // 0 - uncover 2 - callsub test - // tests/approvals/biguint-expressions.algo.ts:24 + // tests/approvals/biguint-expressions.algo.ts:33 + // testOps(500n, 1000n) + pushbytess 0x01f4 0x03e8 // 0x01f4, 0x03e8 + callsub testOps + // tests/approvals/biguint-expressions.algo.ts:34 // return true pushint 1 // 1 return -// tests/approvals/biguint-expressions.algo.ts::DemoContract.constructor() -> void: -constructor: +// tests/approvals/biguint-expressions.algo.ts::testOps(smaller: bytes, larger: bytes) -> void: +testOps: // tests/approvals/biguint-expressions.algo.ts:21 - // class DemoContract extends BaseContract { - proto 0 0 - retsub - - -// tests/approvals/biguint-expressions.algo.ts::test(a: uint64, b: uint64, c: bytes) -> void: -test: - // tests/approvals/biguint-expressions.algo.ts:5 - // function test(a: uint64, b: boolean, c: bytes) { - proto 3 0 + // function testOps(smaller: biguint, larger: biguint) { + proto 2 0 + // tests/approvals/biguint-expressions.algo.ts:22 + // assert(smaller < larger) + frame_dig -2 + frame_dig -1 + b< + assert + // tests/approvals/biguint-expressions.algo.ts:24 + // assert(smaller > larger) + frame_dig -2 + frame_dig -1 + b> + assert + // tests/approvals/biguint-expressions.algo.ts:27 + // assert(smaller === BigUint(op.bzero(4).concat(Bytes(smaller))), 'Leading zeros should be ignored in equality') + pushint 4 // 4 + bzero + frame_dig -2 + concat + frame_dig -2 + b== + assert // Leading zeros should be ignored in equality retsub diff --git a/tests/approvals/out/biguint-expressions/DemoContract.ssa.ir b/tests/approvals/out/biguint-expressions/DemoContract.ssa.ir index f2346e3b..858f2d14 100644 --- a/tests/approvals/out/biguint-expressions/DemoContract.ssa.ir +++ b/tests/approvals/out/biguint-expressions/DemoContract.ssa.ir @@ -1,7 +1,7 @@ contract tests/approvals/biguint-expressions.algo.ts::DemoContract: program approval: subroutine tests/approvals/biguint-expressions.algo.ts::DemoContract.approvalProgram() -> bool: - block@0: // L22 + block@0: // L31 let reinterpret_bool%0#0: bool = (txn ApplicationID) goto reinterpret_bool%0#0 ? block@2 : block@1 block@1: // if_body_L1 @@ -9,14 +9,15 @@ contract tests/approvals/biguint-expressions.algo.ts::DemoContract: goto block@2 block@2: // after_if_else_L1 let tmp%0#0: bytes = (itob 4u) - tests/approvals/biguint-expressions.algo.ts::test(1u, 0u, tmp%0#0) + tests/approvals/biguint-expressions.algo.ts::testConstructor(1u, 0u, tmp%0#0) + tests/approvals/biguint-expressions.algo.ts::testOps(500b, 1000b) return 1u subroutine tests/approvals/biguint-expressions.algo.ts::DemoContract.constructor() -> void: - block@0: // L21 + block@0: // L30 return - subroutine tests/approvals/biguint-expressions.algo.ts::test(a: uint64, b: bool, c: bytes) -> void: + subroutine tests/approvals/biguint-expressions.algo.ts::testConstructor(a: uint64, b: bool, c: bytes) -> void: block@0: // L5 let reinterpret_biguint%0#0: biguint = (itob 1u) let reinterpret_biguint%1#0: biguint = (itob 0u) @@ -26,6 +27,25 @@ contract tests/approvals/biguint-expressions.algo.ts::DemoContract: let reinterpret_biguint%4#0: biguint = (itob b#0) let reinterpret_biguint%5#0: biguint = c#0 return + + subroutine tests/approvals/biguint-expressions.algo.ts::testOps(smaller: biguint, larger: biguint) -> void: + block@0: // L21 + let tmp%0#0: bool = (b< smaller#0 larger#0) + (assert tmp%0#0) + let tmp%1#0: bool = (b<= smaller#0 smaller#0) + (assert tmp%1#0) + let tmp%2#0: bool = (b> smaller#0 larger#0) + (assert tmp%2#0) + let tmp%3#0: bool = (b>= larger#0 larger#0) + (assert tmp%3#0) + let tmp%4#0: bool = (b== smaller#0 smaller#0) + (assert tmp%4#0) + let tmp%5#0: bytes = (bzero 4u) + let reinterpret_bytes%0#0: bytes = smaller#0 + let reinterpret_biguint%0#0: biguint = (concat tmp%5#0 reinterpret_bytes%0#0) + let tmp%6#0: bool = (b== smaller#0 reinterpret_biguint%0#0) + (assert tmp%6#0) // Leading zeros should be ignored in equality + return program clear-state: subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: diff --git a/tests/approvals/out/biguint-expressions/biguint-expressions.awst b/tests/approvals/out/biguint-expressions/biguint-expressions.awst index f5ed4dbe..9f5d784f 100644 --- a/tests/approvals/out/biguint-expressions/biguint-expressions.awst +++ b/tests/approvals/out/biguint-expressions/biguint-expressions.awst @@ -1,4 +1,4 @@ -subroutine test(a: uint64, b: bool, c: bytes): void +subroutine testConstructor(a: uint64, b: bool, c: bytes): void { 0 reinterpret_cast(itob(True)) @@ -14,6 +14,15 @@ subroutine test(a: uint64, b: bool, c: bytes): void reinterpret_cast(itob(b)) reinterpret_cast(c) } +subroutine testOps(smaller: biguint, larger: biguint): void +{ + assert(smaller < larger) + assert(smaller <= smaller) + assert(larger > smaller) + assert(larger >= larger) + assert(smaller == smaller) + assert(smaller == reinterpret_cast(concat(bzero(4), reinterpret_cast(smaller)))) +} contract DemoContract { approvalProgram(): bool @@ -21,7 +30,8 @@ contract DemoContract if (!Boolean(txn())) { this.constructor() } - tests/approvals/biguint-expressions.algo.ts::test(1, False, itob(4)) + tests/approvals/biguint-expressions.algo.ts::testConstructor(1, False, itob(4)) + tests/approvals/biguint-expressions.algo.ts::testOps(500, 1000) return True } diff --git a/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json b/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json index 2cbe3255..7e83c2bd 100644 --- a/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json +++ b/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json @@ -6,7 +6,7 @@ "line": 5, "end_line": 5, "column": 0, - "end_column": 46 + "end_column": 57 }, "args": [ { @@ -23,8 +23,8 @@ "file": "tests/approvals/biguint-expressions.algo.ts", "line": 5, "end_line": 5, - "column": 14, - "end_column": 23 + "column": 25, + "end_column": 34 } }, { @@ -41,8 +41,8 @@ "file": "tests/approvals/biguint-expressions.algo.ts", "line": 5, "end_line": 5, - "column": 25, - "end_column": 35 + "column": 36, + "end_column": 46 } }, { @@ -59,8 +59,8 @@ "file": "tests/approvals/biguint-expressions.algo.ts", "line": 5, "end_line": 5, - "column": 37, - "end_column": 45 + "column": 48, + "end_column": 56 } } ], @@ -77,7 +77,7 @@ "file": "tests/approvals/biguint-expressions.algo.ts", "line": 5, "end_line": 19, - "column": 47, + "column": 58, "end_column": 1 }, "body": [ @@ -710,88 +710,109 @@ "args": {}, "returns": null }, - "id": "tests/approvals/biguint-expressions.algo.ts::test", - "name": "test" + "id": "tests/approvals/biguint-expressions.algo.ts::testConstructor", + "name": "testConstructor" }, { - "_type": "Contract", + "_type": "Subroutine", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 21, "end_line": 21, "column": 0, - "end_column": 41 + "end_column": 51 }, - "id": "tests/approvals/biguint-expressions.algo.ts::DemoContract", - "name": "DemoContract", - "description": null, - "method_resolution_order": [ - "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + "args": [ + { + "_type": "SubroutineArgument", + "name": "smaller", + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 21, + "end_line": 21, + "column": 17, + "end_column": 33 + } + }, + { + "_type": "SubroutineArgument", + "name": "larger", + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 21, + "end_line": 21, + "column": 35, + "end_column": 50 + } + } ], - "approval_program": { - "_type": "ContractMethod", + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 22, - "end_line": 22, - "column": 2, - "end_column": 26 - }, - "args": [], - "return_type": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "line": 21, + "end_line": 28, + "column": 52, + "end_column": 1 }, - "body": { - "_type": "Block", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "body": [ - { - "_type": "IfElse", + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 22, + "end_line": 22, + "column": 2, + "end_column": 26 + }, + "expr": { + "_type": "IntrinsicCall", "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 22, + "end_line": 22, + "column": 2, + "end_column": 26 }, - "condition": { - "_type": "Not", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "op_code": "assert", + "immediates": [], + "stack_args": [ + { + "_type": "NumericComparisonExpression", "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 22, + "end_line": 22, + "column": 9, + "end_column": 25 }, "wtype": { "_type": "WType", @@ -800,134 +821,803 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", + "lhs": { + "_type": "VarExpression", "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 22, + "end_line": 22, + "column": 9, + "end_column": 16 }, "wtype": { "_type": "WType", - "name": "uint64", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "op_code": "txn", - "immediates": [ - "ApplicationID" - ], - "stack_args": [], - "comment": null - } - } - }, - "if_branch": { - "_type": "Block", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "body": [ - { - "_type": "ExpressionStatement", + "name": "smaller" + }, + "operator": "<", + "rhs": { + "_type": "VarExpression", "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 22, + "end_line": 22, + "column": 19, + "end_column": 25 }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "larger" } - ], - "label": null, - "comment": null - }, - "else_branch": null + } + ], + "comment": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 23, + "end_line": 23, + "column": 2, + "end_column": 28 }, - { - "_type": "Block", + "expr": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 22, - "end_line": 25, - "column": 27, - "end_column": 3 + "line": 23, + "end_line": 23, + "column": 2, + "end_column": 28 }, - "body": [ + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "op_code": "assert", + "immediates": [], + "stack_args": [ { - "_type": "ExpressionStatement", + "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 23, "end_line": 23, - "column": 4, + "column": 9, "end_column": 27 }, - "expr": { - "_type": "SubroutineCallExpression", + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 23, "end_line": 23, - "column": 4, - "end_column": 27 + "column": 9, + "end_column": 16 }, "wtype": { "_type": "WType", - "name": "void", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": null + "scalar_type": 1 }, - "target": { - "_type": "SubroutineID", - "target": "tests/approvals/biguint-expressions.algo.ts::test" + "name": "smaller" + }, + "operator": "<=", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 23, + "end_line": 23, + "column": 20, + "end_column": 27 }, - "args": [ - { - "_type": "CallArg", - "name": null, - "value": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 23, - "end_line": 23, - "column": 9, - "end_column": 10 + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" + } + } + ], + "comment": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 24, + "end_line": 24, + "column": 2, + "end_column": 26 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 24, + "end_line": 24, + "column": 2, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "op_code": "assert", + "immediates": [], + "stack_args": [ + { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 24, + "end_line": 24, + "column": 9, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 24, + "end_line": 24, + "column": 9, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "larger" + }, + "operator": ">", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 24, + "end_line": 24, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" + } + } + ], + "comment": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 25, + "end_line": 25, + "column": 2, + "end_column": 26 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 25, + "end_line": 25, + "column": 2, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "op_code": "assert", + "immediates": [], + "stack_args": [ + { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 25, + "end_line": 25, + "column": 9, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 25, + "end_line": 25, + "column": 9, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "larger" + }, + "operator": ">=", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "larger" + } + } + ], + "comment": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 26, + "end_line": 26, + "column": 2, + "end_column": 38 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 26, + "end_line": 26, + "column": 2, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "op_code": "assert", + "immediates": [], + "stack_args": [ + { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 26, + "end_line": 26, + "column": 9, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 26, + "end_line": 26, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 26, + "end_line": 26, + "column": 29, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" + } + } + ], + "comment": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 2, + "end_column": 112 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 2, + "end_column": 112 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "op_code": "assert", + "immediates": [], + "stack_args": [ + { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 9, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 21, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 29, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 29, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "bzero", + "immediates": [], + "stack_args": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 38, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "4", + "teal_alias": null + } + ], + "comment": null + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 48, + "end_column": 62 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 54, + "end_column": 61 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" + } + } + ], + "comment": null + } + } + } + ], + "comment": "Leading zeros should be ignored in equality" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "id": "tests/approvals/biguint-expressions.algo.ts::testOps", + "name": "testOps" + }, + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 30, + "end_line": 30, + "column": 0, + "end_column": 41 + }, + "id": "tests/approvals/biguint-expressions.algo.ts::DemoContract", + "name": "DemoContract", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 31, + "end_line": 31, + "column": 2, + "end_column": 26 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [], + "comment": null + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 31, + "end_line": 35, + "column": 27, + "end_column": 3 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 32, + "end_line": 32, + "column": 4, + "end_column": 38 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 32, + "end_line": 32, + "column": 4, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/biguint-expressions.algo.ts::testConstructor" + }, + "args": [ + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 32, + "end_line": 32, + "column": 20, + "end_column": 21 }, "wtype": { "_type": "WType", @@ -947,10 +1637,10 @@ "_type": "BoolConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 23, - "end_line": 23, - "column": 12, - "end_column": 17 + "line": 32, + "end_line": 32, + "column": 23, + "end_column": 28 }, "wtype": { "_type": "WType", @@ -969,10 +1659,10 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 23, - "end_line": 23, - "column": 19, - "end_column": 26 + "line": 32, + "end_line": 32, + "column": 30, + "end_column": 37 }, "wtype": { "_type": "WType", @@ -988,10 +1678,10 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 23, - "end_line": 23, - "column": 24, - "end_column": 25 + "line": 32, + "end_line": 32, + "column": 35, + "end_column": 36 }, "wtype": { "_type": "WType", @@ -1010,12 +1700,91 @@ ] } }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 33, + "end_line": 33, + "column": 4, + "end_column": 24 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 33, + "end_line": 33, + "column": 4, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/biguint-expressions.algo.ts::testOps" + }, + "args": [ + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 33, + "end_line": 33, + "column": 12, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "500", + "teal_alias": null + } + }, + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 33, + "end_line": 33, + "column": 18, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "1000", + "teal_alias": null + } + } + ] + } + }, { "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 24, - "end_line": 24, + "line": 34, + "end_line": 34, "column": 4, "end_column": 15 }, @@ -1023,8 +1792,8 @@ "_type": "BoolConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 24, - "end_line": 24, + "line": 34, + "end_line": 34, "column": 11, "end_column": 15 }, @@ -1134,8 +1903,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 21, - "end_line": 21, + "line": 30, + "end_line": 30, "column": 0, "end_column": 41 }, @@ -1151,8 +1920,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 21, - "end_line": 21, + "line": 30, + "end_line": 30, "column": 0, "end_column": 41 }, @@ -1161,8 +1930,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 21, - "end_line": 21, + "line": 30, + "end_line": 30, "column": 0, "end_column": 41 }, @@ -1170,8 +1939,8 @@ "_type": "VoidConstant", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 21, - "end_line": 21, + "line": 30, + "end_line": 30, "column": 0, "end_column": 41 }, diff --git a/tests/approvals/out/byte-expressions/DemoContract.approval.teal b/tests/approvals/out/byte-expressions/DemoContract.approval.teal new file mode 100644 index 00000000..48ee7e0c --- /dev/null +++ b/tests/approvals/out/byte-expressions/DemoContract.approval.teal @@ -0,0 +1,7 @@ +#pragma version 10 + +tests/approvals/byte-expressions.algo.ts::DemoContract.approvalProgram: + // tests/approvals/byte-expressions.algo.ts:18 + // return true + pushint 1 // 1 + return diff --git a/tests/approvals/out/byte-expressions/DemoContract.clear.teal b/tests/approvals/out/byte-expressions/DemoContract.clear.teal new file mode 100644 index 00000000..33119445 --- /dev/null +++ b/tests/approvals/out/byte-expressions/DemoContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/byte-expressions.algo.ts::DemoContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/byte-expressions/DemoContract.ssa.ir b/tests/approvals/out/byte-expressions/DemoContract.ssa.ir new file mode 100644 index 00000000..c2c188ee --- /dev/null +++ b/tests/approvals/out/byte-expressions/DemoContract.ssa.ir @@ -0,0 +1,47 @@ +contract tests/approvals/byte-expressions.algo.ts::DemoContract: + program approval: + subroutine tests/approvals/byte-expressions.algo.ts::DemoContract.approvalProgram() -> bool: + block@0: // L16 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/byte-expressions.algo.ts::DemoContract.constructor() + goto block@2 + block@2: // after_if_else_L1 + tests/approvals/byte-expressions.algo.ts::test(1u, 50b, "things") + return 1u + + subroutine tests/approvals/byte-expressions.algo.ts::DemoContract.constructor() -> void: + block@0: // L15 + return + + subroutine tests/approvals/byte-expressions.algo.ts::test(a: uint64, b: biguint, c: bytes) -> void: + block@0: // L4 + let tmp%0#0: uint64 = (len 0x) + let tmp%1#0: bool = (== tmp%0#0 0u) + (assert tmp%1#0) // Empty bytes has length of 0 + let tmp%2#0: bytes = (itob a#0) + let tmp%3#0: bytes = (itob a#0) + let tmp%4#0: bool = (== tmp%2#0 tmp%3#0) + (assert tmp%4#0) // Bytes(uint64) is equivalent to itob + let tmp%5#0: bool = (== 0x0000000000000001 0x0000000000000001) + (assert tmp%5#0) // Bytes(uint64) returns an 8 byte encoding + let reinterpret_bytes%0#0: bytes = 256b + let tmp%6#0: bool = (== reinterpret_bytes%0#0 0x0100) + (assert tmp%6#0) + let reinterpret_bytes%1#0: bytes = b#0 + let reinterpret_biguint%0#0: biguint = reinterpret_bytes%1#0 + let tmp%7#0: bool = (b== reinterpret_biguint%0#0 b#0) + (assert tmp%7#0) // Round trip of biguint to bytes and back results in the same value + let tmp%8#0: bool = (== c#0 c#0) + (assert tmp%8#0) + let tmp%9#0: bool = (== "123" "123") + (assert tmp%9#0) + let tmp%10#0: bool = (== 0x01020304 0x01020304) + (assert tmp%10#0) + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/byte-expressions/byte-expressions.awst b/tests/approvals/out/byte-expressions/byte-expressions.awst index b305d34f..516de475 100644 --- a/tests/approvals/out/byte-expressions/byte-expressions.awst +++ b/tests/approvals/out/byte-expressions/byte-expressions.awst @@ -2,10 +2,37 @@ subroutine test(a: uint64, b: biguint, c: string): void { assert(len(0x) == 0) assert(itob(a) == itob(a)) - assert(0x01 == 0x0000000000000001) + assert(0x0000000000000001 == 0x0000000000000001) assert(reinterpret_cast(256) == 0x0100) assert(reinterpret_cast(reinterpret_cast(b)) == b) assert(reinterpret_cast(reinterpret_cast(c)) == c) assert("123" == "123") assert(0x01020304 == 0x01020304) +} +contract DemoContract +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + tests/approvals/byte-expressions.algo.ts::test(1, 50, "things") + return True + } + + clearProgram(): bool + { + return True + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + } \ No newline at end of file diff --git a/tests/approvals/out/byte-expressions/byte-expressions.awst.json b/tests/approvals/out/byte-expressions/byte-expressions.awst.json index 0f1cbb00..8221ffd9 100644 --- a/tests/approvals/out/byte-expressions/byte-expressions.awst.json +++ b/tests/approvals/out/byte-expressions/byte-expressions.awst.json @@ -88,7 +88,7 @@ "line": 5, "end_line": 5, "column": 2, - "end_column": 30 + "end_column": 61 }, "expr": { "_type": "IntrinsicCall", @@ -97,7 +97,7 @@ "line": 5, "end_line": 5, "column": 2, - "end_column": 30 + "end_column": 61 }, "wtype": { "_type": "WType", @@ -188,7 +188,7 @@ } } ], - "comment": null + "comment": "Empty bytes has length of 0" } }, { @@ -198,7 +198,7 @@ "line": 6, "end_line": 6, "column": 2, - "end_column": 33 + "end_column": 72 }, "expr": { "_type": "IntrinsicCall", @@ -207,7 +207,7 @@ "line": 6, "end_line": 6, "column": 2, - "end_column": 33 + "end_column": 72 }, "wtype": { "_type": "WType", @@ -318,7 +318,7 @@ } } ], - "comment": null + "comment": "Bytes(uint64) is equivalent to itob" } }, { @@ -328,7 +328,7 @@ "line": 7, "end_line": 7, "column": 2, - "end_column": 64 + "end_column": 108 }, "expr": { "_type": "IntrinsicCall", @@ -337,7 +337,7 @@ "line": 7, "end_line": 7, "column": 2, - "end_column": 64 + "end_column": 108 }, "wtype": { "_type": "WType", @@ -381,7 +381,7 @@ "ephemeral": false, "scalar_type": 1 }, - "value": "0R", + "value": "0000000001", "encoding": "base16" }, "operator": "==", @@ -406,7 +406,7 @@ } } ], - "comment": null + "comment": "Bytes(uint64) returns an 8 byte encoding" } }, { @@ -521,7 +521,7 @@ "line": 9, "end_line": 9, "column": 2, - "end_column": 33 + "end_column": 102 }, "expr": { "_type": "IntrinsicCall", @@ -530,7 +530,7 @@ "line": 9, "end_line": 9, "column": 2, - "end_column": 33 + "end_column": 102 }, "wtype": { "_type": "WType", @@ -631,7 +631,7 @@ } } ], - "comment": null + "comment": "Round trip of biguint to bytes and back results in the same value" } }, { @@ -942,5 +942,556 @@ }, "id": "tests/approvals/byte-expressions.algo.ts::test", "name": "test" + }, + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 15, + "end_line": 15, + "column": 0, + "end_column": 41 + }, + "id": "tests/approvals/byte-expressions.algo.ts::DemoContract", + "name": "DemoContract", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 16, + "end_line": 16, + "column": 2, + "end_column": 26 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [], + "comment": null + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 16, + "end_line": 19, + "column": 27, + "end_column": 3 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 17, + "end_line": 17, + "column": 4, + "end_column": 26 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 17, + "end_line": 17, + "column": 4, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/byte-expressions.algo.ts::test" + }, + "args": [ + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 17, + "end_line": 17, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null + } + }, + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 17, + "end_line": 17, + "column": 12, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "50", + "teal_alias": null + } + }, + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 17, + "end_line": 17, + "column": 17, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "things" + } + } + ] + } + }, + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 18, + "end_line": 18, + "column": 4, + "end_column": 15 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 18, + "end_line": 18, + "column": 11, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/byte-expressions.algo.ts::DemoContract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 15, + "end_line": 15, + "column": 0, + "end_column": 41 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 15, + "end_line": 15, + "column": 0, + "end_column": 41 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 15, + "end_line": 15, + "column": 0, + "end_column": 41 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 15, + "end_line": 15, + "column": 0, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/byte-expressions.algo.ts::DemoContract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null } ] \ No newline at end of file diff --git a/tests/approvals/out/destructured-params/destructured-params.awst.json b/tests/approvals/out/destructured-params/destructured-params.awst.json index 148725f0..154c7716 100644 --- a/tests/approvals/out/destructured-params/destructured-params.awst.json +++ b/tests/approvals/out/destructured-params/destructured-params.awst.json @@ -14,7 +14,7 @@ "name": "p", "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -103,7 +103,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -204,7 +204,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -516,7 +516,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1077,7 +1077,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1123,7 +1123,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1260,7 +1260,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, diff --git a/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst.json b/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst.json index 16693b23..b7b6bae6 100644 --- a/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst.json +++ b/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst.json @@ -53,7 +53,7 @@ "types": [ { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -80,7 +80,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -107,7 +107,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -154,7 +154,7 @@ "types": [ { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -181,7 +181,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -208,7 +208,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -247,7 +247,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -324,7 +324,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -401,7 +401,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -554,7 +554,7 @@ "types": [ { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -581,7 +581,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -608,7 +608,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -648,7 +648,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, diff --git a/tests/approvals/out/local-state/local-state.awst.json b/tests/approvals/out/local-state/local-state.awst.json index 95d29ade..24bc0d8d 100644 --- a/tests/approvals/out/local-state/local-state.awst.json +++ b/tests/approvals/out/local-state/local-state.awst.json @@ -312,7 +312,7 @@ "name": "p", "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -431,7 +431,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -506,7 +506,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1100,7 +1100,7 @@ "default_args": {}, "structs": { "__0": { - "name": "", + "name": "Anonymous", "elements": [ [ "a", @@ -1127,7 +1127,7 @@ "args": [], "return_type": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1226,7 +1226,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1687,7 +1687,7 @@ "default_args": {}, "structs": { "output": { - "name": "", + "name": "Anonymous", "elements": [ [ "localUint", diff --git a/tests/approvals/out/named-types/named-types.awst.json b/tests/approvals/out/named-types/named-types.awst.json index 7936b507..e080add0 100644 --- a/tests/approvals/out/named-types/named-types.awst.json +++ b/tests/approvals/out/named-types/named-types.awst.json @@ -1125,7 +1125,7 @@ "args": [], "return_type": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1180,7 +1180,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1278,7 +1278,7 @@ "default_args": {}, "structs": { "output": { - "name": "", + "name": "Anonymous", "elements": [ [ "x", @@ -1528,7 +1528,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1765,7 +1765,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1803,7 +1803,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1916,7 +1916,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2031,7 +2031,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, diff --git a/tests/approvals/out/object-destructuring/object-destructuring.awst.json b/tests/approvals/out/object-destructuring/object-destructuring.awst.json index 4f69a4ad..7acb3169 100644 --- a/tests/approvals/out/object-destructuring/object-destructuring.awst.json +++ b/tests/approvals/out/object-destructuring/object-destructuring.awst.json @@ -14,7 +14,7 @@ "name": "arg", "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -93,7 +93,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -194,7 +194,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -250,14 +250,14 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, "types": [ { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -307,7 +307,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -410,14 +410,14 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, "types": [ { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -467,7 +467,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -518,7 +518,7 @@ "types": [ { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -574,7 +574,7 @@ "types": [ { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -624,7 +624,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -685,7 +685,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -749,7 +749,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -813,7 +813,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -921,7 +921,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1048,7 +1048,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1116,7 +1116,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1243,7 +1243,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1312,7 +1312,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1364,7 +1364,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1442,7 +1442,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1494,7 +1494,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1572,7 +1572,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1624,7 +1624,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1702,7 +1702,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1754,7 +1754,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1828,7 +1828,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1882,7 +1882,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1951,7 +1951,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2003,7 +2003,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2055,7 +2055,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2182,7 +2182,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2251,7 +2251,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2303,7 +2303,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2381,7 +2381,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2433,7 +2433,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2511,7 +2511,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2563,7 +2563,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2641,7 +2641,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2693,7 +2693,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2778,7 +2778,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2830,7 +2830,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2882,7 +2882,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3009,7 +3009,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3078,7 +3078,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3130,7 +3130,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3208,7 +3208,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3260,7 +3260,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3338,7 +3338,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3390,7 +3390,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3468,7 +3468,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3520,7 +3520,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3605,7 +3605,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3657,7 +3657,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3709,7 +3709,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3836,7 +3836,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3905,7 +3905,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3957,7 +3957,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4035,7 +4035,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4087,7 +4087,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4165,7 +4165,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4217,7 +4217,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4295,7 +4295,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4347,7 +4347,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4432,7 +4432,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4484,7 +4484,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4536,7 +4536,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4663,7 +4663,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4732,7 +4732,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4784,7 +4784,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4862,7 +4862,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4914,7 +4914,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4992,7 +4992,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5044,7 +5044,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5122,7 +5122,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5174,7 +5174,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5279,7 +5279,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5332,7 +5332,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5384,7 +5384,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5462,7 +5462,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5514,7 +5514,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5596,7 +5596,7 @@ "args": [], "return_type": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5667,7 +5667,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6548,7 +6548,7 @@ "name": "x", "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6752,7 +6752,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6827,7 +6827,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6863,7 +6863,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6938,7 +6938,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7064,7 +7064,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7094,7 +7094,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7122,7 +7122,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7152,7 +7152,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7300,7 +7300,7 @@ "name": "args", "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7395,7 +7395,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7416,7 +7416,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7520,7 +7520,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7655,7 +7655,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7676,7 +7676,7 @@ }, { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7780,7 +7780,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7854,7 +7854,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7916,7 +7916,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -8045,7 +8045,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, diff --git a/tests/approvals/out/property-ordering/property-ordering.awst.json b/tests/approvals/out/property-ordering/property-ordering.awst.json index 56887bad..e9977206 100644 --- a/tests/approvals/out/property-ordering/property-ordering.awst.json +++ b/tests/approvals/out/property-ordering/property-ordering.awst.json @@ -14,7 +14,7 @@ "name": "x", "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -176,7 +176,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -232,7 +232,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -343,7 +343,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -381,7 +381,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1103,7 +1103,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "Anonymous", "immutable": true, "ephemeral": false, "scalar_type": null, diff --git a/tests/approvals/out/strings/StringContract.approval.teal b/tests/approvals/out/strings/StringContract.approval.teal new file mode 100644 index 00000000..ceffcacf --- /dev/null +++ b/tests/approvals/out/strings/StringContract.approval.teal @@ -0,0 +1,166 @@ +#pragma version 10 + +tests/approvals/strings.algo.ts::StringContract.approvalProgram: + intcblock 0 1 + bytecblock 0x151f7c75 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/strings.algo.ts::StringContract.constructor() -> void: +constructor: + // tests/approvals/strings.algo.ts:3 + // class StringContract extends Contract { + proto 0 0 + retsub + + +// tests/approvals/strings.algo.ts::StringContract.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/strings.algo.ts:3 + // class StringContract extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@6 + txna ApplicationArgs 0 + pushbytes 0x5049bd1b // method "join(string,string)string" + pushbytes 0xdc882e2f // method "interpolate(string)string" + uncover 2 + match __puya_arc4_router___join_route@2 __puya_arc4_router___interpolate_route@3 + b __puya_arc4_router___switch_case_default@4 + +__puya_arc4_router___join_route@2: + // tests/approvals/strings.algo.ts:4 + // join(a: string, b: string): string { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/strings.algo.ts:3 + // class StringContract extends Contract { + txna ApplicationArgs 1 + extract 2 0 + txna ApplicationArgs 2 + extract 2 0 + // tests/approvals/strings.algo.ts:4 + // join(a: string, b: string): string { + callsub join + dup + len + itob + extract 6 2 + swap + concat + bytec_0 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___interpolate_route@3: + // tests/approvals/strings.algo.ts:8 + // interpolate(a: string): string { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/strings.algo.ts:3 + // class StringContract extends Contract { + txna ApplicationArgs 1 + extract 2 0 + // tests/approvals/strings.algo.ts:8 + // interpolate(a: string): string { + callsub interpolate + dup + len + itob + extract 6 2 + swap + concat + bytec_0 // 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@4: + b __puya_arc4_router___after_if_else@10 + +__puya_arc4_router___bare_routing@6: + // tests/approvals/strings.algo.ts:3 + // class StringContract extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@7 + b __puya_arc4_router___switch_case_default@8 + +__puya_arc4_router_____algots__.defaultCreate@7: + // tests/approvals/strings.algo.ts:3 + // class StringContract extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@8: + +__puya_arc4_router___after_if_else@10: + // tests/approvals/strings.algo.ts:3 + // class StringContract extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/strings.algo.ts::StringContract.join(a: bytes, b: bytes) -> bytes: +join: + // tests/approvals/strings.algo.ts:4 + // join(a: string, b: string): string { + proto 2 1 + // tests/approvals/strings.algo.ts:5 + // return a + b + frame_dig -2 + frame_dig -1 + concat + retsub + + +// tests/approvals/strings.algo.ts::StringContract.interpolate(a: bytes) -> bytes: +interpolate: + // tests/approvals/strings.algo.ts:8 + // interpolate(a: string): string { + proto 1 1 + // tests/approvals/strings.algo.ts:9 + // return `You interpolated ${a}` + pushbytes "You interpolated " + frame_dig -1 + concat + retsub + + +// tests/approvals/strings.algo.ts::StringContract.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/strings.algo.ts:3 + // class StringContract extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/strings/StringContract.arc32.json b/tests/approvals/out/strings/StringContract.arc32.json new file mode 100644 index 00000000..ebf57970 --- /dev/null +++ b/tests/approvals/out/strings/StringContract.arc32.json @@ -0,0 +1,77 @@ +{ + "hints": { + "join(string,string)string": { + "call_config": { + "no_op": "CALL" + } + }, + "interpolate(string)string": { + "call_config": { + "no_op": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvc3RyaW5ncy5hbGdvLnRzOjpTdHJpbmdDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBieXRlY2Jsb2NrIDB4MTUxZjdjNzUKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaW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1cm4K" + }, + "state": { + "global": { + "num_byte_slices": 0, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": {}, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "StringContract", + "methods": [ + { + "name": "join", + "args": [ + { + "type": "string", + "name": "a" + }, + { + "type": "string", + "name": "b" + } + ], + "readonly": false, + "returns": { + "type": "string" + } + }, + { + "name": "interpolate", + "args": [ + { + "type": "string", + "name": "a" + } + ], + "readonly": false, + "returns": { + "type": "string" + } + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "CREATE" + } +} \ No newline at end of file diff --git a/tests/approvals/out/strings/StringContract.clear.teal b/tests/approvals/out/strings/StringContract.clear.teal new file mode 100644 index 00000000..e1de1543 --- /dev/null +++ b/tests/approvals/out/strings/StringContract.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/strings.algo.ts::StringContract.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/strings/StringContract.ssa.ir b/tests/approvals/out/strings/StringContract.ssa.ir new file mode 100644 index 00000000..6ed836d0 --- /dev/null +++ b/tests/approvals/out/strings/StringContract.ssa.ir @@ -0,0 +1,99 @@ +contract tests/approvals/strings.algo.ts::StringContract: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/strings.algo.ts::StringContract.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/strings.algo.ts::StringContract.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/strings.algo.ts::StringContract.constructor() -> void: + block@0: // L3 + return + + subroutine tests/approvals/strings.algo.ts::StringContract.__puya_arc4_router__() -> bool: + block@0: // L3 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@6 + block@1: // abi_routing_L3 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "join(string,string)string" => block@2, method "interpolate(string)string" => block@3, * => block@4} + block@2: // join_route_L4 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // can only call when not creating + let tmp%7#0: bytes = (txna ApplicationArgs 1) + let tmp%8#0: bytes = ((extract 2 0) tmp%7#0) + let tmp%9#0: bytes = (txna ApplicationArgs 2) + let tmp%10#0: bytes = ((extract 2 0) tmp%9#0) + let to_encode%0#0: bytes = tests/approvals/strings.algo.ts::StringContract.join(tmp%8#0, tmp%10#0) + let length%0#0: uint64 = (len to_encode%0#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 to_encode%0#0) + let tmp%11#0: bytes = (concat 0x151f7c75 encoded_value%0#0) + (log tmp%11#0) + return 1u + block@3: // interpolate_route_L8 + let tmp%12#0: uint64 = (txn OnCompletion) + let tmp%13#0: bool = (== tmp%12#0 NoOp) + (assert tmp%13#0) // OnCompletion is not NoOp + let tmp%14#0: uint64 = (txn ApplicationID) + let tmp%15#0: bool = (!= tmp%14#0 0u) + (assert tmp%15#0) // can only call when not creating + let tmp%16#0: bytes = (txna ApplicationArgs 1) + let tmp%17#0: bytes = ((extract 2 0) tmp%16#0) + let to_encode%1#0: bytes = tests/approvals/strings.algo.ts::StringContract.interpolate(tmp%17#0) + let length%1#0: uint64 = (len to_encode%1#0) + let as_bytes%1#0: bytes = (itob length%1#0) + let length_uint16%1#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_value%1#0: bytes = (concat length_uint16%1#0 to_encode%1#0) + let tmp%18#0: bytes = (concat 0x151f7c75 encoded_value%1#0) + (log tmp%18#0) + return 1u + block@4: // switch_case_default_L3 + goto block@5 + block@5: // switch_case_next_L3 + goto block@10 + block@6: // bare_routing_L3 + let tmp%19#0: uint64 = (txn OnCompletion) + switch tmp%19#0 {0u => block@7, * => block@8} + block@7: // __algots__.defaultCreate_L3 + let tmp%20#0: uint64 = (txn ApplicationID) + let tmp%21#0: bool = (== tmp%20#0 0u) + (assert tmp%21#0) // can only call when creating + tests/approvals/strings.algo.ts::StringContract.__algots__.defaultCreate() + return 1u + block@8: // switch_case_default_L3 + goto block@9 + block@9: // switch_case_next_L3 + goto block@10 + block@10: // after_if_else_L3 + return 0u + + subroutine tests/approvals/strings.algo.ts::StringContract.join(a: bytes, b: bytes) -> bytes: + block@0: // L4 + let tmp%0#0: bytes = (concat a#0 b#0) + return tmp%0#0 + + subroutine tests/approvals/strings.algo.ts::StringContract.interpolate(a: bytes) -> bytes: + block@0: // L8 + let tmp%0#0: bytes = (concat "You interpolated " a#0) + return tmp%0#0 + + subroutine tests/approvals/strings.algo.ts::StringContract.__algots__.defaultCreate() -> void: + block@0: // L3 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/strings/strings.awst b/tests/approvals/out/strings/strings.awst new file mode 100644 index 00000000..618677ac --- /dev/null +++ b/tests/approvals/out/strings/strings.awst @@ -0,0 +1,44 @@ +contract StringContract +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + join(): string + { + return concat(a, b) + } + + interpolate(): string + { + return "You interpolated " + a + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + + __algots__.defaultCreate(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/strings/strings.awst.json b/tests/approvals/out/strings/strings.awst.json new file mode 100644 index 00000000..ed2f873f --- /dev/null +++ b/tests/approvals/out/strings/strings.awst.json @@ -0,0 +1,858 @@ +[ + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 39 + }, + "id": "tests/approvals/strings.algo.ts::StringContract", + "name": "StringContract", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [], + "comment": null + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 36 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "a", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 4, + "end_line": 4, + "column": 7, + "end_column": 16 + } + }, + { + "_type": "SubroutineArgument", + "name": "b", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 4, + "end_line": 4, + "column": 18, + "end_column": 27 + } + } + ], + "return_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 4, + "end_line": 6, + "column": 37, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 5, + "end_line": 5, + "column": 4, + "end_column": 16 + }, + "value": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 5, + "end_line": 5, + "column": 11, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 5, + "end_line": 5, + "column": 11, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "a" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 5, + "end_line": 5, + "column": 15, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "b" + } + ], + "comment": null + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/strings.algo.ts::StringContract", + "member_name": "join", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 36 + }, + "name": "join", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 8, + "end_line": 8, + "column": 2, + "end_column": 32 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "a", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 8, + "end_line": 8, + "column": 14, + "end_column": 23 + } + } + ], + "return_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 8, + "end_line": 10, + "column": 33, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 9, + "end_line": 9, + "column": 4, + "end_column": 34 + }, + "value": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 9, + "end_line": 9, + "column": 11, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 9, + "end_line": 9, + "column": 11, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "You interpolated " + }, + "op": "+", + "right": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 9, + "end_line": 9, + "column": 31, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "a" + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/strings.algo.ts::StringContract", + "member_name": "interpolate", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 8, + "end_line": 8, + "column": 2, + "end_column": 32 + }, + "name": "interpolate", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 39 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 39 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 39 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/strings.algo.ts::StringContract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 39 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 39 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "Implicitly generated create method", + "args": {}, + "returns": null + }, + "cref": "tests/approvals/strings.algo.ts::StringContract", + "member_name": "__algots__.defaultCreate", + "arc4_method_config": { + "_type": "ARC4BareMethodConfig", + "source_location": { + "file": "tests/approvals/strings.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 39 + }, + "allowed_completion_types": [ + 0 + ], + "create": 2, + "is_bare": true + } + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + } +] \ No newline at end of file diff --git a/tests/approvals/strings.algo.ts b/tests/approvals/strings.algo.ts new file mode 100644 index 00000000..eb7d0066 --- /dev/null +++ b/tests/approvals/strings.algo.ts @@ -0,0 +1,11 @@ +import { Contract } from '@algorandfoundation/algorand-typescript' + +class StringContract extends Contract { + join(a: string, b: string): string { + return a + b + } + + interpolate(a: string): string { + return `You interpolated ${a}` + } +} diff --git a/tests/onchain/primitives.spec.ts b/tests/onchain/primitives.spec.ts index 21d9116e..fdc71329 100644 --- a/tests/onchain/primitives.spec.ts +++ b/tests/onchain/primitives.spec.ts @@ -1,9 +1,36 @@ import { describe } from 'vitest' -import { createBaseTestFixture } from './util/test-fixture' +import { createArc4TestFixture, createBaseTestFixture } from './util/test-fixture' -describe('uint64', () => { - const test = createBaseTestFixture('tests/approvals/uint64-expressions.algo.ts', ['DemoContract']) - test('can be created', async ({ DemoContractInvoker }) => { - await DemoContractInvoker.send() +describe('primitives', () => { + describe('uint64', () => { + const test = createBaseTestFixture('tests/approvals/uint64-expressions.algo.ts', ['DemoContract']) + test('can be created', async ({ DemoContractInvoker }) => { + await DemoContractInvoker.send() + }) + }) + describe('biguint', () => { + const test = createBaseTestFixture('tests/approvals/biguint-expressions.algo.ts', ['DemoContract']) + test('can be created', async ({ DemoContractInvoker }) => { + await DemoContractInvoker.send() + }) + }) + describe('bytes', () => { + const test = createBaseTestFixture('tests/approvals/byte-expressions.algo.ts', ['DemoContract']) + test('can be created', async ({ DemoContractInvoker }) => { + await DemoContractInvoker.send() + }) + }) + + describe('strings', () => { + const test = createArc4TestFixture('tests/approvals/strings.algo.ts', { StringContract: {} }) + + test('can be joined', async ({ appClientStringContract, expect }) => { + const result = await appClientStringContract.send.call({ method: 'join', args: ['hello', 'world'] }) + expect(result.return).toBe('helloworld') + }) + test('can be interpolated', async ({ appClientStringContract, expect }) => { + const result = await appClientStringContract.send.call({ method: 'interpolate', args: ['hello'] }) + expect(result.return).toBe('You interpolated hello') + }) }) }) From 9747254297fc79db3de71b564337d0ef6e43d8e9 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Mon, 25 Nov 2024 07:04:43 -0800 Subject: [PATCH 11/30] fix: Error when parsing an unsafe numeric literal --- src/awst_build/ast-visitors/base-visitor.ts | 8 ++++++++ tests/expected-output/uint64-expressions.algo.ts | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/src/awst_build/ast-visitors/base-visitor.ts b/src/awst_build/ast-visitors/base-visitor.ts index 5e363539..9e3237da 100644 --- a/src/awst_build/ast-visitors/base-visitor.ts +++ b/src/awst_build/ast-visitors/base-visitor.ts @@ -100,11 +100,19 @@ export abstract class BaseVisitor implements Visitor { } visitNumericLiteral(node: ts.NumericLiteral): InstanceBuilder { + const sourceLocation = this.sourceLocation(node) codeInvariant( !node.text.includes('.'), 'Literals with decimal points are not supported. Use a string literal to capture decimal values', + sourceLocation, ) const literalValue = BigInt(node.text) + if (literalValue > Number.MAX_SAFE_INTEGER || literalValue < Number.MIN_SAFE_INTEGER) { + logger.error( + sourceLocation, + `This number will lose precision at runtime. Use the Uint64 constructor with a bigint or string literal for very large integers.`, + ) + } const ptype = this.context.getPTypeForNode(node) invariant(ptype instanceof TransientType, 'Literals should resolve to transient PTypes') return new BigIntLiteralExpressionBuilder(literalValue, ptype, this.sourceLocation(node)) diff --git a/tests/expected-output/uint64-expressions.algo.ts b/tests/expected-output/uint64-expressions.algo.ts index 992dda1d..e30f2046 100644 --- a/tests/expected-output/uint64-expressions.algo.ts +++ b/tests/expected-output/uint64-expressions.algo.ts @@ -1,5 +1,7 @@ import { Uint64 } from '@algorandfoundation/algorand-typescript' +/* eslint-disable no-loss-of-precision */ + function test() { // @expect-error uint64 overflow or underflow... Uint64(-1) @@ -13,6 +15,8 @@ function test() { Uint64('-1') // @expect-error uint64 overflow or underflow... Uint64(18446744073709551617n) + // @expect-error This number will lose precision... + Uint64(1844674407370955161) // @expect-error uint64 overflow or underflow... Uint64('18446744073709551616') const varStr = '123' From 49f0cd608f5c7af20ef28a1139b346048c0f6d4a Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Mon, 25 Nov 2024 12:36:10 -0800 Subject: [PATCH 12/30] fix: Generate a name for anonymous types used in ABI methods + stabilise output for SingleEval nodes --- package.json | 4 +- src/awst/json-serialize-awst.ts | 11 +- src/awst/node-factory.ts | 3 +- src/awst/nodes.ts | 21 +- src/awst/to-code-visitor.ts | 17 +- src/awst/util.ts | 14 + src/awst/wtypes.ts | 5 +- src/awst_build/arc4-util.ts | 2 + .../ast-visitors/contract-method-visitor.ts | 1 - .../object-literal-expression-builder.ts | 2 +- src/awst_build/ptypes/index.ts | 24 +- tests/approvals.spec.ts | 8 +- tests/approvals/named-types.algo.ts | 13 +- .../accounts/AccountsContract.approval.teal | 1226 +- .../out/accounts/AccountsContract.arc32.json | 4 +- .../out/accounts/AccountsContract.ssa.ir | 380 +- tests/approvals/out/accounts/accounts.awst | 4 +- .../approvals/out/accounts/accounts.awst.json | 22095 +++++++++++++++- .../out/arc4-struct/StructDemo.approval.teal | 153 +- .../out/arc4-struct/StructDemo.arc32.json | 2 +- .../out/arc4-struct/arc4-struct.awst | 10 +- .../out/arc4-struct/arc4-struct.awst.json | 84 +- .../DemoContract.approval.teal | 59 +- .../biguint-expressions/DemoContract.ssa.ir | 2 +- .../boolean-expressions.awst | 4 +- .../boolean-expressions.awst.json | 8 +- .../DemoContract.approval.teal | 78 + .../destructured-params.awst | 2 +- .../destructured-params.awst.json | 32 +- .../destructuring-iterators.awst.json | 26 +- .../local-state/LocalStateDemo.approval.teal | 240 + .../out/local-state/LocalStateDemo.arc32.json | 44 +- .../out/local-state/LocalStateDemo.ssa.ir | 66 +- .../out/local-state/local-state.awst | 4 +- .../out/local-state/local-state.awst.json | 2827 +- .../out/named-types/MyContract.approval.teal | 98 +- .../out/named-types/MyContract.arc32.json | 17 +- .../out/named-types/MyContract.ssa.ir | 60 +- .../out/named-types/named-types.awst | 11 +- .../out/named-types/named-types.awst.json | 1176 +- .../object-destructuring.awst | 16 +- .../object-destructuring.awst.json | 791 +- .../property-ordering.awst.json | 32 +- 43 files changed, 27838 insertions(+), 1838 deletions(-) diff --git a/package.json b/package.json index fb3225ad..c036c64d 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,9 @@ "scripts": { "postinstall": "npx patch-package", "dev:examples": "tsx src/cli.ts build examples --output-awst --output-awst-json", - "dev:approvals": "rimraf tests/approvals/out && tsx src/cli.ts build tests/approvals --output-awst --output-awst-json --output-ssa-ir --out-dir out/[name] --optimization-level 0", + "dev:approvals": "rimraf tests/approvals/out && tsx src/cli.ts build tests/approvals --dry-run", "dev:expected-output": "tsx src/cli.ts build tests/expected-output --dry-run", - "dev:testing": "tsx src/cli.ts build tests/approvals/biguint-expressions.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name]", + "dev:testing": "tsx src/cli.ts build tests/approvals/named-types.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level debug --out-dir out/[name]", "audit": "better-npm-audit audit", "format": "prettier --write .", "lint": "eslint \"src/**/*.ts\"", diff --git a/src/awst/json-serialize-awst.ts b/src/awst/json-serialize-awst.ts index 9978af51..c945746c 100644 --- a/src/awst/json-serialize-awst.ts +++ b/src/awst/json-serialize-awst.ts @@ -7,8 +7,9 @@ import { invariant } from '../util' import { buildBase85Encoder } from '../util/base-85' import { ARC4ABIMethodConfig, ContractReference, LogicSigReference } from './models' import type { RootNode } from './nodes' -import { IntrinsicCall } from './nodes' +import { IntrinsicCall, SingleEvaluation } from './nodes' import { SourceLocation } from './source-location' +import { SymbolToNumber } from './util' export class SnakeCaseSerializer { constructor(private readonly spaces = 2) {} @@ -35,6 +36,7 @@ export class AwstSerializer extends SnakeCaseSerializer { ) { super() } + #singleEvals = new SymbolToNumber() private b85 = buildBase85Encoder() protected serializerFunction(key: string, value: unknown): unknown { @@ -97,6 +99,13 @@ export class AwstSerializer extends SnakeCaseSerializer { file: filePath, } } + if (value instanceof SingleEvaluation) { + return { + _type: SingleEvaluation.name, + ...(super.serializerFunction(key, value) as object), + id: String(this.#singleEvals.forSymbol(value.id)[0]), + } + } if (value instanceof ARC4ABIMethodConfig) { // TODO: This can be removed once puya has been updated to support a more advanced default args schema return { diff --git a/src/awst/node-factory.ts b/src/awst/node-factory.ts index e134185c..4ca0c68d 100644 --- a/src/awst/node-factory.ts +++ b/src/awst/node-factory.ts @@ -34,7 +34,6 @@ import { wtypes } from './wtypes' type ConcreteNodes = typeof concreteNodes -let singleEval = 0n const explicitNodeFactory = { voidConstant(props: { sourceLocation: SourceLocation }): VoidConstant { return new VoidConstant({ @@ -133,7 +132,7 @@ const explicitNodeFactory = { }, singleEvaluation({ source }: { source: Expression }) { return new SingleEvaluation({ - id: singleEval++, + id: Symbol(), sourceLocation: source.sourceLocation, wtype: source.wtype, source, diff --git a/src/awst/nodes.ts b/src/awst/nodes.ts index 08c02cca..d76d9be0 100644 --- a/src/awst/nodes.ts +++ b/src/awst/nodes.ts @@ -162,8 +162,8 @@ export class DecimalConstant extends Expression { export class BoolConstant extends Expression { constructor(props: Props) { super(props) - this.wtype = props.wtype this.value = props.value + this.wtype = props.wtype } value: boolean accept(visitor: ExpressionVisitor): T { @@ -193,8 +193,8 @@ export class BytesConstant extends Expression { export class StringConstant extends Expression { constructor(props: Props) { super(props) - this.wtype = props.wtype this.value = props.value + this.wtype = props.wtype } value: string accept(visitor: ExpressionVisitor): T { @@ -538,7 +538,7 @@ export class SingleEvaluation extends Expression { this.sourceLocation = props.sourceLocation } source: Expression - id: bigint + id: symbol sourceLocation: SourceLocation accept(visitor: ExpressionVisitor): T { return visitor.visitSingleEvaluation(this) @@ -969,6 +969,19 @@ export class BytesAugmentedAssignment extends Statement { return visitor.visitBytesAugmentedAssignment(this) } } +export class Emit extends Expression { + constructor(props: Props) { + super(props) + this.signature = props.signature + this.value = props.value + this.wtype = props.wtype + } + signature: string + value: Expression + accept(visitor: ExpressionVisitor): T { + return visitor.visitEmit(this) + } +} export class Range extends Expression { constructor(props: Props) { super(props) @@ -1355,6 +1368,7 @@ export const concreteNodes = { uInt64AugmentedAssignment: UInt64AugmentedAssignment, bigUIntAugmentedAssignment: BigUIntAugmentedAssignment, bytesAugmentedAssignment: BytesAugmentedAssignment, + emit: Emit, range: Range, enumeration: Enumeration, reversed: Reversed, @@ -1429,6 +1443,7 @@ export interface ExpressionVisitor { visitBytesBinaryOperation(expression: BytesBinaryOperation): T visitBooleanBinaryOperation(expression: BooleanBinaryOperation): T visitNot(expression: Not): T + visitEmit(expression: Emit): T visitRange(expression: Range): T visitEnumeration(expression: Enumeration): T visitReversed(expression: Reversed): T diff --git a/src/awst/to-code-visitor.ts b/src/awst/to-code-visitor.ts index d26a6115..3154b499 100644 --- a/src/awst/to-code-visitor.ts +++ b/src/awst/to-code-visitor.ts @@ -3,9 +3,10 @@ import { TodoError } from '../errors' import { logger } from '../logger' import { uint8ArrayToBase32, uint8ArrayToUtf8 } from '../util' import type { ContractReference } from './models' -import type { AppStorageDefinition, ContractMemberNodeVisitor, ExpressionVisitor, RootNodeVisitor, StatementVisitor } from './nodes' +import type { AppStorageDefinition, ContractMemberNodeVisitor, Emit, ExpressionVisitor, RootNodeVisitor, StatementVisitor } from './nodes' import * as nodes from './nodes' import { AppStorageKind, BytesEncoding, ContractMethodTarget, InstanceMethodTarget, InstanceSuperMethodTarget, SubroutineID } from './nodes' +import { SymbolToNumber } from './util' import { wtypes } from './wtypes' function printBytes(value: Uint8Array, encoding: BytesEncoding) { @@ -41,7 +42,7 @@ export class ToCodeVisitor visitAppStorageDefinition(contractMemberNode: AppStorageDefinition): string[] { throw new Error('Method not implemented.') } - #singleEval = new Set() + #singleEval = new SymbolToNumber() visitUInt64PostfixUnaryOperation(expression: nodes.UInt64PostfixUnaryOperation): string { return `${expression.target.accept(this)}${expression.op}` } @@ -175,11 +176,11 @@ export class ToCodeVisitor return `LocalState[${expression.account.accept(this)}][${expression.key.accept(this)}]` } visitSingleEvaluation(expression: nodes.SingleEvaluation): string { - if (this.#singleEval.has(expression.id)) { - return `#${expression.id}` + const [id, isNew] = this.#singleEval.forSymbol(expression.id) + if (!isNew) { + return `#${id}` } - this.#singleEval.add(expression.id) - return `(#${expression.id} = ${expression.source.accept(this)})` + return `(#${id} = ${expression.source.accept(this)})` } visitReinterpretCast(expression: nodes.ReinterpretCast): string { const target = expression.expr.accept(this) @@ -319,6 +320,10 @@ export class ToCodeVisitor '}', ] } + visitEmit(expression: Emit): string { + throw new TodoError('Method not implemented.', { sourceLocation: expression.sourceLocation }) + } + visitContractMethod(statement: nodes.ContractMethod): string[] { const prefix = statement.cref.id === this.currentContract.at(-1)?.id ? '' : `${statement.cref.className}::` return [`${prefix}${statement.memberName}(): ${statement.returnType}`, '{', ...indent(statement.body.accept(this)), '}', ''] diff --git a/src/awst/util.ts b/src/awst/util.ts index 40c754b9..c7feee0c 100644 --- a/src/awst/util.ts +++ b/src/awst/util.ts @@ -4,3 +4,17 @@ import { BoolConstant, BytesConstant, IntegerConstant, StringConstant } from './ export function isConstant(expr: Expression): expr is Constant { return expr instanceof StringConstant || expr instanceof BytesConstant || expr instanceof IntegerConstant || expr instanceof BoolConstant } + +export class SymbolToNumber { + #symbols = new Map() + + forSymbol(sym: symbol): [number, boolean] { + let val = this.#symbols.get(sym) + if (val !== undefined) { + return [val, false] + } + val = this.#symbols.size + this.#symbols.set(sym, val) + return [val, true] + } +} diff --git a/src/awst/wtypes.ts b/src/awst/wtypes.ts index 90f15146..0c7bb00f 100644 --- a/src/awst/wtypes.ts +++ b/src/awst/wtypes.ts @@ -158,10 +158,11 @@ export namespace wtypes { } toString(): string { + const displayName = this.name.split('::').at(-1) ?? this.name if (this.names) { - return `${this.name === 'Anonymous' ? '' : this.name}{ ${this.names.map((n, i) => `${n}: ${this.types[i]}`).join(', ')} }` + return `${displayName}{ ${this.names.map((n, i) => `${n}: ${this.types[i]}`).join(', ')} }` } - return `${this.immutable ? 'readonly' : ''}${this.name ?? ''}[${this.types.join(', ')}]` + return `${this.immutable ? 'readonly' : ''}${displayName}[${this.types.join(', ')}]` } } export class WArray extends WType { diff --git a/src/awst_build/arc4-util.ts b/src/awst_build/arc4-util.ts index 19bc04cd..090db561 100644 --- a/src/awst_build/arc4-util.ts +++ b/src/awst_build/arc4-util.ts @@ -75,7 +75,9 @@ export function getFunctionTypes(ptype: FunctionPType, sourceLocation: SourceLoc if ('output' in result) { logger.error(sourceLocation, 'for compatibility with ARC-32, ARC-4 methods cannot have an argument named output') } + result['output'] = ptype.returnType + return result } diff --git a/src/awst_build/ast-visitors/contract-method-visitor.ts b/src/awst_build/ast-visitors/contract-method-visitor.ts index 01840bbc..40f0a45d 100644 --- a/src/awst_build/ast-visitors/contract-method-visitor.ts +++ b/src/awst_build/ast-visitors/contract-method-visitor.ts @@ -167,7 +167,6 @@ export class ContractMethodVisitor extends ContractMethodBaseVisitor { return new ARC4ABIMethodConfig({ sourceLocation: methodLocation, allowedCompletionTypes: [OnCompletionAction.NoOp], - create: ARC4CreateOption.Disallow, name: functionType.name, readonly: false, diff --git a/src/awst_build/eb/literal/object-literal-expression-builder.ts b/src/awst_build/eb/literal/object-literal-expression-builder.ts index dbcf1723..e2204a90 100644 --- a/src/awst_build/eb/literal/object-literal-expression-builder.ts +++ b/src/awst_build/eb/literal/object-literal-expression-builder.ts @@ -74,7 +74,7 @@ export class ObjectLiteralExpressionBuilder extends LiteralExpressionBuilder { // Resolve this object to a tuple using declared order but using the target property types. // This will resolve numeric literals to algo-ts types if available const tempType = new ObjectPType({ - name: undefined, + isAnonymous: true, properties: Object.fromEntries(this.ptype.orderedProperties().map(([p]) => [p, ptype.getPropertyType(p)] as const)), }) diff --git a/src/awst_build/ptypes/index.ts b/src/awst_build/ptypes/index.ts index 4e0d9aa3..094b2798 100644 --- a/src/awst_build/ptypes/index.ts +++ b/src/awst_build/ptypes/index.ts @@ -496,7 +496,15 @@ export class FunctionPType extends PType { super() this.name = props.name this.module = props.module - this.returnType = props.returnType + if (props.returnType instanceof ObjectPType && props.returnType.isAnonymous) { + this.returnType = new ObjectPType({ + name: `${props.name}Result`, + module: props.module, + properties: props.returnType.properties, + }) + } else { + this.returnType = props.returnType + } this.parameters = props.parameters } } @@ -608,24 +616,30 @@ export class ArrayPType extends TransientType { } } +type ObjectPTypeArgs = + | { module: string; name: string; properties: Record; isAnonymous?: false } + | { module?: undefined; name?: undefined; properties: Record; isAnonymous: true } + export class ObjectPType extends PType { readonly name: string readonly module: string readonly properties: Record readonly singleton = false + readonly isAnonymous: boolean - constructor(props: { module?: string; name?: string; properties: Record }) { + constructor(props: ObjectPTypeArgs) { super() this.name = props.name ?? '' this.module = props.module ?? '' this.properties = props.properties + this.isAnonymous = props.isAnonymous ?? false } static anonymous(props: Record | Array<[string, PType]>) { const properties = Array.isArray(props) ? Object.fromEntries(props) : props return new ObjectPType({ - name: 'Anonymous', properties, + isAnonymous: true, }) } @@ -640,7 +654,7 @@ export class ObjectPType extends PType { tupleNames.push(propName) } return new wtypes.WTuple({ - name: this.name, + name: this.fullName, names: tupleNames, types: tupleTypes, immutable: true, @@ -648,7 +662,7 @@ export class ObjectPType extends PType { } orderedProperties() { - return Object.entries(this.properties) //.toSorted(sortBy(([key]) => key)) + return Object.entries(this.properties) } getPropertyType(name: string): PType { diff --git a/tests/approvals.spec.ts b/tests/approvals.spec.ts index 7ee415f5..bcad0395 100644 --- a/tests/approvals.spec.ts +++ b/tests/approvals.spec.ts @@ -50,10 +50,10 @@ describe('Approvals', () => { }) it('There should be no differences to committed changes', () => { - // Run git add to force line ending changes - sync('git', ['add', '.'], { - stdio: 'inherit', - }) + // // Run git add to force line ending changes + // sync('git', ['add', '.'], { + // stdio: 'inherit', + // }) const result = sync('git', ['status', '--porcelain'], { stdio: 'pipe', }) diff --git a/tests/approvals/named-types.algo.ts b/tests/approvals/named-types.algo.ts index 1bb387d8..c7c6328e 100644 --- a/tests/approvals/named-types.algo.ts +++ b/tests/approvals/named-types.algo.ts @@ -1,5 +1,5 @@ import type { uint64 } from '@algorandfoundation/algorand-typescript' -import { Contract, Uint64 } from '@algorandfoundation/algorand-typescript' +import { assertMatch, Contract, Uint64 } from '@algorandfoundation/algorand-typescript' type XY = { x: uint64 @@ -11,13 +11,6 @@ type YX = { x: uint64 } -/** - * In TypeScript, objects with the same properties are considered equal regardless of declaration order however puya-ts - * should respect the declaration order when encoding an object as an ARC4 tuple. Ie. XY should be assignable to YX but - * when encoded as an ARC4 tuple they should be encoded as [X, Y] and [Y, X] respectively. - * - * TODO: This is not currently the case. - */ export class MyContract extends Contract { public getXY(): XY { return { @@ -40,7 +33,9 @@ export class MyContract extends Contract { } } - public test(x: XY, y: YX) {} + public test(x: XY, y: YX) { + assertMatch(x, { ...y }) + } public testing() { const a = this.getXY() diff --git a/tests/approvals/out/accounts/AccountsContract.approval.teal b/tests/approvals/out/accounts/AccountsContract.approval.teal index 955d5985..7ac01bc5 100644 --- a/tests/approvals/out/accounts/AccountsContract.approval.teal +++ b/tests/approvals/out/accounts/AccountsContract.approval.teal @@ -1,31 +1,49 @@ #pragma version 10 tests/approvals/accounts.algo.ts::AccountsContract.approvalProgram: - intcblock 0 1 + intcblock 0 93 1 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: callsub __puya_arc4_router__ return +// tests/approvals/accounts.algo.ts::AccountsContract.constructor() -> void: +constructor: + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { + proto 0 0 + retsub + + // tests/approvals/accounts.algo.ts::AccountsContract.__puya_arc4_router__() -> uint64: __puya_arc4_router__: // tests/approvals/accounts.algo.ts:4 // export class AccountsContract extends Contract { proto 0 1 txn NumAppArgs + intc_0 // 0 + != bz __puya_arc4_router___bare_routing@5 - pushbytes 0xdfe9a035 // method "getAccountInfo(account,asset)(byte[],uint64,uint64,byte[],uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,bool,bool)" txna ApplicationArgs 0 + pushbytes 0xdfe9a035 // method "getAccountInfo(account,asset)(byte[],uint64,uint64,byte[],uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,bool,bool)" + swap match __puya_arc4_router___getAccountInfo_route@2 - intc_0 // 0 - retsub + b __puya_arc4_router___switch_case_default@3 __puya_arc4_router___getAccountInfo_route@2: // tests/approvals/accounts.algo.ts:5 // public getAccountInfo(account: Account, asset: Asset) { txn OnCompletion - ! + intc_0 // NoOp + == assert // OnCompletion is not NoOp txn ApplicationID + intc_0 // 0 + != assert // can only call when not creating // tests/approvals/accounts.algo.ts:4 // export class AccountsContract extends Contract { @@ -38,88 +56,114 @@ __puya_arc4_router___getAccountInfo_route@2: // tests/approvals/accounts.algo.ts:5 // public getAccountInfo(account: Account, asset: Asset) { callsub getAccountInfo - dig 14 + cover 14 + cover 13 + cover 12 + cover 11 + cover 10 + cover 9 + cover 8 + cover 7 + cover 6 + cover 5 + cover 4 + cover 3 + cover 2 + swap + dup len itob extract 6 2 - uncover 15 + swap concat - uncover 14 + cover 11 itob - uncover 14 + cover 12 itob - dig 14 + cover 12 + dup len itob extract 6 2 - uncover 15 + swap concat - uncover 14 + cover 14 itob - uncover 14 + cover 9 itob - uncover 14 + cover 10 itob - uncover 14 + cover 11 itob - uncover 14 + cover 11 itob - uncover 14 + cover 12 itob - uncover 14 + cover 12 itob - uncover 14 + cover 12 itob - uncover 14 + cover 12 + swap itob + cover 12 pushbytes 0x00 intc_0 // 0 - uncover 16 + uncover 9 setbit + cover 11 pushbytes 0x00 intc_0 // 0 - uncover 16 + uncover 15 setbit - dig 14 + cover 9 + intc_1 // 93 + itob + extract 6 2 + pushbytes 0x + swap + concat + dig 1 len - pushint 93 // 93 + intc_1 // 93 + - pushbytes 0x005d - uncover 15 + swap + uncover 4 concat - uncover 14 + uncover 5 concat swap itob extract 6 2 concat - uncover 11 + uncover 2 concat - uncover 10 + uncover 2 concat - uncover 9 + uncover 2 concat - uncover 8 + uncover 2 concat - uncover 7 + uncover 2 concat - uncover 6 + uncover 2 concat - uncover 5 + uncover 3 + concat + uncover 3 concat uncover 4 concat uncover 3 concat uncover 2 - concat - swap intc_0 // 0 getbit - pushint 737 // 737 swap - setbit + pushint 737 // 737 uncover 2 + setbit + swap concat swap concat @@ -127,20 +171,34 @@ __puya_arc4_router___getAccountInfo_route@2: swap concat log - intc_1 // 1 + intc_2 // 1 retsub +__puya_arc4_router___switch_case_default@3: + b __puya_arc4_router___after_if_else@9 + __puya_arc4_router___bare_routing@5: // tests/approvals/accounts.algo.ts:4 // export class AccountsContract extends Contract { txn OnCompletion - bnz __puya_arc4_router___after_if_else@9 + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@6 + b __puya_arc4_router___switch_case_default@7 + +__puya_arc4_router_____algots__.defaultCreate@6: + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { txn ApplicationID - ! + intc_0 // 0 + == assert // can only call when creating - intc_1 // 1 + callsub __algots__.defaultCreate + intc_2 // 1 retsub +__puya_arc4_router___switch_case_default@7: + __puya_arc4_router___after_if_else@9: // tests/approvals/accounts.algo.ts:4 // export class AccountsContract extends Contract { @@ -157,91 +215,1121 @@ getAccountInfo: // balance: account.balance, frame_dig -2 acct_params_get AcctBalance + bury 1 assert // account funded // tests/approvals/accounts.algo.ts:9 // minBalance: account.minBalance, frame_dig -2 acct_params_get AcctMinBalance + bury 1 assert // account funded // tests/approvals/accounts.algo.ts:10 // authAddress: account.authAddress.bytes, frame_dig -2 acct_params_get AcctAuthAddr + bury 1 assert // account funded // tests/approvals/accounts.algo.ts:11 // totalNumUint: account.totalNumUint, frame_dig -2 acct_params_get AcctTotalNumUint + bury 1 assert // account funded // tests/approvals/accounts.algo.ts:12 // totalNumByteSlice: account.totalNumByteSlice, frame_dig -2 acct_params_get AcctTotalNumByteSlice + bury 1 assert // account funded // tests/approvals/accounts.algo.ts:13 // totalExtraAppPages: account.totalExtraAppPages, frame_dig -2 acct_params_get AcctTotalExtraAppPages + bury 1 assert // account funded // tests/approvals/accounts.algo.ts:14 // totalAppsCreated: account.totalAppsCreated, frame_dig -2 acct_params_get AcctTotalAppsCreated + bury 1 assert // account funded // tests/approvals/accounts.algo.ts:15 // totalAppsOptedIn: account.totalAppsOptedIn, frame_dig -2 acct_params_get AcctTotalAppsOptedIn + bury 1 assert // account funded // tests/approvals/accounts.algo.ts:16 // totalAssetsCreated: account.totalAssetsCreated, frame_dig -2 acct_params_get AcctTotalAssetsCreated + bury 1 assert // account funded // tests/approvals/accounts.algo.ts:17 // totalAssets: account.totalAssets, frame_dig -2 acct_params_get AcctTotalAssets + bury 1 assert // account funded // tests/approvals/accounts.algo.ts:18 // totalBoxes: account.totalBoxes, frame_dig -2 acct_params_get AcctTotalBoxes + bury 1 assert // account funded // tests/approvals/accounts.algo.ts:19 // totalBoxBytes: account.totalBoxBytes, frame_dig -2 acct_params_get AcctTotalBoxBytes + bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:20 - // isOptInApp: account.isOptedIn(Global.currentApplicationId), + // tests/approvals/accounts.algo.ts:8 + // balance: account.balance, frame_dig -2 - global CurrentApplicationID - app_opted_in - // tests/approvals/accounts.algo.ts:21 - // isOptInAsset: account.isOptedIn(asset), + acct_params_get AcctBalance + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // minBalance: account.minBalance, frame_dig -2 - frame_dig -1 - asset_holding_get AssetBalance + acct_params_get AcctMinBalance bury 1 - // tests/approvals/accounts.algo.ts:6-22 - // return { - // bytes: account.bytes, - // balance: account.balance, - // minBalance: account.minBalance, - // authAddress: account.authAddress.bytes, - // totalNumUint: account.totalNumUint, - // totalNumByteSlice: account.totalNumByteSlice, - // totalExtraAppPages: account.totalExtraAppPages, - // totalAppsCreated: account.totalAppsCreated, - // totalAppsOptedIn: account.totalAppsOptedIn, - // totalAssetsCreated: account.totalAssetsCreated, - // totalAssets: account.totalAssets, - // totalBoxes: account.totalBoxes, - // totalBoxBytes: account.totalBoxBytes, - // isOptInApp: account.isOptedIn(Global.currentApplicationId), - // isOptInAsset: account.isOptedIn(asset), - // } + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // authAddress: account.authAddress.bytes, frame_dig -2 - cover 14 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:8 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:8 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:8 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:8 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:8 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:8 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:8 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:8 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:8 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:8 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:8 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + assert // account funded + // tests/approvals/accounts.algo.ts:8 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:20 + // isOptInApp: account.isOptedIn(Global.currentApplicationId), + global CurrentApplicationID + frame_dig -2 + swap + app_opted_in + // tests/approvals/accounts.algo.ts:8 + // balance: account.balance, + frame_dig -2 + acct_params_get AcctBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:9 + // minBalance: account.minBalance, + frame_dig -2 + acct_params_get AcctMinBalance + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:10 + // authAddress: account.authAddress.bytes, + frame_dig -2 + acct_params_get AcctAuthAddr + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:11 + // totalNumUint: account.totalNumUint, + frame_dig -2 + acct_params_get AcctTotalNumUint + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:12 + // totalNumByteSlice: account.totalNumByteSlice, + frame_dig -2 + acct_params_get AcctTotalNumByteSlice + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:13 + // totalExtraAppPages: account.totalExtraAppPages, + frame_dig -2 + acct_params_get AcctTotalExtraAppPages + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:14 + // totalAppsCreated: account.totalAppsCreated, + frame_dig -2 + acct_params_get AcctTotalAppsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:15 + // totalAppsOptedIn: account.totalAppsOptedIn, + frame_dig -2 + acct_params_get AcctTotalAppsOptedIn + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:16 + // totalAssetsCreated: account.totalAssetsCreated, + frame_dig -2 + acct_params_get AcctTotalAssetsCreated + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:17 + // totalAssets: account.totalAssets, + frame_dig -2 + acct_params_get AcctTotalAssets + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:18 + // totalBoxes: account.totalBoxes, + frame_dig -2 + acct_params_get AcctTotalBoxes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:19 + // totalBoxBytes: account.totalBoxBytes, + frame_dig -2 + acct_params_get AcctTotalBoxBytes + bury 1 + assert // account funded + // tests/approvals/accounts.algo.ts:21 + // isOptInAsset: account.isOptedIn(asset), + frame_dig -2 + frame_dig -1 + asset_holding_get AssetBalance + bury 1 + // tests/approvals/accounts.algo.ts:6-22 + // return { + // bytes: account.bytes, + // balance: account.balance, + // minBalance: account.minBalance, + // authAddress: account.authAddress.bytes, + // totalNumUint: account.totalNumUint, + // totalNumByteSlice: account.totalNumByteSlice, + // totalExtraAppPages: account.totalExtraAppPages, + // totalAppsCreated: account.totalAppsCreated, + // totalAppsOptedIn: account.totalAppsOptedIn, + // totalAssetsCreated: account.totalAssetsCreated, + // totalAssets: account.totalAssets, + // totalBoxes: account.totalBoxes, + // totalBoxBytes: account.totalBoxBytes, + // isOptInApp: account.isOptedIn(Global.currentApplicationId), + // isOptInAsset: account.isOptedIn(asset), + // } + frame_dig -2 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + uncover 14 + retsub + + +// tests/approvals/accounts.algo.ts::AccountsContract.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/accounts.algo.ts:4 + // export class AccountsContract extends Contract { + proto 0 0 retsub diff --git a/tests/approvals/out/accounts/AccountsContract.arc32.json b/tests/approvals/out/accounts/AccountsContract.arc32.json index 4f4ed0fb..8985b083 100644 --- a/tests/approvals/out/accounts/AccountsContract.arc32.json +++ b/tests/approvals/out/accounts/AccountsContract.arc32.json @@ -6,7 +6,7 @@ }, "structs": { "output": { - "name": "Anonymous", + "name": "getAccountInfoResult", "elements": [ [ "bytes", @@ -74,7 +74,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo6QWNjb3VudHNDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo6QWNjb3VudHNDb250cmFjdC5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpI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KICAgICsKICAgIHB1c2hieXRlcyAweDAwNWQKICAgIHVuY292ZXIgMTUKICAgIGNvbmNhdAogICAgdW5jb3ZlciAxNAogICAgY29uY2F0CiAgICBzd2FwCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgY29uY2F0CiAgICB1bmNvdmVyIDExCiAgICBjb25jYXQKICAgIHVuY292ZXIgMTAKICAgIGNvbmNhdAogICAgdW5jb3ZlciA5CiAgICBjb25jYXQKICAgIHVuY292ZXIgOAogICAgY29uY2F0CiAgICB1bmNvdmVyIDcKICAgIGNvbmNhdAogICAgdW5jb3ZlciA2CiAgICBjb25jYXQKICAgIHVuY292ZXIgNQogICAgY29uY2F0CiAgICB1bmNvdmVyIDQKICAgIGNvbmNhdAogICAgdW5jb3ZlciAzCiAgICBjb25jYXQKICAgIHVuY292ZXIgMgogICAgY29uY2F0CiAgICBzd2FwCiAgICBpbnRjXzAgLy8gMAogICAgZ2V0Yml0CiAgICBwdXNoaW50IDczNyAvLyA3MzcKICAgIHN3YXAKICAgIHNldGJpdAogICAgdW5jb3ZlciAyCiAgICBjb25jYXQKICAgIHN3YXAKICAgIGNvbmNhdAogICAgcHVzaGJ5dGVzIDB4MTUxZjdjNzUKICAgIHN3YXAKICAgIGNvbmNhdAogICAgbG9nCiAgICBpbnRjXzEgLy8gMQogICAgcmV0c3ViCgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19iYXJlX3JvdXRpbmdANToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hY2NvdW50cy5hbGdvLnRzOjQKICAgIC8vIGV4cG9ydCBjbGFzcyBBY2NvdW50c0NvbnRyYWN0IGV4dGVuZHMgQ29udHJhY3QgewogICAgdHhuIE9uQ29tcGxldGlvbgogICAgYm56IF9fcHV5YV9hcmM0X3JvdXRlcl9fX2FmdGVyX2lmX2Vsc2VAOQogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgICEKICAgIGFzc2VydCAvLyBjYW4gb25seSBjYWxsIHdoZW4gY3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ZvX3JvdXRlQDI6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo1CiAgICAvLyBwdWJsaWMgZ2V0QWNjb3VudEluZm8oYWNjb3VudDogQWNjb3VudCwgYXNzZXQ6IEFzc2V0KSB7CiAgICB0eG4gT25Db21wbGV0aW9uCiAgICBpbnRjXzAgLy8gTm9PcAogICAgPT0KICAgIGFzc2VydCAvLyBPbkNvbXBsZXRpb24gaXMgbm90IE5vT3AKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBpbnRjXzAgLy8gMAogICAgIT0KICAgIGFzc2VydCAvLyBjYW4gb25seSBjYWxsIHdoZW4gbm90IGNyZWF0aW5nCiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo0CiAgICAvLyBleHBvcnQgY2xhc3MgQWNjb3VudHNDb250cmFjdCBleHRlbmRzIENvbnRyYWN0IHsKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDEKICAgIGJ0b2kKICAgIHR4bmFzIEFjY291bnRzCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAyCiAgICBidG9pCiAgICB0eG5hcyBBc3NldHMKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hY2NvdW50cy5hbGdvLnRzOjUKICAgIC8vIHB1YmxpYyBnZXRBY2NvdW50SW5mbyhhY2NvdW50OiBBY2NvdW50LCBhc3NldDogQXNzZXQpIHsKICAgIGNhbGxzdWIgZ2V0QWNjb3VudEluZm8KICAgIGNvdmVyIDE0CiAgICBjb3ZlciAxMwogICAgY292ZXIgMTIKICAgIGNvdmVyIDExCiAgICBjb3ZlciAxMAogICAgY292ZXIgOQogICAgY292ZXIgOAogICAgY292ZXIgNwogICAgY292ZXIgNgogICAgY292ZXIgNQogICAgY292ZXIgNAogICAgY292ZXIgMwogICAgY292ZXIgMgogICAgc3dhcAogICAgZHVwCiAgICBsZW4KICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBzd2FwCiAgICBjb25jYXQKICAgIGNvdmVyIDExCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgaXRvYgogICAgY292ZXIgMTIKICAgIGR1cAogICAgbGVuCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgc3dhcAogICAgY29uY2F0CiAgICBjb3ZlciAxNAogICAgaXRvYgogICAgY292ZXIgOQogICAgaXRvYgogICAgY292ZXIgMTAKICAgIGl0b2IKICAgIGNvdmVyIDExCiAgICBpdG9iCiAgICBjb3ZlciAxMQogICAgaXRvYgogICAgY292ZXIgMTIKICAgIGl0b2IKICAgIGNvdmVyIDEyCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgaXRvYgogICAgY292ZXIgMTIKICAgIHN3YXAKICAgIGl0b2IKICAgIGNvdmVyIDEyCiAgICBwdXNoYnl0ZXMgMHgwMAogICAgaW50Y18wIC8vIDAKICAgIHVuY292ZXIgOQogICAgc2V0Yml0CiAgICBjb3ZlciAxMQogICAgcHVzaGJ5dGVzIDB4MDAKICAgIGludGNfMCAvLyAwCiAgICB1bmNvdmVyIDE1CiAgICBzZXRiaXQKICAgIGNvdmVyIDkKICAgIGludGNfMSAvLyA5MwogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIHB1c2hieXRlcyAweAogICAgc3dhcAogICAgY29uY2F0CiAgICBkaWcgMQogICAgbGVuCiAgICBpbnRjXzEgLy8gOTMKICAgICsKICAgIHN3YXAKICAgIHVuY292ZXIgNAogICAgY29uY2F0CiAgICB1bmNvdmVyIDUKICAgIGNvbmNhdAogICAgc3dhcAogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGNvbmNhdAogICAgdW5jb3ZlciAyCiAgICBjb25jYXQKICAgIHVuY292ZXIgMgogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmNhdAogICAgdW5jb3ZlciAyCiAgICBjb25jYXQKICAgIHVuY292ZXIgMgogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKIC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leHBvcnQgY2xhc3MgQWNjb3VudHNDb250cmFjdCBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo6QWNjb3VudHNDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/accounts/AccountsContract.ssa.ir b/tests/approvals/out/accounts/AccountsContract.ssa.ir index b94d4956..ae35695f 100644 --- a/tests/approvals/out/accounts/AccountsContract.ssa.ir +++ b/tests/approvals/out/accounts/AccountsContract.ssa.ir @@ -138,7 +138,385 @@ contract tests/approvals/accounts.algo.ts::AccountsContract: let tmp%0#0: uint64 = (global CurrentApplicationID) let tmp%1#0: bool = (app_opted_in account#0 tmp%0#0) let (tmp%2#0: uint64, tmp%3#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) - return account#0 value%0#0 value%1#0 value%2#0 value%3#0 value%4#0 value%5#0 value%6#0 value%7#0 value%8#0 value%9#0 value%10#0 value%11#0 tmp%1#0 tmp%3#0 + let (value%12#0: uint64, check%12#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%12#0) // account funded + let (value%13#0: uint64, check%13#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%13#0) // account funded + let (value%14#0: bytes, check%14#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%14#0) // account funded + let (value%15#0: uint64, check%15#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%15#0) // account funded + let (value%16#0: uint64, check%16#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%16#0) // account funded + let (value%17#0: uint64, check%17#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%17#0) // account funded + let (value%18#0: uint64, check%18#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%18#0) // account funded + let (value%19#0: uint64, check%19#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%19#0) // account funded + let (value%20#0: uint64, check%20#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%20#0) // account funded + let (value%21#0: uint64, check%21#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%21#0) // account funded + let (value%22#0: uint64, check%22#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%22#0) // account funded + let (value%23#0: uint64, check%23#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%23#0) // account funded + let tmp%4#0: uint64 = (global CurrentApplicationID) + let tmp%5#0: bool = (app_opted_in account#0 tmp%4#0) + let (tmp%6#0: uint64, tmp%7#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%24#0: uint64, check%24#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%24#0) // account funded + let (value%25#0: uint64, check%25#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%25#0) // account funded + let (value%26#0: bytes, check%26#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%26#0) // account funded + let (value%27#0: uint64, check%27#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%27#0) // account funded + let (value%28#0: uint64, check%28#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%28#0) // account funded + let (value%29#0: uint64, check%29#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%29#0) // account funded + let (value%30#0: uint64, check%30#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%30#0) // account funded + let (value%31#0: uint64, check%31#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%31#0) // account funded + let (value%32#0: uint64, check%32#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%32#0) // account funded + let (value%33#0: uint64, check%33#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%33#0) // account funded + let (value%34#0: uint64, check%34#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%34#0) // account funded + let (value%35#0: uint64, check%35#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%35#0) // account funded + let tmp%8#0: uint64 = (global CurrentApplicationID) + let tmp%9#0: bool = (app_opted_in account#0 tmp%8#0) + let (tmp%10#0: uint64, tmp%11#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%36#0: uint64, check%36#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%36#0) // account funded + let (value%37#0: uint64, check%37#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%37#0) // account funded + let (value%38#0: bytes, check%38#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%38#0) // account funded + let (value%39#0: uint64, check%39#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%39#0) // account funded + let (value%40#0: uint64, check%40#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%40#0) // account funded + let (value%41#0: uint64, check%41#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%41#0) // account funded + let (value%42#0: uint64, check%42#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%42#0) // account funded + let (value%43#0: uint64, check%43#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%43#0) // account funded + let (value%44#0: uint64, check%44#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%44#0) // account funded + let (value%45#0: uint64, check%45#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%45#0) // account funded + let (value%46#0: uint64, check%46#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%46#0) // account funded + let (value%47#0: uint64, check%47#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%47#0) // account funded + let tmp%12#0: uint64 = (global CurrentApplicationID) + let tmp%13#0: bool = (app_opted_in account#0 tmp%12#0) + let (tmp%14#0: uint64, tmp%15#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%48#0: uint64, check%48#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%48#0) // account funded + let (value%49#0: uint64, check%49#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%49#0) // account funded + let (value%50#0: bytes, check%50#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%50#0) // account funded + let (value%51#0: uint64, check%51#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%51#0) // account funded + let (value%52#0: uint64, check%52#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%52#0) // account funded + let (value%53#0: uint64, check%53#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%53#0) // account funded + let (value%54#0: uint64, check%54#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%54#0) // account funded + let (value%55#0: uint64, check%55#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%55#0) // account funded + let (value%56#0: uint64, check%56#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%56#0) // account funded + let (value%57#0: uint64, check%57#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%57#0) // account funded + let (value%58#0: uint64, check%58#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%58#0) // account funded + let (value%59#0: uint64, check%59#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%59#0) // account funded + let tmp%16#0: uint64 = (global CurrentApplicationID) + let tmp%17#0: bool = (app_opted_in account#0 tmp%16#0) + let (tmp%18#0: uint64, tmp%19#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%60#0: uint64, check%60#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%60#0) // account funded + let (value%61#0: uint64, check%61#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%61#0) // account funded + let (value%62#0: bytes, check%62#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%62#0) // account funded + let (value%63#0: uint64, check%63#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%63#0) // account funded + let (value%64#0: uint64, check%64#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%64#0) // account funded + let (value%65#0: uint64, check%65#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%65#0) // account funded + let (value%66#0: uint64, check%66#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%66#0) // account funded + let (value%67#0: uint64, check%67#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%67#0) // account funded + let (value%68#0: uint64, check%68#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%68#0) // account funded + let (value%69#0: uint64, check%69#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%69#0) // account funded + let (value%70#0: uint64, check%70#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%70#0) // account funded + let (value%71#0: uint64, check%71#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%71#0) // account funded + let tmp%20#0: uint64 = (global CurrentApplicationID) + let tmp%21#0: bool = (app_opted_in account#0 tmp%20#0) + let (tmp%22#0: uint64, tmp%23#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%72#0: uint64, check%72#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%72#0) // account funded + let (value%73#0: uint64, check%73#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%73#0) // account funded + let (value%74#0: bytes, check%74#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%74#0) // account funded + let (value%75#0: uint64, check%75#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%75#0) // account funded + let (value%76#0: uint64, check%76#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%76#0) // account funded + let (value%77#0: uint64, check%77#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%77#0) // account funded + let (value%78#0: uint64, check%78#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%78#0) // account funded + let (value%79#0: uint64, check%79#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%79#0) // account funded + let (value%80#0: uint64, check%80#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%80#0) // account funded + let (value%81#0: uint64, check%81#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%81#0) // account funded + let (value%82#0: uint64, check%82#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%82#0) // account funded + let (value%83#0: uint64, check%83#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%83#0) // account funded + let tmp%24#0: uint64 = (global CurrentApplicationID) + let tmp%25#0: bool = (app_opted_in account#0 tmp%24#0) + let (tmp%26#0: uint64, tmp%27#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%84#0: uint64, check%84#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%84#0) // account funded + let (value%85#0: uint64, check%85#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%85#0) // account funded + let (value%86#0: bytes, check%86#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%86#0) // account funded + let (value%87#0: uint64, check%87#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%87#0) // account funded + let (value%88#0: uint64, check%88#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%88#0) // account funded + let (value%89#0: uint64, check%89#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%89#0) // account funded + let (value%90#0: uint64, check%90#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%90#0) // account funded + let (value%91#0: uint64, check%91#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%91#0) // account funded + let (value%92#0: uint64, check%92#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%92#0) // account funded + let (value%93#0: uint64, check%93#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%93#0) // account funded + let (value%94#0: uint64, check%94#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%94#0) // account funded + let (value%95#0: uint64, check%95#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%95#0) // account funded + let tmp%28#0: uint64 = (global CurrentApplicationID) + let tmp%29#0: bool = (app_opted_in account#0 tmp%28#0) + let (tmp%30#0: uint64, tmp%31#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%96#0: uint64, check%96#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%96#0) // account funded + let (value%97#0: uint64, check%97#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%97#0) // account funded + let (value%98#0: bytes, check%98#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%98#0) // account funded + let (value%99#0: uint64, check%99#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%99#0) // account funded + let (value%100#0: uint64, check%100#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%100#0) // account funded + let (value%101#0: uint64, check%101#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%101#0) // account funded + let (value%102#0: uint64, check%102#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%102#0) // account funded + let (value%103#0: uint64, check%103#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%103#0) // account funded + let (value%104#0: uint64, check%104#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%104#0) // account funded + let (value%105#0: uint64, check%105#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%105#0) // account funded + let (value%106#0: uint64, check%106#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%106#0) // account funded + let (value%107#0: uint64, check%107#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%107#0) // account funded + let tmp%32#0: uint64 = (global CurrentApplicationID) + let tmp%33#0: bool = (app_opted_in account#0 tmp%32#0) + let (tmp%34#0: uint64, tmp%35#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%108#0: uint64, check%108#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%108#0) // account funded + let (value%109#0: uint64, check%109#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%109#0) // account funded + let (value%110#0: bytes, check%110#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%110#0) // account funded + let (value%111#0: uint64, check%111#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%111#0) // account funded + let (value%112#0: uint64, check%112#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%112#0) // account funded + let (value%113#0: uint64, check%113#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%113#0) // account funded + let (value%114#0: uint64, check%114#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%114#0) // account funded + let (value%115#0: uint64, check%115#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%115#0) // account funded + let (value%116#0: uint64, check%116#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%116#0) // account funded + let (value%117#0: uint64, check%117#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%117#0) // account funded + let (value%118#0: uint64, check%118#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%118#0) // account funded + let (value%119#0: uint64, check%119#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%119#0) // account funded + let tmp%36#0: uint64 = (global CurrentApplicationID) + let tmp%37#0: bool = (app_opted_in account#0 tmp%36#0) + let (tmp%38#0: uint64, tmp%39#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%120#0: uint64, check%120#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%120#0) // account funded + let (value%121#0: uint64, check%121#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%121#0) // account funded + let (value%122#0: bytes, check%122#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%122#0) // account funded + let (value%123#0: uint64, check%123#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%123#0) // account funded + let (value%124#0: uint64, check%124#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%124#0) // account funded + let (value%125#0: uint64, check%125#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%125#0) // account funded + let (value%126#0: uint64, check%126#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%126#0) // account funded + let (value%127#0: uint64, check%127#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%127#0) // account funded + let (value%128#0: uint64, check%128#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%128#0) // account funded + let (value%129#0: uint64, check%129#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%129#0) // account funded + let (value%130#0: uint64, check%130#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%130#0) // account funded + let (value%131#0: uint64, check%131#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%131#0) // account funded + let tmp%40#0: uint64 = (global CurrentApplicationID) + let tmp%41#0: bool = (app_opted_in account#0 tmp%40#0) + let (tmp%42#0: uint64, tmp%43#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%132#0: uint64, check%132#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%132#0) // account funded + let (value%133#0: uint64, check%133#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%133#0) // account funded + let (value%134#0: bytes, check%134#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%134#0) // account funded + let (value%135#0: uint64, check%135#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%135#0) // account funded + let (value%136#0: uint64, check%136#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%136#0) // account funded + let (value%137#0: uint64, check%137#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%137#0) // account funded + let (value%138#0: uint64, check%138#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%138#0) // account funded + let (value%139#0: uint64, check%139#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%139#0) // account funded + let (value%140#0: uint64, check%140#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%140#0) // account funded + let (value%141#0: uint64, check%141#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%141#0) // account funded + let (value%142#0: uint64, check%142#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%142#0) // account funded + let (value%143#0: uint64, check%143#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%143#0) // account funded + let tmp%44#0: uint64 = (global CurrentApplicationID) + let tmp%45#0: bool = (app_opted_in account#0 tmp%44#0) + let (tmp%46#0: uint64, tmp%47#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%144#0: uint64, check%144#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%144#0) // account funded + let (value%145#0: uint64, check%145#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%145#0) // account funded + let (value%146#0: bytes, check%146#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%146#0) // account funded + let (value%147#0: uint64, check%147#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%147#0) // account funded + let (value%148#0: uint64, check%148#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%148#0) // account funded + let (value%149#0: uint64, check%149#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%149#0) // account funded + let (value%150#0: uint64, check%150#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%150#0) // account funded + let (value%151#0: uint64, check%151#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%151#0) // account funded + let (value%152#0: uint64, check%152#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%152#0) // account funded + let (value%153#0: uint64, check%153#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%153#0) // account funded + let (value%154#0: uint64, check%154#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%154#0) // account funded + let (value%155#0: uint64, check%155#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%155#0) // account funded + let tmp%48#0: uint64 = (global CurrentApplicationID) + let tmp%49#0: bool = (app_opted_in account#0 tmp%48#0) + let (tmp%50#0: uint64, tmp%51#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%156#0: uint64, check%156#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%156#0) // account funded + let (value%157#0: uint64, check%157#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%157#0) // account funded + let (value%158#0: bytes, check%158#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%158#0) // account funded + let (value%159#0: uint64, check%159#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%159#0) // account funded + let (value%160#0: uint64, check%160#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%160#0) // account funded + let (value%161#0: uint64, check%161#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%161#0) // account funded + let (value%162#0: uint64, check%162#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%162#0) // account funded + let (value%163#0: uint64, check%163#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%163#0) // account funded + let (value%164#0: uint64, check%164#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%164#0) // account funded + let (value%165#0: uint64, check%165#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%165#0) // account funded + let (value%166#0: uint64, check%166#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%166#0) // account funded + let (value%167#0: uint64, check%167#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%167#0) // account funded + let tmp%52#0: uint64 = (global CurrentApplicationID) + let tmp%53#0: bool = (app_opted_in account#0 tmp%52#0) + let (tmp%54#0: uint64, tmp%55#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + let (value%168#0: uint64, check%168#0: bool) = ((acct_params_get AcctBalance) account#0) + (assert check%168#0) // account funded + let (value%169#0: uint64, check%169#0: bool) = ((acct_params_get AcctMinBalance) account#0) + (assert check%169#0) // account funded + let (value%170#0: bytes, check%170#0: bool) = ((acct_params_get AcctAuthAddr) account#0) + (assert check%170#0) // account funded + let (value%171#0: uint64, check%171#0: bool) = ((acct_params_get AcctTotalNumUint) account#0) + (assert check%171#0) // account funded + let (value%172#0: uint64, check%172#0: bool) = ((acct_params_get AcctTotalNumByteSlice) account#0) + (assert check%172#0) // account funded + let (value%173#0: uint64, check%173#0: bool) = ((acct_params_get AcctTotalExtraAppPages) account#0) + (assert check%173#0) // account funded + let (value%174#0: uint64, check%174#0: bool) = ((acct_params_get AcctTotalAppsCreated) account#0) + (assert check%174#0) // account funded + let (value%175#0: uint64, check%175#0: bool) = ((acct_params_get AcctTotalAppsOptedIn) account#0) + (assert check%175#0) // account funded + let (value%176#0: uint64, check%176#0: bool) = ((acct_params_get AcctTotalAssetsCreated) account#0) + (assert check%176#0) // account funded + let (value%177#0: uint64, check%177#0: bool) = ((acct_params_get AcctTotalAssets) account#0) + (assert check%177#0) // account funded + let (value%178#0: uint64, check%178#0: bool) = ((acct_params_get AcctTotalBoxes) account#0) + (assert check%178#0) // account funded + let (value%179#0: uint64, check%179#0: bool) = ((acct_params_get AcctTotalBoxBytes) account#0) + (assert check%179#0) // account funded + let tmp%56#0: uint64 = (global CurrentApplicationID) + let tmp%57#0: bool = (app_opted_in account#0 tmp%56#0) + let (tmp%58#0: uint64, tmp%59#0: bool) = ((asset_holding_get AssetBalance) account#0 asset#0) + return account#0 value%12#0 value%25#0 value%38#0 value%51#0 value%64#0 value%77#0 value%90#0 value%103#0 value%116#0 value%129#0 value%142#0 value%155#0 tmp%53#0 tmp%59#0 subroutine tests/approvals/accounts.algo.ts::AccountsContract.__algots__.defaultCreate() -> void: block@0: // L4 diff --git a/tests/approvals/out/accounts/accounts.awst b/tests/approvals/out/accounts/accounts.awst index 0d7eac48..2cb08341 100644 --- a/tests/approvals/out/accounts/accounts.awst +++ b/tests/approvals/out/accounts/accounts.awst @@ -13,9 +13,9 @@ contract AccountsContract return True } - getAccountInfo(): { bytes: bytes, balance: uint64, minBalance: uint64, authAddress: bytes, totalNumUint: uint64, totalNumByteSlice: uint64, totalExtraAppPages: uint64, totalAppsCreated: uint64, totalAppsOptedIn: uint64, totalAssetsCreated: uint64, totalAssets: uint64, totalBoxes: uint64, totalBoxBytes: uint64, isOptInApp: bool, isOptInAsset: bool } + getAccountInfo(): getAccountInfoResult{ bytes: bytes, balance: uint64, minBalance: uint64, authAddress: bytes, totalNumUint: uint64, totalNumByteSlice: uint64, totalExtraAppPages: uint64, totalAppsCreated: uint64, totalAppsOptedIn: uint64, totalAssetsCreated: uint64, totalAssets: uint64, totalBoxes: uint64, totalBoxBytes: uint64, isOptInApp: bool, isOptInAsset: bool } { - return { bytes: reinterpret_cast(account), balance: checked_maybe(acct_params_get(account), comment=account funded), minBalance: checked_maybe(acct_params_get(account), comment=account funded), authAddress: reinterpret_cast(checked_maybe(acct_params_get(account), comment=account funded)), totalNumUint: checked_maybe(acct_params_get(account), comment=account funded), totalNumByteSlice: checked_maybe(acct_params_get(account), comment=account funded), totalExtraAppPages: checked_maybe(acct_params_get(account), comment=account funded), totalAppsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAppsOptedIn: checked_maybe(acct_params_get(account), comment=account funded), totalAssetsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAssets: checked_maybe(acct_params_get(account), comment=account funded), totalBoxes: checked_maybe(acct_params_get(account), comment=account funded), totalBoxBytes: checked_maybe(acct_params_get(account), comment=account funded), isOptInApp: app_opted_in(account, global()), isOptInAsset: asset_holding_get(account, asset).1 } + return { bytes: (#0 = { bytes: reinterpret_cast(account), balance: checked_maybe(acct_params_get(account), comment=account funded), minBalance: checked_maybe(acct_params_get(account), comment=account funded), authAddress: reinterpret_cast(checked_maybe(acct_params_get(account), comment=account funded)), totalNumUint: checked_maybe(acct_params_get(account), comment=account funded), totalNumByteSlice: checked_maybe(acct_params_get(account), comment=account funded), totalExtraAppPages: checked_maybe(acct_params_get(account), comment=account funded), totalAppsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAppsOptedIn: checked_maybe(acct_params_get(account), comment=account funded), totalAssetsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAssets: checked_maybe(acct_params_get(account), comment=account funded), totalBoxes: checked_maybe(acct_params_get(account), comment=account funded), totalBoxBytes: checked_maybe(acct_params_get(account), comment=account funded), isOptInApp: app_opted_in(account, global()), isOptInAsset: asset_holding_get(account, asset).1 }).bytes, balance: #0.balance, minBalance: #0.minBalance, authAddress: #0.authAddress, totalNumUint: #0.totalNumUint, totalNumByteSlice: #0.totalNumByteSlice, totalExtraAppPages: #0.totalExtraAppPages, totalAppsCreated: #0.totalAppsCreated, totalAppsOptedIn: #0.totalAppsOptedIn, totalAssetsCreated: #0.totalAssetsCreated, totalAssets: #0.totalAssets, totalBoxes: #0.totalBoxes, totalBoxBytes: #0.totalBoxBytes, isOptInApp: #0.isOptInApp, isOptInAsset: #0.isOptInAsset } } constructor(): void diff --git a/tests/approvals/out/accounts/accounts.awst.json b/tests/approvals/out/accounts/accounts.awst.json index bbf83e2a..b6d34727 100644 --- a/tests/approvals/out/accounts/accounts.awst.json +++ b/tests/approvals/out/accounts/accounts.awst.json @@ -346,7 +346,7 @@ ], "return_type": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/accounts.algo.ts::getAccountInfoResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -505,7 +505,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/accounts.algo.ts::getAccountInfoResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -636,13 +636,13 @@ }, "items": [ { - "_type": "ReinterpretCast", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, - "column": 13, - "end_column": 26 + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WType", @@ -651,133 +651,29 @@ "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, - "column": 13, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "account" - } - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, - "column": 15, - "end_column": 30 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", + "base": { + "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, - "column": 15, - "end_column": 30 + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "tuple", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, "types": [ { "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctBalance" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, - "column": 15, - "end_column": 22 - }, - "wtype": { - "_type": "WType", - "name": "account", + "name": "bytes", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, - "column": 18, - "end_column": 36 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, - "column": 18, - "end_column": 36 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { "_type": "WType", "name": "uint64", @@ -787,166 +683,18 @@ }, { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctMinBalance" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, - "column": 18, - "end_column": 25 }, - "wtype": { + { "_type": "WType", - "name": "account", + "name": "bytes", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, - "column": 19, - "end_column": 44 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, - "column": 19, - "end_column": 38 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, - "column": 19, - "end_column": 38 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctAuthAddr" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, - "column": 19, - "end_column": 26 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - } - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, - "column": 20, - "end_column": 40 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, - "column": 20, - "end_column": 40 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { "_type": "WType", "name": "uint64", @@ -956,73 +704,18 @@ }, { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalNumUint" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, - "column": 20, - "end_column": 27 }, - "wtype": { + { "_type": "WType", - "name": "account", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, - "column": 25, - "end_column": 50 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, - "column": 25, - "end_column": 50 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { "_type": "WType", "name": "uint64", @@ -1032,73 +725,18 @@ }, { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalNumByteSlice" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, - "column": 25, - "end_column": 32 }, - "wtype": { + { "_type": "WType", - "name": "account", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, - "column": 26, - "end_column": 52 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, - "column": 26, - "end_column": 52 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { "_type": "WType", "name": "uint64", @@ -1108,76 +746,21 @@ }, { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalExtraAppPages" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, - "column": 26, - "end_column": 33 }, - "wtype": { + { "_type": "WType", - "name": "account", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, - "column": 24, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, - "column": 24, - "end_column": 48 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { "_type": "WType", - "name": "uint64", + "name": "bool", "immutable": true, "ephemeral": false, "scalar_type": 2 @@ -1189,68 +772,19872 @@ "ephemeral": false, "scalar_type": 2 } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" ] }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalAppsCreated" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, - "column": 24, - "end_column": 31 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, - "column": 24, - "end_column": 48 + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 36, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [], + "comment": null + } + ], + "comment": null + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ], + "comment": null + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "bytes" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 36, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [], + "comment": null + } + ], + "comment": null + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ], + "comment": null + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "balance" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 36, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [], + "comment": null + } + ], + "comment": null + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ], + "comment": null + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "minBalance" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 36, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [], + "comment": null + } + ], + "comment": null + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ], + "comment": null + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "authAddress" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 36, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [], + "comment": null + } + ], + "comment": null + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ], + "comment": null + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalNumUint" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 36, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [], + "comment": null + } + ], + "comment": null + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ], + "comment": null + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalNumByteSlice" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 36, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [], + "comment": null + } + ], + "comment": null + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ], + "comment": null + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalExtraAppPages" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 36, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [], + "comment": null + } + ], + "comment": null + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ], + "comment": null + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalAppsCreated" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 36, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [], + "comment": null + } + ], + "comment": null + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ], + "comment": null + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalAppsOptedIn" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 36, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [], + "comment": null + } + ], + "comment": null + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ], + "comment": null + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalAssetsCreated" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 36, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [], + "comment": null + } + ], + "comment": null + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ], + "comment": null + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalAssets" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 36, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [], + "comment": null + } + ], + "comment": null + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ], + "comment": null + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalBoxes" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 36, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [], + "comment": null + } + ], + "comment": null + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ], + "comment": null + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "totalBoxBytes" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 36, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [], + "comment": null + } + ], + "comment": null + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ], + "comment": null + }, + "index": "1" + } + ] + }, + "id": "0" + }, + "name": "isOptInApp" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WType", - "name": "uint64", + "name": "bool", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", + "base": { + "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, - "column": 24, - "end_column": 48 + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "tuple", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, { "_type": "WType", "name": "uint64", @@ -1260,73 +20647,18 @@ }, { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalAppsOptedIn" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, - "column": 24, - "end_column": 31 }, - "wtype": { + { "_type": "WType", - "name": "account", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, - "column": 26, - "end_column": 52 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, - "column": 26, - "end_column": 52 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { "_type": "WType", "name": "uint64", @@ -1336,73 +20668,25 @@ }, { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalAssetsCreated" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, - "column": 26, - "end_column": 33 }, - "wtype": { + { "_type": "WType", - "name": "account", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, - "column": 19, - "end_column": 38 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, - "column": 19, - "end_column": 38 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { "_type": "WType", "name": "uint64", @@ -1410,6 +20694,13 @@ "ephemeral": false, "scalar_type": 2 }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, { "_type": "WType", "name": "bool", @@ -1417,344 +20708,1292 @@ "ephemeral": false, "scalar_type": 2 } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" ] }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalAssets" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, - "column": 19, - "end_column": 26 + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 22, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "bytes", + "balance", + "minBalance", + "authAddress", + "totalNumUint", + "totalNumByteSlice", + "totalExtraAppPages", + "totalAppsCreated", + "totalAppsOptedIn", + "totalAssetsCreated", + "totalAssets", + "totalBoxes", + "totalBoxBytes", + "isOptInApp", + "isOptInAsset" + ] + }, + "items": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 7, + "column": 13, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 30 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctMinBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctAuthAddr" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 10, + "end_line": 10, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + } + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 40 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumUint" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" + }, + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 50 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalNumByteSlice" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalExtraAppPages" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 13, + "end_line": 13, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, - "column": 18, - "end_column": 36 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, - "column": 18, - "end_column": 36 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" }, { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalBoxes" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, - "column": 18, - "end_column": 25 + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 48 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAppsOptedIn" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 52 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssetsCreated" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, + "column": 26, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "CheckedMaybe", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, - "column": 21, - "end_column": 42 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, - "column": 21, - "end_column": 42 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 38 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalAssets" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 17, + "end_line": 17, + "column": 19, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" }, { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ] - }, - "op_code": "acct_params_get", - "immediates": [ - "AcctTotalBoxBytes" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, - "column": 21, - "end_column": 28 + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 36 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "acct_params_get", + "immediates": [ + "AcctTotalBoxBytes" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 19, + "end_line": 19, + "column": 21, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + } + ], + "comment": null + }, + "comment": "account funded" }, - "name": "account" - } - ], - "comment": null - }, - "comment": "account funded" - }, - { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, - "column": 18, - "end_column": 64 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "app_opted_in", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, - "column": 18, - "end_column": 25 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "account" - }, - { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, - "column": 36, - "end_column": 63 - }, - "wtype": { - "_type": "WType", - "name": "application", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "global", - "immediates": [ - "CurrentApplicationID" - ], - "stack_args": [], - "comment": null - } - ], - "comment": null - }, - { - "_type": "TupleItemExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, - "column": 20, - "end_column": 44 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "base": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, - "column": 20, - "end_column": 44 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "app_opted_in", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 20, + "end_line": 20, + "column": 36, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationID" + ], + "stack_args": [], + "comment": null + } + ], + "comment": null }, { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_holding_get", + "immediates": [ + "AssetBalance" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 20, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "account" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "asset" + } + ], + "comment": null + }, + "index": "1" } ] }, - "op_code": "asset_holding_get", - "immediates": [ - "AssetBalance" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, - "column": 20, - "end_column": 27 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "account" - }, - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, - "column": 38, - "end_column": 43 - }, - "wtype": { - "_type": "WType", - "name": "asset", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "asset" - } - ], - "comment": null + "id": "0" }, - "index": "1" + "name": "isOptInAsset" } ] } @@ -1790,7 +22029,7 @@ "default_args": {}, "structs": { "output": { - "name": "Anonymous", + "name": "getAccountInfoResult", "elements": [ [ "bytes", diff --git a/tests/approvals/out/arc4-struct/StructDemo.approval.teal b/tests/approvals/out/arc4-struct/StructDemo.approval.teal index ddb6eb49..ce5ed86e 100644 --- a/tests/approvals/out/arc4-struct/StructDemo.approval.teal +++ b/tests/approvals/out/arc4-struct/StructDemo.approval.teal @@ -1,44 +1,67 @@ #pragma version 10 tests/approvals/arc4-struct.algo.ts::StructDemo.approvalProgram: - intcblock 1 0 - bytecblock 0x0000000000000000 + intcblock 0 8 1 + bytecblock 0x 0x0000000000000000 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: callsub __puya_arc4_router__ return +// tests/approvals/arc4-struct.algo.ts::StructDemo.constructor() -> void: +constructor: + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + proto 0 0 + retsub + + // tests/approvals/arc4-struct.algo.ts::StructDemo.__puya_arc4_router__() -> uint64: __puya_arc4_router__: // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { proto 0 1 txn NumAppArgs + intc_0 // 0 + != bz __puya_arc4_router___bare_routing@7 - pushbytess 0x89388ddd 0xef322d6d 0xcb81deb8 // method "testVectorCreationAndEquality()void", method "addVectors((uint64,uint64),(uint64,uint64))(uint64,uint64)", method "implicitCastingAndSpreading((uint64,uint64))void" txna ApplicationArgs 0 + pushbytes 0x89388ddd // method "testVectorCreationAndEquality()void" + pushbytes 0xef322d6d // method "addVectors((uint64,uint64),(uint64,uint64))(uint64,uint64)" + pushbytes 0xcb81deb8 // method "implicitCastingAndSpreading((uint64,uint64))void" + uncover 3 match __puya_arc4_router___testVectorCreationAndEquality_route@2 __puya_arc4_router___addVectors_route@3 __puya_arc4_router___implicitCastingAndSpreading_route@4 - intc_1 // 0 - retsub + b __puya_arc4_router___switch_case_default@5 __puya_arc4_router___testVectorCreationAndEquality_route@2: // tests/approvals/arc4-struct.algo.ts:10 // public testVectorCreationAndEquality() { txn OnCompletion - ! + intc_0 // NoOp + == assert // OnCompletion is not NoOp txn ApplicationID + intc_0 // 0 + != assert // can only call when not creating callsub testVectorCreationAndEquality - intc_0 // 1 + intc_2 // 1 retsub __puya_arc4_router___addVectors_route@3: // tests/approvals/arc4-struct.algo.ts:18 // public addVectors(v1: Vector, v2: Vector) { txn OnCompletion - ! + intc_0 // NoOp + == assert // OnCompletion is not NoOp txn ApplicationID + intc_0 // 0 + != assert // can only call when not creating // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { @@ -51,16 +74,19 @@ __puya_arc4_router___addVectors_route@3: swap concat log - intc_0 // 1 + intc_2 // 1 retsub __puya_arc4_router___implicitCastingAndSpreading_route@4: // tests/approvals/arc4-struct.algo.ts:25 // public implicitCastingAndSpreading(v1: Vector) { txn OnCompletion - ! + intc_0 // NoOp + == assert // OnCompletion is not NoOp txn ApplicationID + intc_0 // 0 + != assert // can only call when not creating // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { @@ -68,24 +94,38 @@ __puya_arc4_router___implicitCastingAndSpreading_route@4: // tests/approvals/arc4-struct.algo.ts:25 // public implicitCastingAndSpreading(v1: Vector) { callsub implicitCastingAndSpreading - intc_0 // 1 + intc_2 // 1 retsub +__puya_arc4_router___switch_case_default@5: + b __puya_arc4_router___after_if_else@11 + __puya_arc4_router___bare_routing@7: // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { txn OnCompletion - bnz __puya_arc4_router___after_if_else@11 + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@8 + b __puya_arc4_router___switch_case_default@9 + +__puya_arc4_router_____algots__.defaultCreate@8: + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { txn ApplicationID - ! + intc_0 // 0 + == assert // can only call when creating - intc_0 // 1 + callsub __algots__.defaultCreate + intc_2 // 1 retsub +__puya_arc4_router___switch_case_default@9: + __puya_arc4_router___after_if_else@11: // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { - intc_1 // 0 + intc_0 // 0 retsub @@ -94,14 +134,38 @@ testVectorCreationAndEquality: // tests/approvals/arc4-struct.algo.ts:10 // public testVectorCreationAndEquality() { proto 0 0 + // tests/approvals/arc4-struct.algo.ts:11 + // const v1 = new Vector({ x: new ARC4Uint64(0), y: new ARC4Uint64(0) }) + bytec_0 // 0x + bytec_1 // 0x0000000000000000 + concat + bytec_1 // 0x0000000000000000 + concat // tests/approvals/arc4-struct.algo.ts:12 // log(v1.x) - bytec_0 // 0x0000000000000000 + dup + intc_0 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds log // tests/approvals/arc4-struct.algo.ts:13 // log(v1.y) - bytec_0 // 0x0000000000000000 + dup + intc_1 // 8 + dup + extract3 // on error: Index access is out of bounds log + // tests/approvals/arc4-struct.algo.ts:14 + // const v2 = new Vector({ y: new ARC4Uint64(0), x: new ARC4Uint64(0) }) + bytec_0 // 0x + bytec_1 // 0x0000000000000000 + concat + bytec_1 // 0x0000000000000000 + concat + // tests/approvals/arc4-struct.algo.ts:15 + // assert(v1.equals(v2)) + == + assert retsub @@ -113,20 +177,28 @@ addVectors: // tests/approvals/arc4-struct.algo.ts:20 // x: new ARC4Uint64(v1.x.native + v2.x.native), frame_dig -2 - extract 0 8 // on error: Index access is out of bounds + intc_0 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds btoi frame_dig -1 - extract 0 8 // on error: Index access is out of bounds + intc_0 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds btoi + itob // tests/approvals/arc4-struct.algo.ts:21 // y: new ARC4Uint64(v1.y.native + v2.y.native), frame_dig -2 - extract 8 8 // on error: Index access is out of bounds + intc_1 // 8 + dup + extract3 // on error: Index access is out of bounds btoi frame_dig -1 - extract 8 8 // on error: Index access is out of bounds + intc_1 // 8 + dup + extract3 // on error: Index access is out of bounds btoi + itob @@ -135,6 +207,10 @@ addVectors: // x: new ARC4Uint64(v1.x.native + v2.x.native), // y: new ARC4Uint64(v1.y.native + v2.y.native), // }) + bytec_0 // 0x + uncover 2 + concat + swap concat retsub @@ -147,16 +223,33 @@ implicitCastingAndSpreading: // tests/approvals/arc4-struct.algo.ts:26 // const v2 = new Vector(v1) frame_dig -1 - extract 0 8 // on error: Index access is out of bounds + intc_0 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds frame_dig -1 - extract 8 8 // on error: Index access is out of bounds + intc_1 // 8 + dup + extract3 // on error: Index access is out of bounds + bytec_0 // 0x + uncover 2 + concat + swap concat // tests/approvals/arc4-struct.algo.ts:27 // const v3 = new Vector({ ...v2 }) dup - extract 0 8 // on error: Index access is out of bounds - dig 1 - extract 8 8 // on error: Index access is out of bounds + intc_0 // 0 + intc_1 // 8 + extract3 // on error: Index access is out of bounds + swap + dup + intc_1 // 8 + dup + extract3 // on error: Index access is out of bounds + bytec_0 // 0x + uncover 3 + concat + swap concat // tests/approvals/arc4-struct.algo.ts:28 // assert(v1.bytes === v2.bytes) @@ -170,3 +263,11 @@ implicitCastingAndSpreading: == assert retsub + + +// tests/approvals/arc4-struct.algo.ts::StructDemo.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/arc4-struct/StructDemo.arc32.json b/tests/approvals/out/arc4-struct/StructDemo.arc32.json index d1c78bc5..b8db11e9 100644 --- a/tests/approvals/out/arc4-struct/StructDemo.arc32.json +++ b/tests/approvals/out/arc4-struct/StructDemo.arc32.json @@ -73,7 +73,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1zdHJ1Y3QuYWxnby50czo6U3RydWN0RGVtby5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMSAwCiAgICBieXRlY2Jsb2NrIDB4MDAwMDAwMDAwMDAwMDAwMAogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6OlN0cnVjdERlbW8uX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6OQogICAgLy8gY2xhc3MgU3RydWN0RGVtbyBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMQogICAgdHhuIE51bUFwcEFyZ3MKICAgIGJ6IF9fcHV5YV9hcm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udHM6OlN0cnVjdERlbW8uX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlKCkgLT4gdm9pZDoKX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6OQogICAgLy8gY2xhc3MgU3RydWN0RGVtbyBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1zdHJ1Y3QuYWxnby50czo6U3RydWN0RGVtby5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst b/tests/approvals/out/arc4-struct/arc4-struct.awst index 63ea7ff7..95d68715 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst @@ -15,22 +15,22 @@ contract StructDemo testVectorCreationAndEquality(): void { - v1: Vector = new Vector(x=(#14 = { x: 0, y: 0 }).x, y=#14.y) + v1: Vector = new Vector(x=(#0 = { x: 0, y: 0 }).x, y=#0.y) log(reinterpret_cast(v1.x)) log(reinterpret_cast(v1.y)) - v2: Vector = new Vector(x=(#16 = { x: (#15 = { y: 0, x: 0 }).x, y: #15.y }).x, y=#16.y) + v2: Vector = new Vector(x=(#1 = { x: (#2 = { y: 0, x: 0 }).x, y: #2.y }).x, y=#1.y) assert(reinterpret_cast(v1) == reinterpret_cast(v2)) } addVectors(): Vector { - return new Vector(x=(#17 = { x: ARC4_ENCODE(ARC4_DECODE(v1.x) + ARC4_DECODE(v2.x), wtype=arc4.uint64), y: ARC4_ENCODE(ARC4_DECODE(v1.y) + ARC4_DECODE(v2.y), wtype=arc4.uint64) }).x, y=#17.y) + return new Vector(x=(#3 = { x: ARC4_ENCODE(ARC4_DECODE(v1.x) + ARC4_DECODE(v2.x), wtype=arc4.uint64), y: ARC4_ENCODE(ARC4_DECODE(v1.y) + ARC4_DECODE(v2.y), wtype=arc4.uint64) }).x, y=#3.y) } implicitCastingAndSpreading(): void { - v2: Vector = new Vector(x=(#18 = ARC4_DECODE(v1)).x, y=#18.y) - v3: Vector = new Vector(x=(#19 = { x: v2.x, y: v2.y }).x, y=#19.y) + v2: Vector = new Vector(x=(#4 = ARC4_DECODE(v1)).x, y=#4.y) + v3: Vector = new Vector(x=(#5 = { x: v2.x, y: v2.y }).x, y=#5.y) assert(reinterpret_cast(v1) == reinterpret_cast(v2)) assert(reinterpret_cast(v3) == reinterpret_cast(v1)) } diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst.json b/tests/approvals/out/arc4-struct/arc4-struct.awst.json index 5521c5d7..a794c1c9 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst.json +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst.json @@ -492,7 +492,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -546,7 +546,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -648,7 +648,7 @@ } ] }, - "id": "14" + "id": "0" }, "name": "x" }, @@ -688,7 +688,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -742,7 +742,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -844,7 +844,7 @@ } ] }, - "id": "14" + "id": "0" }, "name": "y" } @@ -1295,7 +1295,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1349,7 +1349,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1429,7 +1429,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1483,7 +1483,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1585,7 +1585,7 @@ } ] }, - "id": "15" + "id": "2" }, "name": "x" }, @@ -1625,7 +1625,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1679,7 +1679,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1781,13 +1781,13 @@ } ] }, - "id": "15" + "id": "2" }, "name": "y" } ] }, - "id": "16" + "id": "1" }, "name": "x" }, @@ -1827,7 +1827,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1881,7 +1881,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1961,7 +1961,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2015,7 +2015,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2117,7 +2117,7 @@ } ] }, - "id": "15" + "id": "2" }, "name": "x" }, @@ -2157,7 +2157,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2211,7 +2211,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2313,13 +2313,13 @@ } ] }, - "id": "15" + "id": "2" }, "name": "y" } ] }, - "id": "16" + "id": "1" }, "name": "y" } @@ -2868,7 +2868,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2922,7 +2922,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3480,7 +3480,7 @@ } ] }, - "id": "17" + "id": "3" }, "name": "x" }, @@ -3520,7 +3520,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3574,7 +3574,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4132,7 +4132,7 @@ } ] }, - "id": "17" + "id": "3" }, "name": "y" } @@ -4469,7 +4469,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4523,7 +4523,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4629,7 +4629,7 @@ "name": "v1" } }, - "id": "18" + "id": "4" }, "name": "x" }, @@ -4669,7 +4669,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4723,7 +4723,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4829,7 +4829,7 @@ "name": "v1" } }, - "id": "18" + "id": "4" }, "name": "y" } @@ -5004,7 +5004,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5058,7 +5058,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5282,7 +5282,7 @@ } ] }, - "id": "19" + "id": "5" }, "name": "x" }, @@ -5322,7 +5322,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5376,7 +5376,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5600,7 +5600,7 @@ } ] }, - "id": "19" + "id": "5" }, "name": "y" } diff --git a/tests/approvals/out/biguint-expressions/DemoContract.approval.teal b/tests/approvals/out/biguint-expressions/DemoContract.approval.teal index 7a1d095b..3d1b5b87 100644 --- a/tests/approvals/out/biguint-expressions/DemoContract.approval.teal +++ b/tests/approvals/out/biguint-expressions/DemoContract.approval.teal @@ -1,16 +1,47 @@ #pragma version 10 tests/approvals/biguint-expressions.algo.ts::DemoContract.approvalProgram: + intcblock 4 1 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/biguint-expressions.algo.ts:32 + // testConstructor(1, false, itob(4)) + intc_0 // 4 + itob + intc_1 // 1 + pushint 0 // 0 + uncover 2 + callsub testConstructor // tests/approvals/biguint-expressions.algo.ts:33 // testOps(500n, 1000n) - pushbytess 0x01f4 0x03e8 // 0x01f4, 0x03e8 + pushbytes 0x01f4 + pushbytes 0x03e8 callsub testOps // tests/approvals/biguint-expressions.algo.ts:34 // return true - pushint 1 // 1 + intc_1 // 1 return +// tests/approvals/biguint-expressions.algo.ts::DemoContract.constructor() -> void: +constructor: + // tests/approvals/biguint-expressions.algo.ts:30 + // class DemoContract extends BaseContract { + proto 0 0 + retsub + + +// tests/approvals/biguint-expressions.algo.ts::testConstructor(a: uint64, b: uint64, c: bytes) -> void: +testConstructor: + // tests/approvals/biguint-expressions.algo.ts:5 + // function testConstructor(a: uint64, b: boolean, c: bytes) { + proto 3 0 + retsub + + // tests/approvals/biguint-expressions.algo.ts::testOps(smaller: bytes, larger: bytes) -> void: testOps: // tests/approvals/biguint-expressions.algo.ts:21 @@ -22,15 +53,33 @@ testOps: frame_dig -1 b< assert - // tests/approvals/biguint-expressions.algo.ts:24 - // assert(smaller > larger) + // tests/approvals/biguint-expressions.algo.ts:23 + // assert(smaller <= smaller) frame_dig -2 + dup + b<= + assert + // tests/approvals/biguint-expressions.algo.ts:24 + // assert(larger > smaller) frame_dig -1 + frame_dig -2 b> assert + // tests/approvals/biguint-expressions.algo.ts:25 + // assert(larger >= larger) + frame_dig -1 + dup + b>= + assert + // tests/approvals/biguint-expressions.algo.ts:26 + // assert(smaller === BigUint(smaller)) + frame_dig -2 + dup + b== + assert // tests/approvals/biguint-expressions.algo.ts:27 // assert(smaller === BigUint(op.bzero(4).concat(Bytes(smaller))), 'Leading zeros should be ignored in equality') - pushint 4 // 4 + intc_0 // 4 bzero frame_dig -2 concat diff --git a/tests/approvals/out/biguint-expressions/DemoContract.ssa.ir b/tests/approvals/out/biguint-expressions/DemoContract.ssa.ir index 858f2d14..cf95a8ad 100644 --- a/tests/approvals/out/biguint-expressions/DemoContract.ssa.ir +++ b/tests/approvals/out/biguint-expressions/DemoContract.ssa.ir @@ -34,7 +34,7 @@ contract tests/approvals/biguint-expressions.algo.ts::DemoContract: (assert tmp%0#0) let tmp%1#0: bool = (b<= smaller#0 smaller#0) (assert tmp%1#0) - let tmp%2#0: bool = (b> smaller#0 larger#0) + let tmp%2#0: bool = (b> larger#0 smaller#0) (assert tmp%2#0) let tmp%3#0: bool = (b>= larger#0 larger#0) (assert tmp%3#0) diff --git a/tests/approvals/out/boolean-expressions/boolean-expressions.awst b/tests/approvals/out/boolean-expressions/boolean-expressions.awst index a13ee8b3..2a6bdf6b 100644 --- a/tests/approvals/out/boolean-expressions/boolean-expressions.awst +++ b/tests/approvals/out/boolean-expressions/boolean-expressions.awst @@ -1,7 +1,7 @@ subroutine test(a: uint64, b: uint64, c: string, d: bytes, e: uint64): bool { - x: uint64 = (Boolean((#12 = (Boolean(a) ? a : b))) ? #12 : e) - assert(Boolean((Boolean((#13 = (Boolean(a) ? b : a))) ? e : #13))) + x: uint64 = (Boolean((#0 = (Boolean(a) ? a : b))) ? #0 : e) + assert(Boolean((Boolean((#1 = (Boolean(a) ? b : a))) ? e : #1))) y: uint64 = (Boolean(a) ? b : a) z: uint64 = (Boolean(a) and Boolean(len(d)) or Boolean(y) ? (Boolean(x) ? x : y) : (Boolean(x) ? y : x)) if (Boolean(a) or Boolean(len(c)) and Boolean(len(d))) { diff --git a/tests/approvals/out/boolean-expressions/boolean-expressions.awst.json b/tests/approvals/out/boolean-expressions/boolean-expressions.awst.json index 4d8248d6..9e477e73 100644 --- a/tests/approvals/out/boolean-expressions/boolean-expressions.awst.json +++ b/tests/approvals/out/boolean-expressions/boolean-expressions.awst.json @@ -280,7 +280,7 @@ "name": "b" } }, - "id": "12" + "id": "0" } }, "true_expr": { @@ -387,7 +387,7 @@ "name": "b" } }, - "id": "12" + "id": "0" }, "false_expr": { "_type": "VarExpression", @@ -589,7 +589,7 @@ "name": "a" } }, - "id": "13" + "id": "1" } }, "true_expr": { @@ -714,7 +714,7 @@ "name": "a" } }, - "id": "13" + "id": "1" } } } diff --git a/tests/approvals/out/byte-expressions/DemoContract.approval.teal b/tests/approvals/out/byte-expressions/DemoContract.approval.teal index 48ee7e0c..108392ce 100644 --- a/tests/approvals/out/byte-expressions/DemoContract.approval.teal +++ b/tests/approvals/out/byte-expressions/DemoContract.approval.teal @@ -1,7 +1,85 @@ #pragma version 10 tests/approvals/byte-expressions.algo.ts::DemoContract.approvalProgram: + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/byte-expressions.algo.ts:17 + // test(1, 50n, 'things') + pushint 1 // 1 + pushbytes 0x32 + pushbytes "things" + callsub test // tests/approvals/byte-expressions.algo.ts:18 // return true pushint 1 // 1 return + + +// tests/approvals/byte-expressions.algo.ts::DemoContract.constructor() -> void: +constructor: + // tests/approvals/byte-expressions.algo.ts:15 + // class DemoContract extends BaseContract { + proto 0 0 + retsub + + +// tests/approvals/byte-expressions.algo.ts::test(a: uint64, b: bytes, c: bytes) -> void: +test: + // tests/approvals/byte-expressions.algo.ts:4 + // function test(a: uint64, b: biguint, c: string) { + proto 3 0 + // tests/approvals/byte-expressions.algo.ts:5 + // assert(Bytes().length === 0, 'Empty bytes has length of 0') + pushbytes 0x + len + pushint 0 // 0 + == + assert // Empty bytes has length of 0 + // tests/approvals/byte-expressions.algo.ts:6 + // assert(Bytes(a) === op.itob(a), 'Bytes(uint64) is equivalent to itob') + frame_dig -3 + itob + frame_dig -3 + itob + == + assert // Bytes(uint64) is equivalent to itob + // tests/approvals/byte-expressions.algo.ts:7 + // assert(Bytes(Uint64(1)) === Bytes.fromHex('0000000000000001'), 'Bytes(uint64) returns an 8 byte encoding') + pushbytes 0x0000000000000001 + dup + == + assert // Bytes(uint64) returns an 8 byte encoding + // tests/approvals/byte-expressions.algo.ts:8 + // assert(Bytes(BigUint(256)) === Bytes.fromHex('0100')) + pushbytes 0x0100 + dup + == + assert + // tests/approvals/byte-expressions.algo.ts:9 + // assert(BigUint(Bytes(b)) === b, 'Round trip of biguint to bytes and back results in the same value') + frame_dig -2 + dup + b== + assert // Round trip of biguint to bytes and back results in the same value + // tests/approvals/byte-expressions.algo.ts:10 + // assert(String(Bytes(c)) === c) + frame_dig -1 + dup + == + assert + // tests/approvals/byte-expressions.algo.ts:11 + // assert(Bytes(Bytes('123')) === Bytes('123')) + pushbytes "123" + dup + == + assert + // tests/approvals/byte-expressions.algo.ts:12 + // assert(Bytes([1, 2, 3, 4]) === Bytes.fromHex('01020304')) + pushbytes 0x01020304 + dup + == + assert + retsub diff --git a/tests/approvals/out/destructured-params/destructured-params.awst b/tests/approvals/out/destructured-params/destructured-params.awst index a3786741..74e85c82 100644 --- a/tests/approvals/out/destructured-params/destructured-params.awst +++ b/tests/approvals/out/destructured-params/destructured-params.awst @@ -5,7 +5,7 @@ subroutine test(p: { a: uint64, b: bytes, c: bool }): void } subroutine init(): void { - tests/approvals/destructured-params.algo.ts::test({ a: (#11 = { a: 1, b: "", c: False }).a, b: #11.b, c: #11.c }) + tests/approvals/destructured-params.algo.ts::test({ a: (#0 = { a: 1, b: "", c: False }).a, b: #0.b, c: #0.c }) temp: { a: uint64, b: bytes, c: bool } = { a: 2, b: "Hello", c: True } tests/approvals/destructured-params.algo.ts::test(temp) } \ No newline at end of file diff --git a/tests/approvals/out/destructured-params/destructured-params.awst.json b/tests/approvals/out/destructured-params/destructured-params.awst.json index 154c7716..38b53c40 100644 --- a/tests/approvals/out/destructured-params/destructured-params.awst.json +++ b/tests/approvals/out/destructured-params/destructured-params.awst.json @@ -14,7 +14,7 @@ "name": "p", "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -103,7 +103,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -204,7 +204,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -516,7 +516,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -577,7 +577,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -621,7 +621,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -713,7 +713,7 @@ } ] }, - "id": "11" + "id": "0" }, "name": "a" }, @@ -744,7 +744,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -788,7 +788,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -880,7 +880,7 @@ } ] }, - "id": "11" + "id": "0" }, "name": "b" }, @@ -911,7 +911,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -955,7 +955,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1047,7 +1047,7 @@ } ] }, - "id": "11" + "id": "0" }, "name": "c" } @@ -1077,7 +1077,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1123,7 +1123,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1260,7 +1260,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, diff --git a/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst.json b/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst.json index b7b6bae6..f00ad79f 100644 --- a/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst.json +++ b/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst.json @@ -53,7 +53,7 @@ "types": [ { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -80,7 +80,7 @@ }, { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -107,7 +107,7 @@ }, { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -154,7 +154,7 @@ "types": [ { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -181,7 +181,7 @@ }, { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -208,7 +208,7 @@ }, { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -247,7 +247,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -324,7 +324,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -401,7 +401,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -554,7 +554,7 @@ "types": [ { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -581,7 +581,7 @@ }, { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -608,7 +608,7 @@ }, { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -648,7 +648,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, diff --git a/tests/approvals/out/local-state/LocalStateDemo.approval.teal b/tests/approvals/out/local-state/LocalStateDemo.approval.teal index e792143f..12252a79 100644 --- a/tests/approvals/out/local-state/LocalStateDemo.approval.teal +++ b/tests/approvals/out/local-state/LocalStateDemo.approval.teal @@ -276,6 +276,7 @@ getState: // tests/approvals/local-state.algo.ts:25 // localUint2: this.localUint2(Txn.sender).value, app_local_get_ex + bury 1 assert // check LocalState exists // tests/approvals/local-state.algo.ts:26 // localBytes: this.localBytes(Txn.sender).value, @@ -287,6 +288,7 @@ getState: // tests/approvals/local-state.algo.ts:26 // localBytes: this.localBytes(Txn.sender).value, app_local_get_ex + bury 1 assert // check LocalState exists // tests/approvals/local-state.algo.ts:27 // localBytes2: this.localBytes2(Txn.sender).value, @@ -298,6 +300,244 @@ getState: // tests/approvals/local-state.algo.ts:27 // localBytes2: this.localBytes2(Txn.sender).value, app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:12 + // localEncoded = LocalState() + bytec 4 // "localEncoded" + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:8 + // localUint = LocalState({ key: 'l1' }) + bytec_0 // "l1" + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:9 + // localUint2 = LocalState() + bytec_1 // "localUint2" + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + app_local_get_ex + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:10 + // localBytes = LocalState({ key: 'b1' }) + bytec_2 // "b1" + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:11 + // localBytes2 = LocalState() + bytec_3 // "localBytes2" + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:12 + // localEncoded = LocalState() + bytec 4 // "localEncoded" + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:8 + // localUint = LocalState({ key: 'l1' }) + bytec_0 // "l1" + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:9 + // localUint2 = LocalState() + bytec_1 // "localUint2" + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:10 + // localBytes = LocalState({ key: 'b1' }) + bytec_2 // "b1" + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + app_local_get_ex + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:11 + // localBytes2 = LocalState() + bytec_3 // "localBytes2" + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:12 + // localEncoded = LocalState() + bytec 4 // "localEncoded" + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:8 + // localUint = LocalState({ key: 'l1' }) + bytec_0 // "l1" + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:9 + // localUint2 = LocalState() + bytec_1 // "localUint2" + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:10 + // localBytes = LocalState({ key: 'b1' }) + bytec_2 // "b1" + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:11 + // localBytes2 = LocalState() + bytec_3 // "localBytes2" + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + app_local_get_ex + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:12 + // localEncoded = LocalState() + bytec 4 // "localEncoded" + // tests/approvals/local-state.algo.ts:28 + // localEncoded: this.localEncoded(Txn.sender).value.copy(), + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:8 + // localUint = LocalState({ key: 'l1' }) + bytec_0 // "l1" + // tests/approvals/local-state.algo.ts:24 + // localUint: this.localUint(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:9 + // localUint2 = LocalState() + bytec_1 // "localUint2" + // tests/approvals/local-state.algo.ts:25 + // localUint2: this.localUint2(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:10 + // localBytes = LocalState({ key: 'b1' }) + bytec_2 // "b1" + // tests/approvals/local-state.algo.ts:26 + // localBytes: this.localBytes(Txn.sender).value, + app_local_get_ex + bury 1 + assert // check LocalState exists + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + txn Sender + intc_0 // 0 + // tests/approvals/local-state.algo.ts:11 + // localBytes2 = LocalState() + bytec_3 // "localBytes2" + // tests/approvals/local-state.algo.ts:27 + // localBytes2: this.localBytes2(Txn.sender).value, + app_local_get_ex + bury 1 assert // check LocalState exists // tests/approvals/local-state.algo.ts:28 // localEncoded: this.localEncoded(Txn.sender).value.copy(), diff --git a/tests/approvals/out/local-state/LocalStateDemo.arc32.json b/tests/approvals/out/local-state/LocalStateDemo.arc32.json index 493006f6..587a5a02 100644 --- a/tests/approvals/out/local-state/LocalStateDemo.arc32.json +++ b/tests/approvals/out/local-state/LocalStateDemo.arc32.json @@ -3,11 +3,53 @@ "setState((uint64,byte[]),uint64[10])void": { "call_config": { "no_op": "CALL" + }, + "structs": { + "p": { + "name": "", + "elements": [ + [ + "a", + "uint64" + ], + [ + "b", + "byte[]" + ] + ] + } } }, "getState()(uint64,uint64,byte[],byte[],uint64[10])": { "call_config": { "no_op": "CALL" + }, + "structs": { + "output": { + "name": "getStateResult", + "elements": [ + [ + "localUint", + "uint64" + ], + [ + "localUint2", + "uint64" + ], + [ + "localBytes", + "byte[]" + ], + [ + "localBytes2", + "byte[]" + ], + [ + "localEncoded", + "uint64[10]" + ] +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IGdldFN0YXRlCiAgICBjb3ZlciA0CiAgICBjb3ZlciAzCiAgICBjb3ZlciAyCiAgICBzd2FwCiAgICBpdG9iCiAgICBjb3ZlciAzCiAgICBpdG9iCiAgICBjb3ZlciAzCiAgICBkdXAKICAgIGxlbgogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIHN3YXAKICAgIGNvbmNhdAogICAgY292ZXIgMwogICAgZHVwCiAgICBsZW4KICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBzd2FwCiAgICBjb25jYXQKICAgIGNvdmVyIDMKICAgIHB1c2hieXRlcyAweAogICAgc3dhcAogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIGludGNfMyAvLyAxMDAKICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBjb25jYXQKICAgIGRpZyAxCiAgICBsZW4KICAgIGludGNfMyAvLyAxMDAKICAgICsKICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBjb25jYXQKICAgIHVuY292ZXIgMwogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIHN3YXAKICAgIGNvbmNhdAogICAgcHVzaGJ5dGVzIDB4MTUxZjdjNzUKICAgIHN3YXAKICAgIGNvbmNhdAogICAgbG9nCiAgICBpbnRjXzEgLy8gMQogICAgcmV0c3ViCgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19jbGVhclN0YXRlX3JvdXRlQDQ6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvbG9jYWwtc3RhdGUuYWxnby50czozMgogICAgLy8gcHVibGljIGNsZWFyU3RhdGUoKSB7CiAgICB0eG4gT25Db21wbGV0aW9uCiAgICBpbnRjXzAgLy8gTm9PcAogICAgPT0KICAgIGFzc2VydCAvLyBPbkNvbXBsZXRpb24gaXMgbm90IE5vT3AKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBpbnRjXzAgLy8gMAogICAgIT0KICAgIGFzc2VydCAvLyBjYW4gb25se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gpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9sb2NhbC1zdGF0ZS5hbGdvLnRzOjcKICAgIC8vIGV4cG9ydCBjbGFzcyBMb2NhbFN0YXRlRGVtbyBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbG9jYWwtc3RhdGUuYWxnby50czo6TG9jYWxTdGF0ZURlbW8uY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" }, "state": { diff --git a/tests/approvals/out/local-state/LocalStateDemo.ssa.ir b/tests/approvals/out/local-state/LocalStateDemo.ssa.ir index 059996dd..53941150 100644 --- a/tests/approvals/out/local-state/LocalStateDemo.ssa.ir +++ b/tests/approvals/out/local-state/LocalStateDemo.ssa.ir @@ -142,7 +142,71 @@ contract tests/approvals/local-state.algo.ts::LocalStateDemo: let (maybe_value%4#0: bytes, maybe_exists%4#0: bool) = (app_local_get_ex tmp%4#0 0u "localEncoded") (assert maybe_exists%4#0) // check LocalState exists let copy%0#0: bytes = maybe_value%4#0 - return maybe_value%0#0 maybe_value%1#0 maybe_value%2#0 maybe_value%3#0 copy%0#0 + let tmp%5#0: bytes = (txn Sender) + let (maybe_value%5#0: uint64, maybe_exists%5#0: bool) = (app_local_get_ex tmp%5#0 0u "l1") + (assert maybe_exists%5#0) // check LocalState exists + let tmp%6#0: bytes = (txn Sender) + let (maybe_value%6#0: uint64, maybe_exists%6#0: bool) = (app_local_get_ex tmp%6#0 0u "localUint2") + (assert maybe_exists%6#0) // check LocalState exists + let tmp%7#0: bytes = (txn Sender) + let (maybe_value%7#0: bytes, maybe_exists%7#0: bool) = (app_local_get_ex tmp%7#0 0u "b1") + (assert maybe_exists%7#0) // check LocalState exists + let tmp%8#0: bytes = (txn Sender) + let (maybe_value%8#0: bytes, maybe_exists%8#0: bool) = (app_local_get_ex tmp%8#0 0u "localBytes2") + (assert maybe_exists%8#0) // check LocalState exists + let tmp%9#0: bytes = (txn Sender) + let (maybe_value%9#0: bytes, maybe_exists%9#0: bool) = (app_local_get_ex tmp%9#0 0u "localEncoded") + (assert maybe_exists%9#0) // check LocalState exists + let copy%1#0: bytes = maybe_value%9#0 + let tmp%10#0: bytes = (txn Sender) + let (maybe_value%10#0: uint64, maybe_exists%10#0: bool) = (app_local_get_ex tmp%10#0 0u "l1") + (assert maybe_exists%10#0) // check LocalState exists + let tmp%11#0: bytes = (txn Sender) + let (maybe_value%11#0: uint64, maybe_exists%11#0: bool) = (app_local_get_ex tmp%11#0 0u "localUint2") + (assert maybe_exists%11#0) // check LocalState exists + let tmp%12#0: bytes = (txn Sender) + let (maybe_value%12#0: bytes, maybe_exists%12#0: bool) = (app_local_get_ex tmp%12#0 0u "b1") + (assert maybe_exists%12#0) // check LocalState exists + let tmp%13#0: bytes = (txn Sender) + let (maybe_value%13#0: bytes, maybe_exists%13#0: bool) = (app_local_get_ex tmp%13#0 0u "localBytes2") + (assert maybe_exists%13#0) // check LocalState exists + let tmp%14#0: bytes = (txn Sender) + let (maybe_value%14#0: bytes, maybe_exists%14#0: bool) = (app_local_get_ex tmp%14#0 0u "localEncoded") + (assert maybe_exists%14#0) // check LocalState exists + let copy%2#0: bytes = maybe_value%14#0 + let tmp%15#0: bytes = (txn Sender) + let (maybe_value%15#0: uint64, maybe_exists%15#0: bool) = (app_local_get_ex tmp%15#0 0u "l1") + (assert maybe_exists%15#0) // check LocalState exists + let tmp%16#0: bytes = (txn Sender) + let (maybe_value%16#0: uint64, maybe_exists%16#0: bool) = (app_local_get_ex tmp%16#0 0u "localUint2") + (assert maybe_exists%16#0) // check LocalState exists + let tmp%17#0: bytes = (txn Sender) + let (maybe_value%17#0: bytes, maybe_exists%17#0: bool) = (app_local_get_ex tmp%17#0 0u "b1") + (assert maybe_exists%17#0) // check LocalState exists + let tmp%18#0: bytes = (txn Sender) + let (maybe_value%18#0: bytes, maybe_exists%18#0: bool) = (app_local_get_ex tmp%18#0 0u "localBytes2") + (assert maybe_exists%18#0) // check LocalState exists + let tmp%19#0: bytes = (txn Sender) + let (maybe_value%19#0: bytes, maybe_exists%19#0: bool) = (app_local_get_ex tmp%19#0 0u "localEncoded") + (assert maybe_exists%19#0) // check LocalState exists + let copy%3#0: bytes = maybe_value%19#0 + let tmp%20#0: bytes = (txn Sender) + let (maybe_value%20#0: uint64, maybe_exists%20#0: bool) = (app_local_get_ex tmp%20#0 0u "l1") + (assert maybe_exists%20#0) // check LocalState exists + let tmp%21#0: bytes = (txn Sender) + let (maybe_value%21#0: uint64, maybe_exists%21#0: bool) = (app_local_get_ex tmp%21#0 0u "localUint2") + (assert maybe_exists%21#0) // check LocalState exists + let tmp%22#0: bytes = (txn Sender) + let (maybe_value%22#0: bytes, maybe_exists%22#0: bool) = (app_local_get_ex tmp%22#0 0u "b1") + (assert maybe_exists%22#0) // check LocalState exists + let tmp%23#0: bytes = (txn Sender) + let (maybe_value%23#0: bytes, maybe_exists%23#0: bool) = (app_local_get_ex tmp%23#0 0u "localBytes2") + (assert maybe_exists%23#0) // check LocalState exists + let tmp%24#0: bytes = (txn Sender) + let (maybe_value%24#0: bytes, maybe_exists%24#0: bool) = (app_local_get_ex tmp%24#0 0u "localEncoded") + (assert maybe_exists%24#0) // check LocalState exists + let copy%4#0: bytes = maybe_value%24#0 + return maybe_value%0#0 maybe_value%6#0 maybe_value%12#0 maybe_value%18#0 copy%4#0 subroutine tests/approvals/local-state.algo.ts::LocalStateDemo.clearState() -> void: block@0: // L32 diff --git a/tests/approvals/out/local-state/local-state.awst b/tests/approvals/out/local-state/local-state.awst index 99a8f94b..972b5ffd 100644 --- a/tests/approvals/out/local-state/local-state.awst +++ b/tests/approvals/out/local-state/local-state.awst @@ -30,9 +30,9 @@ contract LocalStateDemo LocalState[txn()]["localEncoded"]: arc4.static_array = copy(c) } - getState(): { localUint: uint64, localUint2: uint64, localBytes: bytes, localBytes2: bytes, localEncoded: arc4.static_array } + getState(): getStateResult{ localUint: uint64, localUint2: uint64, localBytes: bytes, localBytes2: bytes, localEncoded: arc4.static_array } { - return { localUint: LocalState[txn()]["l1"], localUint2: LocalState[txn()]["localUint2"], localBytes: LocalState[txn()]["b1"], localBytes2: LocalState[txn()]["localBytes2"], localEncoded: copy(LocalState[txn()]["localEncoded"]) } + return { localUint: (#0 = { localUint: LocalState[txn()]["l1"], localUint2: LocalState[txn()]["localUint2"], localBytes: LocalState[txn()]["b1"], localBytes2: LocalState[txn()]["localBytes2"], localEncoded: copy(LocalState[txn()]["localEncoded"]) }).localUint, localUint2: #0.localUint2, localBytes: #0.localBytes, localBytes2: #0.localBytes2, localEncoded: #0.localEncoded } } clearState(): void diff --git a/tests/approvals/out/local-state/local-state.awst.json b/tests/approvals/out/local-state/local-state.awst.json index 24bc0d8d..57cfd471 100644 --- a/tests/approvals/out/local-state/local-state.awst.json +++ b/tests/approvals/out/local-state/local-state.awst.json @@ -312,7 +312,7 @@ "name": "p", "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -431,7 +431,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -506,7 +506,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1100,7 +1100,7 @@ "default_args": {}, "structs": { "__0": { - "name": "Anonymous", + "name": "", "elements": [ [ "a", @@ -1127,7 +1127,7 @@ "args": [], "return_type": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/local-state.algo.ts::getStateResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1226,7 +1226,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/local-state.algo.ts::getStateResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1297,13 +1297,13 @@ }, "items": [ { - "_type": "AppAccountStateExpression", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 24, - "end_line": 24, - "column": 17, - "end_column": 49 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WType", @@ -1312,58 +1312,538 @@ "ephemeral": false, "scalar_type": 2 }, - "key": { - "_type": "BytesConstant", + "base": { + "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 8, - "end_line": 8, - "column": 40, - "end_column": 44 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { - "_type": "WType", - "name": "state_key", + "_type": "WTuple", + "name": "::", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "value": "Y%u", - "encoding": "utf8" - }, - "exists_assertion_message": "check LocalState exists", - "account": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/local-state.algo.ts", - "line": 24, - "end_line": 24, - "column": 32, - "end_column": 42 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] + }, + "items": [ + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 8, + "end_line": 8, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y%u", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 32, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 18, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 9, + "end_line": 9, + "column": 2, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y*lG)bTR", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 34, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 18, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 10, + "end_line": 10, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Vle", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 34, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 19, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 11, + "end_line": 11, + "column": 2, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(jZ-Wpgq", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 36, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "Copy", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 20, + "end_column": 62 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "value": { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 20, + "end_column": 55 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 14 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(;KkZ)9a;", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 38, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + } + } + ] }, - "op_code": "txn", - "immediates": [ - "Sender" - ], - "stack_args": [], - "comment": null - } + "id": "0" + }, + "name": "localUint" }, { - "_type": "AppAccountStateExpression", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 25, - "end_line": 25, - "column": 18, - "end_column": 51 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WType", @@ -1372,58 +1852,538 @@ "ephemeral": false, "scalar_type": 2 }, - "key": { - "_type": "BytesConstant", + "base": { + "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 9, - "end_line": 9, - "column": 2, - "end_column": 12 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { - "_type": "WType", - "name": "state_key", + "_type": "WTuple", + "name": "::", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "value": "Y;R*>Y*lG)bTR", - "encoding": "utf8" - }, - "exists_assertion_message": "check LocalState exists", - "account": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/local-state.algo.ts", - "line": 25, - "end_line": 25, - "column": 34, - "end_column": 44 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] + }, + "items": [ + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 8, + "end_line": 8, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y%u", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 32, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 18, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 9, + "end_line": 9, + "column": 2, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y*lG)bTR", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 34, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 18, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 10, + "end_line": 10, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Vle", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 34, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 19, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 11, + "end_line": 11, + "column": 2, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(jZ-Wpgq", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 36, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "Copy", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 20, + "end_column": 62 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "value": { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 20, + "end_column": 55 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 14 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(;KkZ)9a;", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 38, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + } + } + ] }, - "op_code": "txn", - "immediates": [ - "Sender" - ], - "stack_args": [], - "comment": null - } + "id": "0" + }, + "name": "localUint2" }, { - "_type": "AppAccountStateExpression", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 26, - "end_line": 26, - "column": 18, - "end_column": 51 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WType", @@ -1432,58 +2392,538 @@ "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "BytesConstant", + "base": { + "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 10, - "end_line": 10, - "column": 40, - "end_column": 44 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { - "_type": "WType", - "name": "state_key", + "_type": "WTuple", + "name": "::", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "value": "Vle", - "encoding": "utf8" - }, - "exists_assertion_message": "check LocalState exists", - "account": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/local-state.algo.ts", - "line": 26, - "end_line": 26, - "column": 34, - "end_column": 44 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] + }, + "items": [ + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 8, + "end_line": 8, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y%u", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 32, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 18, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 9, + "end_line": 9, + "column": 2, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y*lG)bTR", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 34, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 18, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 10, + "end_line": 10, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Vle", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 34, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 19, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 11, + "end_line": 11, + "column": 2, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(jZ-Wpgq", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 36, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "Copy", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 20, + "end_column": 62 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "value": { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 20, + "end_column": 55 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 14 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(;KkZ)9a;", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 38, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + } + } + ] }, - "op_code": "txn", - "immediates": [ - "Sender" - ], - "stack_args": [], - "comment": null - } + "id": "0" + }, + "name": "localBytes" }, { - "_type": "AppAccountStateExpression", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 27, - "end_line": 27, - "column": 19, - "end_column": 53 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WType", @@ -1492,58 +2932,538 @@ "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "BytesConstant", + "base": { + "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 11, - "end_line": 11, - "column": 2, - "end_column": 13 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { - "_type": "WType", - "name": "state_key", + "_type": "WTuple", + "name": "::", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "value": "Y;R*>Y(jZ-Wpgq", - "encoding": "utf8" - }, - "exists_assertion_message": "check LocalState exists", - "account": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/local-state.algo.ts", - "line": 27, - "end_line": 27, - "column": 36, - "end_column": 46 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] + }, + "items": [ + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 8, + "end_line": 8, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y%u", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 32, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 18, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 9, + "end_line": 9, + "column": 2, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y*lG)bTR", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 34, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 18, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 10, + "end_line": 10, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Vle", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 34, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 19, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 11, + "end_line": 11, + "column": 2, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(jZ-Wpgq", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 36, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "Copy", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 20, + "end_column": 62 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "value": { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 20, + "end_column": 55 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 14 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(;KkZ)9a;", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 38, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + } + } + ] }, - "op_code": "txn", - "immediates": [ - "Sender" - ], - "stack_args": [], - "comment": null - } + "id": "0" + }, + "name": "localBytes2" }, { - "_type": "Copy", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 28, - "end_line": 28, - "column": 20, - "end_column": 62 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "ARC4StaticArray", @@ -1572,86 +3492,529 @@ "source_location": null, "array_size": "10" }, - "value": { - "_type": "AppAccountStateExpression", + "base": { + "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 28, - "end_line": 28, - "column": 20, - "end_column": 55 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { - "_type": "ARC4StaticArray", - "name": "arc4.static_array", - "immutable": false, + "_type": "WTuple", + "name": "::", + "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64[10]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { + "scalar_type": null, + "types": [ + { "_type": "WType", "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "arc4_name": "uint64", - "n": "64" - }, - "source_location": null, - "array_size": "10" + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] }, - "key": { - "_type": "BytesConstant", + "source": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/local-state.algo.ts", - "line": 12, - "end_line": 12, - "column": 2, - "end_column": 14 + "line": 23, + "end_line": 29, + "column": 11, + "end_column": 5 }, "wtype": { - "_type": "WType", - "name": "state_key", + "_type": "WTuple", + "name": "::", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + } + ], + "names": [ + "localUint", + "localUint2", + "localBytes", + "localBytes2", + "localEncoded" + ] }, - "value": "Y;R*>Y(;KkZ)9a;", - "encoding": "utf8" + "items": [ + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 8, + "end_line": 8, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y%u", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 24, + "end_line": 24, + "column": 32, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 18, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 9, + "end_line": 9, + "column": 2, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y*lG)bTR", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 25, + "end_line": 25, + "column": 34, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 18, + "end_column": 51 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 10, + "end_line": 10, + "column": 40, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Vle", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 26, + "end_line": 26, + "column": 34, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 19, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 11, + "end_line": 11, + "column": 2, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(jZ-Wpgq", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 27, + "end_line": 27, + "column": 36, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + }, + { + "_type": "Copy", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 20, + "end_column": 62 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "value": { + "_type": "AppAccountStateExpression", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 20, + "end_column": 55 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[10]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "10" + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 14 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y(;KkZ)9a;", + "encoding": "utf8" + }, + "exists_assertion_message": "check LocalState exists", + "account": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/local-state.algo.ts", + "line": 28, + "end_line": 28, + "column": 38, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "txn", + "immediates": [ + "Sender" + ], + "stack_args": [], + "comment": null + } + } + } + ] }, - "exists_assertion_message": "check LocalState exists", - "account": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/local-state.algo.ts", - "line": 28, - "end_line": 28, - "column": 38, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "op_code": "txn", - "immediates": [ - "Sender" - ], - "stack_args": [], - "comment": null - } - } + "id": "0" + }, + "name": "localEncoded" } ] } @@ -1687,7 +4050,7 @@ "default_args": {}, "structs": { "output": { - "name": "Anonymous", + "name": "getStateResult", "elements": [ [ "localUint", diff --git a/tests/approvals/out/named-types/MyContract.approval.teal b/tests/approvals/out/named-types/MyContract.approval.teal index b337a404..65b31630 100644 --- a/tests/approvals/out/named-types/MyContract.approval.teal +++ b/tests/approvals/out/named-types/MyContract.approval.teal @@ -14,7 +14,7 @@ main_after_if_else@2: // tests/approvals/named-types.algo.ts::MyContract.constructor() -> void: constructor: - // tests/approvals/named-types.algo.ts:21 + // tests/approvals/named-types.algo.ts:14 // export class MyContract extends Contract { proto 0 0 retsub @@ -22,7 +22,7 @@ constructor: // tests/approvals/named-types.algo.ts::MyContract.__puya_arc4_router__() -> uint64: __puya_arc4_router__: - // tests/approvals/named-types.algo.ts:21 + // tests/approvals/named-types.algo.ts:14 // export class MyContract extends Contract { proto 0 1 txn NumAppArgs @@ -40,7 +40,7 @@ __puya_arc4_router__: b __puya_arc4_router___switch_case_default@7 __puya_arc4_router___getXY_route@2: - // tests/approvals/named-types.algo.ts:22 + // tests/approvals/named-types.algo.ts:15 // public getXY(): XY { txn OnCompletion intc_0 // NoOp @@ -69,7 +69,7 @@ __puya_arc4_router___getXY_route@2: retsub __puya_arc4_router___getYX_route@3: - // tests/approvals/named-types.algo.ts:29 + // tests/approvals/named-types.algo.ts:22 // public getYX(): YX { txn OnCompletion intc_0 // NoOp @@ -98,7 +98,7 @@ __puya_arc4_router___getYX_route@3: retsub __puya_arc4_router___getAnon_route@4: - // tests/approvals/named-types.algo.ts:36 + // tests/approvals/named-types.algo.ts:29 // public getAnon() { txn OnCompletion intc_0 // NoOp @@ -127,8 +127,8 @@ __puya_arc4_router___getAnon_route@4: retsub __puya_arc4_router___test_route@5: - // tests/approvals/named-types.algo.ts:43 - // public test(x: XY, y: YX) {} + // tests/approvals/named-types.algo.ts:36 + // public test(x: XY, y: YX) { txn OnCompletion intc_0 // NoOp == @@ -137,7 +137,7 @@ __puya_arc4_router___test_route@5: intc_0 // 0 != assert // can only call when not creating - // tests/approvals/named-types.algo.ts:21 + // tests/approvals/named-types.algo.ts:14 // export class MyContract extends Contract { txna ApplicationArgs 1 dup @@ -161,8 +161,8 @@ __puya_arc4_router___test_route@5: dup extract3 // on error: Index access is out of bounds btoi - // tests/approvals/named-types.algo.ts:43 - // public test(x: XY, y: YX) {} + // tests/approvals/named-types.algo.ts:36 + // public test(x: XY, y: YX) { uncover 3 uncover 3 uncover 3 @@ -172,7 +172,7 @@ __puya_arc4_router___test_route@5: retsub __puya_arc4_router___testing_route@6: - // tests/approvals/named-types.algo.ts:45 + // tests/approvals/named-types.algo.ts:40 // public testing() { txn OnCompletion intc_0 // NoOp @@ -235,7 +235,7 @@ __puya_arc4_router___switch_case_default@7: b __puya_arc4_router___after_if_else@13 __puya_arc4_router___bare_routing@9: - // tests/approvals/named-types.algo.ts:21 + // tests/approvals/named-types.algo.ts:14 // export class MyContract extends Contract { txn OnCompletion intc_0 // 0 @@ -244,7 +244,7 @@ __puya_arc4_router___bare_routing@9: b __puya_arc4_router___switch_case_default@11 __puya_arc4_router_____algots__.defaultCreate@10: - // tests/approvals/named-types.algo.ts:21 + // tests/approvals/named-types.algo.ts:14 // export class MyContract extends Contract { txn ApplicationID intc_0 // 0 @@ -257,7 +257,7 @@ __puya_arc4_router_____algots__.defaultCreate@10: __puya_arc4_router___switch_case_default@11: __puya_arc4_router___after_if_else@13: - // tests/approvals/named-types.algo.ts:21 + // tests/approvals/named-types.algo.ts:14 // export class MyContract extends Contract { intc_0 // 0 retsub @@ -265,16 +265,16 @@ __puya_arc4_router___after_if_else@13: // tests/approvals/named-types.algo.ts::MyContract.getXY() -> uint64, uint64: getXY: - // tests/approvals/named-types.algo.ts:22 + // tests/approvals/named-types.algo.ts:15 // public getXY(): XY { proto 0 2 - // tests/approvals/named-types.algo.ts:24 + // tests/approvals/named-types.algo.ts:17 // x: 1, intc_1 // 1 - // tests/approvals/named-types.algo.ts:25 + // tests/approvals/named-types.algo.ts:18 // y: 2, pushint 2 // 2 - // tests/approvals/named-types.algo.ts:23-26 + // tests/approvals/named-types.algo.ts:16-19 // return { // x: 1, // y: 2, @@ -284,16 +284,16 @@ getXY: // tests/approvals/named-types.algo.ts::MyContract.getYX() -> uint64, uint64: getYX: - // tests/approvals/named-types.algo.ts:29 + // tests/approvals/named-types.algo.ts:22 // public getYX(): YX { proto 0 2 - // tests/approvals/named-types.algo.ts:32 + // tests/approvals/named-types.algo.ts:25 // y: 111, pushint 111 // 111 - // tests/approvals/named-types.algo.ts:31 + // tests/approvals/named-types.algo.ts:24 // x: 222, pushint 222 // 222 - // tests/approvals/named-types.algo.ts:30-33 + // tests/approvals/named-types.algo.ts:23-26 // return { // x: 222, // y: 111, @@ -303,16 +303,16 @@ getYX: // tests/approvals/named-types.algo.ts::MyContract.getAnon() -> uint64, uint64: getAnon: - // tests/approvals/named-types.algo.ts:36 + // tests/approvals/named-types.algo.ts:29 // public getAnon() { proto 0 2 - // tests/approvals/named-types.algo.ts:38 + // tests/approvals/named-types.algo.ts:31 // x: Uint64(3), pushint 3 // 3 - // tests/approvals/named-types.algo.ts:39 + // tests/approvals/named-types.algo.ts:32 // y: Uint64(4), pushint 4 // 4 - // tests/approvals/named-types.algo.ts:37-40 + // tests/approvals/named-types.algo.ts:30-33 // return { // x: Uint64(3), // y: Uint64(4), @@ -322,43 +322,67 @@ getAnon: // tests/approvals/named-types.algo.ts::MyContract.test(x.x: uint64, x.y: uint64, y.y: uint64, y.x: uint64) -> void: test: - // tests/approvals/named-types.algo.ts:43 - // public test(x: XY, y: YX) {} + // tests/approvals/named-types.algo.ts:36 + // public test(x: XY, y: YX) { proto 4 0 + // tests/approvals/named-types.algo.ts:37 + // assertMatch(x, { ...y }) + frame_dig -3 + frame_dig -2 + == + bz test_bool_false@3 + frame_dig -4 + frame_dig -1 + == + bz test_bool_false@3 + intc_1 // 1 + b test_bool_merge@4 + +test_bool_false@3: + intc_0 // 0 + +test_bool_merge@4: + // tests/approvals/named-types.algo.ts:37 + // assertMatch(x, { ...y }) + assert // assert target is match for conditions retsub // tests/approvals/named-types.algo.ts::MyContract.testing() -> uint64, uint64, uint64, uint64, uint64, uint64: testing: - // tests/approvals/named-types.algo.ts:45 + // tests/approvals/named-types.algo.ts:40 // public testing() { proto 0 6 - // tests/approvals/named-types.algo.ts:46 + // tests/approvals/named-types.algo.ts:41 // const a = this.getXY() callsub getXY swap - // tests/approvals/named-types.algo.ts:47 + // tests/approvals/named-types.algo.ts:42 // const b = this.getYX() callsub getYX cover 2 - // tests/approvals/named-types.algo.ts:48 + // tests/approvals/named-types.algo.ts:43 // const c = this.getAnon() callsub getAnon - cover 3 - // tests/approvals/named-types.algo.ts:49 + pop + callsub getAnon + cover 2 + pop + swap + // tests/approvals/named-types.algo.ts:44 // return [a, b, c] as const - uncover 2 - uncover 5 uncover 3 uncover 5 uncover 4 uncover 5 + uncover 5 + uncover 5 retsub // tests/approvals/named-types.algo.ts::MyContract.__algots__.defaultCreate() -> void: __algots__.defaultCreate: - // tests/approvals/named-types.algo.ts:21 + // tests/approvals/named-types.algo.ts:14 // export class MyContract extends Contract { proto 0 0 retsub diff --git a/tests/approvals/out/named-types/MyContract.arc32.json b/tests/approvals/out/named-types/MyContract.arc32.json index 3a41dd03..4aff9173 100644 --- a/tests/approvals/out/named-types/MyContract.arc32.json +++ b/tests/approvals/out/named-types/MyContract.arc32.json @@ -43,6 +43,21 @@ "getAnon()(uint64,uint64)": { "call_config": { "no_op": "CALL" + }, + "structs": { + "output": { + "name": "getAnonResult", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + } } }, "test((uint64,uint64),(uint64,uint64))void": { @@ -85,7 +100,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbmFtZWQtdHlwZXMuYWxnby50czo6TXlDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxIDgKICAgIGJ5dGVjYmxvY2sgMHggMHgxNTFmN2M3NQogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMgogICAgY2FsbHN1YiBjb25zdHJ1Y3RvcgoKbWFpbl9hZnRlcl9pZl9lbHNlQDI6CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9hcHByb3ZhbHMvbmFtZWQtdHlwZXMuYWxnby50czo6TXlDb250cmFjdC5jb25zdHJ1Y3RvcigpIC0+IHZvaWQ6CmNvbnN0cnVjdG9yOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL25hbWVkLXR5cGVzLmFsZ28udHM6MjEKICAgIC8vIGV4cG9ydCBjbGFzcyBNeUNvbnRyYWN0IGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvbmFtZWQtdHlwZXMuYWxnby50czo6TXlDb250cmFjdC5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvbmFtZWQtdHlwZXMuYWxnby50czoyMQogICAgLy8gZXhwb3J0IGNsYXNzIE15Q29udHJ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L2FwcHJvdmFscy9uYW1lZC10eXBlcy5hbGdvLnRzOjQ1CiAgICAvLyBwdWJsaWMgdGVzdGluZygpIHsKICAgIHR4biBPbkNvbXBsZXRpb24KICAgIGludGNfMCAvLyBOb09wCiAgICA9PQogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBpcyBub3QgTm9PcAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGludGNfMCAvLyAwCiAgICAhPQogICAgYXNzZXJ0IC8vIGNhbiBvbmx5IGNhbGwgd2hlbiBub3QgY3JlYXRpbmcKICAgIGNhbGxzdWIgdGVzdGluZwogICAgY292ZXIgNQogICAgY292ZXIgNAogICAgY292ZXIgMwogICAgY292ZXIgMgogICAgc3dhcAogICAgaXRvYgogICAgc3dhcAogICAgaXRvYgogICAgc3dhcAogICAgYnl0ZWNfMCAvLyAweAogICAgc3dhcAogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIGNvdmVyIDIKICAgIGl0b2IKICAgIHN3YXAKICAgIGl0b2IKICAgIHN3YXAKICAgIGJ5dGVjXzAgLy8gMHgKICAgIHN3YXAKICAgIGNvbmNhdAogICAgc3dhcAogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGl0b2IKICAgIHVuY292ZXIgMwogICAgaXRvYgogICAgc3dhcAogICAgYnl0ZWNfMCAvLyAweAogICAgc3dhcAogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIGJ5dGVjXzAgLy8gMHgKICAgIHVuY292ZXIgMwogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmNhdAogICAgc3dhcAogICAgY29uY2F0CiAgICBieXRlY18xIC8vIDB4MTUxZjdjNzUKICAgIHN3YXAKICAgIGNvbmNhdAogICAgbG9nCiAgICBpbnRjXzEgLy8gMQogICAgcmV0c3ViCgpfX3B1eWFfYXJjNF9yb3V0ZXJfX19zd2l0Y2hfY2FzZV9kZWZhdWx0QDc6CiAgICBiIF9fc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GdvLnRzOjQzCiAgICAvLyBjb25zdCBjID0gdGhpcy5nZXRBbm9uKCkKICAgIGNhbGxzdWIgZ2V0QW5vbgogICAgcG9wCiAgICBjYWxsc3ViIGdldEFub24KICAgIGNvdmVyIDIKICAgIHBvcAogICAgc3dhcAogICAgLy8gdGVzdHMvYXBwcm92YWxzL25hbWVkLXR5cGVzLmFsZ28udHM6NDQKICAgIC8vIHJldHVybiBbYSwgYiwgY10gYXMgY29uc3QKICAgIHVuY292ZXIgMwogICAgdW5jb3ZlciA1CiAgICB1bmNvdmVyIDQKICAgIHVuY292ZXIgNQogICAgdW5jb3ZlciA1CiAgICB1bmNvdmVyIDUKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9uYW1lZC10eXBlcy5hbGdvLnRzOjpNeUNvbnRyYWN0Ll9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZSgpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9uYW1lZC10eXBlcy5hbGdvLnRzOjE0CiAgICAvLyBleHBvcnQgY2xhc3MgTXlDb250cmFjdCBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbmFtZWQtdHlwZXMuYWxnby50czo6TXlDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/named-types/MyContract.ssa.ir b/tests/approvals/out/named-types/MyContract.ssa.ir index 37f07179..0f2d7ab5 100644 --- a/tests/approvals/out/named-types/MyContract.ssa.ir +++ b/tests/approvals/out/named-types/MyContract.ssa.ir @@ -12,18 +12,18 @@ contract tests/approvals/named-types.algo.ts::MyContract: return tmp%0#0 subroutine tests/approvals/named-types.algo.ts::MyContract.constructor() -> void: - block@0: // L21 + block@0: // L14 return subroutine tests/approvals/named-types.algo.ts::MyContract.__puya_arc4_router__() -> bool: - block@0: // L21 + block@0: // L14 let tmp%0#0: uint64 = (txn NumAppArgs) let tmp%1#0: bool = (!= tmp%0#0 0u) goto tmp%1#0 ? block@1 : block@9 - block@1: // abi_routing_L21 + block@1: // abi_routing_L14 let tmp%2#0: bytes = (txna ApplicationArgs 0) switch tmp%2#0 {method "getXY()(uint64,uint64)" => block@2, method "getYX()(uint64,uint64)" => block@3, method "getAnon()(uint64,uint64)" => block@4, method "test((uint64,uint64),(uint64,uint64))void" => block@5, method "testing()((uint64,uint64),(uint64,uint64),(uint64,uint64))" => block@6, * => block@7} - block@2: // getXY_route_L22 + block@2: // getXY_route_L15 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) (assert tmp%4#0) // OnCompletion is not NoOp @@ -40,7 +40,7 @@ contract tests/approvals/named-types.algo.ts::MyContract: let tmp%7#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%2#0) (log tmp%7#0) return 1u - block@3: // getYX_route_L29 + block@3: // getYX_route_L22 let tmp%8#0: uint64 = (txn OnCompletion) let tmp%9#0: bool = (== tmp%8#0 NoOp) (assert tmp%9#0) // OnCompletion is not NoOp @@ -57,7 +57,7 @@ contract tests/approvals/named-types.algo.ts::MyContract: let tmp%12#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%5#0) (log tmp%12#0) return 1u - block@4: // getAnon_route_L36 + block@4: // getAnon_route_L29 let tmp%13#0: uint64 = (txn OnCompletion) let tmp%14#0: bool = (== tmp%13#0 NoOp) (assert tmp%14#0) // OnCompletion is not NoOp @@ -74,7 +74,7 @@ contract tests/approvals/named-types.algo.ts::MyContract: let tmp%17#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%8#0) (log tmp%17#0) return 1u - block@5: // test_route_L43 + block@5: // test_route_L36 let tmp%18#0: uint64 = (txn OnCompletion) let tmp%19#0: bool = (== tmp%18#0 NoOp) (assert tmp%19#0) // OnCompletion is not NoOp @@ -93,7 +93,7 @@ contract tests/approvals/named-types.algo.ts::MyContract: let item1%1%0#0: uint64 = (btoi item1%1#0) tests/approvals/named-types.algo.ts::MyContract.test(item0%0%0#0, item1%0%0#0, item0%1%0#0, item1%1%0#0) return 1u - block@6: // testing_route_L45 + block@6: // testing_route_L40 let tmp%24#0: uint64 = (txn OnCompletion) let tmp%25#0: bool = (== tmp%24#0 NoOp) (assert tmp%25#0) // OnCompletion is not NoOp @@ -127,51 +127,67 @@ contract tests/approvals/named-types.algo.ts::MyContract: let tmp%28#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%21#0) (log tmp%28#0) return 1u - block@7: // switch_case_default_L21 + block@7: // switch_case_default_L14 goto block@8 - block@8: // switch_case_next_L21 + block@8: // switch_case_next_L14 goto block@13 - block@9: // bare_routing_L21 + block@9: // bare_routing_L14 let tmp%29#0: uint64 = (txn OnCompletion) switch tmp%29#0 {0u => block@10, * => block@11} - block@10: // __algots__.defaultCreate_L21 + block@10: // __algots__.defaultCreate_L14 let tmp%30#0: uint64 = (txn ApplicationID) let tmp%31#0: bool = (== tmp%30#0 0u) (assert tmp%31#0) // can only call when creating tests/approvals/named-types.algo.ts::MyContract.__algots__.defaultCreate() return 1u - block@11: // switch_case_default_L21 + block@11: // switch_case_default_L14 goto block@12 - block@12: // switch_case_next_L21 + block@12: // switch_case_next_L14 goto block@13 - block@13: // after_if_else_L21 + block@13: // after_if_else_L14 return 0u subroutine tests/approvals/named-types.algo.ts::MyContract.getXY() -> : - block@0: // L22 + block@0: // L15 return 1u 2u subroutine tests/approvals/named-types.algo.ts::MyContract.getYX() -> : - block@0: // L29 + block@0: // L22 return 111u 222u subroutine tests/approvals/named-types.algo.ts::MyContract.getAnon() -> : - block@0: // L36 + block@0: // L29 return 3u 4u subroutine tests/approvals/named-types.algo.ts::MyContract.test(x.x: uint64, x.y: uint64, y.y: uint64, y.x: uint64) -> void: - block@0: // L43 + block@0: // L36 + let tmp%0#0: bool = (== x.y#0 y.y#0) + goto tmp%0#0 ? block@1 : block@3 + block@1: // and_contd_L37 + let tmp%1#0: bool = (== x.x#0 y.x#0) + goto tmp%1#0 ? block@2 : block@3 + block@2: // bool_true_L37 + let and_result%0#0: bool = 1u + goto block@4 + block@3: // bool_false_L37 + let and_result%0#1: bool = 0u + goto block@4 + block@4: // bool_merge_L37 + let and_result%0#2: bool = φ(and_result%0#0 <- block@2, and_result%0#1 <- block@3) + (assert and_result%0#2) // assert target is match for conditions return subroutine tests/approvals/named-types.algo.ts::MyContract.testing() -> : - block@0: // L45 + block@0: // L40 let (a.x#0: uint64, a.y#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getXY() let (b.y#0: uint64, b.x#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getYX() - let (c.x#0: uint64, c.y#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getAnon() + let (awst_tmp%0#0: uint64, awst_tmp%1#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getAnon() + let (awst_tmp%2#0: uint64, awst_tmp%3#0: uint64) = tests/approvals/named-types.algo.ts::MyContract.getAnon() + let (c.x#0: uint64, c.y#0: uint64) = (awst_tmp%0#0, awst_tmp%3#0) return a.x#0 a.y#0 b.y#0 b.x#0 c.x#0 c.y#0 subroutine tests/approvals/named-types.algo.ts::MyContract.__algots__.defaultCreate() -> void: - block@0: // L21 + block@0: // L14 return program clear-state: diff --git a/tests/approvals/out/named-types/named-types.awst b/tests/approvals/out/named-types/named-types.awst index 79566bc7..2725cb19 100644 --- a/tests/approvals/out/named-types/named-types.awst +++ b/tests/approvals/out/named-types/named-types.awst @@ -15,28 +15,29 @@ contract MyContract getXY(): XY{ x: uint64, y: uint64 } { - return { x: (#9 = { x: 1, y: 2 }).x, y: #9.y } + return { x: (#0 = { x: 1, y: 2 }).x, y: #0.y } } getYX(): YX{ y: uint64, x: uint64 } { - return { y: (#10 = { x: 222, y: 111 }).y, x: #10.x } + return { y: (#1 = { x: 222, y: 111 }).y, x: #1.x } } - getAnon(): { x: uint64, y: uint64 } + getAnon(): getAnonResult{ x: uint64, y: uint64 } { - return { x: 3, y: 4 } + return { x: (#2 = { x: 3, y: 4 }).x, y: #2.y } } test(): void { + assert(x.y == y.y and x.x == y.x) } testing(): readonlytuple[XY{ x: uint64, y: uint64 }, YX{ y: uint64, x: uint64 }, { x: uint64, y: uint64 }] { a: XY{ x: uint64, y: uint64 } = this.getXY() b: YX{ y: uint64, x: uint64 } = this.getYX() - c: { x: uint64, y: uint64 } = this.getAnon() + c: { x: uint64, y: uint64 } = { x: (#3 = this.getAnon()).x, y: #3.y } return [a, b, c] } diff --git a/tests/approvals/out/named-types/named-types.awst.json b/tests/approvals/out/named-types/named-types.awst.json index e080add0..858b5da9 100644 --- a/tests/approvals/out/named-types/named-types.awst.json +++ b/tests/approvals/out/named-types/named-types.awst.json @@ -3,8 +3,8 @@ "_type": "Contract", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 14, + "end_line": 14, "column": 0, "end_column": 42 }, @@ -301,15 +301,15 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 22, - "end_line": 22, + "line": 15, + "end_line": 15, "column": 2, "end_column": 20 }, "args": [], "return_type": { "_type": "WTuple", - "name": "XY", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -338,8 +338,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 22, - "end_line": 27, + "line": 15, + "end_line": 20, "column": 21, "end_column": 3 }, @@ -348,8 +348,8 @@ "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 23, - "end_line": 26, + "line": 16, + "end_line": 19, "column": 4, "end_column": 5 }, @@ -357,14 +357,14 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 23, - "end_line": 26, + "line": 16, + "end_line": 19, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "XY", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -394,8 +394,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 23, - "end_line": 26, + "line": 16, + "end_line": 19, "column": 11, "end_column": 5 }, @@ -410,14 +410,14 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 23, - "end_line": 26, + "line": 16, + "end_line": 19, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -446,14 +446,14 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 23, - "end_line": 26, + "line": 16, + "end_line": 19, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -483,8 +483,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 24, - "end_line": 24, + "line": 17, + "end_line": 17, "column": 9, "end_column": 10 }, @@ -502,8 +502,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 18, + "end_line": 18, "column": 9, "end_column": 10 }, @@ -519,7 +519,7 @@ } ] }, - "id": "9" + "id": "0" }, "name": "x" }, @@ -527,8 +527,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 23, - "end_line": 26, + "line": 16, + "end_line": 19, "column": 11, "end_column": 5 }, @@ -543,14 +543,14 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 23, - "end_line": 26, + "line": 16, + "end_line": 19, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -579,14 +579,14 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 23, - "end_line": 26, + "line": 16, + "end_line": 19, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -616,8 +616,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 24, - "end_line": 24, + "line": 17, + "end_line": 17, "column": 9, "end_column": 10 }, @@ -635,8 +635,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 18, + "end_line": 18, "column": 9, "end_column": 10 }, @@ -652,7 +652,7 @@ } ] }, - "id": "9" + "id": "0" }, "name": "y" } @@ -675,8 +675,8 @@ "_type": "ARC4ABIMethodConfig", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 22, - "end_line": 22, + "line": 15, + "end_line": 15, "column": 2, "end_column": 20 }, @@ -709,15 +709,15 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 29, - "end_line": 29, + "line": 22, + "end_line": 22, "column": 2, "end_column": 20 }, "args": [], "return_type": { "_type": "WTuple", - "name": "YX", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -746,8 +746,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 29, - "end_line": 34, + "line": 22, + "end_line": 27, "column": 21, "end_column": 3 }, @@ -756,8 +756,8 @@ "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 30, - "end_line": 33, + "line": 23, + "end_line": 26, "column": 4, "end_column": 5 }, @@ -765,14 +765,14 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 30, - "end_line": 33, + "line": 23, + "end_line": 26, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "YX", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -802,8 +802,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 30, - "end_line": 33, + "line": 23, + "end_line": 26, "column": 11, "end_column": 5 }, @@ -818,14 +818,14 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 30, - "end_line": 33, + "line": 23, + "end_line": 26, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -854,14 +854,14 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 30, - "end_line": 33, + "line": 23, + "end_line": 26, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -891,8 +891,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 31, - "end_line": 31, + "line": 24, + "end_line": 24, "column": 9, "end_column": 12 }, @@ -910,8 +910,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 25, + "end_line": 25, "column": 9, "end_column": 12 }, @@ -927,7 +927,7 @@ } ] }, - "id": "10" + "id": "1" }, "name": "y" }, @@ -935,8 +935,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 30, - "end_line": 33, + "line": 23, + "end_line": 26, "column": 11, "end_column": 5 }, @@ -951,14 +951,14 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 30, - "end_line": 33, + "line": 23, + "end_line": 26, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -987,14 +987,14 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 30, - "end_line": 33, + "line": 23, + "end_line": 26, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1024,8 +1024,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 31, - "end_line": 31, + "line": 24, + "end_line": 24, "column": 9, "end_column": 12 }, @@ -1043,8 +1043,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 25, + "end_line": 25, "column": 9, "end_column": 12 }, @@ -1060,7 +1060,7 @@ } ] }, - "id": "10" + "id": "1" }, "name": "x" } @@ -1083,8 +1083,8 @@ "_type": "ARC4ABIMethodConfig", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 29, - "end_line": 29, + "line": 22, + "end_line": 22, "column": 2, "end_column": 20 }, @@ -1117,15 +1117,15 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 36, - "end_line": 36, + "line": 29, + "end_line": 29, "column": 2, "end_column": 18 }, "args": [], "return_type": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/named-types.algo.ts::getAnonResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1154,8 +1154,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 36, - "end_line": 41, + "line": 29, + "end_line": 34, "column": 19, "end_column": 3 }, @@ -1164,8 +1164,8 @@ "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 37, - "end_line": 40, + "line": 30, + "end_line": 33, "column": 4, "end_column": 5 }, @@ -1173,14 +1173,14 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 37, - "end_line": 40, + "line": 30, + "end_line": 33, "column": 11, "end_column": 5 }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/named-types.algo.ts::getAnonResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1207,13 +1207,13 @@ }, "items": [ { - "_type": "IntegerConstant", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 38, - "end_line": 38, - "column": 16, - "end_column": 17 + "line": 30, + "end_line": 33, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WType", @@ -1222,17 +1222,131 @@ "ephemeral": false, "scalar_type": 2 }, - "value": "3", - "teal_alias": null + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 30, + "end_line": 33, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 30, + "end_line": 33, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "items": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 31, + "end_line": 31, + "column": 16, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "3", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 32, + "end_line": 32, + "column": 16, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "4", + "teal_alias": null + } + ] + }, + "id": "2" + }, + "name": "x" }, { - "_type": "IntegerConstant", + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 39, - "end_line": 39, - "column": 16, - "end_column": 17 + "line": 30, + "end_line": 33, + "column": 11, + "end_column": 5 }, "wtype": { "_type": "WType", @@ -1241,45 +1355,159 @@ "ephemeral": false, "scalar_type": 2 }, - "value": "4", - "teal_alias": null - } - ] - } - } - ], - "label": null, - "comment": null - }, - "documentation": { - "_type": "MethodDocumentation", - "description": null, - "args": {}, - "returns": null - }, - "cref": "tests/approvals/named-types.algo.ts::MyContract", - "member_name": "getAnon", - "arc4_method_config": { - "_type": "ARC4ABIMethodConfig", - "source_location": { - "file": "tests/approvals/named-types.algo.ts", - "line": 36, - "end_line": 36, - "column": 2, - "end_column": 18 - }, - "name": "getAnon", - "is_bare": false, - "create": 3, - "readonly": false, - "allowed_completion_types": [ - 0 - ], - "default_args": {}, - "structs": { - "output": { - "name": "Anonymous", - "elements": [ + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 30, + "end_line": 33, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 30, + "end_line": 33, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "items": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 31, + "end_line": 31, + "column": 16, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "3", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 32, + "end_line": 32, + "column": 16, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "4", + "teal_alias": null + } + ] + }, + "id": "2" + }, + "name": "y" + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/named-types.algo.ts::MyContract", + "member_name": "getAnon", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 29, + "end_line": 29, + "column": 2, + "end_column": 18 + }, + "name": "getAnon", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": { + "output": { + "name": "getAnonResult", + "elements": [ [ "x", "uint64" @@ -1297,8 +1525,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 36, + "end_line": 36, "column": 2, "end_column": 27 }, @@ -1308,7 +1536,7 @@ "name": "x", "wtype": { "_type": "WTuple", - "name": "XY", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1335,8 +1563,8 @@ }, "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 36, + "end_line": 36, "column": 14, "end_column": 19 } @@ -1346,7 +1574,7 @@ "name": "y", "wtype": { "_type": "WTuple", - "name": "YX", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1373,8 +1601,8 @@ }, "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 36, + "end_line": 36, "column": 21, "end_column": 26 } @@ -1391,12 +1619,323 @@ "_type": "Block", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 36, + "end_line": 38, "column": 28, - "end_column": 30 + "end_column": 3 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "op_code": "assert", + "immediates": [], + "stack_args": [ + { + "_type": "BooleanBinaryOperation", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 16, + "end_column": 17 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::XY", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "name": "x" + }, + "name": "y" + }, + "operator": "==", + "rhs": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 24, + "end_column": 25 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::YX", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "y", + "x" + ] + }, + "name": "y" + }, + "name": "y" + } + }, + "op": "and", + "right": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 16, + "end_column": 17 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::XY", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "name": "x" + }, + "name": "x" + }, + "operator": "==", + "rhs": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 24, + "end_column": 25 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::YX", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "y", + "x" + ] + }, + "name": "y" + }, + "name": "x" + } + } + } + ], + "comment": "assert target is match for conditions" + } + } + ], "label": null, "comment": null }, @@ -1412,8 +1951,8 @@ "_type": "ARC4ABIMethodConfig", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 36, + "end_line": 36, "column": 2, "end_column": 27 }, @@ -1459,8 +1998,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 40, + "end_line": 40, "column": 2, "end_column": 18 }, @@ -1474,7 +2013,7 @@ "types": [ { "_type": "WTuple", - "name": "XY", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1501,7 +2040,7 @@ }, { "_type": "WTuple", - "name": "YX", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1528,7 +2067,7 @@ }, { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1559,8 +2098,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 45, - "end_line": 50, + "line": 40, + "end_line": 45, "column": 19, "end_column": 3 }, @@ -1569,8 +2108,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 46, - "end_line": 46, + "line": 41, + "end_line": 41, "column": 10, "end_column": 26 }, @@ -1578,14 +2117,14 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 46, - "end_line": 46, + "line": 41, + "end_line": 41, "column": 10, "end_column": 11 }, "wtype": { "_type": "WTuple", - "name": "XY", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1616,14 +2155,14 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 46, - "end_line": 46, + "line": 41, + "end_line": 41, "column": 14, "end_column": 26 }, "wtype": { "_type": "WTuple", - "name": "XY", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1659,8 +2198,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 42, + "end_line": 42, "column": 10, "end_column": 26 }, @@ -1668,14 +2207,14 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 42, + "end_line": 42, "column": 10, "end_column": 11 }, "wtype": { "_type": "WTuple", - "name": "YX", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1706,14 +2245,14 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 42, + "end_line": 42, "column": 14, "end_column": 26 }, "wtype": { "_type": "WTuple", - "name": "YX", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1749,8 +2288,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 48, - "end_line": 48, + "line": 43, + "end_line": 43, "column": 10, "end_column": 28 }, @@ -1758,14 +2297,14 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 48, - "end_line": 48, + "line": 43, + "end_line": 43, "column": 10, "end_column": 11 }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1793,17 +2332,17 @@ "name": "c" }, "value": { - "_type": "SubroutineCallExpression", + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 48, - "end_line": 48, + "line": 43, + "end_line": 43, "column": 14, "end_column": 28 }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1828,19 +2367,212 @@ "y" ] }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "getAnon" - }, - "args": [] + "items": [ + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 14, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 14, + "end_column": 28 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::getAnonResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "source": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 14, + "end_column": 28 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::getAnonResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "getAnon" + }, + "args": [] + }, + "id": "3" + }, + "name": "x" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 14, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 14, + "end_column": 28 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::getAnonResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "source": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 14, + "end_column": 28 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::getAnonResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "getAnon" + }, + "args": [] + }, + "id": "3" + }, + "name": "y" + } + ] } }, { "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 44, + "end_line": 44, "column": 4, "end_column": 29 }, @@ -1848,8 +2580,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 44, + "end_line": 44, "column": 11, "end_column": 20 }, @@ -1862,7 +2594,7 @@ "types": [ { "_type": "WTuple", - "name": "XY", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1889,7 +2621,7 @@ }, { "_type": "WTuple", - "name": "YX", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1916,7 +2648,7 @@ }, { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1948,14 +2680,14 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 44, + "end_line": 44, "column": 12, "end_column": 13 }, "wtype": { "_type": "WTuple", - "name": "XY", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1986,14 +2718,14 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 44, + "end_line": 44, "column": 15, "end_column": 16 }, "wtype": { "_type": "WTuple", - "name": "YX", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2024,14 +2756,14 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 44, + "end_line": 44, "column": 18, "end_column": 19 }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2077,8 +2809,8 @@ "_type": "ARC4ABIMethodConfig", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 40, + "end_line": 40, "column": 2, "end_column": 18 }, @@ -2097,8 +2829,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 14, + "end_line": 14, "column": 0, "end_column": 42 }, @@ -2114,8 +2846,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 14, + "end_line": 14, "column": 0, "end_column": 42 }, @@ -2124,8 +2856,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 14, + "end_line": 14, "column": 0, "end_column": 42 }, @@ -2133,8 +2865,8 @@ "_type": "VoidConstant", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 14, + "end_line": 14, "column": 0, "end_column": 42 }, @@ -2284,8 +3016,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 14, + "end_line": 14, "column": 0, "end_column": 42 }, @@ -2301,8 +3033,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 14, + "end_line": 14, "column": 0, "end_column": 42 }, @@ -2322,8 +3054,8 @@ "_type": "ARC4BareMethodConfig", "source_location": { "file": "tests/approvals/named-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 14, + "end_line": 14, "column": 0, "end_column": 42 }, diff --git a/tests/approvals/out/object-destructuring/object-destructuring.awst b/tests/approvals/out/object-destructuring/object-destructuring.awst index f363b04e..dcb36054 100644 --- a/tests/approvals/out/object-destructuring/object-destructuring.awst +++ b/tests/approvals/out/object-destructuring/object-destructuring.awst @@ -1,18 +1,18 @@ subroutine testPartialDestructure(arg: { x: uint64, y: uint64, z: uint64 }): void { { x: x, y: _, z: _₁ }: { x: uint64, y: uint64, z: uint64 } = arg - { nested: { y: y, x: _₂, z: _₃ } }: { nested: { y: uint64, x: uint64, z: uint64 } } = { nested: (#2 = { nested: { y: arg.y, x: arg.x, z: arg.z } }).nested } + { nested: { y: y, x: _₂, z: _₃ } }: { nested: { y: uint64, x: uint64, z: uint64 } } = { nested: (#0 = { nested: { y: arg.y, x: arg.x, z: arg.z } }).nested } } subroutine test(): void { - { a: a, b: b, c: c, d: d }: { a: uint64, b: bytes, c: bool, d: biguint } = tests/approvals/object-destructuring.algo.ts::produceItems() - { d: e, a: _, b: _₁, c: _₂ }: { d: biguint, a: uint64, b: bytes, c: bool } = { d: (#3 = tests/approvals/object-destructuring.algo.ts::produceItems()).d, a: #3.a, b: #3.b, c: #3.c } - f: { a: uint64, b: bytes, c: bool, d: biguint } = { a: (#5 = ({ a: g, d: i, b: _₃, c: _₄ } = { a: (#4 = tests/approvals/object-destructuring.algo.ts::produceItems()).a, d: #4.d, b: #4.b, c: #4.c })).a, b: #5.b, c: #5.c, d: #5.d } - tests/approvals/object-destructuring.algo.ts::receivePartial({ a: (#6 = tests/approvals/object-destructuring.algo.ts::produceItems()).a, d: #6.d }) + { a: a, b: b, c: c, d: d }: { a: uint64, b: bytes, c: bool, d: biguint } = { a: (#1 = tests/approvals/object-destructuring.algo.ts::produceItems()).a, b: #1.b, c: #1.c, d: #1.d } + { d: e, a: _, b: _₁, c: _₂ }: { d: biguint, a: uint64, b: bytes, c: bool } = { d: (#2 = tests/approvals/object-destructuring.algo.ts::produceItems()).d, a: #2.a, b: #2.b, c: #2.c } + f: { a: uint64, b: bytes, c: bool, d: biguint } = { a: (#3 = ({ a: g, d: i, b: _₃, c: _₄ } = { a: (#4 = tests/approvals/object-destructuring.algo.ts::produceItems()).a, d: #4.d, b: #4.b, c: #4.c })).a, b: #3.b, c: #3.c, d: #3.d } + tests/approvals/object-destructuring.algo.ts::receivePartial({ a: (#5 = tests/approvals/object-destructuring.algo.ts::produceItems()).a, d: #5.d }) } -subroutine produceItems(): { a: uint64, b: bytes, c: bool, d: biguint } +subroutine produceItems(): produceItemsResult{ a: uint64, b: bytes, c: bool, d: biguint } { - return { a: (#7 = { a: 1, b: "", c: False, d: 999 }).a, b: #7.b, c: #7.c, d: #7.d } + return { a: (#6 = { a: 1, b: "", c: False, d: 999 }).a, b: #6.b, c: #6.c, d: #6.d } } subroutine receivePartial(x: { a: uint64, d: biguint }): void { @@ -25,7 +25,7 @@ subroutine testLiteralToLiteral(): void } subroutine testNumericResolution(): void { - x: { a: uint64 } = (y = { a: (#8 = { a: 434 }).a }) + x: { a: uint64 } = (y = { a: (#7 = { a: 434 }).a }) } subroutine test2(args: { x: bool, y: bool, z: readonlytuple[string, string] }): void { diff --git a/tests/approvals/out/object-destructuring/object-destructuring.awst.json b/tests/approvals/out/object-destructuring/object-destructuring.awst.json index 7acb3169..4c1f15ae 100644 --- a/tests/approvals/out/object-destructuring/object-destructuring.awst.json +++ b/tests/approvals/out/object-destructuring/object-destructuring.awst.json @@ -14,7 +14,7 @@ "name": "arg", "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -93,7 +93,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -194,7 +194,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -250,14 +250,14 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, "types": [ { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -307,7 +307,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -410,14 +410,14 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, "types": [ { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -467,7 +467,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -511,14 +511,14 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, "types": [ { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -567,14 +567,14 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, "types": [ { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -624,7 +624,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -685,7 +685,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -749,7 +749,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -813,7 +813,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -854,7 +854,7 @@ } ] }, - "id": "2" + "id": "0" }, "name": "nested" } @@ -921,7 +921,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1038,7 +1038,7 @@ ] }, "value": { - "_type": "SubroutineCallExpression", + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/object-destructuring.algo.ts", "line": 12, @@ -1048,7 +1048,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1089,11 +1089,528 @@ "d" ] }, - "target": { - "_type": "SubroutineID", - "target": "tests/approvals/object-destructuring.algo.ts::produceItems" - }, - "args": [] + "items": [ + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b", + "c", + "d" + ] + }, + "source": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b", + "c", + "d" + ] + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/object-destructuring.algo.ts::produceItems" + }, + "args": [] + }, + "id": "1" + }, + "name": "a" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b", + "c", + "d" + ] + }, + "source": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b", + "c", + "d" + ] + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/object-destructuring.algo.ts::produceItems" + }, + "args": [] + }, + "id": "1" + }, + "name": "b" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b", + "c", + "d" + ] + }, + "source": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b", + "c", + "d" + ] + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/object-destructuring.algo.ts::produceItems" + }, + "args": [] + }, + "id": "1" + }, + "name": "c" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b", + "c", + "d" + ] + }, + "source": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/object-destructuring.algo.ts", + "line": 12, + "end_line": 12, + "column": 25, + "end_column": 39 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b", + "c", + "d" + ] + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/object-destructuring.algo.ts::produceItems" + }, + "args": [] + }, + "id": "1" + }, + "name": "d" + } + ] } }, { @@ -1116,7 +1633,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1243,7 +1760,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1312,7 +1829,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1364,7 +1881,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1411,7 +1928,7 @@ }, "args": [] }, - "id": "3" + "id": "2" }, "name": "d" }, @@ -1442,7 +1959,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1494,7 +2011,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1541,7 +2058,7 @@ }, "args": [] }, - "id": "3" + "id": "2" }, "name": "a" }, @@ -1572,7 +2089,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1624,7 +2141,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1671,7 +2188,7 @@ }, "args": [] }, - "id": "3" + "id": "2" }, "name": "b" }, @@ -1702,7 +2219,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1754,7 +2271,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1801,7 +2318,7 @@ }, "args": [] }, - "id": "3" + "id": "2" }, "name": "c" } @@ -1828,7 +2345,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1882,7 +2399,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1951,7 +2468,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2003,7 +2520,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2055,7 +2572,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2182,7 +2699,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2251,7 +2768,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2303,7 +2820,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2381,7 +2898,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2433,7 +2950,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2511,7 +3028,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2563,7 +3080,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2641,7 +3158,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2693,7 +3210,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2747,7 +3264,7 @@ ] } }, - "id": "5" + "id": "3" }, "name": "a" }, @@ -2778,7 +3295,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2830,7 +3347,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -2882,7 +3399,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3009,7 +3526,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3078,7 +3595,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3130,7 +3647,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3208,7 +3725,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3260,7 +3777,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3338,7 +3855,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3390,7 +3907,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3468,7 +3985,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3520,7 +4037,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3574,7 +4091,7 @@ ] } }, - "id": "5" + "id": "3" }, "name": "b" }, @@ -3605,7 +4122,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3657,7 +4174,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3709,7 +4226,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3836,7 +4353,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3905,7 +4422,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -3957,7 +4474,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4035,7 +4552,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4087,7 +4604,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4165,7 +4682,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4217,7 +4734,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4295,7 +4812,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4347,7 +4864,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4401,7 +4918,7 @@ ] } }, - "id": "5" + "id": "3" }, "name": "c" }, @@ -4432,7 +4949,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4484,7 +5001,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4536,7 +5053,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4663,7 +5180,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4732,7 +5249,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4784,7 +5301,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4862,7 +5379,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4914,7 +5431,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -4992,7 +5509,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5044,7 +5561,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5122,7 +5639,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5174,7 +5691,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5228,7 +5745,7 @@ ] } }, - "id": "5" + "id": "3" }, "name": "d" } @@ -5279,7 +5796,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5332,7 +5849,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5384,7 +5901,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5431,7 +5948,7 @@ }, "args": [] }, - "id": "6" + "id": "5" }, "name": "a" }, @@ -5462,7 +5979,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5514,7 +6031,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5561,7 +6078,7 @@ }, "args": [] }, - "id": "6" + "id": "5" }, "name": "d" } @@ -5596,7 +6113,7 @@ "args": [], "return_type": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5667,7 +6184,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "tests/approvals/object-destructuring.algo.ts::produceItemsResult", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5736,7 +6253,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5788,7 +6305,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5907,7 +6424,7 @@ } ] }, - "id": "7" + "id": "6" }, "name": "a" }, @@ -5938,7 +6455,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -5990,7 +6507,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6109,7 +6626,7 @@ } ] }, - "id": "7" + "id": "6" }, "name": "b" }, @@ -6140,7 +6657,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6192,7 +6709,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6311,7 +6828,7 @@ } ] }, - "id": "7" + "id": "6" }, "name": "c" }, @@ -6342,7 +6859,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6394,7 +6911,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6513,7 +7030,7 @@ } ] }, - "id": "7" + "id": "6" }, "name": "d" } @@ -6548,7 +7065,7 @@ "name": "x", "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6752,7 +7269,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6827,7 +7344,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6863,7 +7380,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -6938,7 +7455,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7064,7 +7581,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7094,7 +7611,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7122,7 +7639,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7152,7 +7669,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7197,7 +7714,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7225,7 +7742,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7264,7 +7781,7 @@ } ] }, - "id": "8" + "id": "7" }, "name": "a" } @@ -7300,7 +7817,7 @@ "name": "args", "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7395,7 +7912,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7416,7 +7933,7 @@ }, { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7520,7 +8037,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7655,7 +8172,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7676,7 +8193,7 @@ }, { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7780,7 +8297,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7854,7 +8371,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -7916,7 +8433,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -8045,7 +8562,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, diff --git a/tests/approvals/out/property-ordering/property-ordering.awst.json b/tests/approvals/out/property-ordering/property-ordering.awst.json index e9977206..572da091 100644 --- a/tests/approvals/out/property-ordering/property-ordering.awst.json +++ b/tests/approvals/out/property-ordering/property-ordering.awst.json @@ -14,7 +14,7 @@ "name": "x", "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -85,7 +85,7 @@ }, "wtype": { "_type": "WTuple", - "name": "BthenA", + "name": "tests/approvals/property-ordering.algo.ts::BthenA", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -123,7 +123,7 @@ }, "wtype": { "_type": "WTuple", - "name": "BthenA", + "name": "tests/approvals/property-ordering.algo.ts::BthenA", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -176,7 +176,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -232,7 +232,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -343,7 +343,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -381,7 +381,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -434,7 +434,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -470,7 +470,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -637,7 +637,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -673,7 +673,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1103,7 +1103,7 @@ }, "wtype": { "_type": "WTuple", - "name": "Anonymous", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1156,7 +1156,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1192,7 +1192,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1289,7 +1289,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, @@ -1325,7 +1325,7 @@ }, "wtype": { "_type": "WTuple", - "name": "", + "name": "::", "immutable": true, "ephemeral": false, "scalar_type": null, From 607d15f913aa86e5ed3b719a5f0b23d56bb3d7ed Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Tue, 26 Nov 2024 16:19:11 -0800 Subject: [PATCH 13/30] feat: Add DynamicBytes and StaticBytes types --- package.json | 2 +- packages/algo-ts/src/arc4/encoded-types.ts | 41 + .../ast-visitors/source-file-visitor.ts | 9 +- src/awst_build/eb/arc4/arrays.ts | 135 +- src/awst_build/ptypes/arc4-types.ts | 115 +- src/awst_build/ptypes/register.ts | 13 + tests/approvals/accounts.algo.ts | 3 +- tests/approvals/arc4-types.algo.ts | 36 +- .../accounts/AccountsContract.approval.teal | 433 +-- .../out/accounts/AccountsContract.arc32.json | 2 +- tests/approvals/out/accounts/accounts.awst | 1 + .../approvals/out/accounts/accounts.awst.json | 3032 +++++++++-------- .../Arc4TypesTestContract.approval.teal | 265 +- .../arc4-types/Arc4TypesTestContract.ssa.ir | 56 +- .../approvals/out/arc4-types/arc4-types.awst | 19 + .../out/arc4-types/arc4-types.awst.json | 2551 +++++++++++--- tests/expected-output.spec.ts | 1 - tests/expected-output/arc4-types.algo.ts | 122 + tests/expected-output/null-values.algo.ts | 1 + tests/onchain/accounts.spec.ts | 3 +- 20 files changed, 4380 insertions(+), 2460 deletions(-) create mode 100644 tests/expected-output/arc4-types.algo.ts diff --git a/package.json b/package.json index c036c64d..58809b39 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dev:examples": "tsx src/cli.ts build examples --output-awst --output-awst-json", "dev:approvals": "rimraf tests/approvals/out && tsx src/cli.ts build tests/approvals --dry-run", "dev:expected-output": "tsx src/cli.ts build tests/expected-output --dry-run", - "dev:testing": "tsx src/cli.ts build tests/approvals/named-types.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level debug --out-dir out/[name]", + "dev:testing": "tsx src/cli.ts build tests/approvals/arc4-types.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level debug --out-dir out/[name]", "audit": "better-npm-audit audit", "format": "prettier --write .", "lint": "eslint \"src/**/*.ts\"", diff --git a/packages/algo-ts/src/arc4/encoded-types.ts b/packages/algo-ts/src/arc4/encoded-types.ts index fdc35a14..9bbc5f7e 100644 --- a/packages/algo-ts/src/arc4/encoded-types.ts +++ b/packages/algo-ts/src/arc4/encoded-types.ts @@ -279,3 +279,44 @@ class StructImpl extends StructBase { type StructConstructor = new (initial: T) => StructBase & T export const Struct = StructImpl as StructConstructor + +export class DynamicBytes extends Arc4ReadonlyArray { + [TypeProperty]?: `arc4.DynamicBytes` + + constructor(value?: bytes | string) { + let byteValues: Uint8Array + if (value === undefined) { + byteValues = new Uint8Array(0) + } else if (typeof value === 'string') { + byteValues = BytesCls.fromCompat(value).asUint8Array() + } else { + byteValues = getUint8Array(value) + } + super(Array.from(byteValues).map((b) => new Byte(b))) + } + + get native(): bytes { + return Bytes(this.items.map((i) => i.native)) + } +} + +export class StaticBytes extends Arc4ReadonlyArray { + [TypeProperty]?: `arc4.StaticBytes<${TLength}>` + + constructor(value?: bytes | string) { + let byteValues: Uint8Array + if (value === undefined) { + // TODO: Should be init to TLength + byteValues = new Uint8Array(0) + } else if (typeof value === 'string') { + byteValues = BytesCls.fromCompat(value).asUint8Array() + } else { + byteValues = getUint8Array(value) + } + super(Array.from(byteValues).map((b) => new Byte(b))) + } + + get native(): bytes { + return Bytes(this.items.map((i) => i.native)) + } +} diff --git a/src/awst_build/ast-visitors/source-file-visitor.ts b/src/awst_build/ast-visitors/source-file-visitor.ts index 3981f407..b6432d9d 100644 --- a/src/awst_build/ast-visitors/source-file-visitor.ts +++ b/src/awst_build/ast-visitors/source-file-visitor.ts @@ -27,7 +27,14 @@ export class SourceFileVisitor extends BaseVisitor implements Visitor, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { + const { + ptypes: [length], + args: [initialValue], + } = parseFunctionArgs({ + args, + typeArgs, + callLocation: sourceLocation, + funcName: `${this.ptype.name} constructor`, + genericTypeArgs: 1, + argSpec: (a) => [a.optional(bytesPType)], + }) + const resultPType = StaticBytesGeneric.parameterise([length]) + + codeInvariant(length instanceof NumericLiteralPType, 'length must be numeric literal', sourceLocation) + const byteLength = Number(length.literalValue) + if (!initialValue) { + return instanceEb( + nodeFactory.bytesConstant({ + value: new Uint8Array(byteLength), + sourceLocation, + wtype: resultPType.wtype, + }), + resultPType, + ) + } + const value = initialValue.resolve() + if (value instanceof BytesConstant) { + codeInvariant(value.value.length === byteLength, `Value should have byte length of ${byteLength}`, sourceLocation) + return instanceEb( + nodeFactory.bytesConstant({ + value: value.value, + wtype: resultPType.wtype, + sourceLocation, + }), + resultPType, + ) + } else { + return instanceEb( + nodeFactory.aRC4Encode({ + value: initialValue.resolve(), + sourceLocation, + wtype: resultPType.wtype, + }), + resultPType, + ) + } + } +} +export class DynamicBytesClassBuilder extends ClassBuilder { + readonly ptype = DynamicBytesConstructor + + newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { + const { + args: [initialValue], + } = parseFunctionArgs({ + args, + typeArgs, + callLocation: sourceLocation, + funcName: `${this.ptype.name} constructor`, + genericTypeArgs: 0, + argSpec: (a) => [a.optional(bytesPType)], + }) + const resultPType = DynamicBytesType + + if (!initialValue) { + return instanceEb( + nodeFactory.bytesConstant({ + value: new Uint8Array([0, 0]), + sourceLocation, + wtype: resultPType.wtype, + }), + resultPType, + ) + } + const value = initialValue.resolve() + if (value instanceof BytesConstant) { + return instanceEb( + nodeFactory.bytesConstant({ + value: new Uint8Array([...bigIntToUint8Array(BigInt(value.value.length), 2), ...value.value]), + sourceLocation, + wtype: resultPType.wtype, + }), + resultPType, + ) + } else { + return instanceEb( + nodeFactory.aRC4Encode({ + value, + sourceLocation, + wtype: resultPType.wtype, + }), + resultPType, + ) + } + } +} export abstract class ArrayExpressionBuilder< TArrayType extends DynamicArrayType | StaticArrayType, @@ -288,6 +392,33 @@ export class StaticArrayExpressionBuilder extends ArrayExpressionBuilder { constructor(expr: Expression, ptype: PType) { invariant(ptype instanceof StaticArrayType, 'ptype must be instance of StaticArrayType') diff --git a/src/awst_build/ptypes/arc4-types.ts b/src/awst_build/ptypes/arc4-types.ts index e6c20e84..8ddbeb25 100644 --- a/src/awst_build/ptypes/arc4-types.ts +++ b/src/awst_build/ptypes/arc4-types.ts @@ -3,7 +3,17 @@ import { wtypes } from '../../awst/wtypes' import { Constants } from '../../constants' import { codeInvariant, zipStrict } from '../../util' import { GenericPType, PType } from './base' -import { biguintPType, boolPType, LibClassType, NumericLiteralPType, ObjectPType, stringPType, TuplePType, uint64PType } from './index' +import { + biguintPType, + boolPType, + bytesPType, + LibClassType, + NumericLiteralPType, + ObjectPType, + stringPType, + TuplePType, + uint64PType, +} from './index' import ARC4StaticArray = wtypes.ARC4StaticArray export const UintNClass = new LibClassType({ @@ -140,16 +150,6 @@ export class ARC4StructType extends ARC4EncodedType { } } -// export const arc4StructBaseClass = new ARC4StructClass({ -// name: 'Struct', -// module: Constants.arc4EncodedTypesModuleName, -// instanceType: new ARC4StructType({ -// name: 'Struct', -// module: Constants.arc4EncodedTypesModuleName, -// fields: {}, -// }), -// }) - export const arc4StructBaseType = new ARC4StructType({ name: 'StructBase', module: Constants.arc4EncodedTypesModuleName, @@ -315,23 +315,34 @@ export class DynamicArrayType extends ARC4EncodedType { readonly name: string readonly singleton = false readonly sourceLocation: SourceLocation | undefined - readonly nativeType = undefined + readonly nativeType: PType | undefined = undefined + readonly wtype: wtypes.ARC4DynamicArray - get wtype(): wtypes.ARC4DynamicArray { - return new wtypes.ARC4DynamicArray({ + constructor({ + elementType, + nativeType, + sourceLocation, + name, + immutable, + }: { + elementType: ARC4EncodedType + sourceLocation?: SourceLocation + name?: string + immutable?: boolean + nativeType?: PType + }) { + super() + this.immutable = immutable ?? false + this.elementType = elementType + ;(this.nativeType = nativeType), (this.name = name ?? `DynamicArray<${elementType}>`) + this.sourceLocation = sourceLocation + this.wtype = new wtypes.ARC4DynamicArray({ elementType: this.elementType.wtype, sourceLocation: this.sourceLocation, immutable: this.immutable, + nativeType: this.nativeType?.wtype, }) } - - constructor({ elementType, sourceLocation }: { elementType: ARC4EncodedType; sourceLocation?: SourceLocation }) { - super() - this.immutable = false - this.elementType = elementType - this.name = `DynamicArray<${elementType}>` - this.sourceLocation = sourceLocation - } } export const StaticArrayConstructor = new LibClassType({ name: 'StaticArray', @@ -365,7 +376,7 @@ export class StaticArrayType extends ARC4EncodedType { readonly singleton = false readonly sourceLocation: SourceLocation | undefined readonly wtype: wtypes.ARC4StaticArray - readonly nativeType = undefined + readonly nativeType: PType | undefined constructor({ elementType, @@ -374,6 +385,7 @@ export class StaticArrayType extends ARC4EncodedType { wtype, name, immutable, + nativeType, }: { immutable?: boolean elementType: ARC4EncodedType @@ -381,15 +393,25 @@ export class StaticArrayType extends ARC4EncodedType { sourceLocation?: SourceLocation wtype?: ARC4StaticArray name?: string + nativeType?: PType }) { + codeInvariant(arraySize >= 0, 'StaticArray length must be greater than or equal to 0') + super() this.immutable = immutable ?? false this.elementType = elementType this.arraySize = arraySize - this.name = name ?? `StaticArray<${elementType}>` + this.name = name ?? `StaticArray<${elementType}, ${arraySize}>` this.sourceLocation = sourceLocation + this.nativeType = nativeType this.wtype = - wtype ?? new wtypes.ARC4StaticArray({ elementType: this.elementType.wtype, arraySize: this.arraySize, immutable: this.immutable }) + wtype ?? + new wtypes.ARC4StaticArray({ + elementType: this.elementType.wtype, + arraySize: this.arraySize, + immutable: this.immutable, + nativeType: nativeType?.wtype, + }) } } export const arc4AddressAlias = new StaticArrayType({ @@ -404,3 +426,46 @@ export const AddressClass = new LibClassType({ name: 'Address', module: Constants.arc4EncodedTypesModuleName, }) + +export const StaticBytesGeneric = new GenericPType({ + name: 'StaticBytes', + module: Constants.arc4EncodedTypesModuleName, + parameterise: (typeArgs: PType[]): StaticBytesType => { + codeInvariant(typeArgs.length === 1, 'StaticBytes type expects exactly one type parameter') + const [length] = typeArgs + + codeInvariant( + length instanceof NumericLiteralPType, + `Length generic type param for StaticBytes must be a literal number. Inferred type is ${length.name}`, + ) + return new StaticBytesType({ + length: length.literalValue, + }) + }, +}) +export const StaticBytesConstructor = new LibClassType({ + name: 'StaticBytes', + module: Constants.arc4EncodedTypesModuleName, +}) +export class StaticBytesType extends StaticArrayType { + constructor({ length }: { length: bigint }) { + codeInvariant(length >= 0, 'StaticBytes length must be greater than or equal to 0') + super({ + name: `StaticBytes<${length}>`, + immutable: true, + elementType: arc4ByteAlias, + arraySize: length, + nativeType: bytesPType, + }) + } +} +export const DynamicBytesConstructor = new LibClassType({ + name: 'DynamicBytes', + module: Constants.arc4EncodedTypesModuleName, +}) +export const DynamicBytesType = new DynamicArrayType({ + name: `DynamicBytes`, + immutable: true, + elementType: arc4ByteAlias, + nativeType: bytesPType, +}) diff --git a/src/awst_build/ptypes/register.ts b/src/awst_build/ptypes/register.ts index a66aa1f6..22c43b46 100644 --- a/src/awst_build/ptypes/register.ts +++ b/src/awst_build/ptypes/register.ts @@ -4,8 +4,12 @@ import { AddressExpressionBuilder, DynamicArrayClassBuilder, DynamicArrayExpressionBuilder, + DynamicBytesClassBuilder, + DynamicBytesExpressionBuilder, StaticArrayClassBuilder, StaticArrayExpressionBuilder, + StaticBytesClassBuilder, + StaticBytesExpressionBuilder, } from '../eb/arc4/arrays' import { BoolClassBuilder, BoolExpressionBuilder } from '../eb/arc4/bool' import { StrClassBuilder, StrExpressionBuilder } from '../eb/arc4/string' @@ -73,9 +77,14 @@ import { DynamicArrayConstructor, DynamicArrayGeneric, DynamicArrayType, + DynamicBytesConstructor, + DynamicBytesType, StaticArrayConstructor, StaticArrayGeneric, StaticArrayType, + StaticBytesConstructor, + StaticBytesGeneric, + StaticBytesType, UFixedNxMClass, UFixedNxMGeneric, UFixedNxMType, @@ -296,6 +305,10 @@ export function registerPTypes(typeRegistry: TypeRegistry) { typeRegistry.registerGeneric({ generic: Arc4TupleGeneric, ptype: ARC4TupleType, instanceEb: Arc4TupleExpressionBuilder }) typeRegistry.register({ ptype: ARC4StructType, instanceEb: StructExpressionBuilder }) typeRegistry.register({ ptype: ARC4StructClass, singletonEb: StructClassBuilder }) + typeRegistry.register({ ptype: DynamicBytesConstructor, singletonEb: DynamicBytesClassBuilder }) + typeRegistry.register({ ptype: StaticBytesConstructor, singletonEb: StaticBytesClassBuilder }) + typeRegistry.register({ ptype: DynamicBytesType, instanceEb: DynamicBytesExpressionBuilder }) + typeRegistry.registerGeneric({ generic: StaticBytesGeneric, ptype: StaticBytesType, instanceEb: StaticBytesExpressionBuilder }) // GTXN types typeRegistry.register({ ptype: paymentGtxnType, instanceEb: GroupTransactionExpressionBuilder }) diff --git a/tests/approvals/accounts.algo.ts b/tests/approvals/accounts.algo.ts index c8bb02e5..5b7a6543 100644 --- a/tests/approvals/accounts.algo.ts +++ b/tests/approvals/accounts.algo.ts @@ -1,8 +1,9 @@ import type { Account, Asset } from '@algorandfoundation/algorand-typescript' -import { Contract, Global } from '@algorandfoundation/algorand-typescript' +import { Contract, ensureBudget, Global } from '@algorandfoundation/algorand-typescript' export class AccountsContract extends Contract { public getAccountInfo(account: Account, asset: Asset) { + ensureBudget(1400) return { bytes: account.bytes, balance: account.balance, diff --git a/tests/approvals/arc4-types.algo.ts b/tests/approvals/arc4-types.algo.ts index 271b66ad..681cb994 100644 --- a/tests/approvals/arc4-types.algo.ts +++ b/tests/approvals/arc4-types.algo.ts @@ -1,6 +1,17 @@ -import type { biguint, uint64 } from '@algorandfoundation/algorand-typescript' +import type { biguint, bytes, uint64 } from '@algorandfoundation/algorand-typescript' import { arc4, assert, BaseContract, Bytes, Txn } from '@algorandfoundation/algorand-typescript' -import { Address, Byte, DynamicArray, StaticArray, Str, Tuple, UFixedNxM, UintN } from '@algorandfoundation/algorand-typescript/arc4' +import { + Address, + Byte, + DynamicArray, + DynamicBytes, + StaticArray, + StaticBytes, + Str, + Tuple, + UFixedNxM, + UintN, +} from '@algorandfoundation/algorand-typescript/arc4' function testUFixed() { const a = new UFixedNxM('1.244', 32, 4) @@ -34,6 +45,23 @@ function testStr() { assert(s2.native === 'Hello') } +function testDynamicBytes(someBytes: bytes) { + const db1 = new DynamicBytes() + assert(db1.native === Bytes(), 'No args should give empty bytes') + assert(db1.bytes === new UintN<16>(0).bytes, 'bytes prop should return length header (of 0)') + const db2 = new DynamicBytes(someBytes) + assert(db2.native === someBytes) + + const db3 = new DynamicBytes('hello') + assert(db3.native === Bytes('hello')) +} + +function testStaticBytes() { + const s1 = new StaticBytes() + const s2 = new StaticBytes<4>() + const s3 = new StaticBytes<5>(Bytes.fromHex('AABBCCDDEE')) +} + type ARC4Uint64 = UintN<64> const ARC4Uint64 = UintN<64> @@ -88,7 +116,9 @@ export class Arc4TypesTestContract extends BaseContract { testArrays(new UintN<64>(65)) testAddress() testTuple() - + testUFixed() + testDynamicBytes(Bytes('hmmmmmmmmm')) + testStaticBytes() const result = new arc4.DynamicArray>() assert(result.length === 0) return true diff --git a/tests/approvals/out/accounts/AccountsContract.approval.teal b/tests/approvals/out/accounts/AccountsContract.approval.teal index 7ac01bc5..0ed09168 100644 --- a/tests/approvals/out/accounts/AccountsContract.approval.teal +++ b/tests/approvals/out/accounts/AccountsContract.approval.teal @@ -1,7 +1,8 @@ #pragma version 10 tests/approvals/accounts.algo.ts::AccountsContract.approvalProgram: - intcblock 0 93 1 + intcblock 0 1 93 + bytecblock 0x00 0x068101 txn ApplicationID bnz main_after_if_else@2 callsub constructor @@ -107,17 +108,17 @@ __puya_arc4_router___getAccountInfo_route@2: swap itob cover 12 - pushbytes 0x00 + bytec_0 // 0x00 intc_0 // 0 uncover 9 setbit cover 11 - pushbytes 0x00 + bytec_0 // 0x00 intc_0 // 0 uncover 15 setbit cover 9 - intc_1 // 93 + intc_2 // 93 itob extract 6 2 pushbytes 0x @@ -125,7 +126,7 @@ __puya_arc4_router___getAccountInfo_route@2: concat dig 1 len - intc_1 // 93 + intc_2 // 93 + swap uncover 4 @@ -171,7 +172,7 @@ __puya_arc4_router___getAccountInfo_route@2: swap concat log - intc_2 // 1 + intc_1 // 1 retsub __puya_arc4_router___switch_case_default@3: @@ -194,7 +195,7 @@ __puya_arc4_router_____algots__.defaultCreate@6: == assert // can only call when creating callsub __algots__.defaultCreate - intc_2 // 1 + intc_1 // 1 retsub __puya_arc4_router___switch_case_default@7: @@ -211,1087 +212,1092 @@ getAccountInfo: // tests/approvals/accounts.algo.ts:5 // public getAccountInfo(account: Account, asset: Asset) { proto 2 15 - // tests/approvals/accounts.algo.ts:8 + // tests/approvals/accounts.algo.ts:6 + // ensureBudget(1400) + pushint 1400 // 1400 + intc_0 // 0 + callsub ensure_budget + // tests/approvals/accounts.algo.ts:9 // balance: account.balance, frame_dig -2 acct_params_get AcctBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:9 + // tests/approvals/accounts.algo.ts:10 // minBalance: account.minBalance, frame_dig -2 acct_params_get AcctMinBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:10 + // tests/approvals/accounts.algo.ts:11 // authAddress: account.authAddress.bytes, frame_dig -2 acct_params_get AcctAuthAddr bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:11 + // tests/approvals/accounts.algo.ts:12 // totalNumUint: account.totalNumUint, frame_dig -2 acct_params_get AcctTotalNumUint bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:12 + // tests/approvals/accounts.algo.ts:13 // totalNumByteSlice: account.totalNumByteSlice, frame_dig -2 acct_params_get AcctTotalNumByteSlice bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:13 + // tests/approvals/accounts.algo.ts:14 // totalExtraAppPages: account.totalExtraAppPages, frame_dig -2 acct_params_get AcctTotalExtraAppPages bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:14 + // tests/approvals/accounts.algo.ts:15 // totalAppsCreated: account.totalAppsCreated, frame_dig -2 acct_params_get AcctTotalAppsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:15 + // tests/approvals/accounts.algo.ts:16 // totalAppsOptedIn: account.totalAppsOptedIn, frame_dig -2 acct_params_get AcctTotalAppsOptedIn bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:16 + // tests/approvals/accounts.algo.ts:17 // totalAssetsCreated: account.totalAssetsCreated, frame_dig -2 acct_params_get AcctTotalAssetsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:17 + // tests/approvals/accounts.algo.ts:18 // totalAssets: account.totalAssets, frame_dig -2 acct_params_get AcctTotalAssets bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:18 + // tests/approvals/accounts.algo.ts:19 // totalBoxes: account.totalBoxes, frame_dig -2 acct_params_get AcctTotalBoxes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:19 + // tests/approvals/accounts.algo.ts:20 // totalBoxBytes: account.totalBoxBytes, frame_dig -2 acct_params_get AcctTotalBoxBytes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:8 + // tests/approvals/accounts.algo.ts:9 // balance: account.balance, frame_dig -2 acct_params_get AcctBalance assert // account funded - // tests/approvals/accounts.algo.ts:9 + // tests/approvals/accounts.algo.ts:10 // minBalance: account.minBalance, frame_dig -2 acct_params_get AcctMinBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:10 + // tests/approvals/accounts.algo.ts:11 // authAddress: account.authAddress.bytes, frame_dig -2 acct_params_get AcctAuthAddr bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:11 + // tests/approvals/accounts.algo.ts:12 // totalNumUint: account.totalNumUint, frame_dig -2 acct_params_get AcctTotalNumUint bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:12 + // tests/approvals/accounts.algo.ts:13 // totalNumByteSlice: account.totalNumByteSlice, frame_dig -2 acct_params_get AcctTotalNumByteSlice bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:13 + // tests/approvals/accounts.algo.ts:14 // totalExtraAppPages: account.totalExtraAppPages, frame_dig -2 acct_params_get AcctTotalExtraAppPages bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:14 + // tests/approvals/accounts.algo.ts:15 // totalAppsCreated: account.totalAppsCreated, frame_dig -2 acct_params_get AcctTotalAppsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:15 + // tests/approvals/accounts.algo.ts:16 // totalAppsOptedIn: account.totalAppsOptedIn, frame_dig -2 acct_params_get AcctTotalAppsOptedIn bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:16 + // tests/approvals/accounts.algo.ts:17 // totalAssetsCreated: account.totalAssetsCreated, frame_dig -2 acct_params_get AcctTotalAssetsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:17 + // tests/approvals/accounts.algo.ts:18 // totalAssets: account.totalAssets, frame_dig -2 acct_params_get AcctTotalAssets bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:18 + // tests/approvals/accounts.algo.ts:19 // totalBoxes: account.totalBoxes, frame_dig -2 acct_params_get AcctTotalBoxes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:19 + // tests/approvals/accounts.algo.ts:20 // totalBoxBytes: account.totalBoxBytes, frame_dig -2 acct_params_get AcctTotalBoxBytes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:8 + // tests/approvals/accounts.algo.ts:9 // balance: account.balance, frame_dig -2 acct_params_get AcctBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:9 + // tests/approvals/accounts.algo.ts:10 // minBalance: account.minBalance, frame_dig -2 acct_params_get AcctMinBalance assert // account funded - // tests/approvals/accounts.algo.ts:10 + // tests/approvals/accounts.algo.ts:11 // authAddress: account.authAddress.bytes, frame_dig -2 acct_params_get AcctAuthAddr bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:11 + // tests/approvals/accounts.algo.ts:12 // totalNumUint: account.totalNumUint, frame_dig -2 acct_params_get AcctTotalNumUint bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:12 + // tests/approvals/accounts.algo.ts:13 // totalNumByteSlice: account.totalNumByteSlice, frame_dig -2 acct_params_get AcctTotalNumByteSlice bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:13 + // tests/approvals/accounts.algo.ts:14 // totalExtraAppPages: account.totalExtraAppPages, frame_dig -2 acct_params_get AcctTotalExtraAppPages bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:14 + // tests/approvals/accounts.algo.ts:15 // totalAppsCreated: account.totalAppsCreated, frame_dig -2 acct_params_get AcctTotalAppsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:15 + // tests/approvals/accounts.algo.ts:16 // totalAppsOptedIn: account.totalAppsOptedIn, frame_dig -2 acct_params_get AcctTotalAppsOptedIn bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:16 + // tests/approvals/accounts.algo.ts:17 // totalAssetsCreated: account.totalAssetsCreated, frame_dig -2 acct_params_get AcctTotalAssetsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:17 + // tests/approvals/accounts.algo.ts:18 // totalAssets: account.totalAssets, frame_dig -2 acct_params_get AcctTotalAssets bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:18 + // tests/approvals/accounts.algo.ts:19 // totalBoxes: account.totalBoxes, frame_dig -2 acct_params_get AcctTotalBoxes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:19 + // tests/approvals/accounts.algo.ts:20 // totalBoxBytes: account.totalBoxBytes, frame_dig -2 acct_params_get AcctTotalBoxBytes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:8 + // tests/approvals/accounts.algo.ts:9 // balance: account.balance, frame_dig -2 acct_params_get AcctBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:9 + // tests/approvals/accounts.algo.ts:10 // minBalance: account.minBalance, frame_dig -2 acct_params_get AcctMinBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:10 + // tests/approvals/accounts.algo.ts:11 // authAddress: account.authAddress.bytes, frame_dig -2 acct_params_get AcctAuthAddr assert // account funded - // tests/approvals/accounts.algo.ts:11 + // tests/approvals/accounts.algo.ts:12 // totalNumUint: account.totalNumUint, frame_dig -2 acct_params_get AcctTotalNumUint bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:12 + // tests/approvals/accounts.algo.ts:13 // totalNumByteSlice: account.totalNumByteSlice, frame_dig -2 acct_params_get AcctTotalNumByteSlice bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:13 + // tests/approvals/accounts.algo.ts:14 // totalExtraAppPages: account.totalExtraAppPages, frame_dig -2 acct_params_get AcctTotalExtraAppPages bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:14 + // tests/approvals/accounts.algo.ts:15 // totalAppsCreated: account.totalAppsCreated, frame_dig -2 acct_params_get AcctTotalAppsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:15 + // tests/approvals/accounts.algo.ts:16 // totalAppsOptedIn: account.totalAppsOptedIn, frame_dig -2 acct_params_get AcctTotalAppsOptedIn bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:16 + // tests/approvals/accounts.algo.ts:17 // totalAssetsCreated: account.totalAssetsCreated, frame_dig -2 acct_params_get AcctTotalAssetsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:17 + // tests/approvals/accounts.algo.ts:18 // totalAssets: account.totalAssets, frame_dig -2 acct_params_get AcctTotalAssets bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:18 + // tests/approvals/accounts.algo.ts:19 // totalBoxes: account.totalBoxes, frame_dig -2 acct_params_get AcctTotalBoxes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:19 + // tests/approvals/accounts.algo.ts:20 // totalBoxBytes: account.totalBoxBytes, frame_dig -2 acct_params_get AcctTotalBoxBytes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:8 + // tests/approvals/accounts.algo.ts:9 // balance: account.balance, frame_dig -2 acct_params_get AcctBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:9 + // tests/approvals/accounts.algo.ts:10 // minBalance: account.minBalance, frame_dig -2 acct_params_get AcctMinBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:10 + // tests/approvals/accounts.algo.ts:11 // authAddress: account.authAddress.bytes, frame_dig -2 acct_params_get AcctAuthAddr bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:11 + // tests/approvals/accounts.algo.ts:12 // totalNumUint: account.totalNumUint, frame_dig -2 acct_params_get AcctTotalNumUint assert // account funded - // tests/approvals/accounts.algo.ts:12 + // tests/approvals/accounts.algo.ts:13 // totalNumByteSlice: account.totalNumByteSlice, frame_dig -2 acct_params_get AcctTotalNumByteSlice bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:13 + // tests/approvals/accounts.algo.ts:14 // totalExtraAppPages: account.totalExtraAppPages, frame_dig -2 acct_params_get AcctTotalExtraAppPages bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:14 + // tests/approvals/accounts.algo.ts:15 // totalAppsCreated: account.totalAppsCreated, frame_dig -2 acct_params_get AcctTotalAppsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:15 + // tests/approvals/accounts.algo.ts:16 // totalAppsOptedIn: account.totalAppsOptedIn, frame_dig -2 acct_params_get AcctTotalAppsOptedIn bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:16 + // tests/approvals/accounts.algo.ts:17 // totalAssetsCreated: account.totalAssetsCreated, frame_dig -2 acct_params_get AcctTotalAssetsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:17 + // tests/approvals/accounts.algo.ts:18 // totalAssets: account.totalAssets, frame_dig -2 acct_params_get AcctTotalAssets bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:18 + // tests/approvals/accounts.algo.ts:19 // totalBoxes: account.totalBoxes, frame_dig -2 acct_params_get AcctTotalBoxes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:19 + // tests/approvals/accounts.algo.ts:20 // totalBoxBytes: account.totalBoxBytes, frame_dig -2 acct_params_get AcctTotalBoxBytes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:8 + // tests/approvals/accounts.algo.ts:9 // balance: account.balance, frame_dig -2 acct_params_get AcctBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:9 + // tests/approvals/accounts.algo.ts:10 // minBalance: account.minBalance, frame_dig -2 acct_params_get AcctMinBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:10 + // tests/approvals/accounts.algo.ts:11 // authAddress: account.authAddress.bytes, frame_dig -2 acct_params_get AcctAuthAddr bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:11 + // tests/approvals/accounts.algo.ts:12 // totalNumUint: account.totalNumUint, frame_dig -2 acct_params_get AcctTotalNumUint bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:12 + // tests/approvals/accounts.algo.ts:13 // totalNumByteSlice: account.totalNumByteSlice, frame_dig -2 acct_params_get AcctTotalNumByteSlice assert // account funded - // tests/approvals/accounts.algo.ts:13 + // tests/approvals/accounts.algo.ts:14 // totalExtraAppPages: account.totalExtraAppPages, frame_dig -2 acct_params_get AcctTotalExtraAppPages bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:14 + // tests/approvals/accounts.algo.ts:15 // totalAppsCreated: account.totalAppsCreated, frame_dig -2 acct_params_get AcctTotalAppsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:15 + // tests/approvals/accounts.algo.ts:16 // totalAppsOptedIn: account.totalAppsOptedIn, frame_dig -2 acct_params_get AcctTotalAppsOptedIn bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:16 + // tests/approvals/accounts.algo.ts:17 // totalAssetsCreated: account.totalAssetsCreated, frame_dig -2 acct_params_get AcctTotalAssetsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:17 + // tests/approvals/accounts.algo.ts:18 // totalAssets: account.totalAssets, frame_dig -2 acct_params_get AcctTotalAssets bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:18 + // tests/approvals/accounts.algo.ts:19 // totalBoxes: account.totalBoxes, frame_dig -2 acct_params_get AcctTotalBoxes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:19 + // tests/approvals/accounts.algo.ts:20 // totalBoxBytes: account.totalBoxBytes, frame_dig -2 acct_params_get AcctTotalBoxBytes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:8 + // tests/approvals/accounts.algo.ts:9 // balance: account.balance, frame_dig -2 acct_params_get AcctBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:9 + // tests/approvals/accounts.algo.ts:10 // minBalance: account.minBalance, frame_dig -2 acct_params_get AcctMinBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:10 + // tests/approvals/accounts.algo.ts:11 // authAddress: account.authAddress.bytes, frame_dig -2 acct_params_get AcctAuthAddr bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:11 + // tests/approvals/accounts.algo.ts:12 // totalNumUint: account.totalNumUint, frame_dig -2 acct_params_get AcctTotalNumUint bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:12 + // tests/approvals/accounts.algo.ts:13 // totalNumByteSlice: account.totalNumByteSlice, frame_dig -2 acct_params_get AcctTotalNumByteSlice bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:13 + // tests/approvals/accounts.algo.ts:14 // totalExtraAppPages: account.totalExtraAppPages, frame_dig -2 acct_params_get AcctTotalExtraAppPages assert // account funded - // tests/approvals/accounts.algo.ts:14 + // tests/approvals/accounts.algo.ts:15 // totalAppsCreated: account.totalAppsCreated, frame_dig -2 acct_params_get AcctTotalAppsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:15 + // tests/approvals/accounts.algo.ts:16 // totalAppsOptedIn: account.totalAppsOptedIn, frame_dig -2 acct_params_get AcctTotalAppsOptedIn bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:16 + // tests/approvals/accounts.algo.ts:17 // totalAssetsCreated: account.totalAssetsCreated, frame_dig -2 acct_params_get AcctTotalAssetsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:17 + // tests/approvals/accounts.algo.ts:18 // totalAssets: account.totalAssets, frame_dig -2 acct_params_get AcctTotalAssets bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:18 + // tests/approvals/accounts.algo.ts:19 // totalBoxes: account.totalBoxes, frame_dig -2 acct_params_get AcctTotalBoxes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:19 + // tests/approvals/accounts.algo.ts:20 // totalBoxBytes: account.totalBoxBytes, frame_dig -2 acct_params_get AcctTotalBoxBytes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:8 + // tests/approvals/accounts.algo.ts:9 // balance: account.balance, frame_dig -2 acct_params_get AcctBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:9 + // tests/approvals/accounts.algo.ts:10 // minBalance: account.minBalance, frame_dig -2 acct_params_get AcctMinBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:10 + // tests/approvals/accounts.algo.ts:11 // authAddress: account.authAddress.bytes, frame_dig -2 acct_params_get AcctAuthAddr bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:11 + // tests/approvals/accounts.algo.ts:12 // totalNumUint: account.totalNumUint, frame_dig -2 acct_params_get AcctTotalNumUint bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:12 + // tests/approvals/accounts.algo.ts:13 // totalNumByteSlice: account.totalNumByteSlice, frame_dig -2 acct_params_get AcctTotalNumByteSlice bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:13 + // tests/approvals/accounts.algo.ts:14 // totalExtraAppPages: account.totalExtraAppPages, frame_dig -2 acct_params_get AcctTotalExtraAppPages bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:14 + // tests/approvals/accounts.algo.ts:15 // totalAppsCreated: account.totalAppsCreated, frame_dig -2 acct_params_get AcctTotalAppsCreated assert // account funded - // tests/approvals/accounts.algo.ts:15 + // tests/approvals/accounts.algo.ts:16 // totalAppsOptedIn: account.totalAppsOptedIn, frame_dig -2 acct_params_get AcctTotalAppsOptedIn bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:16 + // tests/approvals/accounts.algo.ts:17 // totalAssetsCreated: account.totalAssetsCreated, frame_dig -2 acct_params_get AcctTotalAssetsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:17 + // tests/approvals/accounts.algo.ts:18 // totalAssets: account.totalAssets, frame_dig -2 acct_params_get AcctTotalAssets bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:18 + // tests/approvals/accounts.algo.ts:19 // totalBoxes: account.totalBoxes, frame_dig -2 acct_params_get AcctTotalBoxes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:19 + // tests/approvals/accounts.algo.ts:20 // totalBoxBytes: account.totalBoxBytes, frame_dig -2 acct_params_get AcctTotalBoxBytes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:8 + // tests/approvals/accounts.algo.ts:9 // balance: account.balance, frame_dig -2 acct_params_get AcctBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:9 + // tests/approvals/accounts.algo.ts:10 // minBalance: account.minBalance, frame_dig -2 acct_params_get AcctMinBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:10 + // tests/approvals/accounts.algo.ts:11 // authAddress: account.authAddress.bytes, frame_dig -2 acct_params_get AcctAuthAddr bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:11 + // tests/approvals/accounts.algo.ts:12 // totalNumUint: account.totalNumUint, frame_dig -2 acct_params_get AcctTotalNumUint bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:12 + // tests/approvals/accounts.algo.ts:13 // totalNumByteSlice: account.totalNumByteSlice, frame_dig -2 acct_params_get AcctTotalNumByteSlice bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:13 + // tests/approvals/accounts.algo.ts:14 // totalExtraAppPages: account.totalExtraAppPages, frame_dig -2 acct_params_get AcctTotalExtraAppPages bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:14 + // tests/approvals/accounts.algo.ts:15 // totalAppsCreated: account.totalAppsCreated, frame_dig -2 acct_params_get AcctTotalAppsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:15 + // tests/approvals/accounts.algo.ts:16 // totalAppsOptedIn: account.totalAppsOptedIn, frame_dig -2 acct_params_get AcctTotalAppsOptedIn assert // account funded - // tests/approvals/accounts.algo.ts:16 + // tests/approvals/accounts.algo.ts:17 // totalAssetsCreated: account.totalAssetsCreated, frame_dig -2 acct_params_get AcctTotalAssetsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:17 + // tests/approvals/accounts.algo.ts:18 // totalAssets: account.totalAssets, frame_dig -2 acct_params_get AcctTotalAssets bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:18 + // tests/approvals/accounts.algo.ts:19 // totalBoxes: account.totalBoxes, frame_dig -2 acct_params_get AcctTotalBoxes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:19 + // tests/approvals/accounts.algo.ts:20 // totalBoxBytes: account.totalBoxBytes, frame_dig -2 acct_params_get AcctTotalBoxBytes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:8 + // tests/approvals/accounts.algo.ts:9 // balance: account.balance, frame_dig -2 acct_params_get AcctBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:9 + // tests/approvals/accounts.algo.ts:10 // minBalance: account.minBalance, frame_dig -2 acct_params_get AcctMinBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:10 + // tests/approvals/accounts.algo.ts:11 // authAddress: account.authAddress.bytes, frame_dig -2 acct_params_get AcctAuthAddr bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:11 + // tests/approvals/accounts.algo.ts:12 // totalNumUint: account.totalNumUint, frame_dig -2 acct_params_get AcctTotalNumUint bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:12 + // tests/approvals/accounts.algo.ts:13 // totalNumByteSlice: account.totalNumByteSlice, frame_dig -2 acct_params_get AcctTotalNumByteSlice bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:13 + // tests/approvals/accounts.algo.ts:14 // totalExtraAppPages: account.totalExtraAppPages, frame_dig -2 acct_params_get AcctTotalExtraAppPages bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:14 + // tests/approvals/accounts.algo.ts:15 // totalAppsCreated: account.totalAppsCreated, frame_dig -2 acct_params_get AcctTotalAppsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:15 + // tests/approvals/accounts.algo.ts:16 // totalAppsOptedIn: account.totalAppsOptedIn, frame_dig -2 acct_params_get AcctTotalAppsOptedIn bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:16 + // tests/approvals/accounts.algo.ts:17 // totalAssetsCreated: account.totalAssetsCreated, frame_dig -2 acct_params_get AcctTotalAssetsCreated assert // account funded - // tests/approvals/accounts.algo.ts:17 + // tests/approvals/accounts.algo.ts:18 // totalAssets: account.totalAssets, frame_dig -2 acct_params_get AcctTotalAssets bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:18 + // tests/approvals/accounts.algo.ts:19 // totalBoxes: account.totalBoxes, frame_dig -2 acct_params_get AcctTotalBoxes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:19 + // tests/approvals/accounts.algo.ts:20 // totalBoxBytes: account.totalBoxBytes, frame_dig -2 acct_params_get AcctTotalBoxBytes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:8 + // tests/approvals/accounts.algo.ts:9 // balance: account.balance, frame_dig -2 acct_params_get AcctBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:9 + // tests/approvals/accounts.algo.ts:10 // minBalance: account.minBalance, frame_dig -2 acct_params_get AcctMinBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:10 + // tests/approvals/accounts.algo.ts:11 // authAddress: account.authAddress.bytes, frame_dig -2 acct_params_get AcctAuthAddr bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:11 + // tests/approvals/accounts.algo.ts:12 // totalNumUint: account.totalNumUint, frame_dig -2 acct_params_get AcctTotalNumUint bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:12 + // tests/approvals/accounts.algo.ts:13 // totalNumByteSlice: account.totalNumByteSlice, frame_dig -2 acct_params_get AcctTotalNumByteSlice bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:13 + // tests/approvals/accounts.algo.ts:14 // totalExtraAppPages: account.totalExtraAppPages, frame_dig -2 acct_params_get AcctTotalExtraAppPages bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:14 + // tests/approvals/accounts.algo.ts:15 // totalAppsCreated: account.totalAppsCreated, frame_dig -2 acct_params_get AcctTotalAppsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:15 + // tests/approvals/accounts.algo.ts:16 // totalAppsOptedIn: account.totalAppsOptedIn, frame_dig -2 acct_params_get AcctTotalAppsOptedIn bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:16 + // tests/approvals/accounts.algo.ts:17 // totalAssetsCreated: account.totalAssetsCreated, frame_dig -2 acct_params_get AcctTotalAssetsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:17 + // tests/approvals/accounts.algo.ts:18 // totalAssets: account.totalAssets, frame_dig -2 acct_params_get AcctTotalAssets assert // account funded - // tests/approvals/accounts.algo.ts:18 + // tests/approvals/accounts.algo.ts:19 // totalBoxes: account.totalBoxes, frame_dig -2 acct_params_get AcctTotalBoxes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:19 + // tests/approvals/accounts.algo.ts:20 // totalBoxBytes: account.totalBoxBytes, frame_dig -2 acct_params_get AcctTotalBoxBytes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:8 + // tests/approvals/accounts.algo.ts:9 // balance: account.balance, frame_dig -2 acct_params_get AcctBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:9 + // tests/approvals/accounts.algo.ts:10 // minBalance: account.minBalance, frame_dig -2 acct_params_get AcctMinBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:10 + // tests/approvals/accounts.algo.ts:11 // authAddress: account.authAddress.bytes, frame_dig -2 acct_params_get AcctAuthAddr bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:11 + // tests/approvals/accounts.algo.ts:12 // totalNumUint: account.totalNumUint, frame_dig -2 acct_params_get AcctTotalNumUint bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:12 + // tests/approvals/accounts.algo.ts:13 // totalNumByteSlice: account.totalNumByteSlice, frame_dig -2 acct_params_get AcctTotalNumByteSlice bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:13 + // tests/approvals/accounts.algo.ts:14 // totalExtraAppPages: account.totalExtraAppPages, frame_dig -2 acct_params_get AcctTotalExtraAppPages bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:14 + // tests/approvals/accounts.algo.ts:15 // totalAppsCreated: account.totalAppsCreated, frame_dig -2 acct_params_get AcctTotalAppsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:15 + // tests/approvals/accounts.algo.ts:16 // totalAppsOptedIn: account.totalAppsOptedIn, frame_dig -2 acct_params_get AcctTotalAppsOptedIn bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:16 + // tests/approvals/accounts.algo.ts:17 // totalAssetsCreated: account.totalAssetsCreated, frame_dig -2 acct_params_get AcctTotalAssetsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:17 + // tests/approvals/accounts.algo.ts:18 // totalAssets: account.totalAssets, frame_dig -2 acct_params_get AcctTotalAssets bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:18 + // tests/approvals/accounts.algo.ts:19 // totalBoxes: account.totalBoxes, frame_dig -2 acct_params_get AcctTotalBoxes assert // account funded - // tests/approvals/accounts.algo.ts:19 + // tests/approvals/accounts.algo.ts:20 // totalBoxBytes: account.totalBoxBytes, frame_dig -2 acct_params_get AcctTotalBoxBytes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:8 + // tests/approvals/accounts.algo.ts:9 // balance: account.balance, frame_dig -2 acct_params_get AcctBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:9 + // tests/approvals/accounts.algo.ts:10 // minBalance: account.minBalance, frame_dig -2 acct_params_get AcctMinBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:10 + // tests/approvals/accounts.algo.ts:11 // authAddress: account.authAddress.bytes, frame_dig -2 acct_params_get AcctAuthAddr bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:11 + // tests/approvals/accounts.algo.ts:12 // totalNumUint: account.totalNumUint, frame_dig -2 acct_params_get AcctTotalNumUint bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:12 + // tests/approvals/accounts.algo.ts:13 // totalNumByteSlice: account.totalNumByteSlice, frame_dig -2 acct_params_get AcctTotalNumByteSlice bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:13 + // tests/approvals/accounts.algo.ts:14 // totalExtraAppPages: account.totalExtraAppPages, frame_dig -2 acct_params_get AcctTotalExtraAppPages bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:14 + // tests/approvals/accounts.algo.ts:15 // totalAppsCreated: account.totalAppsCreated, frame_dig -2 acct_params_get AcctTotalAppsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:15 + // tests/approvals/accounts.algo.ts:16 // totalAppsOptedIn: account.totalAppsOptedIn, frame_dig -2 acct_params_get AcctTotalAppsOptedIn bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:16 + // tests/approvals/accounts.algo.ts:17 // totalAssetsCreated: account.totalAssetsCreated, frame_dig -2 acct_params_get AcctTotalAssetsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:17 + // tests/approvals/accounts.algo.ts:18 // totalAssets: account.totalAssets, frame_dig -2 acct_params_get AcctTotalAssets bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:18 + // tests/approvals/accounts.algo.ts:19 // totalBoxes: account.totalBoxes, frame_dig -2 acct_params_get AcctTotalBoxes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:19 + // tests/approvals/accounts.algo.ts:20 // totalBoxBytes: account.totalBoxBytes, frame_dig -2 acct_params_get AcctTotalBoxBytes assert // account funded - // tests/approvals/accounts.algo.ts:8 + // tests/approvals/accounts.algo.ts:9 // balance: account.balance, frame_dig -2 acct_params_get AcctBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:9 + // tests/approvals/accounts.algo.ts:10 // minBalance: account.minBalance, frame_dig -2 acct_params_get AcctMinBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:10 + // tests/approvals/accounts.algo.ts:11 // authAddress: account.authAddress.bytes, frame_dig -2 acct_params_get AcctAuthAddr bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:11 + // tests/approvals/accounts.algo.ts:12 // totalNumUint: account.totalNumUint, frame_dig -2 acct_params_get AcctTotalNumUint bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:12 + // tests/approvals/accounts.algo.ts:13 // totalNumByteSlice: account.totalNumByteSlice, frame_dig -2 acct_params_get AcctTotalNumByteSlice bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:13 + // tests/approvals/accounts.algo.ts:14 // totalExtraAppPages: account.totalExtraAppPages, frame_dig -2 acct_params_get AcctTotalExtraAppPages bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:14 + // tests/approvals/accounts.algo.ts:15 // totalAppsCreated: account.totalAppsCreated, frame_dig -2 acct_params_get AcctTotalAppsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:15 + // tests/approvals/accounts.algo.ts:16 // totalAppsOptedIn: account.totalAppsOptedIn, frame_dig -2 acct_params_get AcctTotalAppsOptedIn bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:16 + // tests/approvals/accounts.algo.ts:17 // totalAssetsCreated: account.totalAssetsCreated, frame_dig -2 acct_params_get AcctTotalAssetsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:17 + // tests/approvals/accounts.algo.ts:18 // totalAssets: account.totalAssets, frame_dig -2 acct_params_get AcctTotalAssets bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:18 + // tests/approvals/accounts.algo.ts:19 // totalBoxes: account.totalBoxes, frame_dig -2 acct_params_get AcctTotalBoxes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:19 + // tests/approvals/accounts.algo.ts:20 // totalBoxBytes: account.totalBoxBytes, frame_dig -2 acct_params_get AcctTotalBoxBytes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:20 + // tests/approvals/accounts.algo.ts:21 // isOptInApp: account.isOptedIn(Global.currentApplicationId), global CurrentApplicationID frame_dig -2 swap app_opted_in - // tests/approvals/accounts.algo.ts:8 + // tests/approvals/accounts.algo.ts:9 // balance: account.balance, frame_dig -2 acct_params_get AcctBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:9 + // tests/approvals/accounts.algo.ts:10 // minBalance: account.minBalance, frame_dig -2 acct_params_get AcctMinBalance bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:10 + // tests/approvals/accounts.algo.ts:11 // authAddress: account.authAddress.bytes, frame_dig -2 acct_params_get AcctAuthAddr bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:11 + // tests/approvals/accounts.algo.ts:12 // totalNumUint: account.totalNumUint, frame_dig -2 acct_params_get AcctTotalNumUint bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:12 + // tests/approvals/accounts.algo.ts:13 // totalNumByteSlice: account.totalNumByteSlice, frame_dig -2 acct_params_get AcctTotalNumByteSlice bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:13 + // tests/approvals/accounts.algo.ts:14 // totalExtraAppPages: account.totalExtraAppPages, frame_dig -2 acct_params_get AcctTotalExtraAppPages bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:14 + // tests/approvals/accounts.algo.ts:15 // totalAppsCreated: account.totalAppsCreated, frame_dig -2 acct_params_get AcctTotalAppsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:15 + // tests/approvals/accounts.algo.ts:16 // totalAppsOptedIn: account.totalAppsOptedIn, frame_dig -2 acct_params_get AcctTotalAppsOptedIn bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:16 + // tests/approvals/accounts.algo.ts:17 // totalAssetsCreated: account.totalAssetsCreated, frame_dig -2 acct_params_get AcctTotalAssetsCreated bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:17 + // tests/approvals/accounts.algo.ts:18 // totalAssets: account.totalAssets, frame_dig -2 acct_params_get AcctTotalAssets bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:18 + // tests/approvals/accounts.algo.ts:19 // totalBoxes: account.totalBoxes, frame_dig -2 acct_params_get AcctTotalBoxes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:19 + // tests/approvals/accounts.algo.ts:20 // totalBoxBytes: account.totalBoxBytes, frame_dig -2 acct_params_get AcctTotalBoxBytes bury 1 assert // account funded - // tests/approvals/accounts.algo.ts:21 + // tests/approvals/accounts.algo.ts:22 // isOptInAsset: account.isOptedIn(asset), frame_dig -2 frame_dig -1 asset_holding_get AssetBalance bury 1 - // tests/approvals/accounts.algo.ts:6-22 + // tests/approvals/accounts.algo.ts:7-23 // return { // bytes: account.bytes, // balance: account.balance, @@ -1333,3 +1339,50 @@ __algots__.defaultCreate: // export class AccountsContract extends Contract { proto 0 0 retsub + + +// _puya_lib.util.ensure_budget(required_budget: uint64, fee_source: uint64) -> void: +ensure_budget: + proto 2 0 + frame_dig -2 + pushint 10 // 10 + + + +ensure_budget_while_top@1: + global OpcodeBudget + frame_dig 0 + < + bz ensure_budget_after_while@7 + itxn_begin + pushint 6 // appl + itxn_field TypeEnum + pushint 5 // DeleteApplication + itxn_field OnCompletion + bytec_1 // 0x068101 + itxn_field ApprovalProgram + bytec_1 // 0x068101 + itxn_field ClearStateProgram + intc_0 // 0 + intc_1 // 1 + frame_dig -1 + match ensure_budget_switch_case_0@3 ensure_budget_switch_case_1@4 + b ensure_budget_switch_case_default@5 + +ensure_budget_switch_case_0@3: + intc_0 // 0 + itxn_field Fee + b ensure_budget_switch_case_next@6 + +ensure_budget_switch_case_1@4: + global MinTxnFee + itxn_field Fee + b ensure_budget_switch_case_next@6 + +ensure_budget_switch_case_default@5: + +ensure_budget_switch_case_next@6: + itxn_submit + b ensure_budget_while_top@1 + +ensure_budget_after_while@7: + retsub diff --git a/tests/approvals/out/accounts/AccountsContract.arc32.json b/tests/approvals/out/accounts/AccountsContract.arc32.json index 8985b083..451e0815 100644 --- a/tests/approvals/out/accounts/AccountsContract.arc32.json +++ b/tests/approvals/out/accounts/AccountsContract.arc32.json @@ -74,7 +74,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo6QWNjb3VudHNDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCA5MyAxCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fYWZ0ZXJfaWZfZWxzZUAyCiAgICBjYWxsc3ViIGNvbnN0cnVjdG9yCgptYWluX2FmdGVyX2lmX2Vsc2VAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RzL2FwcHJvdmFscy9hY2NvdW50cy5hbGdvLnRzOjpBY2NvdW50c0NvbnRyYWN0LmNvbnN0cnVjdG9yKCkgLT4gdm9pZDoKY29uc3RydWN0b3I6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo0CiAgICAvLyBleHBvcnQgY2xhc3MgQWNjb3VudHNDb250cmFjdCBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCgoKLy8gdGVzdHMvYXBwcm92YWxzL2FjY291bnRzLmFsZ28udHM6OkFjY291bnRzQ29udHJhY3QuX19wdXlhX2FyYzRfcm91dGVyX18oKSAtPiB1aW50NjQ6Cl9fcHV5YV9hcmM0X3JvdXRlcl9fOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FjY291bnRzLmFsZ28udHM6NAogICAgLy8gZXhwb3J0IGNsYXNzIEFjY291bnRzQ29udHJhY3QgZXh0ZW5kcyBDb250cmFjdCB7CiAg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IHsKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDEKICAgIGJ0b2kKICAgIHR4bmFzIEFjY291bnRzCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAyCiAgICBidG9pCiAgICB0eG5hcyBBc3NldHMKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hY2NvdW50cy5hbGdvLnRzOjUKICAgIC8vIHB1YmxpYyBnZXRBY2NvdW50SW5mbyhhY2NvdW50OiBBY2NvdW50LCBhc3NldDogQXNzZXQpIHsKICAgIGNhbGxzdWIgZ2V0QWNjb3VudEluZm8KICAgIGNvdmVyIDE0CiAgICBjb3ZlciAxMwogICAgY292ZXIgMTIKICAgIGNvdmVyIDExCiAgICBjb3ZlciAxMAogICAgY292ZXIgOQogICAgY292ZXIgOAogICAgY292ZXIgNwogICAgY292ZXIgNgogICAgY292ZXIgNQogICAgY292ZXIgNAogICAgY292ZXIgMwogICAgY292ZXIgMgogICAgc3dhcAogICAgZHVwCiAgICBsZW4KICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBzd2FwCiAgICBjb25jYXQKICAgIGNvdmVyIDExCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgaXRvYgogICAgY292ZXIgMTIKICAgIGR1cAogICAgbGVuCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgc3dhcAogICAgY29uY2F0CiAgICBjb3ZlciAxNAogICAgaXRvYgogICAgY292ZXIgOQogICAgaXRvYgogICAgY292ZXIgMTAKICAgIGl0b2IKICAgIGNvdmVyIDExCiAgICBpdG9iCiAgICBjb3ZlciAxMQogICAgaXRvYgogICAgY292ZXIgMTIKICAgIGl0b2IKICAgIGNvdmVyIDEyCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgaXRvYgogICAgY292ZXIgMTIKICAgIHN3YXAKICAgIGl0b2IKICAgIGNvdmVyIDEyCiAgICBwdXNoYnl0ZXMgMHgwMAogICAgaW50Y18wIC8vIDAKICAgIHVuY292ZXIgOQogICAgc2V0Yml0CiAgICBjb3ZlciAxMQogICAgcHVzaGJ5dGVzIDB4MDAKICAgIGludGNfMCAvLyAwCiAgICB1bmNvdmVyIDE1CiAgICBzZXRiaXQKICAgIGNvdmVyIDkKICAgIGludGNfMSAvLyA5MwogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIHB1c2hieXRlcyAweAogICAgc3dhcAogICAgY29uY2F0CiAgICBkaWcgMQogICAgbGVuCiAgICBpbnRjXzEgLy8gOTMKICAgICsKICAgIHN3YXAKICAgIHVuY292ZXIgNAogICAgY29uY2F0CiAgICB1bmNvdmVyIDUKICAgIGNvbmNhdAogICAgc3dhcAogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGNvbmNhdAogICAgdW5jb3ZlciAyCiAgICBjb25jYXQKICAgIHVuY292ZXIgMgogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmNhdAogICAgdW5jb3ZlciAyCiAgICBjb25jYXQKICAgIHVuY292ZXIgMgogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmNhdAogICAgdW5jb3ZlciAzCiAgICBjb25jYXQKICAgIHVuY292ZXIgMwogICAgY29uY2F0CiAgICB1bmNvdmVyIDQKICAgIGNvbmNhdAogICAgdW5jb3ZlciAzCiAgICBjb25jYXQKICAgIHVuY292ZXIgMgogICAgaW50Y18wIC8vIDAKICAgIGdldGJpdAogICAgc3dhcAogICAgcHVzaGludCA3MzcgLy8gNzM3CiAgICB1bmNvdmVyIDIKICAgIHNldGJpdAogICAgc3dhcAogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIHB1c2hieXRlcyAweDE1MWY3Yzc1CiAgICBzd2FwCiAgICBjb25jYXQKICAgIGxvZwogICAgaW50Y18yIC8vIDEKICAgIHJldHN1YgoKX19wdXlhX2FyYzRfcm91dGVyX19fc3dpdGNoX2Nhc2VfZGVmYXVsdEAzOgogICAgYiBfX3B1eWFfYXJjNF9yb3V0ZXJf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gIGxlbgogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIHN3YXAKICAgIGNvbmNhdAogICAgY292ZXIgMTEKICAgIGl0b2IKICAgIGNvdmVyIDEyCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgZHVwCiAgICBsZW4KICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBzd2FwCiAgICBjb25jYXQKICAgIGNvdmVyIDE0CiAgICBpdG9iCiAgICBjb3ZlciA5CiAgICBpdG9iCiAgICBjb3ZlciAxMAogICAgaXRvYgogICAgY292ZXIgMTEKICAgIGl0b2IKICAgIGNvdmVyIDExCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgaXRvYgogICAgY292ZXIgMTIKICAgIGl0b2IKICAgIGNvdmVyIDEyCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgc3dhcAogICAgaXRvYgogICAgY292ZXIgMTIKICAgIGJ5dGVjXzAgLy8gMHgwMAogICAgaW50Y18wIC8vIDAKICAgIHVuY292ZXIgOQogICAgc2V0Yml0CiAgICBjb3ZlciAxMQogICAgYnl0ZWNfMCAvLyAweDAwCiAgICBpbnRjXzAgLy8gMAogICAgdW5jb3ZlciAxNQogICAgc2V0Yml0CiAgICBjb3ZlciA5CiAgICBpbnRjXzIgLy8gOTMKICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBwdXNoYnl0ZXMgMHgKICAgIHN3YXAKICAgIGNvbmNhdAogICAgZGlnIDEKICAgIGxlbgogICAgaW50Y18yIC8vIDkzCiAgICArCiAgICBzd2FwCiAgICB1bmNvdmVyIDQKICAgIGNvbmNhdAogICAgdW5jb3ZlciA1CiAgICBjb25jYXQKICAgIHN3YXAKICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBjb25jYXQKICAgIHVuY292ZXIgMgogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmNhdAogICAgdW5jb3ZlciAyCiAgICBjb25jYXQKICAgIHVuY292ZXIgM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ZGdldF9zd2l0Y2hfY2FzZV8wQDMgZW5zdXJlX2J1ZGdldF9zd2l0Y2hfY2FzZV8xQDQKICAgIGIgZW5zdXJlX2J1ZGdldF9zd2l0Y2hfY2FzZV9kZWZhdWx0QDUKCmVuc3VyZV9idWRnZXRfc3dpdGNoX2Nhc2VfMEAzOgogICAgaW50Y18wIC8vIDAKICAgIGl0eG5fZmllbGQgRmVlCiAgICBiIGVuc3VyZV9idWRnZXRfc3dpdGNoX2Nhc2VfbmV4dEA2CgplbnN1cmVfYnVkZ2V0X3N3aXRjaF9jYXNlXzFANDoKICAgIGdsb2JhbCBNaW5UeG5GZWUKICAgIGl0eG5fZmllbGQgRmVlCiAgICBiIGVuc3VyZV9idWRnZXRfc3dpdGNoX2Nhc2VfbmV4dEA2CgplbnN1cmVfYnVkZ2V0X3N3aXRjaF9jYXNlX2RlZmF1bHRANToKCmVuc3VyZV9idWRnZXRfc3dpdGNoX2Nhc2VfbmV4dEA2OgogICAgaXR4bl9zdWJtaXQKICAgIGIgZW5zdXJlX2J1ZGdldF93aGlsZV90b3BAMQoKZW5zdXJlX2J1ZGdldF9hZnRlcl93aGlsZUA3OgogICAgcmV0c3ViCg==", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo6QWNjb3VudHNDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/accounts/accounts.awst b/tests/approvals/out/accounts/accounts.awst index 2cb08341..db633ac2 100644 --- a/tests/approvals/out/accounts/accounts.awst +++ b/tests/approvals/out/accounts/accounts.awst @@ -15,6 +15,7 @@ contract AccountsContract getAccountInfo(): getAccountInfoResult{ bytes: bytes, balance: uint64, minBalance: uint64, authAddress: bytes, totalNumUint: uint64, totalNumByteSlice: uint64, totalExtraAppPages: uint64, totalAppsCreated: uint64, totalAppsOptedIn: uint64, totalAssetsCreated: uint64, totalAssets: uint64, totalBoxes: uint64, totalBoxBytes: uint64, isOptInApp: bool, isOptInAsset: bool } { + ensure_budget(1400, 0) return { bytes: (#0 = { bytes: reinterpret_cast(account), balance: checked_maybe(acct_params_get(account), comment=account funded), minBalance: checked_maybe(acct_params_get(account), comment=account funded), authAddress: reinterpret_cast(checked_maybe(acct_params_get(account), comment=account funded)), totalNumUint: checked_maybe(acct_params_get(account), comment=account funded), totalNumByteSlice: checked_maybe(acct_params_get(account), comment=account funded), totalExtraAppPages: checked_maybe(acct_params_get(account), comment=account funded), totalAppsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAppsOptedIn: checked_maybe(acct_params_get(account), comment=account funded), totalAssetsCreated: checked_maybe(acct_params_get(account), comment=account funded), totalAssets: checked_maybe(acct_params_get(account), comment=account funded), totalBoxes: checked_maybe(acct_params_get(account), comment=account funded), totalBoxBytes: checked_maybe(acct_params_get(account), comment=account funded), isOptInApp: app_opted_in(account, global()), isOptInAsset: asset_holding_get(account, asset).1 }).bytes, balance: #0.balance, minBalance: #0.minBalance, authAddress: #0.authAddress, totalNumUint: #0.totalNumUint, totalNumByteSlice: #0.totalNumByteSlice, totalExtraAppPages: #0.totalExtraAppPages, totalAppsCreated: #0.totalAppsCreated, totalAppsOptedIn: #0.totalAppsOptedIn, totalAssetsCreated: #0.totalAssetsCreated, totalAssets: #0.totalAssets, totalBoxes: #0.totalBoxes, totalBoxBytes: #0.totalBoxBytes, isOptInApp: #0.isOptInApp, isOptInAsset: #0.isOptInAsset } } diff --git a/tests/approvals/out/accounts/accounts.awst.json b/tests/approvals/out/accounts/accounts.awst.json index b6d34727..b290e39d 100644 --- a/tests/approvals/out/accounts/accounts.awst.json +++ b/tests/approvals/out/accounts/accounts.awst.json @@ -480,17 +480,93 @@ "source_location": { "file": "tests/approvals/accounts.algo.ts", "line": 5, - "end_line": 23, + "end_line": 24, "column": 56, "end_column": 3 }, "body": [ { - "_type": "ReturnStatement", + "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/accounts.algo.ts", "line": 6, - "end_line": 22, + "end_line": 6, + "column": 4, + "end_column": 22 + }, + "expr": { + "_type": "PuyaLibCall", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 6, + "column": 4, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "func": "ensure_budget", + "args": [ + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 6, + "column": 17, + "end_column": 21 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1400", + "teal_alias": null + } + }, + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 6, + "end_line": 6, + "column": 4, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + } + } + ] + } + }, + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/accounts.algo.ts", + "line": 7, + "end_line": 23, "column": 4, "end_column": 5 }, @@ -498,8 +574,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -639,8 +715,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -655,8 +731,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -795,8 +871,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -936,8 +1012,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 26 }, @@ -952,8 +1028,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 20 }, @@ -971,8 +1047,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -987,8 +1063,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -1024,8 +1100,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 22 }, @@ -1047,8 +1123,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -1063,8 +1139,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -1100,8 +1176,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 25 }, @@ -1123,8 +1199,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 44 }, @@ -1139,8 +1215,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -1155,8 +1231,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -1192,8 +1268,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 26 }, @@ -1216,8 +1292,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -1232,8 +1308,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -1269,8 +1345,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 27 }, @@ -1292,8 +1368,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -1308,8 +1384,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -1345,8 +1421,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 32 }, @@ -1368,8 +1444,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -1384,8 +1460,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -1421,8 +1497,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 33 }, @@ -1444,8 +1520,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -1460,8 +1536,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -1497,8 +1573,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 31 }, @@ -1520,8 +1596,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -1536,8 +1612,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -1573,8 +1649,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 31 }, @@ -1596,8 +1672,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -1612,8 +1688,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -1649,8 +1725,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 33 }, @@ -1672,8 +1748,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -1688,8 +1764,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -1725,8 +1801,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 26 }, @@ -1748,8 +1824,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -1764,8 +1840,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -1801,8 +1877,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 25 }, @@ -1824,8 +1900,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -1840,8 +1916,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -1877,8 +1953,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 28 }, @@ -1900,8 +1976,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 64 }, @@ -1919,8 +1995,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 25 }, @@ -1937,8 +2013,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 36, "end_column": 63 }, @@ -1963,8 +2039,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -1979,8 +2055,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -2016,8 +2092,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 27 }, @@ -2034,8 +2110,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 38, "end_column": 43 }, @@ -2063,8 +2139,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -2079,8 +2155,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -2219,8 +2295,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -2360,8 +2436,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 26 }, @@ -2376,8 +2452,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 20 }, @@ -2395,8 +2471,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -2411,8 +2487,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -2448,8 +2524,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 22 }, @@ -2471,8 +2547,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -2487,8 +2563,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -2524,8 +2600,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 25 }, @@ -2547,8 +2623,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 44 }, @@ -2563,8 +2639,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -2579,8 +2655,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -2616,8 +2692,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 26 }, @@ -2640,8 +2716,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -2656,8 +2732,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -2693,8 +2769,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 27 }, @@ -2716,8 +2792,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -2732,8 +2808,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -2769,8 +2845,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 32 }, @@ -2792,8 +2868,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -2808,8 +2884,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -2845,8 +2921,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 33 }, @@ -2868,8 +2944,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -2884,8 +2960,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -2921,8 +2997,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 31 }, @@ -2944,8 +3020,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -2960,8 +3036,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -2997,8 +3073,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 31 }, @@ -3020,8 +3096,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -3036,8 +3112,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -3073,8 +3149,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 33 }, @@ -3096,8 +3172,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -3112,8 +3188,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -3149,8 +3225,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 26 }, @@ -3172,8 +3248,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -3188,8 +3264,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -3225,8 +3301,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 25 }, @@ -3248,8 +3324,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -3264,8 +3340,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -3301,8 +3377,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 28 }, @@ -3324,8 +3400,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 64 }, @@ -3343,8 +3419,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 25 }, @@ -3361,8 +3437,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 36, "end_column": 63 }, @@ -3387,8 +3463,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -3403,8 +3479,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -3440,8 +3516,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 27 }, @@ -3458,8 +3534,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 38, "end_column": 43 }, @@ -3487,8 +3563,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -3503,8 +3579,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -3643,8 +3719,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -3784,8 +3860,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 26 }, @@ -3800,8 +3876,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 20 }, @@ -3819,8 +3895,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -3835,8 +3911,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -3872,8 +3948,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 22 }, @@ -3895,8 +3971,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -3911,8 +3987,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -3948,8 +4024,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 25 }, @@ -3971,8 +4047,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 44 }, @@ -3987,8 +4063,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -4003,8 +4079,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -4040,8 +4116,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 26 }, @@ -4064,8 +4140,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -4080,8 +4156,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -4117,8 +4193,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 27 }, @@ -4140,8 +4216,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -4156,8 +4232,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -4193,8 +4269,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 32 }, @@ -4216,8 +4292,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -4232,8 +4308,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -4269,8 +4345,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 33 }, @@ -4292,8 +4368,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -4308,8 +4384,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -4345,8 +4421,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 31 }, @@ -4368,8 +4444,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -4384,8 +4460,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -4421,8 +4497,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 31 }, @@ -4444,8 +4520,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -4460,8 +4536,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -4497,8 +4573,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 33 }, @@ -4520,8 +4596,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -4536,8 +4612,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -4573,8 +4649,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 26 }, @@ -4596,8 +4672,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -4612,8 +4688,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -4649,8 +4725,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 25 }, @@ -4672,8 +4748,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -4688,8 +4764,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -4725,8 +4801,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 28 }, @@ -4748,8 +4824,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 64 }, @@ -4767,8 +4843,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 25 }, @@ -4785,8 +4861,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 36, "end_column": 63 }, @@ -4811,8 +4887,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -4827,8 +4903,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -4864,8 +4940,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 27 }, @@ -4882,8 +4958,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 38, "end_column": 43 }, @@ -4911,8 +4987,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -4927,8 +5003,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -5067,8 +5143,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -5208,8 +5284,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 26 }, @@ -5224,8 +5300,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 20 }, @@ -5243,8 +5319,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -5259,8 +5335,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -5296,8 +5372,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 22 }, @@ -5319,8 +5395,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -5335,8 +5411,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -5372,8 +5448,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 25 }, @@ -5395,8 +5471,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 44 }, @@ -5411,8 +5487,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -5427,8 +5503,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -5464,8 +5540,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 26 }, @@ -5488,8 +5564,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -5504,8 +5580,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -5541,8 +5617,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 27 }, @@ -5564,8 +5640,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -5580,8 +5656,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -5617,8 +5693,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 32 }, @@ -5640,8 +5716,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -5656,8 +5732,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -5693,8 +5769,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 33 }, @@ -5716,8 +5792,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -5732,8 +5808,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -5769,8 +5845,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 31 }, @@ -5792,8 +5868,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -5808,8 +5884,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -5845,8 +5921,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 31 }, @@ -5868,8 +5944,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -5884,8 +5960,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -5921,8 +5997,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 33 }, @@ -5944,8 +6020,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -5960,8 +6036,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -5997,8 +6073,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 26 }, @@ -6020,8 +6096,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -6036,8 +6112,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -6073,8 +6149,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 25 }, @@ -6096,8 +6172,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -6112,8 +6188,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -6149,8 +6225,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 28 }, @@ -6172,8 +6248,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 64 }, @@ -6191,8 +6267,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 25 }, @@ -6209,8 +6285,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 36, "end_column": 63 }, @@ -6235,8 +6311,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -6251,8 +6327,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -6288,8 +6364,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 27 }, @@ -6306,8 +6382,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 38, "end_column": 43 }, @@ -6335,8 +6411,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -6351,8 +6427,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -6491,8 +6567,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -6632,8 +6708,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 26 }, @@ -6648,8 +6724,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 20 }, @@ -6667,8 +6743,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -6683,8 +6759,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -6720,8 +6796,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 22 }, @@ -6743,8 +6819,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -6759,8 +6835,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -6796,8 +6872,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 25 }, @@ -6819,8 +6895,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 44 }, @@ -6835,8 +6911,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -6851,8 +6927,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -6888,8 +6964,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 26 }, @@ -6912,8 +6988,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -6928,8 +7004,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -6965,8 +7041,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 27 }, @@ -6988,8 +7064,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -7004,8 +7080,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -7041,8 +7117,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 32 }, @@ -7064,8 +7140,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -7080,8 +7156,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -7117,8 +7193,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 33 }, @@ -7140,8 +7216,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -7156,8 +7232,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -7193,8 +7269,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 31 }, @@ -7216,8 +7292,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -7232,8 +7308,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -7269,8 +7345,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 31 }, @@ -7292,8 +7368,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -7308,8 +7384,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -7345,8 +7421,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 33 }, @@ -7368,8 +7444,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -7384,8 +7460,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -7421,8 +7497,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 26 }, @@ -7444,8 +7520,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -7460,8 +7536,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -7497,8 +7573,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 25 }, @@ -7520,8 +7596,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -7536,8 +7612,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -7573,8 +7649,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 28 }, @@ -7596,8 +7672,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 64 }, @@ -7615,8 +7691,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 25 }, @@ -7633,8 +7709,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 36, "end_column": 63 }, @@ -7659,8 +7735,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -7675,8 +7751,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -7712,8 +7788,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 27 }, @@ -7730,8 +7806,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 38, "end_column": 43 }, @@ -7759,8 +7835,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -7775,8 +7851,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -7915,8 +7991,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -8056,8 +8132,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 26 }, @@ -8072,8 +8148,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 20 }, @@ -8091,8 +8167,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -8107,8 +8183,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -8144,8 +8220,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 22 }, @@ -8167,8 +8243,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -8183,8 +8259,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -8220,8 +8296,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 25 }, @@ -8243,8 +8319,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 44 }, @@ -8259,8 +8335,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -8275,8 +8351,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -8312,8 +8388,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 26 }, @@ -8336,8 +8412,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -8352,8 +8428,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -8389,8 +8465,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 27 }, @@ -8412,8 +8488,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -8428,8 +8504,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -8465,8 +8541,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 32 }, @@ -8488,8 +8564,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -8504,8 +8580,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -8541,8 +8617,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 33 }, @@ -8564,8 +8640,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -8580,8 +8656,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -8617,8 +8693,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 31 }, @@ -8640,8 +8716,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -8656,8 +8732,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -8693,8 +8769,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 31 }, @@ -8716,8 +8792,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -8732,8 +8808,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -8769,8 +8845,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 33 }, @@ -8792,8 +8868,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -8808,8 +8884,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -8845,8 +8921,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 26 }, @@ -8868,8 +8944,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -8884,8 +8960,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -8921,8 +8997,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 25 }, @@ -8944,8 +9020,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -8960,8 +9036,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -8997,8 +9073,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 28 }, @@ -9020,8 +9096,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 64 }, @@ -9039,8 +9115,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 25 }, @@ -9057,8 +9133,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 36, "end_column": 63 }, @@ -9083,8 +9159,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -9099,8 +9175,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -9136,8 +9212,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 27 }, @@ -9154,8 +9230,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 38, "end_column": 43 }, @@ -9183,8 +9259,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -9199,8 +9275,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -9339,8 +9415,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -9480,8 +9556,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 26 }, @@ -9496,8 +9572,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 20 }, @@ -9515,8 +9591,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -9531,8 +9607,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -9568,8 +9644,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 22 }, @@ -9591,8 +9667,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -9607,8 +9683,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -9644,8 +9720,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 25 }, @@ -9667,8 +9743,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 44 }, @@ -9683,8 +9759,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -9699,8 +9775,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -9736,8 +9812,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 26 }, @@ -9760,8 +9836,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -9776,8 +9852,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -9813,8 +9889,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 27 }, @@ -9836,8 +9912,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -9852,8 +9928,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -9889,8 +9965,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 32 }, @@ -9912,8 +9988,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -9928,8 +10004,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -9965,8 +10041,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 33 }, @@ -9988,8 +10064,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -10004,8 +10080,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -10041,8 +10117,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 31 }, @@ -10064,8 +10140,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -10080,8 +10156,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -10117,8 +10193,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 31 }, @@ -10140,8 +10216,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -10156,8 +10232,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -10193,8 +10269,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 33 }, @@ -10216,8 +10292,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -10232,8 +10308,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -10269,8 +10345,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 26 }, @@ -10292,8 +10368,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -10308,8 +10384,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -10345,8 +10421,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 25 }, @@ -10368,8 +10444,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -10384,8 +10460,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -10421,8 +10497,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 28 }, @@ -10444,8 +10520,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 64 }, @@ -10463,8 +10539,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 25 }, @@ -10481,8 +10557,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 36, "end_column": 63 }, @@ -10507,8 +10583,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -10523,8 +10599,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -10560,8 +10636,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 27 }, @@ -10578,8 +10654,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 38, "end_column": 43 }, @@ -10607,8 +10683,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -10623,8 +10699,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -10763,8 +10839,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -10904,8 +10980,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 26 }, @@ -10920,8 +10996,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 20 }, @@ -10939,8 +11015,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -10955,8 +11031,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -10992,8 +11068,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 22 }, @@ -11015,8 +11091,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -11031,8 +11107,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -11068,8 +11144,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 25 }, @@ -11091,8 +11167,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 44 }, @@ -11107,8 +11183,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -11123,8 +11199,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -11160,8 +11236,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 26 }, @@ -11184,8 +11260,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -11200,8 +11276,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -11237,8 +11313,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 27 }, @@ -11260,8 +11336,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -11276,8 +11352,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -11313,8 +11389,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 32 }, @@ -11336,8 +11412,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -11352,8 +11428,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -11389,8 +11465,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 33 }, @@ -11412,8 +11488,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -11428,8 +11504,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -11465,8 +11541,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 31 }, @@ -11488,8 +11564,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -11504,8 +11580,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -11541,8 +11617,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 31 }, @@ -11564,8 +11640,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -11580,8 +11656,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -11617,8 +11693,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 33 }, @@ -11640,8 +11716,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -11655,9 +11731,9 @@ "expr": { "_type": "IntrinsicCall", "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "file": "tests/approvals/accounts.algo.ts", + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -11693,8 +11769,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 26 }, @@ -11716,8 +11792,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -11732,8 +11808,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -11769,8 +11845,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 25 }, @@ -11792,8 +11868,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -11808,8 +11884,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -11845,8 +11921,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 28 }, @@ -11868,8 +11944,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 64 }, @@ -11887,8 +11963,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 25 }, @@ -11905,8 +11981,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 36, "end_column": 63 }, @@ -11931,8 +12007,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -11947,8 +12023,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -11984,8 +12060,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 27 }, @@ -12002,8 +12078,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 38, "end_column": 43 }, @@ -12031,8 +12107,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -12047,8 +12123,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -12187,8 +12263,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -12328,8 +12404,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 26 }, @@ -12344,8 +12420,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 20 }, @@ -12363,8 +12439,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -12379,8 +12455,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -12416,8 +12492,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 22 }, @@ -12439,8 +12515,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -12455,8 +12531,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -12492,8 +12568,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 25 }, @@ -12515,8 +12591,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 44 }, @@ -12531,8 +12607,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -12547,8 +12623,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -12584,8 +12660,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 26 }, @@ -12608,8 +12684,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -12624,8 +12700,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -12661,8 +12737,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 27 }, @@ -12684,8 +12760,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -12700,8 +12776,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -12737,8 +12813,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 32 }, @@ -12760,8 +12836,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -12776,8 +12852,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -12813,8 +12889,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 33 }, @@ -12836,8 +12912,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -12852,8 +12928,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -12889,8 +12965,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 31 }, @@ -12912,8 +12988,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -12928,8 +13004,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -12965,8 +13041,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 31 }, @@ -12988,8 +13064,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -13004,8 +13080,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -13041,8 +13117,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 33 }, @@ -13064,8 +13140,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -13080,8 +13156,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -13117,8 +13193,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 26 }, @@ -13140,8 +13216,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -13156,8 +13232,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -13193,8 +13269,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 25 }, @@ -13216,8 +13292,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -13232,8 +13308,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -13269,8 +13345,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 28 }, @@ -13292,8 +13368,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 64 }, @@ -13311,8 +13387,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 25 }, @@ -13329,8 +13405,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 36, "end_column": 63 }, @@ -13355,8 +13431,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -13371,8 +13447,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -13408,8 +13484,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 27 }, @@ -13426,8 +13502,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 38, "end_column": 43 }, @@ -13455,8 +13531,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -13471,8 +13547,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -13611,8 +13687,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -13752,8 +13828,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 26 }, @@ -13768,8 +13844,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 20 }, @@ -13787,8 +13863,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -13803,8 +13879,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -13840,8 +13916,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 22 }, @@ -13863,8 +13939,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -13879,8 +13955,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -13916,8 +13992,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 25 }, @@ -13939,8 +14015,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 44 }, @@ -13955,8 +14031,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -13971,8 +14047,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -14008,8 +14084,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 26 }, @@ -14032,8 +14108,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -14048,8 +14124,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -14085,8 +14161,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 27 }, @@ -14108,8 +14184,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -14124,8 +14200,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -14161,8 +14237,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 32 }, @@ -14184,8 +14260,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -14200,8 +14276,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -14237,8 +14313,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 33 }, @@ -14260,8 +14336,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -14276,8 +14352,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -14313,8 +14389,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 31 }, @@ -14335,9 +14411,9 @@ { "_type": "CheckedMaybe", "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "file": "tests/approvals/accounts.algo.ts", + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -14352,8 +14428,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -14389,8 +14465,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 31 }, @@ -14412,8 +14488,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -14428,8 +14504,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -14465,8 +14541,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 33 }, @@ -14488,8 +14564,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -14504,8 +14580,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -14541,8 +14617,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 26 }, @@ -14564,8 +14640,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -14580,8 +14656,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -14617,8 +14693,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 25 }, @@ -14640,8 +14716,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -14656,8 +14732,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -14693,8 +14769,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 28 }, @@ -14716,8 +14792,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 64 }, @@ -14735,8 +14811,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 25 }, @@ -14753,8 +14829,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 36, "end_column": 63 }, @@ -14779,8 +14855,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -14795,8 +14871,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -14832,8 +14908,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 27 }, @@ -14850,8 +14926,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 38, "end_column": 43 }, @@ -14879,8 +14955,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -14895,8 +14971,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -15035,8 +15111,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -15176,8 +15252,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 26 }, @@ -15192,8 +15268,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 20 }, @@ -15211,8 +15287,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -15227,8 +15303,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -15264,8 +15340,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 22 }, @@ -15287,8 +15363,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -15303,8 +15379,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -15340,8 +15416,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 25 }, @@ -15363,8 +15439,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 44 }, @@ -15379,8 +15455,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -15395,8 +15471,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -15432,8 +15508,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 26 }, @@ -15456,8 +15532,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -15472,8 +15548,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -15509,8 +15585,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 27 }, @@ -15532,8 +15608,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -15548,8 +15624,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -15585,8 +15661,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 32 }, @@ -15608,8 +15684,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -15624,8 +15700,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -15661,8 +15737,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 33 }, @@ -15684,8 +15760,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -15700,8 +15776,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -15737,8 +15813,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 31 }, @@ -15760,8 +15836,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -15776,8 +15852,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -15813,8 +15889,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 31 }, @@ -15836,8 +15912,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -15852,8 +15928,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -15889,8 +15965,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 33 }, @@ -15912,8 +15988,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -15928,8 +16004,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -15965,8 +16041,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 26 }, @@ -15988,8 +16064,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -16004,8 +16080,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -16041,8 +16117,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 25 }, @@ -16064,8 +16140,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -16080,8 +16156,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -16117,8 +16193,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 28 }, @@ -16140,8 +16216,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 64 }, @@ -16159,8 +16235,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 25 }, @@ -16177,8 +16253,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 36, "end_column": 63 }, @@ -16203,8 +16279,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -16219,8 +16295,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -16256,8 +16332,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 27 }, @@ -16274,8 +16350,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 38, "end_column": 43 }, @@ -16303,8 +16379,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -16319,8 +16395,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -16459,8 +16535,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -16600,8 +16676,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 26 }, @@ -16616,8 +16692,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 20 }, @@ -16635,8 +16711,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -16651,8 +16727,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -16688,8 +16764,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 22 }, @@ -16711,8 +16787,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -16727,8 +16803,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -16764,8 +16840,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 25 }, @@ -16787,8 +16863,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 44 }, @@ -16803,8 +16879,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -16819,8 +16895,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -16856,8 +16932,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 26 }, @@ -16880,8 +16956,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -16896,8 +16972,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -16933,8 +17009,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 27 }, @@ -16956,8 +17032,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -16972,8 +17048,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -17009,8 +17085,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 32 }, @@ -17032,8 +17108,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -17048,8 +17124,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -17085,8 +17161,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 33 }, @@ -17108,8 +17184,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -17124,8 +17200,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -17161,8 +17237,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 31 }, @@ -17184,8 +17260,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -17200,8 +17276,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -17237,8 +17313,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 31 }, @@ -17260,8 +17336,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -17276,8 +17352,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -17313,8 +17389,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 33 }, @@ -17336,8 +17412,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -17352,8 +17428,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -17389,8 +17465,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 26 }, @@ -17412,8 +17488,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -17428,8 +17504,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -17465,8 +17541,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 25 }, @@ -17488,8 +17564,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -17504,8 +17580,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -17541,8 +17617,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 28 }, @@ -17564,8 +17640,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 64 }, @@ -17583,8 +17659,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 25 }, @@ -17601,8 +17677,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 36, "end_column": 63 }, @@ -17627,8 +17703,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -17643,8 +17719,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -17680,8 +17756,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 27 }, @@ -17698,8 +17774,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 38, "end_column": 43 }, @@ -17727,8 +17803,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -17743,8 +17819,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -17883,8 +17959,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -18024,8 +18100,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 26 }, @@ -18040,8 +18116,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 20 }, @@ -18059,8 +18135,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -18075,8 +18151,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -18112,8 +18188,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 22 }, @@ -18135,8 +18211,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -18151,8 +18227,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -18188,8 +18264,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 25 }, @@ -18211,8 +18287,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 44 }, @@ -18227,8 +18303,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -18243,8 +18319,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -18280,8 +18356,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 26 }, @@ -18304,8 +18380,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -18320,8 +18396,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -18357,8 +18433,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 27 }, @@ -18380,8 +18456,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -18396,8 +18472,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -18433,8 +18509,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 32 }, @@ -18456,8 +18532,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -18472,8 +18548,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -18509,8 +18585,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 33 }, @@ -18532,8 +18608,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -18548,8 +18624,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -18585,8 +18661,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 31 }, @@ -18608,8 +18684,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -18624,8 +18700,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -18661,8 +18737,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 31 }, @@ -18684,8 +18760,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -18700,8 +18776,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -18737,8 +18813,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 33 }, @@ -18760,8 +18836,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -18776,8 +18852,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -18813,8 +18889,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 26 }, @@ -18836,8 +18912,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -18852,8 +18928,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -18889,8 +18965,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 25 }, @@ -18912,8 +18988,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -18928,8 +19004,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -18965,8 +19041,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 28 }, @@ -18988,8 +19064,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 64 }, @@ -19007,8 +19083,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 25 }, @@ -19025,8 +19101,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 36, "end_column": 63 }, @@ -19051,8 +19127,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -19067,8 +19143,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -19104,8 +19180,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 27 }, @@ -19122,8 +19198,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 38, "end_column": 43 }, @@ -19151,8 +19227,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -19167,8 +19243,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -19307,8 +19383,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -19448,8 +19524,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 26 }, @@ -19464,8 +19540,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 20 }, @@ -19483,8 +19559,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -19499,8 +19575,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -19536,8 +19612,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 22 }, @@ -19559,8 +19635,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -19575,8 +19651,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -19612,8 +19688,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 25 }, @@ -19634,9 +19710,9 @@ { "_type": "ReinterpretCast", "source_location": { - "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "file": "tests/approvals/accounts.algo.ts", + "line": 11, + "end_line": 11, "column": 19, "end_column": 44 }, @@ -19651,8 +19727,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -19667,8 +19743,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -19704,8 +19780,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 26 }, @@ -19728,8 +19804,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -19744,8 +19820,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -19781,8 +19857,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 27 }, @@ -19804,8 +19880,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -19820,8 +19896,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -19857,8 +19933,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 32 }, @@ -19880,8 +19956,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -19896,8 +19972,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -19933,8 +20009,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 33 }, @@ -19956,8 +20032,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -19972,8 +20048,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -20009,8 +20085,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 31 }, @@ -20032,8 +20108,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -20048,8 +20124,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -20085,8 +20161,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 31 }, @@ -20108,8 +20184,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -20124,8 +20200,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -20161,8 +20237,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 33 }, @@ -20184,8 +20260,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -20200,8 +20276,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -20237,8 +20313,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 26 }, @@ -20260,8 +20336,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -20276,8 +20352,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -20313,8 +20389,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 25 }, @@ -20336,8 +20412,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -20352,8 +20428,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -20389,8 +20465,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 28 }, @@ -20412,8 +20488,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 64 }, @@ -20431,8 +20507,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 25 }, @@ -20449,8 +20525,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 36, "end_column": 63 }, @@ -20475,8 +20551,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -20491,8 +20567,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -20528,8 +20604,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 27 }, @@ -20546,8 +20622,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 38, "end_column": 43 }, @@ -20575,8 +20651,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -20591,8 +20667,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -20731,8 +20807,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 6, - "end_line": 22, + "line": 7, + "end_line": 23, "column": 11, "end_column": 5 }, @@ -20872,8 +20948,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 26 }, @@ -20888,8 +20964,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 7, - "end_line": 7, + "line": 8, + "end_line": 8, "column": 13, "end_column": 20 }, @@ -20907,8 +20983,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -20923,8 +20999,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 30 }, @@ -20960,8 +21036,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 8, - "end_line": 8, + "line": 9, + "end_line": 9, "column": 15, "end_column": 22 }, @@ -20983,8 +21059,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -20999,8 +21075,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 36 }, @@ -21036,8 +21112,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 9, - "end_line": 9, + "line": 10, + "end_line": 10, "column": 18, "end_column": 25 }, @@ -21059,8 +21135,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 44 }, @@ -21075,8 +21151,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -21091,8 +21167,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 38 }, @@ -21128,8 +21204,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 10, - "end_line": 10, + "line": 11, + "end_line": 11, "column": 19, "end_column": 26 }, @@ -21152,8 +21228,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -21168,8 +21244,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 40 }, @@ -21205,8 +21281,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 11, - "end_line": 11, + "line": 12, + "end_line": 12, "column": 20, "end_column": 27 }, @@ -21228,8 +21304,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -21244,8 +21320,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 50 }, @@ -21281,8 +21357,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 12, - "end_line": 12, + "line": 13, + "end_line": 13, "column": 25, "end_column": 32 }, @@ -21304,8 +21380,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -21320,8 +21396,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 52 }, @@ -21357,8 +21433,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 13, - "end_line": 13, + "line": 14, + "end_line": 14, "column": 26, "end_column": 33 }, @@ -21380,8 +21456,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -21396,8 +21472,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 48 }, @@ -21433,8 +21509,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 14, - "end_line": 14, + "line": 15, + "end_line": 15, "column": 24, "end_column": 31 }, @@ -21456,8 +21532,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -21472,8 +21548,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 48 }, @@ -21509,8 +21585,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 15, - "end_line": 15, + "line": 16, + "end_line": 16, "column": 24, "end_column": 31 }, @@ -21532,8 +21608,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -21548,8 +21624,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 52 }, @@ -21585,8 +21661,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 16, - "end_line": 16, + "line": 17, + "end_line": 17, "column": 26, "end_column": 33 }, @@ -21608,8 +21684,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -21624,8 +21700,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 38 }, @@ -21661,8 +21737,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 17, - "end_line": 17, + "line": 18, + "end_line": 18, "column": 19, "end_column": 26 }, @@ -21684,8 +21760,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -21700,8 +21776,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 36 }, @@ -21737,8 +21813,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 18, - "end_line": 18, + "line": 19, + "end_line": 19, "column": 18, "end_column": 25 }, @@ -21760,8 +21836,8 @@ "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -21776,8 +21852,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 42 }, @@ -21813,8 +21889,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 21, "end_column": 28 }, @@ -21836,8 +21912,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 64 }, @@ -21855,8 +21931,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 18, "end_column": 25 }, @@ -21873,8 +21949,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 36, "end_column": 63 }, @@ -21899,8 +21975,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -21915,8 +21991,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 44 }, @@ -21952,8 +22028,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 20, "end_column": 27 }, @@ -21970,8 +22046,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/accounts.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 38, "end_column": 43 }, diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal b/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal index 1d0b0c59..264ba801 100644 --- a/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal @@ -1,147 +1,64 @@ #pragma version 10 tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.approvalProgram: - intcblock 0 1 8 2 - bytecblock 0x 0x0000 base32(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) 0x00 - txn ApplicationID - bnz main_after_if_else@2 - callsub constructor - -main_after_if_else@2: - // tests/approvals/arc4-types.algo.ts:85 - // testStr() - callsub testStr - // tests/approvals/arc4-types.algo.ts:86 + intcblock 1 16 8 0 + // tests/approvals/arc4-types.algo.ts:114 // test(1, 2n, new UintN<256>(4)) - intc_1 // 1 - pushbytes 0x02 - pushbytes 0x0000000000000000000000000000000000000000000000000000000000000004 + intc_0 // 1 + pushbytess 0x02 0x0000000000000000000000000000000000000000000000000000000000000004 // 0x02, 0x0000000000000000000000000000000000000000000000000000000000000004 callsub test - // tests/approvals/arc4-types.algo.ts:87 - // testByte() - callsub testByte - // tests/approvals/arc4-types.algo.ts:88 + // tests/approvals/arc4-types.algo.ts:116 // testArrays(new UintN<64>(65)) pushbytes 0x0000000000000041 callsub testArrays - // tests/approvals/arc4-types.algo.ts:89 + // tests/approvals/arc4-types.algo.ts:117 // testAddress() callsub testAddress - // tests/approvals/arc4-types.algo.ts:90 - // testTuple() - callsub testTuple - // tests/approvals/arc4-types.algo.ts:92 - // const result = new arc4.DynamicArray>() - bytec_1 // 0x0000 - bytec_0 // 0x - concat - // tests/approvals/arc4-types.algo.ts:93 - // assert(result.length === 0) - intc_0 // 0 - extract_uint16 - intc_0 // 0 - == - assert - // tests/approvals/arc4-types.algo.ts:94 + // tests/approvals/arc4-types.algo.ts:120 + // testDynamicBytes(Bytes('hmmmmmmmmm')) + pushbytes "hmmmmmmmmm" + callsub testDynamicBytes + // tests/approvals/arc4-types.algo.ts:124 // return true - intc_1 // 1 + intc_0 // 1 return -// tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.constructor() -> void: -constructor: - // tests/approvals/arc4-types.algo.ts:78 - // export class Arc4TypesTestContract extends BaseContract { - proto 0 0 - retsub - - -// tests/approvals/arc4-types.algo.ts::testStr() -> void: -testStr: - // tests/approvals/arc4-types.algo.ts:30 - // function testStr() { - proto 0 0 - // tests/approvals/arc4-types.algo.ts:31 - // const s1 = new Str() - bytec_1 // 0x0000 - // tests/approvals/arc4-types.algo.ts:32 - // assert(s1.bytes === new UintN<16>(0).bytes, 'Empty string should equal the uint16 length prefix') - dup - == - assert // Empty string should equal the uint16 length prefix - // tests/approvals/arc4-types.algo.ts:33 - // const s2 = new Str('Hello') - pushbytes 0x000548656c6c6f - // tests/approvals/arc4-types.algo.ts:34 - // assert(s2.native === 'Hello') - extract 2 0 - pushbytes "Hello" - == - assert - retsub - - // tests/approvals/arc4-types.algo.ts::test(n: uint64, b: bytes, c: bytes) -> void: test: - // tests/approvals/arc4-types.algo.ts:12 + // tests/approvals/arc4-types.algo.ts:23 // function test(n: uint64, b: biguint, c: UintN<256>) { proto 3 0 - // tests/approvals/arc4-types.algo.ts:13 - // const x = new UintN<8>(4) - pushbytes 0x04 - // tests/approvals/arc4-types.algo.ts:14 - // assert(x.bytes.length === 1) - len - intc_1 // 1 - == - assert - // tests/approvals/arc4-types.algo.ts:15 - // const x2 = new UintN<8>(255n) - pushbytes 0xff - // tests/approvals/arc4-types.algo.ts:16 - // assert(x2.bytes === Bytes.fromHex('ff')) - dup - == - assert - // tests/approvals/arc4-types.algo.ts:18 - // const y = new UintN<16>() - bytec_1 // 0x0000 - // tests/approvals/arc4-types.algo.ts:19 - // assert(y.bytes.length === 2) - len - intc_3 // 2 - == - assert - // tests/approvals/arc4-types.algo.ts:20 + // tests/approvals/arc4-types.algo.ts:31 // const z = new UintN<8>(n) frame_dig -3 itob extract 7 1 - // tests/approvals/arc4-types.algo.ts:21 + // tests/approvals/arc4-types.algo.ts:32 // const z_native = z.native btoi - // tests/approvals/arc4-types.algo.ts:22 + // tests/approvals/arc4-types.algo.ts:33 // assert(z_native === n) frame_dig -3 == assert - // tests/approvals/arc4-types.algo.ts:23 + // tests/approvals/arc4-types.algo.ts:34 // const a = new UintN<128>(b) frame_dig -2 len - pushint 16 // 16 + intc_1 // 16 <= assert // overflow - pushint 16 // 16 + intc_1 // 16 bzero frame_dig -2 b| - // tests/approvals/arc4-types.algo.ts:25 + // tests/approvals/arc4-types.algo.ts:36 // assert(a_native === b) frame_dig -2 b== assert - // tests/approvals/arc4-types.algo.ts:27 + // tests/approvals/arc4-types.algo.ts:38 // assert(c.bytes.length === 256 / 8) frame_dig -1 len @@ -151,48 +68,27 @@ test: retsub -// tests/approvals/arc4-types.algo.ts::testByte() -> void: -testByte: - // tests/approvals/arc4-types.algo.ts:54 - // function testByte() { - proto 0 0 - // tests/approvals/arc4-types.algo.ts:55 - // const b = new Byte() - bytec_3 // 0x00 - // tests/approvals/arc4-types.algo.ts:56 - // const b2 = new Byte(0) - dup - // tests/approvals/arc4-types.algo.ts:57 - // assert(b.equals(b2)) - == - assert - retsub - - // tests/approvals/arc4-types.algo.ts::testArrays(n: bytes) -> void: testArrays: - // tests/approvals/arc4-types.algo.ts:40 + // tests/approvals/arc4-types.algo.ts:68 // function testArrays(n: ARC4Uint64) { proto 1 0 - // tests/approvals/arc4-types.algo.ts:41 + // tests/approvals/arc4-types.algo.ts:69 // const myArray = new DynamicArray(n, n, n) - bytec_0 // 0x - frame_dig -1 - concat frame_dig -1 + dup concat + dup frame_dig -1 concat pushbytes 0x0003 swap concat - // tests/approvals/arc4-types.algo.ts:43 + // tests/approvals/arc4-types.algo.ts:71 // myArray.push(n) extract 2 0 - bytec_0 // 0x frame_dig -1 concat - concat dup len intc_2 // 8 @@ -201,23 +97,10 @@ testArrays: extract 6 2 swap concat - // tests/approvals/arc4-types.algo.ts:45 - // const myStatic = new StaticArray(n, n) - bytec_0 // 0x - frame_dig -1 - concat - frame_dig -1 - concat - bytec_0 // 0x - swap - concat - // tests/approvals/arc4-types.algo.ts:47 + // tests/approvals/arc4-types.algo.ts:75 // assert(myStatic[0].equals(myArray.pop())) - intc_0 // 0 - intc_2 // 8 - * - intc_2 // 8 - extract3 // on error: Index access is out of bounds + swap + extract 0 8 // on error: Index access is out of bounds swap intc_2 // 8 callsub dynamic_array_pop_fixed_size @@ -229,77 +112,40 @@ testArrays: // tests/approvals/arc4-types.algo.ts::testAddress() -> void: testAddress: - // tests/approvals/arc4-types.algo.ts:60 + // tests/approvals/arc4-types.algo.ts:88 // function testAddress() { proto 0 0 - // tests/approvals/arc4-types.algo.ts:62 + // tests/approvals/arc4-types.algo.ts:89 + // const a = new Address() + pushbytes base32(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ + // tests/approvals/arc4-types.algo.ts:90 // const b = new Address(Txn.sender) txn Sender - // tests/approvals/arc4-types.algo.ts:61 - // const a = new Address() - bytec_2 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ - // tests/approvals/arc4-types.algo.ts:64 + // tests/approvals/arc4-types.algo.ts:92 // assert(!a.equals(b), 'Zero address should not match sender') == ! assert // Zero address should not match sender - // tests/approvals/arc4-types.algo.ts:61 - // const a = new Address() - bytec_2 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ - // tests/approvals/arc4-types.algo.ts:65 - // assert(a.equals(new Address()), 'Two zero addresses should match') - dup - == - assert // Two zero addresses should match - // tests/approvals/arc4-types.algo.ts:66 - // assert(a[0].equals(new Byte()), 'Zero address should start with zero byte') - intc_0 // 0 - intc_1 // 1 - * - // tests/approvals/arc4-types.algo.ts:61 - // const a = new Address() - bytec_2 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ - // tests/approvals/arc4-types.algo.ts:66 - // assert(a[0].equals(new Byte()), 'Zero address should start with zero byte') - swap - intc_1 // 1 - extract3 // on error: Index access is out of bounds - bytec_3 // 0x00 - == - assert // Zero address should start with zero byte retsub -// tests/approvals/arc4-types.algo.ts::testTuple() -> void: -testTuple: - // tests/approvals/arc4-types.algo.ts:69 - // function testTuple() { - proto 0 0 - // tests/approvals/arc4-types.algo.ts:70 - // const t = new Tuple(new ARC4Uint64(34)) - bytec_0 // 0x - pushbytes 0x0000000000000022 +// tests/approvals/arc4-types.algo.ts::testDynamicBytes(someBytes: bytes) -> void: +testDynamicBytes: + // tests/approvals/arc4-types.algo.ts:48 + // function testDynamicBytes(someBytes: bytes) { + proto 1 0 + // tests/approvals/arc4-types.algo.ts:52 + // const db2 = new DynamicBytes(someBytes) + frame_dig -1 + len + itob + extract 6 2 + frame_dig -1 concat - // tests/approvals/arc4-types.algo.ts:71 - // const firstItem = t.at(0) - dup - intc_0 // 0 - intc_2 // 8 - extract3 // on error: Index access is out of bounds - swap - // tests/approvals/arc4-types.algo.ts:72 - // const firstItemIndexer = t.native[0] - intc_0 // 0 - intc_2 // 8 - extract3 // on error: Index access is out of bounds - // tests/approvals/arc4-types.algo.ts:73 - // assert(firstItem.equals(firstItemIndexer)) - == - assert - // tests/approvals/arc4-types.algo.ts:75 - // assert(t1.length === 2) - intc_3 // 2 - dup + // tests/approvals/arc4-types.algo.ts:53 + // assert(db2.native === someBytes) + extract 2 0 + frame_dig -1 == assert retsub @@ -309,9 +155,9 @@ testTuple: dynamic_array_pop_fixed_size: proto 2 2 frame_dig -2 - intc_0 // 0 + intc_3 // 0 extract_uint16 - intc_1 // 1 + intc_0 // 1 - itob extract 6 0 @@ -325,9 +171,8 @@ dynamic_array_pop_fixed_size: dup2 frame_dig -1 extract3 - cover 2 - swap - intc_0 // 0 uncover 2 + intc_3 // 0 + uncover 3 substring3 retsub diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir b/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir index 4e0dd369..bd437cc1 100644 --- a/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir @@ -1,7 +1,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: program approval: subroutine tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.approvalProgram() -> bool: - block@0: // L83 + block@0: // L111 let reinterpret_bool%0#0: bool = (txn ApplicationID) goto reinterpret_bool%0#0 ? block@2 : block@1 block@1: // if_body_L1 @@ -15,6 +15,9 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: tests/approvals/arc4-types.algo.ts::testArrays(0x0000000000000041) tests/approvals/arc4-types.algo.ts::testAddress() tests/approvals/arc4-types.algo.ts::testTuple() + tests/approvals/arc4-types.algo.ts::testUFixed() + tests/approvals/arc4-types.algo.ts::testDynamicBytes("hmmmmmmmmm") + tests/approvals/arc4-types.algo.ts::testStaticBytes() let array_data%0#0: bytes = (concat 0x0000 0x) let result#0: bytes = array_data%0#0 let tmp%0#0: uint64 = (extract_uint16 result#0 0u) @@ -23,11 +26,11 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return 1u subroutine tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.constructor() -> void: - block@0: // L78 + block@0: // L106 return subroutine tests/approvals/arc4-types.algo.ts::testStr() -> void: - block@0: // L30 + block@0: // L41 let s1#0: bytes = 0x0000 let tmp%0#0: bool = (== s1#0 0x0000) (assert tmp%0#0) // Empty string should equal the uint16 length prefix @@ -38,7 +41,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::test(n: uint64, b: biguint, c: bytes) -> void: - block@0: // L12 + block@0: // L23 let x#0: bytes = 0x04 let tmp%0#0: uint64 = (len x#0) let tmp%1#0: bool = (== tmp%0#0 1u) @@ -69,7 +72,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testByte() -> void: - block@0: // L54 + block@0: // L82 let b#0: bytes = 0x00 let b2#0: bytes = 0x00 let tmp%0#0: bool = (== b#0 b2#0) @@ -77,7 +80,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testArrays(n: bytes) -> void: - block@0: // L40 + block@0: // L68 let result%0#0: bytes = (concat 0x n#0) let result%1#0: bytes = (concat result%0#0 n#0) let result%2#0: bytes = (concat result%1#0 n#0) @@ -109,7 +112,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testAddress() -> void: - block@0: // L60 + block@0: // L88 let a#0: bytes = addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ let b#0: bytes = (txn Sender) let tmp%0#0: bool = (== a#0 b#0) @@ -125,7 +128,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testTuple() -> void: - block@0: // L69 + block@0: // L97 let current_tail_offset%0#0: uint64 = 8u let encoded_tuple_buffer%0#0: bytes = 0x let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 0x0000000000000022) @@ -144,6 +147,43 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: (assert tmp%1#0) return + subroutine tests/approvals/arc4-types.algo.ts::testUFixed() -> void: + block@0: // L16 + let a#0: bytes = 0x000004dc + let c#0: bytes = 0x000004dc + let tmp%0#0: bool = (== a#0 c#0) + (assert tmp%0#0) + return + + subroutine tests/approvals/arc4-types.algo.ts::testDynamicBytes(someBytes: bytes) -> void: + block@0: // L48 + let db1#0: bytes = 0x0000 + let tmp%0#0: bytes = ((extract 2 0) db1#0) + let tmp%1#0: bool = (== tmp%0#0 0x) + (assert tmp%1#0) // No args should give empty bytes + let tmp%2#0: bool = (== db1#0 0x0000) + (assert tmp%2#0) // bytes prop should return length header (of 0) + let length%0#0: uint64 = (len someBytes#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 someBytes#0) + let db2#0: bytes = encoded_value%0#0 + let tmp%3#0: bytes = ((extract 2 0) db2#0) + let tmp%4#0: bool = (== tmp%3#0 someBytes#0) + (assert tmp%4#0) + let db3#0: bytes = 0x000568656c6c6f + let tmp%5#0: bytes = ((extract 2 0) db3#0) + let tmp%6#0: bool = (== tmp%5#0 "hello") + (assert tmp%6#0) + return + + subroutine tests/approvals/arc4-types.algo.ts::testStaticBytes() -> void: + block@0: // L59 + let s1#0: bytes = 0x + let s2#0: bytes = 0x00000000 + let s3#0: bytes = 0xaabbccddee + return + subroutine _puya_lib.arc4.dynamic_array_pop_fixed_size(array: bytes, fixed_byte_size: uint64) -> : block@0: // L44 let array_length#0: uint64 = (extract_uint16 array#0 0u) diff --git a/tests/approvals/out/arc4-types/arc4-types.awst b/tests/approvals/out/arc4-types/arc4-types.awst index 87be6310..003af230 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst +++ b/tests/approvals/out/arc4-types/arc4-types.awst @@ -27,6 +27,22 @@ subroutine testStr(): void s2: arc4.dynamic_array = "Hello" assert(ARC4_DECODE(s2) == "Hello") } +subroutine testDynamicBytes(someBytes: bytes): void +{ + db1: arc4.dynamic_array = 0x0000 + assert(reinterpret_cast(db1)[2:] == 0x) + assert(reinterpret_cast(db1) == reinterpret_cast(0)) + db2: arc4.dynamic_array = ARC4_ENCODE(someBytes, wtype=arc4.dynamic_array) + assert(reinterpret_cast(db2)[2:] == someBytes) + db3: arc4.dynamic_array = 0x000568656c6c6f + assert(reinterpret_cast(db3)[2:] == "hello") +} +subroutine testStaticBytes(): void +{ + s1: arc4.static_array = 0x + s2: arc4.static_array = 0x00000000 + s3: arc4.static_array = 0xaabbccddee +} subroutine testArrays(n: arc4.uint64): void { myArray: arc4.dynamic_array = new arc4.dynamic_array(n, n, n) @@ -72,6 +88,9 @@ contract Arc4TypesTestContract tests/approvals/arc4-types.algo.ts::testArrays(65) tests/approvals/arc4-types.algo.ts::testAddress() tests/approvals/arc4-types.algo.ts::testTuple() + tests/approvals/arc4-types.algo.ts::testUFixed() + tests/approvals/arc4-types.algo.ts::testDynamicBytes("hmmmmmmmmm") + tests/approvals/arc4-types.algo.ts::testStaticBytes() result: arc4.dynamic_array = new arc4.dynamic_array() assert(extract_uint16(result, 0) == 0) return True diff --git a/tests/approvals/out/arc4-types/arc4-types.awst.json b/tests/approvals/out/arc4-types/arc4-types.awst.json index 8ee1e277..bb66895a 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst.json +++ b/tests/approvals/out/arc4-types/arc4-types.awst.json @@ -3,8 +3,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 5, - "end_line": 5, + "line": 16, + "end_line": 16, "column": 0, "end_column": 21 }, @@ -20,8 +20,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 5, - "end_line": 10, + "line": 16, + "end_line": 21, "column": 22, "end_column": 1 }, @@ -30,8 +30,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 6, - "end_line": 6, + "line": 17, + "end_line": 17, "column": 8, "end_column": 41 }, @@ -39,8 +39,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 6, - "end_line": 6, + "line": 17, + "end_line": 17, "column": 8, "end_column": 9 }, @@ -67,8 +67,8 @@ "_type": "DecimalConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 6, - "end_line": 6, + "line": 17, + "end_line": 17, "column": 26, "end_column": 33 }, @@ -96,8 +96,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 7, - "end_line": 7, + "line": 18, + "end_line": 18, "column": 8, "end_column": 41 }, @@ -105,8 +105,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 7, - "end_line": 7, + "line": 18, + "end_line": 18, "column": 8, "end_column": 9 }, @@ -133,8 +133,8 @@ "_type": "DecimalConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 7, - "end_line": 7, + "line": 18, + "end_line": 18, "column": 33, "end_column": 40 }, @@ -162,8 +162,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 9, - "end_line": 9, + "line": 20, + "end_line": 20, "column": 2, "end_column": 21 }, @@ -171,8 +171,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 9, - "end_line": 9, + "line": 20, + "end_line": 20, "column": 2, "end_column": 21 }, @@ -190,8 +190,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 9, - "end_line": 9, + "line": 20, + "end_line": 20, "column": 9, "end_column": 20 }, @@ -206,8 +206,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 9, - "end_line": 9, + "line": 20, + "end_line": 20, "column": 9, "end_column": 20 }, @@ -222,8 +222,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 9, - "end_line": 9, + "line": 20, + "end_line": 20, "column": 9, "end_column": 10 }, @@ -252,8 +252,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 9, - "end_line": 9, + "line": 20, + "end_line": 20, "column": 9, "end_column": 20 }, @@ -268,8 +268,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 9, - "end_line": 9, + "line": 20, + "end_line": 20, "column": 18, "end_column": 19 }, @@ -315,8 +315,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 12, - "end_line": 12, + "line": 23, + "end_line": 23, "column": 0, "end_column": 51 }, @@ -333,8 +333,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 12, - "end_line": 12, + "line": 23, + "end_line": 23, "column": 14, "end_column": 23 } @@ -351,8 +351,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 12, - "end_line": 12, + "line": 23, + "end_line": 23, "column": 25, "end_column": 35 } @@ -378,8 +378,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 12, - "end_line": 12, + "line": 23, + "end_line": 23, "column": 37, "end_column": 50 } @@ -396,8 +396,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 12, - "end_line": 28, + "line": 23, + "end_line": 39, "column": 52, "end_column": 1 }, @@ -406,8 +406,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 13, - "end_line": 13, + "line": 24, + "end_line": 24, "column": 8, "end_column": 27 }, @@ -415,8 +415,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 13, - "end_line": 13, + "line": 24, + "end_line": 24, "column": 8, "end_column": 9 }, @@ -442,8 +442,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 13, - "end_line": 13, + "line": 24, + "end_line": 24, "column": 12, "end_column": 27 }, @@ -471,8 +471,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 14, - "end_line": 14, + "line": 25, + "end_line": 25, "column": 2, "end_column": 30 }, @@ -480,8 +480,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 14, - "end_line": 14, + "line": 25, + "end_line": 25, "column": 2, "end_column": 30 }, @@ -499,8 +499,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 14, - "end_line": 14, + "line": 25, + "end_line": 25, "column": 9, "end_column": 29 }, @@ -515,8 +515,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 14, - "end_line": 14, + "line": 25, + "end_line": 25, "column": 9, "end_column": 23 }, @@ -534,8 +534,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 14, - "end_line": 14, + "line": 25, + "end_line": 25, "column": 9, "end_column": 16 }, @@ -550,8 +550,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 14, - "end_line": 14, + "line": 25, + "end_line": 25, "column": 9, "end_column": 10 }, @@ -582,8 +582,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 14, - "end_line": 14, + "line": 25, + "end_line": 25, "column": 28, "end_column": 29 }, @@ -606,8 +606,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 15, - "end_line": 15, + "line": 26, + "end_line": 26, "column": 8, "end_column": 31 }, @@ -615,8 +615,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 15, - "end_line": 15, + "line": 26, + "end_line": 26, "column": 8, "end_column": 10 }, @@ -642,8 +642,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 15, - "end_line": 15, + "line": 26, + "end_line": 26, "column": 13, "end_column": 31 }, @@ -671,8 +671,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 16, - "end_line": 16, + "line": 27, + "end_line": 27, "column": 2, "end_column": 42 }, @@ -680,8 +680,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 16, - "end_line": 16, + "line": 27, + "end_line": 27, "column": 2, "end_column": 42 }, @@ -699,8 +699,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 16, - "end_line": 16, + "line": 27, + "end_line": 27, "column": 9, "end_column": 41 }, @@ -715,8 +715,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 16, - "end_line": 16, + "line": 27, + "end_line": 27, "column": 9, "end_column": 17 }, @@ -731,8 +731,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 16, - "end_line": 16, + "line": 27, + "end_line": 27, "column": 9, "end_column": 11 }, @@ -760,8 +760,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 16, - "end_line": 16, + "line": 27, + "end_line": 27, "column": 22, "end_column": 41 }, @@ -784,8 +784,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 18, - "end_line": 18, + "line": 29, + "end_line": 29, "column": 8, "end_column": 27 }, @@ -793,8 +793,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 18, - "end_line": 18, + "line": 29, + "end_line": 29, "column": 8, "end_column": 9 }, @@ -820,8 +820,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 18, - "end_line": 18, + "line": 29, + "end_line": 29, "column": 12, "end_column": 27 }, @@ -849,8 +849,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 19, - "end_line": 19, + "line": 30, + "end_line": 30, "column": 2, "end_column": 30 }, @@ -858,8 +858,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 19, - "end_line": 19, + "line": 30, + "end_line": 30, "column": 2, "end_column": 30 }, @@ -877,8 +877,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 19, - "end_line": 19, + "line": 30, + "end_line": 30, "column": 9, "end_column": 29 }, @@ -893,8 +893,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 19, - "end_line": 19, + "line": 30, + "end_line": 30, "column": 9, "end_column": 23 }, @@ -912,8 +912,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 19, - "end_line": 19, + "line": 30, + "end_line": 30, "column": 9, "end_column": 16 }, @@ -928,8 +928,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 19, - "end_line": 19, + "line": 30, + "end_line": 30, "column": 9, "end_column": 10 }, @@ -960,8 +960,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 19, - "end_line": 19, + "line": 30, + "end_line": 30, "column": 28, "end_column": 29 }, @@ -984,8 +984,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 31, + "end_line": 31, "column": 8, "end_column": 27 }, @@ -993,8 +993,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 31, + "end_line": 31, "column": 8, "end_column": 9 }, @@ -1020,8 +1020,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 31, + "end_line": 31, "column": 12, "end_column": 27 }, @@ -1045,8 +1045,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 31, + "end_line": 31, "column": 25, "end_column": 26 }, @@ -1065,8 +1065,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 32, + "end_line": 32, "column": 8, "end_column": 27 }, @@ -1074,8 +1074,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 32, + "end_line": 32, "column": 8, "end_column": 16 }, @@ -1092,8 +1092,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 32, + "end_line": 32, "column": 19, "end_column": 27 }, @@ -1108,8 +1108,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 32, + "end_line": 32, "column": 19, "end_column": 20 }, @@ -1137,8 +1137,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 22, - "end_line": 22, + "line": 33, + "end_line": 33, "column": 2, "end_column": 24 }, @@ -1146,8 +1146,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 22, - "end_line": 22, + "line": 33, + "end_line": 33, "column": 2, "end_column": 24 }, @@ -1165,8 +1165,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 22, - "end_line": 22, + "line": 33, + "end_line": 33, "column": 9, "end_column": 23 }, @@ -1181,8 +1181,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 22, - "end_line": 22, + "line": 33, + "end_line": 33, "column": 9, "end_column": 17 }, @@ -1200,8 +1200,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 22, - "end_line": 22, + "line": 33, + "end_line": 33, "column": 22, "end_column": 23 }, @@ -1223,8 +1223,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, + "line": 34, + "end_line": 34, "column": 8, "end_column": 29 }, @@ -1232,8 +1232,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, + "line": 34, + "end_line": 34, "column": 8, "end_column": 9 }, @@ -1259,8 +1259,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, + "line": 34, + "end_line": 34, "column": 12, "end_column": 29 }, @@ -1284,8 +1284,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, + "line": 34, + "end_line": 34, "column": 27, "end_column": 28 }, @@ -1304,8 +1304,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 24, - "end_line": 24, + "line": 35, + "end_line": 35, "column": 8, "end_column": 27 }, @@ -1313,8 +1313,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 24, - "end_line": 24, + "line": 35, + "end_line": 35, "column": 8, "end_column": 16 }, @@ -1331,8 +1331,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 24, - "end_line": 24, + "line": 35, + "end_line": 35, "column": 19, "end_column": 27 }, @@ -1347,8 +1347,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 24, - "end_line": 24, + "line": 35, + "end_line": 35, "column": 19, "end_column": 20 }, @@ -1376,8 +1376,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 36, + "end_line": 36, "column": 2, "end_column": 24 }, @@ -1385,8 +1385,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 36, + "end_line": 36, "column": 2, "end_column": 24 }, @@ -1404,8 +1404,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 36, + "end_line": 36, "column": 9, "end_column": 23 }, @@ -1420,8 +1420,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 36, + "end_line": 36, "column": 9, "end_column": 17 }, @@ -1439,8 +1439,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 36, + "end_line": 36, "column": 22, "end_column": 23 }, @@ -1462,8 +1462,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 38, + "end_line": 38, "column": 2, "end_column": 36 }, @@ -1471,8 +1471,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 38, + "end_line": 38, "column": 2, "end_column": 36 }, @@ -1490,8 +1490,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 38, + "end_line": 38, "column": 9, "end_column": 35 }, @@ -1506,8 +1506,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 38, + "end_line": 38, "column": 9, "end_column": 23 }, @@ -1525,8 +1525,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 38, + "end_line": 38, "column": 9, "end_column": 16 }, @@ -1541,8 +1541,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 38, + "end_line": 38, "column": 9, "end_column": 10 }, @@ -1573,8 +1573,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 38, + "end_line": 38, "column": 28, "end_column": 35 }, @@ -1610,8 +1610,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, + "line": 41, + "end_line": 41, "column": 0, "end_column": 18 }, @@ -1627,8 +1627,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 35, + "line": 41, + "end_line": 46, "column": 19, "end_column": 1 }, @@ -1637,8 +1637,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 31, - "end_line": 31, + "line": 42, + "end_line": 42, "column": 8, "end_column": 22 }, @@ -1646,8 +1646,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 31, - "end_line": 31, + "line": 42, + "end_line": 42, "column": 8, "end_column": 10 }, @@ -1689,8 +1689,8 @@ "_type": "StringConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 31, - "end_line": 31, + "line": 42, + "end_line": 42, "column": 13, "end_column": 22 }, @@ -1733,8 +1733,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 43, + "end_line": 43, "column": 2, "end_column": 99 }, @@ -1742,8 +1742,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 43, + "end_line": 43, "column": 2, "end_column": 99 }, @@ -1761,8 +1761,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 43, + "end_line": 43, "column": 9, "end_column": 44 }, @@ -1777,8 +1777,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 43, + "end_line": 43, "column": 9, "end_column": 17 }, @@ -1793,8 +1793,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 43, + "end_line": 43, "column": 9, "end_column": 11 }, @@ -1838,8 +1838,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 43, + "end_line": 43, "column": 22, "end_column": 44 }, @@ -1854,8 +1854,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 43, + "end_line": 43, "column": 22, "end_column": 38 }, @@ -1888,8 +1888,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 44, + "end_line": 44, "column": 8, "end_column": 29 }, @@ -1897,8 +1897,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 44, + "end_line": 44, "column": 8, "end_column": 10 }, @@ -1940,8 +1940,8 @@ "_type": "StringConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 44, + "end_line": 44, "column": 13, "end_column": 29 }, @@ -1984,8 +1984,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 45, + "end_line": 45, "column": 2, "end_column": 31 }, @@ -1993,8 +1993,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 45, + "end_line": 45, "column": 2, "end_column": 31 }, @@ -2012,8 +2012,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 45, + "end_line": 45, "column": 9, "end_column": 30 }, @@ -2028,8 +2028,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 45, + "end_line": 45, "column": 9, "end_column": 18 }, @@ -2044,8 +2044,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 45, + "end_line": 45, "column": 9, "end_column": 11 }, @@ -2089,8 +2089,8 @@ "_type": "StringConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 45, + "end_line": 45, "column": 23, "end_column": 30 }, @@ -2118,15 +2118,1370 @@ "args": {}, "returns": null }, - "id": "tests/approvals/arc4-types.algo.ts::testStr", - "name": "testStr" + "id": "tests/approvals/arc4-types.algo.ts::testStr", + "name": "testStr" + }, + { + "_type": "Subroutine", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 43 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "someBytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 48, + "end_line": 48, + "column": 26, + "end_column": 42 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 48, + "end_line": 57, + "column": 44, + "end_column": 1 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 49, + "end_line": 49, + "column": 8, + "end_column": 32 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 49, + "end_line": 49, + "column": 8, + "end_column": 11 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "db1" + }, + "value": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 49, + "end_line": 49, + "column": 14, + "end_column": 32 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": "000", + "encoding": "unknown" + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 50, + "end_line": 50, + "column": 2, + "end_column": 67 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 50, + "end_line": 50, + "column": 2, + "end_column": 67 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "op_code": "assert", + "immediates": [], + "stack_args": [ + { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 50, + "end_line": 50, + "column": 9, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "SliceExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 50, + "end_line": 50, + "column": 9, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 50, + "end_line": 50, + "column": 9, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 50, + "end_line": 50, + "column": 9, + "end_column": 12 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "db1" + } + }, + "begin_index": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 50, + "end_line": 50, + "column": 9, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "2", + "teal_alias": null + }, + "end_index": null + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 50, + "end_line": 50, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "", + "encoding": "unknown" + } + } + ], + "comment": "No args should give empty bytes" + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 51, + "end_line": 51, + "column": 2, + "end_column": 95 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 51, + "end_line": 51, + "column": 2, + "end_column": 95 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "op_code": "assert", + "immediates": [], + "stack_args": [ + { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 51, + "end_line": 51, + "column": 9, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 51, + "end_line": 51, + "column": 9, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 51, + "end_line": 51, + "column": 9, + "end_column": 12 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "db1" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 51, + "end_line": 51, + "column": 23, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 51, + "end_line": 51, + "column": 23, + "end_column": 39 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint16", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint16", + "n": "16" + }, + "value": "0", + "teal_alias": null + } + } + } + ], + "comment": "bytes prop should return length header (of 0)" + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 52, + "end_line": 52, + "column": 8, + "end_column": 41 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 52, + "end_line": 52, + "column": 8, + "end_column": 11 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "db2" + }, + "value": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 52, + "end_line": 52, + "column": 14, + "end_column": 41 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 52, + "end_line": 52, + "column": 31, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "someBytes" + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 53, + "end_line": 53, + "column": 2, + "end_column": 34 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 53, + "end_line": 53, + "column": 2, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "op_code": "assert", + "immediates": [], + "stack_args": [ + { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 53, + "end_line": 53, + "column": 9, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "SliceExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 53, + "end_line": 53, + "column": 9, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 53, + "end_line": 53, + "column": 9, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 53, + "end_line": 53, + "column": 9, + "end_column": 12 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "db2" + } + }, + "begin_index": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 53, + "end_line": 53, + "column": 9, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "2", + "teal_alias": null + }, + "end_index": null + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 53, + "end_line": 53, + "column": 24, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "someBytes" + } + } + ], + "comment": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 55, + "end_line": 55, + "column": 8, + "end_column": 39 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 55, + "end_line": 55, + "column": 8, + "end_column": 11 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "db3" + }, + "value": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 55, + "end_line": 55, + "column": 14, + "end_column": 39 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": "00n4eY;11", + "encoding": "unknown" + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 2, + "end_column": 39 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 2, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "op_code": "assert", + "immediates": [], + "stack_args": [ + { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 9, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "SliceExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 9, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 9, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 9, + "end_column": 12 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "db3" + } + }, + "begin_index": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 9, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "2", + "teal_alias": null + }, + "end_index": null + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 30, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Xk~0{Zv", + "encoding": "utf8" + } + } + ], + "comment": null + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "id": "tests/approvals/arc4-types.algo.ts::testDynamicBytes", + "name": "testDynamicBytes" + }, + { + "_type": "Subroutine", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 59, + "end_line": 59, + "column": 0, + "end_column": 26 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 59, + "end_line": 63, + "column": 27, + "end_column": 1 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 60, + "end_line": 60, + "column": 8, + "end_column": 30 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 60, + "end_line": 60, + "column": 8, + "end_column": 10 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[0]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null, + "array_size": "0" + }, + "name": "s1" + }, + "value": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 60, + "end_line": 60, + "column": 13, + "end_column": 30 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[0]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null, + "array_size": "0" + }, + "value": "", + "encoding": "unknown" + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 61, + "end_line": 61, + "column": 8, + "end_column": 33 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 61, + "end_line": 61, + "column": 8, + "end_column": 10 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[4]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null, + "array_size": "4" + }, + "name": "s2" + }, + "value": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 61, + "end_line": 61, + "column": 13, + "end_column": 33 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[4]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null, + "array_size": "4" + }, + "value": "00000", + "encoding": "unknown" + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 62, + "end_line": 62, + "column": 8, + "end_column": 60 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 62, + "end_line": 62, + "column": 8, + "end_column": 10 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[5]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null, + "array_size": "5" + }, + "name": "s3" + }, + "value": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 62, + "end_line": 62, + "column": 13, + "end_column": 60 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[5]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null, + "array_size": "5" + }, + "value": "s=LhH?f", + "encoding": "base16" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "id": "tests/approvals/arc4-types.algo.ts::testStaticBytes", + "name": "testStaticBytes" }, { "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 40, - "end_line": 40, + "line": 68, + "end_line": 68, "column": 0, "end_column": 34 }, @@ -2152,8 +3507,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 40, - "end_line": 40, + "line": 68, + "end_line": 68, "column": 20, "end_column": 33 } @@ -2170,8 +3525,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 40, - "end_line": 52, + "line": 68, + "end_line": 80, "column": 35, "end_column": 1 }, @@ -2180,8 +3535,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 69, + "end_line": 69, "column": 8, "end_column": 43 }, @@ -2189,8 +3544,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 69, + "end_line": 69, "column": 8, "end_column": 15 }, @@ -2226,8 +3581,8 @@ "_type": "NewArray", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 69, + "end_line": 69, "column": 18, "end_column": 43 }, @@ -2257,8 +3612,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 69, + "end_line": 69, "column": 18, "end_column": 43 } @@ -2268,8 +3623,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 69, + "end_line": 69, "column": 35, "end_column": 36 }, @@ -2295,8 +3650,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 69, + "end_line": 69, "column": 38, "end_column": 39 }, @@ -2322,8 +3677,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 69, + "end_line": 69, "column": 41, "end_column": 42 }, @@ -2352,8 +3707,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 71, + "end_line": 71, "column": 2, "end_column": 17 }, @@ -2361,8 +3716,8 @@ "_type": "ArrayExtend", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 71, + "end_line": 71, "column": 2, "end_column": 17 }, @@ -2396,8 +3751,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 71, + "end_line": 71, "column": 2, "end_column": 9 }, @@ -2433,8 +3788,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 71, + "end_line": 71, "column": 2, "end_column": 17 }, @@ -2468,8 +3823,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 71, + "end_line": 71, "column": 15, "end_column": 16 }, @@ -2499,8 +3854,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 73, + "end_line": 73, "column": 8, "end_column": 40 }, @@ -2508,8 +3863,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 73, + "end_line": 73, "column": 8, "end_column": 16 }, @@ -2546,8 +3901,8 @@ "_type": "NewArray", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 73, + "end_line": 73, "column": 19, "end_column": 40 }, @@ -2583,8 +3938,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 73, + "end_line": 73, "column": 35, "end_column": 36 }, @@ -2610,8 +3965,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 73, + "end_line": 73, "column": 38, "end_column": 39 }, @@ -2640,8 +3995,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 75, + "end_line": 75, "column": 2, "end_column": 43 }, @@ -2649,8 +4004,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 75, + "end_line": 75, "column": 2, "end_column": 43 }, @@ -2668,8 +4023,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 75, + "end_line": 75, "column": 9, "end_column": 42 }, @@ -2684,8 +4039,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 75, + "end_line": 75, "column": 9, "end_column": 42 }, @@ -2700,8 +4055,8 @@ "_type": "IndexExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 75, + "end_line": 75, "column": 9, "end_column": 20 }, @@ -2725,8 +4080,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 75, + "end_line": 75, "column": 9, "end_column": 17 }, @@ -2763,8 +4118,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 75, + "end_line": 75, "column": 18, "end_column": 19 }, @@ -2785,8 +4140,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 75, + "end_line": 75, "column": 9, "end_column": 42 }, @@ -2801,8 +4156,8 @@ "_type": "ArrayPop", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 75, + "end_line": 75, "column": 28, "end_column": 41 }, @@ -2826,8 +4181,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 47, - "end_line": 47, + "line": 75, + "end_line": 75, "column": 28, "end_column": 35 }, @@ -2870,8 +4225,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 77, + "end_line": 77, "column": 2, "end_column": 33 }, @@ -2879,8 +4234,8 @@ "_type": "IndexExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 77, + "end_line": 77, "column": 2, "end_column": 13 }, @@ -2904,8 +4259,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 77, + "end_line": 77, "column": 2, "end_column": 10 }, @@ -2942,8 +4297,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 77, + "end_line": 77, "column": 11, "end_column": 12 }, @@ -2962,8 +4317,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 77, + "end_line": 77, "column": 16, "end_column": 33 }, @@ -3004,8 +4359,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 54, - "end_line": 54, + "line": 82, + "end_line": 82, "column": 0, "end_column": 19 }, @@ -3021,8 +4376,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 54, - "end_line": 58, + "line": 82, + "end_line": 86, "column": 20, "end_column": 1 }, @@ -3031,8 +4386,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 55, - "end_line": 55, + "line": 83, + "end_line": 83, "column": 8, "end_column": 22 }, @@ -3040,8 +4395,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 55, - "end_line": 55, + "line": 83, + "end_line": 83, "column": 8, "end_column": 9 }, @@ -3067,8 +4422,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 55, - "end_line": 55, + "line": 83, + "end_line": 83, "column": 12, "end_column": 22 }, @@ -3096,8 +4451,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 84, + "end_line": 84, "column": 8, "end_column": 24 }, @@ -3105,8 +4460,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 84, + "end_line": 84, "column": 8, "end_column": 10 }, @@ -3132,8 +4487,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 84, + "end_line": 84, "column": 13, "end_column": 24 }, @@ -3161,8 +4516,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 57, - "end_line": 57, + "line": 85, + "end_line": 85, "column": 2, "end_column": 22 }, @@ -3170,8 +4525,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 57, - "end_line": 57, + "line": 85, + "end_line": 85, "column": 2, "end_column": 22 }, @@ -3189,8 +4544,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 57, - "end_line": 57, + "line": 85, + "end_line": 85, "column": 9, "end_column": 21 }, @@ -3205,8 +4560,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 57, - "end_line": 57, + "line": 85, + "end_line": 85, "column": 9, "end_column": 21 }, @@ -3221,8 +4576,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 57, - "end_line": 57, + "line": 85, + "end_line": 85, "column": 9, "end_column": 10 }, @@ -3250,8 +4605,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 57, - "end_line": 57, + "line": 85, + "end_line": 85, "column": 9, "end_column": 21 }, @@ -3266,8 +4621,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 57, - "end_line": 57, + "line": 85, + "end_line": 85, "column": 18, "end_column": 20 }, @@ -3312,8 +4667,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 60, - "end_line": 60, + "line": 88, + "end_line": 88, "column": 0, "end_column": 22 }, @@ -3329,8 +4684,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 60, - "end_line": 67, + "line": 88, + "end_line": 95, "column": 23, "end_column": 1 }, @@ -3339,8 +4694,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 61, - "end_line": 61, + "line": 89, + "end_line": 89, "column": 8, "end_column": 25 }, @@ -3348,8 +4703,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 61, - "end_line": 61, + "line": 89, + "end_line": 89, "column": 8, "end_column": 9 }, @@ -3392,8 +4747,8 @@ "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 61, - "end_line": 61, + "line": 89, + "end_line": 89, "column": 12, "end_column": 25 }, @@ -3437,8 +4792,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 62, - "end_line": 62, + "line": 90, + "end_line": 90, "column": 8, "end_column": 35 }, @@ -3446,8 +4801,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 62, - "end_line": 62, + "line": 90, + "end_line": 90, "column": 8, "end_column": 9 }, @@ -3490,8 +4845,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 62, - "end_line": 62, + "line": 90, + "end_line": 90, "column": 12, "end_column": 35 }, @@ -3532,8 +4887,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 62, - "end_line": 62, + "line": 90, + "end_line": 90, "column": 24, "end_column": 34 }, @@ -3557,8 +4912,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 64, - "end_line": 64, + "line": 92, + "end_line": 92, "column": 2, "end_column": 62 }, @@ -3566,8 +4921,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 64, - "end_line": 64, + "line": 92, + "end_line": 92, "column": 2, "end_column": 62 }, @@ -3585,8 +4940,8 @@ "_type": "Not", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 64, - "end_line": 64, + "line": 92, + "end_line": 92, "column": 9, "end_column": 21 }, @@ -3601,8 +4956,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 64, - "end_line": 64, + "line": 92, + "end_line": 92, "column": 10, "end_column": 21 }, @@ -3617,8 +4972,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 64, - "end_line": 64, + "line": 92, + "end_line": 92, "column": 10, "end_column": 21 }, @@ -3633,8 +4988,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 64, - "end_line": 64, + "line": 92, + "end_line": 92, "column": 10, "end_column": 11 }, @@ -3679,8 +5034,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 64, - "end_line": 64, + "line": 92, + "end_line": 92, "column": 10, "end_column": 21 }, @@ -3695,8 +5050,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 64, - "end_line": 64, + "line": 92, + "end_line": 92, "column": 19, "end_column": 20 }, @@ -3746,8 +5101,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, + "line": 93, + "end_line": 93, "column": 2, "end_column": 68 }, @@ -3755,8 +5110,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, + "line": 93, + "end_line": 93, "column": 2, "end_column": 68 }, @@ -3774,8 +5129,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, + "line": 93, + "end_line": 93, "column": 9, "end_column": 32 }, @@ -3790,8 +5145,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, + "line": 93, + "end_line": 93, "column": 9, "end_column": 32 }, @@ -3806,8 +5161,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, + "line": 93, + "end_line": 93, "column": 9, "end_column": 10 }, @@ -3852,8 +5207,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, + "line": 93, + "end_line": 93, "column": 9, "end_column": 32 }, @@ -3868,8 +5223,8 @@ "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, + "line": 93, + "end_line": 93, "column": 18, "end_column": 31 }, @@ -3918,8 +5273,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, + "line": 94, + "end_line": 94, "column": 2, "end_column": 77 }, @@ -3927,8 +5282,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, + "line": 94, + "end_line": 94, "column": 2, "end_column": 77 }, @@ -3946,8 +5301,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, + "line": 94, + "end_line": 94, "column": 9, "end_column": 32 }, @@ -3962,8 +5317,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, + "line": 94, + "end_line": 94, "column": 9, "end_column": 32 }, @@ -3978,8 +5333,8 @@ "_type": "IndexExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, + "line": 94, + "end_line": 94, "column": 9, "end_column": 13 }, @@ -4003,8 +5358,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, + "line": 94, + "end_line": 94, "column": 9, "end_column": 10 }, @@ -4047,8 +5402,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, + "line": 94, + "end_line": 94, "column": 11, "end_column": 12 }, @@ -4069,8 +5424,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, + "line": 94, + "end_line": 94, "column": 9, "end_column": 32 }, @@ -4085,8 +5440,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 66, - "end_line": 66, + "line": 94, + "end_line": 94, "column": 21, "end_column": 31 }, @@ -4132,8 +5487,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 69, + "line": 97, + "end_line": 97, "column": 0, "end_column": 20 }, @@ -4149,8 +5504,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 76, + "line": 97, + "end_line": 104, "column": 21, "end_column": 1 }, @@ -4159,8 +5514,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 70, - "end_line": 70, + "line": 98, + "end_line": 98, "column": 8, "end_column": 41 }, @@ -4168,8 +5523,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 70, - "end_line": 70, + "line": 98, + "end_line": 98, "column": 8, "end_column": 9 }, @@ -4207,8 +5562,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 70, - "end_line": 70, + "line": 98, + "end_line": 98, "column": 12, "end_column": 41 }, @@ -4240,8 +5595,8 @@ ], "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 70, - "end_line": 70, + "line": 98, + "end_line": 98, "column": 12, "end_column": 41 } @@ -4250,8 +5605,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 70, - "end_line": 70, + "line": 98, + "end_line": 98, "column": 12, "end_column": 41 }, @@ -4285,8 +5640,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 70, - "end_line": 70, + "line": 98, + "end_line": 98, "column": 22, "end_column": 40 }, @@ -4317,8 +5672,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 71, - "end_line": 71, + "line": 99, + "end_line": 99, "column": 8, "end_column": 27 }, @@ -4326,8 +5681,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 71, - "end_line": 71, + "line": 99, + "end_line": 99, "column": 8, "end_column": 17 }, @@ -4353,8 +5708,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 71, - "end_line": 71, + "line": 99, + "end_line": 99, "column": 20, "end_column": 27 }, @@ -4378,8 +5733,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 71, - "end_line": 71, + "line": 99, + "end_line": 99, "column": 20, "end_column": 21 }, @@ -4420,8 +5775,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 72, - "end_line": 72, + "line": 100, + "end_line": 100, "column": 8, "end_column": 38 }, @@ -4429,8 +5784,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 72, - "end_line": 72, + "line": 100, + "end_line": 100, "column": 8, "end_column": 24 }, @@ -4456,8 +5811,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 72, - "end_line": 72, + "line": 100, + "end_line": 100, "column": 27, "end_column": 38 }, @@ -4481,8 +5836,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 72, - "end_line": 72, + "line": 100, + "end_line": 100, "column": 27, "end_column": 35 }, @@ -4515,8 +5870,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 72, - "end_line": 72, + "line": 100, + "end_line": 100, "column": 27, "end_column": 28 }, @@ -4558,8 +5913,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 101, + "end_line": 101, "column": 2, "end_column": 44 }, @@ -4567,8 +5922,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 101, + "end_line": 101, "column": 2, "end_column": 44 }, @@ -4586,8 +5941,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 101, + "end_line": 101, "column": 9, "end_column": 43 }, @@ -4602,8 +5957,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 101, + "end_line": 101, "column": 9, "end_column": 43 }, @@ -4618,8 +5973,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 101, + "end_line": 101, "column": 9, "end_column": 18 }, @@ -4647,8 +6002,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 101, + "end_line": 101, "column": 9, "end_column": 43 }, @@ -4663,8 +6018,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 101, + "end_line": 101, "column": 26, "end_column": 42 }, @@ -4696,8 +6051,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 102, + "end_line": 102, "column": 8, "end_column": 49 }, @@ -4705,8 +6060,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 102, + "end_line": 102, "column": 8, "end_column": 10 }, @@ -4777,8 +6132,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 102, + "end_line": 102, "column": 13, "end_column": 49 }, @@ -4843,8 +6198,8 @@ ], "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 102, + "end_line": 102, "column": 13, "end_column": 49 } @@ -4853,8 +6208,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 102, + "end_line": 102, "column": 13, "end_column": 49 }, @@ -4921,8 +6276,8 @@ "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 102, + "end_line": 102, "column": 23, "end_column": 36 }, @@ -4965,8 +6320,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 102, + "end_line": 102, "column": 38, "end_column": 48 }, @@ -4997,8 +6352,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 103, + "end_line": 103, "column": 2, "end_column": 25 }, @@ -5006,8 +6361,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 103, + "end_line": 103, "column": 2, "end_column": 25 }, @@ -5025,8 +6380,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 103, + "end_line": 103, "column": 9, "end_column": 24 }, @@ -5041,8 +6396,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 103, + "end_line": 103, "column": 9, "end_column": 18 }, @@ -5061,8 +6416,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 103, + "end_line": 103, "column": 23, "end_column": 24 }, @@ -5098,8 +6453,8 @@ "_type": "Contract", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 78, - "end_line": 78, + "line": 106, + "end_line": 106, "column": 0, "end_column": 57 }, @@ -5113,8 +6468,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 83, - "end_line": 83, + "line": 111, + "end_line": 111, "column": 2, "end_column": 35 }, @@ -5262,8 +6617,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 83, - "end_line": 95, + "line": 111, + "end_line": 125, "column": 36, "end_column": 3 }, @@ -5272,8 +6627,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 84, - "end_line": 84, + "line": 112, + "end_line": 112, "column": 10, "end_column": 30 }, @@ -5281,8 +6636,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 84, - "end_line": 84, + "line": 112, + "end_line": 112, "column": 10, "end_column": 11 }, @@ -5308,8 +6663,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 84, - "end_line": 84, + "line": 112, + "end_line": 112, "column": 14, "end_column": 30 }, @@ -5337,8 +6692,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 85, - "end_line": 85, + "line": 113, + "end_line": 113, "column": 4, "end_column": 13 }, @@ -5346,8 +6701,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 85, - "end_line": 85, + "line": 113, + "end_line": 113, "column": 4, "end_column": 13 }, @@ -5369,8 +6724,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 86, - "end_line": 86, + "line": 114, + "end_line": 114, "column": 4, "end_column": 34 }, @@ -5378,8 +6733,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 86, - "end_line": 86, + "line": 114, + "end_line": 114, "column": 4, "end_column": 34 }, @@ -5402,8 +6757,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 86, - "end_line": 86, + "line": 114, + "end_line": 114, "column": 9, "end_column": 10 }, @@ -5425,8 +6780,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 86, - "end_line": 86, + "line": 114, + "end_line": 114, "column": 12, "end_column": 14 }, @@ -5448,8 +6803,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 86, - "end_line": 86, + "line": 114, + "end_line": 114, "column": 16, "end_column": 33 }, @@ -5480,8 +6835,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 87, - "end_line": 87, + "line": 115, + "end_line": 115, "column": 4, "end_column": 14 }, @@ -5489,8 +6844,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 87, - "end_line": 87, + "line": 115, + "end_line": 115, "column": 4, "end_column": 14 }, @@ -5512,8 +6867,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 88, - "end_line": 88, + "line": 116, + "end_line": 116, "column": 4, "end_column": 33 }, @@ -5521,8 +6876,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 88, - "end_line": 88, + "line": 116, + "end_line": 116, "column": 4, "end_column": 33 }, @@ -5545,8 +6900,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 88, - "end_line": 88, + "line": 116, + "end_line": 116, "column": 15, "end_column": 32 }, @@ -5577,8 +6932,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 89, - "end_line": 89, + "line": 117, + "end_line": 117, "column": 4, "end_column": 17 }, @@ -5586,8 +6941,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 89, - "end_line": 89, + "line": 117, + "end_line": 117, "column": 4, "end_column": 17 }, @@ -5609,8 +6964,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 90, - "end_line": 90, + "line": 118, + "end_line": 118, "column": 4, "end_column": 15 }, @@ -5618,8 +6973,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 90, - "end_line": 90, + "line": 118, + "end_line": 118, "column": 4, "end_column": 15 }, @@ -5637,12 +6992,132 @@ "args": [] } }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 119, + "end_line": 119, + "column": 4, + "end_column": 16 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 119, + "end_line": 119, + "column": 4, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/arc4-types.algo.ts::testUFixed" + }, + "args": [] + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 120, + "end_line": 120, + "column": 4, + "end_column": 41 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 120, + "end_line": 120, + "column": 4, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/arc4-types.algo.ts::testDynamicBytes" + }, + "args": [ + { + "_type": "CallArg", + "name": null, + "value": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 120, + "end_line": 120, + "column": 27, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Xl-q6ZEbCBZEX", + "encoding": "utf8" + } + } + ] + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 121, + "end_line": 121, + "column": 4, + "end_column": 21 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 121, + "end_line": 121, + "column": 4, + "end_column": 21 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/arc4-types.algo.ts::testStaticBytes" + }, + "args": [] + } + }, { "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 92, + "line": 122, + "end_line": 122, "column": 10, "end_column": 58 }, @@ -5650,8 +7125,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 92, + "line": 122, + "end_line": 122, "column": 10, "end_column": 16 }, @@ -5687,8 +7162,8 @@ "_type": "NewArray", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 92, + "line": 122, + "end_line": 122, "column": 19, "end_column": 58 }, @@ -5718,8 +7193,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 92, + "line": 122, + "end_line": 122, "column": 19, "end_column": 58 } @@ -5731,8 +7206,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 123, + "end_line": 123, "column": 4, "end_column": 31 }, @@ -5740,8 +7215,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 123, + "end_line": 123, "column": 4, "end_column": 31 }, @@ -5759,8 +7234,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 123, + "end_line": 123, "column": 11, "end_column": 30 }, @@ -5775,8 +7250,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 123, + "end_line": 123, "column": 11, "end_column": 24 }, @@ -5794,8 +7269,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 123, + "end_line": 123, "column": 11, "end_column": 17 }, @@ -5831,8 +7306,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 123, + "end_line": 123, "column": 11, "end_column": 24 }, @@ -5854,8 +7329,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 123, + "end_line": 123, "column": 29, "end_column": 30 }, @@ -5878,8 +7353,8 @@ "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 94, - "end_line": 94, + "line": 124, + "end_line": 124, "column": 4, "end_column": 15 }, @@ -5887,8 +7362,8 @@ "_type": "BoolConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 94, - "end_line": 94, + "line": 124, + "end_line": 124, "column": 11, "end_column": 15 }, @@ -5998,8 +7473,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 79, - "end_line": 79, + "line": 107, + "end_line": 107, "column": 2, "end_column": 51 }, @@ -6082,8 +7557,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 79, - "end_line": 81, + "line": 107, + "end_line": 109, "column": 52, "end_column": 3 }, @@ -6092,8 +7567,8 @@ "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 80, - "end_line": 80, + "line": 108, + "end_line": 108, "column": 4, "end_column": 54 }, @@ -6101,8 +7576,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 80, - "end_line": 80, + "line": 108, + "end_line": 108, "column": 11, "end_column": 54 }, @@ -6185,8 +7660,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 80, - "end_line": 80, + "line": 108, + "end_line": 108, "column": 12, "end_column": 22 }, @@ -6213,8 +7688,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 80, - "end_line": 80, + "line": 108, + "end_line": 108, "column": 24, "end_column": 38 }, @@ -6241,8 +7716,8 @@ "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 80, - "end_line": 80, + "line": 108, + "end_line": 108, "column": 40, "end_column": 53 }, @@ -6302,8 +7777,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 78, - "end_line": 78, + "line": 106, + "end_line": 106, "column": 0, "end_column": 57 }, @@ -6319,8 +7794,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 78, - "end_line": 78, + "line": 106, + "end_line": 106, "column": 0, "end_column": 57 }, @@ -6329,8 +7804,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 78, - "end_line": 78, + "line": 106, + "end_line": 106, "column": 0, "end_column": 57 }, @@ -6338,8 +7813,8 @@ "_type": "VoidConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 78, - "end_line": 78, + "line": 106, + "end_line": 106, "column": 0, "end_column": 57 }, diff --git a/tests/expected-output.spec.ts b/tests/expected-output.spec.ts index ba4cd521..313a0577 100644 --- a/tests/expected-output.spec.ts +++ b/tests/expected-output.spec.ts @@ -158,7 +158,6 @@ function extractExpectLogs(sourceFile: ts.SourceFile, programDirectory: string) }) } } - return node } return ts.visitEachChild(node, visit, undefined) diff --git a/tests/expected-output/arc4-types.algo.ts b/tests/expected-output/arc4-types.algo.ts new file mode 100644 index 00000000..4b39f5c6 --- /dev/null +++ b/tests/expected-output/arc4-types.algo.ts @@ -0,0 +1,122 @@ +import type { biguint, bytes, uint64 } from '@algorandfoundation/algorand-typescript' +import { arc4, assert, BaseContract, Bytes, Txn } from '@algorandfoundation/algorand-typescript' +import { + Address, + Byte, + DynamicArray, + DynamicBytes, + StaticArray, + StaticBytes, + Str, + Tuple, + UFixedNxM, + UintN, +} from '@algorandfoundation/algorand-typescript/arc4' + +function testUFixed() { + const a = new UFixedNxM('1.244', 32, 4) + const c = new UFixedNxM<32, 4>('1.244') + + assert(a.equals(c)) +} + +function test(n: uint64, b: biguint, c: UintN<256>) { + const x = new UintN<8>(4) + assert(x.bytes.length === 1) + const x2 = new UintN<8>(255n) + assert(x2.bytes === Bytes.fromHex('ff')) + + const y = new UintN<16>() + assert(y.bytes.length === 2) + const z = new UintN<8>(n) + const z_native = z.native + assert(z_native === n) + const a = new UintN<128>(b) + const a_native = a.native + assert(a_native === b) + + assert(c.bytes.length === 256 / 8) +} + +function testStr() { + const s1 = new Str() + assert(s1.bytes === new UintN<16>(0).bytes, 'Empty string should equal the uint16 length prefix') + const s2 = new Str('Hello') + assert(s2.native === 'Hello') +} + +function testDynamicBytes(someBytes: bytes) { + const db1 = new DynamicBytes() + const db2 = new DynamicBytes(someBytes) + const db3 = new DynamicBytes('hello') +} + +function testStaticBytes() { + // @expect-error StaticBytes length must be greater than or equal to 0 + const s1 = new StaticBytes<-1>() + // @expect-error Value should have byte length of 4 + const s2 = new StaticBytes<4>('') +} + +type ARC4Uint64 = UintN<64> +const ARC4Uint64 = UintN<64> + +function testArrays(n: ARC4Uint64) { + const myArray = new DynamicArray(n, n, n) + + myArray.push(n) + + const myStatic = new StaticArray(n, n) + + assert(myStatic[0].equals(myArray.pop())) + + myStatic[1] = new UintN<64>(50) + + // const myStatic2 = new StaticArray(n, n, n) +} + +function testByte() { + const b = new Byte() + const b2 = new Byte(0) + assert(b.equals(b2)) +} + +function testAddress() { + const a = new Address() + const b = new Address(Txn.sender) + + assert(!a.equals(b), 'Zero address should not match sender') + assert(a.equals(new Address()), 'Two zero addresses should match') + assert(a[0].equals(new Byte()), 'Zero address should start with zero byte') +} + +function testTuple() { + const t = new Tuple(new ARC4Uint64(34)) + const firstItem = t.at(0) + const firstItemIndexer = t.native[0] + assert(firstItem.equals(firstItemIndexer)) + const t1 = new Tuple(new Address(), new Byte()) + assert(t1.length === 2) +} + +export class Arc4TypesTestContract extends BaseContract { + public getArc4Values(): [Byte, UintN<8>, Address] { + return [new Byte(), new UintN(255), new Address()] + } + + public approvalProgram(): boolean { + const x = new ARC4Uint64() + testStr() + test(1, 2n, new UintN<256>(4)) + testByte() + testArrays(new UintN<64>(65)) + testAddress() + testTuple() + testUFixed() + testDynamicBytes(Bytes('hmmmmmmmmm')) + testStaticBytes() + const result = new arc4.DynamicArray>() + assert(result.length === 0) + return true + } +} diff --git a/tests/expected-output/null-values.algo.ts b/tests/expected-output/null-values.algo.ts index c1f6c2be..97a8981e 100644 --- a/tests/expected-output/null-values.algo.ts +++ b/tests/expected-output/null-values.algo.ts @@ -1,6 +1,7 @@ // @expect-error Not Supported: Null values const a: null = null +// @expect-error Not Supported: The type null is not supported export function test(): null { // @expect-error Not Supported: Null values return null diff --git a/tests/onchain/accounts.spec.ts b/tests/onchain/accounts.spec.ts index 180cdf24..1abfb68f 100644 --- a/tests/onchain/accounts.spec.ts +++ b/tests/onchain/accounts.spec.ts @@ -1,3 +1,4 @@ +import { microAlgo } from '@algorandfoundation/algokit-utils' import { describe } from 'vitest' import { createArc4TestFixture } from './util/test-fixture' @@ -7,7 +8,7 @@ describe('accounts', () => { test('returns account data', async ({ appClientAccountsContract: appClient, expect, assetFactory, testAccount }) => { const asset = await assetFactory({ assetName: 'Asset 1', sender: testAccount.addr, total: 1n }) - const result = await appClient.send.call({ method: 'getAccountInfo', args: [testAccount.addr, asset] }) + const result = await appClient.send.call({ method: 'getAccountInfo', args: [testAccount.addr, asset], extraFee: microAlgo(2000) }) const returnValue = result.return as { bytes: number[] From 5451cd313d59fdb58e67a3628201024042ae3b36 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Wed, 27 Nov 2024 10:25:54 -0800 Subject: [PATCH 14/30] build: Override npm version to resolve audit issue --- package-lock.json | 1189 +++++++++++++++++++++------------ package.json | 3 +- packages/algo-ts/package.json | 4 +- 3 files changed, 776 insertions(+), 420 deletions(-) diff --git a/package-lock.json b/package-lock.json index 10171c3d..707d9c9f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6950,9 +6950,9 @@ } }, "node_modules/npm": { - "version": "10.8.3", - "resolved": "https://registry.npmjs.org/npm/-/npm-10.8.3.tgz", - "integrity": "sha512-0IQlyAYvVtQ7uOhDFYZCGK8kkut2nh8cpAdA9E6FvRSJaTgtZRZgNjlC5ZCct//L73ygrpY93CxXpRJDtNqPVg==", + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/npm/-/npm-10.9.1.tgz", + "integrity": "sha512-yJUw03xLqjiv1D52oHeoS5qmOEC5hkJlhP1cWlSrCgshuxWVyFEEK3M3hLC0NwbTaklLTYrhoIanYsuNP5WUKg==", "bundleDependencies": [ "@isaacs/string-locale-compare", "@npmcli/arborist", @@ -7034,73 +7034,73 @@ ], "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/arborist": "^7.5.4", - "@npmcli/config": "^8.3.4", - "@npmcli/fs": "^3.1.1", - "@npmcli/map-workspaces": "^3.0.6", - "@npmcli/package-json": "^5.2.0", - "@npmcli/promise-spawn": "^7.0.2", - "@npmcli/redact": "^2.0.1", - "@npmcli/run-script": "^8.1.0", - "@sigstore/tuf": "^2.3.4", - "abbrev": "^2.0.0", + "@npmcli/arborist": "^8.0.0", + "@npmcli/config": "^9.0.0", + "@npmcli/fs": "^4.0.0", + "@npmcli/map-workspaces": "^4.0.1", + "@npmcli/package-json": "^6.0.1", + "@npmcli/promise-spawn": "^8.0.2", + "@npmcli/redact": "^3.0.0", + "@npmcli/run-script": "^9.0.1", + "@sigstore/tuf": "^3.0.0", + "abbrev": "^3.0.0", "archy": "~1.0.0", - "cacache": "^18.0.4", + "cacache": "^19.0.1", "chalk": "^5.3.0", - "ci-info": "^4.0.0", + "ci-info": "^4.1.0", "cli-columns": "^4.0.0", "fastest-levenshtein": "^1.0.16", "fs-minipass": "^3.0.3", "glob": "^10.4.5", "graceful-fs": "^4.2.11", - "hosted-git-info": "^7.0.2", - "ini": "^4.1.3", - "init-package-json": "^6.0.3", + "hosted-git-info": "^8.0.2", + "ini": "^5.0.0", + "init-package-json": "^7.0.1", "is-cidr": "^5.1.0", - "json-parse-even-better-errors": "^3.0.2", - "libnpmaccess": "^8.0.6", - "libnpmdiff": "^6.1.4", - "libnpmexec": "^8.1.4", - "libnpmfund": "^5.0.12", - "libnpmhook": "^10.0.5", - "libnpmorg": "^6.0.6", - "libnpmpack": "^7.0.4", - "libnpmpublish": "^9.0.9", - "libnpmsearch": "^7.0.6", - "libnpmteam": "^6.0.5", - "libnpmversion": "^6.0.3", - "make-fetch-happen": "^13.0.1", + "json-parse-even-better-errors": "^4.0.0", + "libnpmaccess": "^9.0.0", + "libnpmdiff": "^7.0.0", + "libnpmexec": "^9.0.0", + "libnpmfund": "^6.0.0", + "libnpmhook": "^11.0.0", + "libnpmorg": "^7.0.0", + "libnpmpack": "^8.0.0", + "libnpmpublish": "^10.0.1", + "libnpmsearch": "^8.0.0", + "libnpmteam": "^7.0.0", + "libnpmversion": "^7.0.0", + "make-fetch-happen": "^14.0.3", "minimatch": "^9.0.5", "minipass": "^7.1.1", "minipass-pipeline": "^1.2.4", "ms": "^2.1.2", "node-gyp": "^10.2.0", - "nopt": "^7.2.1", - "normalize-package-data": "^6.0.2", - "npm-audit-report": "^5.0.0", - "npm-install-checks": "^6.3.0", - "npm-package-arg": "^11.0.3", - "npm-pick-manifest": "^9.1.0", - "npm-profile": "^10.0.0", - "npm-registry-fetch": "^17.1.0", - "npm-user-validate": "^2.0.1", + "nopt": "^8.0.0", + "normalize-package-data": "^7.0.0", + "npm-audit-report": "^6.0.0", + "npm-install-checks": "^7.1.1", + "npm-package-arg": "^12.0.0", + "npm-pick-manifest": "^10.0.0", + "npm-profile": "^11.0.1", + "npm-registry-fetch": "^18.0.2", + "npm-user-validate": "^3.0.0", "p-map": "^4.0.0", - "pacote": "^18.0.6", - "parse-conflict-json": "^3.0.1", - "proc-log": "^4.2.0", + "pacote": "^19.0.1", + "parse-conflict-json": "^4.0.0", + "proc-log": "^5.0.0", "qrcode-terminal": "^0.12.0", - "read": "^3.0.1", + "read": "^4.0.0", "semver": "^7.6.3", "spdx-expression-parse": "^4.0.0", - "ssri": "^10.0.6", + "ssri": "^12.0.0", "supports-color": "^9.4.0", "tar": "^6.2.1", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", "treeverse": "^3.0.0", - "validate-npm-package-name": "^5.0.1", - "which": "^4.0.0", - "write-file-atomic": "^5.0.1" + "validate-npm-package-name": "^6.0.0", + "which": "^5.0.0", + "write-file-atomic": "^6.0.0" }, "bin": { "npm": "bin/npm-cli.js", @@ -7275,7 +7275,7 @@ } }, "node_modules/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", + "version": "6.1.0", "dev": true, "inBundle": true, "license": "MIT", @@ -7324,6 +7324,18 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/npm/node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/npm/node_modules/@isaacs/string-locale-compare": { "version": "1.1.0", "dev": true, @@ -7331,7 +7343,7 @@ "license": "ISC" }, "node_modules/npm/node_modules/@npmcli/agent": { - "version": "2.2.2", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "ISC", @@ -7343,48 +7355,48 @@ "socks-proxy-agent": "^8.0.3" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/arborist": { - "version": "7.5.4", + "version": "8.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/fs": "^3.1.1", - "@npmcli/installed-package-contents": "^2.1.0", - "@npmcli/map-workspaces": "^3.0.2", - "@npmcli/metavuln-calculator": "^7.1.1", - "@npmcli/name-from-folder": "^2.0.0", - "@npmcli/node-gyp": "^3.0.0", - "@npmcli/package-json": "^5.1.0", - "@npmcli/query": "^3.1.0", - "@npmcli/redact": "^2.0.0", - "@npmcli/run-script": "^8.1.0", - "bin-links": "^4.0.4", - "cacache": "^18.0.3", + "@npmcli/fs": "^4.0.0", + "@npmcli/installed-package-contents": "^3.0.0", + "@npmcli/map-workspaces": "^4.0.1", + "@npmcli/metavuln-calculator": "^8.0.0", + "@npmcli/name-from-folder": "^3.0.0", + "@npmcli/node-gyp": "^4.0.0", + "@npmcli/package-json": "^6.0.1", + "@npmcli/query": "^4.0.0", + "@npmcli/redact": "^3.0.0", + "@npmcli/run-script": "^9.0.1", + "bin-links": "^5.0.0", + "cacache": "^19.0.1", "common-ancestor-path": "^1.0.1", - "hosted-git-info": "^7.0.2", - "json-parse-even-better-errors": "^3.0.2", + "hosted-git-info": "^8.0.0", + "json-parse-even-better-errors": "^4.0.0", "json-stringify-nice": "^1.1.4", "lru-cache": "^10.2.2", "minimatch": "^9.0.4", - "nopt": "^7.2.1", - "npm-install-checks": "^6.2.0", - "npm-package-arg": "^11.0.2", - "npm-pick-manifest": "^9.0.1", - "npm-registry-fetch": "^17.0.1", - "pacote": "^18.0.6", - "parse-conflict-json": "^3.0.0", - "proc-log": "^4.2.0", - "proggy": "^2.0.0", + "nopt": "^8.0.0", + "npm-install-checks": "^7.1.0", + "npm-package-arg": "^12.0.0", + "npm-pick-manifest": "^10.0.0", + "npm-registry-fetch": "^18.0.1", + "pacote": "^19.0.0", + "parse-conflict-json": "^4.0.0", + "proc-log": "^5.0.0", + "proggy": "^3.0.0", "promise-all-reject-late": "^1.0.0", "promise-call-limit": "^3.0.1", - "read-package-json-fast": "^3.0.2", + "read-package-json-fast": "^4.0.0", "semver": "^7.3.7", - "ssri": "^10.0.6", + "ssri": "^12.0.0", "treeverse": "^3.0.0", "walk-up-path": "^3.0.1" }, @@ -7392,30 +7404,30 @@ "arborist": "bin/index.js" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/config": { - "version": "8.3.4", + "version": "9.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/map-workspaces": "^3.0.2", - "@npmcli/package-json": "^5.1.1", + "@npmcli/map-workspaces": "^4.0.1", + "@npmcli/package-json": "^6.0.1", "ci-info": "^4.0.0", - "ini": "^4.1.2", - "nopt": "^7.2.1", - "proc-log": "^4.2.0", + "ini": "^5.0.0", + "nopt": "^8.0.0", + "proc-log": "^5.0.0", "semver": "^7.3.5", "walk-up-path": "^3.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/fs": { - "version": "3.1.1", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", @@ -7423,160 +7435,191 @@ "semver": "^7.3.5" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/git": { - "version": "5.0.8", + "version": "6.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/promise-spawn": "^7.0.0", - "ini": "^4.1.3", + "@npmcli/promise-spawn": "^8.0.0", + "ini": "^5.0.0", "lru-cache": "^10.0.1", - "npm-pick-manifest": "^9.0.0", - "proc-log": "^4.0.0", + "npm-pick-manifest": "^10.0.0", + "proc-log": "^5.0.0", "promise-inflight": "^1.0.1", "promise-retry": "^2.0.1", "semver": "^7.3.5", - "which": "^4.0.0" + "which": "^5.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/installed-package-contents": { - "version": "2.1.0", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "npm-bundled": "^3.0.0", - "npm-normalize-package-bin": "^3.0.0" + "npm-bundled": "^4.0.0", + "npm-normalize-package-bin": "^4.0.0" }, "bin": { "installed-package-contents": "bin/index.js" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/map-workspaces": { - "version": "3.0.6", + "version": "4.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/name-from-folder": "^2.0.0", + "@npmcli/name-from-folder": "^3.0.0", + "@npmcli/package-json": "^6.0.0", "glob": "^10.2.2", - "minimatch": "^9.0.0", - "read-package-json-fast": "^3.0.0" + "minimatch": "^9.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/metavuln-calculator": { - "version": "7.1.1", + "version": "8.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "cacache": "^18.0.0", - "json-parse-even-better-errors": "^3.0.0", - "pacote": "^18.0.0", - "proc-log": "^4.1.0", + "cacache": "^19.0.0", + "json-parse-even-better-errors": "^4.0.0", + "pacote": "^20.0.0", + "proc-log": "^5.0.0", "semver": "^7.3.5" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/@npmcli/metavuln-calculator/node_modules/pacote": { + "version": "20.0.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/git": "^6.0.0", + "@npmcli/installed-package-contents": "^3.0.0", + "@npmcli/package-json": "^6.0.0", + "@npmcli/promise-spawn": "^8.0.0", + "@npmcli/run-script": "^9.0.0", + "cacache": "^19.0.0", + "fs-minipass": "^3.0.0", + "minipass": "^7.0.2", + "npm-package-arg": "^12.0.0", + "npm-packlist": "^9.0.0", + "npm-pick-manifest": "^10.0.0", + "npm-registry-fetch": "^18.0.0", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1", + "sigstore": "^3.0.0", + "ssri": "^12.0.0", + "tar": "^6.1.11" + }, + "bin": { + "pacote": "bin/index.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/name-from-folder": { - "version": "2.0.0", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/node-gyp": { - "version": "3.0.0", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/package-json": { - "version": "5.2.0", + "version": "6.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/git": "^5.0.0", + "@npmcli/git": "^6.0.0", "glob": "^10.2.2", - "hosted-git-info": "^7.0.0", - "json-parse-even-better-errors": "^3.0.0", - "normalize-package-data": "^6.0.0", - "proc-log": "^4.0.0", + "hosted-git-info": "^8.0.0", + "json-parse-even-better-errors": "^4.0.0", + "normalize-package-data": "^7.0.0", + "proc-log": "^5.0.0", "semver": "^7.5.3" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/promise-spawn": { - "version": "7.0.2", + "version": "8.0.2", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "which": "^4.0.0" + "which": "^5.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/query": { - "version": "3.1.0", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "postcss-selector-parser": "^6.0.10" + "postcss-selector-parser": "^6.1.2" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/redact": { - "version": "2.0.1", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@npmcli/run-script": { - "version": "8.1.0", + "version": "9.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/node-gyp": "^3.0.0", - "@npmcli/package-json": "^5.0.0", - "@npmcli/promise-spawn": "^7.0.0", + "@npmcli/node-gyp": "^4.0.0", + "@npmcli/package-json": "^6.0.0", + "@npmcli/promise-spawn": "^8.0.0", "node-gyp": "^10.0.0", - "proc-log": "^4.0.0", - "which": "^4.0.0" + "proc-log": "^5.0.0", + "which": "^5.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@pkgjs/parseargs": { @@ -7589,27 +7632,6 @@ "node": ">=14" } }, - "node_modules/npm/node_modules/@sigstore/bundle": { - "version": "2.3.2", - "dev": true, - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@sigstore/protobuf-specs": "^0.3.2" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@sigstore/core": { - "version": "1.1.0", - "dev": true, - "inBundle": true, - "license": "Apache-2.0", - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, "node_modules/npm/node_modules/@sigstore/protobuf-specs": { "version": "0.3.2", "dev": true, @@ -7619,48 +7641,17 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/npm/node_modules/@sigstore/sign": { - "version": "2.3.2", - "dev": true, - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@sigstore/bundle": "^2.3.2", - "@sigstore/core": "^1.0.0", - "@sigstore/protobuf-specs": "^0.3.2", - "make-fetch-happen": "^13.0.1", - "proc-log": "^4.2.0", - "promise-retry": "^2.0.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, "node_modules/npm/node_modules/@sigstore/tuf": { - "version": "2.3.4", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { "@sigstore/protobuf-specs": "^0.3.2", - "tuf-js": "^2.2.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@sigstore/verify": { - "version": "1.2.1", - "dev": true, - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@sigstore/bundle": "^2.3.2", - "@sigstore/core": "^1.1.0", - "@sigstore/protobuf-specs": "^0.3.2" + "tuf-js": "^3.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/@tufjs/canonical-json": { @@ -7672,26 +7663,13 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/npm/node_modules/@tufjs/models": { - "version": "2.0.1", - "dev": true, - "inBundle": true, - "license": "MIT", - "dependencies": { - "@tufjs/canonical-json": "2.0.0", - "minimatch": "^9.0.4" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, "node_modules/npm/node_modules/abbrev": { - "version": "2.0.0", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/agent-base": { @@ -7759,18 +7737,19 @@ "license": "MIT" }, "node_modules/npm/node_modules/bin-links": { - "version": "4.0.4", + "version": "5.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "cmd-shim": "^6.0.0", - "npm-normalize-package-bin": "^3.0.0", - "read-cmd-shim": "^4.0.0", - "write-file-atomic": "^5.0.0" + "cmd-shim": "^7.0.0", + "npm-normalize-package-bin": "^4.0.0", + "proc-log": "^5.0.0", + "read-cmd-shim": "^5.0.0", + "write-file-atomic": "^6.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/binary-extensions": { @@ -7795,12 +7774,12 @@ } }, "node_modules/npm/node_modules/cacache": { - "version": "18.0.4", + "version": "19.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/fs": "^3.1.0", + "@npmcli/fs": "^4.0.0", "fs-minipass": "^3.0.0", "glob": "^10.2.2", "lru-cache": "^10.0.1", @@ -7808,13 +7787,88 @@ "minipass-collect": "^2.0.1", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", - "p-map": "^4.0.0", - "ssri": "^10.0.0", - "tar": "^6.1.11", - "unique-filename": "^3.0.0" + "p-map": "^7.0.2", + "ssri": "^12.0.0", + "tar": "^7.4.3", + "unique-filename": "^4.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/chownr": { + "version": "3.0.0", + "dev": true, + "inBundle": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/minizlib": { + "version": "3.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.4", + "rimraf": "^5.0.5" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/mkdirp": { + "version": "3.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/p-map": { + "version": "7.0.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/tar": { + "version": "7.4.3", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/npm/node_modules/cacache/node_modules/yallist": { + "version": "5.0.0", + "dev": true, + "inBundle": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" } }, "node_modules/npm/node_modules/chalk": { @@ -7839,7 +7893,7 @@ } }, "node_modules/npm/node_modules/ci-info": { - "version": "4.0.0", + "version": "4.1.0", "dev": true, "funding": [ { @@ -7888,12 +7942,12 @@ } }, "node_modules/npm/node_modules/cmd-shim": { - "version": "6.0.3", + "version": "7.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/color-convert": { @@ -7921,7 +7975,7 @@ "license": "ISC" }, "node_modules/npm/node_modules/cross-spawn": { - "version": "7.0.3", + "version": "7.0.6", "dev": true, "inBundle": true, "license": "MIT", @@ -7962,12 +8016,12 @@ } }, "node_modules/npm/node_modules/debug": { - "version": "4.3.6", + "version": "4.3.7", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -7978,12 +8032,6 @@ } } }, - "node_modules/npm/node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "inBundle": true, - "license": "MIT" - }, "node_modules/npm/node_modules/diff": { "version": "5.2.0", "dev": true, @@ -8100,7 +8148,7 @@ "license": "ISC" }, "node_modules/npm/node_modules/hosted-git-info": { - "version": "7.0.2", + "version": "8.0.2", "dev": true, "inBundle": true, "license": "ISC", @@ -8108,7 +8156,7 @@ "lru-cache": "^10.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/http-cache-semantics": { @@ -8157,7 +8205,7 @@ } }, "node_modules/npm/node_modules/ignore-walk": { - "version": "6.0.5", + "version": "7.0.0", "dev": true, "inBundle": true, "license": "ISC", @@ -8165,7 +8213,7 @@ "minimatch": "^9.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/imurmurhash": { @@ -8187,30 +8235,30 @@ } }, "node_modules/npm/node_modules/ini": { - "version": "4.1.3", + "version": "5.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/init-package-json": { - "version": "6.0.3", + "version": "7.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/package-json": "^5.0.0", - "npm-package-arg": "^11.0.0", - "promzard": "^1.0.0", - "read": "^3.0.1", + "@npmcli/package-json": "^6.0.0", + "npm-package-arg": "^12.0.0", + "promzard": "^2.0.0", + "read": "^4.0.0", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4", - "validate-npm-package-name": "^5.0.0" + "validate-npm-package-name": "^6.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/ip-address": { @@ -8293,12 +8341,12 @@ "license": "MIT" }, "node_modules/npm/node_modules/json-parse-even-better-errors": { - "version": "3.0.2", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "MIT", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/json-stringify-nice": { @@ -8332,169 +8380,169 @@ "license": "MIT" }, "node_modules/npm/node_modules/libnpmaccess": { - "version": "8.0.6", + "version": "9.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "npm-package-arg": "^11.0.2", - "npm-registry-fetch": "^17.0.1" + "npm-package-arg": "^12.0.0", + "npm-registry-fetch": "^18.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmdiff": { - "version": "6.1.4", + "version": "7.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/arborist": "^7.5.4", - "@npmcli/installed-package-contents": "^2.1.0", + "@npmcli/arborist": "^8.0.0", + "@npmcli/installed-package-contents": "^3.0.0", "binary-extensions": "^2.3.0", "diff": "^5.1.0", "minimatch": "^9.0.4", - "npm-package-arg": "^11.0.2", - "pacote": "^18.0.6", + "npm-package-arg": "^12.0.0", + "pacote": "^19.0.0", "tar": "^6.2.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmexec": { - "version": "8.1.4", + "version": "9.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/arborist": "^7.5.4", - "@npmcli/run-script": "^8.1.0", + "@npmcli/arborist": "^8.0.0", + "@npmcli/run-script": "^9.0.1", "ci-info": "^4.0.0", - "npm-package-arg": "^11.0.2", - "pacote": "^18.0.6", - "proc-log": "^4.2.0", - "read": "^3.0.1", - "read-package-json-fast": "^3.0.2", + "npm-package-arg": "^12.0.0", + "pacote": "^19.0.0", + "proc-log": "^5.0.0", + "read": "^4.0.0", + "read-package-json-fast": "^4.0.0", "semver": "^7.3.7", "walk-up-path": "^3.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmfund": { - "version": "5.0.12", + "version": "6.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/arborist": "^7.5.4" + "@npmcli/arborist": "^8.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmhook": { - "version": "10.0.5", + "version": "11.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^17.0.1" + "npm-registry-fetch": "^18.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmorg": { - "version": "6.0.6", + "version": "7.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^17.0.1" + "npm-registry-fetch": "^18.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmpack": { - "version": "7.0.4", + "version": "8.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/arborist": "^7.5.4", - "@npmcli/run-script": "^8.1.0", - "npm-package-arg": "^11.0.2", - "pacote": "^18.0.6" + "@npmcli/arborist": "^8.0.0", + "@npmcli/run-script": "^9.0.1", + "npm-package-arg": "^12.0.0", + "pacote": "^19.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmpublish": { - "version": "9.0.9", + "version": "10.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { "ci-info": "^4.0.0", - "normalize-package-data": "^6.0.1", - "npm-package-arg": "^11.0.2", - "npm-registry-fetch": "^17.0.1", - "proc-log": "^4.2.0", + "normalize-package-data": "^7.0.0", + "npm-package-arg": "^12.0.0", + "npm-registry-fetch": "^18.0.1", + "proc-log": "^5.0.0", "semver": "^7.3.7", - "sigstore": "^2.2.0", - "ssri": "^10.0.6" + "sigstore": "^3.0.0", + "ssri": "^12.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmsearch": { - "version": "7.0.6", + "version": "8.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "npm-registry-fetch": "^17.0.1" + "npm-registry-fetch": "^18.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmteam": { - "version": "6.0.5", + "version": "7.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { "aproba": "^2.0.0", - "npm-registry-fetch": "^17.0.1" + "npm-registry-fetch": "^18.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/libnpmversion": { - "version": "6.0.3", + "version": "7.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/git": "^5.0.7", - "@npmcli/run-script": "^8.1.0", - "json-parse-even-better-errors": "^3.0.2", - "proc-log": "^4.2.0", + "@npmcli/git": "^6.0.1", + "@npmcli/run-script": "^9.0.1", + "json-parse-even-better-errors": "^4.0.0", + "proc-log": "^5.0.0", "semver": "^7.3.7" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/lru-cache": { @@ -8504,26 +8552,34 @@ "license": "ISC" }, "node_modules/npm/node_modules/make-fetch-happen": { - "version": "13.0.1", + "version": "14.0.3", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/agent": "^2.0.0", - "cacache": "^18.0.0", + "@npmcli/agent": "^3.0.0", + "cacache": "^19.0.1", "http-cache-semantics": "^4.1.1", - "is-lambda": "^1.0.1", "minipass": "^7.0.2", - "minipass-fetch": "^3.0.0", + "minipass-fetch": "^4.0.0", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "proc-log": "^4.2.0", + "negotiator": "^1.0.0", + "proc-log": "^5.0.0", "promise-retry": "^2.0.1", - "ssri": "^10.0.0" + "ssri": "^12.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/make-fetch-happen/node_modules/negotiator": { + "version": "1.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" } }, "node_modules/npm/node_modules/minimatch": { @@ -8563,22 +8619,35 @@ } }, "node_modules/npm/node_modules/minipass-fetch": { - "version": "3.0.5", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { "minipass": "^7.0.3", "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" + "minizlib": "^3.0.1" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" }, "optionalDependencies": { "encoding": "^0.1.13" } }, + "node_modules/npm/node_modules/minipass-fetch/node_modules/minizlib": { + "version": "3.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.4", + "rimraf": "^5.0.5" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/npm/node_modules/minipass-flush": { "version": "1.0.5", "dev": true, @@ -8695,16 +8764,16 @@ "license": "MIT" }, "node_modules/npm/node_modules/mute-stream": { - "version": "1.0.0", + "version": "2.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/negotiator": { - "version": "0.6.3", + "version": "0.6.4", "dev": true, "inBundle": true, "license": "MIT", @@ -8736,7 +8805,116 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/npm/node_modules/nopt": { + "node_modules/npm/node_modules/node-gyp/node_modules/@npmcli/agent": { + "version": "2.2.2", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^10.0.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/@npmcli/fs": { + "version": "3.1.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/abbrev": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/cacache": { + "version": "18.0.4", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^10.0.1", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/isexe": { + "version": "3.1.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">=16" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/make-fetch-happen": { + "version": "13.0.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "@npmcli/agent": "^2.0.0", + "cacache": "^18.0.0", + "http-cache-semantics": "^4.1.1", + "is-lambda": "^1.0.1", + "minipass": "^7.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "proc-log": "^4.2.0", + "promise-retry": "^2.0.1", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/minipass-fetch": { + "version": "3.0.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/nopt": { "version": "7.2.1", "dev": true, "inBundle": true, @@ -8751,43 +8929,127 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/npm/node_modules/node-gyp/node_modules/proc-log": { + "version": "4.2.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/ssri": { + "version": "10.0.6", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/unique-filename": { + "version": "3.0.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/unique-slug": { + "version": "4.0.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/node-gyp/node_modules/which": { + "version": "4.0.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "isexe": "^3.1.1" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm/node_modules/nopt": { + "version": "8.0.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "abbrev": "^2.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/nopt/node_modules/abbrev": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/npm/node_modules/normalize-package-data": { - "version": "6.0.2", + "version": "7.0.0", "dev": true, "inBundle": true, "license": "BSD-2-Clause", "dependencies": { - "hosted-git-info": "^7.0.0", + "hosted-git-info": "^8.0.0", "semver": "^7.3.5", "validate-npm-package-license": "^3.0.4" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-audit-report": { - "version": "5.0.0", + "version": "6.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-bundled": { - "version": "3.0.1", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "npm-normalize-package-bin": "^3.0.0" + "npm-normalize-package-bin": "^4.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-install-checks": { - "version": "6.3.0", + "version": "7.1.1", "dev": true, "inBundle": true, "license": "BSD-2-Clause", @@ -8795,99 +9057,112 @@ "semver": "^7.1.1" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-normalize-package-bin": { - "version": "3.0.1", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-package-arg": { - "version": "11.0.3", + "version": "12.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "hosted-git-info": "^7.0.0", - "proc-log": "^4.0.0", + "hosted-git-info": "^8.0.0", + "proc-log": "^5.0.0", "semver": "^7.3.5", - "validate-npm-package-name": "^5.0.0" + "validate-npm-package-name": "^6.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-packlist": { - "version": "8.0.2", + "version": "9.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "ignore-walk": "^6.0.4" + "ignore-walk": "^7.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-pick-manifest": { - "version": "9.1.0", + "version": "10.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "npm-install-checks": "^6.0.0", - "npm-normalize-package-bin": "^3.0.0", - "npm-package-arg": "^11.0.0", + "npm-install-checks": "^7.1.0", + "npm-normalize-package-bin": "^4.0.0", + "npm-package-arg": "^12.0.0", "semver": "^7.3.5" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-profile": { - "version": "10.0.0", + "version": "11.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "npm-registry-fetch": "^17.0.1", - "proc-log": "^4.0.0" + "npm-registry-fetch": "^18.0.0", + "proc-log": "^5.0.0" }, "engines": { - "node": ">=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/npm-registry-fetch": { - "version": "17.1.0", + "version": "18.0.2", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/redact": "^2.0.0", + "@npmcli/redact": "^3.0.0", "jsonparse": "^1.3.1", - "make-fetch-happen": "^13.0.0", + "make-fetch-happen": "^14.0.0", "minipass": "^7.0.2", - "minipass-fetch": "^3.0.0", - "minizlib": "^2.1.2", - "npm-package-arg": "^11.0.0", - "proc-log": "^4.0.0" + "minipass-fetch": "^4.0.0", + "minizlib": "^3.0.1", + "npm-package-arg": "^12.0.0", + "proc-log": "^5.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/npm-registry-fetch/node_modules/minizlib": { + "version": "3.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.4", + "rimraf": "^5.0.5" + }, + "engines": { + "node": ">= 18" } }, "node_modules/npm/node_modules/npm-user-validate": { - "version": "2.0.1", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "BSD-2-Clause", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/p-map": { @@ -8906,54 +9181,54 @@ } }, "node_modules/npm/node_modules/package-json-from-dist": { - "version": "1.0.0", + "version": "1.0.1", "dev": true, "inBundle": true, "license": "BlueOak-1.0.0" }, "node_modules/npm/node_modules/pacote": { - "version": "18.0.6", + "version": "19.0.1", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "@npmcli/git": "^5.0.0", - "@npmcli/installed-package-contents": "^2.0.1", - "@npmcli/package-json": "^5.1.0", - "@npmcli/promise-spawn": "^7.0.0", - "@npmcli/run-script": "^8.0.0", - "cacache": "^18.0.0", + "@npmcli/git": "^6.0.0", + "@npmcli/installed-package-contents": "^3.0.0", + "@npmcli/package-json": "^6.0.0", + "@npmcli/promise-spawn": "^8.0.0", + "@npmcli/run-script": "^9.0.0", + "cacache": "^19.0.0", "fs-minipass": "^3.0.0", "minipass": "^7.0.2", - "npm-package-arg": "^11.0.0", - "npm-packlist": "^8.0.0", - "npm-pick-manifest": "^9.0.0", - "npm-registry-fetch": "^17.0.0", - "proc-log": "^4.0.0", + "npm-package-arg": "^12.0.0", + "npm-packlist": "^9.0.0", + "npm-pick-manifest": "^10.0.0", + "npm-registry-fetch": "^18.0.0", + "proc-log": "^5.0.0", "promise-retry": "^2.0.1", - "sigstore": "^2.2.0", - "ssri": "^10.0.0", + "sigstore": "^3.0.0", + "ssri": "^12.0.0", "tar": "^6.1.11" }, "bin": { "pacote": "bin/index.js" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/parse-conflict-json": { - "version": "3.0.1", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "json-parse-even-better-errors": "^3.0.0", + "json-parse-even-better-errors": "^4.0.0", "just-diff": "^6.0.0", "just-diff-apply": "^5.2.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/path-key": { @@ -8995,21 +9270,21 @@ } }, "node_modules/npm/node_modules/proc-log": { - "version": "4.2.0", + "version": "5.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/proggy": { - "version": "2.0.0", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/promise-all-reject-late": { @@ -9022,7 +9297,7 @@ } }, "node_modules/npm/node_modules/promise-call-limit": { - "version": "3.0.1", + "version": "3.0.2", "dev": true, "inBundle": true, "license": "ISC", @@ -9050,15 +9325,15 @@ } }, "node_modules/npm/node_modules/promzard": { - "version": "1.0.2", + "version": "2.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "read": "^3.0.1" + "read": "^4.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/qrcode-terminal": { @@ -9070,37 +9345,37 @@ } }, "node_modules/npm/node_modules/read": { - "version": "3.0.1", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "mute-stream": "^1.0.0" + "mute-stream": "^2.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/read-cmd-shim": { - "version": "4.0.0", + "version": "5.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/read-package-json-fast": { - "version": "3.0.2", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "json-parse-even-better-errors": "^3.0.0", - "npm-normalize-package-bin": "^3.0.0" + "json-parse-even-better-errors": "^4.0.0", + "npm-normalize-package-bin": "^4.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/retry": { @@ -9112,6 +9387,21 @@ "node": ">= 4" } }, + "node_modules/npm/node_modules/rimraf": { + "version": "5.0.10", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "glob": "^10.3.7" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/npm/node_modules/safer-buffer": { "version": "2.1.2", "dev": true, @@ -9165,20 +9455,72 @@ } }, "node_modules/npm/node_modules/sigstore": { - "version": "2.3.1", + "version": "3.0.0", "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@sigstore/bundle": "^2.3.2", - "@sigstore/core": "^1.0.0", + "@sigstore/bundle": "^3.0.0", + "@sigstore/core": "^2.0.0", "@sigstore/protobuf-specs": "^0.3.2", - "@sigstore/sign": "^2.3.2", - "@sigstore/tuf": "^2.3.4", - "@sigstore/verify": "^1.2.1" + "@sigstore/sign": "^3.0.0", + "@sigstore/tuf": "^3.0.0", + "@sigstore/verify": "^2.0.0" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/sigstore/node_modules/@sigstore/bundle": { + "version": "3.0.0", + "dev": true, + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/protobuf-specs": "^0.3.2" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/sigstore/node_modules/@sigstore/core": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/sigstore/node_modules/@sigstore/sign": { + "version": "3.0.0", + "dev": true, + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^3.0.0", + "@sigstore/core": "^2.0.0", + "@sigstore/protobuf-specs": "^0.3.2", + "make-fetch-happen": "^14.0.1", + "proc-log": "^5.0.0", + "promise-retry": "^2.0.1" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/sigstore/node_modules/@sigstore/verify": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@sigstore/bundle": "^3.0.0", + "@sigstore/core": "^2.0.0", + "@sigstore/protobuf-specs": "^0.3.2" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/smart-buffer": { @@ -9256,7 +9598,7 @@ } }, "node_modules/npm/node_modules/spdx-license-ids": { - "version": "3.0.18", + "version": "3.0.20", "dev": true, "inBundle": true, "license": "CC0-1.0" @@ -9268,7 +9610,7 @@ "license": "BSD-3-Clause" }, "node_modules/npm/node_modules/ssri": { - "version": "10.0.6", + "version": "12.0.0", "dev": true, "inBundle": true, "license": "ISC", @@ -9276,7 +9618,7 @@ "minipass": "^7.0.3" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/string-width": { @@ -9417,33 +9759,46 @@ } }, "node_modules/npm/node_modules/tuf-js": { - "version": "2.2.1", + "version": "3.0.1", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@tufjs/models": "2.0.1", - "debug": "^4.3.4", - "make-fetch-happen": "^13.0.1" + "@tufjs/models": "3.0.1", + "debug": "^4.3.6", + "make-fetch-happen": "^14.0.1" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/npm/node_modules/tuf-js/node_modules/@tufjs/models": { + "version": "3.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@tufjs/canonical-json": "2.0.0", + "minimatch": "^9.0.5" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/unique-filename": { - "version": "3.0.0", + "version": "4.0.0", "dev": true, "inBundle": true, "license": "ISC", "dependencies": { - "unique-slug": "^4.0.0" + "unique-slug": "^5.0.0" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/unique-slug": { - "version": "4.0.0", + "version": "5.0.0", "dev": true, "inBundle": true, "license": "ISC", @@ -9451,7 +9806,7 @@ "imurmurhash": "^0.1.4" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/util-deprecate": { @@ -9481,12 +9836,12 @@ } }, "node_modules/npm/node_modules/validate-npm-package-name": { - "version": "5.0.1", + "version": "6.0.0", "dev": true, "inBundle": true, "license": "ISC", "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/walk-up-path": { @@ -9496,7 +9851,7 @@ "license": "ISC" }, "node_modules/npm/node_modules/which": { - "version": "4.0.0", + "version": "5.0.0", "dev": true, "inBundle": true, "license": "ISC", @@ -9507,7 +9862,7 @@ "node-which": "bin/which.js" }, "engines": { - "node": "^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/which/node_modules/isexe": { @@ -9570,7 +9925,7 @@ } }, "node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.0.1", + "version": "6.1.0", "dev": true, "inBundle": true, "license": "MIT", @@ -9620,7 +9975,7 @@ } }, "node_modules/npm/node_modules/write-file-atomic": { - "version": "5.0.1", + "version": "6.0.0", "dev": true, "inBundle": true, "license": "ISC", @@ -9629,7 +9984,7 @@ "signal-exit": "^4.0.1" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/npm/node_modules/yallist": { diff --git a/package.json b/package.json index 58809b39..6bcc77e3 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,8 @@ "zod": "^3.23.8" }, "overrides": { - "cross-spawn": "7.0.6" + "cross-spawn": "7.0.6", + "npm": "10.9.1" }, "bundleDependencies": [ "typescript" diff --git a/packages/algo-ts/package.json b/packages/algo-ts/package.json index f42b3399..2a68d357 100644 --- a/packages/algo-ts/package.json +++ b/packages/algo-ts/package.json @@ -50,8 +50,8 @@ "vitest": "2.1.5" }, "overrides": { - "micromatch": "4.0.8", - "cross-spawn": "7.0.5" + "cross-spawn": "7.0.5", + "npm": "10.9.1" }, "peerDependencies": { "tslib": "^2.6.2" From 08912a18a65b4153314d0a3bd21cad98cbc0001e Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Wed, 27 Nov 2024 10:50:04 -0800 Subject: [PATCH 15/30] feat: support fromBytes and fromLog methods for ARC4Encoded types commit 7492df1ad37888aedc3520af7b995cf357814211 Author: Bobby Lat Date: Wed Nov 27 18:06:01 2024 +0800 chore: update cross-spawn version and vulnerability number to match the report commit 817d0eddec4344668e97bae87340062195236e7f Author: Bobby Lat Date: Wed Nov 27 17:42:48 2024 +0800 chore: update approval output after upgrading puyapy to the latest in main branch commit 6c31fad69dfac050db4fee6116a04695f451cad3 Author: Bobby Lat Date: Wed Nov 27 13:04:47 2024 +0800 refactor: according to review feedback - un-export NativeForArc4Int and CompatForArc4Int types - add code invariant to make sure ptype is actually ARC4EncodedType - rename arc4Prefix to arc4ReturnValuePrefix for clarity - remove extra handling of bytes constant as reinterpretCast does it anyway - remove extra resolveToPType calls commit 1caf84d9bb86cead8bcfbc34d5d81098db0a6e20 Author: Bobby Lat Date: Wed Nov 27 10:21:00 2024 +0800 chore: fix test broken by upgrading puya to version 4.0.0 commit 2f2273e855d71c32866eb95e23013d56cc37d648 Author: Bobby Lat Date: Wed Nov 27 09:35:43 2024 +0800 chore: upgrade localnet images in ci pipline commit 66167f4b655e1e4958ac29634df3e879fe63f712 Author: Bobby Lat Date: Tue Nov 26 14:17:08 2024 +0800 refactor: simplify type info passed to fromBytes and fromLog method commit 72dc26aa2bf575d82a53cb7cfa4ff36d200617dc Author: Bobby Lat Date: Tue Nov 19 15:10:49 2024 +0800 chore: upgrade algots package version commit 0c66e7c956e8600a5da479d757cb932e9aaf3c8f Author: Bobby Lat Date: Tue Nov 19 15:04:21 2024 +0800 chore: fix npm audit vulnerability commit 334848fc6eddb8136c7336005834697b264dabc9 Author: Bobby Lat Date: Tue Nov 12 09:49:09 2024 +0800 refactor: remove n and m parameters from UFixedNxM constructor commit be7cc301be183cdc36f75834e715d8cc1ccea98e Author: Bobby Lat Date: Mon Nov 18 16:36:20 2024 +0800 feat: support fromBytes and fromLog methods for ARC4Encoded types commit 269360a750a23076d9a5c3e3b8fe157064eb26b9 Author: Bobby Lat Date: Mon Nov 18 10:55:34 2024 +0800 feat: support calling equals method of bytes type commit c623cb3b5ccf9806cb6ef0b5bd33238dc7eb86a7 Author: Bobby Lat Date: Mon Nov 11 11:29:10 2024 +0800 refactor: export more arc4 types for stub implementation commit 848216b28fe837c09bddd65488c3ed08303ec6dc Author: Bobby Lat Date: Fri Nov 8 14:42:01 2024 +0800 refactor: export generic PTypes for testing package to capture generic type info commit 4fbcb01374c8b628fb2724cc08c2ba1d8aa7f898 Author: Bobby Lat Date: Fri Nov 8 11:08:51 2024 +0800 fix: LogicSig has been renamed to LogicSigClassModel commit 21e747a11d7c0f5b70c106cee1cf1ecb0a5346cf Merge: ccec8901 9fcfe48a Author: boblat Date: Tue Nov 12 10:51:05 2024 +0800 Merge pull request #45 from algorandfoundation/refactor-export-types refactor: export more PTypes for the testing packageto capture generic type info commit 9fcfe48aa17ea444d3a429042aab9580f13aab9b Author: Bobby Lat Date: Tue Nov 12 10:46:17 2024 +0800 refactor: export more PTypes for the testing packageto capture generict type info --- .github/workflows/ci-all.yml | 3 +- .nsprc | 5 + packages/algo-ts/.nsprc | 3 +- packages/algo-ts/src/arc4/encoded-types.ts | 94 +++- packages/algo-ts/src/impl/primitives.ts | 2 +- src/awst_build/context/awst-build-context.ts | 2 +- src/awst_build/eb/arc4/arrays.ts | 8 +- src/awst_build/eb/arc4/base.ts | 119 +++++- src/awst_build/eb/arc4/bool.ts | 5 +- src/awst_build/eb/arc4/string.ts | 5 +- src/awst_build/eb/arc4/struct.ts | 4 +- src/awst_build/eb/arc4/tuple.ts | 6 +- src/awst_build/eb/arc4/ufixed.ts | 27 +- src/awst_build/eb/arc4/uintn.ts | 23 +- src/awst_build/eb/bytes-expression-builder.ts | 40 +- src/index.ts | 21 +- tests/approvals/arc4-types.algo.ts | 3 +- .../Arc4TypesTestContract.approval.teal | 278 +++++++++++- .../approvals/out/arc4-types/arc4-types.awst | 7 +- .../out/arc4-types/arc4-types.awst.json | 403 +++++++----------- tests/expected-output/arc4-types.algo.ts | 2 +- 21 files changed, 754 insertions(+), 306 deletions(-) diff --git a/.github/workflows/ci-all.yml b/.github/workflows/ci-all.yml index 6b4de180..c9458b6f 100644 --- a/.github/workflows/ci-all.yml +++ b/.github/workflows/ci-all.yml @@ -28,7 +28,6 @@ jobs: diffTextLen=${#diffText} [ $diffTextLen -eq 0 ] && echo 'No changes' || (echo 'ERROR: Code differs to published version. Please bump package version or revert changes'; echo $diffText; exit 1;) - ci-puya-ts: name: 'Build @algorandfoundation/puya-ts' uses: ./.github/workflows/node-ci.yml @@ -48,5 +47,5 @@ jobs: python-version: 3.12.6 pre-test-script: | pipx install algokit --python 3.12.6 - algokit localnet start + algokit localnet reset --update pipx install git+https://github.com/algorandfoundation/puya --python 3.12.6 diff --git a/.nsprc b/.nsprc index 2c63c085..91cdc450 100644 --- a/.nsprc +++ b/.nsprc @@ -1,2 +1,7 @@ { + "1100563": { + "active": true, + "notes": "Waiting for https://github.com/npm/cli/issues/7902 to be resolved", + "expiry": "2024-12-31" + } } diff --git a/packages/algo-ts/.nsprc b/packages/algo-ts/.nsprc index 2c63c085..0967ef42 100644 --- a/packages/algo-ts/.nsprc +++ b/packages/algo-ts/.nsprc @@ -1,2 +1 @@ -{ -} +{} diff --git a/packages/algo-ts/src/arc4/encoded-types.ts b/packages/algo-ts/src/arc4/encoded-types.ts index 9bbc5f7e..850fb02f 100644 --- a/packages/algo-ts/src/arc4/encoded-types.ts +++ b/packages/algo-ts/src/arc4/encoded-types.ts @@ -1,7 +1,8 @@ import { avmError, avmInvariant } from '../impl/errors' import { arrayUtil, BytesCls, getNumber, getUint8Array, isBytes, isUint64 } from '../impl/primitives' -import { biguint, BigUintCompat, Bytes, bytes, BytesBacked, StringCompat, Uint64, uint64, Uint64Compat } from '../primitives' +import { biguint, BigUintCompat, Bytes, bytes, BytesBacked, BytesCompat, StringCompat, Uint64, uint64, Uint64Compat } from '../primitives' import { Account } from '../reference' +import { DeliberateAny } from '../typescript-helpers' import { err } from '../util' export type BitSize = 8 | 16 | 32 | 64 | 128 | 256 | 512 @@ -19,6 +20,14 @@ abstract class ARC4Encoded implements BytesBacked { equals(other: this): boolean { return this.bytes.equals(other.bytes) } + + static fromBytes(this: { new (...args: DeliberateAny): T }, bytes: BytesCompat): T { + throw new Error('todo') + } + + static fromLog(this: { new (...args: DeliberateAny): T }, log: BytesCompat): T { + throw new Error('todo') + } } export class Str extends ARC4Encoded { @@ -41,27 +50,54 @@ export class UintN extends ARC4Encoded { get native(): NativeForArc4Int { throw new Error('TODO') } + + static fromBytes>(this: { new (...args: DeliberateAny): I }, bytes: BytesCompat): I { + throw new Error('todo') + } + + static fromLog>(this: { new (...args: DeliberateAny): I }, log: BytesCompat): I { + throw new Error('todo') + } } export class UFixedNxM extends ARC4Encoded { [TypeProperty]?: `arc4.UFixedNxM<${N}x${M}>` - constructor(v: `${number}.${number}`, n?: N, m?: M) { + constructor(v: `${number}.${number}`) { super() } get native(): NativeForArc4Int { throw new Error('TODO') } -} + static fromBytes>( + this: { new (...args: DeliberateAny): I }, + bytes: BytesCompat, + ): I { + throw new Error('todo') + } + + static fromLog>(this: { new (...args: DeliberateAny): I }, log: BytesCompat): I { + throw new Error('todo') + } +} export class Byte extends UintN<8> { constructor(v?: Uint64Compat) { super(v) } + + static fromBytes(this: { new (...args: DeliberateAny): I }, bytes: BytesCompat): I { + throw new Error('todo') + } + + static fromLog(this: { new (...args: DeliberateAny): I }, log: BytesCompat): I { + throw new Error('todo') + } } -export class Bool { +export class Bool extends ARC4Encoded { [TypeProperty]?: `arc4.Bool` #v: boolean constructor(v?: boolean) { + super() this.#v = v ?? false } @@ -179,8 +215,21 @@ export class StaticArray exte copy(): StaticArray { return new StaticArray(...this.items) } -} + static fromBytes>( + this: { new (...args: DeliberateAny): I }, + bytes: BytesCompat, + ): I { + throw new Error('todo') + } + + static fromLog>( + this: { new (...args: DeliberateAny): I }, + log: BytesCompat, + ): I { + throw new Error('todo') + } +} export class DynamicArray extends Arc4ReadonlyArray { [TypeProperty]?: `arc4.DynamicArray<${TItem[typeof TypeProperty]}>` constructor(...items: TItem[]) { @@ -207,6 +256,14 @@ export class DynamicArray extends Arc4ReadonlyArray { return new DynamicArray(...this.items) } + + static fromBytes>(this: { new (...args: DeliberateAny): I }, bytes: BytesCompat): I { + throw new Error('todo') + } + + static fromLog>(this: { new (...args: DeliberateAny): I }, log: BytesCompat): I { + throw new Error('todo') + } } type ExpandTupleType = T extends [infer T1 extends ARC4Encoded, ...infer TRest extends ARC4Encoded[]] ? TRest extends [] @@ -233,6 +290,20 @@ export class Tuple extends ARC4E get native(): TTuple { return this.#items } + + static fromBytes>( + this: { new (...args: TTuple): I }, + bytes: BytesCompat, + ): I { + throw new Error('todo') + } + + static fromLog>( + this: { new (...args: TTuple): I }, + log: BytesCompat, + ): I { + throw new Error('todo') + } } export class Address extends Arc4ReadonlyArray { @@ -274,9 +345,20 @@ class StructImpl extends StructBase { }) } } + static fromBytes(this: { new (args: T): I }, bytes: BytesCompat): I { + throw new Error('todo') + } + + static fromLog(this: { new (args: T): I }, log: BytesCompat): I { + throw new Error('todo') + } } -type StructConstructor = new (initial: T) => StructBase & T +type StructConstructor = { + new (initial: T): StructBase & T + fromBytes: (bytes: BytesCompat) => StructBase & T + fromLog: (log: BytesCompat) => StructBase & T +} export const Struct = StructImpl as StructConstructor diff --git a/packages/algo-ts/src/impl/primitives.ts b/packages/algo-ts/src/impl/primitives.ts index 687b9ba6..15b3502f 100644 --- a/packages/algo-ts/src/impl/primitives.ts +++ b/packages/algo-ts/src/impl/primitives.ts @@ -243,7 +243,7 @@ export class BytesCls extends AlgoTsPrimitiveCls { return new BytesCls(arrayUtil.arrayAt(this.#v, i)) } - slice(start: undefined | StubUint64Compat, end: undefined | StubUint64Compat): BytesCls { + slice(start?: StubUint64Compat, end?: StubUint64Compat): BytesCls { const sliced = arrayUtil.arraySlice(this.#v, start, end) return new BytesCls(sliced) } diff --git a/src/awst_build/context/awst-build-context.ts b/src/awst_build/context/awst-build-context.ts index f5eff158..022b17e5 100644 --- a/src/awst_build/context/awst-build-context.ts +++ b/src/awst_build/context/awst-build-context.ts @@ -11,13 +11,13 @@ import type { NodeBuilder } from '../eb' import type { AppStorageDeclaration } from '../models/app-storage-declaration' import type { ContractClassModel } from '../models/contract-class-model' import { CompilationSet } from '../models/contract-class-model' +import type { LogicSigClassModel } from '../models/logic-sig-class-model' import type { ContractClassPType, PType } from '../ptypes' import { typeRegistry } from '../type-registry' import { TypeResolver } from '../type-resolver' import { EvaluationContext } from './evaluation-context' import { SwitchLoopContext } from './switch-loop-context' import { UniqueNameResolver } from './unique-name-resolver' -import type { LogicSigClassModel } from '../models/logic-sig-class-model' export interface AwstBuildContext { /** diff --git a/src/awst_build/eb/arc4/arrays.ts b/src/awst_build/eb/arc4/arrays.ts index e075cba2..e2e1e956 100644 --- a/src/awst_build/eb/arc4/arrays.ts +++ b/src/awst_build/eb/arc4/arrays.ts @@ -33,9 +33,9 @@ import { SliceFunctionBuilder } from '../shared/slice-function-builder' import { UInt64ExpressionBuilder } from '../uint64-expression-builder' import { requireExpressionOfType } from '../util' import { parseFunctionArgs } from '../util/arg-parsing' -import { Arc4EncodedBaseExpressionBuilder } from './base' +import { Arc4EncodedBaseClassBuilder, Arc4EncodedBaseExpressionBuilder } from './base' -export class DynamicArrayClassBuilder extends ClassBuilder { +export class DynamicArrayClassBuilder extends Arc4EncodedBaseClassBuilder { readonly ptype = DynamicArrayConstructor newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { @@ -63,7 +63,7 @@ export class DynamicArrayClassBuilder extends ClassBuilder { ) } } -export class StaticArrayClassBuilder extends ClassBuilder { +export class StaticArrayClassBuilder extends Arc4EncodedBaseClassBuilder { readonly ptype = StaticArrayConstructor newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { @@ -105,7 +105,7 @@ export class StaticArrayClassBuilder extends ClassBuilder { ) } } -export class AddressClassBuilder extends ClassBuilder { +export class AddressClassBuilder extends Arc4EncodedBaseClassBuilder { readonly ptype = AddressClass newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { diff --git a/src/awst_build/eb/arc4/base.ts b/src/awst_build/eb/arc4/base.ts index e41c5b19..e726ecb9 100644 --- a/src/awst_build/eb/arc4/base.ts +++ b/src/awst_build/eb/arc4/base.ts @@ -4,15 +4,31 @@ import { EqualityComparison } from '../../../awst/nodes' import type { SourceLocation } from '../../../awst/source-location' import { wtypes } from '../../../awst/wtypes' import { CodeError } from '../../../errors' -import type { PType } from '../../ptypes' -import type { ARC4EncodedType } from '../../ptypes/arc4-types' -import { instanceEb } from '../../type-registry' +import { codeInvariant, hexToUint8Array } from '../../../util' +import { bytesPType, type PType } from '../../ptypes' +import { ARC4EncodedType } from '../../ptypes/arc4-types' +import { instanceEb, typeRegistry } from '../../type-registry' import { BooleanExpressionBuilder } from '../boolean-expression-builder' import { BytesExpressionBuilder } from '../bytes-expression-builder' import type { InstanceBuilder, NodeBuilder } from '../index' -import { BuilderComparisonOp, FunctionBuilder, InstanceExpressionBuilder } from '../index' +import { BuilderComparisonOp, ClassBuilder, FunctionBuilder, InstanceExpressionBuilder } from '../index' import { parseFunctionArgs } from '../util/arg-parsing' +export abstract class Arc4EncodedBaseClassBuilder extends ClassBuilder { + constructor(sourceLocation: SourceLocation) { + super(sourceLocation) + } + memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder { + switch (name) { + case 'fromBytes': + return new Arc4EncodedFromBytesFunctionBuilder(sourceLocation) + case 'fromLog': + return new Arc4EncodedFromLogFunctionBuilder(sourceLocation) + } + return super.memberAccess(name, sourceLocation) + } +} + export class Arc4EncodedBaseExpressionBuilder extends InstanceExpressionBuilder { constructor(expr: Expression, ptype: T) { super(expr, ptype) @@ -85,3 +101,98 @@ class Arc4EqualsFunctionBuilder extends FunctionBuilder { ) } } + +export class Arc4EncodedFromBytesFunctionBuilder extends FunctionBuilder { + constructor( + sourceLocation: SourceLocation, + private ptypeFactory?: (args: PType[]) => ARC4EncodedType, + private genericArgsCount?: number, + ) { + super(sourceLocation) + } + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { + const funcName = 'fromBytes' + const { + ptypes, + args: [initialValueBuilder], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: this.genericArgsCount ?? 1, + funcName, + argSpec: (a) => [a.required(bytesPType)], + callLocation: sourceLocation, + }) + + const ptype = this.ptypeFactory ? this.ptypeFactory(ptypes) : ptypes[0] + codeInvariant(ptype instanceof ARC4EncodedType, 'Expected ARC4EncodedType') + const initialValue = initialValueBuilder.resolve() + const initialValueExpr = nodeFactory.reinterpretCast({ + wtype: ptype.wtype, + sourceLocation, + expr: initialValue, + }) + + return typeRegistry.getInstanceEb(initialValueExpr, ptype) + } +} + +export class Arc4EncodedFromLogFunctionBuilder extends FunctionBuilder { + constructor( + sourceLocation: SourceLocation, + private ptypeFactory?: (args: PType[]) => ARC4EncodedType, + private genericArgsCount?: number, + ) { + super(sourceLocation) + } + + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { + const funcName = 'fromLog' + const { + ptypes, + args: [initialValueBuilder], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: this.genericArgsCount ?? 1, + funcName, + argSpec: (a) => [a.required(bytesPType)], + callLocation: sourceLocation, + }) + + const ptype = this.ptypeFactory ? this.ptypeFactory(ptypes) : ptypes[0] + codeInvariant(ptype instanceof ARC4EncodedType, 'Expected ARC4EncodedType') + const initialValue = initialValueBuilder.resolve() + const arc4Value = nodeFactory.intrinsicCall({ + opCode: 'extract', + immediates: [4n, 0n], + wtype: bytesPType.wtype, + stackArgs: [initialValue], + sourceLocation, + }) + const arc4ValueExpr = nodeFactory.reinterpretCast({ + wtype: ptype.wtype, + sourceLocation, + expr: arc4Value, + }) + const arc4ReturnValuePrefix = nodeFactory.intrinsicCall({ + opCode: 'extract', + immediates: [0n, 4n], + wtype: bytesPType.wtype, + stackArgs: [initialValue], + sourceLocation, + }) + const arc4PrefixIsValid = nodeFactory.bytesComparisonExpression({ + operator: EqualityComparison.eq, + lhs: arc4ReturnValuePrefix, + rhs: nodeFactory.bytesConstant({ value: hexToUint8Array('151F7C75'), sourceLocation }), + sourceLocation, + }) + + const fromLogExpr = nodeFactory.checkedMaybe({ + expr: nodeFactory.tupleExpression({ items: [arc4ValueExpr, arc4PrefixIsValid], sourceLocation }), + comment: 'ARC4 prefix is valid', + }) + return typeRegistry.getInstanceEb(fromLogExpr, ptype) + } +} diff --git a/src/awst_build/eb/arc4/bool.ts b/src/awst_build/eb/arc4/bool.ts index bc3993a4..6bba3f80 100644 --- a/src/awst_build/eb/arc4/bool.ts +++ b/src/awst_build/eb/arc4/bool.ts @@ -3,10 +3,9 @@ import type { SourceLocation } from '../../../awst/source-location' import type { PType } from '../../ptypes' import { ARC4BoolClass, ARC4BooleanType, type ARC4EncodedType } from '../../ptypes/arc4-types' import type { InstanceBuilder, NodeBuilder } from '../index' -import { ClassBuilder } from '../index' -import { Arc4EncodedBaseExpressionBuilder } from './base' +import { Arc4EncodedBaseClassBuilder, Arc4EncodedBaseExpressionBuilder } from './base' -export class BoolClassBuilder extends ClassBuilder { +export class BoolClassBuilder extends Arc4EncodedBaseClassBuilder { readonly ptype = ARC4BoolClass newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { diff --git a/src/awst_build/eb/arc4/string.ts b/src/awst_build/eb/arc4/string.ts index 3425188a..7d0cf882 100644 --- a/src/awst_build/eb/arc4/string.ts +++ b/src/awst_build/eb/arc4/string.ts @@ -8,11 +8,10 @@ import { stringPType } from '../../ptypes' import type { ARC4EncodedType } from '../../ptypes/arc4-types' import { ARC4StrClass, ARC4StringType } from '../../ptypes/arc4-types' import type { InstanceBuilder, NodeBuilder } from '../index' -import { ClassBuilder } from '../index' import { parseFunctionArgs } from '../util/arg-parsing' -import { Arc4EncodedBaseExpressionBuilder } from './base' +import { Arc4EncodedBaseClassBuilder, Arc4EncodedBaseExpressionBuilder } from './base' -export class StrClassBuilder extends ClassBuilder { +export class StrClassBuilder extends Arc4EncodedBaseClassBuilder { readonly ptype = ARC4StrClass newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { diff --git a/src/awst_build/eb/arc4/struct.ts b/src/awst_build/eb/arc4/struct.ts index e9eb476e..4b05d8d4 100644 --- a/src/awst_build/eb/arc4/struct.ts +++ b/src/awst_build/eb/arc4/struct.ts @@ -10,9 +10,9 @@ import { InstanceBuilder } from '../index' import { NodeBuilder } from '../index' import { requireExpressionOfType } from '../util' import { parseFunctionArgs } from '../util/arg-parsing' -import { Arc4EncodedBaseExpressionBuilder } from './base' +import { Arc4EncodedBaseClassBuilder, Arc4EncodedBaseExpressionBuilder } from './base' -export class StructClassBuilder extends NodeBuilder { +export class StructClassBuilder extends Arc4EncodedBaseClassBuilder { readonly ptype: ARC4StructClass constructor(sourceLocation: SourceLocation, ptype: PType) { diff --git a/src/awst_build/eb/arc4/tuple.ts b/src/awst_build/eb/arc4/tuple.ts index 17d634ff..ebade255 100644 --- a/src/awst_build/eb/arc4/tuple.ts +++ b/src/awst_build/eb/arc4/tuple.ts @@ -8,12 +8,12 @@ import { numberPType, TuplePType, uint64PType } from '../../ptypes' import { ARC4EncodedType, Arc4TupleClass, ARC4TupleType } from '../../ptypes/arc4-types' import { instanceEb } from '../../type-registry' import type { InstanceBuilder, NodeBuilder } from '../index' -import { ClassBuilder, FunctionBuilder } from '../index' +import { FunctionBuilder } from '../index' import { requireIntegerConstant } from '../util' import { parseFunctionArgs } from '../util/arg-parsing' -import { Arc4EncodedBaseExpressionBuilder } from './base' +import { Arc4EncodedBaseClassBuilder, Arc4EncodedBaseExpressionBuilder } from './base' -export class Arc4TupleClassBuilder extends ClassBuilder { +export class Arc4TupleClassBuilder extends Arc4EncodedBaseClassBuilder { readonly ptype = Arc4TupleClass newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { diff --git a/src/awst_build/eb/arc4/ufixed.ts b/src/awst_build/eb/arc4/ufixed.ts index 75fe36f3..21a0a208 100644 --- a/src/awst_build/eb/arc4/ufixed.ts +++ b/src/awst_build/eb/arc4/ufixed.ts @@ -4,14 +4,19 @@ import type { SourceLocation } from '../../../awst/source-location' import { CodeError } from '../../../errors' import { codeInvariant, invariant } from '../../../util' import type { PType } from '../../ptypes' -import { numberPType, NumericLiteralPType, stringPType } from '../../ptypes' +import { NumericLiteralPType, stringPType } from '../../ptypes' import { UFixedNxMClass, UFixedNxMType } from '../../ptypes/arc4-types' -import { ClassBuilder, type InstanceBuilder, type NodeBuilder } from '../index' +import { type InstanceBuilder, type NodeBuilder } from '../index' import { isValidLiteralForPType, requireStringConstant } from '../util' import { parseFunctionArgs } from '../util/arg-parsing' -import { Arc4EncodedBaseExpressionBuilder } from './base' +import { + Arc4EncodedBaseClassBuilder, + Arc4EncodedBaseExpressionBuilder, + Arc4EncodedFromBytesFunctionBuilder, + Arc4EncodedFromLogFunctionBuilder, +} from './base' -export class UFixedNxMClassBuilder extends ClassBuilder { +export class UFixedNxMClassBuilder extends Arc4EncodedBaseClassBuilder { readonly ptype = UFixedNxMClass newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { @@ -23,7 +28,7 @@ export class UFixedNxMClassBuilder extends ClassBuilder { typeArgs, genericTypeArgs: 2, funcName: this.typeDescription, - argSpec: (a) => [a.optional(stringPType), a.optional(numberPType), a.optional(numberPType)], + argSpec: (a) => [a.optional(stringPType)], callLocation: sourceLocation, }) codeInvariant( @@ -40,6 +45,18 @@ export class UFixedNxMClassBuilder extends ClassBuilder { return newUFixedNxM(initialValueBuilder, ptype, sourceLocation) } + + memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder { + const ptypeFactory = (args: PType[]) => + new UFixedNxMType({ n: (args[0] as NumericLiteralPType).literalValue, m: (args[1] as NumericLiteralPType).literalValue }) + switch (name) { + case 'fromBytes': + return new Arc4EncodedFromBytesFunctionBuilder(sourceLocation, ptypeFactory, 2) + case 'fromLog': + return new Arc4EncodedFromLogFunctionBuilder(sourceLocation, ptypeFactory, 2) + } + return super.memberAccess(name, sourceLocation) + } } function newUFixedNxM(initialValue: InstanceBuilder | undefined, ptype: UFixedNxMType, sourceLocation: SourceLocation) { diff --git a/src/awst_build/eb/arc4/uintn.ts b/src/awst_build/eb/arc4/uintn.ts index 9aff589b..8d2af715 100644 --- a/src/awst_build/eb/arc4/uintn.ts +++ b/src/awst_build/eb/arc4/uintn.ts @@ -8,12 +8,16 @@ import type { PType } from '../../ptypes' import { biguintPType, NumericLiteralPType, uint64PType } from '../../ptypes' import { arc4ByteAlias, ByteClass, UintNClass, UintNType } from '../../ptypes/arc4-types' import type { InstanceBuilder, NodeBuilder } from '../index' -import { ClassBuilder } from '../index' import { isValidLiteralForPType } from '../util' import { parseFunctionArgs } from '../util/arg-parsing' -import { Arc4EncodedBaseExpressionBuilder } from './base' +import { + Arc4EncodedBaseClassBuilder, + Arc4EncodedBaseExpressionBuilder, + Arc4EncodedFromBytesFunctionBuilder, + Arc4EncodedFromLogFunctionBuilder, +} from './base' -export class UintNClassBuilder extends ClassBuilder { +export class UintNClassBuilder extends Arc4EncodedBaseClassBuilder { readonly ptype = UintNClass newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { @@ -37,9 +41,20 @@ export class UintNClassBuilder extends ClassBuilder { return newUintN(initialValueBuilder, ptype, sourceLocation) } + + memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder { + const ptypeFactory = (args: PType[]) => new UintNType({ n: (args[0] as NumericLiteralPType).literalValue }) + switch (name) { + case 'fromBytes': + return new Arc4EncodedFromBytesFunctionBuilder(sourceLocation, ptypeFactory) + case 'fromLog': + return new Arc4EncodedFromLogFunctionBuilder(sourceLocation, ptypeFactory) + } + return super.memberAccess(name, sourceLocation) + } } -export class ByteClassBuilder extends ClassBuilder { +export class ByteClassBuilder extends Arc4EncodedBaseClassBuilder { readonly ptype = ByteClass newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { diff --git a/src/awst_build/eb/bytes-expression-builder.ts b/src/awst_build/eb/bytes-expression-builder.ts index 5fd4d885..dc9ac194 100644 --- a/src/awst_build/eb/bytes-expression-builder.ts +++ b/src/awst_build/eb/bytes-expression-builder.ts @@ -3,7 +3,15 @@ import type { awst } from '../../awst' import { intrinsicFactory } from '../../awst/intrinsic-factory' import { nodeFactory } from '../../awst/node-factory' import type { Expression } from '../../awst/nodes' -import { BytesBinaryOperator, BytesConstant, BytesEncoding, BytesUnaryOperator, IntegerConstant, StringConstant } from '../../awst/nodes' +import { + BytesBinaryOperator, + BytesConstant, + BytesEncoding, + BytesUnaryOperator, + EqualityComparison, + IntegerConstant, + StringConstant, +} from '../../awst/nodes' import type { SourceLocation } from '../../awst/source-location' import { wtypes } from '../../awst/wtypes' @@ -22,6 +30,7 @@ import { stringPType, uint64PType, } from '../ptypes' +import { BooleanExpressionBuilder } from './boolean-expression-builder' import type { BuilderComparisonOp, InstanceBuilder, NodeBuilder } from './index' import { BuilderUnaryOp, FunctionBuilder, InstanceExpressionBuilder, ParameterlessFunctionBuilder } from './index' import { ArrayLiteralExpressionBuilder } from './literal/array-literal-expression-builder' @@ -211,6 +220,8 @@ export class BytesExpressionBuilder extends InstanceExpressionBuilder, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { + const { + args: [right], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: 0, + callLocation: sourceLocation, + funcName: 'equals', + argSpec: (a) => [a.required(bytesPType)], + }) + return new BooleanExpressionBuilder( + nodeFactory.bytesComparisonExpression({ + operator: EqualityComparison.eq, + lhs: this.expr, + rhs: right.resolve(), + sourceLocation, + }), + ) + } +} diff --git a/src/index.ts b/src/index.ts index 9bb9b7e0..b7de1fcb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -24,7 +24,26 @@ import { } from './util' export { SourceLocation } from './awst/source-location' -export { anyPType, ContractClassPType, FunctionPType, PType } from './awst_build/ptypes' +export { + anyPType, + BoxMapPType, + BoxPType, + ContractClassPType, + FunctionPType, + GlobalStateType, + LocalStateType, + PType, +} from './awst_build/ptypes' +export { + ARC4BooleanType, + ARC4StringType, + ARC4StructType, + ARC4TupleType, + DynamicArrayType, + StaticArrayType, + UFixedNxMType, + UintNType, +} from './awst_build/ptypes/arc4-types' export { registerPTypes } from './awst_build/ptypes/register' export { typeRegistry } from './awst_build/type-registry' export { TypeResolver } from './awst_build/type-resolver' diff --git a/tests/approvals/arc4-types.algo.ts b/tests/approvals/arc4-types.algo.ts index 681cb994..7366db40 100644 --- a/tests/approvals/arc4-types.algo.ts +++ b/tests/approvals/arc4-types.algo.ts @@ -14,7 +14,7 @@ import { } from '@algorandfoundation/algorand-typescript/arc4' function testUFixed() { - const a = new UFixedNxM('1.244', 32, 4) + const a = new UFixedNxM<32, 4>('1.244') const c = new UFixedNxM<32, 4>('1.244') assert(a.equals(c)) @@ -112,6 +112,7 @@ export class Arc4TypesTestContract extends BaseContract { const x = new ARC4Uint64() testStr() test(1, 2n, new UintN<256>(4)) + testUFixed() testByte() testArrays(new UintN<64>(65)) testAddress() diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal b/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal index 264ba801..33a95759 100644 --- a/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal @@ -1,34 +1,130 @@ #pragma version 10 tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.approvalProgram: - intcblock 1 16 8 0 + intcblock 0 1 8 2 + bytecblock 0x 0x0000 base32(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) 0x00 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + // tests/approvals/arc4-types.algo.ts:113 + // testStr() + callsub testStr // tests/approvals/arc4-types.algo.ts:114 // test(1, 2n, new UintN<256>(4)) - intc_0 // 1 - pushbytess 0x02 0x0000000000000000000000000000000000000000000000000000000000000004 // 0x02, 0x0000000000000000000000000000000000000000000000000000000000000004 + intc_1 // 1 + pushbytes 0x02 + pushbytes 0x0000000000000000000000000000000000000000000000000000000000000004 callsub test + // tests/approvals/arc4-types.algo.ts:115 + // testUFixed() + callsub testUFixed // tests/approvals/arc4-types.algo.ts:116 + // testByte() + callsub testByte + // tests/approvals/arc4-types.algo.ts:117 // testArrays(new UintN<64>(65)) pushbytes 0x0000000000000041 callsub testArrays - // tests/approvals/arc4-types.algo.ts:117 + // tests/approvals/arc4-types.algo.ts:118 // testAddress() callsub testAddress + // tests/approvals/arc4-types.algo.ts:119 + // testTuple() + callsub testTuple // tests/approvals/arc4-types.algo.ts:120 + // testUFixed() + callsub testUFixed + // tests/approvals/arc4-types.algo.ts:121 // testDynamicBytes(Bytes('hmmmmmmmmm')) pushbytes "hmmmmmmmmm" callsub testDynamicBytes + // tests/approvals/arc4-types.algo.ts:122 + // testStaticBytes() + callsub testStaticBytes + // tests/approvals/arc4-types.algo.ts:123 + // const result = new arc4.DynamicArray>() + bytec_1 // 0x0000 + bytec_0 // 0x + concat // tests/approvals/arc4-types.algo.ts:124 + // assert(result.length === 0) + intc_0 // 0 + extract_uint16 + intc_0 // 0 + == + assert + // tests/approvals/arc4-types.algo.ts:125 // return true - intc_0 // 1 + intc_1 // 1 return +// tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.constructor() -> void: +constructor: + // tests/approvals/arc4-types.algo.ts:106 + // export class Arc4TypesTestContract extends BaseContract { + proto 0 0 + retsub + + +// tests/approvals/arc4-types.algo.ts::testStr() -> void: +testStr: + // tests/approvals/arc4-types.algo.ts:41 + // function testStr() { + proto 0 0 + // tests/approvals/arc4-types.algo.ts:42 + // const s1 = new Str() + bytec_1 // 0x0000 + // tests/approvals/arc4-types.algo.ts:43 + // assert(s1.bytes === new UintN<16>(0).bytes, 'Empty string should equal the uint16 length prefix') + dup + == + assert // Empty string should equal the uint16 length prefix + // tests/approvals/arc4-types.algo.ts:44 + // const s2 = new Str('Hello') + pushbytes 0x000548656c6c6f + // tests/approvals/arc4-types.algo.ts:45 + // assert(s2.native === 'Hello') + extract 2 0 + pushbytes "Hello" + == + assert + retsub + + // tests/approvals/arc4-types.algo.ts::test(n: uint64, b: bytes, c: bytes) -> void: test: // tests/approvals/arc4-types.algo.ts:23 // function test(n: uint64, b: biguint, c: UintN<256>) { proto 3 0 + // tests/approvals/arc4-types.algo.ts:24 + // const x = new UintN<8>(4) + pushbytes 0x04 + // tests/approvals/arc4-types.algo.ts:25 + // assert(x.bytes.length === 1) + len + intc_1 // 1 + == + assert + // tests/approvals/arc4-types.algo.ts:26 + // const x2 = new UintN<8>(255n) + pushbytes 0xff + // tests/approvals/arc4-types.algo.ts:27 + // assert(x2.bytes === Bytes.fromHex('ff')) + dup + == + assert + // tests/approvals/arc4-types.algo.ts:29 + // const y = new UintN<16>() + bytec_1 // 0x0000 + // tests/approvals/arc4-types.algo.ts:30 + // assert(y.bytes.length === 2) + len + intc_3 // 2 + == + assert // tests/approvals/arc4-types.algo.ts:31 // const z = new UintN<8>(n) frame_dig -3 @@ -46,10 +142,10 @@ test: // const a = new UintN<128>(b) frame_dig -2 len - intc_1 // 16 + pushint 16 // 16 <= assert // overflow - intc_1 // 16 + pushint 16 // 16 bzero frame_dig -2 b| @@ -68,6 +164,42 @@ test: retsub +// tests/approvals/arc4-types.algo.ts::testUFixed() -> void: +testUFixed: + // tests/approvals/arc4-types.algo.ts:16 + // function testUFixed() { + proto 0 0 + // tests/approvals/arc4-types.algo.ts:17 + // const a = new UFixedNxM<32, 4>('1.244') + pushbytes 0x000004dc + // tests/approvals/arc4-types.algo.ts:18 + // const c = new UFixedNxM<32, 4>('1.244') + dup + // tests/approvals/arc4-types.algo.ts:20 + // assert(a.equals(c)) + == + assert + retsub + + +// tests/approvals/arc4-types.algo.ts::testByte() -> void: +testByte: + // tests/approvals/arc4-types.algo.ts:82 + // function testByte() { + proto 0 0 + // tests/approvals/arc4-types.algo.ts:83 + // const b = new Byte() + bytec_3 // 0x00 + // tests/approvals/arc4-types.algo.ts:84 + // const b2 = new Byte(0) + dup + // tests/approvals/arc4-types.algo.ts:85 + // assert(b.equals(b2)) + == + assert + retsub + + // tests/approvals/arc4-types.algo.ts::testArrays(n: bytes) -> void: testArrays: // tests/approvals/arc4-types.algo.ts:68 @@ -75,10 +207,11 @@ testArrays: proto 1 0 // tests/approvals/arc4-types.algo.ts:69 // const myArray = new DynamicArray(n, n, n) + bytec_0 // 0x + frame_dig -1 + concat frame_dig -1 - dup concat - dup frame_dig -1 concat pushbytes 0x0003 @@ -87,8 +220,10 @@ testArrays: // tests/approvals/arc4-types.algo.ts:71 // myArray.push(n) extract 2 0 + bytec_0 // 0x frame_dig -1 concat + concat dup len intc_2 // 8 @@ -97,10 +232,23 @@ testArrays: extract 6 2 swap concat + // tests/approvals/arc4-types.algo.ts:73 + // const myStatic = new StaticArray(n, n) + bytec_0 // 0x + frame_dig -1 + concat + frame_dig -1 + concat + bytec_0 // 0x + swap + concat // tests/approvals/arc4-types.algo.ts:75 // assert(myStatic[0].equals(myArray.pop())) - swap - extract 0 8 // on error: Index access is out of bounds + intc_0 // 0 + intc_2 // 8 + * + intc_2 // 8 + extract3 // on error: Index access is out of bounds swap intc_2 // 8 callsub dynamic_array_pop_fixed_size @@ -115,17 +263,76 @@ testAddress: // tests/approvals/arc4-types.algo.ts:88 // function testAddress() { proto 0 0 - // tests/approvals/arc4-types.algo.ts:89 - // const a = new Address() - pushbytes base32(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ // tests/approvals/arc4-types.algo.ts:90 // const b = new Address(Txn.sender) txn Sender + // tests/approvals/arc4-types.algo.ts:89 + // const a = new Address() + bytec_2 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ // tests/approvals/arc4-types.algo.ts:92 // assert(!a.equals(b), 'Zero address should not match sender') == ! assert // Zero address should not match sender + // tests/approvals/arc4-types.algo.ts:89 + // const a = new Address() + bytec_2 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ + // tests/approvals/arc4-types.algo.ts:93 + // assert(a.equals(new Address()), 'Two zero addresses should match') + dup + == + assert // Two zero addresses should match + // tests/approvals/arc4-types.algo.ts:94 + // assert(a[0].equals(new Byte()), 'Zero address should start with zero byte') + intc_0 // 0 + intc_1 // 1 + * + // tests/approvals/arc4-types.algo.ts:89 + // const a = new Address() + bytec_2 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ + // tests/approvals/arc4-types.algo.ts:94 + // assert(a[0].equals(new Byte()), 'Zero address should start with zero byte') + swap + intc_1 // 1 + extract3 // on error: Index access is out of bounds + bytec_3 // 0x00 + == + assert // Zero address should start with zero byte + retsub + + +// tests/approvals/arc4-types.algo.ts::testTuple() -> void: +testTuple: + // tests/approvals/arc4-types.algo.ts:97 + // function testTuple() { + proto 0 0 + // tests/approvals/arc4-types.algo.ts:98 + // const t = new Tuple(new ARC4Uint64(34)) + bytec_0 // 0x + pushbytes 0x0000000000000022 + concat + // tests/approvals/arc4-types.algo.ts:99 + // const firstItem = t.at(0) + dup + intc_0 // 0 + intc_2 // 8 + extract3 // on error: Index access is out of bounds + swap + // tests/approvals/arc4-types.algo.ts:100 + // const firstItemIndexer = t.native[0] + intc_0 // 0 + intc_2 // 8 + extract3 // on error: Index access is out of bounds + // tests/approvals/arc4-types.algo.ts:101 + // assert(firstItem.equals(firstItemIndexer)) + == + assert + // tests/approvals/arc4-types.algo.ts:103 + // assert(t1.length === 2) + intc_3 // 2 + dup + == + assert retsub @@ -134,6 +341,23 @@ testDynamicBytes: // tests/approvals/arc4-types.algo.ts:48 // function testDynamicBytes(someBytes: bytes) { proto 1 0 + // tests/approvals/arc4-types.algo.ts:49 + // const db1 = new DynamicBytes() + bytec_1 // 0x0000 + // tests/approvals/arc4-types.algo.ts:50 + // assert(db1.native === Bytes(), 'No args should give empty bytes') + extract 2 0 + bytec_0 // 0x + == + assert // No args should give empty bytes + // tests/approvals/arc4-types.algo.ts:49 + // const db1 = new DynamicBytes() + bytec_1 // 0x0000 + // tests/approvals/arc4-types.algo.ts:51 + // assert(db1.bytes === new UintN<16>(0).bytes, 'bytes prop should return length header (of 0)') + dup + == + assert // bytes prop should return length header (of 0) // tests/approvals/arc4-types.algo.ts:52 // const db2 = new DynamicBytes(someBytes) frame_dig -1 @@ -148,6 +372,23 @@ testDynamicBytes: frame_dig -1 == assert + // tests/approvals/arc4-types.algo.ts:55 + // const db3 = new DynamicBytes('hello') + pushbytes 0x000568656c6c6f + // tests/approvals/arc4-types.algo.ts:56 + // assert(db3.native === Bytes('hello')) + extract 2 0 + pushbytes "hello" + == + assert + retsub + + +// tests/approvals/arc4-types.algo.ts::testStaticBytes() -> void: +testStaticBytes: + // tests/approvals/arc4-types.algo.ts:59 + // function testStaticBytes() { + proto 0 0 retsub @@ -155,9 +396,9 @@ testDynamicBytes: dynamic_array_pop_fixed_size: proto 2 2 frame_dig -2 - intc_3 // 0 + intc_0 // 0 extract_uint16 - intc_0 // 1 + intc_1 // 1 - itob extract 6 0 @@ -171,8 +412,9 @@ dynamic_array_pop_fixed_size: dup2 frame_dig -1 extract3 + cover 2 + swap + intc_0 // 0 uncover 2 - intc_3 // 0 - uncover 3 substring3 retsub diff --git a/tests/approvals/out/arc4-types/arc4-types.awst b/tests/approvals/out/arc4-types/arc4-types.awst index 003af230..94e78577 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst +++ b/tests/approvals/out/arc4-types/arc4-types.awst @@ -30,12 +30,12 @@ subroutine testStr(): void subroutine testDynamicBytes(someBytes: bytes): void { db1: arc4.dynamic_array = 0x0000 - assert(reinterpret_cast(db1)[2:] == 0x) + assert(ARC4_DECODE(db1) == 0x) assert(reinterpret_cast(db1) == reinterpret_cast(0)) db2: arc4.dynamic_array = ARC4_ENCODE(someBytes, wtype=arc4.dynamic_array) - assert(reinterpret_cast(db2)[2:] == someBytes) + assert(ARC4_DECODE(db2) == someBytes) db3: arc4.dynamic_array = 0x000568656c6c6f - assert(reinterpret_cast(db3)[2:] == "hello") + assert(ARC4_DECODE(db3) == "hello") } subroutine testStaticBytes(): void { @@ -84,6 +84,7 @@ contract Arc4TypesTestContract x: arc4.uint64 = 0 tests/approvals/arc4-types.algo.ts::testStr() tests/approvals/arc4-types.algo.ts::test(1, 2, 4) + tests/approvals/arc4-types.algo.ts::testUFixed() tests/approvals/arc4-types.algo.ts::testByte() tests/approvals/arc4-types.algo.ts::testArrays(65) tests/approvals/arc4-types.algo.ts::testAddress() diff --git a/tests/approvals/out/arc4-types/arc4-types.awst.json b/tests/approvals/out/arc4-types/arc4-types.awst.json index bb66895a..dc96d337 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst.json +++ b/tests/approvals/out/arc4-types/arc4-types.awst.json @@ -69,8 +69,8 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 17, "end_line": 17, - "column": 26, - "end_column": 33 + "column": 33, + "end_column": 40 }, "wtype": { "_type": "ARC4UFixedNxM", @@ -2309,7 +2309,7 @@ "scalar_type": 2 }, "lhs": { - "_type": "SliceExpression", + "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 50, @@ -2324,86 +2324,49 @@ "ephemeral": false, "scalar_type": 1 }, - "base": { - "_type": "ReinterpretCast", + "value": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 50, "end_line": 50, "column": 9, - "end_column": 19 + "end_column": 12 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 50, - "end_line": 50, - "column": 9, - "end_column": 12 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null + "arc4_name": "byte", + "n": "8" }, - "name": "db1" - } - }, - "begin_index": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 50, - "end_line": 50, - "column": 9, - "end_column": 19 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "source_location": null }, - "value": "2", - "teal_alias": null - }, - "end_index": null + "name": "db1" + } }, "operator": "==", "rhs": { @@ -2743,7 +2706,7 @@ "scalar_type": 2 }, "lhs": { - "_type": "SliceExpression", + "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 53, @@ -2758,86 +2721,49 @@ "ephemeral": false, "scalar_type": 1 }, - "base": { - "_type": "ReinterpretCast", + "value": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 53, "end_line": 53, "column": 9, - "end_column": 19 + "end_column": 12 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 53, - "end_line": 53, - "column": 9, - "end_column": 12 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null + "arc4_name": "byte", + "n": "8" }, - "name": "db2" - } - }, - "begin_index": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 53, - "end_line": 53, - "column": 9, - "end_column": 19 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "source_location": null }, - "value": "2", - "teal_alias": null - }, - "end_index": null + "name": "db2" + } }, "operator": "==", "rhs": { @@ -3005,7 +2931,7 @@ "scalar_type": 2 }, "lhs": { - "_type": "SliceExpression", + "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 56, @@ -3020,86 +2946,49 @@ "ephemeral": false, "scalar_type": 1 }, - "base": { - "_type": "ReinterpretCast", + "value": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 56, "end_line": 56, "column": 9, - "end_column": 19 + "end_column": 12 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, - "column": 9, - "end_column": 12 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null + "arc4_name": "byte", + "n": "8" }, - "name": "db3" - } - }, - "begin_index": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, - "column": 9, - "end_column": 19 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "source_location": null }, - "value": "2", - "teal_alias": null - }, - "end_index": null + "name": "db3" + } }, "operator": "==", "rhs": { @@ -3460,7 +3349,7 @@ "array_size": "5" }, "value": "s=LhH?f", - "encoding": "base16" + "encoding": "unknown" } } ], @@ -6618,7 +6507,7 @@ "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 111, - "end_line": 125, + "end_line": 126, "column": 36, "end_column": 3 }, @@ -6838,7 +6727,7 @@ "line": 115, "end_line": 115, "column": 4, - "end_column": 14 + "end_column": 16 }, "expr": { "_type": "SubroutineCallExpression", @@ -6847,7 +6736,7 @@ "line": 115, "end_line": 115, "column": 4, - "end_column": 14 + "end_column": 16 }, "wtype": { "_type": "WType", @@ -6858,7 +6747,7 @@ }, "target": { "_type": "SubroutineID", - "target": "tests/approvals/arc4-types.algo.ts::testByte" + "target": "tests/approvals/arc4-types.algo.ts::testUFixed" }, "args": [] } @@ -6870,7 +6759,7 @@ "line": 116, "end_line": 116, "column": 4, - "end_column": 33 + "end_column": 14 }, "expr": { "_type": "SubroutineCallExpression", @@ -6879,6 +6768,38 @@ "line": 116, "end_line": 116, "column": 4, + "end_column": 14 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/arc4-types.algo.ts::testByte" + }, + "args": [] + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 117, + "end_line": 117, + "column": 4, + "end_column": 33 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 117, + "end_line": 117, + "column": 4, "end_column": 33 }, "wtype": { @@ -6900,8 +6821,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 116, - "end_line": 116, + "line": 117, + "end_line": 117, "column": 15, "end_column": 32 }, @@ -6932,8 +6853,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 117, - "end_line": 117, + "line": 118, + "end_line": 118, "column": 4, "end_column": 17 }, @@ -6941,8 +6862,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 117, - "end_line": 117, + "line": 118, + "end_line": 118, "column": 4, "end_column": 17 }, @@ -6964,8 +6885,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 118, - "end_line": 118, + "line": 119, + "end_line": 119, "column": 4, "end_column": 15 }, @@ -6973,8 +6894,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 118, - "end_line": 118, + "line": 119, + "end_line": 119, "column": 4, "end_column": 15 }, @@ -6996,8 +6917,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 119, - "end_line": 119, + "line": 120, + "end_line": 120, "column": 4, "end_column": 16 }, @@ -7005,8 +6926,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 119, - "end_line": 119, + "line": 120, + "end_line": 120, "column": 4, "end_column": 16 }, @@ -7028,8 +6949,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 120, - "end_line": 120, + "line": 121, + "end_line": 121, "column": 4, "end_column": 41 }, @@ -7037,8 +6958,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 120, - "end_line": 120, + "line": 121, + "end_line": 121, "column": 4, "end_column": 41 }, @@ -7061,8 +6982,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 120, - "end_line": 120, + "line": 121, + "end_line": 121, "column": 27, "end_column": 39 }, @@ -7084,8 +7005,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 121, - "end_line": 121, + "line": 122, + "end_line": 122, "column": 4, "end_column": 21 }, @@ -7093,8 +7014,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 121, - "end_line": 121, + "line": 122, + "end_line": 122, "column": 4, "end_column": 21 }, @@ -7116,8 +7037,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 122, - "end_line": 122, + "line": 123, + "end_line": 123, "column": 10, "end_column": 58 }, @@ -7125,8 +7046,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 122, - "end_line": 122, + "line": 123, + "end_line": 123, "column": 10, "end_column": 16 }, @@ -7162,8 +7083,8 @@ "_type": "NewArray", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 122, - "end_line": 122, + "line": 123, + "end_line": 123, "column": 19, "end_column": 58 }, @@ -7193,8 +7114,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 122, - "end_line": 122, + "line": 123, + "end_line": 123, "column": 19, "end_column": 58 } @@ -7206,8 +7127,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 123, - "end_line": 123, + "line": 124, + "end_line": 124, "column": 4, "end_column": 31 }, @@ -7215,8 +7136,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 123, - "end_line": 123, + "line": 124, + "end_line": 124, "column": 4, "end_column": 31 }, @@ -7234,8 +7155,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 123, - "end_line": 123, + "line": 124, + "end_line": 124, "column": 11, "end_column": 30 }, @@ -7250,8 +7171,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 123, - "end_line": 123, + "line": 124, + "end_line": 124, "column": 11, "end_column": 24 }, @@ -7269,8 +7190,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 123, - "end_line": 123, + "line": 124, + "end_line": 124, "column": 11, "end_column": 17 }, @@ -7306,8 +7227,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 123, - "end_line": 123, + "line": 124, + "end_line": 124, "column": 11, "end_column": 24 }, @@ -7329,8 +7250,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 123, - "end_line": 123, + "line": 124, + "end_line": 124, "column": 29, "end_column": 30 }, @@ -7353,8 +7274,8 @@ "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, + "line": 125, + "end_line": 125, "column": 4, "end_column": 15 }, @@ -7362,8 +7283,8 @@ "_type": "BoolConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, + "line": 125, + "end_line": 125, "column": 11, "end_column": 15 }, diff --git a/tests/expected-output/arc4-types.algo.ts b/tests/expected-output/arc4-types.algo.ts index 4b39f5c6..ce51484a 100644 --- a/tests/expected-output/arc4-types.algo.ts +++ b/tests/expected-output/arc4-types.algo.ts @@ -14,7 +14,7 @@ import { } from '@algorandfoundation/algorand-typescript/arc4' function testUFixed() { - const a = new UFixedNxM('1.244', 32, 4) + const a = new UFixedNxM<32, 4>('1.244') const c = new UFixedNxM<32, 4>('1.244') assert(a.equals(c)) From 7df65742aa18a47b9eca7e8890081a00db09064d Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Wed, 27 Nov 2024 12:03:40 -0800 Subject: [PATCH 16/30] refactor: Update AWST nodes to include AssertExpression and make use of it in place of intrinsic op --- src/awst/intrinsic-factory.ts | 16 +- src/awst/node-factory.ts | 7 - src/awst/nodes.ts | 17 +- src/awst/to-code-visitor.ts | 18 +- .../abi-decorators/abi-decorators.awst.json | 3 +- .../approvals/out/accounts/accounts.awst.json | 678 ++-- .../out/arc4-struct/arc4-struct.awst.json | 819 ++--- .../approvals/out/arc4-types/arc4-types.awst | 12 +- .../out/arc4-types/arc4-types.awst.json | 3246 ++++++++--------- .../array-destructuring.awst.json | 176 +- .../out/assert-match/assert-match.awst | 4 +- .../out/assert-match/assert-match.awst.json | 517 ++- .../biguint-expressions.awst | 2 +- .../biguint-expressions.awst.json | 701 ++-- .../boolean-conversions.awst | 24 +- .../boolean-conversions.awst.json | 1690 ++++----- .../boolean-expressions.awst | 2 +- .../boolean-expressions.awst.json | 319 +- .../out/box-proxies/box-proxies.awst.json | 2183 ++++++----- .../byte-expressions/byte-expressions.awst | 8 +- .../byte-expressions.awst.json | 922 +++-- .../call-expressions.awst.json | 3 +- .../destructured-params.awst.json | 15 +- .../destructuring-iterators.awst.json | 90 +- .../out/ensure-budget/ensure-budget.awst.json | 3 +- .../out/global-state/global-state.awst | 6 +- .../out/global-state/global-state.awst.json | 303 +- .../implicit-create/implicit-create.awst.json | 18 +- .../out/inheritance-b/inheritance-b.awst.json | 24 +- .../intrinsic-calls/intrinsic-calls.awst.json | 12 +- tests/approvals/out/itxn/itxn.awst | 16 +- tests/approvals/out/itxn/itxn.awst.json | 1202 +++--- .../out/local-state/local-state.awst.json | 108 +- tests/approvals/out/logic-sig/logic-sig.awst | 2 +- .../out/logic-sig/logic-sig.awst.json | 99 +- .../out/named-types/named-types.awst | 2 +- .../out/named-types/named-types.awst.json | 401 +- .../approvals/out/non-arc4/non-arc4.awst.json | 9 +- .../pre-approved-sale/pre-approved-sale.awst | 4 +- .../pre-approved-sale.awst.json | 629 ++-- .../prefix-postfix-operators.awst.json | 3 +- .../property-ordering.awst.json | 3 +- .../shadowed-variables.awst | 14 +- .../shadowed-variables.awst.json | 513 ++- tests/approvals/out/strings/strings.awst.json | 6 +- .../uint64-expressions.awst.json | 3 +- 46 files changed, 7049 insertions(+), 7803 deletions(-) diff --git a/src/awst/intrinsic-factory.ts b/src/awst/intrinsic-factory.ts index 49cee9da..18bd0388 100644 --- a/src/awst/intrinsic-factory.ts +++ b/src/awst/intrinsic-factory.ts @@ -27,23 +27,19 @@ export const intrinsicFactory = { }) }, err({ sourceLocation, comment }: { sourceLocation: SourceLocation; comment: string | null }) { - return nodeFactory.intrinsicCall({ - opCode: 'err', + return nodeFactory.assertExpression({ + condition: null, sourceLocation, - stackArgs: [], - immediates: [], wtype: wtypes.voidWType, - comment, + errorMessage: comment, }) }, assert({ sourceLocation, comment, condition }: { sourceLocation: SourceLocation; comment: string | null; condition: Expression }) { - return nodeFactory.intrinsicCall({ - opCode: 'assert', + return nodeFactory.assertExpression({ sourceLocation, - stackArgs: [condition], - immediates: [], + condition, wtype: wtypes.voidWType, - comment, + errorMessage: comment, }) }, bytesLen({ value, sourceLocation }: { value: awst.Expression; sourceLocation: SourceLocation }) { diff --git a/src/awst/node-factory.ts b/src/awst/node-factory.ts index 4ca0c68d..1a91b4d6 100644 --- a/src/awst/node-factory.ts +++ b/src/awst/node-factory.ts @@ -17,7 +17,6 @@ import { Copy, ExpressionStatement, IntegerConstant, - IntrinsicCall, MethodDocumentation, Not, NumericComparisonExpression, @@ -213,12 +212,6 @@ const explicitNodeFactory = { returns: props?.returns ?? null, }) }, - intrinsicCall(props: Omit, 'comment'> & { comment?: string | null }) { - return new IntrinsicCall({ - ...props, - comment: props.comment ?? null, - }) - }, copy({ value, sourceLocation }: { value: Expression; sourceLocation: SourceLocation }) { return new Copy({ value, diff --git a/src/awst/nodes.ts b/src/awst/nodes.ts index d76d9be0..f3e1648b 100644 --- a/src/awst/nodes.ts +++ b/src/awst/nodes.ts @@ -134,6 +134,19 @@ export class ReturnStatement extends Statement { return visitor.visitReturnStatement(this) } } +export class AssertExpression extends Expression { + constructor(props: Props) { + super(props) + this.condition = props.condition + this.errorMessage = props.errorMessage + this.wtype = props.wtype + } + condition: Expression | null + errorMessage: string | null + accept(visitor: ExpressionVisitor): T { + return visitor.visitAssertExpression(this) + } +} export class IntegerConstant extends Expression { constructor(props: Props) { super(props) @@ -316,12 +329,10 @@ export class IntrinsicCall extends Expression { this.opCode = props.opCode this.immediates = props.immediates this.stackArgs = props.stackArgs - this.comment = props.comment } opCode: string immediates: Array stackArgs: Array - comment: string | null accept(visitor: ExpressionVisitor): T { return visitor.visitIntrinsicCall(this) } @@ -1309,6 +1320,7 @@ export const concreteNodes = { loopExit: LoopExit, loopContinue: LoopContinue, returnStatement: ReturnStatement, + assertExpression: AssertExpression, integerConstant: IntegerConstant, decimalConstant: DecimalConstant, boolConstant: BoolConstant, @@ -1393,6 +1405,7 @@ export const concreteNodes = { bigUIntConstant: IntegerConstant, } as const export interface ExpressionVisitor { + visitAssertExpression(expression: AssertExpression): T visitIntegerConstant(expression: IntegerConstant): T visitDecimalConstant(expression: DecimalConstant): T visitBoolConstant(expression: BoolConstant): T diff --git a/src/awst/to-code-visitor.ts b/src/awst/to-code-visitor.ts index 3154b499..9a674bb7 100644 --- a/src/awst/to-code-visitor.ts +++ b/src/awst/to-code-visitor.ts @@ -3,7 +3,15 @@ import { TodoError } from '../errors' import { logger } from '../logger' import { uint8ArrayToBase32, uint8ArrayToUtf8 } from '../util' import type { ContractReference } from './models' -import type { AppStorageDefinition, ContractMemberNodeVisitor, Emit, ExpressionVisitor, RootNodeVisitor, StatementVisitor } from './nodes' +import type { + AppStorageDefinition, + AssertExpression, + ContractMemberNodeVisitor, + Emit, + ExpressionVisitor, + RootNodeVisitor, + StatementVisitor, +} from './nodes' import * as nodes from './nodes' import { AppStorageKind, BytesEncoding, ContractMethodTarget, InstanceMethodTarget, InstanceSuperMethodTarget, SubroutineID } from './nodes' import { SymbolToNumber } from './util' @@ -331,6 +339,14 @@ export class ToCodeVisitor visitLogicSignature(moduleStatement: nodes.LogicSignature): string[] { return ['', `logicsig ${moduleStatement.id} {`, ...indent(moduleStatement.program.body.accept(this)), '}'] } + visitAssertExpression(expression: AssertExpression): string { + return [ + expression.condition ? 'assert(' : 'err(', + expression.condition?.accept(this) ?? '', + expression.errorMessage ? `, comment=${expression.errorMessage}` : '', + ')', + ].join('') + } private currentContract: ContractReference[] = [] visitContract(c: nodes.Contract): string[] { diff --git a/tests/approvals/out/abi-decorators/abi-decorators.awst.json b/tests/approvals/out/abi-decorators/abi-decorators.awst.json index d5d55351..6a049fed 100644 --- a/tests/approvals/out/abi-decorators/abi-decorators.awst.json +++ b/tests/approvals/out/abi-decorators/abi-decorators.awst.json @@ -109,8 +109,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, diff --git a/tests/approvals/out/accounts/accounts.awst.json b/tests/approvals/out/accounts/accounts.awst.json index b290e39d..710fbd10 100644 --- a/tests/approvals/out/accounts/accounts.awst.json +++ b/tests/approvals/out/accounts/accounts.awst.json @@ -109,8 +109,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -1114,8 +1113,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -1190,8 +1188,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -1282,8 +1279,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" } @@ -1359,8 +1355,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -1435,8 +1430,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -1511,8 +1505,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -1587,8 +1580,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -1663,8 +1655,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -1739,8 +1730,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -1815,8 +1805,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -1891,8 +1880,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -1967,8 +1955,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -2029,11 +2016,9 @@ "immediates": [ "CurrentApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } - ], - "comment": null + ] }, { "_type": "TupleItemExpression", @@ -2124,8 +2109,7 @@ }, "name": "asset" } - ], - "comment": null + ] }, "index": "1" } @@ -2538,8 +2522,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -2614,8 +2597,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -2706,8 +2688,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" } @@ -2783,8 +2764,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -2859,8 +2839,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -2935,8 +2914,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -3011,8 +2989,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -3087,8 +3064,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -3163,8 +3139,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -3239,8 +3214,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -3315,8 +3289,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -3391,8 +3364,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -3453,11 +3425,9 @@ "immediates": [ "CurrentApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } - ], - "comment": null + ] }, { "_type": "TupleItemExpression", @@ -3548,8 +3518,7 @@ }, "name": "asset" } - ], - "comment": null + ] }, "index": "1" } @@ -3962,8 +3931,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -4038,8 +4006,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -4130,8 +4097,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" } @@ -4207,8 +4173,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -4283,8 +4248,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -4359,8 +4323,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -4435,8 +4398,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -4511,8 +4473,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -4587,8 +4548,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -4663,8 +4623,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -4739,8 +4698,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -4815,8 +4773,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -4877,11 +4834,9 @@ "immediates": [ "CurrentApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } - ], - "comment": null + ] }, { "_type": "TupleItemExpression", @@ -4972,8 +4927,7 @@ }, "name": "asset" } - ], - "comment": null + ] }, "index": "1" } @@ -5386,8 +5340,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -5462,8 +5415,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -5554,8 +5506,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" } @@ -5631,8 +5582,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -5707,8 +5657,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -5783,8 +5732,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -5859,8 +5807,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -5935,8 +5882,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -6011,8 +5957,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -6087,8 +6032,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -6163,8 +6107,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -6239,8 +6182,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -6301,11 +6243,9 @@ "immediates": [ "CurrentApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } - ], - "comment": null + ] }, { "_type": "TupleItemExpression", @@ -6396,8 +6336,7 @@ }, "name": "asset" } - ], - "comment": null + ] }, "index": "1" } @@ -6810,8 +6749,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -6886,8 +6824,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -6978,8 +6915,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" } @@ -7055,8 +6991,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -7131,8 +7066,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -7207,8 +7141,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -7283,8 +7216,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -7359,8 +7291,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -7435,8 +7366,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -7511,8 +7441,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -7587,8 +7516,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -7663,8 +7591,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -7725,11 +7652,9 @@ "immediates": [ "CurrentApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } - ], - "comment": null + ] }, { "_type": "TupleItemExpression", @@ -7820,8 +7745,7 @@ }, "name": "asset" } - ], - "comment": null + ] }, "index": "1" } @@ -8234,8 +8158,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -8310,8 +8233,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -8402,8 +8324,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" } @@ -8479,8 +8400,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -8555,8 +8475,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -8631,8 +8550,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -8707,8 +8625,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -8783,8 +8700,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -8859,8 +8775,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -8935,8 +8850,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -9011,8 +8925,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -9087,8 +9000,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -9149,11 +9061,9 @@ "immediates": [ "CurrentApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } - ], - "comment": null + ] }, { "_type": "TupleItemExpression", @@ -9244,8 +9154,7 @@ }, "name": "asset" } - ], - "comment": null + ] }, "index": "1" } @@ -9658,8 +9567,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -9734,8 +9642,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -9826,8 +9733,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" } @@ -9903,8 +9809,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -9979,8 +9884,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -10055,8 +9959,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -10131,8 +10034,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -10207,8 +10109,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -10283,8 +10184,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -10359,8 +10259,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -10435,8 +10334,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -10511,8 +10409,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -10573,11 +10470,9 @@ "immediates": [ "CurrentApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } - ], - "comment": null + ] }, { "_type": "TupleItemExpression", @@ -10668,8 +10563,7 @@ }, "name": "asset" } - ], - "comment": null + ] }, "index": "1" } @@ -11082,8 +10976,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -11158,8 +11051,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -11250,8 +11142,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" } @@ -11327,8 +11218,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -11403,8 +11293,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -11479,8 +11368,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -11555,8 +11443,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -11631,8 +11518,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -11707,8 +11593,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -11783,8 +11668,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -11859,8 +11743,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -11935,8 +11818,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -11997,11 +11879,9 @@ "immediates": [ "CurrentApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } - ], - "comment": null + ] }, { "_type": "TupleItemExpression", @@ -12092,8 +11972,7 @@ }, "name": "asset" } - ], - "comment": null + ] }, "index": "1" } @@ -12506,8 +12385,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -12582,8 +12460,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -12674,8 +12551,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" } @@ -12751,8 +12627,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -12827,8 +12702,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -12903,8 +12777,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -12979,8 +12852,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -13055,8 +12927,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -13131,8 +13002,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -13207,8 +13077,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -13283,8 +13152,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -13359,8 +13227,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -13421,11 +13288,9 @@ "immediates": [ "CurrentApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } - ], - "comment": null + ] }, { "_type": "TupleItemExpression", @@ -13516,8 +13381,7 @@ }, "name": "asset" } - ], - "comment": null + ] }, "index": "1" } @@ -13930,8 +13794,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -14006,8 +13869,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -14098,8 +13960,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" } @@ -14175,8 +14036,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -14251,8 +14111,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -14327,8 +14186,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -14403,8 +14261,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -14479,8 +14336,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -14555,8 +14411,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -14631,8 +14486,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -14707,8 +14561,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -14783,8 +14636,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -14845,11 +14697,9 @@ "immediates": [ "CurrentApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } - ], - "comment": null + ] }, { "_type": "TupleItemExpression", @@ -14940,8 +14790,7 @@ }, "name": "asset" } - ], - "comment": null + ] }, "index": "1" } @@ -15354,8 +15203,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -15430,8 +15278,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -15522,8 +15369,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" } @@ -15599,8 +15445,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -15675,8 +15520,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -15751,8 +15595,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -15827,8 +15670,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -15903,8 +15745,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -15979,8 +15820,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -16055,8 +15895,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -16131,8 +15970,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -16207,8 +16045,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -16269,11 +16106,9 @@ "immediates": [ "CurrentApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } - ], - "comment": null + ] }, { "_type": "TupleItemExpression", @@ -16364,8 +16199,7 @@ }, "name": "asset" } - ], - "comment": null + ] }, "index": "1" } @@ -16778,8 +16612,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -16854,8 +16687,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -16946,8 +16778,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" } @@ -17023,8 +16854,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -17099,8 +16929,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -17175,8 +17004,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -17251,8 +17079,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -17327,8 +17154,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -17403,8 +17229,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -17479,8 +17304,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -17555,8 +17379,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -17631,8 +17454,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -17693,11 +17515,9 @@ "immediates": [ "CurrentApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } - ], - "comment": null + ] }, { "_type": "TupleItemExpression", @@ -17788,8 +17608,7 @@ }, "name": "asset" } - ], - "comment": null + ] }, "index": "1" } @@ -18202,8 +18021,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -18278,8 +18096,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -18370,8 +18187,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" } @@ -18447,8 +18263,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -18523,8 +18338,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -18599,8 +18413,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -18675,8 +18488,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -18751,8 +18563,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -18827,8 +18638,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -18903,8 +18713,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -18979,8 +18788,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -19055,8 +18863,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -19117,11 +18924,9 @@ "immediates": [ "CurrentApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } - ], - "comment": null + ] }, { "_type": "TupleItemExpression", @@ -19212,8 +19017,7 @@ }, "name": "asset" } - ], - "comment": null + ] }, "index": "1" } @@ -19626,8 +19430,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -19702,8 +19505,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -19794,8 +19596,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" } @@ -19871,8 +19672,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -19947,8 +19747,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -20023,8 +19822,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -20099,8 +19897,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -20175,8 +19972,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -20251,8 +20047,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -20327,8 +20122,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -20403,8 +20197,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -20479,8 +20272,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -20541,11 +20333,9 @@ "immediates": [ "CurrentApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } - ], - "comment": null + ] }, { "_type": "TupleItemExpression", @@ -20636,8 +20426,7 @@ }, "name": "asset" } - ], - "comment": null + ] }, "index": "1" } @@ -21050,8 +20839,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -21126,8 +20914,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -21218,8 +21005,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" } @@ -21295,8 +21081,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -21371,8 +21156,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -21447,8 +21231,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -21523,8 +21306,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -21599,8 +21381,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -21675,8 +21456,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -21751,8 +21531,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -21827,8 +21606,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -21903,8 +21681,7 @@ }, "name": "account" } - ], - "comment": null + ] }, "comment": "account funded" }, @@ -21965,11 +21742,9 @@ "immediates": [ "CurrentApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } - ], - "comment": null + ] }, { "_type": "TupleItemExpression", @@ -22060,8 +21835,7 @@ }, "name": "asset" } - ], - "comment": null + ] }, "index": "1" } diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst.json b/tests/approvals/out/arc4-struct/arc4-struct.awst.json index a794c1c9..99d963cc 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst.json +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst.json @@ -109,8 +109,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -985,8 +984,7 @@ "name": "x" } } - ], - "comment": null + ] } }, { @@ -1123,8 +1121,7 @@ "name": "y" } } - ], - "comment": null + ] } }, { @@ -2336,7 +2333,7 @@ "end_column": 25 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 15, @@ -2351,11 +2348,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 15, + "end_line": 15, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 15, @@ -2365,29 +2375,62 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 15, "end_line": 15, "column": 11, - "end_column": 24 + "end_column": 13 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4Struct", + "name": "Vector", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 15, @@ -2395,79 +2438,79 @@ "column": 11, "end_column": 13 }, - "wtype": { - "_type": "ARC4Struct", - "name": "Vector", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64,uint64", - "fields": { - "x": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "y": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - } - }, - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 15, - "end_line": 15, - "column": 11, - "end_column": 13 - }, - "frozen": false - }, - "name": "v1" - } + "frozen": false + }, + "name": "v1" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 15, + "end_line": 15, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 15, "end_line": 15, - "column": 11, - "end_column": 24 + "column": 21, + "end_column": 23 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4Struct", + "name": "Vector", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 15, @@ -2475,63 +2518,13 @@ "column": 21, "end_column": 23 }, - "wtype": { - "_type": "ARC4Struct", - "name": "Vector", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64,uint64", - "fields": { - "x": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "y": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - } - }, - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 15, - "end_line": 15, - "column": 21, - "end_column": 23 - }, - "frozen": false - }, - "name": "v2" - } + "frozen": false + }, + "name": "v2" } } - ], - "comment": null + }, + "error_message": null } } ], @@ -5617,7 +5610,7 @@ "end_column": 33 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 28, @@ -5632,123 +5625,169 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 11, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 28, "end_line": 28, "column": 11, - "end_column": 32 + "end_column": 19 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 28, "end_line": 28, "column": 11, - "end_column": 19 + "end_column": 13 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4Struct", + "name": "Vector", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 28, - "end_line": 28, - "column": 11, - "end_column": 13 - }, - "wtype": { - "_type": "ARC4Struct", - "name": "Vector", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64,uint64", - "fields": { - "x": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "y": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - } - }, - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 28, - "end_line": 28, - "column": 11, - "end_column": 13 + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "frozen": false + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } }, - "name": "v1" - } + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 11, + "end_column": 13 + }, + "frozen": false + }, + "name": "v1" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 28, + "end_line": 28, + "column": 24, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 28, "end_line": 28, "column": 24, - "end_column": 32 + "end_column": 26 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4Struct", + "name": "Vector", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 28, @@ -5756,63 +5795,13 @@ "column": 24, "end_column": 26 }, - "wtype": { - "_type": "ARC4Struct", - "name": "Vector", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64,uint64", - "fields": { - "x": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "y": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - } - }, - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 28, - "end_line": 28, - "column": 24, - "end_column": 26 - }, - "frozen": false - }, - "name": "v2" - } + "frozen": false + }, + "name": "v2" } } - ], - "comment": null + }, + "error_message": null } }, { @@ -5825,7 +5814,7 @@ "end_column": 33 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 29, @@ -5840,43 +5829,89 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 29, "end_line": 29, "column": 11, - "end_column": 32 + "end_column": 19 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 29, "end_line": 29, "column": 11, - "end_column": 19 + "end_column": 13 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4Struct", + "name": "Vector", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 29, @@ -5884,79 +5919,79 @@ "column": 11, "end_column": 13 }, - "wtype": { - "_type": "ARC4Struct", - "name": "Vector", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64,uint64", - "fields": { - "x": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "y": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - } - }, - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 29, - "end_line": 29, - "column": 11, - "end_column": 13 - }, - "frozen": false - }, - "name": "v3" - } + "frozen": false + }, + "name": "v3" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 29, + "end_line": 29, + "column": 24, + "end_column": 32 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 29, "end_line": 29, "column": 24, - "end_column": 32 + "end_column": 26 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4Struct", + "name": "Vector", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 29, @@ -5964,63 +5999,13 @@ "column": 24, "end_column": 26 }, - "wtype": { - "_type": "ARC4Struct", - "name": "Vector", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64,uint64", - "fields": { - "x": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "y": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - } - }, - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 29, - "end_line": 29, - "column": 24, - "end_column": 26 - }, - "frozen": false - }, - "name": "v1" - } + "frozen": false + }, + "name": "v1" } } - ], - "comment": null + }, + "error_message": null } } ], diff --git a/tests/approvals/out/arc4-types/arc4-types.awst b/tests/approvals/out/arc4-types/arc4-types.awst index 94e78577..db9b3369 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst +++ b/tests/approvals/out/arc4-types/arc4-types.awst @@ -23,15 +23,15 @@ subroutine test(n: uint64, b: biguint, c: arc4.uint256): void subroutine testStr(): void { s1: arc4.dynamic_array = "" - assert(reinterpret_cast(s1) == reinterpret_cast(0)) + assert(reinterpret_cast(s1) == reinterpret_cast(0), comment=Empty string should equal the uint16 length prefix) s2: arc4.dynamic_array = "Hello" assert(ARC4_DECODE(s2) == "Hello") } subroutine testDynamicBytes(someBytes: bytes): void { db1: arc4.dynamic_array = 0x0000 - assert(ARC4_DECODE(db1) == 0x) - assert(reinterpret_cast(db1) == reinterpret_cast(0)) + assert(ARC4_DECODE(db1) == 0x, comment=No args should give empty bytes) + assert(reinterpret_cast(db1) == reinterpret_cast(0), comment=bytes prop should return length header (of 0)) db2: arc4.dynamic_array = ARC4_ENCODE(someBytes, wtype=arc4.dynamic_array) assert(ARC4_DECODE(db2) == someBytes) db3: arc4.dynamic_array = 0x000568656c6c6f @@ -61,9 +61,9 @@ subroutine testAddress(): void { a: arc4.static_array = Address("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ") b: arc4.static_array = reinterpret_cast>(txn()) - assert(!reinterpret_cast(a) == reinterpret_cast(b)) - assert(reinterpret_cast(a) == reinterpret_cast(Address("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ"))) - assert(reinterpret_cast(a[0]) == reinterpret_cast(0)) + assert(!reinterpret_cast(a) == reinterpret_cast(b), comment=Zero address should not match sender) + assert(reinterpret_cast(a) == reinterpret_cast(Address("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ")), comment=Two zero addresses should match) + assert(reinterpret_cast(a[0]) == reinterpret_cast(0), comment=Zero address should start with zero byte) } subroutine testTuple(): void { diff --git a/tests/approvals/out/arc4-types/arc4-types.awst.json b/tests/approvals/out/arc4-types/arc4-types.awst.json index dc96d337..61cb2879 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst.json +++ b/tests/approvals/out/arc4-types/arc4-types.awst.json @@ -168,7 +168,7 @@ "end_column": 21 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 20, @@ -183,11 +183,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 20, + "end_line": 20, + "column": 9, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 20, @@ -197,105 +210,88 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 20, "end_line": 20, "column": 9, - "end_column": 20 + "end_column": 10 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UFixedNxM", + "name": "arc4.ufixed32x4", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "ARC4UFixedNxM", - "name": "arc4.ufixed32x4", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "ufixed32x4", - "n": "32", - "m": "4" + "scalar_type": 2 }, - "name": "a" - } + "arc4_name": "ufixed32x4", + "n": "32", + "m": "4" + }, + "name": "a" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 20, + "end_line": 20, + "column": 9, + "end_column": 20 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 20, "end_line": 20, - "column": 9, - "end_column": 20 + "column": 18, + "end_column": 19 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UFixedNxM", + "name": "arc4.ufixed32x4", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, - "column": 18, - "end_column": 19 - }, - "wtype": { - "_type": "ARC4UFixedNxM", - "name": "arc4.ufixed32x4", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "ufixed32x4", - "n": "32", - "m": "4" + "scalar_type": 2 }, - "name": "c" - } + "arc4_name": "ufixed32x4", + "n": "32", + "m": "4" + }, + "name": "c" } } - ], - "comment": null + }, + "error_message": null } } ], @@ -477,7 +473,7 @@ "end_column": 30 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 25, @@ -492,114 +488,109 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 25, + "end_line": 25, + "column": 9, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 25, "end_line": 25, "column": 9, - "end_column": 29 + "end_column": 23 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, - "column": 9, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "len", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 25, + "end_line": 25, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 25, "end_line": 25, "column": 9, - "end_column": 16 + "end_column": 10 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint8", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint8", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint8", - "n": "8" + "scalar_type": 2 }, - "name": "x" - } + "arc4_name": "uint8", + "n": "8" + }, + "name": "x" } - ], - "comment": null + } + ] + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 25, + "end_line": 25, + "column": 28, + "end_column": 29 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, - "column": 28, - "end_column": 29 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "1", - "teal_alias": null - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null } - ], - "comment": null + }, + "error_message": null } }, { @@ -677,7 +668,7 @@ "end_column": 42 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 27, @@ -692,92 +683,88 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 27, + "end_line": 27, + "column": 9, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 27, "end_line": 27, "column": 9, - "end_column": 41 + "end_column": 17 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 27, "end_line": 27, "column": 9, - "end_column": 17 + "end_column": 11 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint8", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, - "column": 9, - "end_column": 11 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint8", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint8", - "n": "8" - }, - "name": "x2" - } - }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, - "column": 22, - "end_column": 41 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "arc4_name": "uint8", + "n": "8" }, - "value": "{{", - "encoding": "base16" + "name": "x2" } + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 27, + "end_line": 27, + "column": 22, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "{{", + "encoding": "base16" } - ], - "comment": null + }, + "error_message": null } }, { @@ -855,7 +842,7 @@ "end_column": 30 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 30, @@ -870,114 +857,109 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 30, + "end_line": 30, + "column": 9, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 30, "end_line": 30, "column": 9, - "end_column": 29 + "end_column": 23 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, - "column": 9, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "len", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 30, + "end_line": 30, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 30, "end_line": 30, "column": 9, - "end_column": 16 + "end_column": 10 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint16", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint16", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint16", - "n": "16" + "scalar_type": 2 }, - "name": "y" - } + "arc4_name": "uint16", + "n": "16" + }, + "name": "y" } - ], - "comment": null + } + ] + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 30, + "end_line": 30, + "column": 28, + "end_column": 29 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, - "column": 28, - "end_column": 29 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "2", - "teal_alias": null - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "2", + "teal_alias": null } - ], - "comment": null + }, + "error_message": null } }, { @@ -1143,7 +1125,7 @@ "end_column": 24 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 33, @@ -1158,65 +1140,61 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 33, + "end_line": 33, + "column": 9, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 33, "end_line": 33, "column": 9, - "end_column": 23 + "end_column": 17 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, - "column": 9, - "end_column": 17 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "z_native" + "name": "z_native" + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 33, + "end_line": 33, + "column": 22, + "end_column": 23 }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, - "column": 22, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "n" - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "n" } - ], - "comment": null + }, + "error_message": null } }, { @@ -1382,7 +1360,7 @@ "end_column": 24 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 36, @@ -1397,65 +1375,61 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 36, + "end_line": 36, + "column": 9, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 36, "end_line": 36, "column": 9, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "a_native" + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 36, + "end_line": 36, + "column": 22, "end_column": 23 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 36, - "end_line": 36, - "column": 9, - "end_column": 17 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "a_native" - }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 36, - "end_line": 36, - "column": 22, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "b" - } + "name": "b" } - ], - "comment": null + }, + "error_message": null } }, { @@ -1468,7 +1442,7 @@ "end_column": 36 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 38, @@ -1483,114 +1457,109 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 38, + "end_line": 38, + "column": 9, + "end_column": 35 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 38, "end_line": 38, "column": 9, - "end_column": 35 + "end_column": 23 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 38, - "end_line": 38, - "column": 9, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "len", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 38, + "end_line": 38, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 38, "end_line": 38, "column": 9, - "end_column": 16 + "end_column": 10 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint256", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 38, - "end_line": 38, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint256", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "uint256", - "n": "256" + "scalar_type": 1 }, - "name": "c" - } + "arc4_name": "uint256", + "n": "256" + }, + "name": "c" } - ], - "comment": null + } + ] + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 38, + "end_line": 38, + "column": 28, + "end_column": 35 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 38, - "end_line": 38, - "column": 28, - "end_column": 35 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "32", - "teal_alias": null - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "32", + "teal_alias": null } - ], - "comment": null + }, + "error_message": null } } ], @@ -1739,7 +1708,7 @@ "end_column": 99 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 43, @@ -1754,134 +1723,130 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 9, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 43, "end_line": 43, "column": 9, - "end_column": 44 + "end_column": 17 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 43, "end_line": 43, "column": 9, - "end_column": 17 + "end_column": 11 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, - "column": 9, - "end_column": 11 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "string", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null + "arc4_name": "byte", + "n": "8" }, - "name": "s1" - } + "source_location": null + }, + "name": "s1" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 22, + "end_column": 44 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 43, "end_line": 43, "column": 22, - "end_column": 44 + "end_column": 38 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint16", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, - "column": 22, - "end_column": 38 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint16", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint16", - "n": "16" + "scalar_type": 2 }, - "value": "0", - "teal_alias": null - } + "arc4_name": "uint16", + "n": "16" + }, + "value": "0", + "teal_alias": null } } - ], - "comment": "Empty string should equal the uint16 length prefix" + }, + "error_message": "Empty string should equal the uint16 length prefix" } }, { @@ -1990,7 +1955,7 @@ "end_column": 31 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 45, @@ -2005,107 +1970,103 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 45, + "end_line": 45, + "column": 9, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 45, "end_line": 45, "column": 9, - "end_column": 30 + "end_column": 18 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ARC4Decode", + "value": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 45, "end_line": 45, "column": 9, - "end_column": 18 + "end_column": 11 }, "wtype": { - "_type": "WType", - "name": "string", + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, - "column": 9, - "end_column": 11 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "string", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null + "arc4_name": "byte", + "n": "8" }, - "name": "s2" - } - }, - "operator": "==", - "rhs": { - "_type": "StringConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, - "column": 23, - "end_column": 30 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "source_location": null }, - "value": "Hello" + "name": "s2" } + }, + "operator": "==", + "rhs": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 45, + "end_line": 45, + "column": 23, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Hello" } - ], - "comment": null + }, + "error_message": null } } ], @@ -2274,7 +2235,7 @@ "end_column": 67 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 50, @@ -2289,108 +2250,104 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 50, + "end_line": 50, + "column": 9, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 50, "end_line": 50, "column": 9, - "end_column": 31 + "end_column": 19 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ARC4Decode", + "value": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 50, "end_line": 50, "column": 9, - "end_column": 19 + "end_column": 12 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 50, - "end_line": 50, - "column": 9, - "end_column": 12 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null + "arc4_name": "byte", + "n": "8" }, - "name": "db1" - } - }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 50, - "end_line": 50, - "column": 24, - "end_column": 31 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "source_location": null }, - "value": "", - "encoding": "unknown" + "name": "db1" } + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 50, + "end_line": 50, + "column": 24, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "", + "encoding": "unknown" } - ], - "comment": "No args should give empty bytes" + }, + "error_message": "No args should give empty bytes" } }, { @@ -2403,7 +2360,7 @@ "end_column": 95 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 51, @@ -2418,134 +2375,130 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 51, + "end_line": 51, + "column": 9, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 51, "end_line": 51, "column": 9, - "end_column": 45 + "end_column": 18 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 51, "end_line": 51, "column": 9, - "end_column": 18 + "end_column": 12 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 51, - "end_line": 51, - "column": 9, - "end_column": 12 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "bytes", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null + "arc4_name": "byte", + "n": "8" }, - "name": "db1" - } + "source_location": null + }, + "name": "db1" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 51, + "end_line": 51, + "column": 23, + "end_column": 45 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 51, "end_line": 51, "column": 23, - "end_column": 45 + "end_column": 39 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint16", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 51, - "end_line": 51, - "column": 23, - "end_column": 39 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint16", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint16", - "n": "16" + "scalar_type": 2 }, - "value": "0", - "teal_alias": null - } + "arc4_name": "uint16", + "n": "16" + }, + "value": "0", + "teal_alias": null } } - ], - "comment": "bytes prop should return length header (of 0)" + }, + "error_message": "bytes prop should return length header (of 0)" } }, { @@ -2671,7 +2624,7 @@ "end_column": 34 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 53, @@ -2686,107 +2639,103 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 53, + "end_line": 53, + "column": 9, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 53, "end_line": 53, "column": 9, - "end_column": 33 + "end_column": 19 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ARC4Decode", + "value": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 53, "end_line": 53, "column": 9, - "end_column": 19 + "end_column": 12 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 53, - "end_line": 53, - "column": 9, - "end_column": 12 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null + "arc4_name": "byte", + "n": "8" }, - "name": "db2" - } - }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 53, - "end_line": 53, - "column": 24, - "end_column": 33 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "source_location": null }, - "name": "someBytes" + "name": "db2" } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 53, + "end_line": 53, + "column": 24, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "someBytes" } - ], - "comment": null + }, + "error_message": null } }, { @@ -2896,7 +2845,7 @@ "end_column": 39 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 56, @@ -2911,110 +2860,106 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 9, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 56, "end_line": 56, "column": 9, - "end_column": 38 + "end_column": 19 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ARC4Decode", + "value": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 56, "end_line": 56, "column": 9, - "end_column": 19 + "end_column": 12 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, - "column": 9, - "end_column": 12 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null + "arc4_name": "byte", + "n": "8" }, - "name": "db3" - } - }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, - "column": 30, - "end_column": 37 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "source_location": null }, - "value": "Xk~0{Zv", - "encoding": "utf8" + "name": "db3" } - } - ], - "comment": null - } - } + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 30, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Xk~0{Zv", + "encoding": "utf8" + } + }, + "error_message": null + } + } ], "label": null, "comment": null @@ -3890,7 +3835,7 @@ "end_column": 43 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 75, @@ -3905,11 +3850,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 75, + "end_line": 75, + "column": 9, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 75, @@ -3919,195 +3877,178 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "IndexExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 75, "end_line": 75, "column": 9, - "end_column": 42 + "end_column": 20 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "expr": { - "_type": "IndexExpression", + "base": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 75, "end_line": 75, "column": 9, - "end_column": 20 + "end_column": 17 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, "ephemeral": false, "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + "native_type": null, + "arc4_name": "uint64[2]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "base": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, - "column": 9, - "end_column": 17 - }, - "wtype": { - "_type": "ARC4StaticArray", - "name": "arc4.static_array", - "immutable": false, - "ephemeral": false, "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64[2]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" + "scalar_type": 2 }, - "source_location": null, - "array_size": "2" + "arc4_name": "uint64", + "n": "64" }, - "name": "myStatic" + "source_location": null, + "array_size": "2" }, - "index": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, - "column": 18, - "end_column": 19 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "0", - "teal_alias": null - } + "name": "myStatic" + }, + "index": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 75, + "end_line": 75, + "column": 18, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 75, + "end_line": 75, + "column": 9, + "end_column": 42 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ArrayPop", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 75, "end_line": 75, - "column": 9, - "end_column": 42 + "column": 28, + "end_column": 41 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "expr": { - "_type": "ArrayPop", + "base": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 75, "end_line": 75, "column": 28, - "end_column": 41 + "end_column": 35 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": false, "ephemeral": false, "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + "native_type": null, + "arc4_name": "uint64[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "base": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, - "column": 28, - "end_column": 35 - }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": false, - "ephemeral": false, "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" + "scalar_type": 2 }, - "source_location": null + "arc4_name": "uint64", + "n": "64" }, - "name": "myArray" - } + "source_location": null + }, + "name": "myArray" } } } - ], - "comment": null + }, + "error_message": null } }, { @@ -4411,7 +4352,7 @@ "end_column": 22 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 85, @@ -4426,11 +4367,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 85, + "end_line": 85, + "column": 9, + "end_column": 21 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 85, @@ -4440,103 +4394,86 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 85, "end_line": 85, "column": 9, - "end_column": 21 + "end_column": 10 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 85, - "end_line": 85, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "name": "b" - } + "arc4_name": "byte", + "n": "8" + }, + "name": "b" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 85, + "end_line": 85, + "column": 9, + "end_column": 21 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 85, "end_line": 85, - "column": 9, - "end_column": 21 + "column": 18, + "end_column": 20 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 85, - "end_line": 85, - "column": 18, - "end_column": 20 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "name": "b2" - } + "arc4_name": "byte", + "n": "8" + }, + "name": "b2" } } - ], - "comment": null + }, + "error_message": null } } ], @@ -4792,8 +4729,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -4807,7 +4743,7 @@ "end_column": 62 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 92, @@ -4822,16 +4758,29 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 92, + "end_line": 92, + "column": 9, + "end_column": 21 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 92, "end_line": 92, - "column": 9, + "column": 10, "end_column": 21 }, "wtype": { @@ -4841,8 +4790,8 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "BytesComparisonExpression", + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 92, @@ -4852,138 +4801,121 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 92, "end_line": 92, "column": 10, - "end_column": 21 + "end_column": 11 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4StaticArray", + "name": "arc4.static_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 92, - "column": 10, - "end_column": 11 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4StaticArray", - "name": "arc4.static_array", + "arc4_name": "address", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "address", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null, - "array_size": "32" + "arc4_name": "byte", + "n": "8" }, - "name": "a" - } + "source_location": null, + "array_size": "32" + }, + "name": "a" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 92, + "end_line": 92, + "column": 10, + "end_column": 21 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 92, "end_line": 92, - "column": 10, - "end_column": 21 + "column": 19, + "end_column": 20 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4StaticArray", + "name": "arc4.static_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 92, - "column": 19, - "end_column": 20 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4StaticArray", - "name": "arc4.static_array", + "arc4_name": "address", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "address", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null, - "array_size": "32" + "arc4_name": "byte", + "n": "8" }, - "name": "b" - } + "source_location": null, + "array_size": "32" + }, + "name": "b" } } } - ], - "comment": "Zero address should not match sender" + }, + "error_message": "Zero address should not match sender" } }, { @@ -4996,7 +4928,7 @@ "end_column": 68 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 93, @@ -5011,11 +4943,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 93, + "end_line": 93, + "column": 9, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 93, @@ -5025,137 +4970,120 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 93, "end_line": 93, "column": 9, - "end_column": 32 + "end_column": 10 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4StaticArray", + "name": "arc4.static_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "ARC4StaticArray", - "name": "arc4.static_array", - "immutable": true, - "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "address", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "address", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null, - "array_size": "32" + "arc4_name": "byte", + "n": "8" }, - "name": "a" - } + "source_location": null, + "array_size": "32" + }, + "name": "a" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 93, + "end_line": 93, + "column": 9, + "end_column": 32 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 93, "end_line": 93, - "column": 9, - "end_column": 32 + "column": 18, + "end_column": 31 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4StaticArray", + "name": "arc4.static_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "AddressConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, - "column": 18, - "end_column": 31 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4StaticArray", - "name": "arc4.static_array", + "arc4_name": "address", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "address", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null, - "array_size": "32" + "arc4_name": "byte", + "n": "8" }, - "value": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ" - } + "source_location": null, + "array_size": "32" + }, + "value": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ" } } - ], - "comment": "Two zero addresses should match" + }, + "error_message": "Two zero addresses should match" } }, { @@ -5168,7 +5096,7 @@ "end_column": 77 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 94, @@ -5183,11 +5111,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 94, + "end_line": 94, + "column": 9, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 94, @@ -5197,166 +5138,149 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "IndexExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 94, "end_line": 94, "column": 9, - "end_column": 32 + "end_column": 13 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" }, - "expr": { - "_type": "IndexExpression", + "base": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 94, "end_line": 94, "column": 9, - "end_column": 13 + "end_column": 10 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "_type": "ARC4StaticArray", + "name": "arc4.static_array", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "uint64", + "name": "account", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "base": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 94, - "end_line": 94, - "column": 9, - "end_column": 10 + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4StaticArray", - "name": "arc4.static_array", + "arc4_name": "address", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "address", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null, - "array_size": "32" + "arc4_name": "byte", + "n": "8" }, - "name": "a" + "source_location": null, + "array_size": "32" }, - "index": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 94, - "end_line": 94, - "column": 11, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "0", - "teal_alias": null - } - } - }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 94, - "end_line": 94, - "column": 9, - "end_column": 32 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "name": "a" }, - "expr": { + "index": { "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 94, "end_line": 94, - "column": 21, - "end_column": 31 + "column": 11, + "end_column": 12 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, "value": "0", "teal_alias": null } } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 94, + "end_line": 94, + "column": 9, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 94, + "end_line": 94, + "column": 21, + "end_column": 31 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "value": "0", + "teal_alias": null + } } - ], - "comment": "Zero address should start with zero byte" + }, + "error_message": "Zero address should start with zero byte" } } ], @@ -5808,7 +5732,7 @@ "end_column": 44 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 101, @@ -5823,11 +5747,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 101, + "end_line": 101, + "column": 9, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 101, @@ -5837,103 +5774,86 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 101, "end_line": 101, "column": 9, - "end_column": 43 + "end_column": 18 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 101, - "end_line": 101, - "column": 9, - "end_column": 18 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" + "scalar_type": 2 }, - "name": "firstItem" - } + "arc4_name": "uint64", + "n": "64" + }, + "name": "firstItem" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 101, + "end_line": 101, + "column": 9, + "end_column": 43 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 101, "end_line": 101, - "column": 9, - "end_column": 43 + "column": 26, + "end_column": 42 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 101, - "end_line": 101, - "column": 26, - "end_column": 42 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" + "scalar_type": 2 }, - "name": "firstItemIndexer" - } + "arc4_name": "uint64", + "n": "64" + }, + "name": "firstItemIndexer" } } - ], - "comment": null + }, + "error_message": null } }, { @@ -6247,7 +6167,7 @@ "end_column": 25 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 103, @@ -6262,67 +6182,63 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 103, + "end_line": 103, + "column": 9, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 103, "end_line": 103, "column": 9, - "end_column": 24 + "end_column": 18 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 103, - "end_line": 103, - "column": 9, - "end_column": 18 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "2", - "teal_alias": null + "value": "2", + "teal_alias": null + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 103, + "end_line": 103, + "column": 23, + "end_column": 24 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 103, - "end_line": 103, - "column": 23, - "end_column": 24 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "2", - "teal_alias": null - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "2", + "teal_alias": null } - ], - "comment": null + }, + "error_message": null } } ], @@ -6446,8 +6362,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -7133,7 +7048,7 @@ "end_column": 31 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 124, @@ -7148,126 +7063,121 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 124, + "end_line": 124, + "column": 11, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", "line": 124, "end_line": 124, "column": 11, - "end_column": 30 + "end_column": 24 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, - "column": 11, - "end_column": 24 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "extract_uint16", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, - "column": 11, - "end_column": 17 - }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": false, + "op_code": "extract_uint16", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 124, + "end_line": 124, + "column": 11, + "end_column": 17 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, "ephemeral": false, "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" + "scalar_type": 2 }, - "source_location": null + "arc4_name": "uint64", + "n": "64" }, - "name": "result" + "source_location": null }, - { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, - "column": 11, - "end_column": 24 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "0", - "teal_alias": null - } - ], - "comment": null - }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, - "column": 29, - "end_column": 30 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "name": "result" }, - "value": "0", - "teal_alias": null - } + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 124, + "end_line": 124, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + } + ] + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 124, + "end_line": 124, + "column": 29, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null } - ], - "comment": null + }, + "error_message": null } }, { diff --git a/tests/approvals/out/array-destructuring/array-destructuring.awst.json b/tests/approvals/out/array-destructuring/array-destructuring.awst.json index 1d67bb78..24e2da40 100644 --- a/tests/approvals/out/array-destructuring/array-destructuring.awst.json +++ b/tests/approvals/out/array-destructuring/array-destructuring.awst.json @@ -1728,7 +1728,7 @@ "end_column": 17 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/array-destructuring.algo.ts", "line": 27, @@ -1743,65 +1743,61 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/array-destructuring.algo.ts", + "line": 27, + "end_line": 27, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/array-destructuring.algo.ts", "line": 27, "end_line": 27, "column": 9, - "end_column": 16 + "end_column": 10 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/array-destructuring.algo.ts", - "line": 27, - "end_line": 27, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "x" + "name": "x" + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/array-destructuring.algo.ts", + "line": 27, + "end_line": 27, + "column": 15, + "end_column": 16 }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/array-destructuring.algo.ts", - "line": 27, - "end_line": 27, - "column": 15, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "b" - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" } - ], - "comment": null + }, + "error_message": null } }, { @@ -1814,7 +1810,7 @@ "end_column": 17 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/array-destructuring.algo.ts", "line": 28, @@ -1829,65 +1825,61 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/array-destructuring.algo.ts", + "line": 28, + "end_line": 28, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/array-destructuring.algo.ts", "line": 28, "end_line": 28, "column": 9, - "end_column": 16 + "end_column": 10 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/array-destructuring.algo.ts", - "line": 28, - "end_line": 28, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "y" + "name": "y" + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/array-destructuring.algo.ts", + "line": 28, + "end_line": 28, + "column": 15, + "end_column": 16 }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/array-destructuring.algo.ts", - "line": 28, - "end_line": 28, - "column": 15, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" } - ], - "comment": null + }, + "error_message": null } } ], diff --git a/tests/approvals/out/assert-match/assert-match.awst b/tests/approvals/out/assert-match/assert-match.awst index a981a9f7..8e66f0f2 100644 --- a/tests/approvals/out/assert-match/assert-match.awst +++ b/tests/approvals/out/assert-match/assert-match.awst @@ -1,10 +1,10 @@ subroutine testSelf(): void { - assert(txn() == global()) + assert(txn() == global(), comment=assert target is match for conditions) } subroutine test(x: group_transaction_pay): void { - assert(gtxns(x) <= 50000 and gtxns(x) >= 0 and gtxns(x) == txn() and gtxns(x) == global() and gtxns(x) == global() and gtxns(x) > 1 and gtxns(x) < 1099511627776) + assert(gtxns(x) <= 50000 and gtxns(x) >= 0 and gtxns(x) == txn() and gtxns(x) == global() and gtxns(x) == global() and gtxns(x) > 1 and gtxns(x) < 1099511627776, comment=assert target is match for conditions) } contract AssertMatchContract { diff --git a/tests/approvals/out/assert-match/assert-match.awst.json b/tests/approvals/out/assert-match/assert-match.awst.json index c3d4747b..bdc90631 100644 --- a/tests/approvals/out/assert-match/assert-match.awst.json +++ b/tests/approvals/out/assert-match/assert-match.awst.json @@ -36,7 +36,7 @@ "end_column": 4 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/assert-match.algo.ts", "line": 4, @@ -51,11 +51,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/assert-match.algo.ts", + "line": 4, + "end_line": 6, + "column": 2, + "end_column": 4 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/assert-match.algo.ts", "line": 4, @@ -65,61 +78,42 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "account", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/assert-match.algo.ts", - "line": 4, - "end_line": 6, - "column": 2, - "end_column": 4 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "op_code": "txn", - "immediates": [ - "Receiver" - ], - "stack_args": [], - "comment": null + "op_code": "txn", + "immediates": [ + "Receiver" + ], + "stack_args": [] + }, + "operator": "==", + "rhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/assert-match.algo.ts", + "line": 5, + "end_line": 5, + "column": 14, + "end_column": 46 }, - "operator": "==", - "rhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/assert-match.algo.ts", - "line": 5, - "end_line": 5, - "column": 14, - "end_column": 46 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "op_code": "global", - "immediates": [ - "CurrentApplicationAddress" - ], - "stack_args": [], - "comment": null - } + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "global", + "immediates": [ + "CurrentApplicationAddress" + ], + "stack_args": [] } - ], - "comment": "assert target is match for conditions" + }, + "error_message": "assert target is match for conditions" } } ], @@ -192,7 +186,7 @@ "end_column": 4 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/assert-match.algo.ts", "line": 10, @@ -207,10 +201,23 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { + "condition": { + "_type": "BooleanBinaryOperation", + "source_location": { + "file": "tests/approvals/assert-match.algo.ts", + "line": 10, + "end_line": 17, + "column": 2, + "end_column": 4 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { "_type": "BooleanBinaryOperation", "source_location": { "file": "tests/approvals/assert-match.algo.ts", @@ -291,7 +298,7 @@ "scalar_type": 2 }, "left": { - "_type": "BooleanBinaryOperation", + "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/assert-match.algo.ts", "line": 10, @@ -306,8 +313,8 @@ "ephemeral": false, "scalar_type": 2 }, - "left": { - "_type": "NumericComparisonExpression", + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/assert-match.algo.ts", "line": 10, @@ -317,160 +324,61 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/assert-match.algo.ts", - "line": 10, - "end_line": 17, - "column": 2, - "end_column": 4 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "gtxns", - "immediates": [ - "Amount" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/assert-match.algo.ts", - "line": 10, - "end_line": 10, - "column": 14, - "end_column": 15 - }, - "wtype": { - "_type": "WGroupTransaction", - "name": "group_transaction_pay", - "immutable": true, - "ephemeral": false, - "scalar_type": 2, - "transaction_type": 1 - }, - "name": "x" - } - ], - "comment": null - }, - "operator": "<=", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/assert-match.algo.ts", - "line": 11, - "end_line": 11, - "column": 27, - "end_column": 32 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "50000", - "teal_alias": null - } + "op_code": "gtxns", + "immediates": [ + "Amount" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/assert-match.algo.ts", + "line": 10, + "end_line": 10, + "column": 14, + "end_column": 15 + }, + "wtype": { + "_type": "WGroupTransaction", + "name": "group_transaction_pay", + "immutable": true, + "ephemeral": false, + "scalar_type": 2, + "transaction_type": 1 + }, + "name": "x" + } + ] }, - "op": "and", - "right": { - "_type": "NumericComparisonExpression", + "operator": "<=", + "rhs": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/assert-match.algo.ts", - "line": 10, - "end_line": 17, - "column": 2, - "end_column": 4 + "line": 11, + "end_line": 11, + "column": 27, + "end_column": 32 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/assert-match.algo.ts", - "line": 10, - "end_line": 17, - "column": 2, - "end_column": 4 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "gtxns", - "immediates": [ - "Amount" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/assert-match.algo.ts", - "line": 10, - "end_line": 10, - "column": 14, - "end_column": 15 - }, - "wtype": { - "_type": "WGroupTransaction", - "name": "group_transaction_pay", - "immutable": true, - "ephemeral": false, - "scalar_type": 2, - "transaction_type": 1 - }, - "name": "x" - } - ], - "comment": null - }, - "operator": ">=", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/assert-match.algo.ts", - "line": 11, - "end_line": 11, - "column": 24, - "end_column": 25 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "0", - "teal_alias": null - } + "value": "50000", + "teal_alias": null } }, "op": "and", "right": { - "_type": "BytesComparisonExpression", + "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/assert-match.algo.ts", "line": 10, @@ -496,14 +404,14 @@ }, "wtype": { "_type": "WType", - "name": "account", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, "op_code": "gtxns", "immediates": [ - "Sender" + "Amount" ], "stack_args": [ { @@ -525,32 +433,27 @@ }, "name": "x" } - ], - "comment": null + ] }, - "operator": "==", + "operator": ">=", "rhs": { - "_type": "IntrinsicCall", + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/assert-match.algo.ts", - "line": 12, - "end_line": 12, - "column": 12, - "end_column": 22 + "line": 11, + "end_line": 11, + "column": 24, + "end_column": 25 }, "wtype": { "_type": "WType", - "name": "account", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "op_code": "txn", - "immediates": [ - "Sender" - ], - "stack_args": [], - "comment": null + "value": "0", + "teal_alias": null } } }, @@ -589,7 +492,7 @@ }, "op_code": "gtxns", "immediates": [ - "Receiver" + "Sender" ], "stack_args": [ { @@ -611,18 +514,17 @@ }, "name": "x" } - ], - "comment": null + ] }, "operator": "==", "rhs": { "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/assert-match.algo.ts", - "line": 13, - "end_line": 13, - "column": 14, - "end_column": 46 + "line": 12, + "end_line": 12, + "column": 12, + "end_column": 22 }, "wtype": { "_type": "WType", @@ -631,12 +533,11 @@ "ephemeral": false, "scalar_type": 1 }, - "op_code": "global", + "op_code": "txn", "immediates": [ - "CurrentApplicationAddress" + "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -675,7 +576,7 @@ }, "op_code": "gtxns", "immediates": [ - "CloseRemainderTo" + "Receiver" ], "stack_args": [ { @@ -697,18 +598,17 @@ }, "name": "x" } - ], - "comment": null + ] }, "operator": "==", "rhs": { "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/assert-match.algo.ts", - "line": 14, - "end_line": 14, - "column": 22, - "end_column": 40 + "line": 13, + "end_line": 13, + "column": 14, + "end_column": 46 }, "wtype": { "_type": "WType", @@ -719,16 +619,15 @@ }, "op_code": "global", "immediates": [ - "ZeroAddress" + "CurrentApplicationAddress" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, "op": "and", "right": { - "_type": "NumericComparisonExpression", + "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/assert-match.algo.ts", "line": 10, @@ -754,14 +653,14 @@ }, "wtype": { "_type": "WType", - "name": "uint64", + "name": "account", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, "op_code": "gtxns", "immediates": [ - "FirstValid" + "CloseRemainderTo" ], "stack_args": [ { @@ -783,28 +682,30 @@ }, "name": "x" } - ], - "comment": null + ] }, - "operator": ">", + "operator": "==", "rhs": { - "_type": "IntegerConstant", + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/assert-match.algo.ts", - "line": 15, - "end_line": 15, - "column": 31, - "end_column": 32 + "line": 14, + "end_line": 14, + "column": 22, + "end_column": 40 }, "wtype": { "_type": "WType", - "name": "uint64", + "name": "account", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "value": "1", - "teal_alias": null + "op_code": "global", + "immediates": [ + "ZeroAddress" + ], + "stack_args": [] } } }, @@ -843,7 +744,7 @@ }, "op_code": "gtxns", "immediates": [ - "LastValid" + "FirstValid" ], "stack_args": [ { @@ -865,18 +766,17 @@ }, "name": "x" } - ], - "comment": null + ] }, - "operator": "<", + "operator": ">", "rhs": { "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/assert-match.algo.ts", - "line": 16, - "end_line": 16, - "column": 27, - "end_column": 34 + "line": 15, + "end_line": 15, + "column": 31, + "end_column": 32 }, "wtype": { "_type": "WType", @@ -885,13 +785,93 @@ "ephemeral": false, "scalar_type": 2 }, - "value": "1099511627776", + "value": "1", "teal_alias": null } } + }, + "op": "and", + "right": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/assert-match.algo.ts", + "line": 10, + "end_line": 17, + "column": 2, + "end_column": 4 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/assert-match.algo.ts", + "line": 10, + "end_line": 17, + "column": 2, + "end_column": 4 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "gtxns", + "immediates": [ + "LastValid" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/assert-match.algo.ts", + "line": 10, + "end_line": 10, + "column": 14, + "end_column": 15 + }, + "wtype": { + "_type": "WGroupTransaction", + "name": "group_transaction_pay", + "immutable": true, + "ephemeral": false, + "scalar_type": 2, + "transaction_type": 1 + }, + "name": "x" + } + ] + }, + "operator": "<", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/assert-match.algo.ts", + "line": 16, + "end_line": 16, + "column": 27, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1099511627776", + "teal_alias": null + } } - ], - "comment": "assert target is match for conditions" + }, + "error_message": "assert target is match for conditions" } } ], @@ -1015,8 +995,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, diff --git a/tests/approvals/out/biguint-expressions/biguint-expressions.awst b/tests/approvals/out/biguint-expressions/biguint-expressions.awst index 9f5d784f..203b0da4 100644 --- a/tests/approvals/out/biguint-expressions/biguint-expressions.awst +++ b/tests/approvals/out/biguint-expressions/biguint-expressions.awst @@ -21,7 +21,7 @@ subroutine testOps(smaller: biguint, larger: biguint): void assert(larger > smaller) assert(larger >= larger) assert(smaller == smaller) - assert(smaller == reinterpret_cast(concat(bzero(4), reinterpret_cast(smaller)))) + assert(smaller == reinterpret_cast(concat(bzero(4), reinterpret_cast(smaller))), comment=Leading zeros should be ignored in equality) } contract DemoContract { diff --git a/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json b/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json index 7e83c2bd..8056bac5 100644 --- a/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json +++ b/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json @@ -172,8 +172,7 @@ }, "value": true } - ], - "comment": null + ] } } }, @@ -239,8 +238,7 @@ }, "value": false } - ], - "comment": null + ] } } }, @@ -480,8 +478,7 @@ }, "name": "a" } - ], - "comment": null + ] } } }, @@ -583,8 +580,7 @@ "name": "a" } } - ], - "comment": null + ] } } }, @@ -650,8 +646,7 @@ }, "name": "b" } - ], - "comment": null + ] } } }, @@ -787,7 +782,7 @@ "end_column": 26 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 22, @@ -802,65 +797,61 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 22, + "end_line": 22, + "column": 9, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 22, "end_line": 22, "column": 9, - "end_column": 25 + "end_column": 16 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 22, - "end_line": 22, - "column": 9, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "smaller" + "name": "smaller" + }, + "operator": "<", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 22, + "end_line": 22, + "column": 19, + "end_column": 25 }, - "operator": "<", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 22, - "end_line": 22, - "column": 19, - "end_column": 25 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "larger" - } + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "larger" } - ], - "comment": null + }, + "error_message": null } }, { @@ -873,7 +864,7 @@ "end_column": 28 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 23, @@ -888,65 +879,61 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 23, + "end_line": 23, + "column": 9, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 23, "end_line": 23, "column": 9, - "end_column": 27 + "end_column": 16 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 23, - "end_line": 23, - "column": 9, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "smaller" + "name": "smaller" + }, + "operator": "<=", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 23, + "end_line": 23, + "column": 20, + "end_column": 27 }, - "operator": "<=", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 23, - "end_line": 23, - "column": 20, - "end_column": 27 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "smaller" - } + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" } - ], - "comment": null + }, + "error_message": null } }, { @@ -959,7 +946,7 @@ "end_column": 26 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 24, @@ -974,65 +961,61 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 24, + "end_line": 24, + "column": 9, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 24, "end_line": 24, "column": 9, - "end_column": 25 + "end_column": 15 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 24, - "end_line": 24, - "column": 9, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "larger" + "name": "larger" + }, + "operator": ">", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 24, + "end_line": 24, + "column": 18, + "end_column": 25 }, - "operator": ">", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 24, - "end_line": 24, - "column": 18, - "end_column": 25 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "smaller" - } + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" } - ], - "comment": null + }, + "error_message": null } }, { @@ -1045,7 +1028,7 @@ "end_column": 26 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 25, @@ -1060,65 +1043,61 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 25, + "end_line": 25, + "column": 9, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 25, "end_line": 25, "column": 9, - "end_column": 25 + "end_column": 15 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 25, - "end_line": 25, - "column": 9, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "larger" + "name": "larger" + }, + "operator": ">=", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 25 }, - "operator": ">=", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 25, - "end_line": 25, - "column": 19, - "end_column": 25 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "larger" - } + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "larger" } - ], - "comment": null + }, + "error_message": null } }, { @@ -1131,7 +1110,7 @@ "end_column": 38 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 26, @@ -1146,65 +1125,61 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 26, + "end_line": 26, + "column": 9, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 26, "end_line": 26, "column": 9, - "end_column": 37 + "end_column": 16 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 26, - "end_line": 26, - "column": 9, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "smaller" + "name": "smaller" + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 26, + "end_line": 26, + "column": 29, + "end_column": 36 }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 26, - "end_line": 26, - "column": 29, - "end_column": 36 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "smaller" - } + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "smaller" } - ], - "comment": null + }, + "error_message": null } }, { @@ -1217,7 +1192,7 @@ "end_column": 112 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 27, @@ -1232,162 +1207,156 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 9, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 27, "end_line": 27, "column": 9, - "end_column": 64 + "end_column": 16 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 27, - "end_line": 27, - "column": 9, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "smaller" + "name": "smaller" + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 21, + "end_column": 64 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 27, "end_line": 27, - "column": 21, - "end_column": 64 + "column": 29, + "end_column": 63 }, "wtype": { "_type": "WType", - "name": "biguint", + "name": "bytes", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 27, - "end_line": 27, - "column": 29, - "end_column": 63 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 29, + "end_column": 40 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "bzero", + "immediates": [], + "stack_args": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 38, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "4", + "teal_alias": null + } + ] }, - "op_code": "concat", - "immediates": [], - "stack_args": [ - { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 27, - "end_line": 27, - "column": 29, - "end_column": 40 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "op_code": "bzero", - "immediates": [], - "stack_args": [ - { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 27, - "end_line": 27, - "column": 38, - "end_column": 39 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "4", - "teal_alias": null - } - ], - "comment": null + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/biguint-expressions.algo.ts", + "line": 27, + "end_line": 27, + "column": 48, + "end_column": 62 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/biguint-expressions.algo.ts", "line": 27, "end_line": 27, - "column": 48, - "end_column": 62 + "column": 54, + "end_column": 61 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "biguint", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/biguint-expressions.algo.ts", - "line": 27, - "end_line": 27, - "column": 54, - "end_column": 61 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "smaller" - } + "name": "smaller" } - ], - "comment": null - } + } + ] } } - ], - "comment": "Leading zeros should be ignored in equality" + }, + "error_message": "Leading zeros should be ignored in equality" } } ], @@ -1511,8 +1480,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -1693,8 +1661,7 @@ "value": "4", "teal_alias": null } - ], - "comment": null + ] } } ] diff --git a/tests/approvals/out/boolean-conversions/boolean-conversions.awst b/tests/approvals/out/boolean-conversions/boolean-conversions.awst index ec33a1bd..2a930b1e 100644 --- a/tests/approvals/out/boolean-conversions/boolean-conversions.awst +++ b/tests/approvals/out/boolean-conversions/boolean-conversions.awst @@ -1,18 +1,18 @@ subroutine test_truthyness(a: uint64, b: uint64, c: string, d: bytes, e: uint64): void { - assert(True) - assert(True) - assert(!Boolean(0)) - assert(Boolean(1)) - assert(!Boolean(bitlen(0))) - assert(Boolean(bitlen(1))) - assert(!Boolean(len(0x))) - assert(Boolean(len("abc"))) + assert(True, comment=Zero is falsy) + assert(True, comment=Non zero is truthy) + assert(!Boolean(0), comment=Zero is falsy) + assert(Boolean(1), comment=Non zero is truthy) + assert(!Boolean(bitlen(0)), comment=Zero is falsy) + assert(Boolean(bitlen(1)), comment=Non zero is truthy) + assert(!Boolean(len(0x)), comment=Empty is falsy) + assert(Boolean(len("abc")), comment=Non empty is truthy) empty: string = "" - assert(!Boolean(len(empty))) - assert(Boolean(len("abc"))) - assert(!False) - assert(True) + assert(!Boolean(len(empty)), comment=Empty is falsy) + assert(Boolean(len("abc")), comment=Non empty is truthy) + assert(!False, comment=False is falsy) + assert(True, comment=True is truthy) } subroutine test_booleans_are_equal(): void { diff --git a/tests/approvals/out/boolean-conversions/boolean-conversions.awst.json b/tests/approvals/out/boolean-conversions/boolean-conversions.awst.json index a1a11dcb..32b1b2d3 100644 --- a/tests/approvals/out/boolean-conversions/boolean-conversions.awst.json +++ b/tests/approvals/out/boolean-conversions/boolean-conversions.awst.json @@ -127,7 +127,7 @@ "end_column": 29 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 5, @@ -142,29 +142,25 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BoolConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 5, - "end_line": 5, - "column": 9, - "end_column": 11 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": true - } - ], - "comment": "Zero is falsy" + "condition": { + "_type": "BoolConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 5, + "end_line": 5, + "column": 9, + "end_column": 11 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + }, + "error_message": "Zero is falsy" } }, { @@ -177,7 +173,7 @@ "end_column": 33 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 6, @@ -192,29 +188,25 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BoolConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 6, - "end_line": 6, - "column": 2, - "end_column": 33 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": true - } - ], - "comment": "Non zero is truthy" + "condition": { + "_type": "BoolConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 6, + "end_line": 6, + "column": 2, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + }, + "error_message": "Non zero is truthy" } }, { @@ -227,7 +219,7 @@ "end_column": 37 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 7, @@ -242,11 +234,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 7, + "end_line": 7, + "column": 9, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 7, @@ -262,44 +267,27 @@ "scalar_type": 2 }, "expr": { - "_type": "ReinterpretCast", + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 7, "end_line": 7, - "column": 9, - "end_column": 19 + "column": 17, + "end_column": 18 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 7, - "end_line": 7, - "column": 17, - "end_column": 18 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "0", - "teal_alias": null - } + "value": "0", + "teal_alias": null } } - ], - "comment": "Zero is falsy" + }, + "error_message": "Zero is falsy" } }, { @@ -312,7 +300,7 @@ "end_column": 41 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 8, @@ -327,47 +315,43 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 8, + "end_line": 8, + "column": 2, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 8, "end_line": 8, - "column": 2, - "end_column": 41 + "column": 16, + "end_column": 17 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 8, - "end_line": 8, - "column": 16, - "end_column": 17 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "1", - "teal_alias": null - } + "value": "1", + "teal_alias": null } - ], - "comment": "Non zero is truthy" + }, + "error_message": "Non zero is truthy" } }, { @@ -380,7 +364,7 @@ "end_column": 38 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 9, @@ -395,11 +379,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 9, + "end_line": 9, + "column": 9, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 9, @@ -415,7 +412,7 @@ "scalar_type": 2 }, "expr": { - "_type": "ReinterpretCast", + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 9, @@ -425,56 +422,38 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 9, - "end_line": 9, - "column": 9, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "bitlen", - "immediates": [], - "stack_args": [ - { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 9, - "end_line": 9, - "column": 18, - "end_column": 19 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "0", - "teal_alias": null - } - ], - "comment": null - } + "op_code": "bitlen", + "immediates": [], + "stack_args": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 9, + "end_line": 9, + "column": 18, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "0", + "teal_alias": null + } + ] } } - ], - "comment": "Zero is falsy" + }, + "error_message": "Zero is falsy" } }, { @@ -487,7 +466,7 @@ "end_column": 42 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 10, @@ -502,11 +481,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 10, + "end_line": 10, + "column": 2, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 10, @@ -516,55 +508,37 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 10, - "end_line": 10, - "column": 2, - "end_column": 42 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "bitlen", - "immediates": [], - "stack_args": [ - { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 10, - "end_line": 10, - "column": 17, - "end_column": 18 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "1", - "teal_alias": null - } - ], - "comment": null - } + "op_code": "bitlen", + "immediates": [], + "stack_args": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 10, + "end_line": 10, + "column": 17, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "1", + "teal_alias": null + } + ] } - ], - "comment": "Non zero is truthy" + }, + "error_message": "Non zero is truthy" } }, { @@ -577,7 +551,7 @@ "end_column": 36 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 11, @@ -592,11 +566,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 11, + "end_line": 11, + "column": 9, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 11, @@ -612,7 +599,7 @@ "scalar_type": 2 }, "expr": { - "_type": "ReinterpretCast", + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 11, @@ -622,56 +609,38 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 11, - "end_line": 11, - "column": 9, - "end_column": 17 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "len", - "immediates": [], - "stack_args": [ - { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 11, - "end_line": 11, - "column": 10, - "end_column": 17 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "", - "encoding": "unknown" - } - ], - "comment": null - } + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 11, + "end_line": 11, + "column": 10, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "", + "encoding": "unknown" + } + ] } } - ], - "comment": "Empty is falsy" + }, + "error_message": "Empty is falsy" } }, { @@ -684,7 +653,7 @@ "end_column": 45 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 12, @@ -699,11 +668,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 12, @@ -713,55 +695,37 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 12, - "end_line": 12, - "column": 2, - "end_column": 45 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "len", - "immediates": [], - "stack_args": [ - { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 12, - "end_line": 12, - "column": 15, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "VPaz", - "encoding": "utf8" - } - ], - "comment": null - } + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 12, + "end_line": 12, + "column": 15, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "VPaz", + "encoding": "utf8" + } + ] } - ], - "comment": "Non empty is truthy" + }, + "error_message": "Non empty is truthy" } }, { @@ -820,7 +784,7 @@ "end_column": 34 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 14, @@ -835,11 +799,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 14, + "end_line": 14, + "column": 9, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 14, @@ -855,7 +832,7 @@ "scalar_type": 2 }, "expr": { - "_type": "ReinterpretCast", + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 14, @@ -865,55 +842,37 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 14, - "end_line": 14, - "column": 9, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "len", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 14, - "end_line": 14, - "column": 10, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "empty" - } - ], - "comment": null - } + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 14, + "end_line": 14, + "column": 10, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "empty" + } + ] } } - ], - "comment": "Empty is falsy" + }, + "error_message": "Empty is falsy" } }, { @@ -926,7 +885,7 @@ "end_column": 38 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 15, @@ -941,11 +900,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 15, + "end_line": 15, + "column": 2, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 15, @@ -955,54 +927,36 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 15, - "end_line": 15, - "column": 2, - "end_column": 38 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "len", - "immediates": [], - "stack_args": [ - { - "_type": "StringConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 15, - "end_line": 15, - "column": 9, - "end_column": 14 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "abc" - } - ], - "comment": null - } + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 15, + "end_line": 15, + "column": 9, + "end_column": 14 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "abc" + } + ] } - ], - "comment": "Non empty is truthy" + }, + "error_message": "Non empty is truthy" } }, { @@ -1015,7 +969,7 @@ "end_column": 34 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 16, @@ -1030,16 +984,29 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 16, + "end_line": 16, + "column": 9, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "BoolConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 16, "end_line": 16, - "column": 9, + "column": 10, "end_column": 15 }, "wtype": { @@ -1049,27 +1016,10 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "BoolConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 16, - "end_line": 16, - "column": 10, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": false - } + "value": false } - ], - "comment": "False is falsy" + }, + "error_message": "False is falsy" } }, { @@ -1082,7 +1032,7 @@ "end_column": 32 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 17, @@ -1097,29 +1047,25 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BoolConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 17, - "end_line": 17, - "column": 9, - "end_column": 13 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": true - } - ], - "comment": "True is truthy" + "condition": { + "_type": "BoolConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 17, + "end_line": 17, + "column": 9, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + }, + "error_message": "True is truthy" } } ], @@ -1172,7 +1118,7 @@ "end_column": 35 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 22, @@ -1187,17 +1133,30 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 22, + "end_line": 22, + "column": 9, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 22, "end_line": 22, "column": 9, - "end_column": 34 + "end_column": 19 }, "wtype": { "_type": "WType", @@ -1206,7 +1165,7 @@ "ephemeral": false, "scalar_type": 2 }, - "lhs": { + "expr": { "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", @@ -1223,7 +1182,7 @@ "scalar_type": 2 }, "expr": { - "_type": "Not", + "_type": "BoolConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 22, @@ -1238,28 +1197,28 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "BoolConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 22, - "end_line": 22, - "column": 9, - "end_column": 19 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": true - } + "value": true } + } + }, + "operator": "==", + "rhs": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 22, + "end_line": 22, + "column": 24, + "end_column": 34 }, - "operator": "==", - "rhs": { + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", @@ -1276,7 +1235,7 @@ "scalar_type": 2 }, "expr": { - "_type": "Not", + "_type": "BoolConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 22, @@ -1290,30 +1249,13 @@ "immutable": true, "ephemeral": false, "scalar_type": 2 - }, - "expr": { - "_type": "BoolConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 22, - "end_line": 22, - "column": 24, - "end_column": 34 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": true - } + }, + "value": true } } } - ], - "comment": null + }, + "error_message": null } }, { @@ -1326,7 +1268,7 @@ "end_column": 51 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 23, @@ -1341,17 +1283,30 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 23, + "end_line": 23, + "column": 9, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 23, "end_line": 23, "column": 9, - "end_column": 50 + "end_column": 27 }, "wtype": { "_type": "WType", @@ -1360,7 +1315,7 @@ "ephemeral": false, "scalar_type": 2 }, - "lhs": { + "expr": { "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", @@ -1377,7 +1332,7 @@ "scalar_type": 2 }, "expr": { - "_type": "Not", + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 23, @@ -1393,45 +1348,45 @@ "scalar_type": 2 }, "expr": { - "_type": "ReinterpretCast", + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 23, "end_line": 23, - "column": 9, - "end_column": 27 + "column": 24, + "end_column": 25 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 23, - "end_line": 23, - "column": 24, - "end_column": 25 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "1", - "teal_alias": null - } + "value": "1", + "teal_alias": null } } + } + }, + "operator": "==", + "rhs": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 23, + "end_line": 23, + "column": 32, + "end_column": 50 }, - "operator": "==", - "rhs": { + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", @@ -1448,7 +1403,7 @@ "scalar_type": 2 }, "expr": { - "_type": "Not", + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 23, @@ -1464,46 +1419,29 @@ "scalar_type": 2 }, "expr": { - "_type": "ReinterpretCast", + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 23, "end_line": 23, - "column": 32, - "end_column": 50 + "column": 47, + "end_column": 48 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 23, - "end_line": 23, - "column": 47, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "5", - "teal_alias": null - } + "value": "5", + "teal_alias": null } } } } - ], - "comment": null + }, + "error_message": null } }, { @@ -1516,7 +1454,7 @@ "end_column": 53 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 24, @@ -1531,17 +1469,30 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 24, + "end_line": 24, + "column": 9, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 24, "end_line": 24, "column": 9, - "end_column": 52 + "end_column": 28 }, "wtype": { "_type": "WType", @@ -1550,7 +1501,7 @@ "ephemeral": false, "scalar_type": 2 }, - "lhs": { + "expr": { "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", @@ -1567,7 +1518,7 @@ "scalar_type": 2 }, "expr": { - "_type": "Not", + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 24, @@ -1583,7 +1534,7 @@ "scalar_type": 2 }, "expr": { - "_type": "ReinterpretCast", + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 24, @@ -1593,57 +1544,56 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 24, - "end_line": 24, - "column": 9, - "end_column": 28 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "bitlen", - "immediates": [], - "stack_args": [ - { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 24, - "end_line": 24, - "column": 25, - "end_column": 26 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "1", - "teal_alias": null - } - ], - "comment": null - } + "op_code": "bitlen", + "immediates": [], + "stack_args": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 24, + "end_line": 24, + "column": 25, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "1", + "teal_alias": null + } + ] } } + } + }, + "operator": "==", + "rhs": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 24, + "end_line": 24, + "column": 33, + "end_column": 52 }, - "operator": "==", - "rhs": { + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { "_type": "Not", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", @@ -1660,7 +1610,7 @@ "scalar_type": 2 }, "expr": { - "_type": "Not", + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 24, @@ -1676,7 +1626,7 @@ "scalar_type": 2 }, "expr": { - "_type": "ReinterpretCast", + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 24, @@ -1686,58 +1636,40 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 24, - "end_line": 24, - "column": 33, - "end_column": 52 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "bitlen", - "immediates": [], - "stack_args": [ - { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 24, - "end_line": 24, - "column": 49, - "end_column": 50 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "5", - "teal_alias": null - } - ], - "comment": null - } + "op_code": "bitlen", + "immediates": [], + "stack_args": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 24, + "end_line": 24, + "column": 49, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "5", + "teal_alias": null + } + ] } } } } - ], - "comment": null + }, + "error_message": null } }, { @@ -1750,7 +1682,7 @@ "end_column": 60 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 25, @@ -1765,17 +1697,30 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 25, + "end_line": 25, + "column": 9, + "end_column": 59 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 25, "end_line": 25, "column": 9, - "end_column": 59 + "end_column": 30 }, "wtype": { "_type": "WType", @@ -1785,7 +1730,27 @@ "scalar_type": 2 }, "lhs": { - "_type": "BytesComparisonExpression", + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 25, + "end_line": 25, + "column": 23, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "VPaz", + "encoding": "utf8" + }, + "operator": "!=", + "rhs": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 25, @@ -1795,54 +1760,54 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 25, - "end_line": 25, - "column": 23, - "end_column": 28 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "VPaz", - "encoding": "utf8" + "value": "", + "encoding": "unknown" + } + }, + "operator": "==", + "rhs": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 25, + "end_line": 25, + "column": 35, + "end_column": 59 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 25, + "end_line": 25, + "column": 49, + "end_column": 57 }, - "operator": "!=", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 25, - "end_line": 25, - "column": 9, - "end_column": 30 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "", - "encoding": "unknown" - } + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "VPa!sWo7", + "encoding": "utf8" }, - "operator": "==", + "operator": "!=", "rhs": { - "_type": "BytesComparisonExpression", + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 25, @@ -1852,54 +1817,17 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 25, - "end_line": 25, - "column": 49, - "end_column": 57 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "VPa!sWo7", - "encoding": "utf8" + "scalar_type": 1 }, - "operator": "!=", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 25, - "end_line": 25, - "column": 35, - "end_column": 59 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "", - "encoding": "unknown" - } + "value": "", + "encoding": "unknown" } } - ], - "comment": null + }, + "error_message": null } }, { @@ -1912,7 +1840,7 @@ "end_column": 46 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 27, @@ -1927,17 +1855,30 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 27, + "end_line": 27, + "column": 9, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 27, "end_line": 27, "column": 9, - "end_column": 45 + "end_column": 23 }, "wtype": { "_type": "WType", @@ -1947,7 +1888,27 @@ "scalar_type": 2 }, "lhs": { - "_type": "BytesComparisonExpression", + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 27, + "end_line": 27, + "column": 17, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "VPaz", + "encoding": "utf8" + }, + "operator": "!=", + "rhs": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 27, @@ -1957,54 +1918,54 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 27, - "end_line": 27, - "column": 17, - "end_column": 22 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "VPaz", - "encoding": "utf8" + "value": "", + "encoding": "unknown" + } + }, + "operator": "==", + "rhs": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 27, + "end_line": 27, + "column": 28, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 27, + "end_line": 27, + "column": 36, + "end_column": 44 }, - "operator": "!=", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 27, - "end_line": 27, - "column": 9, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "", - "encoding": "unknown" - } + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "VPa!sWo7", + "encoding": "utf8" }, - "operator": "==", + "operator": "!=", "rhs": { - "_type": "BytesComparisonExpression", + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 27, @@ -2014,54 +1975,17 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 27, - "end_line": 27, - "column": 36, - "end_column": 44 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "VPa!sWo7", - "encoding": "utf8" + "scalar_type": 1 }, - "operator": "!=", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 27, - "end_line": 27, - "column": 28, - "end_column": 45 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "", - "encoding": "unknown" - } + "value": "", + "encoding": "unknown" } } - ], - "comment": null + }, + "error_message": null } }, { @@ -2120,7 +2044,7 @@ "end_column": 21 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 30, @@ -2135,16 +2059,29 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/boolean-conversions.algo.ts", + "line": 30, + "end_line": 30, + "column": 9, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/boolean-conversions.algo.ts", "line": 30, "end_line": 30, - "column": 9, + "column": 10, "end_column": 20 }, "wtype": { @@ -2154,27 +2091,10 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/boolean-conversions.algo.ts", - "line": 30, - "end_line": 30, - "column": 10, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "boolNoArgs" - } + "name": "boolNoArgs" } - ], - "comment": null + }, + "error_message": null } } ], diff --git a/tests/approvals/out/boolean-expressions/boolean-expressions.awst b/tests/approvals/out/boolean-expressions/boolean-expressions.awst index 2a6bdf6b..98c99c5d 100644 --- a/tests/approvals/out/boolean-expressions/boolean-expressions.awst +++ b/tests/approvals/out/boolean-expressions/boolean-expressions.awst @@ -1,7 +1,7 @@ subroutine test(a: uint64, b: uint64, c: string, d: bytes, e: uint64): bool { x: uint64 = (Boolean((#0 = (Boolean(a) ? a : b))) ? #0 : e) - assert(Boolean((Boolean((#1 = (Boolean(a) ? b : a))) ? e : #1))) + assert(Boolean((Boolean((#1 = (Boolean(a) ? b : a))) ? e : #1)), comment=a or b) y: uint64 = (Boolean(a) ? b : a) z: uint64 = (Boolean(a) and Boolean(len(d)) or Boolean(y) ? (Boolean(x) ? x : y) : (Boolean(x) ? y : x)) if (Boolean(a) or Boolean(len(c)) and Boolean(len(d))) { diff --git a/tests/approvals/out/boolean-expressions/boolean-expressions.awst.json b/tests/approvals/out/boolean-expressions/boolean-expressions.awst.json index 9e477e73..e8163d00 100644 --- a/tests/approvals/out/boolean-expressions/boolean-expressions.awst.json +++ b/tests/approvals/out/boolean-expressions/boolean-expressions.awst.json @@ -419,7 +419,7 @@ "end_column": 31 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/boolean-expressions.algo.ts", "line": 6, @@ -434,183 +434,55 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/boolean-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 2, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ConditionalExpression", "source_location": { "file": "tests/approvals/boolean-expressions.algo.ts", "line": 6, "end_line": 6, - "column": 2, - "end_column": 31 + "column": 9, + "end_column": 20 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "ConditionalExpression", + "condition": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/boolean-expressions.algo.ts", "line": 6, "end_line": 6, "column": 9, - "end_column": 20 + "end_column": 15 }, "wtype": { "_type": "WType", - "name": "uint64", + "name": "bool", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "condition": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/boolean-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 9, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "SingleEvaluation", - "source_location": { - "file": "tests/approvals/boolean-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 9, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "source": { - "_type": "ConditionalExpression", - "source_location": { - "file": "tests/approvals/boolean-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 9, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "condition": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/boolean-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/boolean-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - } - }, - "true_expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/boolean-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 14, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "b" - }, - "false_expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/boolean-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - } - }, - "id": "1" - } - }, - "true_expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/boolean-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 19, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "e" - }, - "false_expr": { + "expr": { "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/boolean-expressions.algo.ts", @@ -716,10 +588,134 @@ }, "id": "1" } + }, + "true_expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/boolean-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 19, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "e" + }, + "false_expr": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/boolean-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 9, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source": { + "_type": "ConditionalExpression", + "source_location": { + "file": "tests/approvals/boolean-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 9, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/boolean-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/boolean-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + }, + "true_expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/boolean-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 14, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + }, + "false_expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/boolean-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + }, + "id": "1" } } - ], - "comment": "a or b" + }, + "error_message": "a or b" } }, { @@ -1002,8 +998,7 @@ }, "name": "d" } - ], - "comment": null + ] } } }, @@ -1352,8 +1347,7 @@ }, "name": "c" } - ], - "comment": null + ] } }, "op": "and", @@ -1410,8 +1404,7 @@ }, "name": "d" } - ], - "comment": null + ] } } } diff --git a/tests/approvals/out/box-proxies/box-proxies.awst.json b/tests/approvals/out/box-proxies/box-proxies.awst.json index 4b456160..103c104a 100644 --- a/tests/approvals/out/box-proxies/box-proxies.awst.json +++ b/tests/approvals/out/box-proxies/box-proxies.awst.json @@ -202,7 +202,7 @@ "end_column": 34 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 9, @@ -217,102 +217,98 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 9, + "end_line": 9, + "column": 9, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 9, "end_line": 9, "column": 9, - "end_column": 33 + "end_column": 18 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "BoxValueExpression", + "key": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 9, "end_line": 9, "column": 9, - "end_column": 18 + "end_column": 12 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 9, - "end_line": 9, - "column": 9, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" - }, - "exists_assertion_message": "Box must have value" + "name": "box" }, - "operator": "==", - "rhs": { - "_type": "BoxValueExpression", + "exists_assertion_message": "Box must have value" + }, + "operator": "==", + "rhs": { + "_type": "BoxValueExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 9, + "end_line": 9, + "column": 23, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", - "line": 9, - "end_line": 9, - "column": 23, - "end_column": 33 + "line": 4, + "end_line": 4, + "column": 38, + "end_column": 41 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 4, - "end_line": 4, - "column": 38, - "end_column": 41 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K>", - "encoding": "utf8" - }, - "exists_assertion_message": "Box must have value" - } + "value": "K>", + "encoding": "utf8" + }, + "exists_assertion_message": "Box must have value" } - ], - "comment": null + }, + "error_message": null } }, { @@ -325,7 +321,7 @@ "end_column": 35 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 11, @@ -340,17 +336,30 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BooleanBinaryOperation", + "condition": { + "_type": "BooleanBinaryOperation", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 11, + "end_line": 11, + "column": 9, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { + "_type": "StateExists", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 11, "end_line": 11, "column": 9, - "end_column": 34 + "end_column": 19 }, "wtype": { "_type": "WType", @@ -359,8 +368,8 @@ "ephemeral": false, "scalar_type": 2 }, - "left": { - "_type": "StateExists", + "field": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 11, @@ -370,51 +379,51 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", + "key": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 11, "end_line": 11, "column": 9, - "end_column": 19 + "end_column": 12 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 11, - "end_line": 11, - "column": 9, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" - }, - "exists_assertion_message": "Box must have value" - } + "name": "box" + }, + "exists_assertion_message": "Box must have value" + } + }, + "op": "and", + "right": { + "_type": "StateExists", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 11, + "end_line": 11, + "column": 23, + "end_column": 34 }, - "op": "and", - "right": { - "_type": "StateExists", + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "field": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 11, @@ -424,52 +433,35 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", + "key": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", - "line": 11, - "end_line": 11, - "column": 23, - "end_column": 34 + "line": 4, + "end_line": 4, + "column": 38, + "end_column": 41 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 4, - "end_line": 4, - "column": 38, - "end_column": 41 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K>", - "encoding": "utf8" - }, - "exists_assertion_message": "Box must have value" - } + "value": "K>", + "encoding": "utf8" + }, + "exists_assertion_message": "Box must have value" } } - ], - "comment": null + }, + "error_message": null } }, { @@ -482,7 +474,7 @@ "end_column": 20 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 13, @@ -497,27 +489,40 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 13, + "end_line": 13, + "column": 2, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 13, "end_line": 13, - "column": 2, - "end_column": 20 + "column": 9, + "end_column": 19 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, "expr": { - "_type": "CheckedMaybe", + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 13, @@ -526,91 +531,73 @@ "end_column": 19 }, "wtype": { - "_type": "WType", - "name": "uint64", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 13, - "end_line": 13, - "column": 9, - "end_column": 19 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ] - }, - "op_code": "box_len", - "immediates": [], - "stack_args": [ - { - "_type": "BoxValueExpression", + "op_code": "box_len", + "immediates": [], + "stack_args": [ + { + "_type": "BoxValueExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 13, + "end_line": 13, + "column": 9, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 13, "end_line": 13, "column": 9, - "end_column": 19 + "end_column": 12 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 13, - "end_line": 13, - "column": 9, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" - }, - "exists_assertion_message": "Box must have value" - } - ], - "comment": null - }, - "comment": "Box must exist" - } + "name": "box" + }, + "exists_assertion_message": "Box must have value" + } + ] + }, + "comment": "Box must exist" } - ], - "comment": null + }, + "error_message": null } }, { @@ -750,7 +737,7 @@ "end_column": 37 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 17, @@ -765,17 +752,30 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BooleanBinaryOperation", + "condition": { + "_type": "BooleanBinaryOperation", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 17, + "end_line": 17, + "column": 9, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { + "_type": "Not", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 17, "end_line": 17, "column": 9, - "end_column": 36 + "end_column": 20 }, "wtype": { "_type": "WType", @@ -784,13 +784,13 @@ "ephemeral": false, "scalar_type": 2 }, - "left": { - "_type": "Not", + "expr": { + "_type": "StateExists", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 17, "end_line": 17, - "column": 9, + "column": 10, "end_column": 20 }, "wtype": { @@ -800,8 +800,8 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "StateExists", + "field": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 17, @@ -811,57 +811,57 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", + "key": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 17, "end_line": 17, "column": 10, - "end_column": 20 + "end_column": 13 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 17, - "end_line": 17, - "column": 10, - "end_column": 13 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" - }, - "exists_assertion_message": "Box must have value" - } + "name": "box" + }, + "exists_assertion_message": "Box must have value" } + } + }, + "op": "and", + "right": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 17, + "end_line": 17, + "column": 24, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 }, - "op": "and", - "right": { - "_type": "Not", + "expr": { + "_type": "StateExists", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 17, "end_line": 17, - "column": 24, + "column": 25, "end_column": 36 }, "wtype": { @@ -871,8 +871,8 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "StateExists", + "field": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 17, @@ -882,53 +882,36 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", + "key": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", - "line": 17, - "end_line": 17, - "column": 25, - "end_column": 36 + "line": 4, + "end_line": 4, + "column": 38, + "end_column": 41 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 4, - "end_line": 4, - "column": 38, - "end_column": 41 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K>", - "encoding": "utf8" - }, - "exists_assertion_message": "Box must have value" - } + "value": "K>", + "encoding": "utf8" + }, + "exists_assertion_message": "Box must have value" } } } - ], - "comment": null + }, + "error_message": null } }, { @@ -987,7 +970,7 @@ "end_column": 80 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 20, @@ -1002,33 +985,46 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 20, + "end_line": 20, + "column": 9, + "end_column": 79 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "StateGet", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 20, "end_line": 20, "column": 9, - "end_column": 79 + "end_column": 42 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "StateGet", + "field": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 20, "end_line": 20, "column": 9, - "end_column": 42 + "end_column": 17 }, "wtype": { "_type": "WType", @@ -1037,71 +1033,35 @@ "ephemeral": false, "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", + "key": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", - "line": 20, - "end_line": 20, - "column": 9, - "end_column": 17 + "line": 4, + "end_line": 4, + "column": 38, + "end_column": 41 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 4, - "end_line": 4, - "column": 38, - "end_column": 41 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K>", - "encoding": "utf8" - }, - "exists_assertion_message": "Box must have value" + "value": "K>", + "encoding": "utf8" }, - "default": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 20, - "end_line": 20, - "column": 29, - "end_column": 39 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "defaultVal" - } + "exists_assertion_message": "Box must have value" }, - "operator": "==", - "rhs": { - "_type": "StateGet", + "default": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 20, "end_line": 20, - "column": 47, - "end_column": 79 + "column": 29, + "end_column": 39 }, "wtype": { "_type": "WType", @@ -1110,64 +1070,83 @@ "ephemeral": false, "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 20, - "end_line": 20, - "column": 47, - "end_column": 54 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "key": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 20, - "end_line": 20, - "column": 47, - "end_column": 50 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" - }, - "exists_assertion_message": "Box must have value" + "name": "defaultVal" + } + }, + "operator": "==", + "rhs": { + "_type": "StateGet", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 20, + "end_line": 20, + "column": 47, + "end_column": 79 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "field": { + "_type": "BoxValueExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 20, + "end_line": 20, + "column": 47, + "end_column": 54 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "default": { + "key": { "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 20, "end_line": 20, - "column": 66, - "end_column": 76 + "column": 47, + "end_column": 50 }, "wtype": { "_type": "WType", - "name": "string", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "name": "defaultVal" - } + "name": "box" + }, + "exists_assertion_message": "Box must have value" + }, + "default": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 20, + "end_line": 20, + "column": 66, + "end_column": 76 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "defaultVal" } } - ], - "comment": null + }, + "error_message": null } }, { @@ -1330,7 +1309,7 @@ "end_column": 12 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 23, @@ -1345,16 +1324,29 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 23, + "end_line": 23, + "column": 9, + "end_column": 11 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 23, "end_line": 23, - "column": 9, + "column": 10, "end_column": 11 }, "wtype": { @@ -1364,27 +1356,10 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 23, - "end_line": 23, - "column": 10, - "end_column": 11 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "e" - } + "name": "e" } - ], - "comment": null + }, + "error_message": null } }, { @@ -1611,7 +1586,7 @@ "end_column": 11 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 26, @@ -1626,29 +1601,25 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 26, - "end_line": 26, - "column": 9, - "end_column": 10 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "e" - } - ], - "comment": null + "condition": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 26, + "end_line": 26, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "e" + }, + "error_message": null } } ], @@ -1843,8 +1814,7 @@ "name": "key" } } - ], - "comment": null + ] }, "exists_assertion_message": "Box must have value" }, @@ -1965,8 +1935,7 @@ "name": "key" } } - ], - "comment": null + ] }, "exists_assertion_message": "Box must have value" }, @@ -1999,7 +1968,7 @@ "end_column": 25 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 35, @@ -2014,27 +1983,40 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 35, + "end_line": 35, + "column": 2, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 35, "end_line": 35, - "column": 2, - "end_column": 25 + "column": 9, + "end_column": 24 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, "expr": { - "_type": "CheckedMaybe", + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 35, @@ -2043,49 +2025,49 @@ "end_column": 24 }, "wtype": { - "_type": "WType", - "name": "uint64", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 35, - "end_line": 35, - "column": 9, - "end_column": 24 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ] - }, - "op_code": "box_len", - "immediates": [], - "stack_args": [ + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, { - "_type": "BoxValueExpression", + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "box_len", + "immediates": [], + "stack_args": [ + { + "_type": "BoxValueExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 35, + "end_line": 35, + "column": 9, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 35, @@ -2095,96 +2077,77 @@ }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 35, - "end_line": 35, - "column": 9, - "end_column": 19 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 35, + "end_line": 35, + "column": 9, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "box_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "box" }, - "op_code": "concat", - "immediates": [], - "stack_args": [ - { + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 35, + "end_line": 35, + "column": 9, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 35, "end_line": 35, - "column": 9, - "end_column": 12 + "column": 20, + "end_column": 23 }, "wtype": { "_type": "WType", - "name": "box_key", + "name": "string", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "name": "box" - }, - { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 35, - "end_line": 35, - "column": 9, - "end_column": 19 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 35, - "end_line": 35, - "column": 20, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "key" - } + "name": "key" } - ], - "comment": null - }, - "exists_assertion_message": "Box must have value" - } - ], - "comment": null - }, - "comment": "Box must exist" - } + } + ] + }, + "exists_assertion_message": "Box must have value" + } + ] + }, + "comment": "Box must exist" } - ], - "comment": null + }, + "error_message": null } }, { @@ -2197,7 +2160,7 @@ "end_column": 27 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 37, @@ -2212,59 +2175,72 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "TupleItemExpression", + "condition": { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 37, + "end_line": 37, + "column": 9, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "StateGetEx", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 37, "end_line": 37, "column": 9, - "end_column": 26 + "end_column": 23 }, "wtype": { - "_type": "WType", - "name": "bool", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] }, - "base": { - "_type": "StateGetEx", + "field": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 37, "end_line": 37, "column": 9, - "end_column": 23 + "end_column": 18 }, "wtype": { - "_type": "WTuple", - "name": "tuple", + "_type": "WType", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ] + "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", + "key": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 37, @@ -2274,93 +2250,75 @@ }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 37, - "end_line": 37, - "column": 9, - "end_column": 18 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 37, + "end_line": 37, + "column": 9, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "box_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "box" }, - "op_code": "concat", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 37, - "end_line": 37, - "column": 9, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 37, + "end_line": 37, + "column": 9, + "end_column": 18 }, - { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 37, "end_line": 37, - "column": 9, - "end_column": 18 + "column": 19, + "end_column": 22 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "string", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 37, - "end_line": 37, - "column": 19, - "end_column": 22 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "key" - } + "name": "key" } - ], - "comment": null - }, - "exists_assertion_message": "Box must have value" - } - }, - "index": "1" - } - ], - "comment": null + } + ] + }, + "exists_assertion_message": "Box must have value" + } + }, + "index": "1" + }, + "error_message": null } }, { @@ -2373,7 +2331,7 @@ "end_column": 42 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 39, @@ -2388,27 +2346,40 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 39, + "end_line": 39, + "column": 9, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 39, "end_line": 39, "column": 9, - "end_column": 41 + "end_column": 16 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "BoxValueExpression", + "key": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 39, @@ -2418,91 +2389,90 @@ }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 39, - "end_line": 39, - "column": 9, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 39, + "end_line": 39, + "column": 9, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "box_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "box" }, - "op_code": "concat", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 39, - "end_line": 39, - "column": 9, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 39, + "end_line": 39, + "column": 9, + "end_column": 16 }, - { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 39, "end_line": 39, - "column": 9, - "end_column": 16 + "column": 17, + "end_column": 20 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "string", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 39, - "end_line": 39, - "column": 17, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "key" - } + "name": "key" } - ], - "comment": null - }, - "exists_assertion_message": "Box must have value" + } + ] }, - "operator": "==", - "rhs": { - "_type": "BoxValueExpression", + "exists_assertion_message": "Box must have value" + }, + "operator": "==", + "rhs": { + "_type": "BoxValueExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 39, + "end_line": 39, + "column": 26, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 39, @@ -2512,92 +2482,74 @@ }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 39, - "end_line": 39, - "column": 26, - "end_column": 36 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 29, + "end_line": 29, + "column": 50, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "box_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "", + "encoding": "utf8" }, - "op_code": "concat", - "immediates": [], - "stack_args": [ - { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 29, - "end_line": 29, - "column": 50, - "end_column": 52 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "", - "encoding": "utf8" + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 39, + "end_line": 39, + "column": 26, + "end_column": 36 }, - { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 39, "end_line": 39, - "column": 26, - "end_column": 36 + "column": 37, + "end_column": 40 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "string", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 39, - "end_line": 39, - "column": 37, - "end_column": 40 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "key" - } + "name": "key" } - ], - "comment": null - }, - "exists_assertion_message": "Box must have value" - } + } + ] + }, + "exists_assertion_message": "Box must have value" } - ], - "comment": null + }, + "error_message": null } }, { @@ -2713,8 +2665,7 @@ "name": "key" } } - ], - "comment": null + ] }, "exists_assertion_message": "Box must have value" } @@ -2730,7 +2681,7 @@ "end_column": 104 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, @@ -2745,33 +2696,46 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 9, + "end_column": 103 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "StateGet", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, "column": 9, - "end_column": 103 + "end_column": 52 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "StateGet", + "field": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, "column": 9, - "end_column": 52 + "end_column": 16 }, "wtype": { "_type": "WType", @@ -2780,8 +2744,8 @@ "ephemeral": false, "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", + "key": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, @@ -2791,65 +2755,65 @@ }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 9, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 9, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "box_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "box" }, - "op_code": "concat", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 9, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 9, + "end_column": 16 }, - { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "BytesBinaryOperation", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 9, - "end_column": 16 + "column": 17, + "end_column": 26 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "string", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { + "left": { "_type": "BytesBinaryOperation", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", @@ -2866,7 +2830,7 @@ "scalar_type": 1 }, "left": { - "_type": "BytesBinaryOperation", + "_type": "StringConstant", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, @@ -2881,53 +2845,17 @@ "ephemeral": false, "scalar_type": 1 }, - "left": { - "_type": "StringConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 17, - "end_column": 26 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "" - }, - "op": "+", - "right": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 20, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "key" - } + "value": "" }, "op": "+", "right": { - "_type": "StringConstant", + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 17, - "end_column": 26 + "column": 20, + "end_column": 23 }, "wtype": { "_type": "WType", @@ -2936,44 +2864,79 @@ "ephemeral": false, "scalar_type": 1 }, - "value": "x" + "name": "key" } + }, + "op": "+", + "right": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 17, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "x" } } - ], - "comment": null - }, - "exists_assertion_message": "Box must have value" + } + ] }, - "default": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 45, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "Vg", - "encoding": "utf8" - } + "exists_assertion_message": "Box must have value" + }, + "default": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 45, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Vg", + "encoding": "utf8" + } + }, + "operator": "==", + "rhs": { + "_type": "StateGet", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 57, + "end_column": 103 }, - "operator": "==", - "rhs": { - "_type": "StateGet", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "field": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, "column": 57, - "end_column": 103 + "end_column": 67 }, "wtype": { "_type": "WType", @@ -2982,8 +2945,8 @@ "ephemeral": false, "scalar_type": 1 }, - "field": { - "_type": "BoxValueExpression", + "key": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, @@ -2993,66 +2956,66 @@ }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 57, - "end_column": 67 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "op_code": "concat", + "immediates": [], + "stack_args": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 29, + "end_line": 29, + "column": 50, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "box_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "", + "encoding": "utf8" }, - "op_code": "concat", - "immediates": [], - "stack_args": [ - { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 29, - "end_line": 29, - "column": 50, - "end_column": 52 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "", - "encoding": "utf8" + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 57, + "end_column": 67 }, - { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "BytesBinaryOperation", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 57, - "end_column": 67 + "column": 68, + "end_column": 77 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "string", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { + "left": { "_type": "BytesBinaryOperation", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", @@ -3069,7 +3032,7 @@ "scalar_type": 1 }, "left": { - "_type": "BytesBinaryOperation", + "_type": "StringConstant", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, @@ -3084,53 +3047,17 @@ "ephemeral": false, "scalar_type": 1 }, - "left": { - "_type": "StringConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 68, - "end_column": 77 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "" - }, - "op": "+", - "right": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 71, - "end_column": 74 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "key" - } + "value": "" }, "op": "+", "right": { - "_type": "StringConstant", + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 68, - "end_column": 77 + "column": 71, + "end_column": 74 }, "wtype": { "_type": "WType", @@ -3139,38 +3066,56 @@ "ephemeral": false, "scalar_type": 1 }, - "value": "x" + "name": "key" } + }, + "op": "+", + "right": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 68, + "end_column": 77 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "x" } } - ], - "comment": null - }, - "exists_assertion_message": "Box must have value" + } + ] }, - "default": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 43, - "end_line": 43, - "column": 96, - "end_column": 99 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "Vg", - "encoding": "utf8" - } + "exists_assertion_message": "Box must have value" + }, + "default": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 43, + "end_line": 43, + "column": 96, + "end_column": 99 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Vg", + "encoding": "utf8" } } - ], - "comment": null + }, + "error_message": null } } ], @@ -3363,8 +3308,7 @@ }, "exists_assertion_message": "Box must have value" } - ], - "comment": null + ] }, "index": "1" } @@ -3473,8 +3417,7 @@ "value": "1000", "teal_alias": null } - ], - "comment": null + ] } } ], @@ -3608,8 +3551,7 @@ }, "exists_assertion_message": "Box must have value" } - ], - "comment": null + ] }, "comment": "Box must exist" }, @@ -3736,8 +3678,7 @@ }, "name": "length" } - ], - "comment": null + ] } } ], @@ -3884,8 +3825,7 @@ }, "name": "someBytes" } - ], - "comment": null + ] } }, { @@ -3971,8 +3911,7 @@ }, "name": "someBytes" } - ], - "comment": null + ] } }, { @@ -4096,8 +4035,7 @@ "value": "00", "encoding": "base16" } - ], - "comment": null + ] } }, { @@ -4222,8 +4160,7 @@ "value": "00", "encoding": "base16" } - ], - "comment": null + ] } }, { @@ -4236,7 +4173,7 @@ "end_column": 49 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 59, @@ -4251,84 +4188,80 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 59, + "end_line": 59, + "column": 9, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BoxValueExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 59, "end_line": 59, "column": 9, - "end_column": 48 + "end_column": 18 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "BoxValueExpression", + "key": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/box-proxies.algo.ts", "line": 59, "end_line": 59, "column": 9, - "end_column": 18 + "end_column": 12 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "box_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 59, - "end_line": 59, - "column": 9, - "end_column": 12 - }, - "wtype": { - "_type": "WType", - "name": "box_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "box" - }, - "exists_assertion_message": "Box must have value" + "name": "box" }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/box-proxies.algo.ts", - "line": 59, - "end_line": 59, - "column": 23, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "{{a90", - "encoding": "base16" - } + "exists_assertion_message": "Box must have value" + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/box-proxies.algo.ts", + "line": 59, + "end_line": 59, + "column": 23, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "{{a90", + "encoding": "base16" } - ], - "comment": null + }, + "error_message": null } } ], diff --git a/tests/approvals/out/byte-expressions/byte-expressions.awst b/tests/approvals/out/byte-expressions/byte-expressions.awst index 516de475..57411677 100644 --- a/tests/approvals/out/byte-expressions/byte-expressions.awst +++ b/tests/approvals/out/byte-expressions/byte-expressions.awst @@ -1,10 +1,10 @@ subroutine test(a: uint64, b: biguint, c: string): void { - assert(len(0x) == 0) - assert(itob(a) == itob(a)) - assert(0x0000000000000001 == 0x0000000000000001) + assert(len(0x) == 0, comment=Empty bytes has length of 0) + assert(itob(a) == itob(a), comment=Bytes(uint64) is equivalent to itob) + assert(0x0000000000000001 == 0x0000000000000001, comment=Bytes(uint64) returns an 8 byte encoding) assert(reinterpret_cast(256) == 0x0100) - assert(reinterpret_cast(reinterpret_cast(b)) == b) + assert(reinterpret_cast(reinterpret_cast(b)) == b, comment=Round trip of biguint to bytes and back results in the same value) assert(reinterpret_cast(reinterpret_cast(c)) == c) assert("123" == "123") assert(0x01020304 == 0x01020304) diff --git a/tests/approvals/out/byte-expressions/byte-expressions.awst.json b/tests/approvals/out/byte-expressions/byte-expressions.awst.json index 8221ffd9..c3751544 100644 --- a/tests/approvals/out/byte-expressions/byte-expressions.awst.json +++ b/tests/approvals/out/byte-expressions/byte-expressions.awst.json @@ -91,7 +91,7 @@ "end_column": 61 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 5, @@ -106,89 +106,84 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 9, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 5, "end_line": 5, "column": 9, - "end_column": 29 + "end_column": 23 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 5, - "end_line": 5, - "column": 9, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "len", - "immediates": [], - "stack_args": [ - { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 5, - "end_line": 5, - "column": 9, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "", - "encoding": "unknown" - } - ], - "comment": null + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 9, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "", + "encoding": "unknown" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 5, + "end_line": 5, + "column": 28, + "end_column": 29 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 5, - "end_line": 5, - "column": 28, - "end_column": 29 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "0", - "teal_alias": null - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null } - ], - "comment": "Empty bytes has length of 0" + }, + "error_message": "Empty bytes has length of 0" } }, { @@ -201,7 +196,7 @@ "end_column": 72 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 6, @@ -216,109 +211,103 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 9, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 6, "end_line": 6, "column": 9, - "end_column": 32 + "end_column": 17 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 9, - "end_column": 17 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "op_code": "itob", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 15, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - } - ], - "comment": null + "op_code": "itob", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 15, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 22, + "end_column": 32 }, - "operator": "==", - "rhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 22, - "end_column": 32 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "op_code": "itob", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 6, - "end_line": 6, - "column": 30, - "end_column": 31 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - } - ], - "comment": null - } + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "itob", + "immediates": [], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 6, + "end_line": 6, + "column": 30, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + ] } - ], - "comment": "Bytes(uint64) is equivalent to itob" + }, + "error_message": "Bytes(uint64) is equivalent to itob" } }, { @@ -331,7 +320,7 @@ "end_column": 108 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 7, @@ -346,67 +335,63 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 7, + "end_line": 7, + "column": 9, + "end_column": 63 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 7, "end_line": 7, "column": 9, - "end_column": 63 + "end_column": 25 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 7, - "end_line": 7, - "column": 9, - "end_column": 25 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "0000000001", - "encoding": "base16" + "value": "0000000001", + "encoding": "base16" + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 7, + "end_line": 7, + "column": 30, + "end_column": 63 }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 7, - "end_line": 7, - "column": 30, - "end_column": 63 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "0000000001", - "encoding": "base16" - } + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "0000000001", + "encoding": "base16" } - ], - "comment": "Bytes(uint64) returns an 8 byte encoding" + }, + "error_message": "Bytes(uint64) returns an 8 byte encoding" } }, { @@ -419,7 +404,7 @@ "end_column": 55 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 8, @@ -434,84 +419,80 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 8, + "end_line": 8, + "column": 9, + "end_column": 54 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 8, "end_line": 8, "column": 9, - "end_column": 54 + "end_column": 28 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 8, - "end_line": 8, - "column": 9, - "end_column": 28 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 8, - "end_line": 8, - "column": 23, - "end_column": 26 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "256", - "teal_alias": null - } + "scalar_type": 1 }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", + "expr": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 8, "end_line": 8, - "column": 33, - "end_column": 54 + "column": 23, + "end_column": 26 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "biguint", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "value": "0RR", - "encoding": "base16" + "value": "256", + "teal_alias": null } + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 8, + "end_line": 8, + "column": 33, + "end_column": 54 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "0RR", + "encoding": "base16" } - ], - "comment": null + }, + "error_message": null } }, { @@ -524,7 +505,7 @@ "end_column": 102 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 9, @@ -539,99 +520,95 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 9, + "end_line": 9, + "column": 9, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 9, "end_line": 9, "column": 9, - "end_column": 32 + "end_column": 26 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { + "expr": { "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 9, "end_line": 9, - "column": 9, - "end_column": 26 + "column": 17, + "end_column": 25 }, "wtype": { "_type": "WType", - "name": "biguint", + "name": "bytes", "immutable": true, "ephemeral": false, "scalar_type": 1 }, "expr": { - "_type": "ReinterpretCast", + "_type": "VarExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 9, "end_line": 9, - "column": 17, - "end_column": 25 + "column": 23, + "end_column": 24 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "biguint", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 9, - "end_line": 9, - "column": 23, - "end_column": 24 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "b" - } + "name": "b" } - }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 9, - "end_line": 9, - "column": 31, - "end_column": 32 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "b" } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 9, + "end_line": 9, + "column": 31, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "b" } - ], - "comment": "Round trip of biguint to bytes and back results in the same value" + }, + "error_message": "Round trip of biguint to bytes and back results in the same value" } }, { @@ -644,7 +621,7 @@ "end_column": 32 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 10, @@ -659,99 +636,95 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 10, + "end_line": 10, + "column": 9, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 10, "end_line": 10, "column": 9, - "end_column": 31 + "end_column": 25 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { + "expr": { "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 10, "end_line": 10, - "column": 9, - "end_column": 25 + "column": 16, + "end_column": 24 }, "wtype": { "_type": "WType", - "name": "string", + "name": "bytes", "immutable": true, "ephemeral": false, "scalar_type": 1 }, "expr": { - "_type": "ReinterpretCast", + "_type": "VarExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 10, "end_line": 10, - "column": 16, - "end_column": 24 + "column": 22, + "end_column": 23 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "string", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 10, - "end_line": 10, - "column": 22, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "c" - } + "name": "c" } - }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 10, - "end_line": 10, - "column": 30, - "end_column": 31 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "c" } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 10, + "end_line": 10, + "column": 30, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "c" } - ], - "comment": null + }, + "error_message": null } }, { @@ -764,7 +737,7 @@ "end_column": 46 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 11, @@ -779,67 +752,63 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 11, + "end_line": 11, + "column": 9, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 11, "end_line": 11, - "column": 9, - "end_column": 45 + "column": 21, + "end_column": 26 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 11, - "end_line": 11, - "column": 21, - "end_column": 26 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "F)}j", - "encoding": "utf8" + "value": "F)}j", + "encoding": "utf8" + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 11, + "end_line": 11, + "column": 39, + "end_column": 44 }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 11, - "end_line": 11, - "column": 39, - "end_column": 44 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "F)}j", - "encoding": "utf8" - } + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "F)}j", + "encoding": "utf8" } - ], - "comment": null + }, + "error_message": null } }, { @@ -852,7 +821,7 @@ "end_column": 59 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 12, @@ -867,67 +836,63 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 12, + "end_line": 12, + "column": 9, + "end_column": 58 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/byte-expressions.algo.ts", "line": 12, "end_line": 12, - "column": 9, - "end_column": 58 + "column": 15, + "end_column": 27 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 12, - "end_line": 12, - "column": 15, - "end_column": 27 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "0RjUA", - "encoding": "unknown" + "value": "0RjUA", + "encoding": "unknown" + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/byte-expressions.algo.ts", + "line": 12, + "end_line": 12, + "column": 33, + "end_column": 58 }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/byte-expressions.algo.ts", - "line": 12, - "end_line": 12, - "column": 33, - "end_column": 58 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "0RjUA", - "encoding": "base16" - } + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "0RjUA", + "encoding": "base16" } - ], - "comment": null + }, + "error_message": null } } ], @@ -1051,8 +1016,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, diff --git a/tests/approvals/out/call-expressions/call-expressions.awst.json b/tests/approvals/out/call-expressions/call-expressions.awst.json index a58a00f7..204ef14b 100644 --- a/tests/approvals/out/call-expressions/call-expressions.awst.json +++ b/tests/approvals/out/call-expressions/call-expressions.awst.json @@ -108,8 +108,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, diff --git a/tests/approvals/out/destructured-params/destructured-params.awst.json b/tests/approvals/out/destructured-params/destructured-params.awst.json index 38b53c40..172f69f1 100644 --- a/tests/approvals/out/destructured-params/destructured-params.awst.json +++ b/tests/approvals/out/destructured-params/destructured-params.awst.json @@ -357,8 +357,7 @@ }, "name": "a" } - ], - "comment": null + ] }, { "_type": "VarExpression", @@ -378,8 +377,7 @@ }, "name": "b" } - ], - "comment": null + ] }, { "_type": "IntrinsicCall", @@ -418,14 +416,11 @@ }, "name": "c" } - ], - "comment": null + ] } - ], - "comment": null + ] } - ], - "comment": null + ] } } ], diff --git a/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst.json b/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst.json index f00ad79f..ed50d6b6 100644 --- a/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst.json +++ b/tests/approvals/out/destructuring-iterators/destructuring-iterators.awst.json @@ -863,7 +863,7 @@ "end_column": 21 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/destructuring-iterators.algo.ts", "line": 14, @@ -878,66 +878,62 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/destructuring-iterators.algo.ts", + "line": 14, + "end_line": 14, + "column": 9, + "end_column": 20 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/destructuring-iterators.algo.ts", "line": 14, "end_line": 14, "column": 9, - "end_column": 20 + "end_column": 14 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/destructuring-iterators.algo.ts", - "line": 14, - "end_line": 14, - "column": 9, - "end_column": 14 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "total" + "name": "total" + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/destructuring-iterators.algo.ts", + "line": 14, + "end_line": 14, + "column": 19, + "end_column": 20 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/destructuring-iterators.algo.ts", - "line": 14, - "end_line": 14, - "column": 19, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "6", - "teal_alias": null - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null } - ], - "comment": null + }, + "error_message": null } } ], diff --git a/tests/approvals/out/ensure-budget/ensure-budget.awst.json b/tests/approvals/out/ensure-budget/ensure-budget.awst.json index 1a1b64b0..451baee0 100644 --- a/tests/approvals/out/ensure-budget/ensure-budget.awst.json +++ b/tests/approvals/out/ensure-budget/ensure-budget.awst.json @@ -107,8 +107,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, diff --git a/tests/approvals/out/global-state/global-state.awst b/tests/approvals/out/global-state/global-state.awst index 3f3a2038..95b77a57 100644 --- a/tests/approvals/out/global-state/global-state.awst +++ b/tests/approvals/out/global-state/global-state.awst @@ -12,8 +12,8 @@ contract TestContract if (!Boolean(txn())) { this.constructor() } - assert(STATE_EXISTS(GlobalState["testState"])) - assert(GlobalState["testState"] == 2) + assert(STATE_EXISTS(GlobalState["testState"]), comment=State should have value) + assert(GlobalState["testState"] == 2, comment=Value should equal 2) GlobalState["testState"]: uint64 = btoi(txnas(0)) return True } @@ -29,7 +29,7 @@ contract TestContract super.constructor() GlobalState["testState"]: uint64 = 2 GlobalState["TESTSTATE"]: uint64 = 5 - assert(GlobalState["baseTestState"] == "testing 123") + assert(GlobalState["baseTestState"] == "testing 123", comment=Base class state should be initialized after super call) GlobalState["noInitialInt"]: uint64 = someValue * GlobalState["testState"] } diff --git a/tests/approvals/out/global-state/global-state.awst.json b/tests/approvals/out/global-state/global-state.awst.json index f36d35bc..8848037c 100644 --- a/tests/approvals/out/global-state/global-state.awst.json +++ b/tests/approvals/out/global-state/global-state.awst.json @@ -108,8 +108,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -184,7 +183,7 @@ "end_column": 62 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/global-state.algo.ts", "line": 22, @@ -199,11 +198,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "StateExists", + "condition": { + "_type": "StateExists", + "source_location": { + "file": "tests/approvals/global-state.algo.ts", + "line": 22, + "end_line": 22, + "column": 11, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "field": { + "_type": "AppStateExpression", "source_location": { "file": "tests/approvals/global-state.algo.ts", "line": 22, @@ -213,51 +225,34 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "field": { - "_type": "AppStateExpression", + "key": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/global-state.algo.ts", - "line": 22, - "end_line": 22, - "column": 11, - "end_column": 34 + "line": 11, + "end_line": 11, + "column": 2, + "end_column": 11 }, "wtype": { "_type": "WType", - "name": "uint64", + "name": "state_key", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "key": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/global-state.algo.ts", - "line": 11, - "end_line": 11, - "column": 2, - "end_column": 11 - }, - "wtype": { - "_type": "WType", - "name": "state_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "bY*jNQ*>c;Wd", - "encoding": "utf8" + "scalar_type": 1 }, - "exists_assertion_message": "check GlobalState exists" - } + "value": "bY*jNQ*>c;Wd", + "encoding": "utf8" + }, + "exists_assertion_message": "check GlobalState exists" } - ], - "comment": "State should have value" + }, + "error_message": "State should have value" } }, { @@ -270,7 +265,7 @@ "end_column": 62 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/global-state.algo.ts", "line": 23, @@ -285,85 +280,81 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/global-state.algo.ts", + "line": 23, + "end_line": 23, + "column": 11, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "AppStateExpression", "source_location": { "file": "tests/approvals/global-state.algo.ts", "line": 23, "end_line": 23, "column": 11, - "end_column": 37 + "end_column": 31 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "AppStateExpression", + "key": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/global-state.algo.ts", - "line": 23, - "end_line": 23, - "column": 11, - "end_column": 31 + "line": 11, + "end_line": 11, + "column": 2, + "end_column": 11 }, "wtype": { "_type": "WType", - "name": "uint64", + "name": "state_key", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "key": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/global-state.algo.ts", - "line": 11, - "end_line": 11, - "column": 2, - "end_column": 11 - }, - "wtype": { - "_type": "WType", - "name": "state_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "bY*jNQ*>c;Wd", - "encoding": "utf8" + "scalar_type": 1 }, - "exists_assertion_message": "check GlobalState exists" + "value": "bY*jNQ*>c;Wd", + "encoding": "utf8" }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/global-state.algo.ts", - "line": 23, - "end_line": 23, - "column": 36, - "end_column": 37 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "2", - "teal_alias": null - } + "exists_assertion_message": "check GlobalState exists" + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/global-state.algo.ts", + "line": 23, + "end_line": 23, + "column": 36, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "2", + "teal_alias": null } - ], - "comment": "Value should equal 2" + }, + "error_message": "Value should equal 2" } }, { @@ -471,11 +462,9 @@ "value": "0", "teal_alias": null } - ], - "comment": null + ] } - ], - "comment": null + ] } }, { @@ -860,7 +849,7 @@ "end_column": 113 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/global-state.algo.ts", "line": 17, @@ -875,84 +864,80 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/global-state.algo.ts", + "line": 17, + "end_line": 17, + "column": 11, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "AppStateExpression", "source_location": { "file": "tests/approvals/global-state.algo.ts", "line": 17, "end_line": 17, "column": 11, - "end_column": 53 + "end_column": 35 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "string", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "AppStateExpression", + "key": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/global-state.algo.ts", - "line": 17, - "end_line": 17, - "column": 11, - "end_column": 35 + "line": 5, + "end_line": 5, + "column": 2, + "end_column": 15 }, "wtype": { "_type": "WType", - "name": "string", + "name": "state_key", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "key": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/global-state.algo.ts", - "line": 5, - "end_line": 5, - "column": 2, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "state_key", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "VqtS-RAqB?Q*>c;Wd", - "encoding": "utf8" - }, - "exists_assertion_message": "check GlobalState exists" + "value": "VqtS-RAqB?Q*>c;Wd", + "encoding": "utf8" }, - "operator": "==", - "rhs": { - "_type": "StringConstant", - "source_location": { - "file": "tests/approvals/global-state.algo.ts", - "line": 17, - "end_line": 17, - "column": 40, - "end_column": 53 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "testing 123" - } + "exists_assertion_message": "check GlobalState exists" + }, + "operator": "==", + "rhs": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/global-state.algo.ts", + "line": 17, + "end_line": 17, + "column": 40, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "testing 123" } - ], - "comment": "Base class state should be initialized after super call" + }, + "error_message": "Base class state should be initialized after super call" } }, { diff --git a/tests/approvals/out/implicit-create/implicit-create.awst.json b/tests/approvals/out/implicit-create/implicit-create.awst.json index 828a0c74..1c873d21 100644 --- a/tests/approvals/out/implicit-create/implicit-create.awst.json +++ b/tests/approvals/out/implicit-create/implicit-create.awst.json @@ -109,8 +109,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -717,8 +716,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -1321,8 +1319,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -1871,8 +1868,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -2426,8 +2422,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -3050,8 +3045,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, diff --git a/tests/approvals/out/inheritance-b/inheritance-b.awst.json b/tests/approvals/out/inheritance-b/inheritance-b.awst.json index 9cbfadba..c0a7a591 100644 --- a/tests/approvals/out/inheritance-b/inheritance-b.awst.json +++ b/tests/approvals/out/inheritance-b/inheritance-b.awst.json @@ -108,8 +108,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -260,11 +259,9 @@ "value": "0", "teal_alias": null } - ], - "comment": null + ] } - ], - "comment": null + ] } }, { @@ -353,11 +350,9 @@ "value": "1", "teal_alias": null } - ], - "comment": null + ] } - ], - "comment": null + ] } }, { @@ -474,11 +469,9 @@ } ] } - ], - "comment": null + ] } - ], - "comment": null + ] } }, { @@ -1125,8 +1118,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, diff --git a/tests/approvals/out/intrinsic-calls/intrinsic-calls.awst.json b/tests/approvals/out/intrinsic-calls/intrinsic-calls.awst.json index a436886f..bfb59afb 100644 --- a/tests/approvals/out/intrinsic-calls/intrinsic-calls.awst.json +++ b/tests/approvals/out/intrinsic-calls/intrinsic-calls.awst.json @@ -165,8 +165,7 @@ "value": "1", "teal_alias": null } - ], - "comment": null + ] } }, { @@ -271,8 +270,7 @@ "value": "9", "teal_alias": null } - ], - "comment": null + ] } }, { @@ -339,8 +337,7 @@ }, "name": "x" } - ], - "comment": null + ] } }, { @@ -407,8 +404,7 @@ }, "name": "z" } - ], - "comment": null + ] } } ], diff --git a/tests/approvals/out/itxn/itxn.awst b/tests/approvals/out/itxn/itxn.awst index ee7459d8..d9bc8455 100644 --- a/tests/approvals/out/itxn/itxn.awst +++ b/tests/approvals/out/itxn/itxn.awst @@ -43,15 +43,15 @@ contract ItxnDemoContract asset1_txn: inner_transaction_acfg = submit_txn(assetParams) update_inner_transaction(assetParams, ConfigAssetName=GlobalState["name"]) asset2_txn: inner_transaction_acfg = submit_txn(assetParams) - assert(asset1_txn.ConfigAssetName == "AST1") - assert(asset2_txn.ConfigAssetName == "AST2") - assert(checked_maybe(asset_params_get(asset1_txn.CreatedAssetID), comment=asset exists) == "AST1") - assert(checked_maybe(asset_params_get(asset2_txn.CreatedAssetID), comment=asset exists) == "AST2") + assert(asset1_txn.ConfigAssetName == "AST1", comment=asset1_txn is correct) + assert(asset2_txn.ConfigAssetName == "AST2", comment=asset2_txn is correct) + assert(checked_maybe(asset_params_get(asset1_txn.CreatedAssetID), comment=asset exists) == "AST1", comment=created asset 1 is correct) + assert(checked_maybe(asset_params_get(asset2_txn.CreatedAssetID), comment=asset exists) == "AST2", comment=created asset 2 is correct) appCreateParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, ApprovalProgram=0x098101, ClearStateProgram=0x098101) update_inner_transaction(assetParams, ConfigAssetName="AST3") [appCreateTxn, asset3_txn]: readonlytuple[inner_transaction_appl, inner_transaction_acfg] = submit_txn(appCreateParams, assetParams) - assert(Boolean(appCreateTxn.ApplicationID)) - assert(asset3_txn.ConfigAssetName == "AST3") + assert(Boolean(appCreateTxn.ApplicationID), comment=app is created) + assert(asset3_txn.ConfigAssetName == "AST3", comment=asset3_txn is correct) update_inner_transaction(appCreateParams, Note="3rd") update_inner_transaction(assetParams, Note="3rd") submit_txn(appCreateParams, assetParams) @@ -66,8 +66,8 @@ contract ItxnDemoContract createAppParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, ApprovalProgram=" ", ClearStateProgram=" ", ApplicationArgs=["3", "4", "5"], Note="no args param set") } createAppTxn: inner_transaction_appl = submit_txn(createAppParams) - assert(createAppTxn.ApplicationArgs[0] == "1") - assert(createAppTxn.ApplicationArgs[1] == "2") + assert(createAppTxn.ApplicationArgs[0] == "1", comment=correct args used 1) + assert(createAppTxn.ApplicationArgs[1] == "2", comment=correct args used 2) assert(createAppTxn.Note == "with args param set") } diff --git a/tests/approvals/out/itxn/itxn.awst.json b/tests/approvals/out/itxn/itxn.awst.json index cbae6f4f..b497f14e 100644 --- a/tests/approvals/out/itxn/itxn.awst.json +++ b/tests/approvals/out/itxn/itxn.awst.json @@ -107,8 +107,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -218,8 +217,7 @@ "immediates": [ "NumAppArgs" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, "if_branch": { @@ -301,8 +299,7 @@ "value": "0", "teal_alias": null } - ], - "comment": null + ] }, "cases": [ [ @@ -1027,8 +1024,7 @@ "immediates": [ "CurrentApplicationAddress" ], - "stack_args": [], - "comment": null + "stack_args": [] }, "ConfigAssetReserve": { "_type": "IntrinsicCall", @@ -1050,8 +1046,7 @@ "immediates": [ "CurrentApplicationAddress" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } @@ -1354,7 +1349,7 @@ "end_column": 75 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 46, @@ -1369,86 +1364,82 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 46, + "end_line": 46, + "column": 11, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "InnerTransactionField", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 46, "end_line": 46, "column": 11, - "end_column": 49 + "end_column": 31 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "InnerTransactionField", + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 46, "end_line": 46, "column": 11, - "end_column": 31 + "end_column": 21 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WInnerTransaction", + "name": "inner_transaction_acfg", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "transaction_type": 3 }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 46, - "end_line": 46, - "column": 11, - "end_column": 21 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_acfg", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 3 - }, - "name": "asset1_txn" - }, - "field": "ConfigAssetName", - "array_index": null + "name": "asset1_txn" }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 46, - "end_line": 46, - "column": 42, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K~q#Q", - "encoding": "utf8" - } + "field": "ConfigAssetName", + "array_index": null + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 46, + "end_line": 46, + "column": 42, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "K~q#Q", + "encoding": "utf8" } - ], - "comment": "asset1_txn is correct" + }, + "error_message": "asset1_txn is correct" } }, { @@ -1461,7 +1452,7 @@ "end_column": 75 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 47, @@ -1476,86 +1467,82 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 47, + "end_line": 47, + "column": 11, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "InnerTransactionField", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 47, "end_line": 47, "column": 11, - "end_column": 49 + "end_column": 31 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "InnerTransactionField", + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 47, "end_line": 47, "column": 11, - "end_column": 31 + "end_column": 21 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WInnerTransaction", + "name": "inner_transaction_acfg", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "transaction_type": 3 }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 47, - "end_line": 47, - "column": 11, - "end_column": 21 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_acfg", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 3 - }, - "name": "asset2_txn" - }, - "field": "ConfigAssetName", - "array_index": null + "name": "asset2_txn" }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 47, - "end_line": 47, - "column": 42, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K~q#R", - "encoding": "utf8" - } + "field": "ConfigAssetName", + "array_index": null + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 47, + "end_line": 47, + "column": 42, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "K~q#R", + "encoding": "utf8" } - ], - "comment": "asset2_txn is correct" + }, + "error_message": "asset2_txn is correct" } }, { @@ -1568,7 +1555,7 @@ "end_column": 88 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 48, @@ -1583,27 +1570,40 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 48, + "end_line": 48, + "column": 11, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 48, "end_line": 48, "column": 11, - "end_column": 57 + "end_column": 39 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "CheckedMaybe", + "expr": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 48, @@ -1612,115 +1612,97 @@ "end_column": 39 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 48, - "end_line": 48, - "column": 11, - "end_column": 39 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ] - }, - "op_code": "asset_params_get", - "immediates": [ - "AssetName" - ], - "stack_args": [ + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, { - "_type": "InnerTransactionField", + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_params_get", + "immediates": [ + "AssetName" + ], + "stack_args": [ + { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 48, + "end_line": 48, + "column": 11, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 48, "end_line": 48, "column": 11, - "end_column": 34 + "end_column": 21 }, "wtype": { - "_type": "WType", - "name": "asset", + "_type": "WInnerTransaction", + "name": "inner_transaction_acfg", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": null, + "transaction_type": 3 }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 48, - "end_line": 48, - "column": 11, - "end_column": 21 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_acfg", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 3 - }, - "name": "asset1_txn" - }, - "field": "CreatedAssetID", - "array_index": null - } - ], - "comment": null - }, - "comment": "asset exists" + "name": "asset1_txn" + }, + "field": "CreatedAssetID", + "array_index": null + } + ] }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 48, - "end_line": 48, - "column": 50, - "end_column": 56 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K~q#Q", - "encoding": "utf8" - } + "comment": "asset exists" + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 48, + "end_line": 48, + "column": 50, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "K~q#Q", + "encoding": "utf8" } - ], - "comment": "created asset 1 is correct" + }, + "error_message": "created asset 1 is correct" } }, { @@ -1733,7 +1715,7 @@ "end_column": 88 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 49, @@ -1748,27 +1730,40 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 49, + "end_line": 49, + "column": 11, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "CheckedMaybe", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 49, "end_line": 49, "column": 11, - "end_column": 57 + "end_column": 39 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "CheckedMaybe", + "expr": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 49, @@ -1777,115 +1772,97 @@ "end_column": 39 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 49, - "end_line": 49, - "column": 11, - "end_column": 39 - }, - "wtype": { - "_type": "WTuple", - "name": "tuple", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ] - }, - "op_code": "asset_params_get", - "immediates": [ - "AssetName" - ], - "stack_args": [ + "scalar_type": null, + "types": [ { - "_type": "InnerTransactionField", + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "op_code": "asset_params_get", + "immediates": [ + "AssetName" + ], + "stack_args": [ + { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 49, + "end_line": 49, + "column": 11, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "asset", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 49, "end_line": 49, "column": 11, - "end_column": 34 + "end_column": 21 }, "wtype": { - "_type": "WType", - "name": "asset", + "_type": "WInnerTransaction", + "name": "inner_transaction_acfg", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": null, + "transaction_type": 3 }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 49, - "end_line": 49, - "column": 11, - "end_column": 21 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_acfg", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 3 - }, - "name": "asset2_txn" - }, - "field": "CreatedAssetID", - "array_index": null - } - ], - "comment": null - }, - "comment": "asset exists" + "name": "asset2_txn" + }, + "field": "CreatedAssetID", + "array_index": null + } + ] }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 49, - "end_line": 49, - "column": 50, - "end_column": 56 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K~q#R", - "encoding": "utf8" - } + "comment": "asset exists" + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 49, + "end_line": 49, + "column": 50, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "K~q#R", + "encoding": "utf8" } - ], - "comment": "created asset 2 is correct" + }, + "error_message": "created asset 2 is correct" } }, { @@ -2232,7 +2209,7 @@ "end_column": 48 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 63, @@ -2247,66 +2224,62 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "condition": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 63, + "end_line": 63, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "InnerTransactionField", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 63, "end_line": 63, - "column": 4, - "end_column": 48 + "column": 11, + "end_column": 29 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "application", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "InnerTransactionField", + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 63, "end_line": 63, "column": 11, - "end_column": 29 + "end_column": 23 }, "wtype": { - "_type": "WType", - "name": "application", + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 63, - "end_line": 63, - "column": 11, - "end_column": 23 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_appl", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 6 - }, - "name": "appCreateTxn" + "scalar_type": null, + "transaction_type": 6 }, - "field": "ApplicationID", - "array_index": null - } + "name": "appCreateTxn" + }, + "field": "ApplicationID", + "array_index": null } - ], - "comment": "app is created" + }, + "error_message": "app is created" } }, { @@ -2319,7 +2292,7 @@ "end_column": 75 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 64, @@ -2334,86 +2307,82 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 64, + "end_line": 64, + "column": 11, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "InnerTransactionField", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 64, "end_line": 64, "column": 11, - "end_column": 49 + "end_column": 31 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "InnerTransactionField", + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 64, "end_line": 64, "column": 11, - "end_column": 31 + "end_column": 21 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WInnerTransaction", + "name": "inner_transaction_acfg", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 64, - "end_line": 64, - "column": 11, - "end_column": 21 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_acfg", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 3 - }, - "name": "asset3_txn" + "scalar_type": null, + "transaction_type": 3 }, - "field": "ConfigAssetName", - "array_index": null + "name": "asset3_txn" }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 64, - "end_line": 64, - "column": 42, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "K~q#S", - "encoding": "utf8" - } + "field": "ConfigAssetName", + "array_index": null + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 64, + "end_line": 64, + "column": 42, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "K~q#S", + "encoding": "utf8" } - ], - "comment": "asset3_txn is correct" + }, + "error_message": "asset3_txn is correct" } }, { @@ -2723,8 +2692,7 @@ "immediates": [ "NumAppArgs" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, "if_branch": { @@ -3486,7 +3454,7 @@ "end_column": 73 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 95, @@ -3501,104 +3469,100 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 95, + "end_line": 95, + "column": 11, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "InnerTransactionField", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 95, "end_line": 95, "column": 11, - "end_column": 49 + "end_column": 34 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "InnerTransactionField", + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 95, "end_line": 95, "column": 11, - "end_column": 34 + "end_column": 23 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 95, - "end_line": 95, - "column": 11, - "end_column": 23 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_appl", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 6 - }, - "name": "createAppTxn" + "scalar_type": null, + "transaction_type": 6 }, - "field": "ApplicationArgs", - "array_index": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 95, - "end_line": 95, - "column": 32, - "end_column": 33 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "0", - "teal_alias": null - } + "name": "createAppTxn" }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", + "field": "ApplicationArgs", + "array_index": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 95, "end_line": 95, - "column": 45, - "end_column": 48 + "column": 32, + "end_column": 33 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "value": "F#", - "encoding": "utf8" + "value": "0", + "teal_alias": null } + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 95, + "end_line": 95, + "column": 45, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "F#", + "encoding": "utf8" } - ], - "comment": "correct args used 1" + }, + "error_message": "correct args used 1" } }, { @@ -3611,7 +3575,7 @@ "end_column": 73 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 96, @@ -3626,104 +3590,100 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 96, + "end_line": 96, + "column": 11, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "InnerTransactionField", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 96, "end_line": 96, "column": 11, - "end_column": 49 + "end_column": 34 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "InnerTransactionField", + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 96, "end_line": 96, "column": 11, - "end_column": 34 + "end_column": 23 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 96, - "end_line": 96, - "column": 11, - "end_column": 23 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_appl", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 6 - }, - "name": "createAppTxn" + "scalar_type": null, + "transaction_type": 6 }, - "field": "ApplicationArgs", - "array_index": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 96, - "end_line": 96, - "column": 32, - "end_column": 33 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "1", - "teal_alias": null - } + "name": "createAppTxn" }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", + "field": "ApplicationArgs", + "array_index": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 96, "end_line": 96, - "column": 45, - "end_column": 48 + "column": 32, + "end_column": 33 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "value": "G5", - "encoding": "utf8" + "value": "1", + "teal_alias": null } + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 96, + "end_line": 96, + "column": 45, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "G5", + "encoding": "utf8" } - ], - "comment": "correct args used 2" + }, + "error_message": "correct args used 2" } }, { @@ -3736,7 +3696,7 @@ "end_column": 62 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 97, @@ -3751,86 +3711,82 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 97, + "end_line": 97, + "column": 11, + "end_column": 61 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "InnerTransactionField", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 97, "end_line": 97, "column": 11, - "end_column": 61 + "end_column": 28 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "InnerTransactionField", + "itxn": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 97, "end_line": 97, "column": 11, - "end_column": 28 + "end_column": 23 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "itxn": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 97, - "end_line": 97, - "column": 11, - "end_column": 23 - }, - "wtype": { - "_type": "WInnerTransaction", - "name": "inner_transaction_appl", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "transaction_type": 6 - }, - "name": "createAppTxn" + "scalar_type": null, + "transaction_type": 6 }, - "field": "Note", - "array_index": null + "name": "createAppTxn" }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/itxn.algo.ts", - "line": 97, - "end_line": 97, - "column": 39, - "end_column": 60 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "cWHEJAYpQ6b0BbGa$#*Cb7gb", - "encoding": "utf8" - } + "field": "Note", + "array_index": null + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 97, + "end_line": 97, + "column": 39, + "end_column": 60 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "cWHEJAYpQ6b0BbGa$#*Cb7gb", + "encoding": "utf8" } - ], - "comment": null + }, + "error_message": null } } ], diff --git a/tests/approvals/out/local-state/local-state.awst.json b/tests/approvals/out/local-state/local-state.awst.json index 57cfd471..39668674 100644 --- a/tests/approvals/out/local-state/local-state.awst.json +++ b/tests/approvals/out/local-state/local-state.awst.json @@ -109,8 +109,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -613,8 +612,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, "value": { @@ -701,8 +699,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, "value": { @@ -789,8 +786,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, "value": { @@ -877,8 +873,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, "value": { @@ -985,8 +980,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, "value": { @@ -1529,8 +1523,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -1589,8 +1582,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -1649,8 +1641,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -1709,8 +1700,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -1825,8 +1815,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } @@ -2069,8 +2058,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -2129,8 +2117,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -2189,8 +2176,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -2249,8 +2235,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -2365,8 +2350,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } @@ -2609,8 +2593,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -2669,8 +2652,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -2729,8 +2711,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -2789,8 +2770,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -2905,8 +2885,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } @@ -3149,8 +3128,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -3209,8 +3187,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -3269,8 +3246,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -3329,8 +3305,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -3445,8 +3420,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } @@ -3709,8 +3683,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -3769,8 +3742,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -3829,8 +3801,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -3889,8 +3860,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } }, { @@ -4005,8 +3975,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } @@ -4185,8 +4154,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } @@ -4272,8 +4240,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } @@ -4359,8 +4326,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } @@ -4446,8 +4412,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } @@ -4553,8 +4518,7 @@ "immediates": [ "Sender" ], - "stack_args": [], - "comment": null + "stack_args": [] } } } diff --git a/tests/approvals/out/logic-sig/logic-sig.awst b/tests/approvals/out/logic-sig/logic-sig.awst index fa77ae41..04a36865 100644 --- a/tests/approvals/out/logic-sig/logic-sig.awst +++ b/tests/approvals/out/logic-sig/logic-sig.awst @@ -4,7 +4,7 @@ logicsig tests/approvals/logic-sig.algo.ts::AlwaysAllow { } subroutine feeIsZero(): void { - assert(txn() == 0) + assert(txn() == 0, comment=Fee must be zero) } logicsig tests/approvals/logic-sig.algo.ts::AllowNoFee { diff --git a/tests/approvals/out/logic-sig/logic-sig.awst.json b/tests/approvals/out/logic-sig/logic-sig.awst.json index 4923adb3..4c61163b 100644 --- a/tests/approvals/out/logic-sig/logic-sig.awst.json +++ b/tests/approvals/out/logic-sig/logic-sig.awst.json @@ -118,7 +118,7 @@ "end_column": 43 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/logic-sig.algo.ts", "line": 10, @@ -133,71 +133,66 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/logic-sig.algo.ts", + "line": 10, + "end_line": 10, + "column": 9, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/logic-sig.algo.ts", "line": 10, "end_line": 10, "column": 9, - "end_column": 22 + "end_column": 16 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/logic-sig.algo.ts", - "line": 10, - "end_line": 10, - "column": 9, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "txn", - "immediates": [ - "Fee" - ], - "stack_args": [], - "comment": null + "op_code": "txn", + "immediates": [ + "Fee" + ], + "stack_args": [] + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/logic-sig.algo.ts", + "line": 10, + "end_line": 10, + "column": 21, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/logic-sig.algo.ts", - "line": 10, - "end_line": 10, - "column": 21, - "end_column": 22 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "0", - "teal_alias": null - } + "value": "0", + "teal_alias": null } - ], - "comment": "Fee must be zero" + }, + "error_message": "Fee must be zero" } } ], diff --git a/tests/approvals/out/named-types/named-types.awst b/tests/approvals/out/named-types/named-types.awst index 2725cb19..9fb688a4 100644 --- a/tests/approvals/out/named-types/named-types.awst +++ b/tests/approvals/out/named-types/named-types.awst @@ -30,7 +30,7 @@ contract MyContract test(): void { - assert(x.y == y.y and x.x == y.x) + assert(x.y == y.y and x.x == y.x, comment=assert target is match for conditions) } testing(): readonlytuple[XY{ x: uint64, y: uint64 }, YX{ y: uint64, x: uint64 }, { x: uint64, y: uint64 }] diff --git a/tests/approvals/out/named-types/named-types.awst.json b/tests/approvals/out/named-types/named-types.awst.json index 858b5da9..d96d1552 100644 --- a/tests/approvals/out/named-types/named-types.awst.json +++ b/tests/approvals/out/named-types/named-types.awst.json @@ -109,8 +109,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -1635,7 +1634,7 @@ "end_column": 28 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", "line": 37, @@ -1650,11 +1649,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BooleanBinaryOperation", + "condition": { + "_type": "BooleanBinaryOperation", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { + "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", "line": 37, @@ -1669,8 +1681,8 @@ "ephemeral": false, "scalar_type": 2 }, - "left": { - "_type": "NumericComparisonExpression", + "lhs": { + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", "line": 37, @@ -1680,128 +1692,128 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "FieldExpression", + "base": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", "line": 37, "end_line": 37, - "column": 4, - "end_column": 28 + "column": 16, + "end_column": 17 }, "wtype": { - "_type": "WType", - "name": "uint64", + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "base": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/named-types.algo.ts", - "line": 37, - "end_line": 37, - "column": 16, - "end_column": 17 - }, - "wtype": { - "_type": "WTuple", - "name": "tests/approvals/named-types.algo.ts::XY", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ], - "names": [ - "x", - "y" - ] - }, - "name": "x" + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] }, - "name": "y" + "name": "x" }, - "operator": "==", - "rhs": { - "_type": "FieldExpression", + "name": "y" + }, + "operator": "==", + "rhs": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", "line": 37, "end_line": 37, - "column": 4, - "end_column": 28 + "column": 24, + "end_column": 25 }, "wtype": { - "_type": "WType", - "name": "uint64", + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "base": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/named-types.algo.ts", - "line": 37, - "end_line": 37, - "column": 24, - "end_column": 25 - }, - "wtype": { - "_type": "WTuple", - "name": "tests/approvals/named-types.algo.ts::YX", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ], - "names": [ - "y", - "x" - ] - }, - "name": "y" + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "y", + "x" + ] }, "name": "y" - } + }, + "name": "y" + } + }, + "op": "and", + "right": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 }, - "op": "and", - "right": { - "_type": "NumericComparisonExpression", + "lhs": { + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", "line": 37, @@ -1811,128 +1823,111 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "FieldExpression", + "base": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", "line": 37, "end_line": 37, - "column": 4, - "end_column": 28 + "column": 16, + "end_column": 17 }, "wtype": { - "_type": "WType", - "name": "uint64", + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::XY", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "base": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/named-types.algo.ts", - "line": 37, - "end_line": 37, - "column": 16, - "end_column": 17 - }, - "wtype": { - "_type": "WTuple", - "name": "tests/approvals/named-types.algo.ts::XY", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ], - "names": [ - "x", - "y" - ] - }, - "name": "x" + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "x", + "y" + ] }, "name": "x" }, - "operator": "==", - "rhs": { - "_type": "FieldExpression", + "name": "x" + }, + "operator": "==", + "rhs": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/named-types.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/named-types.algo.ts", "line": 37, "end_line": 37, - "column": 4, - "end_column": 28 + "column": 24, + "end_column": 25 }, "wtype": { - "_type": "WType", - "name": "uint64", + "_type": "WTuple", + "name": "tests/approvals/named-types.algo.ts::YX", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "base": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/named-types.algo.ts", - "line": 37, - "end_line": 37, - "column": 24, - "end_column": 25 - }, - "wtype": { - "_type": "WTuple", - "name": "tests/approvals/named-types.algo.ts::YX", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ], - "names": [ - "y", - "x" - ] - }, - "name": "y" + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "y", + "x" + ] }, - "name": "x" - } + "name": "y" + }, + "name": "x" } } - ], - "comment": "assert target is match for conditions" + }, + "error_message": "assert target is match for conditions" } } ], diff --git a/tests/approvals/out/non-arc4/non-arc4.awst.json b/tests/approvals/out/non-arc4/non-arc4.awst.json index 60af645c..e30e0726 100644 --- a/tests/approvals/out/non-arc4/non-arc4.awst.json +++ b/tests/approvals/out/non-arc4/non-arc4.awst.json @@ -107,8 +107,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -256,8 +255,7 @@ "value": "0", "teal_alias": null } - ], - "comment": null + ] } } }, @@ -360,8 +358,7 @@ } } } - ], - "comment": null + ] } }, { diff --git a/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst b/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst index 66731d8a..ef81ebce 100644 --- a/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst +++ b/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst @@ -5,7 +5,7 @@ logicsig tests/approvals/pre-approved-sale.algo.ts::PreApprovedSale { asset: asset = TemplateVar[asset](TMPL_ASSET) payTxn: group_transaction_pay = reinterpret_cast(0) assetTxn: group_transaction_axfer = reinterpret_cast(1) - assert(gtxns(payTxn) == seller and gtxns(payTxn) == price) - assert(gtxns(assetTxn) == 1 and gtxns(assetTxn) == seller and gtxns(assetTxn) == asset and gtxns(assetTxn) == global() and gtxns(assetTxn) == global()) + assert(gtxns(payTxn) == seller and gtxns(payTxn) == price, comment=assert target is match for conditions) + assert(gtxns(assetTxn) == 1 and gtxns(assetTxn) == seller and gtxns(assetTxn) == asset and gtxns(assetTxn) == global() and gtxns(assetTxn) == global(), comment=assert target is match for conditions) return True } \ No newline at end of file diff --git a/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst.json b/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst.json index 60b1324d..1254d48d 100644 --- a/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst.json +++ b/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst.json @@ -317,7 +317,7 @@ "end_column": 6 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", "line": 18, @@ -332,11 +332,24 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BooleanBinaryOperation", + "condition": { + "_type": "BooleanBinaryOperation", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 18, + "end_line": 21, + "column": 4, + "end_column": 6 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { + "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", "line": 18, @@ -351,8 +364,8 @@ "ephemeral": false, "scalar_type": 2 }, - "left": { - "_type": "BytesComparisonExpression", + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", "line": 18, @@ -362,77 +375,76 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "account", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 18, - "end_line": 21, - "column": 4, - "end_column": 6 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "op_code": "gtxns", - "immediates": [ - "Receiver" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 18, - "end_line": 18, - "column": 16, - "end_column": 22 - }, - "wtype": { - "_type": "WGroupTransaction", - "name": "group_transaction_pay", - "immutable": true, - "ephemeral": false, - "scalar_type": 2, - "transaction_type": 1 - }, - "name": "payTxn" - } - ], - "comment": null + "op_code": "gtxns", + "immediates": [ + "Receiver" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 18, + "end_line": 18, + "column": 16, + "end_column": 22 + }, + "wtype": { + "_type": "WGroupTransaction", + "name": "group_transaction_pay", + "immutable": true, + "ephemeral": false, + "scalar_type": 2, + "transaction_type": 1 + }, + "name": "payTxn" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 19, + "end_line": 19, + "column": 16, + "end_column": 22 }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 19, - "end_line": 19, - "column": 16, - "end_column": 22 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "seller" - } + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "seller" + } + }, + "op": "and", + "right": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 18, + "end_line": 21, + "column": 4, + "end_column": 6 }, - "op": "and", - "right": { - "_type": "NumericComparisonExpression", + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", "line": 18, @@ -442,77 +454,59 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 18, - "end_line": 21, - "column": 4, - "end_column": 6 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "gtxns", - "immediates": [ - "Amount" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 18, - "end_line": 18, - "column": 16, - "end_column": 22 - }, - "wtype": { - "_type": "WGroupTransaction", - "name": "group_transaction_pay", - "immutable": true, - "ephemeral": false, - "scalar_type": 2, - "transaction_type": 1 - }, - "name": "payTxn" - } - ], - "comment": null + "op_code": "gtxns", + "immediates": [ + "Amount" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 18, + "end_line": 18, + "column": 16, + "end_column": 22 + }, + "wtype": { + "_type": "WGroupTransaction", + "name": "group_transaction_pay", + "immutable": true, + "ephemeral": false, + "scalar_type": 2, + "transaction_type": 1 + }, + "name": "payTxn" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 20, + "end_line": 20, + "column": 14, + "end_column": 19 }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 20, - "end_line": 20, - "column": 14, - "end_column": 19 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "price" - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "price" } } - ], - "comment": "assert target is match for conditions" + }, + "error_message": "assert target is match for conditions" } }, { @@ -525,7 +519,7 @@ "end_column": 6 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", "line": 23, @@ -540,10 +534,23 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { + "condition": { + "_type": "BooleanBinaryOperation", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 23, + "end_line": 29, + "column": 4, + "end_column": 6 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { "_type": "BooleanBinaryOperation", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", @@ -592,7 +599,7 @@ "scalar_type": 2 }, "left": { - "_type": "BooleanBinaryOperation", + "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", "line": 23, @@ -607,8 +614,8 @@ "ephemeral": false, "scalar_type": 2 }, - "left": { - "_type": "NumericComparisonExpression", + "lhs": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", "line": 23, @@ -618,159 +625,61 @@ }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 23, - "end_line": 29, - "column": 4, - "end_column": 6 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "gtxns", - "immediates": [ - "AssetAmount" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 23, - "end_line": 23, - "column": 16, - "end_column": 24 - }, - "wtype": { - "_type": "WGroupTransaction", - "name": "group_transaction_axfer", - "immutable": true, - "ephemeral": false, - "scalar_type": 2, - "transaction_type": 4 - }, - "name": "assetTxn" - } - ], - "comment": null - }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 24, - "end_line": 24, - "column": 26, - "end_column": 27 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "1", - "teal_alias": null - } + "op_code": "gtxns", + "immediates": [ + "AssetAmount" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 23, + "end_line": 23, + "column": 16, + "end_column": 24 + }, + "wtype": { + "_type": "WGroupTransaction", + "name": "group_transaction_axfer", + "immutable": true, + "ephemeral": false, + "scalar_type": 2, + "transaction_type": 4 + }, + "name": "assetTxn" + } + ] }, - "op": "and", - "right": { - "_type": "BytesComparisonExpression", + "operator": "==", + "rhs": { + "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 23, - "end_line": 29, - "column": 4, - "end_column": 6 + "line": 24, + "end_line": 24, + "column": 26, + "end_column": 27 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 23, - "end_line": 29, - "column": 4, - "end_column": 6 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "op_code": "gtxns", - "immediates": [ - "Sender" - ], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 23, - "end_line": 23, - "column": 16, - "end_column": 24 - }, - "wtype": { - "_type": "WGroupTransaction", - "name": "group_transaction_axfer", - "immutable": true, - "ephemeral": false, - "scalar_type": 2, - "transaction_type": 4 - }, - "name": "assetTxn" - } - ], - "comment": null - }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 25, - "end_line": 25, - "column": 14, - "end_column": 20 - }, - "wtype": { - "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "seller" - } + "value": "1", + "teal_alias": null } }, "op": "and", "right": { - "_type": "NumericComparisonExpression", + "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", "line": 23, @@ -796,14 +705,14 @@ }, "wtype": { "_type": "WType", - "name": "asset", + "name": "account", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, "op_code": "gtxns", "immediates": [ - "XferAsset" + "Sender" ], "stack_args": [ { @@ -825,33 +734,32 @@ }, "name": "assetTxn" } - ], - "comment": null + ] }, "operator": "==", "rhs": { "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 26, - "end_line": 26, - "column": 17, - "end_column": 22 + "line": 25, + "end_line": 25, + "column": 14, + "end_column": 20 }, "wtype": { "_type": "WType", - "name": "asset", + "name": "account", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "name": "asset" + "name": "seller" } } }, "op": "and", "right": { - "_type": "BytesComparisonExpression", + "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", "line": 23, @@ -877,14 +785,14 @@ }, "wtype": { "_type": "WType", - "name": "account", + "name": "asset", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, "op_code": "gtxns", "immediates": [ - "AssetCloseTo" + "XferAsset" ], "stack_args": [ { @@ -906,32 +814,26 @@ }, "name": "assetTxn" } - ], - "comment": null + ] }, "operator": "==", "rhs": { - "_type": "IntrinsicCall", + "_type": "VarExpression", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 27, - "end_line": 27, - "column": 20, - "end_column": 38 + "line": 26, + "end_line": 26, + "column": 17, + "end_column": 22 }, "wtype": { "_type": "WType", - "name": "account", + "name": "asset", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": 2 }, - "op_code": "global", - "immediates": [ - "ZeroAddress" - ], - "stack_args": [], - "comment": null + "name": "asset" } } }, @@ -970,7 +872,7 @@ }, "op_code": "gtxns", "immediates": [ - "RekeyTo" + "AssetCloseTo" ], "stack_args": [ { @@ -992,18 +894,17 @@ }, "name": "assetTxn" } - ], - "comment": null + ] }, "operator": "==", "rhs": { "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/pre-approved-sale.algo.ts", - "line": 28, - "end_line": 28, - "column": 15, - "end_column": 33 + "line": 27, + "end_line": 27, + "column": 20, + "end_column": 38 }, "wtype": { "_type": "WType", @@ -1016,13 +917,95 @@ "immediates": [ "ZeroAddress" ], - "stack_args": [], - "comment": null + "stack_args": [] } } + }, + "op": "and", + "right": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 23, + "end_line": 29, + "column": 4, + "end_column": 6 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 23, + "end_line": 29, + "column": 4, + "end_column": 6 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "gtxns", + "immediates": [ + "RekeyTo" + ], + "stack_args": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 23, + "end_line": 23, + "column": 16, + "end_column": 24 + }, + "wtype": { + "_type": "WGroupTransaction", + "name": "group_transaction_axfer", + "immutable": true, + "ephemeral": false, + "scalar_type": 2, + "transaction_type": 4 + }, + "name": "assetTxn" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/pre-approved-sale.algo.ts", + "line": 28, + "end_line": 28, + "column": 15, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "global", + "immediates": [ + "ZeroAddress" + ], + "stack_args": [] + } } - ], - "comment": "assert target is match for conditions" + }, + "error_message": "assert target is match for conditions" } }, { diff --git a/tests/approvals/out/prefix-postfix-operators/prefix-postfix-operators.awst.json b/tests/approvals/out/prefix-postfix-operators/prefix-postfix-operators.awst.json index 6e1808dc..6728ba7a 100644 --- a/tests/approvals/out/prefix-postfix-operators/prefix-postfix-operators.awst.json +++ b/tests/approvals/out/prefix-postfix-operators/prefix-postfix-operators.awst.json @@ -1000,8 +1000,7 @@ }, "name": "y" } - ], - "comment": null + ] } } } diff --git a/tests/approvals/out/property-ordering/property-ordering.awst.json b/tests/approvals/out/property-ordering/property-ordering.awst.json index 572da091..2346d0d1 100644 --- a/tests/approvals/out/property-ordering/property-ordering.awst.json +++ b/tests/approvals/out/property-ordering/property-ordering.awst.json @@ -937,8 +937,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, diff --git a/tests/approvals/out/shadowed-variables/shadowed-variables.awst b/tests/approvals/out/shadowed-variables/shadowed-variables.awst index 31daf2f6..e9d9f4e4 100644 --- a/tests/approvals/out/shadowed-variables/shadowed-variables.awst +++ b/tests/approvals/out/shadowed-variables/shadowed-variables.awst @@ -6,16 +6,16 @@ contract ShadowedVariablesAlgo this.constructor() } [b, u, f]: readonlytuple[bytes, uint64, bool] = this.getValues() - assert("123" == b) + assert("123" == b, comment=a should be module const (bytes)) a: uint64 = u - assert(a == 123) + assert(a == 123, comment=a should be local const (uint)) a₁: bool = f - assert(!a₁) + assert(!a₁, comment=a should be local let (bool)) a₁: bool = !a₁ - assert(a₁) - assert(a₁) - assert(a == 123) - assert("123" == "123") + assert(a₁, comment=a should be modified local let (bool)) + assert(a₁, comment=a should still be modified local let (bool)) + assert(a == 123, comment=a should be local const (uint)) + assert("123" == "123", comment=a should be module const (bytes)) return True } diff --git a/tests/approvals/out/shadowed-variables/shadowed-variables.awst.json b/tests/approvals/out/shadowed-variables/shadowed-variables.awst.json index 0dc77dd2..c3b4e421 100644 --- a/tests/approvals/out/shadowed-variables/shadowed-variables.awst.json +++ b/tests/approvals/out/shadowed-variables/shadowed-variables.awst.json @@ -107,8 +107,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -334,7 +333,7 @@ "end_column": 55 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 9, @@ -349,66 +348,62 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 9, + "end_line": 9, + "column": 11, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 4, + "end_line": 4, + "column": 16, + "end_column": 21 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "F)}j", + "encoding": "utf8" + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 9, "end_line": 9, - "column": 11, + "column": 17, "end_column": 18 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 4, - "end_line": 4, - "column": 16, - "end_column": 21 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "F)}j", - "encoding": "utf8" + "scalar_type": 1 }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 9, - "end_line": 9, - "column": 17, - "end_column": 18 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "b" - } + "name": "b" } - ], - "comment": "a should be module const (bytes)" + }, + "error_message": "a should be module const (bytes)" } }, { @@ -477,7 +472,7 @@ "end_column": 57 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 12, @@ -492,66 +487,62 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 12, + "end_line": 12, + "column": 13, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 12, "end_line": 12, "column": 13, - "end_column": 22 + "end_column": 14 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 12, - "end_line": 12, - "column": 13, - "end_column": 14 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" + "name": "a" + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 12, + "end_line": 12, + "column": 19, + "end_column": 22 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 12, - "end_line": 12, - "column": 19, - "end_column": 22 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "123", - "teal_alias": null - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "123", + "teal_alias": null } - ], - "comment": "a should be local const (uint)" + }, + "error_message": "a should be local const (uint)" } }, { @@ -620,7 +611,7 @@ "end_column": 50 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 15, @@ -635,16 +626,29 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "Not", + "condition": { + "_type": "Not", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 15, + "end_line": 15, + "column": 15, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 15, "end_line": 15, - "column": 15, + "column": 16, "end_column": 17 }, "wtype": { @@ -654,27 +658,10 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 15, - "end_line": 15, - "column": 16, - "end_column": 17 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a₁" - } + "name": "a₁" } - ], - "comment": "a should be local let (bool)" + }, + "error_message": "a should be local let (bool)" } }, { @@ -760,7 +747,7 @@ "end_column": 60 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 18, @@ -775,29 +762,25 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 18, - "end_line": 18, - "column": 17, - "end_column": 18 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a₁" - } - ], - "comment": "a should be modified local let (bool)" + "condition": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 18, + "end_line": 18, + "column": 17, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a₁" + }, + "error_message": "a should be modified local let (bool)" } } ], @@ -814,7 +797,7 @@ "end_column": 64 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 20, @@ -829,29 +812,25 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 20, - "end_line": 20, - "column": 15, - "end_column": 16 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a₁" - } - ], - "comment": "a should still be modified local let (bool)" + "condition": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 20, + "end_line": 20, + "column": 15, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a₁" + }, + "error_message": "a should still be modified local let (bool)" } } ], @@ -868,7 +847,7 @@ "end_column": 57 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 22, @@ -883,66 +862,62 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "NumericComparisonExpression", + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 22, + "end_line": 22, + "column": 13, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 22, "end_line": 22, "column": 13, - "end_column": 22 + "end_column": 14 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "lhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 22, - "end_line": 22, - "column": 13, - "end_column": 14 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" + "name": "a" + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 22, + "end_line": 22, + "column": 19, + "end_column": 22 }, - "operator": "==", - "rhs": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 22, - "end_line": 22, - "column": 19, - "end_column": 22 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": "123", - "teal_alias": null - } + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "123", + "teal_alias": null } - ], - "comment": "a should be local const (uint)" + }, + "error_message": "a should be local const (uint)" } } ], @@ -959,7 +934,7 @@ "end_column": 66 }, "expr": { - "_type": "IntrinsicCall", + "_type": "AssertExpression", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 24, @@ -974,67 +949,63 @@ "ephemeral": false, "scalar_type": null }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 24, + "end_line": 24, + "column": 11, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/shadowed-variables.algo.ts", + "line": 4, + "end_line": 4, + "column": 16, + "end_column": 21 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "F)}j", + "encoding": "utf8" + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", "source_location": { "file": "tests/approvals/shadowed-variables.algo.ts", "line": 24, "end_line": 24, - "column": 11, - "end_column": 29 + "column": 23, + "end_column": 28 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 4, - "end_line": 4, - "column": 16, - "end_column": 21 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "F)}j", - "encoding": "utf8" + "scalar_type": 1 }, - "operator": "==", - "rhs": { - "_type": "BytesConstant", - "source_location": { - "file": "tests/approvals/shadowed-variables.algo.ts", - "line": 24, - "end_line": 24, - "column": 23, - "end_column": 28 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": "F)}j", - "encoding": "utf8" - } + "value": "F)}j", + "encoding": "utf8" } - ], - "comment": "a should be module const (bytes)" + }, + "error_message": "a should be module const (bytes)" } }, { diff --git a/tests/approvals/out/strings/strings.awst.json b/tests/approvals/out/strings/strings.awst.json index ed2f873f..3839f298 100644 --- a/tests/approvals/out/strings/strings.awst.json +++ b/tests/approvals/out/strings/strings.awst.json @@ -109,8 +109,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, @@ -425,8 +424,7 @@ }, "name": "b" } - ], - "comment": null + ] } } ], diff --git a/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json b/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json index a4a7c6b1..f0afc366 100644 --- a/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json +++ b/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json @@ -345,8 +345,7 @@ "immediates": [ "ApplicationID" ], - "stack_args": [], - "comment": null + "stack_args": [] } } }, From dfad42caad4ffa6e09fe17359c7c48c2a270f2e9 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Wed, 27 Nov 2024 12:06:42 -0800 Subject: [PATCH 17/30] feat: Include option for outputting arc56 json files --- src/cli.ts | 6 + src/puya/options.ts | 3 + tests/approvals.spec.ts | 1 + .../abi-decorators/AbiDecorators.arc56.json | 190 ++++++++++ .../out/accounts/AccountsContract.arc56.json | 348 ++++++++++++++++++ .../out/arc4-struct/StructDemo.arc56.json | 170 +++++++++ .../BaseWithAbiCreate.arc56.json | 82 +++++ .../BaseWithBareCreate.arc56.json | 61 +++ .../ExplicitAbiCreateFromBase.arc56.json | 82 +++++ .../ExplicitBareCreateFromBase.arc56.json | 61 +++ .../out/implicit-create/NoBare.arc56.json | 90 +++++ .../out/implicit-create/NoNoOp.arc56.json | 69 ++++ .../ConcreteArc4Contract.arc56.json | 123 +++++++ .../out/local-state/LocalStateDemo.arc56.json | 232 ++++++++++++ .../out/named-types/MyContract.arc56.json | 222 +++++++++++ .../out/strings/StringContract.arc56.json | 122 ++++++ 16 files changed, 1862 insertions(+) create mode 100644 tests/approvals/out/abi-decorators/AbiDecorators.arc56.json create mode 100644 tests/approvals/out/accounts/AccountsContract.arc56.json create mode 100644 tests/approvals/out/arc4-struct/StructDemo.arc56.json create mode 100644 tests/approvals/out/implicit-create/BaseWithAbiCreate.arc56.json create mode 100644 tests/approvals/out/implicit-create/BaseWithBareCreate.arc56.json create mode 100644 tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.arc56.json create mode 100644 tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.arc56.json create mode 100644 tests/approvals/out/implicit-create/NoBare.arc56.json create mode 100644 tests/approvals/out/implicit-create/NoNoOp.arc56.json create mode 100644 tests/approvals/out/inheritance-b/ConcreteArc4Contract.arc56.json create mode 100644 tests/approvals/out/local-state/LocalStateDemo.arc56.json create mode 100644 tests/approvals/out/named-types/MyContract.arc56.json create mode 100644 tests/approvals/out/strings/StringContract.arc56.json diff --git a/src/cli.ts b/src/cli.ts index bcb5481f..e3db5554 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -20,6 +20,7 @@ const cliOptionsSchema = z.object({ // Puya options outputTeal: z.boolean(), outputArc32: z.boolean(), + outputArc56: z.boolean(), outputSsaIr: z.boolean(), outputOptimizationIr: z.boolean(), outputDestructuredIr: z.boolean(), @@ -61,6 +62,11 @@ function cli() { 'Do not output {contract}.arc32.json ARC-32 app spec file. Only applicable to ARC4 contracts', ).default(defaultPuyaOptions.outputArc32), ) + .addOption( + new Option('--output-arc56', 'Output {contract}.arc56.json ARC-56 app spec file. Only applicable to ARC4 contracts').default( + defaultPuyaOptions.outputArc56, + ), + ) .addOption(new Option('--output-ssa-ir', 'Output IR (in SSA form) before optimisations').default(defaultPuyaOptions.outputSsaIr)) .addOption(new Option('--output-optimization-ir', 'Output IR after each optimization').default(defaultPuyaOptions.outputOptimizationIr)) .addOption( diff --git a/src/puya/options.ts b/src/puya/options.ts index 0c45aad8..f268b613 100644 --- a/src/puya/options.ts +++ b/src/puya/options.ts @@ -8,6 +8,7 @@ export type CompilationSetMapping = Record export const defaultPuyaOptions: PuyaPassThroughOptions = { outputTeal: true, outputArc32: true, + outputArc56: true, outputSsaIr: false, outputOptimizationIr: false, outputDestructuredIr: false, @@ -26,6 +27,7 @@ export type PuyaPassThroughOptions = Omit export class PuyaOptions { outputTeal: boolean outputArc32: boolean + outputArc56: boolean outputSsaIr: boolean outputOptimizationIr: boolean outputDestructuredIr: boolean @@ -50,6 +52,7 @@ export class PuyaOptions { this.compilationSet = compilationSet this.outputTeal = passThroughOptions.outputTeal this.outputArc32 = passThroughOptions.outputArc32 + this.outputArc56 = passThroughOptions.outputArc56 this.outputSsaIr = passThroughOptions.outputSsaIr this.outputOptimizationIr = passThroughOptions.outputOptimizationIr this.outputDestructuredIr = passThroughOptions.outputDestructuredIr diff --git a/tests/approvals.spec.ts b/tests/approvals.spec.ts index bcad0395..20a3d172 100644 --- a/tests/approvals.spec.ts +++ b/tests/approvals.spec.ts @@ -22,6 +22,7 @@ describe('Approvals', () => { optimizationLevel: 0, outputTeal: true, outputArc32: true, + outputArc56: true, }, ) invariant(result.ast, 'Compilation must result in ast') diff --git a/tests/approvals/out/abi-decorators/AbiDecorators.arc56.json b/tests/approvals/out/abi-decorators/AbiDecorators.arc56.json new file mode 100644 index 00000000..e95fb14e --- /dev/null +++ b/tests/approvals/out/abi-decorators/AbiDecorators.arc56.json @@ -0,0 +1,190 @@ +{ + "name": "AbiDecorators", + "structs": {}, + "methods": [ + { + "name": "justNoop", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "createMethod", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "allActions", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp", + "OptIn", + "CloseOut", + "DeleteApplication", + "UpdateApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "overrideReadonlyName", + "args": [], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": true, + "events": [], + "recommendations": {} + }, + { + "name": "methodWithDefaults", + "args": [ + { + "type": "uint64", + "name": "a", + "defaultValue": { + "source": "global", + "data": "Z2xvYmFsVmFsdWU=", + "type": "AVMString" + } + }, + { + "type": "uint64", + "name": "b", + "defaultValue": { + "source": "method", + "data": "readonly()uint64" + } + }, + { + "type": "uint64", + "name": "c" + } + ], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 1, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "globalValue": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "Z2xvYmFsVmFsdWU=" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 108, + 123, + 148, + 168 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 128 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 113, + 138, + 153, + 173 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "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C0+IHVpbnQ2NDoKbWV0aG9kV2l0aERlZmF1bHRzOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FiaS1kZWNvcmF0b3JzLmFsZ28udHM6MTgtMTkKICAgIC8vIEBhYmltZXRob2QoeyBkZWZhdWx0QXJndW1lbnRzOiB7IGE6IHsgZnJvbTogJ2dsb2JhbFZhbHVlJyB9LCBiOiB7IGZyb206ICdyZWFkb25seScgfSwgYzogeyBjb25zdGFudDogMTQ1IH0gfSB9KQogICAgLy8gcHVibGljIG1ldGhvZFdpdGhEZWZhdWx0cyhhOiB1aW50NjQsIGI6IHVpbnQ2NCwgYzogdWludDY0KTogdWludDY0IHsKICAgIHByb3RvIDMgMQogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FiaS1kZWNvcmF0b3JzLmFsZ28udHM6MjAKICAgIC8vIHJldHVybiBhICogYiArIGMKICAgIGZyYW1lX2RpZyAtMwogICAgZnJhbWVfZGlnIC0yCiAgICAqCiAgICBmcmFtZV9kaWcgLTEKICAgICsKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWJpLWRlY29yYXRvcnMuYWxnby50czo6QWJpRGVjb3JhdG9ycy5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/accounts/AccountsContract.arc56.json b/tests/approvals/out/accounts/AccountsContract.arc56.json new file mode 100644 index 00000000..16ff0c23 --- /dev/null +++ b/tests/approvals/out/accounts/AccountsContract.arc56.json @@ -0,0 +1,348 @@ +{ + "name": "AccountsContract", + "structs": { + "getAccountInfoResult": [ + { + "name": "bytes", + "type": "byte[]" + }, + { + "name": "balance", + "type": "uint64" + }, + { + "name": "minBalance", + "type": "uint64" + }, + { + "name": "authAddress", + "type": "byte[]" + }, + { + "name": "totalNumUint", + "type": "uint64" + }, + { + "name": "totalNumByteSlice", + "type": "uint64" + }, + { + "name": "totalExtraAppPages", + "type": "uint64" + }, + { + "name": "totalAppsCreated", + "type": "uint64" + }, + { + "name": "totalAppsOptedIn", + "type": "uint64" + }, + { + "name": "totalAssetsCreated", + "type": "uint64" + }, + { + "name": "totalAssets", + "type": "uint64" + }, + { + "name": "totalBoxes", + "type": "uint64" + }, + { + "name": "totalBoxBytes", + "type": "uint64" + }, + { + "name": "isOptInApp", + "type": "bool" + }, + { + "name": "isOptInAsset", + "type": "bool" + } + ] + }, + "methods": [ + { + "name": "getAccountInfo", + "args": [ + { + "type": "account", + "name": "account" + }, + { + "type": "asset", + "name": "asset" + } + ], + "returns": { + "type": "(byte[],uint64,uint64,byte[],uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,bool,bool)", + "struct": "getAccountInfoResult" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 61 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 302, + 309, + 316, + 323, + 330, + 337, + 344, + 351, + 358, + 365, + 372, + 379, + 384, + 391, + 398, + 405, + 412, + 419, + 426, + 433, + 440, + 447, + 454, + 461, + 468, + 473, + 480, + 487, + 494, + 501, + 508, + 515, + 522, + 529, + 536, + 543, + 550, + 557, + 562, + 569, + 576, + 583, + 590, + 597, + 604, + 611, + 618, + 625, + 632, + 639, + 646, + 651, + 658, + 665, + 672, + 679, + 686, + 693, + 700, + 707, + 714, + 721, + 728, + 735, + 740, + 747, + 754, + 761, + 768, + 775, + 782, + 789, + 796, + 803, + 810, + 817, + 824, + 829, + 836, + 843, + 850, + 857, + 864, + 871, + 878, + 885, + 892, + 899, + 906, + 913, + 918, + 925, + 932, + 939, + 946, + 953, + 960, + 967, + 974, + 981, + 988, + 995, + 1002, + 1007, + 1014, + 1021, + 1028, + 1035, + 1042, + 1049, + 1056, + 1063, + 1070, + 1077, + 1084, + 1091, + 1096, + 1103, + 1110, + 1117, + 1124, + 1131, + 1138, + 1145, + 1152, + 1159, + 1166, + 1173, + 1180, + 1185, + 1192, + 1199, + 1206, + 1213, + 1220, + 1227, + 1234, + 1241, + 1248, + 1255, + 1262, + 1269, + 1274, + 1281, + 1288, + 1295, + 1302, + 1309, + 1316, + 1323, + 1330, + 1337, + 1344, + 1351, + 1358, + 1363, + 1370, + 1377, + 1384, + 1391, + 1398, + 1405, + 1412, + 1419, + 1426, + 1433, + 1440, + 1447, + 1460, + 1467, + 1474, + 1481, + 1488, + 1495, + 1502, + 1509, + 1516, + 1523, + 1530, + 1537 + ], + "errorMessage": "account funded" + }, + { + "pc": [ + 278 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 66 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo6QWNjb3VudHNDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxIDkzCiAgICBieXRlY2Jsb2NrIDB4MDAgMHgwNjgxMDEKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0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jb3ZlciAzCiAgICBjb3ZlciAyCiAgICBzd2FwCiAgICBkdXAKICAgIGxlbgogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIHN3YXAKICAgIGNvbmNhdAogICAgY292ZXIgMTEKICAgIGl0b2IKICAgIGNvdmVyIDEyCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgZHVwCiAgICBsZW4KICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBzd2FwCiAgICBjb25jYXQKICAgIGNvdmVyIDE0CiAgICBpdG9iCiAgICBjb3ZlciA5CiAgICBpdG9iCiAgICBjb3ZlciAxMAogICAgaXRvYgogICAgY292ZXIgMTEKICAgIGl0b2IKICAgIGNvdmVyIDExCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgaXRvYgogICAgY292ZXIgMTIKICAgIGl0b2IKICAgIGNvdmVyIDEyCiAgICBpdG9iCiAgICBjb3ZlciAxMgogICAgc3dhcAogICAgaXRvYgogICAgY292ZXIgMTIKICAgIGJ5dGVjXzAgLy8gMHgwMAogICAgaW50Y18wIC8vIDAKICAgIHVuY292ZXIgOQogICAgc2V0Yml0CiAgICBjb3ZlciAxMQogICAgYnl0ZWNfMCAvLyAweDAwCiAgICBpbnRjXzAgLy8gMAogICAgdW5jb3ZlciAxNQogICAgc2V0Yml0CiAgICBjb3ZlciA5CiAgICBpbnRjXzIgLy8gOTMKICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBwdXNoYnl0ZXMgMHgKICAgIHN3YXAKICAgIGNvbmNhdAogICAgZGlnIDEKICAgIGxlbgogICAgaW50Y18yIC8vIDkzCiAgICArCiAgICBzd2FwCiAgICB1bmNvdmVyIDQKICAgIGNvbmNhdAogICAgdW5jb3ZlciA1CiAgICBjb25jYXQKICAgIHN3YXAKICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBjb25jYXQKICAgIHVuY292ZXIgMgogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmN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KICAgIGZyYW1lX2RpZyAtMQogICAgbWF0Y2ggZW5zdXJlX2J1ZGdldF9zd2l0Y2hfY2FzZV8wQDMgZW5zdXJlX2J1ZGdldF9zd2l0Y2hfY2FzZV8xQDQKICAgIGIgZW5zdXJlX2J1ZGdldF9zd2l0Y2hfY2FzZV9kZWZhdWx0QDUKCmVuc3VyZV9idWRnZXRfc3dpdGNoX2Nhc2VfMEAzOgogICAgaW50Y18wIC8vIDAKICAgIGl0eG5fZmllbGQgRmVlCiAgICBiIGVuc3VyZV9idWRnZXRfc3dpdGNoX2Nhc2VfbmV4dEA2CgplbnN1cmVfYnVkZ2V0X3N3aXRjaF9jYXNlXzFANDoKICAgIGdsb2JhbCBNaW5UeG5GZWUKICAgIGl0eG5fZmllbGQgRmVlCiAgICBiIGVuc3VyZV9idWRnZXRfc3dpdGNoX2Nhc2VfbmV4dEA2CgplbnN1cmVfYnVkZ2V0X3N3aXRjaF9jYXNlX2RlZmF1bHRANToKCmVuc3VyZV9idWRnZXRfc3dpdGNoX2Nhc2VfbmV4dEA2OgogICAgaXR4bl9zdWJtaXQKICAgIGIgZW5zdXJlX2J1ZGdldF93aGlsZV90b3BAMQoKZW5zdXJlX2J1ZGdldF9hZnRlcl93aGlsZUA3OgogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYWNjb3VudHMuYWxnby50czo6QWNjb3VudHNDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/arc4-struct/StructDemo.arc56.json b/tests/approvals/out/arc4-struct/StructDemo.arc56.json new file mode 100644 index 00000000..7f8be573 --- /dev/null +++ b/tests/approvals/out/arc4-struct/StructDemo.arc56.json @@ -0,0 +1,170 @@ +{ + "name": "StructDemo", + "structs": { + "Vector": [ + { + "name": "x", + "type": "uint64" + }, + { + "name": "y", + "type": "uint64" + } + ] + }, + "methods": [ + { + "name": "testVectorCreationAndEquality", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "addVectors", + "args": [ + { + "type": "(uint64,uint64)", + "struct": "Vector", + "name": "v1" + }, + { + "type": "(uint64,uint64)", + "struct": "Vector", + "name": "v2" + } + ], + "returns": { + "type": "(uint64,uint64)", + "struct": "Vector" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "implicitCastingAndSpreading", + "args": [ + { + "type": "(uint64,uint64)", + "struct": "Vector", + "name": "v1" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 178, + 183, + 200, + 206, + 214, + 220, + 238, + 243, + 253, + 258 + ], + "errorMessage": "Index access is out of bounds" + }, + { + "pc": [ + 82, + 97, + 127 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 159 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 87, + 102, + 132 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1zdHJ1Y3QuYWxnby50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0Q3JlYXRlOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6OQogICAgLy8gY2xhc3MgU3RydWN0RGVtbyBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1zdHJ1Y3QuYWxnby50czo6U3RydWN0RGVtby5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/BaseWithAbiCreate.arc56.json b/tests/approvals/out/implicit-create/BaseWithAbiCreate.arc56.json new file mode 100644 index 00000000..dcb2da2d --- /dev/null +++ b/tests/approvals/out/implicit-create/BaseWithAbiCreate.arc56.json @@ -0,0 +1,82 @@ +{ + "name": "BaseWithAbiCreate", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 51 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 56 + ], + "errorMessage": "can only call when creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY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2l0aEFiaUNyZWF0ZS5jcmVhdGUoKSAtPiB2b2lkOgpjcmVhdGU6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6MTgtMTkKICAgIC8vIEBhYmltZXRob2QoeyBvbkNyZWF0ZTogJ3JlcXVpcmUnIH0pCiAgICAvLyBwdWJsaWMgY3JlYXRlKCkge30KICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2VXaXRoQWJpQ3JlYXRlLmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/BaseWithBareCreate.arc56.json b/tests/approvals/out/implicit-create/BaseWithBareCreate.arc56.json new file mode 100644 index 00000000..a6490965 --- /dev/null +++ b/tests/approvals/out/implicit-create/BaseWithBareCreate.arc56.json @@ -0,0 +1,61 @@ +{ + "name": "BaseWithBareCreate", + "structs": {}, + "methods": [], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 48 + ], + "errorMessage": "can only call when creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc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0ZW5kcyBDb250cmFjdCB7CiAgICBpbnRjXzAgLy8gMAogICAgcmV0c3ViCgoKLy8gdGVzdHMvYXBwcm92YWxzL2ltcGxpY2l0LWNyZWF0ZS5hbGdvLnRzOjpCYXNlV2l0aEJhcmVDcmVhdGUuY3JlYXRlKCkgLT4gdm9pZDoKY3JlYXRlOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2ltcGxpY2l0LWNyZWF0ZS5hbGdvLnRzOjE0LTE1CiAgICAvLyBAYmFyZW1ldGhvZCh7IG9uQ3JlYXRlOiAncmVxdWlyZScgfSkKICAgIC8vIHB1YmxpYyBjcmVhdGUoKSB7fQogICAgcHJvdG8gMCAwCiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2VXaXRoQmFyZUNyZWF0ZS5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.arc56.json b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.arc56.json new file mode 100644 index 00000000..07d47af0 --- /dev/null +++ b/tests/approvals/out/implicit-create/ExplicitAbiCreateFromBase.arc56.json @@ -0,0 +1,82 @@ +{ + "name": "ExplicitAbiCreateFromBase", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 58 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 63 + ], + "errorMessage": "can only call when creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkV4cGxpY2l0QWJpQ3JlYXRlRnJvbUJhc2UuYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2ltcGxpY2l0LWNyZWF0ZS5hbGdvLnRzOjpFeHBsaWNpdEFiaUNyZWF0ZUZyb21CYXNlLmNvbnN0cnVjdG9yKCkgLT4gdm9pZDoKY29uc3RydWN0b3I6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6MjMKICAgIC8vIGV4cG9ydCBjbGFzcyBFeHBsaWNpdEFiaUNyZWF0ZUZyb21CYXNlIGV4dGVuZHMgQmFzZVdpdGhBYmlDcmVhdGUge30KICAgIHByb3RvIDAgMAogICAgY2FsbHN1YiB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJhc2VXaXRoQWJpQ3JlYXRlLmNvbnN0cnVjdG9yCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkJh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F1aXJlJyB9KQogICAgLy8gcHVibGljIGNyZWF0ZSgpIHt9CiAgICBwcm90byAwIDAKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkV4cGxpY2l0QWJpQ3JlYXRlRnJvbUJhc2UuY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.arc56.json b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.arc56.json new file mode 100644 index 00000000..172b535f --- /dev/null +++ b/tests/approvals/out/implicit-create/ExplicitBareCreateFromBase.arc56.json @@ -0,0 +1,61 @@ +{ + "name": "ExplicitBareCreateFromBase", + "structs": {}, + "methods": [], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 55 + ], + "errorMessage": "can only call when creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6OkV4cGxpY2l0QmFyZUNyZWF0ZUZyb21CYXNlLmFwcHJvdmFsUHJvZ3JhbToKICAgIGludGNibG9jayAwCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fYWZ0ZXJfaWZfZWxzZUAyCiAg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HVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/NoBare.arc56.json b/tests/approvals/out/implicit-create/NoBare.arc56.json new file mode 100644 index 00000000..22a250fe --- /dev/null +++ b/tests/approvals/out/implicit-create/NoBare.arc56.json @@ -0,0 +1,90 @@ +{ + "name": "NoBare", + "structs": {}, + "methods": [ + { + "name": "handleNoop", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 52 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 81 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 57 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vQmFyZS5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fYWZ0ZXJfaWZfZWxzZUAyCiAgICBjYWxsc3ViIGNvbnN0cnVjdG9yCgptYWluX2FmdGVyX2lmX2Vsc2VAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc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p0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vQmFyZS5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/NoNoOp.arc56.json b/tests/approvals/out/implicit-create/NoNoOp.arc56.json new file mode 100644 index 00000000..d2eafb2f --- /dev/null +++ b/tests/approvals/out/implicit-create/NoNoOp.arc56.json @@ -0,0 +1,69 @@ +{ + "name": "NoNoOp", + "structs": {}, + "methods": [], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [ + "UpdateApplication" + ] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 64 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 54 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW1wbGljaXQtY3JlYXRlLmFsZ28udHM6Ok5vTm9PcC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fYWZ0ZXJfaWZfZWxzZUAyCiAgICBjYWxsc3ViIGNvbnN0cnVjdG9yCgptYWluX2FmdGVyX2lmX2Vsc2VAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RzL2FwcHJvdmFscy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cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/inheritance-b/ConcreteArc4Contract.arc56.json b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.arc56.json new file mode 100644 index 00000000..2988380d --- /dev/null +++ b/tests/approvals/out/inheritance-b/ConcreteArc4Contract.arc56.json @@ -0,0 +1,123 @@ +{ + "name": "ConcreteArc4Contract", + "structs": {}, + "methods": [ + { + "name": "getVeryImportantValue", + "args": [], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "simpleAbiMethod", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 1, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "someState": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "c29tZVN0YXRl" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 75, + 102 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 144 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 80, + 107 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW5oZXJpdGFuY2UtYi5hbGdvLnRzOjpDb25jcmV0ZUFyYzRDb250cmFjdC5hcHBy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YWxzL2luaGVyaXRhbmNlLWEuYWxnby50czo6QXJjNENvbnRyYWN0LnNpbXBsZUFiaU1ldGhvZChhOiB1aW50NjQsIGI6IHVpbnQ2NCkgLT4gdWludDY0OgpzaW1wbGVBYmlNZXRob2Q6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvaW5oZXJpdGFuY2UtYS5hbGdvLnRzOjE3CiAgICAvLyBwdWJsaWMgc2ltcGxlQWJpTWV0aG9kKGE6IHVpbnQ2NCwgYjogdWludDY0KTogdWludDY0IHsKICAgIHByb3RvIDIgMQogICAgLy8gdGVzdHMvYXBwcm92YWxzL2luaGVyaXRhbmNlLWEuYWxnby50czoxOAogICAgLy8gcmV0dXJuIGEgKyBiCiAgICBmcmFtZV9kaWcgLTIKICAgIGZyYW1lX2RpZyAtMQogICAgKwogICAgcmV0c3ViCgoKLy8gdGVzdHMvYXBwcm92YWxzL2luaGVyaXRhbmNlLWIuYWxnby50czo6Q29uY3JldGVBcmM0Q29udHJhY3QuX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlKCkgLT4gdm9pZDoKX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2luaGVyaXRhbmNlLWIuYWxnby50czoxNAogICAgLy8gZXhwb3J0IGNsYXNzIENvbmNyZXRlQXJjNENvbnRyYWN0IGV4dGVuZHMgQXJjNENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvaW5oZXJpdGFuY2UtYi5hbGdvLnRzOjpDb25jcmV0ZUFyYzRDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/local-state/LocalStateDemo.arc56.json b/tests/approvals/out/local-state/LocalStateDemo.arc56.json new file mode 100644 index 00000000..a244ec5d --- /dev/null +++ b/tests/approvals/out/local-state/LocalStateDemo.arc56.json @@ -0,0 +1,232 @@ +{ + "name": "LocalStateDemo", + "structs": { + "": [ + { + "name": "a", + "type": "uint64" + }, + { + "name": "b", + "type": "byte[]" + } + ], + "getStateResult": [ + { + "name": "localUint", + "type": "uint64" + }, + { + "name": "localUint2", + "type": "uint64" + }, + { + "name": "localBytes", + "type": "byte[]" + }, + { + "name": "localBytes2", + "type": "byte[]" + }, + { + "name": "localEncoded", + "type": "uint64[10]" + } + ] + }, + "methods": [ + { + "name": "setState", + "args": [ + { + "type": "(uint64,byte[])", + "struct": "", + "name": "p" + }, + { + "type": "uint64[10]", + "name": "c" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "getState", + "args": [], + "returns": { + "type": "(uint64,uint64,byte[],byte[],uint64[10])", + "struct": "getStateResult" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "clearState", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 2, + "bytes": 3 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "localUint": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "bDE=" + }, + "localUint2": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "bG9jYWxVaW50Mg==" + }, + "localBytes": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "YjE=" + }, + "localBytes2": { + "keyType": "AVMString", + "valueType": "AVMBytes", + "key": "bG9jYWxCeXRlczI=" + }, + "localEncoded": { + "keyType": "AVMString", + "valueType": "uint64[10]", + "key": "bG9jYWxFbmNvZGVk" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 127 + ], + "errorMessage": "Index access is out of bounds" + }, + { + "pc": [ + 115, + 163, + 249 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 278 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 120, + 168, + 254 + ], + "errorMessage": "can only call when not creating" + }, + { + "pc": [ + 336, + 344, + 352, + 360, + 369, + 377, + 383, + 391, + 399, + 408, + 416, + 424, + 430, + 438, + 447, + 455, + 463, + 471, + 477, + 486, + 494, + 502, + 510, + 518, + 525 + ], + "errorMessage": "check LocalState exists" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbG9jYWwtc3RhdGUuYWxnby50czo6TG9jYWxTdGF0ZURlbW8uYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMSA4IDEwMAogICAgYnl0ZWNibG9jayAibDEiICJsb2NhbFVpbnQyIiAiYjEiICJsb2NhbEJ5dGVzMiIgImxvY2FsRW5jb2RlZCIKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2xvY2FsLXN0YXRlLmFsZ28udHM6OkxvY2FsU3RhdGVEZW1vLmNvbnN0cnVjdG9yKCkgLT4gdm9pZDoKY29uc3RydWN0b3I6CiAgICA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oVHhuLnNlbmRlcikuZGVsZXRlKCkKICAgIGFwcF9sb2NhbF9kZWwKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9sb2NhbC1zdGF0ZS5hbGdvLnRzOjM3CiAgICAvLyB0aGlzLmxvY2FsRW5jb2RlZChUeG4uc2VuZGVyKS5kZWxldGUoKQogICAgdHhuIFNlbmRlcgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2xvY2FsLXN0YXRlLmFsZ28udHM6MTIKICAgIC8vIGxvY2FsRW5jb2RlZCA9IExvY2FsU3RhdGU8U2FtcGxlQXJyYXk+KCkKICAgIGJ5dGVjIDQgLy8gImxvY2FsRW5jb2RlZCIKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9sb2NhbC1zdGF0ZS5hbGdvLnRzOjM3CiAgICAvLyB0aGlzLmxvY2FsRW5jb2RlZChUeG4uc2VuZGVyKS5kZWxldGUoKQogICAgYXBwX2xvY2FsX2RlbAogICAgcmV0c3ViCgoKLy8gdGVzdHMvYXBwcm92YWxzL2xvY2FsLXN0YXRlLmFsZ28udHM6OkxvY2FsU3RhdGVEZW1vLl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZSgpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9sb2NhbC1zdGF0ZS5hbGdvLnRzOjcKICAgIC8vIGV4cG9ydCBjbGFzcyBMb2NhbFN0YXRlRGVtbyBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbG9jYWwtc3RhdGUuYWxnby50czo6TG9jYWxTdGF0ZURlbW8uY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/named-types/MyContract.arc56.json b/tests/approvals/out/named-types/MyContract.arc56.json new file mode 100644 index 00000000..062391c1 --- /dev/null +++ b/tests/approvals/out/named-types/MyContract.arc56.json @@ -0,0 +1,222 @@ +{ + "name": "MyContract", + "structs": { + "XY": [ + { + "name": "x", + "type": "uint64" + }, + { + "name": "y", + "type": "uint64" + } + ], + "YX": [ + { + "name": "y", + "type": "uint64" + }, + { + "name": "x", + "type": "uint64" + } + ], + "getAnonResult": [ + { + "name": "x", + "type": "uint64" + }, + { + "name": "y", + "type": "uint64" + } + ] + }, + "methods": [ + { + "name": "getXY", + "args": [], + "returns": { + "type": "(uint64,uint64)", + "struct": "XY" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "getYX", + "args": [], + "returns": { + "type": "(uint64,uint64)", + "struct": "YX" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "getAnon", + "args": [], + "returns": { + "type": "(uint64,uint64)", + "struct": "getAnonResult" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test", + "args": [ + { + "type": "(uint64,uint64)", + "struct": "XY", + "name": "x" + }, + { + "type": "(uint64,uint64)", + "struct": "YX", + "name": "y" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "testing", + "args": [], + "returns": { + "type": "((uint64,uint64),(uint64,uint64),(uint64,uint64))" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 193, + 198, + 206, + 211 + ], + "errorMessage": "Index access is out of bounds" + }, + { + "pc": [ + 94, + 123, + 152, + 181, + 230 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 369 + ], + "errorMessage": "assert target is match for conditions" + }, + { + "pc": [ + 313 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 99, + 128, + 157, + 186, + 235 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvbmFtZWQtdHlwZXMuYWxnby50czo6TXlDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxIDgKICAgIGJ5dGVjYmxvY2sgMHggMHgxNTFmN2M3NQogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMgogICAgY2FsbHN1YiBjb25zdHJ1Y3RvcgoKbWFpbl9hZnRlcl9pZl9lbHNlQDI6CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9hcHByb3ZhbHMvbmFtZWQtdHlwZXMuYWxnby50czo6TXlDb250cmFjdC5jb25zdHJ1Y3RvcigpIC0+IHZvaWQ6CmNvbnN0cnVjdG9yOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL25hbWVkLXR5cGVzLmFsZ28udHM6MTQKICAgIC8vIGV4cG9ydCBjbGFzcyBNeUNvbnRyYWN0IGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3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250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/strings/StringContract.arc56.json b/tests/approvals/out/strings/StringContract.arc56.json new file mode 100644 index 00000000..84b9862f --- /dev/null +++ b/tests/approvals/out/strings/StringContract.arc56.json @@ -0,0 +1,122 @@ +{ + "name": "StringContract", + "structs": {}, + "methods": [ + { + "name": "join", + "args": [ + { + "type": "string", + "name": "a" + }, + { + "type": "string", + "name": "b" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "interpolate", + "args": [ + { + "type": "string", + "name": "a" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 68, + 107 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 154 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 73, + 112 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvc3RyaW5ncy5hbGdvLnRzOjpTdHJpbmdDb250cmFjdC5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCi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WdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvc3RyaW5ncy5hbGdvLnRzOjpTdHJpbmdDb250cmFjdC5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file From 7845ca1575ae2c13030b853d131bf134738af5ef Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Wed, 27 Nov 2024 15:33:31 -0800 Subject: [PATCH 18/30] feat: Parse jsdoc comments where available and include them in AWST --- examples/hello-world-abi/contract.algo.ts | 23 +- package.json | 2 +- src/awst/wtypes.ts | 4 + src/awst_build/arc4-util.ts | 1 + src/awst_build/ast-visitors/base-visitor.ts | 38 +- .../ast-visitors/contract-visitor.ts | 16 +- .../ast-visitors/function-visitor.ts | 8 +- src/awst_build/eb/storage/box/base.ts | 9 +- src/awst_build/eb/storage/global-state.ts | 9 +- src/awst_build/eb/storage/local-state.ts | 9 +- .../models/app-storage-declaration.ts | 4 +- src/awst_build/ptypes/arc4-types.ts | 6 + src/awst_build/ptypes/index.ts | 7 +- src/awst_build/type-resolver.ts | 19 +- tests/approvals/jsdoc.algo.ts | 44 + .../out/jsdoc/JSDocDemo.approval.teal | 118 ++ .../approvals/out/jsdoc/JSDocDemo.arc32.json | 116 ++ .../approvals/out/jsdoc/JSDocDemo.arc56.json | 156 +++ .../approvals/out/jsdoc/JSDocDemo.clear.teal | 5 + tests/approvals/out/jsdoc/JSDocDemo.ssa.ir | 105 ++ tests/approvals/out/jsdoc/jsdoc.awst | 48 + tests/approvals/out/jsdoc/jsdoc.awst.json | 1218 +++++++++++++++++ 22 files changed, 1936 insertions(+), 29 deletions(-) create mode 100644 tests/approvals/jsdoc.algo.ts create mode 100644 tests/approvals/out/jsdoc/JSDocDemo.approval.teal create mode 100644 tests/approvals/out/jsdoc/JSDocDemo.arc32.json create mode 100644 tests/approvals/out/jsdoc/JSDocDemo.arc56.json create mode 100644 tests/approvals/out/jsdoc/JSDocDemo.clear.teal create mode 100644 tests/approvals/out/jsdoc/JSDocDemo.ssa.ir create mode 100644 tests/approvals/out/jsdoc/jsdoc.awst create mode 100644 tests/approvals/out/jsdoc/jsdoc.awst.json diff --git a/examples/hello-world-abi/contract.algo.ts b/examples/hello-world-abi/contract.algo.ts index f27adf07..cd754ba0 100644 --- a/examples/hello-world-abi/contract.algo.ts +++ b/examples/hello-world-abi/contract.algo.ts @@ -1,18 +1,31 @@ -import { arc4, log } from '@algorandfoundation/algorand-typescript' +import { arc4 } from '@algorandfoundation/algorand-typescript' +/** + * An abstract base class for a simple example contract + */ abstract class Intermediate extends arc4.Contract { + /** + * sayBananas method + * @returns The string "Bananas" + */ @arc4.abimethod({ allowActions: ['NoOp'], readonly: true }) public sayBananas(): string { - const result = `Bananas` - log(result) - return result + return `Bananas` } } +/** + * A simple hello world example contract + */ export default class HelloWorldContract extends Intermediate { + /** + * sayHello method + * @param firstName The first name of the person to greet + * @param lastName THe last name of the person to greet + * @returns The string "Hello {firstName} {lastName"} + */ public sayHello(firstName: string, lastName: string): string { const result = `Hello ${firstName} ${lastName}` - log(result) return result } } diff --git a/package.json b/package.json index 6bcc77e3..6f90c571 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dev:examples": "tsx src/cli.ts build examples --output-awst --output-awst-json", "dev:approvals": "rimraf tests/approvals/out && tsx src/cli.ts build tests/approvals --dry-run", "dev:expected-output": "tsx src/cli.ts build tests/expected-output --dry-run", - "dev:testing": "tsx src/cli.ts build tests/approvals/arc4-types.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level debug --out-dir out/[name]", + "dev:testing": "tsx src/cli.ts build tests/approvals/jsdoc.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name]", "audit": "better-npm-audit audit", "format": "prettier --write .", "lint": "eslint \"src/**/*.ts\"", diff --git a/src/awst/wtypes.ts b/src/awst/wtypes.ts index 0c7bb00f..c8b4484f 100644 --- a/src/awst/wtypes.ts +++ b/src/awst/wtypes.ts @@ -251,15 +251,18 @@ export namespace wtypes { fields: Record sourceLocation: SourceLocation | null frozen: boolean + desc: string | null constructor({ fields, sourceLocation, name, + desc, frozen, }: { frozen: boolean name: string + desc: string | null fields: Record sourceLocation?: SourceLocation }) { @@ -273,6 +276,7 @@ export namespace wtypes { this.sourceLocation = sourceLocation ?? null this.fields = fields this.frozen = frozen + this.desc = desc } } export class ARC4Tuple extends ARC4Type { diff --git a/src/awst_build/arc4-util.ts b/src/awst_build/arc4-util.ts index 090db561..1a720605 100644 --- a/src/awst_build/arc4-util.ts +++ b/src/awst_build/arc4-util.ts @@ -61,6 +61,7 @@ export function ptypeToArc4EncodedType(ptype: PType, sourceLocation: SourceLocat return new ARC4StructType({ name: ptype.name, module: ptype.module, + description: ptype.description, fields: Object.fromEntries(ptype.orderedProperties().map(([p, pt]) => [p, ptypeToArc4EncodedType(pt, sourceLocation)])), }) diff --git a/src/awst_build/ast-visitors/base-visitor.ts b/src/awst_build/ast-visitors/base-visitor.ts index 9e3237da..b6bf064b 100644 --- a/src/awst_build/ast-visitors/base-visitor.ts +++ b/src/awst_build/ast-visitors/base-visitor.ts @@ -1,6 +1,6 @@ import ts from 'typescript' import { nodeFactory } from '../../awst/node-factory' -import type { Expression, LValue, Statement } from '../../awst/nodes' +import type { Expression, LValue, MethodDocumentation, Statement } from '../../awst/nodes' import type { SourceLocation } from '../../awst/source-location' import { CodeError, NotSupported, TodoError } from '../../errors' import { logger } from '../../logger' @@ -554,6 +554,7 @@ export abstract class BaseVisitor implements Visitor { return new ObjectPType({ name: targetType.name, module: targetType.module, + description: targetType.description, properties: Object.fromEntries( sourceType .orderedProperties() @@ -670,4 +671,39 @@ export abstract class BaseVisitor implements Visitor { isPublic, } } + + protected getNodeDescription(node: ts.Node): string | null { + const docs = ts.getJSDocCommentsAndTags(node) + for (const doc of docs) { + if (ts.isJSDoc(doc)) { + return ts.getTextOfJSDocComment(doc.comment) ?? null + } + } + return null + } + + protected getMethodDocumentation(node: ts.FunctionDeclaration | ts.MethodDeclaration | ts.ConstructorDeclaration): MethodDocumentation { + const docs = Array.from(ts.getJSDocCommentsAndTags(node)) + let description: string | null = null + const args = new Map() + let returns: string | null = null + for (const doc of docs) { + if (ts.isJSDoc(doc)) { + description = ts.getTextOfJSDocComment(doc.comment) ?? null + if (doc.tags) docs.push(...doc.tags) + } else if (ts.isJSDocParameterTag(doc)) { + const paramName = this.textVisitor.accept(doc.name) + const paramComment = ts.getTextOfJSDocComment(doc.comment) + + args.set(paramName, paramComment ?? '') + } else if (ts.isJSDocReturnTag(doc)) { + returns = ts.getTextOfJSDocComment(doc.comment) ?? null + } + } + return nodeFactory.methodDocumentation({ + description, + args, + returns, + }) + } } diff --git a/src/awst_build/ast-visitors/contract-visitor.ts b/src/awst_build/ast-visitors/contract-visitor.ts index 8ef2911e..687a88a9 100644 --- a/src/awst_build/ast-visitors/contract-visitor.ts +++ b/src/awst_build/ast-visitors/contract-visitor.ts @@ -65,7 +65,7 @@ export class ContractVisitor extends BaseVisitor implements Visitor ContractReference.fromPType(bt)), - description: null, + description: this.getNodeDescription(classDec), approvalProgram: this._contractPType.isARC4 ? null : this._approvalProgram, clearProgram: this._clearStateProgram, reservedScratchSpace: new Set(), @@ -165,7 +165,12 @@ export class ContractVisitor extends BaseVisitor implements Visitor extends InstanceExpressionBuilder { - buildStorageDeclaration(memberName: string, memberLocation: SourceLocation, contractType: ContractClassPType): AppStorageDeclaration { + buildStorageDeclaration( + memberName: string, + memberLocation: SourceLocation, + memberDescription: string | null, + contractType: ContractClassPType, + ): AppStorageDeclaration { codeInvariant( this._expr instanceof BytesConstant, `key${this.ptype instanceof BoxMapPType ? ' prefix' : ''} must be a compile time constant value if ${this.typeDescription} is assigned to a contract member`, @@ -21,7 +26,7 @@ export abstract class BoxProxyExpressionBuilder< ptype: this.ptype, memberName: memberName, keyOverride: this._expr ?? null, - description: null, + description: memberDescription, definedIn: contractType, }) } diff --git a/src/awst_build/eb/storage/global-state.ts b/src/awst_build/eb/storage/global-state.ts index 973049aa..acc26eb8 100644 --- a/src/awst_build/eb/storage/global-state.ts +++ b/src/awst_build/eb/storage/global-state.ts @@ -108,7 +108,12 @@ export class GlobalStateFunctionResultBuilder extends InstanceBuilder readonly sourceLocation: SourceLocation | undefined @@ -109,10 +110,12 @@ export class ARC4StructType extends ARC4EncodedType { name, module, fields, + description, sourceLocation, }: { name: string module: string + description: string | undefined fields: Record sourceLocation?: SourceLocation }) { @@ -120,6 +123,7 @@ export class ARC4StructType extends ARC4EncodedType { this.name = name this.module = module this.fields = fields + this.description = description this.sourceLocation = sourceLocation } @@ -132,6 +136,7 @@ export class ARC4StructType extends ARC4EncodedType { name: this.name, fields: Object.fromEntries(Object.entries(this.fields).map(([f, t]) => [f, t.wtype])), sourceLocation: this.sourceLocation, + desc: this.description ?? null, frozen: false, }) } @@ -154,6 +159,7 @@ export const arc4StructBaseType = new ARC4StructType({ name: 'StructBase', module: Constants.arc4EncodedTypesModuleName, fields: {}, + description: undefined, }) export const Arc4TupleClass = new LibClassType({ diff --git a/src/awst_build/ptypes/index.ts b/src/awst_build/ptypes/index.ts index 094b2798..2998a60a 100644 --- a/src/awst_build/ptypes/index.ts +++ b/src/awst_build/ptypes/index.ts @@ -501,6 +501,7 @@ export class FunctionPType extends PType { name: `${props.name}Result`, module: props.module, properties: props.returnType.properties, + description: props.returnType.description, }) } else { this.returnType = props.returnType @@ -617,12 +618,13 @@ export class ArrayPType extends TransientType { } type ObjectPTypeArgs = - | { module: string; name: string; properties: Record; isAnonymous?: false } - | { module?: undefined; name?: undefined; properties: Record; isAnonymous: true } + | { module: string; name: string; description: string | undefined; properties: Record; isAnonymous?: false } + | { module?: undefined; name?: undefined; properties: Record; isAnonymous: true; description?: undefined } export class ObjectPType extends PType { readonly name: string readonly module: string + readonly description: string | undefined readonly properties: Record readonly singleton = false readonly isAnonymous: boolean @@ -633,6 +635,7 @@ export class ObjectPType extends PType { this.module = props.module ?? '' this.properties = props.properties this.isAnonymous = props.isAnonymous ?? false + this.description = props.description } static anonymous(props: Record | Array<[string, PType]>) { diff --git a/src/awst_build/type-resolver.ts b/src/awst_build/type-resolver.ts index a006c7ae..717a729a 100644 --- a/src/awst_build/type-resolver.ts +++ b/src/awst_build/type-resolver.ts @@ -263,7 +263,6 @@ export class TypeResolver { private reflectObjectType(tsType: ts.Type, sourceLocation: SourceLocation): ObjectPType { const typeAlias = tsType.aliasSymbol ? this.getSymbolFullName(tsType.aliasSymbol, sourceLocation) : undefined - const properties: Record = {} for (const prop of tsType.getProperties()) { if (prop.name.startsWith('__@')) { @@ -280,7 +279,7 @@ export class TypeResolver { } } if (typeAlias) { - return new ObjectPType({ ...typeAlias, properties }) + return new ObjectPType({ ...typeAlias, properties, description: tryGetTypeDescription(tsType) }) } return ObjectPType.anonymous(properties) } @@ -322,13 +321,14 @@ export class TypeResolver { module: typeName.module, }) } + private reflectStructType( typeName: SymbolName, tsType: ts.Type, baseType: ARC4StructType, sourceLocation: SourceLocation, ): ARC4StructType { - const ignoredProps = ['bytes', '__type', 'equals', Constants.constructorMethodName] + const ignoredProps = ['bytes', 'equals', Constants.constructorMethodName] const fields: Record = {} for (const prop of tsType.getProperties()) { if (isIn(prop.name, ignoredProps)) continue @@ -345,6 +345,7 @@ export class TypeResolver { ...typeName, fields: fields, sourceLocation: sourceLocation, + description: tryGetTypeDescription(tsType), }) } @@ -442,3 +443,15 @@ function isIntersectionType(tsType: ts.Type): tsType is ts.IntersectionType { function isInstantiationExpression(tsType: ts.Type): tsType is ts.Type & { node: ts.ExpressionWithTypeArguments } { return isObjectType(tsType) && hasFlags(tsType.objectFlags, ObjectFlags.InstantiationExpressionType) } + +function tryGetTypeDescription(tsType: ts.Type): string | undefined { + const dec = tsType.aliasSymbol?.valueDeclaration ?? tsType.symbol.valueDeclaration + if (!dec) return undefined + const docs = ts.getJSDocCommentsAndTags(dec) + for (const doc of docs) { + if (ts.isJSDoc(doc)) { + return ts.getTextOfJSDocComment(doc.comment) + } + } + return undefined +} diff --git a/tests/approvals/jsdoc.algo.ts b/tests/approvals/jsdoc.algo.ts new file mode 100644 index 00000000..007e6a08 --- /dev/null +++ b/tests/approvals/jsdoc.algo.ts @@ -0,0 +1,44 @@ +import type { bytes, uint64 } from '@algorandfoundation/algorand-typescript' +import { Contract, GlobalState, LocalState } from '@algorandfoundation/algorand-typescript' +import { Struct, UintN } from '@algorandfoundation/algorand-typescript/arc4' + +/** + * This is the description for demo struct + */ +class DemoStruct extends Struct<{ a: UintN<64> }> {} + +/** + * This is the description for demo type + */ +type DemoType = { + a: bytes +} + +/** + * This is the description for the contract + */ +export class JSDocDemo extends Contract { + globalState = GlobalState() + localState = LocalState() + + /** + * This is the description of the method + * @param a This is the description of 'a' + * @param b This is the description of 'b' + * @returns This is the description of the return value + */ + test(a: uint64, b: bytes): DemoStruct { + return new DemoStruct({ a: new UintN<64>(a) }) + } + + /** + * This is the description of the method + * @param a This is the description of 'a' + * @returns This is the description of the return value + */ + test2(a: bytes): DemoType { + return { + a, + } + } +} diff --git a/tests/approvals/out/jsdoc/JSDocDemo.approval.teal b/tests/approvals/out/jsdoc/JSDocDemo.approval.teal new file mode 100644 index 00000000..ad862ea9 --- /dev/null +++ b/tests/approvals/out/jsdoc/JSDocDemo.approval.teal @@ -0,0 +1,118 @@ +#pragma version 10 + +tests/approvals/jsdoc.algo.ts::JSDocDemo.approvalProgram: + intcblock 1 0 + bytecblock 0x151f7c75 + callsub __puya_arc4_router__ + return + + +// tests/approvals/jsdoc.algo.ts::JSDocDemo.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/jsdoc.algo.ts:20 + // export class JSDocDemo extends Contract { + proto 0 1 + txn NumAppArgs + bz __puya_arc4_router___bare_routing@6 + pushbytess 0x60d93beb 0x6618726a // method "test(uint64,byte[])(uint64)", method "test2(byte[])(byte[])" + txna ApplicationArgs 0 + match __puya_arc4_router___test_route@2 __puya_arc4_router___test2_route@3 + intc_1 // 0 + retsub + +__puya_arc4_router___test_route@2: + // tests/approvals/jsdoc.algo.ts:30 + // test(a: uint64, b: bytes): DemoStruct { + txn OnCompletion + ! + assert // OnCompletion is not NoOp + txn ApplicationID + assert // can only call when not creating + // tests/approvals/jsdoc.algo.ts:20 + // export class JSDocDemo extends Contract { + txna ApplicationArgs 1 + btoi + txna ApplicationArgs 2 + extract 2 0 + // tests/approvals/jsdoc.algo.ts:30 + // test(a: uint64, b: bytes): DemoStruct { + callsub test + bytec_0 // 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___test2_route@3: + // tests/approvals/jsdoc.algo.ts:39 + // test2(a: bytes): DemoType { + txn OnCompletion + ! + assert // OnCompletion is not NoOp + txn ApplicationID + assert // can only call when not creating + // tests/approvals/jsdoc.algo.ts:20 + // export class JSDocDemo extends Contract { + txna ApplicationArgs 1 + extract 2 0 + // tests/approvals/jsdoc.algo.ts:39 + // test2(a: bytes): DemoType { + callsub test2 + dup + len + itob + extract 6 2 + swap + concat + pushbytes 0x0002 + swap + concat + bytec_0 // 0x151f7c75 + swap + concat + log + intc_0 // 1 + retsub + +__puya_arc4_router___bare_routing@6: + // tests/approvals/jsdoc.algo.ts:20 + // export class JSDocDemo extends Contract { + txn OnCompletion + bnz __puya_arc4_router___after_if_else@10 + txn ApplicationID + ! + assert // can only call when creating + intc_0 // 1 + retsub + +__puya_arc4_router___after_if_else@10: + // tests/approvals/jsdoc.algo.ts:20 + // export class JSDocDemo extends Contract { + intc_1 // 0 + retsub + + +// tests/approvals/jsdoc.algo.ts::JSDocDemo.test(a: uint64, b: bytes) -> bytes: +test: + // tests/approvals/jsdoc.algo.ts:30 + // test(a: uint64, b: bytes): DemoStruct { + proto 2 1 + // tests/approvals/jsdoc.algo.ts:31 + // return new DemoStruct({ a: new UintN<64>(a) }) + frame_dig -2 + itob + retsub + + +// tests/approvals/jsdoc.algo.ts::JSDocDemo.test2(a: bytes) -> bytes: +test2: + // tests/approvals/jsdoc.algo.ts:39 + // test2(a: bytes): DemoType { + proto 1 1 + // tests/approvals/jsdoc.algo.ts:40-42 + // return { + // a, + // } + frame_dig -1 + retsub diff --git a/tests/approvals/out/jsdoc/JSDocDemo.arc32.json b/tests/approvals/out/jsdoc/JSDocDemo.arc32.json new file mode 100644 index 00000000..8fd73b9a --- /dev/null +++ b/tests/approvals/out/jsdoc/JSDocDemo.arc32.json @@ -0,0 +1,116 @@ +{ + "hints": { + "test(uint64,byte[])(uint64)": { + "call_config": { + "no_op": "CALL" + }, + "structs": { + "output": { + "name": "DemoStruct", + "elements": [ + [ + "a", + "uint64" + ] + ] + } + } + }, + "test2(byte[])(byte[])": { + "call_config": { + "no_op": "CALL" + }, + "structs": { + "output": { + "name": "DemoType", + "elements": [ + [ + "a", + "byte[]" + ] + ] + } + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czo6SlNEb2NEZW1vLmFwcHJvdmFsUHJvZ3JhbToKICAgIGludGNibG9jayAxIDAKICAgIGJ5dGVjYmxvY2sgMHgxNTFmN2M3NQogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2pzZG9jLmFsZ28udHM6OkpTRG9jRGVtby5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czoyMAogICAgLy8gZXhwb3J0IGNsYXNzIEpTRG9jRGVtbyBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMQogICAgdHhuIE51bUFwcEFyZ3MKICAgIGJ6IF9fcHV5YV9hcmM0X3JvdXRlcl9fX2JhcmVfcm91dGluZ0A2CiAgICBwdXNoYnl0ZXNzIDB4NjBkOTNiZWI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CiAgICAvLyByZXR1cm4gewogICAgLy8gICBhLAogICAgLy8gfQogICAgZnJhbWVfZGlnIC0xCiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czo6SlNEb2NEZW1vLmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "state": { + "global": { + "num_byte_slices": 1, + "num_uints": 1 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": { + "globalState": { + "type": "bytes", + "key": "globalState" + }, + "localState": { + "type": "uint64", + "key": "localState" + } + }, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "JSDocDemo", + "desc": "This is the description for the contract", + "methods": [ + { + "name": "test", + "args": [ + { + "type": "uint64", + "name": "a", + "desc": "This is the description of 'a'" + }, + { + "type": "byte[]", + "name": "b", + "desc": "This is the description of 'b'" + } + ], + "readonly": false, + "returns": { + "type": "(uint64)", + "desc": "This is the description of the return value" + }, + "desc": "This is the description of the method" + }, + { + "name": "test2", + "args": [ + { + "type": "byte[]", + "name": "a", + "desc": "This is the description of 'a'" + } + ], + "readonly": false, + "returns": { + "type": "(byte[])", + "desc": "This is the description of the return value" + }, + "desc": "This is the description of the method" + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "CREATE" + } +} \ No newline at end of file diff --git a/tests/approvals/out/jsdoc/JSDocDemo.arc56.json b/tests/approvals/out/jsdoc/JSDocDemo.arc56.json new file mode 100644 index 00000000..612c0649 --- /dev/null +++ b/tests/approvals/out/jsdoc/JSDocDemo.arc56.json @@ -0,0 +1,156 @@ +{ + "name": "JSDocDemo", + "structs": { + "DemoStruct": [ + { + "name": "a", + "type": "uint64" + } + ], + "DemoType": [ + { + "name": "a", + "type": "byte[]" + } + ] + }, + "methods": [ + { + "name": "test", + "args": [ + { + "type": "uint64", + "name": "a", + "desc": "This is the description of 'a'" + }, + { + "type": "byte[]", + "name": "b", + "desc": "This is the description of 'b'" + } + ], + "returns": { + "type": "(uint64)", + "struct": "DemoStruct", + "desc": "This is the description of the return value" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "desc": "This is the description of the method", + "events": [], + "recommendations": {} + }, + { + "name": "test2", + "args": [ + { + "type": "byte[]", + "name": "a", + "desc": "This is the description of 'a'" + } + ], + "returns": { + "type": "(byte[])", + "struct": "DemoType", + "desc": "This is the description of the return value" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "desc": "This is the description of the method", + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "desc": "This is the description for the contract", + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 1, + "bytes": 1 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "globalState": { + "keyType": "AVMString", + "valueType": "AVMString", + "key": "Z2xvYmFsU3RhdGU=" + }, + "localState": { + "keyType": "AVMString", + "valueType": "AVMUint64", + "key": "bG9jYWxTdGF0ZQ==" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 50, + 76 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 117 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 53, + 79 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czo6SlNEb2NEZW1vLmFwcHJvdmFsUHJvZ3JhbToKICAgIGludGNibG9jayAxIDAKICAgIGJ5dGVjYm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1Y3QgewogICAgcHJvdG8gMiAxCiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czozMQogICAgLy8gcmV0dXJuIG5ldyBEZW1vU3RydWN0KHsgYTogbmV3IFVpbnROPDY0PihhKSB9KQogICAgZnJhbWVfZGlnIC0yCiAgICBpdG9iCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czo6SlNEb2NEZW1vLnRlc3QyKGE6IGJ5dGVzKSAtPiBieXRlczoKdGVzdDI6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czozOQogICAgLy8gdGVzdDIoYTogYnl0ZXMpOiBEZW1vVHlwZSB7CiAgICBwcm90byAxIDEKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9qc2RvYy5hbGdvLnRzOjQwLTQyCiAgICAvLyByZXR1cm4gewogICAgLy8gICBhLAogICAgLy8gfQogICAgZnJhbWVfZGlnIC0xCiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czo6SlNEb2NEZW1vLmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/jsdoc/JSDocDemo.clear.teal b/tests/approvals/out/jsdoc/JSDocDemo.clear.teal new file mode 100644 index 00000000..8054cedd --- /dev/null +++ b/tests/approvals/out/jsdoc/JSDocDemo.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/jsdoc.algo.ts::JSDocDemo.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/jsdoc/JSDocDemo.ssa.ir b/tests/approvals/out/jsdoc/JSDocDemo.ssa.ir new file mode 100644 index 00000000..f26cca6e --- /dev/null +++ b/tests/approvals/out/jsdoc/JSDocDemo.ssa.ir @@ -0,0 +1,105 @@ +contract tests/approvals/jsdoc.algo.ts::JSDocDemo: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/jsdoc.algo.ts::JSDocDemo.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/jsdoc.algo.ts::JSDocDemo.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/jsdoc.algo.ts::JSDocDemo.constructor() -> void: + block@0: // L20 + return + + subroutine tests/approvals/jsdoc.algo.ts::JSDocDemo.__puya_arc4_router__() -> bool: + block@0: // L20 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@6 + block@1: // abi_routing_L20 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test(uint64,byte[])(uint64)" => block@2, method "test2(byte[])(byte[])" => block@3, * => block@4} + block@2: // test_route_L30 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // can only call when not creating + let tmp%7#0: bytes = (txna ApplicationArgs 1) + let tmp%8#0: uint64 = (btoi tmp%7#0) + let tmp%9#0: bytes = (txna ApplicationArgs 2) + let tmp%10#0: bytes = ((extract 2 0) tmp%9#0) + let tmp%11#0: bytes = tests/approvals/jsdoc.algo.ts::JSDocDemo.test(tmp%8#0, tmp%10#0) + let tmp%12#0: bytes = (concat 0x151f7c75 tmp%11#0) + (log tmp%12#0) + return 1u + block@3: // test2_route_L39 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (== tmp%13#0 NoOp) + (assert tmp%14#0) // OnCompletion is not NoOp + let tmp%15#0: uint64 = (txn ApplicationID) + let tmp%16#0: bool = (!= tmp%15#0 0u) + (assert tmp%16#0) // can only call when not creating + let tmp%17#0: bytes = (txna ApplicationArgs 1) + let tmp%18#0: bytes = ((extract 2 0) tmp%17#0) + let elements_to_encode%0#0: bytes = tests/approvals/jsdoc.algo.ts::JSDocDemo.test2(tmp%18#0) + let length%0#0: uint64 = (len elements_to_encode%0#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 elements_to_encode%0#0) + let current_tail_offset%0#0: uint64 = 2u + let encoded_tuple_buffer%0#0: bytes = 0x + let as_bytes%1#0: bytes = (itob current_tail_offset%0#0) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 offset_as_uint16%0#0) + let data_length%0#0: uint64 = (len encoded_value%0#0) + let current_tail_offset%1#0: uint64 = (+ current_tail_offset%0#0 data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 encoded_value%0#0) + let tmp%19#0: bytes = (concat 0x151f7c75 encoded_tuple_buffer%2#0) + (log tmp%19#0) + return 1u + block@4: // switch_case_default_L20 + goto block@5 + block@5: // switch_case_next_L20 + goto block@10 + block@6: // bare_routing_L20 + let tmp%20#0: uint64 = (txn OnCompletion) + switch tmp%20#0 {0u => block@7, * => block@8} + block@7: // __algots__.defaultCreate_L20 + let tmp%21#0: uint64 = (txn ApplicationID) + let tmp%22#0: bool = (== tmp%21#0 0u) + (assert tmp%22#0) // can only call when creating + tests/approvals/jsdoc.algo.ts::JSDocDemo.__algots__.defaultCreate() + return 1u + block@8: // switch_case_default_L20 + goto block@9 + block@9: // switch_case_next_L20 + goto block@10 + block@10: // after_if_else_L20 + return 0u + + subroutine tests/approvals/jsdoc.algo.ts::JSDocDemo.test(a: uint64, b: bytes) -> bytes: + block@0: // L30 + let val_as_bytes%0#0: bytes = (itob a#0) + let current_tail_offset%0#0: uint64 = 8u + let encoded_tuple_buffer%0#0: bytes = 0x + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 val_as_bytes%0#0) + return encoded_tuple_buffer%1#0 + + subroutine tests/approvals/jsdoc.algo.ts::JSDocDemo.test2(a: bytes) -> bytes: + block@0: // L39 + return a#0 + + subroutine tests/approvals/jsdoc.algo.ts::JSDocDemo.__algots__.defaultCreate() -> void: + block@0: // L20 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/jsdoc/jsdoc.awst b/tests/approvals/out/jsdoc/jsdoc.awst new file mode 100644 index 00000000..130a1fb1 --- /dev/null +++ b/tests/approvals/out/jsdoc/jsdoc.awst @@ -0,0 +1,48 @@ +contract JSDocDemo +{ + globals { + ["globalState"]: string + ["localState"]: uint64 + } + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + test(): DemoStruct + { + return new DemoStruct(a=(#0 = { a: ARC4_ENCODE(a, wtype=arc4.uint64) }).a) + } + + test2(): DemoType{ a: bytes } + { + return { a: (#1 = { a: a }).a } + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + + __algots__.defaultCreate(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/jsdoc/jsdoc.awst.json b/tests/approvals/out/jsdoc/jsdoc.awst.json new file mode 100644 index 00000000..2e56509d --- /dev/null +++ b/tests/approvals/out/jsdoc/jsdoc.awst.json @@ -0,0 +1,1218 @@ +[ + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 20, + "end_line": 20, + "column": 0, + "end_column": 41 + }, + "id": "tests/approvals/jsdoc.algo.ts::JSDocDemo", + "name": "JSDocDemo", + "description": "This is the description for the contract", + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 30, + "end_line": 30, + "column": 2, + "end_column": 39 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "a", + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 30, + "end_line": 30, + "column": 7, + "end_column": 16 + } + }, + { + "_type": "SubroutineArgument", + "name": "b", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 30, + "end_line": 30, + "column": 18, + "end_column": 26 + } + } + ], + "return_type": { + "_type": "ARC4Struct", + "name": "DemoStruct", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 30, + "end_line": 30, + "column": 2, + "end_column": 39 + }, + "frozen": false, + "desc": "This is the description for demo struct" + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 30, + "end_line": 32, + "column": 40, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 31, + "end_line": 31, + "column": 4, + "end_column": 50 + }, + "value": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 31, + "end_line": 31, + "column": 11, + "end_column": 50 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "DemoStruct", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 31, + "end_line": 31, + "column": 15, + "end_column": 25 + }, + "frozen": false, + "desc": "This is the description for demo struct" + }, + "values": { + "a": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 31, + "end_line": 31, + "column": 11, + "end_column": 50 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 31, + "end_line": 31, + "column": 26, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "a" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 31, + "end_line": 31, + "column": 26, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "a" + ] + }, + "items": [ + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 31, + "end_line": 31, + "column": 31, + "end_column": 47 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 31, + "end_line": 31, + "column": 45, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + } + ] + }, + "id": "0" + }, + "name": "a" + } + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "This is the description of the method", + "args": { + "a": "This is the description of 'a'", + "b": "This is the description of 'b'" + }, + "returns": "This is the description of the return value" + }, + "cref": "tests/approvals/jsdoc.algo.ts::JSDocDemo", + "member_name": "test", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 30, + "end_line": 30, + "column": 2, + "end_column": 39 + }, + "name": "test", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": { + "output": { + "name": "DemoStruct", + "elements": [ + [ + "a", + "uint64" + ] + ] + } + } + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 39, + "end_line": 39, + "column": 2, + "end_column": 27 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "a", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 39, + "end_line": 39, + "column": 8, + "end_column": 16 + } + } + ], + "return_type": { + "_type": "WTuple", + "name": "tests/approvals/jsdoc.algo.ts::DemoType", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a" + ] + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 39, + "end_line": 43, + "column": 28, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 40, + "end_line": 42, + "column": 4, + "end_column": 5 + }, + "value": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 40, + "end_line": 42, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/jsdoc.algo.ts::DemoType", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a" + ] + }, + "items": [ + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 40, + "end_line": 42, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 40, + "end_line": 42, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 40, + "end_line": 42, + "column": 11, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a" + ] + }, + "items": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 41, + "end_line": 41, + "column": 6, + "end_column": 7 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "a" + } + ] + }, + "id": "1" + }, + "name": "a" + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "This is the description of the method", + "args": { + "a": "This is the description of 'a'" + }, + "returns": "This is the description of the return value" + }, + "cref": "tests/approvals/jsdoc.algo.ts::JSDocDemo", + "member_name": "test2", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 39, + "end_line": 39, + "column": 2, + "end_column": 27 + }, + "name": "test2", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": { + "output": { + "name": "DemoType", + "elements": [ + [ + "a", + "byte[]" + ] + ] + } + } + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 20, + "end_line": 20, + "column": 0, + "end_column": 41 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 20, + "end_line": 20, + "column": 0, + "end_column": 41 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 20, + "end_line": 20, + "column": 0, + "end_column": 41 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 20, + "end_line": 20, + "column": 0, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/jsdoc.algo.ts::JSDocDemo", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 20, + "end_line": 20, + "column": 0, + "end_column": 41 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 20, + "end_line": 20, + "column": 0, + "end_column": 41 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "Implicitly generated create method", + "args": {}, + "returns": null + }, + "cref": "tests/approvals/jsdoc.algo.ts::JSDocDemo", + "member_name": "__algots__.defaultCreate", + "arc4_method_config": { + "_type": "ARC4BareMethodConfig", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 20, + "end_line": 20, + "column": 0, + "end_column": 41 + }, + "allowed_completion_types": [ + 0 + ], + "create": 2, + "is_bare": true + } + } + ], + "app_state": [ + { + "_type": "AppStorageDefinition", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 21, + "end_line": 21, + "column": 2, + "end_column": 13 + }, + "member_name": "globalState", + "kind": 1, + "storage_wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key_wtype": null, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 21, + "end_line": 21, + "column": 2, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XKZg`VQf=$VRU5", + "encoding": "utf8" + }, + "description": null + }, + { + "_type": "AppStorageDefinition", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 22, + "end_line": 22, + "column": 2, + "end_column": 12 + }, + "member_name": "localState", + "kind": 1, + "storage_wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "key_wtype": null, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/jsdoc.algo.ts", + "line": 22, + "end_line": 22, + "column": 2, + "end_column": 12 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "Y;R*>Y*Tb$bY%", + "encoding": "utf8" + }, + "description": null + } + ], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + } +] \ No newline at end of file From cc9d48e0c4af7e9b1a775b669d5bca00c30089ad Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Wed, 27 Nov 2024 15:40:54 -0800 Subject: [PATCH 19/30] refactor: Export all ptypes under namesapce --- src/awst_build/eb/arc4/struct.ts | 2 +- src/awst_build/ptypes/for-export.ts | 3 +++ src/index.ts | 21 +-------------------- 3 files changed, 5 insertions(+), 21 deletions(-) create mode 100644 src/awst_build/ptypes/for-export.ts diff --git a/src/awst_build/eb/arc4/struct.ts b/src/awst_build/eb/arc4/struct.ts index 4b05d8d4..7506563b 100644 --- a/src/awst_build/eb/arc4/struct.ts +++ b/src/awst_build/eb/arc4/struct.ts @@ -6,8 +6,8 @@ import type { PType, PTypeOrClass } from '../../ptypes' import { ObjectPType } from '../../ptypes' import { ARC4StructClass, ARC4StructType } from '../../ptypes/arc4-types' import { instanceEb } from '../../type-registry' +import type { NodeBuilder } from '../index' import { InstanceBuilder } from '../index' -import { NodeBuilder } from '../index' import { requireExpressionOfType } from '../util' import { parseFunctionArgs } from '../util/arg-parsing' import { Arc4EncodedBaseClassBuilder, Arc4EncodedBaseExpressionBuilder } from './base' diff --git a/src/awst_build/ptypes/for-export.ts b/src/awst_build/ptypes/for-export.ts new file mode 100644 index 00000000..6093c0b1 --- /dev/null +++ b/src/awst_build/ptypes/for-export.ts @@ -0,0 +1,3 @@ +/* This file aggregates all ptypes into a single export for external consumption of the compiler api */ +export * from './index' +export * from './arc4-types' diff --git a/src/index.ts b/src/index.ts index b7de1fcb..fcdc2a4a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -24,26 +24,7 @@ import { } from './util' export { SourceLocation } from './awst/source-location' -export { - anyPType, - BoxMapPType, - BoxPType, - ContractClassPType, - FunctionPType, - GlobalStateType, - LocalStateType, - PType, -} from './awst_build/ptypes' -export { - ARC4BooleanType, - ARC4StringType, - ARC4StructType, - ARC4TupleType, - DynamicArrayType, - StaticArrayType, - UFixedNxMType, - UintNType, -} from './awst_build/ptypes/arc4-types' +export * as ptypes from './awst_build/ptypes/for-export' export { registerPTypes } from './awst_build/ptypes/register' export { typeRegistry } from './awst_build/type-registry' export { TypeResolver } from './awst_build/type-resolver' From a4c4d758ec729b554764c40a3dbb0ab7e6de6926 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Wed, 27 Nov 2024 15:48:01 -0800 Subject: [PATCH 20/30] chore: Regenerate approvals --- tests/approvals.spec.ts | 1 + .../out/accounts/AccountsContract.ssa.ir | 31 ++++++ .../out/arc4-struct/arc4-struct.awst.json | 105 ++++++++++++------ .../arc4-types/Arc4TypesTestContract.ssa.ir | 17 +-- .../out/jsdoc/JSDocDemo.approval.teal | 80 ++++++++++--- .../approvals/out/jsdoc/JSDocDemo.arc32.json | 2 +- .../approvals/out/jsdoc/JSDocDemo.arc56.json | 12 +- 7 files changed, 184 insertions(+), 64 deletions(-) diff --git a/tests/approvals.spec.ts b/tests/approvals.spec.ts index 20a3d172..9ac83687 100644 --- a/tests/approvals.spec.ts +++ b/tests/approvals.spec.ts @@ -23,6 +23,7 @@ describe('Approvals', () => { outputTeal: true, outputArc32: true, outputArc56: true, + outputSsaIr: true, }, ) invariant(result.ast, 'Compilation must result in ast') diff --git a/tests/approvals/out/accounts/AccountsContract.ssa.ir b/tests/approvals/out/accounts/AccountsContract.ssa.ir index ae35695f..ec59adcc 100644 --- a/tests/approvals/out/accounts/AccountsContract.ssa.ir +++ b/tests/approvals/out/accounts/AccountsContract.ssa.ir @@ -111,6 +111,7 @@ contract tests/approvals/accounts.algo.ts::AccountsContract: subroutine tests/approvals/accounts.algo.ts::AccountsContract.getAccountInfo(account: bytes, asset: uint64) -> : block@0: // L5 + _puya_lib.util.ensure_budget(1400u, 0u) let (value%0#0: uint64, check%0#0: bool) = ((acct_params_get AcctBalance) account#0) (assert check%0#0) // account funded let (value%1#0: uint64, check%1#0: bool) = ((acct_params_get AcctMinBalance) account#0) @@ -521,6 +522,36 @@ contract tests/approvals/accounts.algo.ts::AccountsContract: subroutine tests/approvals/accounts.algo.ts::AccountsContract.__algots__.defaultCreate() -> void: block@0: // L4 return + + subroutine _puya_lib.util.ensure_budget(required_budget: uint64, fee_source: uint64) -> void: + block@0: // L12 + let required_budget_with_buffer#0: uint64 = (+ required_budget#0 10u) + goto block@1 + block@1: // while_top_L20 + let tmp%0#0: uint64 = (global OpcodeBudget) + let tmp%1#0: bool = (> required_budget_with_buffer#0 tmp%0#0) + goto tmp%1#0 ? block@2 : block@7 + block@2: // while_body_L21 + itxn_begin + ((itxn_field TypeEnum) appl) + ((itxn_field OnCompletion) DeleteApplication) + ((itxn_field ApprovalProgram) 0x068101) + ((itxn_field ClearStateProgram) 0x068101) + switch fee_source#0 {0u => block@3, 1u => block@4, * => block@5} + block@3: // switch_case_0_L28 + ((itxn_field Fee) 0u) + goto block@6 + block@4: // switch_case_1_L30 + let tmp%2#0: uint64 = (global MinTxnFee) + ((itxn_field Fee) tmp%2#0) + goto block@6 + block@5: // switch_case_default_L26 + goto block@6 + block@6: // switch_case_next_L26 + itxn_submit + goto block@1 + block@7: // after_while_L20 + return program clear-state: subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst.json b/tests/approvals/out/arc4-struct/arc4-struct.awst.json index 99d963cc..2033b85d 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst.json +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst.json @@ -390,7 +390,8 @@ "column": 10, "end_column": 12 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" }, @@ -452,7 +453,8 @@ "column": 19, "end_column": 25 }, - "frozen": false + "frozen": false, + "desc": null }, "values": { "x": { @@ -977,7 +979,8 @@ "column": 8, "end_column": 10 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" }, @@ -1114,7 +1117,8 @@ "column": 8, "end_column": 10 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" }, @@ -1191,7 +1195,8 @@ "column": 10, "end_column": 12 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" }, @@ -1253,7 +1258,8 @@ "column": 19, "end_column": 25 }, - "frozen": false + "frozen": false, + "desc": null }, "values": { "x": { @@ -2438,7 +2444,8 @@ "column": 11, "end_column": 13 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" } @@ -2518,7 +2525,8 @@ "column": 21, "end_column": 23 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" } @@ -2621,7 +2629,8 @@ "column": 24, "end_column": 30 }, - "frozen": false + "frozen": false, + "desc": null }, "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", @@ -2683,7 +2692,8 @@ "column": 36, "end_column": 42 }, - "frozen": false + "frozen": false, + "desc": null }, "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", @@ -2743,7 +2753,8 @@ "column": 2, "end_column": 43 }, - "frozen": false + "frozen": false, + "desc": null }, "body": { "_type": "Block", @@ -2822,7 +2833,8 @@ "column": 15, "end_column": 21 }, - "frozen": false + "frozen": false, + "desc": null }, "values": { "x": { @@ -3099,7 +3111,8 @@ "column": 24, "end_column": 26 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" }, @@ -3206,7 +3219,8 @@ "column": 38, "end_column": 40 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" }, @@ -3355,7 +3369,8 @@ "column": 24, "end_column": 26 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" }, @@ -3462,7 +3477,8 @@ "column": 38, "end_column": 40 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" }, @@ -3751,7 +3767,8 @@ "column": 24, "end_column": 26 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" }, @@ -3858,7 +3875,8 @@ "column": 38, "end_column": 40 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" }, @@ -4007,7 +4025,8 @@ "column": 24, "end_column": 26 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" }, @@ -4114,7 +4133,8 @@ "column": 38, "end_column": 40 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" }, @@ -4266,7 +4286,8 @@ "column": 41, "end_column": 47 }, - "frozen": false + "frozen": false, + "desc": null }, "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", @@ -4361,7 +4382,8 @@ "column": 10, "end_column": 12 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" }, @@ -4423,7 +4445,8 @@ "column": 19, "end_column": 25 }, - "frozen": false + "frozen": false, + "desc": null }, "values": { "x": { @@ -4617,7 +4640,8 @@ "column": 26, "end_column": 28 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" } @@ -4817,7 +4841,8 @@ "column": 26, "end_column": 28 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" } @@ -4896,7 +4921,8 @@ "column": 10, "end_column": 12 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v3" }, @@ -4958,7 +4984,8 @@ "column": 19, "end_column": 25 }, - "frozen": false + "frozen": false, + "desc": null }, "values": { "x": { @@ -5178,7 +5205,8 @@ "column": 31, "end_column": 33 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" }, @@ -5267,7 +5295,8 @@ "column": 31, "end_column": 33 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" }, @@ -5496,7 +5525,8 @@ "column": 31, "end_column": 33 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" }, @@ -5585,7 +5615,8 @@ "column": 31, "end_column": 33 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" }, @@ -5715,7 +5746,8 @@ "column": 11, "end_column": 13 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" } @@ -5795,7 +5827,8 @@ "column": 24, "end_column": 26 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v2" } @@ -5919,7 +5952,8 @@ "column": 11, "end_column": 13 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v3" } @@ -5999,7 +6033,8 @@ "column": 24, "end_column": 26 }, - "frozen": false + "frozen": false, + "desc": null }, "name": "v1" } diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir b/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir index bd437cc1..e69d9ab9 100644 --- a/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir @@ -11,6 +11,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: let x#0: bytes = 0x0000000000000000 tests/approvals/arc4-types.algo.ts::testStr() tests/approvals/arc4-types.algo.ts::test(1u, 2b, 0x0000000000000000000000000000000000000000000000000000000000000004) + tests/approvals/arc4-types.algo.ts::testUFixed() tests/approvals/arc4-types.algo.ts::testByte() tests/approvals/arc4-types.algo.ts::testArrays(0x0000000000000041) tests/approvals/arc4-types.algo.ts::testAddress() @@ -71,6 +72,14 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: (assert tmp%8#0) return + subroutine tests/approvals/arc4-types.algo.ts::testUFixed() -> void: + block@0: // L16 + let a#0: bytes = 0x000004dc + let c#0: bytes = 0x000004dc + let tmp%0#0: bool = (== a#0 c#0) + (assert tmp%0#0) + return + subroutine tests/approvals/arc4-types.algo.ts::testByte() -> void: block@0: // L82 let b#0: bytes = 0x00 @@ -147,14 +156,6 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: (assert tmp%1#0) return - subroutine tests/approvals/arc4-types.algo.ts::testUFixed() -> void: - block@0: // L16 - let a#0: bytes = 0x000004dc - let c#0: bytes = 0x000004dc - let tmp%0#0: bool = (== a#0 c#0) - (assert tmp%0#0) - return - subroutine tests/approvals/arc4-types.algo.ts::testDynamicBytes(someBytes: bytes) -> void: block@0: // L48 let db1#0: bytes = 0x0000 diff --git a/tests/approvals/out/jsdoc/JSDocDemo.approval.teal b/tests/approvals/out/jsdoc/JSDocDemo.approval.teal index ad862ea9..021957b8 100644 --- a/tests/approvals/out/jsdoc/JSDocDemo.approval.teal +++ b/tests/approvals/out/jsdoc/JSDocDemo.approval.teal @@ -1,32 +1,51 @@ #pragma version 10 tests/approvals/jsdoc.algo.ts::JSDocDemo.approvalProgram: - intcblock 1 0 - bytecblock 0x151f7c75 + intcblock 0 1 + bytecblock 0x151f7c75 0x + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: callsub __puya_arc4_router__ return +// tests/approvals/jsdoc.algo.ts::JSDocDemo.constructor() -> void: +constructor: + // tests/approvals/jsdoc.algo.ts:20 + // export class JSDocDemo extends Contract { + proto 0 0 + retsub + + // tests/approvals/jsdoc.algo.ts::JSDocDemo.__puya_arc4_router__() -> uint64: __puya_arc4_router__: // tests/approvals/jsdoc.algo.ts:20 // export class JSDocDemo extends Contract { proto 0 1 txn NumAppArgs + intc_0 // 0 + != bz __puya_arc4_router___bare_routing@6 - pushbytess 0x60d93beb 0x6618726a // method "test(uint64,byte[])(uint64)", method "test2(byte[])(byte[])" txna ApplicationArgs 0 + pushbytes 0x60d93beb // method "test(uint64,byte[])(uint64)" + pushbytes 0x6618726a // method "test2(byte[])(byte[])" + uncover 2 match __puya_arc4_router___test_route@2 __puya_arc4_router___test2_route@3 - intc_1 // 0 - retsub + b __puya_arc4_router___switch_case_default@4 __puya_arc4_router___test_route@2: // tests/approvals/jsdoc.algo.ts:30 // test(a: uint64, b: bytes): DemoStruct { txn OnCompletion - ! + intc_0 // NoOp + == assert // OnCompletion is not NoOp txn ApplicationID + intc_0 // 0 + != assert // can only call when not creating // tests/approvals/jsdoc.algo.ts:20 // export class JSDocDemo extends Contract { @@ -41,16 +60,19 @@ __puya_arc4_router___test_route@2: swap concat log - intc_0 // 1 + intc_1 // 1 retsub __puya_arc4_router___test2_route@3: // tests/approvals/jsdoc.algo.ts:39 // test2(a: bytes): DemoType { txn OnCompletion - ! + intc_0 // NoOp + == assert // OnCompletion is not NoOp txn ApplicationID + intc_0 // 0 + != assert // can only call when not creating // tests/approvals/jsdoc.algo.ts:20 // export class JSDocDemo extends Contract { @@ -65,31 +87,50 @@ __puya_arc4_router___test2_route@3: extract 6 2 swap concat - pushbytes 0x0002 + pushint 2 // 2 + itob + extract 6 2 + bytec_1 // 0x + swap + concat swap concat bytec_0 // 0x151f7c75 swap concat log - intc_0 // 1 + intc_1 // 1 retsub +__puya_arc4_router___switch_case_default@4: + b __puya_arc4_router___after_if_else@10 + __puya_arc4_router___bare_routing@6: // tests/approvals/jsdoc.algo.ts:20 // export class JSDocDemo extends Contract { txn OnCompletion - bnz __puya_arc4_router___after_if_else@10 + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@7 + b __puya_arc4_router___switch_case_default@8 + +__puya_arc4_router_____algots__.defaultCreate@7: + // tests/approvals/jsdoc.algo.ts:20 + // export class JSDocDemo extends Contract { txn ApplicationID - ! + intc_0 // 0 + == assert // can only call when creating - intc_0 // 1 + callsub __algots__.defaultCreate + intc_1 // 1 retsub +__puya_arc4_router___switch_case_default@8: + __puya_arc4_router___after_if_else@10: // tests/approvals/jsdoc.algo.ts:20 // export class JSDocDemo extends Contract { - intc_1 // 0 + intc_0 // 0 retsub @@ -102,6 +143,9 @@ test: // return new DemoStruct({ a: new UintN<64>(a) }) frame_dig -2 itob + bytec_1 // 0x + swap + concat retsub @@ -116,3 +160,11 @@ test2: // } frame_dig -1 retsub + + +// tests/approvals/jsdoc.algo.ts::JSDocDemo.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/jsdoc.algo.ts:20 + // export class JSDocDemo extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/jsdoc/JSDocDemo.arc32.json b/tests/approvals/out/jsdoc/JSDocDemo.arc32.json index 8fd73b9a..29e115c4 100644 --- a/tests/approvals/out/jsdoc/JSDocDemo.arc32.json +++ b/tests/approvals/out/jsdoc/JSDocDemo.arc32.json @@ -34,7 +34,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czo6SlNEb2NEZW1vLmFwcHJvdmFsUHJvZ3JhbToKICAgIGludGNibG9jayAxIDAKICAgIGJ5dGVjYmxvY2sgMHgxNTFmN2M3NQogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2pzZG9jLmFsZ28udHM6OkpTRG9jRGVtby5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby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nRzOjQwLTQyCiAgICAvLyByZXR1cm4gewogICAgLy8gICBhLAogICAgLy8gfQogICAgZnJhbWVfZGlnIC0xCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czo6SlNEb2NEZW1vLl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZSgpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9qc2RvYy5hbGdvLnRzOjIwCiAgICAvLyBleHBvcnQgY2xhc3MgSlNEb2NEZW1vIGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIK", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czo6SlNEb2NEZW1vLmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" }, "state": { diff --git a/tests/approvals/out/jsdoc/JSDocDemo.arc56.json b/tests/approvals/out/jsdoc/JSDocDemo.arc56.json index 612c0649..4b3d0131 100644 --- a/tests/approvals/out/jsdoc/JSDocDemo.arc56.json +++ b/tests/approvals/out/jsdoc/JSDocDemo.arc56.json @@ -121,21 +121,21 @@ "sourceInfo": [ { "pc": [ - 50, - 76 + 69, + 98 ], "errorMessage": "OnCompletion is not NoOp" }, { "pc": [ - 117 + 156 ], "errorMessage": "can only call when creating" }, { "pc": [ - 53, - 79 + 74, + 103 ], "errorMessage": "can only call when not creating" } @@ -148,7 +148,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czo6SlNEb2NEZW1vLmFwcHJvdmFsUHJvZ3JhbToKICAgIGludGNibG9jayAxIDAKICAgIGJ5dGVjYmxvY2sgMHgxNTFmN2M3NQogICAgY2FsbHN1YiBfX3B1eWFf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Eb2NEZW1vLnRlc3QyKGE6IGJ5dGVzKSAtPiBieXRlczoKdGVzdDI6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czozOQogICAgLy8gdGVzdDIoYTogYnl0ZXMpOiBEZW1vVHlwZSB7CiAgICBwcm90byAxIDEKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9qc2RvYy5hbGdvLnRzOjQwLTQyCiAgICAvLyByZXR1cm4gewogICAgLy8gICBhLAogICAgLy8gfQogICAgZnJhbWVfZGlnIC0xCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czo6SlNEb2NEZW1vLl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZSgpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9qc2RvYy5hbGdvLnRzOjIwCiAgICAvLyBleHBvcnQgY2xhc3MgSlNEb2NEZW1vIGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIK", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvanNkb2MuYWxnby50czo6SlNEb2NEZW1vLmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" }, "events": [], From 77772d02d62905627492ae06ce142a2a22e7e706 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Wed, 27 Nov 2024 15:50:20 -0800 Subject: [PATCH 21/30] test: Exclude packages dir from puya-ts test run --- vitest.config.mts | 1 + 1 file changed, 1 insertion(+) diff --git a/vitest.config.mts b/vitest.config.mts index 615b636a..1685488e 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -17,5 +17,6 @@ export default defineConfig({ test: { globals: true, testTimeout: 20_000, + exclude: ['packages/**', 'node_modules/**'], }, }) From 51558c7a8e75ba697b81a3aa66875aae3df0f17a Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Fri, 29 Nov 2024 09:57:24 -0800 Subject: [PATCH 22/30] chore: Reviewfixes --- .nsprc | 5 ----- src/awst_build/eb/arc4/arrays.ts | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.nsprc b/.nsprc index 91cdc450..2c63c085 100644 --- a/.nsprc +++ b/.nsprc @@ -1,7 +1,2 @@ { - "1100563": { - "active": true, - "notes": "Waiting for https://github.com/npm/cli/issues/7902 to be resolved", - "expiry": "2024-12-31" - } } diff --git a/src/awst_build/eb/arc4/arrays.ts b/src/awst_build/eb/arc4/arrays.ts index e2e1e956..7f7e5f00 100644 --- a/src/awst_build/eb/arc4/arrays.ts +++ b/src/awst_build/eb/arc4/arrays.ts @@ -25,7 +25,7 @@ import { } from '../../ptypes/arc4-types' import { instanceEb } from '../../type-registry' import type { InstanceBuilder, NodeBuilder } from '../index' -import { ClassBuilder, FunctionBuilder } from '../index' +import { FunctionBuilder } from '../index' import { IterableIteratorExpressionBuilder } from '../iterable-iterator-expression-builder' import { AccountExpressionBuilder } from '../reference/account' import { AtFunctionBuilder } from '../shared/at-function-builder' @@ -167,7 +167,7 @@ export class AddressClassBuilder extends Arc4EncodedBaseClassBuilder { ) } } -export class StaticBytesClassBuilder extends ClassBuilder { +export class StaticBytesClassBuilder extends Arc4EncodedBaseClassBuilder { readonly ptype = StaticBytesConstructor newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { @@ -219,7 +219,7 @@ export class StaticBytesClassBuilder extends ClassBuilder { } } } -export class DynamicBytesClassBuilder extends ClassBuilder { +export class DynamicBytesClassBuilder extends Arc4EncodedBaseClassBuilder { readonly ptype = DynamicBytesConstructor newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { From c4e53abaddfdef41aa634fba108cecd7557ed95d Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Fri, 29 Nov 2024 17:36:20 -0800 Subject: [PATCH 23/30] feat: Add interpretAsArc4, decodeArc4, and encodeArc4 functions in place of static member functions which are less versatile - Removes much of the implementation logic of arc4 types (this will be provided by the test package now) - Removes equals method in favour of just supporting '===' (will need hackery in testing package, but results in a more consistant API) - Adds common aliases of UintN, and allows for a wider range of N (everything between 8 and 512) --- package.json | 2 +- packages/algo-ts/src/arc4/encoded-types.ts | 316 +- packages/algo-ts/src/impl/errors.ts | 10 + src/awst/node-factory.ts | 4 +- src/awst_build/arc4-util.ts | 8 +- src/awst_build/eb/arc4/arrays.ts | 14 +- src/awst_build/eb/arc4/base.ts | 139 +- src/awst_build/eb/arc4/bool.ts | 46 +- src/awst_build/eb/arc4/string.ts | 5 +- src/awst_build/eb/arc4/struct.ts | 6 +- src/awst_build/eb/arc4/tuple.ts | 6 +- src/awst_build/eb/arc4/ufixed.ts | 23 +- src/awst_build/eb/arc4/uintn.ts | 56 +- src/awst_build/eb/arc4/util.ts | 154 + .../eb/assert-match-function-builder.ts | 5 +- src/awst_build/ptypes/arc4-types.ts | 40 + src/awst_build/ptypes/register.ts | 23 +- src/awst_build/type-resolver.ts | 6 +- tests/approvals/arc4-encode-decode.algo.ts | 36 + tests/approvals/arc4-struct.algo.ts | 9 +- tests/approvals/arc4-types.algo.ts | 46 +- .../Arc4EncodedDecode.approval.teal | 396 ++ .../Arc4EncodedDecode.arc32.json | 140 + .../Arc4EncodedDecode.arc56.json | 202 + .../Arc4EncodedDecode.clear.teal | 5 + .../Arc4EncodedDecode.ssa.ir | 218 + .../arc4-encoded-decode.awst | 53 + .../arc4-encoded-decode.awst.json | 4057 +++++++++++++++++ .../out/arc4-struct/StructDemo.approval.teal | 68 +- .../out/arc4-struct/StructDemo.arc32.json | 48 +- .../out/arc4-struct/StructDemo.arc56.json | 61 +- .../out/arc4-struct/StructDemo.ssa.ir | 49 +- .../out/arc4-struct/arc4-struct.awst | 6 + .../out/arc4-struct/arc4-struct.awst.json | 411 +- .../Arc4TypesTestContract.approval.teal | 227 +- .../arc4-types/Arc4TypesTestContract.ssa.ir | 66 +- .../approvals/out/arc4-types/arc4-types.awst | 19 +- .../out/arc4-types/arc4-types.awst.json | 3206 +++++++++---- tests/expected-output/arc4-types.algo.ts | 14 +- tests/onchain/arc4-types.spec.ts | 27 + 40 files changed, 8715 insertions(+), 1512 deletions(-) create mode 100644 src/awst_build/eb/arc4/util.ts create mode 100644 tests/approvals/arc4-encode-decode.algo.ts create mode 100644 tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.approval.teal create mode 100644 tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.arc32.json create mode 100644 tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.arc56.json create mode 100644 tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.clear.teal create mode 100644 tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.ssa.ir create mode 100644 tests/approvals/out/arc4-encoded-decode/arc4-encoded-decode.awst create mode 100644 tests/approvals/out/arc4-encoded-decode/arc4-encoded-decode.awst.json diff --git a/package.json b/package.json index 6f90c571..a16e0aed 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dev:examples": "tsx src/cli.ts build examples --output-awst --output-awst-json", "dev:approvals": "rimraf tests/approvals/out && tsx src/cli.ts build tests/approvals --dry-run", "dev:expected-output": "tsx src/cli.ts build tests/expected-output --dry-run", - "dev:testing": "tsx src/cli.ts build tests/approvals/jsdoc.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name]", + "dev:testing": "tsx src/cli.ts build tests/approvals/arc4-encode-decode.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name] --optimization-level=0", "audit": "better-npm-audit audit", "format": "prettier --write .", "lint": "eslint \"src/**/*.ts\"", diff --git a/packages/algo-ts/src/arc4/encoded-types.ts b/packages/algo-ts/src/arc4/encoded-types.ts index 850fb02f..72a2e2c7 100644 --- a/packages/algo-ts/src/arc4/encoded-types.ts +++ b/packages/algo-ts/src/arc4/encoded-types.ts @@ -1,32 +1,75 @@ -import { avmError, avmInvariant } from '../impl/errors' -import { arrayUtil, BytesCls, getNumber, getUint8Array, isBytes, isUint64 } from '../impl/primitives' -import { biguint, BigUintCompat, Bytes, bytes, BytesBacked, BytesCompat, StringCompat, Uint64, uint64, Uint64Compat } from '../primitives' +import { NoImplementation } from '../impl/errors' +import { biguint, BigUintCompat, bytes, BytesBacked, BytesCompat, StringCompat, uint64, Uint64Compat } from '../primitives' import { Account } from '../reference' -import { DeliberateAny } from '../typescript-helpers' -import { err } from '../util' -export type BitSize = 8 | 16 | 32 | 64 | 128 | 256 | 512 -type NativeForArc4Int = N extends 8 | 16 | 32 | 64 ? uint64 : biguint -type CompatForArc4Int = N extends 8 | 16 | 32 | 64 ? Uint64Compat : BigUintCompat +type UintBitSize = 8 | 16 | 24 | 32 | 40 | 48 | 56 | 64 +type BigUintBitSize = + | 72 + | 80 + | 88 + | 96 + | 104 + | 112 + | 120 + | 128 + | 136 + | 144 + | 152 + | 160 + | 168 + | 176 + | 184 + | 192 + | 200 + | 208 + | 216 + | 224 + | 232 + | 240 + | 248 + | 256 + | 264 + | 272 + | 280 + | 288 + | 296 + | 304 + | 312 + | 320 + | 328 + | 336 + | 344 + | 352 + | 360 + | 368 + | 376 + | 384 + | 392 + | 400 + | 408 + | 416 + | 424 + | 432 + | 440 + | 448 + | 456 + | 464 + | 472 + | 480 + | 488 + | 496 + | 504 + | 512 +export type BitSize = UintBitSize | BigUintBitSize +type NativeForArc4Int = N extends UintBitSize ? uint64 : biguint +type CompatForArc4Int = N extends UintBitSize ? Uint64Compat : BigUintCompat const TypeProperty = Symbol('ARC4Type') abstract class ARC4Encoded implements BytesBacked { abstract [TypeProperty]?: string get bytes(): bytes { - throw new Error('todo') - } - - equals(other: this): boolean { - return this.bytes.equals(other.bytes) - } - - static fromBytes(this: { new (...args: DeliberateAny): T }, bytes: BytesCompat): T { - throw new Error('todo') - } - - static fromLog(this: { new (...args: DeliberateAny): T }, log: BytesCompat): T { - throw new Error('todo') + throw new NoImplementation() } } @@ -48,17 +91,16 @@ export class UintN extends ARC4Encoded { super() } get native(): NativeForArc4Int { - throw new Error('TODO') - } - - static fromBytes>(this: { new (...args: DeliberateAny): I }, bytes: BytesCompat): I { - throw new Error('todo') - } - - static fromLog>(this: { new (...args: DeliberateAny): I }, log: BytesCompat): I { - throw new Error('todo') + throw new NoImplementation() } } +export class Byte extends UintN<8> {} +export class UintN8 extends UintN<8> {} +export class UintN16 extends UintN<16> {} +export class UintN32 extends UintN<32> {} +export class UintN64 extends UintN<64> {} +export class UintN128 extends UintN<128> {} +export class UintN256 extends UintN<256> {} export class UFixedNxM extends ARC4Encoded { [TypeProperty]?: `arc4.UFixedNxM<${N}x${M}>` constructor(v: `${number}.${number}`) { @@ -66,79 +108,31 @@ export class UFixedNxM extends ARC4Encoded } get native(): NativeForArc4Int { - throw new Error('TODO') - } - - static fromBytes>( - this: { new (...args: DeliberateAny): I }, - bytes: BytesCompat, - ): I { - throw new Error('todo') - } - - static fromLog>(this: { new (...args: DeliberateAny): I }, log: BytesCompat): I { - throw new Error('todo') - } -} -export class Byte extends UintN<8> { - constructor(v?: Uint64Compat) { - super(v) - } - - static fromBytes(this: { new (...args: DeliberateAny): I }, bytes: BytesCompat): I { - throw new Error('todo') - } - - static fromLog(this: { new (...args: DeliberateAny): I }, log: BytesCompat): I { - throw new Error('todo') + throw new NoImplementation() } } export class Bool extends ARC4Encoded { [TypeProperty]?: `arc4.Bool` - #v: boolean + constructor(v?: boolean) { super() - this.#v = v ?? false } get native(): boolean { - return this.#v + throw new NoImplementation() } } abstract class Arc4ReadonlyArray extends ARC4Encoded { - protected items: TItem[] - protected constructor(items: TItem[]) { + protected constructor() { super() - this.items = items.slice() - return new Proxy(this, { - get(target, prop) { - if (isUint64(prop)) { - const idx = getNumber(prop) - if (idx < target.items.length) return target.items[idx] - avmError('Index out of bounds') - } - return Reflect.get(target, prop) - }, - set(target, prop, value) { - if (isUint64(prop)) { - const idx = getNumber(prop) - if (idx < target.items.length) { - target.items[idx] = value - return true - } - avmError('Index out of bounds') - } - avmError('Property is not writable') - }, - }) } /** * Returns the current length of this array */ get length(): uint64 { - return Uint64(this.items.length) + throw new NoImplementation() } /** @@ -147,7 +141,7 @@ abstract class Arc4ReadonlyArray extends ARC4Encoded * @param index The index of the item to retrieve */ at(index: Uint64Compat): TItem { - return arrayUtil.arrayAt(this.items, index) + throw new NoImplementation() } /** @internal @@ -168,32 +162,28 @@ abstract class Arc4ReadonlyArray extends ARC4Encoded */ slice(start: Uint64Compat, end: Uint64Compat): DynamicArray slice(start?: Uint64Compat, end?: Uint64Compat): DynamicArray { - return new DynamicArray(...arrayUtil.arraySlice(this.items, start, end)) + throw new NoImplementation() } /** * Returns an iterator for the items in this array */ [Symbol.iterator](): IterableIterator { - return this.items[Symbol.iterator]() + throw new NoImplementation() } /** * Returns an iterator for a tuple of the indexes and items in this array */ - *entries(): IterableIterator { - for (const [idx, item] of this.items.entries()) { - yield [Uint64(idx), item] - } + entries(): IterableIterator { + throw new NoImplementation() } /** * Returns an iterator for the indexes in this array */ - *keys(): IterableIterator { - for (const idx of this.items.keys()) { - yield Uint64(idx) - } + keys(): IterableIterator { + throw new NoImplementation() } /** @@ -209,31 +199,17 @@ export class StaticArray exte constructor(...items: TItem[] & { length: TLength }) constructor(...items: TItem[]) constructor(...items: TItem[] & { length: TLength }) { - super(items) + super() } copy(): StaticArray { - return new StaticArray(...this.items) - } - - static fromBytes>( - this: { new (...args: DeliberateAny): I }, - bytes: BytesCompat, - ): I { - throw new Error('todo') - } - - static fromLog>( - this: { new (...args: DeliberateAny): I }, - log: BytesCompat, - ): I { - throw new Error('todo') + throw new NoImplementation() } } export class DynamicArray extends Arc4ReadonlyArray { [TypeProperty]?: `arc4.DynamicArray<${TItem[typeof TypeProperty]}>` constructor(...items: TItem[]) { - super(items) + super() } /** @@ -241,28 +217,18 @@ export class DynamicArray extends Arc4ReadonlyArray { - return new DynamicArray(...this.items) - } - - static fromBytes>(this: { new (...args: DeliberateAny): I }, bytes: BytesCompat): I { - throw new Error('todo') - } - - static fromLog>(this: { new (...args: DeliberateAny): I }, log: BytesCompat): I { - throw new Error('todo') + throw new NoImplementation() } } type ExpandTupleType = T extends [infer T1 extends ARC4Encoded, ...infer TRest extends ARC4Encoded[]] @@ -273,59 +239,31 @@ type ExpandTupleType = T extends [infer T1 extends ARC4 export class Tuple extends ARC4Encoded { [TypeProperty]?: `arc4.Tuple<${ExpandTupleType}>` - #items: TTuple constructor(...items: TTuple) { super() - this.#items = items } at(index: TIndex): TTuple[TIndex] { - return this.#items[index] ?? err('Index out of bounds') + throw new NoImplementation() } get length(): TTuple['length'] & uint64 { - return this.#items.length + throw new NoImplementation() } get native(): TTuple { - return this.#items - } - - static fromBytes>( - this: { new (...args: TTuple): I }, - bytes: BytesCompat, - ): I { - throw new Error('todo') - } - - static fromLog>( - this: { new (...args: TTuple): I }, - log: BytesCompat, - ): I { - throw new Error('todo') + throw new NoImplementation() } } export class Address extends Arc4ReadonlyArray { [TypeProperty]?: `arc4.Address` constructor(value?: Account | string | bytes) { - let byteValues: Uint8Array - if (value === undefined) { - byteValues = new Uint8Array(32) - } else if (typeof value === 'string') { - // Interpret as base 32 - byteValues = BytesCls.fromBase32(value).asUint8Array() - } else if (isBytes(value)) { - byteValues = getUint8Array(value) - } else { - byteValues = getUint8Array(value.bytes) - } - avmInvariant(byteValues.length === 32, 'Addresses should be 32 bytes') - super(Array.from(byteValues).map((b) => new Byte(b))) + super() } get native(): Account { - return Account(Bytes(this.items.map((i) => i.native))) + throw new NoImplementation() } } @@ -345,20 +283,9 @@ class StructImpl extends StructBase { }) } } - static fromBytes(this: { new (args: T): I }, bytes: BytesCompat): I { - throw new Error('todo') - } - - static fromLog(this: { new (args: T): I }, log: BytesCompat): I { - throw new Error('todo') - } } -type StructConstructor = { - new (initial: T): StructBase & T - fromBytes: (bytes: BytesCompat) => StructBase & T - fromLog: (log: BytesCompat) => StructBase & T -} +type StructConstructor = new (initial: T) => StructBase & T export const Struct = StructImpl as StructConstructor @@ -366,19 +293,11 @@ export class DynamicBytes extends Arc4ReadonlyArray { [TypeProperty]?: `arc4.DynamicBytes` constructor(value?: bytes | string) { - let byteValues: Uint8Array - if (value === undefined) { - byteValues = new Uint8Array(0) - } else if (typeof value === 'string') { - byteValues = BytesCls.fromCompat(value).asUint8Array() - } else { - byteValues = getUint8Array(value) - } - super(Array.from(byteValues).map((b) => new Byte(b))) + super() } get native(): bytes { - return Bytes(this.items.map((i) => i.native)) + throw new NoImplementation() } } @@ -386,19 +305,36 @@ export class StaticBytes extends Arc4ReadonlyArray` constructor(value?: bytes | string) { - let byteValues: Uint8Array - if (value === undefined) { - // TODO: Should be init to TLength - byteValues = new Uint8Array(0) - } else if (typeof value === 'string') { - byteValues = BytesCls.fromCompat(value).asUint8Array() - } else { - byteValues = getUint8Array(value) - } - super(Array.from(byteValues).map((b) => new Byte(b))) + super() } get native(): bytes { - return Bytes(this.items.map((i) => i.native)) + throw new NoImplementation() } } + +/** + * Interpret the provided bytes as an ARC4 encoded type with no validation + * @param bytes An arc4 encoded bytes value + * @param prefix The prefix (if any), present in the bytes value. This prefix will be validated and removed + */ +export function interpretAsArc4(bytes: BytesCompat, prefix: 'none' | 'log' = 'none'): T { + throw new NoImplementation() +} + +/** + * Decode the provided bytes to a native Algorand TypeScript value + * @param bytes An arc4 encoded bytes value + * @param prefix The prefix (if any), present in the bytes value. This prefix will be validated and removed + */ +export function decodeArc4(bytes: BytesCompat, prefix: 'none' | 'log' = 'none'): T { + throw new NoImplementation() +} + +/** + * Encode the provided Algorand TypeScript value as ARC4 bytes + * @param value Any native Algorand TypeScript value with a supported ARC4 encoding + */ +export function encodeArc4(value: T): bytes { + throw new NoImplementation() +} diff --git a/packages/algo-ts/src/impl/errors.ts b/packages/algo-ts/src/impl/errors.ts index fb85a565..32fb9ea6 100644 --- a/packages/algo-ts/src/impl/errors.ts +++ b/packages/algo-ts/src/impl/errors.ts @@ -50,3 +50,13 @@ export class CodeError extends Error { export function codeError(message: string): never { throw new CodeError(message) } + +/** + * This error can be used in stub implementations that are expected to be overridden + * by the testing framework + */ +export class NoImplementation extends Error { + constructor() { + super('This method is intentionally not implemented') + } +} diff --git a/src/awst/node-factory.ts b/src/awst/node-factory.ts index 1a91b4d6..046676e1 100644 --- a/src/awst/node-factory.ts +++ b/src/awst/node-factory.ts @@ -123,10 +123,10 @@ const explicitNodeFactory = { wtype: wtypes.boolWType, }) }, - boolConstant(props: { value: boolean; sourceLocation: SourceLocation }): BoolConstant { + boolConstant(props: { value: boolean; sourceLocation: SourceLocation; wtype?: wtypes.WType }): BoolConstant { return new BoolConstant({ ...props, - wtype: wtypes.boolWType, + wtype: props.wtype ?? wtypes.boolWType, }) }, singleEvaluation({ source }: { source: Expression }) { diff --git a/src/awst_build/arc4-util.ts b/src/awst_build/arc4-util.ts index 1a720605..76fdb594 100644 --- a/src/awst_build/arc4-util.ts +++ b/src/awst_build/arc4-util.ts @@ -7,6 +7,7 @@ import { accountPType, applicationPType, assetPType, + biguintPType, boolPType, bytesPType, GroupTransactionPType, @@ -18,12 +19,11 @@ import { } from './ptypes' import { ARC4BooleanType, - arc4ByteAlias, ARC4EncodedType, ARC4StringType, ARC4StructType, ARC4TupleType, - DynamicArrayType, + DynamicBytesType, UintNType, } from './ptypes/arc4-types' @@ -43,6 +43,7 @@ export function isArc4EncodableType(ptype: PType): boolean { if (ptype instanceof ARC4EncodedType) return true if (ptype.equals(boolPType)) return true if (ptype.equals(uint64PType)) return true + if (ptype.equals(biguintPType)) return true if (ptype.equals(bytesPType)) return true if (ptype.equals(stringPType)) return true if (ptype instanceof TuplePType) return ptype.items.every((i) => isArc4EncodableType(i)) @@ -54,7 +55,8 @@ export function ptypeToArc4EncodedType(ptype: PType, sourceLocation: SourceLocat if (ptype instanceof ARC4EncodedType) return ptype if (ptype.equals(boolPType)) return ARC4BooleanType if (ptype.equals(uint64PType)) return new UintNType({ n: 64n }) - if (ptype.equals(bytesPType)) return new DynamicArrayType({ elementType: arc4ByteAlias }) + if (ptype.equals(biguintPType)) return new UintNType({ n: 512n }) + if (ptype.equals(bytesPType)) return DynamicBytesType if (ptype.equals(stringPType)) return ARC4StringType if (ptype instanceof TuplePType) return new ARC4TupleType({ types: ptype.items.map((i) => ptypeToArc4EncodedType(i, sourceLocation)) }) if (ptype instanceof ObjectPType) diff --git a/src/awst_build/eb/arc4/arrays.ts b/src/awst_build/eb/arc4/arrays.ts index 7f7e5f00..e075cba2 100644 --- a/src/awst_build/eb/arc4/arrays.ts +++ b/src/awst_build/eb/arc4/arrays.ts @@ -25,7 +25,7 @@ import { } from '../../ptypes/arc4-types' import { instanceEb } from '../../type-registry' import type { InstanceBuilder, NodeBuilder } from '../index' -import { FunctionBuilder } from '../index' +import { ClassBuilder, FunctionBuilder } from '../index' import { IterableIteratorExpressionBuilder } from '../iterable-iterator-expression-builder' import { AccountExpressionBuilder } from '../reference/account' import { AtFunctionBuilder } from '../shared/at-function-builder' @@ -33,9 +33,9 @@ import { SliceFunctionBuilder } from '../shared/slice-function-builder' import { UInt64ExpressionBuilder } from '../uint64-expression-builder' import { requireExpressionOfType } from '../util' import { parseFunctionArgs } from '../util/arg-parsing' -import { Arc4EncodedBaseClassBuilder, Arc4EncodedBaseExpressionBuilder } from './base' +import { Arc4EncodedBaseExpressionBuilder } from './base' -export class DynamicArrayClassBuilder extends Arc4EncodedBaseClassBuilder { +export class DynamicArrayClassBuilder extends ClassBuilder { readonly ptype = DynamicArrayConstructor newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { @@ -63,7 +63,7 @@ export class DynamicArrayClassBuilder extends Arc4EncodedBaseClassBuilder { ) } } -export class StaticArrayClassBuilder extends Arc4EncodedBaseClassBuilder { +export class StaticArrayClassBuilder extends ClassBuilder { readonly ptype = StaticArrayConstructor newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { @@ -105,7 +105,7 @@ export class StaticArrayClassBuilder extends Arc4EncodedBaseClassBuilder { ) } } -export class AddressClassBuilder extends Arc4EncodedBaseClassBuilder { +export class AddressClassBuilder extends ClassBuilder { readonly ptype = AddressClass newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { @@ -167,7 +167,7 @@ export class AddressClassBuilder extends Arc4EncodedBaseClassBuilder { ) } } -export class StaticBytesClassBuilder extends Arc4EncodedBaseClassBuilder { +export class StaticBytesClassBuilder extends ClassBuilder { readonly ptype = StaticBytesConstructor newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { @@ -219,7 +219,7 @@ export class StaticBytesClassBuilder extends Arc4EncodedBaseClassBuilder { } } } -export class DynamicBytesClassBuilder extends Arc4EncodedBaseClassBuilder { +export class DynamicBytesClassBuilder extends ClassBuilder { readonly ptype = DynamicBytesConstructor newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { diff --git a/src/awst_build/eb/arc4/base.ts b/src/awst_build/eb/arc4/base.ts index e726ecb9..ca600ecd 100644 --- a/src/awst_build/eb/arc4/base.ts +++ b/src/awst_build/eb/arc4/base.ts @@ -3,42 +3,36 @@ import type { Expression } from '../../../awst/nodes' import { EqualityComparison } from '../../../awst/nodes' import type { SourceLocation } from '../../../awst/source-location' import { wtypes } from '../../../awst/wtypes' -import { CodeError } from '../../../errors' -import { codeInvariant, hexToUint8Array } from '../../../util' -import { bytesPType, type PType } from '../../ptypes' -import { ARC4EncodedType } from '../../ptypes/arc4-types' -import { instanceEb, typeRegistry } from '../../type-registry' +import { tryConvertEnum } from '../../../util' +import { type PType } from '../../ptypes' +import type { ARC4EncodedType } from '../../ptypes/arc4-types' +import { instanceEb } from '../../type-registry' import { BooleanExpressionBuilder } from '../boolean-expression-builder' import { BytesExpressionBuilder } from '../bytes-expression-builder' import type { InstanceBuilder, NodeBuilder } from '../index' -import { BuilderComparisonOp, ClassBuilder, FunctionBuilder, InstanceExpressionBuilder } from '../index' +import { BuilderComparisonOp, FunctionBuilder, InstanceExpressionBuilder } from '../index' +import { requireBuilderOfType } from '../util' import { parseFunctionArgs } from '../util/arg-parsing' -export abstract class Arc4EncodedBaseClassBuilder extends ClassBuilder { - constructor(sourceLocation: SourceLocation) { - super(sourceLocation) - } - memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder { - switch (name) { - case 'fromBytes': - return new Arc4EncodedFromBytesFunctionBuilder(sourceLocation) - case 'fromLog': - return new Arc4EncodedFromLogFunctionBuilder(sourceLocation) - } - return super.memberAccess(name, sourceLocation) - } -} - export class Arc4EncodedBaseExpressionBuilder extends InstanceExpressionBuilder { constructor(expr: Expression, ptype: T) { super(expr, ptype) } compare(other: InstanceBuilder, op: BuilderComparisonOp, sourceLocation: SourceLocation): InstanceBuilder { - switch (op) { - case BuilderComparisonOp.eq: - case BuilderComparisonOp.ne: - throw new CodeError(`${op} operator is not supported on ${this.typeDescription}. Use 'equals' method instead`, { sourceLocation }) + const equalityOp = tryConvertEnum(op, BuilderComparisonOp, EqualityComparison) + + switch (equalityOp) { + case EqualityComparison.eq: + case EqualityComparison.ne: + return new BooleanExpressionBuilder( + nodeFactory.bytesComparisonExpression({ + operator: equalityOp, + lhs: this.toBytes(sourceLocation), + rhs: requireBuilderOfType(other, this.ptype).toBytes(sourceLocation), + sourceLocation, + }), + ) } return super.compare(other, op, sourceLocation) } @@ -101,98 +95,3 @@ class Arc4EqualsFunctionBuilder extends FunctionBuilder { ) } } - -export class Arc4EncodedFromBytesFunctionBuilder extends FunctionBuilder { - constructor( - sourceLocation: SourceLocation, - private ptypeFactory?: (args: PType[]) => ARC4EncodedType, - private genericArgsCount?: number, - ) { - super(sourceLocation) - } - call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { - const funcName = 'fromBytes' - const { - ptypes, - args: [initialValueBuilder], - } = parseFunctionArgs({ - args, - typeArgs, - genericTypeArgs: this.genericArgsCount ?? 1, - funcName, - argSpec: (a) => [a.required(bytesPType)], - callLocation: sourceLocation, - }) - - const ptype = this.ptypeFactory ? this.ptypeFactory(ptypes) : ptypes[0] - codeInvariant(ptype instanceof ARC4EncodedType, 'Expected ARC4EncodedType') - const initialValue = initialValueBuilder.resolve() - const initialValueExpr = nodeFactory.reinterpretCast({ - wtype: ptype.wtype, - sourceLocation, - expr: initialValue, - }) - - return typeRegistry.getInstanceEb(initialValueExpr, ptype) - } -} - -export class Arc4EncodedFromLogFunctionBuilder extends FunctionBuilder { - constructor( - sourceLocation: SourceLocation, - private ptypeFactory?: (args: PType[]) => ARC4EncodedType, - private genericArgsCount?: number, - ) { - super(sourceLocation) - } - - call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { - const funcName = 'fromLog' - const { - ptypes, - args: [initialValueBuilder], - } = parseFunctionArgs({ - args, - typeArgs, - genericTypeArgs: this.genericArgsCount ?? 1, - funcName, - argSpec: (a) => [a.required(bytesPType)], - callLocation: sourceLocation, - }) - - const ptype = this.ptypeFactory ? this.ptypeFactory(ptypes) : ptypes[0] - codeInvariant(ptype instanceof ARC4EncodedType, 'Expected ARC4EncodedType') - const initialValue = initialValueBuilder.resolve() - const arc4Value = nodeFactory.intrinsicCall({ - opCode: 'extract', - immediates: [4n, 0n], - wtype: bytesPType.wtype, - stackArgs: [initialValue], - sourceLocation, - }) - const arc4ValueExpr = nodeFactory.reinterpretCast({ - wtype: ptype.wtype, - sourceLocation, - expr: arc4Value, - }) - const arc4ReturnValuePrefix = nodeFactory.intrinsicCall({ - opCode: 'extract', - immediates: [0n, 4n], - wtype: bytesPType.wtype, - stackArgs: [initialValue], - sourceLocation, - }) - const arc4PrefixIsValid = nodeFactory.bytesComparisonExpression({ - operator: EqualityComparison.eq, - lhs: arc4ReturnValuePrefix, - rhs: nodeFactory.bytesConstant({ value: hexToUint8Array('151F7C75'), sourceLocation }), - sourceLocation, - }) - - const fromLogExpr = nodeFactory.checkedMaybe({ - expr: nodeFactory.tupleExpression({ items: [arc4ValueExpr, arc4PrefixIsValid], sourceLocation }), - comment: 'ARC4 prefix is valid', - }) - return typeRegistry.getInstanceEb(fromLogExpr, ptype) - } -} diff --git a/src/awst_build/eb/arc4/bool.ts b/src/awst_build/eb/arc4/bool.ts index 6bba3f80..e1d5f16b 100644 --- a/src/awst_build/eb/arc4/bool.ts +++ b/src/awst_build/eb/arc4/bool.ts @@ -1,15 +1,55 @@ +import { nodeFactory } from '../../../awst/node-factory' import type { Expression } from '../../../awst/nodes' +import { BoolConstant } from '../../../awst/nodes' import type { SourceLocation } from '../../../awst/source-location' +import { wtypes } from '../../../awst/wtypes' import type { PType } from '../../ptypes' +import { boolPType } from '../../ptypes' import { ARC4BoolClass, ARC4BooleanType, type ARC4EncodedType } from '../../ptypes/arc4-types' import type { InstanceBuilder, NodeBuilder } from '../index' -import { Arc4EncodedBaseClassBuilder, Arc4EncodedBaseExpressionBuilder } from './base' +import { ClassBuilder } from '../index' +import { parseFunctionArgs } from '../util/arg-parsing' +import { Arc4EncodedBaseExpressionBuilder } from './base' -export class BoolClassBuilder extends Arc4EncodedBaseClassBuilder { +export class BoolClassBuilder extends ClassBuilder { readonly ptype = ARC4BoolClass newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { - throw new Error('Method not implemented.') + const { + args: [initialValue], + } = parseFunctionArgs({ + args, + typeArgs, + callLocation: sourceLocation, + funcName: `${this.typeDescription} constructor}`, + genericTypeArgs: 0, + argSpec: (a) => [a.optional(boolPType)], + }) + let expr: Expression + if (!initialValue) { + expr = nodeFactory.boolConstant({ + value: false, + sourceLocation, + wtype: wtypes.arc4BooleanWType, + }) + } else { + const value = initialValue.resolve() + if (value instanceof BoolConstant) { + expr = nodeFactory.boolConstant({ + value: value.value, + sourceLocation, + wtype: wtypes.arc4BooleanWType, + }) + } else { + expr = nodeFactory.aRC4Encode({ + value: value, + wtype: wtypes.arc4BooleanWType, + sourceLocation, + }) + } + } + + return new BoolExpressionBuilder(expr) } } diff --git a/src/awst_build/eb/arc4/string.ts b/src/awst_build/eb/arc4/string.ts index 7d0cf882..3425188a 100644 --- a/src/awst_build/eb/arc4/string.ts +++ b/src/awst_build/eb/arc4/string.ts @@ -8,10 +8,11 @@ import { stringPType } from '../../ptypes' import type { ARC4EncodedType } from '../../ptypes/arc4-types' import { ARC4StrClass, ARC4StringType } from '../../ptypes/arc4-types' import type { InstanceBuilder, NodeBuilder } from '../index' +import { ClassBuilder } from '../index' import { parseFunctionArgs } from '../util/arg-parsing' -import { Arc4EncodedBaseClassBuilder, Arc4EncodedBaseExpressionBuilder } from './base' +import { Arc4EncodedBaseExpressionBuilder } from './base' -export class StrClassBuilder extends Arc4EncodedBaseClassBuilder { +export class StrClassBuilder extends ClassBuilder { readonly ptype = ARC4StrClass newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { diff --git a/src/awst_build/eb/arc4/struct.ts b/src/awst_build/eb/arc4/struct.ts index 7506563b..a7f6c027 100644 --- a/src/awst_build/eb/arc4/struct.ts +++ b/src/awst_build/eb/arc4/struct.ts @@ -7,12 +7,12 @@ import { ObjectPType } from '../../ptypes' import { ARC4StructClass, ARC4StructType } from '../../ptypes/arc4-types' import { instanceEb } from '../../type-registry' import type { NodeBuilder } from '../index' -import { InstanceBuilder } from '../index' +import { ClassBuilder, InstanceBuilder } from '../index' import { requireExpressionOfType } from '../util' import { parseFunctionArgs } from '../util/arg-parsing' -import { Arc4EncodedBaseClassBuilder, Arc4EncodedBaseExpressionBuilder } from './base' +import { Arc4EncodedBaseExpressionBuilder } from './base' -export class StructClassBuilder extends Arc4EncodedBaseClassBuilder { +export class StructClassBuilder extends ClassBuilder { readonly ptype: ARC4StructClass constructor(sourceLocation: SourceLocation, ptype: PType) { diff --git a/src/awst_build/eb/arc4/tuple.ts b/src/awst_build/eb/arc4/tuple.ts index ebade255..17d634ff 100644 --- a/src/awst_build/eb/arc4/tuple.ts +++ b/src/awst_build/eb/arc4/tuple.ts @@ -8,12 +8,12 @@ import { numberPType, TuplePType, uint64PType } from '../../ptypes' import { ARC4EncodedType, Arc4TupleClass, ARC4TupleType } from '../../ptypes/arc4-types' import { instanceEb } from '../../type-registry' import type { InstanceBuilder, NodeBuilder } from '../index' -import { FunctionBuilder } from '../index' +import { ClassBuilder, FunctionBuilder } from '../index' import { requireIntegerConstant } from '../util' import { parseFunctionArgs } from '../util/arg-parsing' -import { Arc4EncodedBaseClassBuilder, Arc4EncodedBaseExpressionBuilder } from './base' +import { Arc4EncodedBaseExpressionBuilder } from './base' -export class Arc4TupleClassBuilder extends Arc4EncodedBaseClassBuilder { +export class Arc4TupleClassBuilder extends ClassBuilder { readonly ptype = Arc4TupleClass newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { diff --git a/src/awst_build/eb/arc4/ufixed.ts b/src/awst_build/eb/arc4/ufixed.ts index 21a0a208..457b28ab 100644 --- a/src/awst_build/eb/arc4/ufixed.ts +++ b/src/awst_build/eb/arc4/ufixed.ts @@ -6,17 +6,12 @@ import { codeInvariant, invariant } from '../../../util' import type { PType } from '../../ptypes' import { NumericLiteralPType, stringPType } from '../../ptypes' import { UFixedNxMClass, UFixedNxMType } from '../../ptypes/arc4-types' -import { type InstanceBuilder, type NodeBuilder } from '../index' +import { ClassBuilder, type InstanceBuilder, type NodeBuilder } from '../index' import { isValidLiteralForPType, requireStringConstant } from '../util' import { parseFunctionArgs } from '../util/arg-parsing' -import { - Arc4EncodedBaseClassBuilder, - Arc4EncodedBaseExpressionBuilder, - Arc4EncodedFromBytesFunctionBuilder, - Arc4EncodedFromLogFunctionBuilder, -} from './base' +import { Arc4EncodedBaseExpressionBuilder } from './base' -export class UFixedNxMClassBuilder extends Arc4EncodedBaseClassBuilder { +export class UFixedNxMClassBuilder extends ClassBuilder { readonly ptype = UFixedNxMClass newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { @@ -45,18 +40,6 @@ export class UFixedNxMClassBuilder extends Arc4EncodedBaseClassBuilder { return newUFixedNxM(initialValueBuilder, ptype, sourceLocation) } - - memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder { - const ptypeFactory = (args: PType[]) => - new UFixedNxMType({ n: (args[0] as NumericLiteralPType).literalValue, m: (args[1] as NumericLiteralPType).literalValue }) - switch (name) { - case 'fromBytes': - return new Arc4EncodedFromBytesFunctionBuilder(sourceLocation, ptypeFactory, 2) - case 'fromLog': - return new Arc4EncodedFromLogFunctionBuilder(sourceLocation, ptypeFactory, 2) - } - return super.memberAccess(name, sourceLocation) - } } function newUFixedNxM(initialValue: InstanceBuilder | undefined, ptype: UFixedNxMType, sourceLocation: SourceLocation) { diff --git a/src/awst_build/eb/arc4/uintn.ts b/src/awst_build/eb/arc4/uintn.ts index 8d2af715..8553b69c 100644 --- a/src/awst_build/eb/arc4/uintn.ts +++ b/src/awst_build/eb/arc4/uintn.ts @@ -4,20 +4,16 @@ import { IntegerConstant } from '../../../awst/nodes' import type { SourceLocation } from '../../../awst/source-location' import { CodeError } from '../../../errors' import { bigIntToUint8Array, codeInvariant, invariant } from '../../../util' -import type { PType } from '../../ptypes' +import type { LibClassType, PType } from '../../ptypes' import { biguintPType, NumericLiteralPType, uint64PType } from '../../ptypes' -import { arc4ByteAlias, ByteClass, UintNClass, UintNType } from '../../ptypes/arc4-types' +import { UintNClass, UintNType } from '../../ptypes/arc4-types' import type { InstanceBuilder, NodeBuilder } from '../index' +import { ClassBuilder } from '../index' import { isValidLiteralForPType } from '../util' import { parseFunctionArgs } from '../util/arg-parsing' -import { - Arc4EncodedBaseClassBuilder, - Arc4EncodedBaseExpressionBuilder, - Arc4EncodedFromBytesFunctionBuilder, - Arc4EncodedFromLogFunctionBuilder, -} from './base' +import { Arc4EncodedBaseExpressionBuilder } from './base' -export class UintNClassBuilder extends Arc4EncodedBaseClassBuilder { +export class UintNClassBuilder extends ClassBuilder { readonly ptype = UintNClass newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { @@ -41,35 +37,25 @@ export class UintNClassBuilder extends Arc4EncodedBaseClassBuilder { return newUintN(initialValueBuilder, ptype, sourceLocation) } - - memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder { - const ptypeFactory = (args: PType[]) => new UintNType({ n: (args[0] as NumericLiteralPType).literalValue }) - switch (name) { - case 'fromBytes': - return new Arc4EncodedFromBytesFunctionBuilder(sourceLocation, ptypeFactory) - case 'fromLog': - return new Arc4EncodedFromLogFunctionBuilder(sourceLocation, ptypeFactory) - } - return super.memberAccess(name, sourceLocation) - } } +export const classBuilderForUintNAlias = (aliasClass: LibClassType, aliasInstance: UintNType) => { + return class extends ClassBuilder { + readonly ptype = aliasClass -export class ByteClassBuilder extends Arc4EncodedBaseClassBuilder { - readonly ptype = ByteClass - - newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { - const { - args: [initialValueBuilder], - } = parseFunctionArgs({ - args, - typeArgs, - genericTypeArgs: 0, - funcName: 'Byte constructor', - argSpec: (a) => [a.optional()], - callLocation: sourceLocation, - }) + newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { + const { + args: [initialValueBuilder], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: 1, + funcName: `${this.typeDescription} constructor`, + argSpec: (a) => [a.optional()], + callLocation: sourceLocation, + }) - return newUintN(initialValueBuilder, arc4ByteAlias, sourceLocation) + return newUintN(initialValueBuilder, aliasInstance, sourceLocation) + } } } diff --git a/src/awst_build/eb/arc4/util.ts b/src/awst_build/eb/arc4/util.ts new file mode 100644 index 00000000..d8be6a28 --- /dev/null +++ b/src/awst_build/eb/arc4/util.ts @@ -0,0 +1,154 @@ +import { nodeFactory } from '../../../awst/node-factory' +import type { BytesConstant, Expression } from '../../../awst/nodes' +import { EqualityComparison } from '../../../awst/nodes' +import type { SourceLocation } from '../../../awst/source-location' +import { logger } from '../../../logger' +import { codeInvariant, hexToUint8Array } from '../../../util' +import { isArc4EncodableType, ptypeToArc4EncodedType } from '../../arc4-util' +import type { PType } from '../../ptypes' +import { bytesPType, stringPType } from '../../ptypes' +import { ARC4EncodedType, decodeArc4Function, encodeArc4Function, interpretAsArc4Function } from '../../ptypes/arc4-types' +import { instanceEb } from '../../type-registry' +import type { InstanceBuilder, NodeBuilder } from '../index' +import { FunctionBuilder } from '../index' +import { requireStringConstant } from '../util' +import { parseFunctionArgs } from '../util/arg-parsing' + +export class InterpretAsArc4FunctionBuilder extends FunctionBuilder { + readonly ptype = interpretAsArc4Function + + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { + const { + ptypes: [ptype], + args: [theBytes, prefixType], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: 1, + funcName: this.typeDescription, + argSpec: (a) => [a.required(bytesPType), a.optional(stringPType)], + callLocation: sourceLocation, + }) + codeInvariant(ptype instanceof ARC4EncodedType, 'Generic type must be an ARC4 encoded type') + + const prefixBytes = getPrefixValue(prefixType) + + return instanceEb( + nodeFactory.reinterpretCast({ + expr: validatePrefix(theBytes, prefixBytes, sourceLocation), + wtype: ptype.wtype, + sourceLocation, + }), + ptype, + ) + } +} +export class EncodeArc4FunctionBuilder extends FunctionBuilder { + readonly ptype = encodeArc4Function + + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { + const { + args: [valueToEncode], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: 1, + funcName: this.typeDescription, + argSpec: (a) => [a.required()], + callLocation: sourceLocation, + }) + const encodedType = ptypeToArc4EncodedType(valueToEncode.ptype, sourceLocation) + + return instanceEb( + nodeFactory.reinterpretCast({ + expr: nodeFactory.aRC4Encode({ + value: valueToEncode.resolve(), + wtype: encodedType.wtype, + sourceLocation, + }), + sourceLocation, + wtype: bytesPType.wtype, + }), + bytesPType, + ) + } +} +export class DecodeArc4FunctionBuilder extends FunctionBuilder { + readonly ptype = decodeArc4Function + + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { + const { + ptypes: [ptype], + args: [theBytes, prefixType], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: 1, + funcName: this.typeDescription, + argSpec: (a) => [a.required(bytesPType), a.optional(stringPType)], + callLocation: sourceLocation, + }) + codeInvariant(isArc4EncodableType(ptype), `Cannot determine ARC4 encoding for ${ptype}`, sourceLocation) + + const arc4Encoded = ptypeToArc4EncodedType(ptype, sourceLocation) + + const prefixBytes = getPrefixValue(prefixType) + + return instanceEb( + nodeFactory.aRC4Decode({ + value: nodeFactory.reinterpretCast({ + expr: validatePrefix(theBytes, prefixBytes, sourceLocation), + sourceLocation, + wtype: arc4Encoded.wtype, + }), + wtype: ptype.wtypeOrThrow, + sourceLocation, + }), + ptype, + ) + } +} +function validatePrefix(base: InstanceBuilder, expectedPrefix: BytesConstant | undefined, sourceLocation: SourceLocation): Expression { + if (expectedPrefix === undefined) return base.resolve() + + const baseSingle = base.singleEvaluation().resolve() + + const baseNoPrefix = nodeFactory.intrinsicCall({ + opCode: 'extract', + immediates: [4n, 0n], + wtype: bytesPType.wtype, + stackArgs: [baseSingle], + sourceLocation, + }) + const observedPrefix = nodeFactory.intrinsicCall({ + opCode: 'extract', + immediates: [0n, 4n], + wtype: bytesPType.wtype, + stackArgs: [baseSingle], + sourceLocation, + }) + const prefixIsValid = nodeFactory.bytesComparisonExpression({ + operator: EqualityComparison.eq, + lhs: observedPrefix, + rhs: expectedPrefix, + sourceLocation, + }) + + return nodeFactory.checkedMaybe({ + expr: nodeFactory.tupleExpression({ items: [baseNoPrefix, prefixIsValid], sourceLocation }), + comment: 'Bytes has valid prefix', + }) +} + +function getPrefixValue(arg: InstanceBuilder | undefined): BytesConstant | undefined { + if (arg === undefined) return undefined + const value = requireStringConstant(arg).value + switch (value) { + case 'log': + return nodeFactory.bytesConstant({ value: hexToUint8Array('151F7C75'), sourceLocation: arg.sourceLocation }) + case 'none': + return undefined + default: + logger.error(arg.sourceLocation, `Expected literal string: 'none' | 'log'`) + } +} diff --git a/src/awst_build/eb/assert-match-function-builder.ts b/src/awst_build/eb/assert-match-function-builder.ts index e5571053..db76c57e 100644 --- a/src/awst_build/eb/assert-match-function-builder.ts +++ b/src/awst_build/eb/assert-match-function-builder.ts @@ -6,11 +6,10 @@ import type { SourceLocation } from '../../awst/source-location' import { CodeError } from '../../errors' import { codeInvariant } from '../../util' import type { PType } from '../ptypes' -import { assertMatchFunction, stringPType, TuplePType, uint64PType } from '../ptypes' +import { assertMatchFunction, ObjectPType, stringPType, TuplePType, uint64PType } from '../ptypes' import { instanceEb } from '../type-registry' import type { InstanceBuilder } from './index' import { BuilderComparisonOp, NodeBuilder } from './index' -import { ObjectLiteralExpressionBuilder } from './literal/object-literal-expression-builder' import { requireBuilderOfType, requireInstanceBuilder, requireStringConstant } from './util' import { parseFunctionArgs } from './util/arg-parsing' import { VoidExpressionBuilder } from './void-expression-builder' @@ -31,7 +30,7 @@ export class AssertMatchFunctionBuilder extends NodeBuilder { }) codeInvariant(subject, 'subject parameter is missing', sourceLocation) - codeInvariant(tests instanceof ObjectLiteralExpressionBuilder, 'Test conditions must be an object literal', tests.sourceLocation) + codeInvariant(tests.ptype instanceof ObjectPType, 'Test conditions must be an object type', tests.sourceLocation) const condition = tests.ptype .orderedProperties() diff --git a/src/awst_build/ptypes/arc4-types.ts b/src/awst_build/ptypes/arc4-types.ts index 650112e9..e8ddacb0 100644 --- a/src/awst_build/ptypes/arc4-types.ts +++ b/src/awst_build/ptypes/arc4-types.ts @@ -8,6 +8,7 @@ import { boolPType, bytesPType, LibClassType, + LibFunctionType, NumericLiteralPType, ObjectPType, stringPType, @@ -25,6 +26,30 @@ export const ByteClass = new LibClassType({ name: 'Byte', module: Constants.arc4EncodedTypesModuleName, }) +export const UintN8Class = new LibClassType({ + name: 'UintN8', + module: Constants.arc4EncodedTypesModuleName, +}) +export const UintN16Class = new LibClassType({ + name: 'UintN16', + module: Constants.arc4EncodedTypesModuleName, +}) +export const UintN32Class = new LibClassType({ + name: 'UintN32', + module: Constants.arc4EncodedTypesModuleName, +}) +export const UintN64Class = new LibClassType({ + name: 'UintN64', + module: Constants.arc4EncodedTypesModuleName, +}) +export const UintN128Class = new LibClassType({ + name: 'UintN128', + module: Constants.arc4EncodedTypesModuleName, +}) +export const UintN256Class = new LibClassType({ + name: 'UintN256', + module: Constants.arc4EncodedTypesModuleName, +}) export abstract class ARC4EncodedType extends PType { abstract readonly wtype: wtypes.ARC4Type abstract readonly nativeType: PType | undefined @@ -475,3 +500,18 @@ export const DynamicBytesType = new DynamicArrayType({ elementType: arc4ByteAlias, nativeType: bytesPType, }) + +export const interpretAsArc4Function = new LibFunctionType({ + name: 'interpretAsArc4', + module: Constants.arc4EncodedTypesModuleName, +}) + +export const encodeArc4Function = new LibFunctionType({ + name: 'encodeArc4', + module: Constants.arc4EncodedTypesModuleName, +}) + +export const decodeArc4Function = new LibFunctionType({ + name: 'decodeArc4', + module: Constants.arc4EncodedTypesModuleName, +}) diff --git a/src/awst_build/ptypes/register.ts b/src/awst_build/ptypes/register.ts index 22c43b46..c5d69648 100644 --- a/src/awst_build/ptypes/register.ts +++ b/src/awst_build/ptypes/register.ts @@ -16,7 +16,8 @@ import { StrClassBuilder, StrExpressionBuilder } from '../eb/arc4/string' import { StructClassBuilder, StructExpressionBuilder } from '../eb/arc4/struct' import { Arc4TupleClassBuilder, Arc4TupleExpressionBuilder } from '../eb/arc4/tuple' import { UFixedNxMClassBuilder, UFixedNxMExpressionBuilder } from '../eb/arc4/ufixed' -import { ByteClassBuilder, UintNClassBuilder, UintNExpressionBuilder } from '../eb/arc4/uintn' +import { classBuilderForUintNAlias, UintNClassBuilder, UintNExpressionBuilder } from '../eb/arc4/uintn' +import { DecodeArc4FunctionBuilder, EncodeArc4FunctionBuilder, InterpretAsArc4FunctionBuilder } from '../eb/arc4/util' import { AssertFunctionBuilder, ErrFunctionBuilder } from '../eb/assert-function-builder' import { AssertMatchFunctionBuilder } from '../eb/assert-match-function-builder' import { BigUintExpressionBuilder, BigUintFunctionBuilder } from '../eb/biguint-expression-builder' @@ -74,11 +75,14 @@ import { Arc4TupleGeneric, ARC4TupleType, ByteClass, + decodeArc4Function, DynamicArrayConstructor, DynamicArrayGeneric, DynamicArrayType, DynamicBytesConstructor, DynamicBytesType, + encodeArc4Function, + interpretAsArc4Function, StaticArrayConstructor, StaticArrayGeneric, StaticArrayType, @@ -88,6 +92,12 @@ import { UFixedNxMClass, UFixedNxMGeneric, UFixedNxMType, + UintN128Class, + UintN16Class, + UintN256Class, + UintN32Class, + UintN64Class, + UintN8Class, UintNClass, UintNGeneric, UintNType, @@ -286,7 +296,13 @@ export function registerPTypes(typeRegistry: TypeRegistry) { typeRegistry.register({ ptype: UintNClass, singletonEb: UintNClassBuilder }) typeRegistry.register({ ptype: arc4AbiMethodDecorator, singletonEb: Arc4AbiMethodDecoratorBuilder }) typeRegistry.register({ ptype: arc4BareMethodDecorator, singletonEb: Arc4BareMethodDecoratorBuilder }) - typeRegistry.register({ ptype: ByteClass, singletonEb: ByteClassBuilder }) + typeRegistry.register({ ptype: ByteClass, singletonEb: classBuilderForUintNAlias(ByteClass, arc4ByteAlias) }) + typeRegistry.register({ ptype: UintN8Class, singletonEb: classBuilderForUintNAlias(UintN8Class, new UintNType({ n: 8n })) }) + typeRegistry.register({ ptype: UintN16Class, singletonEb: classBuilderForUintNAlias(UintN8Class, new UintNType({ n: 16n })) }) + typeRegistry.register({ ptype: UintN32Class, singletonEb: classBuilderForUintNAlias(UintN8Class, new UintNType({ n: 32n })) }) + typeRegistry.register({ ptype: UintN64Class, singletonEb: classBuilderForUintNAlias(UintN8Class, new UintNType({ n: 64n })) }) + typeRegistry.register({ ptype: UintN128Class, singletonEb: classBuilderForUintNAlias(UintN8Class, new UintNType({ n: 128n })) }) + typeRegistry.register({ ptype: UintN256Class, singletonEb: classBuilderForUintNAlias(UintN8Class, new UintNType({ n: 256n })) }) typeRegistry.registerGeneric({ generic: UintNGeneric, ptype: UintNType, instanceEb: UintNExpressionBuilder }) typeRegistry.register({ ptype: UFixedNxMClass, singletonEb: UFixedNxMClassBuilder }) typeRegistry.registerGeneric({ generic: UFixedNxMGeneric, ptype: UFixedNxMType, instanceEb: UFixedNxMExpressionBuilder }) @@ -309,6 +325,9 @@ export function registerPTypes(typeRegistry: TypeRegistry) { typeRegistry.register({ ptype: StaticBytesConstructor, singletonEb: StaticBytesClassBuilder }) typeRegistry.register({ ptype: DynamicBytesType, instanceEb: DynamicBytesExpressionBuilder }) typeRegistry.registerGeneric({ generic: StaticBytesGeneric, ptype: StaticBytesType, instanceEb: StaticBytesExpressionBuilder }) + typeRegistry.register({ ptype: interpretAsArc4Function, singletonEb: InterpretAsArc4FunctionBuilder }) + typeRegistry.register({ ptype: encodeArc4Function, singletonEb: EncodeArc4FunctionBuilder }) + typeRegistry.register({ ptype: decodeArc4Function, singletonEb: DecodeArc4FunctionBuilder }) // GTXN types typeRegistry.register({ ptype: paymentGtxnType, instanceEb: GroupTransactionExpressionBuilder }) diff --git a/src/awst_build/type-resolver.ts b/src/awst_build/type-resolver.ts index 717a729a..728e910d 100644 --- a/src/awst_build/type-resolver.ts +++ b/src/awst_build/type-resolver.ts @@ -38,7 +38,7 @@ import { unknownPType, voidPType, } from './ptypes' -import { ARC4EncodedType, arc4StructBaseType, ARC4StructClass, ARC4StructType } from './ptypes/arc4-types' +import { ARC4EncodedType, arc4StructBaseType, ARC4StructClass, ARC4StructType, UintNType } from './ptypes/arc4-types' import { SymbolName } from './symbol-name' import { typeRegistry } from './type-registry' @@ -217,10 +217,14 @@ export class TypeResolver { if (typeName.fullName === baseContractType.fullName) return baseContractType if (typeName.fullName === arc4StructBaseType.fullName) return arc4StructBaseType if (typeName.fullName === logicSigBaseType.fullName) return logicSigBaseType + const [baseType, ...rest] = tsType.getBaseTypes()?.map((t) => this.resolveType(t, sourceLocation)) ?? [] invariant(rest.length === 0, 'Class can have at most one base type') + // Treat sub-types of UintN type as the base type. + if (baseType instanceof UintNType) return baseType + if (baseType instanceof ContractClassPType) { return this.reflectContractType(typeName, tsType, baseType, sourceLocation) } diff --git a/tests/approvals/arc4-encode-decode.algo.ts b/tests/approvals/arc4-encode-decode.algo.ts new file mode 100644 index 00000000..c8547fd9 --- /dev/null +++ b/tests/approvals/arc4-encode-decode.algo.ts @@ -0,0 +1,36 @@ +import type { biguint, bytes, uint64 } from '@algorandfoundation/algorand-typescript' +import { assert, assertMatch, Contract } from '@algorandfoundation/algorand-typescript' +import { Bool, decodeArc4, DynamicBytes, encodeArc4, Str, Struct, UintN, UintN64 } from '@algorandfoundation/algorand-typescript/arc4' + +class TestStruct extends Struct<{ a: UintN64; b: DynamicBytes }> {} +type TestObj = { a: UintN64; b: DynamicBytes } +export class Arc4EncodeDecode extends Contract { + testEncoding(a: uint64, b: boolean, c: biguint, d: bytes, e: string) { + assert(encodeArc4(a) === new UintN64(a).bytes) + assert(encodeArc4(b) === new Bool(b).bytes) + assert(encodeArc4(c) === new UintN<512>(c).bytes) + assert(encodeArc4(d) === new DynamicBytes(d).bytes) + assert(encodeArc4(e) === new Str(e).bytes) + assert(encodeArc4({ a, b: d }) === new TestStruct({ a: new UintN64(a), b: new DynamicBytes(d) }).bytes) + } + + testDecoding( + a: uint64, + a_bytes: bytes, + b: boolean, + b_bytes: bytes, + c: biguint, + c_bytes: bytes, + d: string, + d_bytes: bytes, + e: TestObj, + e_bytes: bytes, + ) { + assert(decodeArc4(a_bytes) === a) + assert(decodeArc4(b_bytes) === b) + assert(decodeArc4(c_bytes) === c) + assert(decodeArc4(d_bytes) === d) + + assertMatch(decodeArc4(e_bytes), e) + } +} diff --git a/tests/approvals/arc4-struct.algo.ts b/tests/approvals/arc4-struct.algo.ts index 9a970d6c..b7880761 100644 --- a/tests/approvals/arc4-struct.algo.ts +++ b/tests/approvals/arc4-struct.algo.ts @@ -1,5 +1,5 @@ import { assert, Contract, log } from '@algorandfoundation/algorand-typescript' -import { Struct, UintN } from '@algorandfoundation/algorand-typescript/arc4' +import { interpretAsArc4, Struct, UintN } from '@algorandfoundation/algorand-typescript/arc4' type ARC4Uint64 = UintN<64> const ARC4Uint64 = UintN<64> @@ -12,7 +12,7 @@ class StructDemo extends Contract { log(v1.x) log(v1.y) const v2 = new Vector({ y: new ARC4Uint64(0), x: new ARC4Uint64(0) }) - assert(v1.equals(v2)) + assert(v1 === v2) } public addVectors(v1: Vector, v2: Vector) { @@ -28,4 +28,9 @@ class StructDemo extends Contract { assert(v1.bytes === v2.bytes) assert(v3.bytes === v1.bytes) } + + public toAndFromBytes(v1: Vector): Vector { + const v1_bytes = v1.bytes + return interpretAsArc4(v1_bytes) + } } diff --git a/tests/approvals/arc4-types.algo.ts b/tests/approvals/arc4-types.algo.ts index 7366db40..ad1ecb14 100644 --- a/tests/approvals/arc4-types.algo.ts +++ b/tests/approvals/arc4-types.algo.ts @@ -1,26 +1,29 @@ import type { biguint, bytes, uint64 } from '@algorandfoundation/algorand-typescript' -import { arc4, assert, BaseContract, Bytes, Txn } from '@algorandfoundation/algorand-typescript' +import { arc4, assert, BaseContract, BigUint, Bytes, Txn } from '@algorandfoundation/algorand-typescript' import { Address, Byte, DynamicArray, DynamicBytes, + interpretAsArc4, StaticArray, StaticBytes, Str, Tuple, UFixedNxM, UintN, + UintN32, + UintN64, } from '@algorandfoundation/algorand-typescript/arc4' function testUFixed() { const a = new UFixedNxM<32, 4>('1.244') const c = new UFixedNxM<32, 4>('1.244') - assert(a.equals(c)) + assert(a === c) } -function test(n: uint64, b: biguint, c: UintN<256>) { +function testUintN(n: uint64, b: biguint, c: UintN<256>) { const x = new UintN<8>(4) assert(x.bytes.length === 1) const x2 = new UintN<8>(255n) @@ -36,6 +39,21 @@ function test(n: uint64, b: biguint, c: UintN<256>) { assert(a_native === b) assert(c.bytes.length === 256 / 8) + + const a_bytes = a.bytes + const a_from_bytes = interpretAsArc4>(a_bytes) + + assert(a_from_bytes === a) + + const aliased64 = new UintN64(12) + + assert(aliased64.native === 12) + const aliased32 = new UintN32(50545) + assert(BigUint(aliased32.bytes) === 50545n) + + const byte = new Byte(255) + + assert(byte.bytes.bitwiseInvert() === Bytes.fromHex('00')) } function testStr() { @@ -43,6 +61,12 @@ function testStr() { assert(s1.bytes === new UintN<16>(0).bytes, 'Empty string should equal the uint16 length prefix') const s2 = new Str('Hello') assert(s2.native === 'Hello') + + const s2_bytes = s2.bytes + + const s2_from_bytes = interpretAsArc4(s2_bytes) + + assert(s2 === s2_from_bytes) } function testDynamicBytes(someBytes: bytes) { @@ -72,33 +96,33 @@ function testArrays(n: ARC4Uint64) { const myStatic = new StaticArray(n, n) - assert(myStatic[0].equals(myArray.pop())) + assert(myStatic[0] === myArray.pop()) myStatic[1] = new UintN<64>(50) - // const myStatic2 = new StaticArray(n, n, n) + const myStatic2 = new StaticArray(n, n, n) } function testByte() { const b = new Byte() const b2 = new Byte(0) - assert(b.equals(b2)) + assert(b === b2) } function testAddress() { const a = new Address() const b = new Address(Txn.sender) - assert(!a.equals(b), 'Zero address should not match sender') - assert(a.equals(new Address()), 'Two zero addresses should match') - assert(a[0].equals(new Byte()), 'Zero address should start with zero byte') + assert(a !== b, 'Zero address should not match sender') + assert(a === new Address(), 'Two zero addresses should match') + assert(a[0] === new Byte(), 'Zero address should start with zero byte') } function testTuple() { const t = new Tuple(new ARC4Uint64(34)) const firstItem = t.at(0) const firstItemIndexer = t.native[0] - assert(firstItem.equals(firstItemIndexer)) + assert(firstItem === firstItemIndexer) const t1 = new Tuple(new Address(), new Byte()) assert(t1.length === 2) } @@ -111,7 +135,7 @@ export class Arc4TypesTestContract extends BaseContract { public approvalProgram(): boolean { const x = new ARC4Uint64() testStr() - test(1, 2n, new UintN<256>(4)) + testUintN(1, 2n, new UintN<256>(4)) testUFixed() testByte() testArrays(new UintN<64>(65)) diff --git a/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.approval.teal b/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.approval.teal new file mode 100644 index 00000000..a9ebcac6 --- /dev/null +++ b/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.approval.teal @@ -0,0 +1,396 @@ +#pragma version 10 + +tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.approvalProgram: + intcblock 0 1 8 64 + bytecblock 0x00 0x + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.constructor() -> void: +constructor: + // tests/approvals/arc4-encoded-decode.algo.ts:7 + // export class Arc4EncodedDecode extends Contract { + proto 0 0 + retsub + + +// tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/arc4-encoded-decode.algo.ts:7 + // export class Arc4EncodedDecode extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@6 + txna ApplicationArgs 0 + pushbytes 0x9be85afa // method "testEncoding(uint64,bool,uint512,byte[],string)void" + pushbytes 0xa2d335ac // method "testDecoding(uint64,byte[],bool,byte[],uint512,byte[],string,byte[],(uint64,byte[]),byte[])void" + uncover 2 + match __puya_arc4_router___testEncoding_route@2 __puya_arc4_router___testDecoding_route@3 + b __puya_arc4_router___switch_case_default@4 + +__puya_arc4_router___testEncoding_route@2: + // tests/approvals/arc4-encoded-decode.algo.ts:8 + // testEncoding(a: uint64, b: boolean, c: biguint, d: bytes, e: string) { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/arc4-encoded-decode.algo.ts:7 + // export class Arc4EncodedDecode extends Contract { + txna ApplicationArgs 1 + btoi + txna ApplicationArgs 2 + intc_0 // 0 + getbit + txna ApplicationArgs 3 + txna ApplicationArgs 4 + extract 2 0 + txna ApplicationArgs 5 + extract 2 0 + // tests/approvals/arc4-encoded-decode.algo.ts:8 + // testEncoding(a: uint64, b: boolean, c: biguint, d: bytes, e: string) { + uncover 4 + uncover 4 + uncover 4 + uncover 4 + uncover 4 + callsub testEncoding + intc_1 // 1 + retsub + +__puya_arc4_router___testDecoding_route@3: + // tests/approvals/arc4-encoded-decode.algo.ts:17-28 + // testDecoding( + // a: uint64, + // a_bytes: bytes, + // b: boolean, + // b_bytes: bytes, + // c: biguint, + // c_bytes: bytes, + // d: string, + // d_bytes: bytes, + // e: TestObj, + // e_bytes: bytes, + // ) { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/arc4-encoded-decode.algo.ts:7 + // export class Arc4EncodedDecode extends Contract { + txna ApplicationArgs 1 + btoi + txna ApplicationArgs 2 + extract 2 0 + txna ApplicationArgs 3 + intc_0 // 0 + getbit + txna ApplicationArgs 4 + extract 2 0 + txna ApplicationArgs 5 + txna ApplicationArgs 6 + extract 2 0 + txna ApplicationArgs 7 + extract 2 0 + txna ApplicationArgs 8 + extract 2 0 + txna ApplicationArgs 9 + dup + intc_0 // 0 + intc_2 // 8 + extract3 // on error: Index access is out of bounds + swap + dup + intc_2 // 8 + extract_uint16 + swap + dup + len + swap + uncover 2 + uncover 2 + substring3 + txna ApplicationArgs 10 + extract 2 0 + // tests/approvals/arc4-encoded-decode.algo.ts:17-28 + // testDecoding( + // a: uint64, + // a_bytes: bytes, + // b: boolean, + // b_bytes: bytes, + // c: biguint, + // c_bytes: bytes, + // d: string, + // d_bytes: bytes, + // e: TestObj, + // e_bytes: bytes, + // ) { + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + callsub testDecoding + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@4: + b __puya_arc4_router___after_if_else@10 + +__puya_arc4_router___bare_routing@6: + // tests/approvals/arc4-encoded-decode.algo.ts:7 + // export class Arc4EncodedDecode extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@7 + b __puya_arc4_router___switch_case_default@8 + +__puya_arc4_router_____algots__.defaultCreate@7: + // tests/approvals/arc4-encoded-decode.algo.ts:7 + // export class Arc4EncodedDecode extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@8: + +__puya_arc4_router___after_if_else@10: + // tests/approvals/arc4-encoded-decode.algo.ts:7 + // export class Arc4EncodedDecode extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.testEncoding(a: uint64, b: uint64, c: bytes, d: bytes, e: bytes) -> void: +testEncoding: + // tests/approvals/arc4-encoded-decode.algo.ts:8 + // testEncoding(a: uint64, b: boolean, c: biguint, d: bytes, e: string) { + proto 5 0 + // tests/approvals/arc4-encoded-decode.algo.ts:9 + // assert(encodeArc4(a) === new UintN64(a).bytes) + frame_dig -5 + itob + frame_dig -5 + itob + == + assert + // tests/approvals/arc4-encoded-decode.algo.ts:10 + // assert(encodeArc4(b) === new Bool(b).bytes) + bytec_0 // 0x00 + intc_0 // 0 + frame_dig -4 + setbit + bytec_0 // 0x00 + intc_0 // 0 + frame_dig -4 + setbit + == + assert + // tests/approvals/arc4-encoded-decode.algo.ts:11 + // assert(encodeArc4(c) === new UintN<512>(c).bytes) + frame_dig -3 + len + intc_3 // 64 + <= + assert // overflow + intc_3 // 64 + bzero + frame_dig -3 + b| + frame_dig -3 + len + intc_3 // 64 + <= + assert // overflow + intc_3 // 64 + bzero + frame_dig -3 + b| + == + assert + // tests/approvals/arc4-encoded-decode.algo.ts:12 + // assert(encodeArc4(d) === new DynamicBytes(d).bytes) + frame_dig -2 + len + itob + extract 6 2 + frame_dig -2 + concat + frame_dig -2 + len + itob + extract 6 2 + frame_dig -2 + concat + == + assert + // tests/approvals/arc4-encoded-decode.algo.ts:13 + // assert(encodeArc4(e) === new Str(e).bytes) + frame_dig -1 + len + itob + extract 6 2 + frame_dig -1 + concat + frame_dig -1 + len + itob + extract 6 2 + frame_dig -1 + concat + == + assert + // tests/approvals/arc4-encoded-decode.algo.ts:14 + // assert(encodeArc4({ a, b: d }) === new TestStruct({ a: new UintN64(a), b: new DynamicBytes(d) }).bytes) + frame_dig -5 + itob + frame_dig -2 + len + itob + extract 6 2 + frame_dig -2 + concat + swap + bytec_1 // 0x + swap + concat + pushint 10 // 10 + itob + extract 6 2 + concat + swap + concat + frame_dig -5 + itob + frame_dig -2 + len + itob + extract 6 2 + frame_dig -2 + concat + swap + bytec_1 // 0x + swap + concat + pushint 10 // 10 + itob + extract 6 2 + concat + swap + concat + == + assert + retsub + + +// tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.testDecoding(a: uint64, a_bytes: bytes, b: uint64, b_bytes: bytes, c: bytes, c_bytes: bytes, d: bytes, d_bytes: bytes, e.a: bytes, e.b: bytes, e_bytes: bytes) -> void: +testDecoding: + // tests/approvals/arc4-encoded-decode.algo.ts:17-28 + // testDecoding( + // a: uint64, + // a_bytes: bytes, + // b: boolean, + // b_bytes: bytes, + // c: biguint, + // c_bytes: bytes, + // d: string, + // d_bytes: bytes, + // e: TestObj, + // e_bytes: bytes, + // ) { + proto 11 0 + // tests/approvals/arc4-encoded-decode.algo.ts:29 + // assert(decodeArc4(a_bytes) === a) + frame_dig -10 + btoi + frame_dig -11 + == + assert + // tests/approvals/arc4-encoded-decode.algo.ts:30 + // assert(decodeArc4(b_bytes) === b) + frame_dig -8 + intc_0 // 0 + getbit + frame_dig -9 + == + assert + // tests/approvals/arc4-encoded-decode.algo.ts:31 + // assert(decodeArc4(c_bytes) === c) + frame_dig -6 + frame_dig -7 + b== + assert + // tests/approvals/arc4-encoded-decode.algo.ts:32 + // assert(decodeArc4(d_bytes) === d) + frame_dig -4 + extract 2 0 + frame_dig -5 + == + assert + // tests/approvals/arc4-encoded-decode.algo.ts:34 + // assertMatch(decodeArc4(e_bytes), e) + frame_dig -1 + intc_0 // 0 + intc_2 // 8 + extract3 // on error: Index access is out of bounds + frame_dig -3 + == + bz testDecoding_bool_false@3 + frame_dig -1 + intc_2 // 8 + extract_uint16 + frame_dig -1 + len + frame_dig -1 + uncover 2 + uncover 2 + substring3 + frame_dig -2 + == + bz testDecoding_bool_false@3 + intc_1 // 1 + b testDecoding_bool_merge@4 + +testDecoding_bool_false@3: + intc_0 // 0 + +testDecoding_bool_merge@4: + // tests/approvals/arc4-encoded-decode.algo.ts:34 + // assertMatch(decodeArc4(e_bytes), e) + assert // assert target is match for conditions + retsub + + +// tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/arc4-encoded-decode.algo.ts:7 + // export class Arc4EncodedDecode extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.arc32.json b/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.arc32.json new file mode 100644 index 00000000..6a6b68c5 --- /dev/null +++ b/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.arc32.json @@ -0,0 +1,140 @@ +{ + "hints": { + "testEncoding(uint64,bool,uint512,byte[],string)void": { + "call_config": { + "no_op": "CALL" + } + }, + "testDecoding(uint64,byte[],bool,byte[],uint512,byte[],string,byte[],(uint64,byte[]),byte[])void": { + "call_config": { + "no_op": "CALL" + }, + "structs": { + "e": { + "name": "TestObj", + "elements": [ + [ + "a", + "uint64" + ], + [ + "b", + "byte[]" + ] + ] + } + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uI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UA0OgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtZW5jb2RlZC1kZWNvZGUuYWxnby50czozNAogICAgLy8gYXNzZXJ0TWF0Y2goZGVjb2RlQXJjNDxUZXN0T2JqPihlX2J5dGVzKSwgZSkKICAgIGFzc2VydCAvLyBhc3NlcnQgdGFyZ2V0IGlzIG1hdGNoIGZvciBjb25kaXRpb25zCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGVkLWRlY29kZS5hbGdvLnRzOjpBcmM0RW5jb2RlZERlY29kZS5fX2FsZ290c19fLmRlZmF1bHRDcmVhdGUoKSAtPiB2b2lkOgpfX2FsZ290c19fLmRlZmF1bHRDcmVhdGU6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGVkLWRlY29kZS5hbGdvLnRzOjcKICAgIC8vIGV4cG9ydCBjbGFzcyBBcmM0RW5jb2RlZERlY29kZSBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGVkLWRlY29kZS5hbGdvLnRzOjpBcmM0RW5jb2RlZERlY29kZS5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "state": { + "global": { + "num_byte_slices": 0, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": {}, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "Arc4EncodedDecode", + "methods": [ + { + "name": "testEncoding", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "bool", + "name": "b" + }, + { + "type": "uint512", + "name": "c" + }, + { + "type": "byte[]", + "name": "d" + }, + { + "type": "string", + "name": "e" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "testDecoding", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "byte[]", + "name": "a_bytes" + }, + { + "type": "bool", + "name": "b" + }, + { + "type": "byte[]", + "name": "b_bytes" + }, + { + "type": "uint512", + "name": "c" + }, + { + "type": "byte[]", + "name": "c_bytes" + }, + { + "type": "string", + "name": "d" + }, + { + "type": "byte[]", + "name": "d_bytes" + }, + { + "type": "(uint64,byte[])", + "name": "e" + }, + { + "type": "byte[]", + "name": "e_bytes" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "CREATE" + } +} \ No newline at end of file diff --git a/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.arc56.json b/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.arc56.json new file mode 100644 index 00000000..7f37fe59 --- /dev/null +++ b/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.arc56.json @@ -0,0 +1,202 @@ +{ + "name": "Arc4EncodedDecode", + "structs": { + "TestObj": [ + { + "name": "a", + "type": "uint64" + }, + { + "name": "b", + "type": "byte[]" + } + ] + }, + "methods": [ + { + "name": "testEncoding", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "bool", + "name": "b" + }, + { + "type": "uint512", + "name": "c" + }, + { + "type": "byte[]", + "name": "d" + }, + { + "type": "string", + "name": "e" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "testDecoding", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "byte[]", + "name": "a_bytes" + }, + { + "type": "bool", + "name": "b" + }, + { + "type": "byte[]", + "name": "b_bytes" + }, + { + "type": "uint512", + "name": "c" + }, + { + "type": "byte[]", + "name": "c_bytes" + }, + { + "type": "string", + "name": "d" + }, + { + "type": "byte[]", + "name": "d_bytes" + }, + { + "type": "(uint64,byte[])", + "struct": "TestObj", + "name": "e" + }, + { + "type": "byte[]", + "name": "e_bytes" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 171, + 427 + ], + "errorMessage": "Index access is out of bounds" + }, + { + "pc": [ + 68, + 117 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 459 + ], + "errorMessage": "assert target is match for conditions" + }, + { + "pc": [ + 236 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 73, + 122 + ], + "errorMessage": "can only call when not creating" + }, + { + "pc": [ + 272, + 283 + ], + "errorMessage": "overflow" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGVkLWRlY29kZS5hbGdvLnRzOjpBcmM0RW5jb2RlZERlY29kZS5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxIDggNjQKICAgIGJ5dGVjYmxvY2sgMHgwMCAweAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMgogICAgY2FsbHN1YiBjb25zdHJ1Y3RvcgoKbWFpbl9hZnRlcl9pZl9lbHNlQDI6CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9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RlZmF1bHRDcmVhdGU6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGVkLWRlY29kZS5hbGdvLnRzOjcKICAgIC8vIGV4cG9ydCBjbGFzcyBBcmM0RW5jb2RlZERlY29kZSBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGVkLWRlY29kZS5hbGdvLnRzOjpBcmM0RW5jb2RlZERlY29kZS5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.clear.teal b/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.clear.teal new file mode 100644 index 00000000..a1e868df --- /dev/null +++ b/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.ssa.ir b/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.ssa.ir new file mode 100644 index 00000000..5a77bd80 --- /dev/null +++ b/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.ssa.ir @@ -0,0 +1,218 @@ +contract tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.constructor() -> void: + block@0: // L7 + return + + subroutine tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.__puya_arc4_router__() -> bool: + block@0: // L7 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@6 + block@1: // abi_routing_L7 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "testEncoding(uint64,bool,uint512,byte[],string)void" => block@2, method "testDecoding(uint64,byte[],bool,byte[],uint512,byte[],string,byte[],(uint64,byte[]),byte[])void" => block@3, * => block@4} + block@2: // testEncoding_route_L8 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // can only call when not creating + let tmp%7#0: bytes = (txna ApplicationArgs 1) + let tmp%8#0: uint64 = (btoi tmp%7#0) + let tmp%9#0: bytes = (txna ApplicationArgs 2) + let tmp%10#0: bool = (getbit tmp%9#0 0u) + let tmp%11#0: bytes = (txna ApplicationArgs 3) + let tmp%12#0: bytes = (txna ApplicationArgs 4) + let tmp%13#0: bytes = ((extract 2 0) tmp%12#0) + let tmp%14#0: bytes = (txna ApplicationArgs 5) + let tmp%15#0: bytes = ((extract 2 0) tmp%14#0) + tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.testEncoding(tmp%8#0, tmp%10#0, tmp%11#0, tmp%13#0, tmp%15#0) + return 1u + block@3: // testDecoding_route_L17 + let tmp%16#0: uint64 = (txn OnCompletion) + let tmp%17#0: bool = (== tmp%16#0 NoOp) + (assert tmp%17#0) // OnCompletion is not NoOp + let tmp%18#0: uint64 = (txn ApplicationID) + let tmp%19#0: bool = (!= tmp%18#0 0u) + (assert tmp%19#0) // can only call when not creating + let tmp%20#0: bytes = (txna ApplicationArgs 1) + let tmp%21#0: uint64 = (btoi tmp%20#0) + let tmp%22#0: bytes = (txna ApplicationArgs 2) + let tmp%23#0: bytes = ((extract 2 0) tmp%22#0) + let tmp%24#0: bytes = (txna ApplicationArgs 3) + let tmp%25#0: bool = (getbit tmp%24#0 0u) + let tmp%26#0: bytes = (txna ApplicationArgs 4) + let tmp%27#0: bytes = ((extract 2 0) tmp%26#0) + let tmp%28#0: bytes = (txna ApplicationArgs 5) + let tmp%29#0: bytes = (txna ApplicationArgs 6) + let tmp%30#0: bytes = ((extract 2 0) tmp%29#0) + let tmp%31#0: bytes = (txna ApplicationArgs 7) + let tmp%32#0: bytes = ((extract 2 0) tmp%31#0) + let tmp%33#0: bytes = (txna ApplicationArgs 8) + let tmp%34#0: bytes = ((extract 2 0) tmp%33#0) + let tmp%35#0: bytes = (txna ApplicationArgs 9) + let item0%0#0: bytes = (extract3 tmp%35#0 0u 8u) // on error: Index access is out of bounds + let item_start_offset%0#0: uint64 = (extract_uint16 tmp%35#0 8u) + let item_end_offset%0#0: uint64 = (len tmp%35#0) + let item1%0#0: bytes = (substring3 tmp%35#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%36#0: bytes = (txna ApplicationArgs 10) + let tmp%37#0: bytes = ((extract 2 0) tmp%36#0) + tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.testDecoding(tmp%21#0, tmp%23#0, tmp%25#0, tmp%27#0, tmp%28#0, tmp%30#0, tmp%32#0, tmp%34#0, item0%0#0, item1%0#0, tmp%37#0) + return 1u + block@4: // switch_case_default_L7 + goto block@5 + block@5: // switch_case_next_L7 + goto block@10 + block@6: // bare_routing_L7 + let tmp%38#0: uint64 = (txn OnCompletion) + switch tmp%38#0 {0u => block@7, * => block@8} + block@7: // __algots__.defaultCreate_L7 + let tmp%39#0: uint64 = (txn ApplicationID) + let tmp%40#0: bool = (== tmp%39#0 0u) + (assert tmp%40#0) // can only call when creating + tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.__algots__.defaultCreate() + return 1u + block@8: // switch_case_default_L7 + goto block@9 + block@9: // switch_case_next_L7 + goto block@10 + block@10: // after_if_else_L7 + return 0u + + subroutine tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.testEncoding(a: uint64, b: bool, c: biguint, d: bytes, e: bytes) -> void: + block@0: // L8 + let val_as_bytes%0#0: bytes = (itob a#0) + let val_as_bytes%1#0: bytes = (itob a#0) + let tmp%0#0: bool = (== val_as_bytes%0#0 val_as_bytes%1#0) + (assert tmp%0#0) + let encoded_bool%0#0: bytes = (setbit 0x00 0u b#0) + let encoded_bool%1#0: bytes = (setbit 0x00 0u b#0) + let tmp%1#0: bool = (== encoded_bool%0#0 encoded_bool%1#0) + (assert tmp%1#0) + let len_%0#0: uint64 = (len c#0) + let no_overflow%0#0: bool = (<= len_%0#0 64u) + (assert no_overflow%0#0) // overflow + let b_zeros%0#0: bytes = (bzero 64u) + let tmp%2#0: bytes = (b| c#0 b_zeros%0#0) + let len_%1#0: uint64 = (len c#0) + let no_overflow%1#0: bool = (<= len_%1#0 64u) + (assert no_overflow%1#0) // overflow + let b_zeros%1#0: bytes = (bzero 64u) + let tmp%3#0: bytes = (b| c#0 b_zeros%1#0) + let tmp%4#0: bool = (== tmp%2#0 tmp%3#0) + (assert tmp%4#0) + let length%0#0: uint64 = (len d#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 d#0) + let length%1#0: uint64 = (len d#0) + let as_bytes%1#0: bytes = (itob length%1#0) + let length_uint16%1#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_value%1#0: bytes = (concat length_uint16%1#0 d#0) + let tmp%5#0: bool = (== encoded_value%0#0 encoded_value%1#0) + (assert tmp%5#0) + let length%2#0: uint64 = (len e#0) + let as_bytes%2#0: bytes = (itob length%2#0) + let length_uint16%2#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_value%2#0: bytes = (concat length_uint16%2#0 e#0) + let length%3#0: uint64 = (len e#0) + let as_bytes%3#0: bytes = (itob length%3#0) + let length_uint16%3#0: bytes = ((extract 6 2) as_bytes%3#0) + let encoded_value%3#0: bytes = (concat length_uint16%3#0 e#0) + let tmp%6#0: bool = (== encoded_value%2#0 encoded_value%3#0) + (assert tmp%6#0) + let val_as_bytes%2#0: bytes = (itob a#0) + let length%4#0: uint64 = (len d#0) + let as_bytes%4#0: bytes = (itob length%4#0) + let length_uint16%4#0: bytes = ((extract 6 2) as_bytes%4#0) + let encoded_value%4#0: bytes = (concat length_uint16%4#0 d#0) + let current_tail_offset%0#0: uint64 = 10u + let encoded_tuple_buffer%0#0: bytes = 0x + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 val_as_bytes%2#0) + let as_bytes%5#0: bytes = (itob current_tail_offset%0#0) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%5#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 offset_as_uint16%0#0) + let data_length%0#0: uint64 = (len encoded_value%4#0) + let current_tail_offset%1#0: uint64 = (+ current_tail_offset%0#0 data_length%0#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 encoded_value%4#0) + let val_as_bytes%3#0: bytes = (itob a#0) + let length%5#0: uint64 = (len d#0) + let as_bytes%6#0: bytes = (itob length%5#0) + let length_uint16%5#0: bytes = ((extract 6 2) as_bytes%6#0) + let encoded_value%5#0: bytes = (concat length_uint16%5#0 d#0) + let val_as_bytes%4#0: bytes = (itob a#0) + let length%6#0: uint64 = (len d#0) + let as_bytes%7#0: bytes = (itob length%6#0) + let length_uint16%6#0: bytes = ((extract 6 2) as_bytes%7#0) + let encoded_value%6#0: bytes = (concat length_uint16%6#0 d#0) + let current_tail_offset%2#0: uint64 = 10u + let encoded_tuple_buffer%4#0: bytes = 0x + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 val_as_bytes%3#0) + let as_bytes%8#0: bytes = (itob current_tail_offset%2#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%8#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 offset_as_uint16%1#0) + let data_length%1#0: uint64 = (len encoded_value%6#0) + let current_tail_offset%3#0: uint64 = (+ current_tail_offset%2#0 data_length%1#0) + let encoded_tuple_buffer%7#0: bytes = (concat encoded_tuple_buffer%6#0 encoded_value%6#0) + let tmp%7#0: bool = (== encoded_tuple_buffer%3#0 encoded_tuple_buffer%7#0) + (assert tmp%7#0) + return + + subroutine tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.testDecoding(a: uint64, a_bytes: bytes, b: bool, b_bytes: bytes, c: biguint, c_bytes: bytes, d: bytes, d_bytes: bytes, e.a: bytes, e.b: bytes, e_bytes: bytes) -> void: + block@0: // L17 + let tmp%0#0: uint64 = (btoi a_bytes#0) + let tmp%1#0: bool = (== tmp%0#0 a#0) + (assert tmp%1#0) + let tmp%2#0: bool = (getbit b_bytes#0 0u) + let tmp%3#0: bool = (== tmp%2#0 b#0) + (assert tmp%3#0) + let tmp%4#0: bool = (b== c_bytes#0 c#0) + (assert tmp%4#0) + let tmp%5#0: bytes = ((extract 2 0) d_bytes#0) + let tmp%6#0: bool = (== tmp%5#0 d#0) + (assert tmp%6#0) + let item0%0#0: bytes = (extract3 e_bytes#0 0u 8u) // on error: Index access is out of bounds + let item_start_offset%0#0: uint64 = (extract_uint16 e_bytes#0 8u) + let item_end_offset%0#0: uint64 = (len e_bytes#0) + let item1%0#0: bytes = (substring3 e_bytes#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%7#0: bool = (== item0%0#0 e.a#0) + goto tmp%7#0 ? block@1 : block@3 + block@1: // and_contd_L34 + let item0%1#0: bytes = (extract3 e_bytes#0 0u 8u) // on error: Index access is out of bounds + let item_start_offset%1#0: uint64 = (extract_uint16 e_bytes#0 8u) + let item_end_offset%1#0: uint64 = (len e_bytes#0) + let item1%1#0: bytes = (substring3 e_bytes#0 item_start_offset%1#0 item_end_offset%1#0) + let tmp%8#0: bool = (== item1%1#0 e.b#0) + goto tmp%8#0 ? block@2 : block@3 + block@2: // bool_true_L34 + let and_result%0#0: bool = 1u + goto block@4 + block@3: // bool_false_L34 + let and_result%0#1: bool = 0u + goto block@4 + block@4: // bool_merge_L34 + let and_result%0#2: bool = φ(and_result%0#0 <- block@2, and_result%0#1 <- block@3) + (assert and_result%0#2) // assert target is match for conditions + return + + subroutine tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.__algots__.defaultCreate() -> void: + block@0: // L7 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/arc4-encoded-decode/arc4-encoded-decode.awst b/tests/approvals/out/arc4-encoded-decode/arc4-encoded-decode.awst new file mode 100644 index 00000000..94ac0d82 --- /dev/null +++ b/tests/approvals/out/arc4-encoded-decode/arc4-encoded-decode.awst @@ -0,0 +1,53 @@ +contract Arc4EncodedDecode +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + testEncoding(): void + { + assert(reinterpret_cast(ARC4_ENCODE(a, wtype=arc4.uint64)) == reinterpret_cast(ARC4_ENCODE(a, wtype=arc4.uint64))) + assert(reinterpret_cast(ARC4_ENCODE(b, wtype=arc4.bool)) == reinterpret_cast(ARC4_ENCODE(b, wtype=arc4.bool))) + assert(reinterpret_cast(ARC4_ENCODE(c, wtype=arc4.uint512)) == reinterpret_cast(ARC4_ENCODE(c, wtype=arc4.uint512))) + assert(reinterpret_cast(ARC4_ENCODE(d, wtype=arc4.dynamic_array)) == reinterpret_cast(ARC4_ENCODE(d, wtype=arc4.dynamic_array))) + assert(reinterpret_cast(ARC4_ENCODE(e, wtype=arc4.dynamic_array)) == reinterpret_cast(ARC4_ENCODE(e, wtype=arc4.dynamic_array))) + assert(reinterpret_cast(ARC4_ENCODE({ a: a, b: d }, wtype=)) == reinterpret_cast(new TestStruct(a=(#0 = { a: ARC4_ENCODE(a, wtype=arc4.uint64), b: ARC4_ENCODE(d, wtype=arc4.dynamic_array) }).a, b=#0.b))) + } + + testDecoding(): void + { + assert(ARC4_DECODE(reinterpret_cast(a_bytes)) == a) + assert(ARC4_DECODE(reinterpret_cast(b_bytes)) == b) + assert(ARC4_DECODE(reinterpret_cast(c_bytes)) == c) + assert(ARC4_DECODE(reinterpret_cast>(d_bytes)) == d) + assert(reinterpret_cast(ARC4_DECODE(reinterpret_cast(e_bytes)).a) == reinterpret_cast(e.a) and reinterpret_cast(ARC4_DECODE(reinterpret_cast(e_bytes)).b) == reinterpret_cast(e.b), comment=assert target is match for conditions) + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + + __algots__.defaultCreate(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/arc4-encoded-decode/arc4-encoded-decode.awst.json b/tests/approvals/out/arc4-encoded-decode/arc4-encoded-decode.awst.json new file mode 100644 index 00000000..f1148724 --- /dev/null +++ b/tests/approvals/out/arc4-encoded-decode/arc4-encoded-decode.awst.json @@ -0,0 +1,4057 @@ +[ + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 49 + }, + "id": "tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode", + "name": "Arc4EncodedDecode", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 2, + "end_column": 70 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "a", + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 24 + } + }, + { + "_type": "SubroutineArgument", + "name": "b", + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 26, + "end_column": 36 + } + }, + { + "_type": "SubroutineArgument", + "name": "c", + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 38, + "end_column": 48 + } + }, + { + "_type": "SubroutineArgument", + "name": "d", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 50, + "end_column": 58 + } + }, + { + "_type": "SubroutineArgument", + "name": "e", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 60, + "end_column": 69 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 8, + "end_line": 15, + "column": 71, + "end_column": 3 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 4, + "end_column": 50 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 4, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 11, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 22, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 29, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 29, + "end_column": 43 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 41, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + } + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 4, + "end_column": 47 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 4, + "end_column": 47 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 11, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4Type", + "name": "arc4.bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "bool" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 22, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 29, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 29, + "end_column": 40 + }, + "wtype": { + "_type": "ARC4Type", + "name": "arc4.bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "bool" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 38, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + } + } + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 4, + "end_column": 53 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 4, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 11, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint512", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint512", + "n": "512" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 22, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "c" + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 29, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 29, + "end_column": 46 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint512", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint512", + "n": "512" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 44, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "c" + } + } + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 4, + "end_column": 55 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 4, + "end_column": 55 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 11, + "end_column": 54 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 22, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 29, + "end_column": 54 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 29, + "end_column": 48 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 46, + "end_column": 47 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + } + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 4, + "end_column": 46 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 4, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 22, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "e" + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 29, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 29, + "end_column": 39 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 37, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "e" + } + } + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 4, + "end_column": 107 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 4, + "end_column": 107 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 11, + "end_column": 106 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 11, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 11, + "end_column": 34 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,byte[]", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + }, + "source_location": null, + "frozen": false, + "desc": null + }, + "value": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 22, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 30, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + ] + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 39, + "end_column": 106 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 39, + "end_column": 100 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "TestStruct", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,byte[]", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + }, + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 43, + "end_column": 53 + }, + "frozen": false, + "desc": null + }, + "values": { + "a": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 39, + "end_column": 100 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 54, + "end_column": 99 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 54, + "end_column": 99 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 59, + "end_column": 73 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 71, + "end_column": 72 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + }, + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 78, + "end_column": 97 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 95, + "end_column": 96 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + } + ] + }, + "id": "0" + }, + "name": "a" + }, + "b": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 39, + "end_column": 100 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 54, + "end_column": 99 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 54, + "end_column": 99 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 59, + "end_column": 73 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 71, + "end_column": 72 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + }, + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 78, + "end_column": 97 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 95, + "end_column": 96 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + } + ] + }, + "id": "0" + }, + "name": "b" + } + } + } + } + }, + "error_message": null + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode", + "member_name": "testEncoding", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 2, + "end_column": 70 + }, + "name": "testEncoding", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 17, + "end_line": 28, + "column": 2, + "end_column": 3 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "a", + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 18, + "end_line": 18, + "column": 4, + "end_column": 13 + } + }, + { + "_type": "SubroutineArgument", + "name": "a_bytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 19, + "end_line": 19, + "column": 4, + "end_column": 18 + } + }, + { + "_type": "SubroutineArgument", + "name": "b", + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 20, + "end_line": 20, + "column": 4, + "end_column": 14 + } + }, + { + "_type": "SubroutineArgument", + "name": "b_bytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 21, + "end_line": 21, + "column": 4, + "end_column": 18 + } + }, + { + "_type": "SubroutineArgument", + "name": "c", + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 22, + "end_line": 22, + "column": 4, + "end_column": 14 + } + }, + { + "_type": "SubroutineArgument", + "name": "c_bytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 23, + "end_line": 23, + "column": 4, + "end_column": 18 + } + }, + { + "_type": "SubroutineArgument", + "name": "d", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 24, + "end_line": 24, + "column": 4, + "end_column": 13 + } + }, + { + "_type": "SubroutineArgument", + "name": "d_bytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 25, + "end_line": 25, + "column": 4, + "end_column": 18 + } + }, + { + "_type": "SubroutineArgument", + "name": "e", + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc4-encoded-decode.algo.ts::TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 26, + "end_line": 26, + "column": 4, + "end_column": 14 + } + }, + { + "_type": "SubroutineArgument", + "name": "e_bytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 27, + "end_line": 27, + "column": 4, + "end_column": 18 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 28, + "end_line": 35, + "column": 4, + "end_column": 3 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 4, + "end_column": 45 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 4, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 38 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 30, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "a_bytes" + } + } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 43, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 4, + "end_column": 46 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 4, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 11, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 11, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 11, + "end_column": 39 + }, + "wtype": { + "_type": "ARC4Type", + "name": "arc4.bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "bool" + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 31, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "b_bytes" + } + } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 44, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 4, + "end_column": 46 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 4, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 11, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 11, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 11, + "end_column": 39 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint512", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint512", + "n": "512" + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 31, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "c_bytes" + } + } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 44, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "c" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 4, + "end_column": 45 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 4, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 11, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 11, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 11, + "end_column": 38 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 30, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d_bytes" + } + } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 43, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BooleanBinaryOperation", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 16, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc4-encoded-decode.algo.ts::TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 16, + "end_column": 44 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,byte[]", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + }, + "source_location": null, + "frozen": false, + "desc": null + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 36, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "e_bytes" + } + } + }, + "name": "a" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 46, + "end_column": 47 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc4-encoded-decode.algo.ts::TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "name": "e" + }, + "name": "a" + } + } + }, + "op": "and", + "right": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "base": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 16, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc4-encoded-decode.algo.ts::TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 16, + "end_column": 44 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,byte[]", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + }, + "source_location": null, + "frozen": false, + "desc": null + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 36, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "e_bytes" + } + } + }, + "name": "b" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 46, + "end_column": 47 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc4-encoded-decode.algo.ts::TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "name": "e" + }, + "name": "b" + } + } + } + }, + "error_message": "assert target is match for conditions" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode", + "member_name": "testDecoding", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 17, + "end_line": 28, + "column": 2, + "end_column": 3 + }, + "name": "testDecoding", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": { + "e": { + "name": "TestObj", + "elements": [ + [ + "a", + "uint64" + ], + [ + "b", + "byte[]" + ] + ] + } + } + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 49 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 49 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 49 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 49 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 49 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "Implicitly generated create method", + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode", + "member_name": "__algots__.defaultCreate", + "arc4_method_config": { + "_type": "ARC4BareMethodConfig", + "source_location": { + "file": "tests/approvals/arc4-encoded-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 49 + }, + "allowed_completion_types": [ + 0 + ], + "create": 2, + "is_bare": true + } + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + } +] \ No newline at end of file diff --git a/tests/approvals/out/arc4-struct/StructDemo.approval.teal b/tests/approvals/out/arc4-struct/StructDemo.approval.teal index ce5ed86e..e7173b41 100644 --- a/tests/approvals/out/arc4-struct/StructDemo.approval.teal +++ b/tests/approvals/out/arc4-struct/StructDemo.approval.teal @@ -2,7 +2,7 @@ tests/approvals/arc4-struct.algo.ts::StructDemo.approvalProgram: intcblock 0 8 1 - bytecblock 0x 0x0000000000000000 + bytecblock 0x 0x0000000000000000 0x151f7c75 txn ApplicationID bnz main_after_if_else@2 callsub constructor @@ -28,14 +28,15 @@ __puya_arc4_router__: txn NumAppArgs intc_0 // 0 != - bz __puya_arc4_router___bare_routing@7 + bz __puya_arc4_router___bare_routing@8 txna ApplicationArgs 0 pushbytes 0x89388ddd // method "testVectorCreationAndEquality()void" pushbytes 0xef322d6d // method "addVectors((uint64,uint64),(uint64,uint64))(uint64,uint64)" pushbytes 0xcb81deb8 // method "implicitCastingAndSpreading((uint64,uint64))void" - uncover 3 - match __puya_arc4_router___testVectorCreationAndEquality_route@2 __puya_arc4_router___addVectors_route@3 __puya_arc4_router___implicitCastingAndSpreading_route@4 - b __puya_arc4_router___switch_case_default@5 + pushbytes 0xf79d6c46 // method "toAndFromBytes((uint64,uint64))(uint64,uint64)" + uncover 4 + match __puya_arc4_router___testVectorCreationAndEquality_route@2 __puya_arc4_router___addVectors_route@3 __puya_arc4_router___implicitCastingAndSpreading_route@4 __puya_arc4_router___toAndFromBytes_route@5 + b __puya_arc4_router___switch_case_default@6 __puya_arc4_router___testVectorCreationAndEquality_route@2: // tests/approvals/arc4-struct.algo.ts:10 @@ -70,7 +71,7 @@ __puya_arc4_router___addVectors_route@3: // tests/approvals/arc4-struct.algo.ts:18 // public addVectors(v1: Vector, v2: Vector) { callsub addVectors - pushbytes 0x151f7c75 + bytec_2 // 0x151f7c75 swap concat log @@ -97,19 +98,43 @@ __puya_arc4_router___implicitCastingAndSpreading_route@4: intc_2 // 1 retsub -__puya_arc4_router___switch_case_default@5: - b __puya_arc4_router___after_if_else@11 +__puya_arc4_router___toAndFromBytes_route@5: + // tests/approvals/arc4-struct.algo.ts:32 + // public toAndFromBytes(v1: Vector): Vector { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/arc4-struct.algo.ts:9 + // class StructDemo extends Contract { + txna ApplicationArgs 1 + // tests/approvals/arc4-struct.algo.ts:32 + // public toAndFromBytes(v1: Vector): Vector { + callsub toAndFromBytes + bytec_2 // 0x151f7c75 + swap + concat + log + intc_2 // 1 + retsub + +__puya_arc4_router___switch_case_default@6: + b __puya_arc4_router___after_if_else@12 -__puya_arc4_router___bare_routing@7: +__puya_arc4_router___bare_routing@8: // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { txn OnCompletion intc_0 // 0 swap - match __puya_arc4_router_____algots__.defaultCreate@8 - b __puya_arc4_router___switch_case_default@9 + match __puya_arc4_router_____algots__.defaultCreate@9 + b __puya_arc4_router___switch_case_default@10 -__puya_arc4_router_____algots__.defaultCreate@8: +__puya_arc4_router_____algots__.defaultCreate@9: // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { txn ApplicationID @@ -120,9 +145,9 @@ __puya_arc4_router_____algots__.defaultCreate@8: intc_2 // 1 retsub -__puya_arc4_router___switch_case_default@9: +__puya_arc4_router___switch_case_default@10: -__puya_arc4_router___after_if_else@11: +__puya_arc4_router___after_if_else@12: // tests/approvals/arc4-struct.algo.ts:9 // class StructDemo extends Contract { intc_0 // 0 @@ -163,7 +188,7 @@ testVectorCreationAndEquality: bytec_1 // 0x0000000000000000 concat // tests/approvals/arc4-struct.algo.ts:15 - // assert(v1.equals(v2)) + // assert(v1 === v2) == assert retsub @@ -265,6 +290,19 @@ implicitCastingAndSpreading: retsub +// tests/approvals/arc4-struct.algo.ts::StructDemo.toAndFromBytes(v1: bytes) -> bytes: +toAndFromBytes: + // tests/approvals/arc4-struct.algo.ts:32 + // public toAndFromBytes(v1: Vector): Vector { + proto 1 1 + // tests/approvals/arc4-struct.algo.ts:33 + // const v1_bytes = v1.bytes + frame_dig -1 + // tests/approvals/arc4-struct.algo.ts:34 + // return interpretAsArc4(v1_bytes) + retsub + + // tests/approvals/arc4-struct.algo.ts::StructDemo.__algots__.defaultCreate() -> void: __algots__.defaultCreate: // tests/approvals/arc4-struct.algo.ts:9 diff --git a/tests/approvals/out/arc4-struct/StructDemo.arc32.json b/tests/approvals/out/arc4-struct/StructDemo.arc32.json index b8db11e9..82a4c0f3 100644 --- a/tests/approvals/out/arc4-struct/StructDemo.arc32.json +++ b/tests/approvals/out/arc4-struct/StructDemo.arc32.json @@ -70,10 +70,43 @@ ] } } + }, + "toAndFromBytes((uint64,uint64))(uint64,uint64)": { + "call_config": { + "no_op": "CALL" + }, + "structs": { + "v1": { + "name": "Vector", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + }, + "output": { + "name": "Vector", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + } + } } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1zdHJ1Y3QuYWxnby50czo6U3RydWN0RGVtby5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCA4IDEKICAgIGJ5dGVjYmxvY2sgMHggMHgwMDAwMDAwMDAwMDAwMDAw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mM0LXN0cnVjdC5hbGdvLnRzOjpTdHJ1Y3REZW1vLnRvQW5kRnJvbUJ5dGVzKHYxOiBieXRlcykgLT4gYnl0ZXM6CnRvQW5kRnJvbUJ5dGVzOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6MzIKICAgIC8vIHB1YmxpYyB0b0FuZEZyb21CeXRlcyh2MTogVmVjdG9yKTogVmVjdG9yIHsKICAgIHByb3RvIDEgMQogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6MzMKICAgIC8vIGNvbnN0IHYxX2J5dGVzID0gdjEuYnl0ZXMKICAgIGZyYW1lX2RpZyAtMQogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6MzQKICAgIC8vIHJldHVybiBpbnRlcnByZXRBc0FyYzQ8VmVjdG9yPih2MV9ieXRlcykKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9hcmM0LXN0cnVjdC5hbGdvLnRzOjpTdHJ1Y3REZW1vLl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZSgpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hcmM0LXN0cnVjdC5hbGdvLnRzOjkKICAgIC8vIGNsYXNzIFN0cnVjdERlbW8gZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIHJldHN1Ygo=", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1zdHJ1Y3QuYWxnby50czo6U3RydWN0RGVtby5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { @@ -136,6 +169,19 @@ "returns": { "type": "void" } + }, + { + "name": "toAndFromBytes", + "args": [ + { + "type": "(uint64,uint64)", + "name": "v1" + } + ], + "readonly": false, + "returns": { + "type": "(uint64,uint64)" + } } ], "networks": {} diff --git a/tests/approvals/out/arc4-struct/StructDemo.arc56.json b/tests/approvals/out/arc4-struct/StructDemo.arc56.json index 7f8be573..c95e0ad9 100644 --- a/tests/approvals/out/arc4-struct/StructDemo.arc56.json +++ b/tests/approvals/out/arc4-struct/StructDemo.arc56.json @@ -78,6 +78,29 @@ "readonly": false, "events": [], "recommendations": {} + }, + { + "name": "toAndFromBytes", + "args": [ + { + "type": "(uint64,uint64)", + "struct": "Vector", + "name": "v1" + } + ], + "returns": { + "type": "(uint64,uint64)", + "struct": "Vector" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} } ], "arcs": [ @@ -118,38 +141,40 @@ "sourceInfo": [ { "pc": [ - 178, - 183, - 200, - 206, - 214, - 220, - 238, - 243, - 253, - 258 + 208, + 213, + 230, + 236, + 244, + 250, + 268, + 273, + 283, + 288 ], "errorMessage": "Index access is out of bounds" }, { "pc": [ - 82, - 97, - 127 + 95, + 110, + 135, + 153 ], "errorMessage": "OnCompletion is not NoOp" }, { "pc": [ - 159 + 189 ], "errorMessage": "can only call when creating" }, { "pc": [ - 87, - 102, - 132 + 100, + 115, + 140, + 158 ], "errorMessage": "can only call when not creating" } @@ -162,7 +187,7 @@ } }, "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1zdHJ1Y3QuYWxnby50czo6U3RydWN0RGVtby5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCA4IDEKICAgIGJ5dGVjYmxvY2sgMHggMHgwMDAwMDAwMDAwMDAwMDAwCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fYWZ0ZXJfaWZfZWxzZUAyCiAgICBjYWxsc3ViIGNvbnN0cnVjdG9yCgptYWluX2FmdGVyX2lmX2Vsc2VAMjoKICAgIG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wcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6MzIKICAgIC8vIHB1YmxpYyB0b0FuZEZyb21CeXRlcyh2MTogVmVjdG9yKTogVmVjdG9yIHsKICAgIHByb3RvIDEgMQogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6MzMKICAgIC8vIGNvbnN0IHYxX2J5dGVzID0gdjEuYnl0ZXMKICAgIGZyYW1lX2RpZyAtMQogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtc3RydWN0LmFsZ28udHM6MzQKICAgIC8vIHJldHVybiBpbnRlcnByZXRBc0FyYzQ8VmVjdG9yPih2MV9ieXRlcykKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9hcmM0LXN0cnVjdC5hbGdvLnRzOjpTdHJ1Y3REZW1vLl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZSgpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hcmM0LXN0cnVjdC5hbGdvLnRzOjkKICAgIC8vIGNsYXNzIFN0cnVjdERlbW8gZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIHJldHN1Ygo=", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1zdHJ1Y3QuYWxnby50czo6U3RydWN0RGVtby5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "events": [], diff --git a/tests/approvals/out/arc4-struct/StructDemo.ssa.ir b/tests/approvals/out/arc4-struct/StructDemo.ssa.ir index b708955d..22185dc2 100644 --- a/tests/approvals/out/arc4-struct/StructDemo.ssa.ir +++ b/tests/approvals/out/arc4-struct/StructDemo.ssa.ir @@ -19,10 +19,10 @@ contract tests/approvals/arc4-struct.algo.ts::StructDemo: block@0: // L9 let tmp%0#0: uint64 = (txn NumAppArgs) let tmp%1#0: bool = (!= tmp%0#0 0u) - goto tmp%1#0 ? block@1 : block@7 + goto tmp%1#0 ? block@1 : block@8 block@1: // abi_routing_L9 let tmp%2#0: bytes = (txna ApplicationArgs 0) - switch tmp%2#0 {method "testVectorCreationAndEquality()void" => block@2, method "addVectors((uint64,uint64),(uint64,uint64))(uint64,uint64)" => block@3, method "implicitCastingAndSpreading((uint64,uint64))void" => block@4, * => block@5} + switch tmp%2#0 {method "testVectorCreationAndEquality()void" => block@2, method "addVectors((uint64,uint64),(uint64,uint64))(uint64,uint64)" => block@3, method "implicitCastingAndSpreading((uint64,uint64))void" => block@4, method "toAndFromBytes((uint64,uint64))(uint64,uint64)" => block@5, * => block@6} block@2: // testVectorCreationAndEquality_route_L10 let tmp%3#0: uint64 = (txn OnCompletion) let tmp%4#0: bool = (== tmp%3#0 NoOp) @@ -55,24 +55,36 @@ contract tests/approvals/arc4-struct.algo.ts::StructDemo: let tmp%19#0: bytes = (txna ApplicationArgs 1) tests/approvals/arc4-struct.algo.ts::StructDemo.implicitCastingAndSpreading(tmp%19#0) return 1u - block@5: // switch_case_default_L9 - goto block@6 - block@6: // switch_case_next_L9 - goto block@11 - block@7: // bare_routing_L9 + block@5: // toAndFromBytes_route_L32 let tmp%20#0: uint64 = (txn OnCompletion) - switch tmp%20#0 {0u => block@8, * => block@9} - block@8: // __algots__.defaultCreate_L9 - let tmp%21#0: uint64 = (txn ApplicationID) - let tmp%22#0: bool = (== tmp%21#0 0u) - (assert tmp%22#0) // can only call when creating + let tmp%21#0: bool = (== tmp%20#0 NoOp) + (assert tmp%21#0) // OnCompletion is not NoOp + let tmp%22#0: uint64 = (txn ApplicationID) + let tmp%23#0: bool = (!= tmp%22#0 0u) + (assert tmp%23#0) // can only call when not creating + let tmp%24#0: bytes = (txna ApplicationArgs 1) + let tmp%25#0: bytes = tests/approvals/arc4-struct.algo.ts::StructDemo.toAndFromBytes(tmp%24#0) + let tmp%26#0: bytes = (concat 0x151f7c75 tmp%25#0) + (log tmp%26#0) + return 1u + block@6: // switch_case_default_L9 + goto block@7 + block@7: // switch_case_next_L9 + goto block@12 + block@8: // bare_routing_L9 + let tmp%27#0: uint64 = (txn OnCompletion) + switch tmp%27#0 {0u => block@9, * => block@10} + block@9: // __algots__.defaultCreate_L9 + let tmp%28#0: uint64 = (txn ApplicationID) + let tmp%29#0: bool = (== tmp%28#0 0u) + (assert tmp%29#0) // can only call when creating tests/approvals/arc4-struct.algo.ts::StructDemo.__algots__.defaultCreate() return 1u - block@9: // switch_case_default_L9 - goto block@10 - block@10: // switch_case_next_L9 + block@10: // switch_case_default_L9 goto block@11 - block@11: // after_if_else_L9 + block@11: // switch_case_next_L9 + goto block@12 + block@12: // after_if_else_L9 return 0u subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.testVectorCreationAndEquality() -> void: @@ -153,6 +165,11 @@ contract tests/approvals/arc4-struct.algo.ts::StructDemo: (assert tmp%5#0) return + subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.toAndFromBytes(v1: bytes) -> bytes: + block@0: // L32 + let v1_bytes#0: bytes = v1#0 + return v1_bytes#0 + subroutine tests/approvals/arc4-struct.algo.ts::StructDemo.__algots__.defaultCreate() -> void: block@0: // L9 return diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst b/tests/approvals/out/arc4-struct/arc4-struct.awst index 95d68715..43c89f9c 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst @@ -35,6 +35,12 @@ contract StructDemo assert(reinterpret_cast(v3) == reinterpret_cast(v1)) } + toAndFromBytes(): Vector + { + v1_bytes: bytes = reinterpret_cast(v1) + return reinterpret_cast(v1_bytes) + } + constructor(): void { void diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst.json b/tests/approvals/out/arc4-struct/arc4-struct.awst.json index 2033b85d..78be1cc2 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst.json +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst.json @@ -2336,7 +2336,7 @@ "line": 15, "end_line": 15, "column": 4, - "end_column": 25 + "end_column": 21 }, "expr": { "_type": "AssertExpression", @@ -2345,7 +2345,7 @@ "line": 15, "end_line": 15, "column": 4, - "end_column": 25 + "end_column": 21 }, "wtype": { "_type": "WType", @@ -2361,7 +2361,7 @@ "line": 15, "end_line": 15, "column": 11, - "end_column": 24 + "end_column": 20 }, "wtype": { "_type": "WType", @@ -2377,7 +2377,7 @@ "line": 15, "end_line": 15, "column": 11, - "end_column": 24 + "end_column": 20 }, "wtype": { "_type": "WType", @@ -2458,7 +2458,7 @@ "line": 15, "end_line": 15, "column": 11, - "end_column": 24 + "end_column": 20 }, "wtype": { "_type": "WType", @@ -2473,8 +2473,8 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 15, "end_line": 15, - "column": 21, - "end_column": 23 + "column": 18, + "end_column": 20 }, "wtype": { "_type": "ARC4Struct", @@ -2522,8 +2522,8 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 15, "end_line": 15, - "column": 21, - "end_column": 23 + "column": 18, + "end_column": 20 }, "frozen": false, "desc": null @@ -6089,6 +6089,399 @@ } } }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 32, + "end_line": 32, + "column": 2, + "end_column": 43 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "v1", + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 32, + "end_line": 32, + "column": 28, + "end_column": 34 + }, + "frozen": false, + "desc": null + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 32, + "end_line": 32, + "column": 24, + "end_column": 34 + } + } + ], + "return_type": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 32, + "end_line": 32, + "column": 2, + "end_column": 43 + }, + "frozen": false, + "desc": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 32, + "end_line": 35, + "column": 44, + "end_column": 3 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 33, + "end_line": 33, + "column": 10, + "end_column": 29 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 33, + "end_line": 33, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "v1_bytes" + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 33, + "end_line": 33, + "column": 21, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 33, + "end_line": 33, + "column": 21, + "end_column": 23 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 33, + "end_line": 33, + "column": 21, + "end_column": 23 + }, + "frozen": false, + "desc": null + }, + "name": "v1" + } + } + }, + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 44 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 34, + "end_line": 34, + "column": 11, + "end_column": 44 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Vector", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 34, + "end_line": 34, + "column": 11, + "end_column": 44 + }, + "frozen": false, + "desc": null + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 34, + "end_line": 34, + "column": 35, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "v1_bytes" + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-struct.algo.ts::StructDemo", + "member_name": "toAndFromBytes", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 32, + "end_line": 32, + "column": 2, + "end_column": 43 + }, + "name": "toAndFromBytes", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": { + "v1": { + "name": "Vector", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + }, + "output": { + "name": "Vector", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + } + } + } + }, { "_type": "ContractMethod", "source_location": { diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal b/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal index 33a95759..6f94f04c 100644 --- a/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal @@ -2,60 +2,60 @@ tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.approvalProgram: intcblock 0 1 8 2 - bytecblock 0x 0x0000 base32(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) 0x00 + bytecblock 0x 0x0000 0x00 base32(AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) 0x000548656c6c6f txn ApplicationID bnz main_after_if_else@2 callsub constructor main_after_if_else@2: - // tests/approvals/arc4-types.algo.ts:113 + // tests/approvals/arc4-types.algo.ts:137 // testStr() callsub testStr - // tests/approvals/arc4-types.algo.ts:114 - // test(1, 2n, new UintN<256>(4)) + // tests/approvals/arc4-types.algo.ts:138 + // testUintN(1, 2n, new UintN<256>(4)) intc_1 // 1 pushbytes 0x02 pushbytes 0x0000000000000000000000000000000000000000000000000000000000000004 - callsub test - // tests/approvals/arc4-types.algo.ts:115 + callsub testUintN + // tests/approvals/arc4-types.algo.ts:139 // testUFixed() callsub testUFixed - // tests/approvals/arc4-types.algo.ts:116 + // tests/approvals/arc4-types.algo.ts:140 // testByte() callsub testByte - // tests/approvals/arc4-types.algo.ts:117 + // tests/approvals/arc4-types.algo.ts:141 // testArrays(new UintN<64>(65)) pushbytes 0x0000000000000041 callsub testArrays - // tests/approvals/arc4-types.algo.ts:118 + // tests/approvals/arc4-types.algo.ts:142 // testAddress() callsub testAddress - // tests/approvals/arc4-types.algo.ts:119 + // tests/approvals/arc4-types.algo.ts:143 // testTuple() callsub testTuple - // tests/approvals/arc4-types.algo.ts:120 + // tests/approvals/arc4-types.algo.ts:144 // testUFixed() callsub testUFixed - // tests/approvals/arc4-types.algo.ts:121 + // tests/approvals/arc4-types.algo.ts:145 // testDynamicBytes(Bytes('hmmmmmmmmm')) pushbytes "hmmmmmmmmm" callsub testDynamicBytes - // tests/approvals/arc4-types.algo.ts:122 + // tests/approvals/arc4-types.algo.ts:146 // testStaticBytes() callsub testStaticBytes - // tests/approvals/arc4-types.algo.ts:123 + // tests/approvals/arc4-types.algo.ts:147 // const result = new arc4.DynamicArray>() bytec_1 // 0x0000 bytec_0 // 0x concat - // tests/approvals/arc4-types.algo.ts:124 + // tests/approvals/arc4-types.algo.ts:148 // assert(result.length === 0) intc_0 // 0 extract_uint16 intc_0 // 0 == assert - // tests/approvals/arc4-types.algo.ts:125 + // tests/approvals/arc4-types.algo.ts:149 // return true intc_1 // 1 return @@ -63,7 +63,7 @@ main_after_if_else@2: // tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.constructor() -> void: constructor: - // tests/approvals/arc4-types.algo.ts:106 + // tests/approvals/arc4-types.algo.ts:130 // export class Arc4TypesTestContract extends BaseContract { proto 0 0 retsub @@ -71,74 +71,82 @@ constructor: // tests/approvals/arc4-types.algo.ts::testStr() -> void: testStr: - // tests/approvals/arc4-types.algo.ts:41 + // tests/approvals/arc4-types.algo.ts:59 // function testStr() { proto 0 0 - // tests/approvals/arc4-types.algo.ts:42 + // tests/approvals/arc4-types.algo.ts:60 // const s1 = new Str() bytec_1 // 0x0000 - // tests/approvals/arc4-types.algo.ts:43 + // tests/approvals/arc4-types.algo.ts:61 // assert(s1.bytes === new UintN<16>(0).bytes, 'Empty string should equal the uint16 length prefix') dup == assert // Empty string should equal the uint16 length prefix - // tests/approvals/arc4-types.algo.ts:44 + // tests/approvals/arc4-types.algo.ts:62 // const s2 = new Str('Hello') - pushbytes 0x000548656c6c6f - // tests/approvals/arc4-types.algo.ts:45 + bytec 4 // 0x000548656c6c6f + // tests/approvals/arc4-types.algo.ts:63 // assert(s2.native === 'Hello') extract 2 0 pushbytes "Hello" == assert + // tests/approvals/arc4-types.algo.ts:62 + // const s2 = new Str('Hello') + bytec 4 // 0x000548656c6c6f + dup + // tests/approvals/arc4-types.algo.ts:69 + // assert(s2 === s2_from_bytes) + == + assert retsub -// tests/approvals/arc4-types.algo.ts::test(n: uint64, b: bytes, c: bytes) -> void: -test: - // tests/approvals/arc4-types.algo.ts:23 - // function test(n: uint64, b: biguint, c: UintN<256>) { +// tests/approvals/arc4-types.algo.ts::testUintN(n: uint64, b: bytes, c: bytes) -> void: +testUintN: + // tests/approvals/arc4-types.algo.ts:26 + // function testUintN(n: uint64, b: biguint, c: UintN<256>) { proto 3 0 - // tests/approvals/arc4-types.algo.ts:24 + // tests/approvals/arc4-types.algo.ts:27 // const x = new UintN<8>(4) pushbytes 0x04 - // tests/approvals/arc4-types.algo.ts:25 + // tests/approvals/arc4-types.algo.ts:28 // assert(x.bytes.length === 1) len intc_1 // 1 == assert - // tests/approvals/arc4-types.algo.ts:26 + // tests/approvals/arc4-types.algo.ts:29 // const x2 = new UintN<8>(255n) pushbytes 0xff - // tests/approvals/arc4-types.algo.ts:27 + // tests/approvals/arc4-types.algo.ts:30 // assert(x2.bytes === Bytes.fromHex('ff')) dup == assert - // tests/approvals/arc4-types.algo.ts:29 + // tests/approvals/arc4-types.algo.ts:32 // const y = new UintN<16>() bytec_1 // 0x0000 - // tests/approvals/arc4-types.algo.ts:30 + // tests/approvals/arc4-types.algo.ts:33 // assert(y.bytes.length === 2) len intc_3 // 2 == assert - // tests/approvals/arc4-types.algo.ts:31 + // tests/approvals/arc4-types.algo.ts:34 // const z = new UintN<8>(n) frame_dig -3 itob extract 7 1 - // tests/approvals/arc4-types.algo.ts:32 + // tests/approvals/arc4-types.algo.ts:35 // const z_native = z.native btoi - // tests/approvals/arc4-types.algo.ts:33 + // tests/approvals/arc4-types.algo.ts:36 // assert(z_native === n) frame_dig -3 == assert - // tests/approvals/arc4-types.algo.ts:34 + // tests/approvals/arc4-types.algo.ts:37 // const a = new UintN<128>(b) frame_dig -2 len @@ -149,34 +157,70 @@ test: bzero frame_dig -2 b| - // tests/approvals/arc4-types.algo.ts:36 + // tests/approvals/arc4-types.algo.ts:38 + // const a_native = a.native + dup + // tests/approvals/arc4-types.algo.ts:39 // assert(a_native === b) frame_dig -2 b== assert - // tests/approvals/arc4-types.algo.ts:38 + // tests/approvals/arc4-types.algo.ts:41 // assert(c.bytes.length === 256 / 8) frame_dig -1 len pushint 32 // 32 == assert + // tests/approvals/arc4-types.algo.ts:43 + // const a_bytes = a.bytes + dup + // tests/approvals/arc4-types.algo.ts:46 + // assert(a_from_bytes === a) + == + assert + // tests/approvals/arc4-types.algo.ts:48 + // const aliased64 = new UintN64(12) + pushbytes 0x000000000000000c + // tests/approvals/arc4-types.algo.ts:50 + // assert(aliased64.native === 12) + btoi + pushint 12 // 12 + == + assert + // tests/approvals/arc4-types.algo.ts:51 + // const aliased32 = new UintN32(50545) + pushbytes 0x0000c571 + // tests/approvals/arc4-types.algo.ts:52 + // assert(BigUint(aliased32.bytes) === 50545n) + pushbytes 0xc571 + b== + assert + // tests/approvals/arc4-types.algo.ts:54 + // const byte = new Byte(255) + pushbytes 0xff + // tests/approvals/arc4-types.algo.ts:56 + // assert(byte.bytes.bitwiseInvert() === Bytes.fromHex('00')) + b~ + bytec_2 // 0x00 + == + assert retsub // tests/approvals/arc4-types.algo.ts::testUFixed() -> void: testUFixed: - // tests/approvals/arc4-types.algo.ts:16 + // tests/approvals/arc4-types.algo.ts:19 // function testUFixed() { proto 0 0 - // tests/approvals/arc4-types.algo.ts:17 + // tests/approvals/arc4-types.algo.ts:20 // const a = new UFixedNxM<32, 4>('1.244') pushbytes 0x000004dc - // tests/approvals/arc4-types.algo.ts:18 + // tests/approvals/arc4-types.algo.ts:21 // const c = new UFixedNxM<32, 4>('1.244') dup - // tests/approvals/arc4-types.algo.ts:20 - // assert(a.equals(c)) + // tests/approvals/arc4-types.algo.ts:23 + // assert(a === c) == assert retsub @@ -184,17 +228,17 @@ testUFixed: // tests/approvals/arc4-types.algo.ts::testByte() -> void: testByte: - // tests/approvals/arc4-types.algo.ts:82 + // tests/approvals/arc4-types.algo.ts:106 // function testByte() { proto 0 0 - // tests/approvals/arc4-types.algo.ts:83 + // tests/approvals/arc4-types.algo.ts:107 // const b = new Byte() - bytec_3 // 0x00 - // tests/approvals/arc4-types.algo.ts:84 + bytec_2 // 0x00 + // tests/approvals/arc4-types.algo.ts:108 // const b2 = new Byte(0) dup - // tests/approvals/arc4-types.algo.ts:85 - // assert(b.equals(b2)) + // tests/approvals/arc4-types.algo.ts:109 + // assert(b === b2) == assert retsub @@ -202,10 +246,10 @@ testByte: // tests/approvals/arc4-types.algo.ts::testArrays(n: bytes) -> void: testArrays: - // tests/approvals/arc4-types.algo.ts:68 + // tests/approvals/arc4-types.algo.ts:92 // function testArrays(n: ARC4Uint64) { proto 1 0 - // tests/approvals/arc4-types.algo.ts:69 + // tests/approvals/arc4-types.algo.ts:93 // const myArray = new DynamicArray(n, n, n) bytec_0 // 0x frame_dig -1 @@ -217,7 +261,7 @@ testArrays: pushbytes 0x0003 swap concat - // tests/approvals/arc4-types.algo.ts:71 + // tests/approvals/arc4-types.algo.ts:95 // myArray.push(n) extract 2 0 bytec_0 // 0x @@ -232,7 +276,7 @@ testArrays: extract 6 2 swap concat - // tests/approvals/arc4-types.algo.ts:73 + // tests/approvals/arc4-types.algo.ts:97 // const myStatic = new StaticArray(n, n) bytec_0 // 0x frame_dig -1 @@ -242,8 +286,8 @@ testArrays: bytec_0 // 0x swap concat - // tests/approvals/arc4-types.algo.ts:75 - // assert(myStatic[0].equals(myArray.pop())) + // tests/approvals/arc4-types.algo.ts:99 + // assert(myStatic[0] === myArray.pop()) intc_0 // 0 intc_2 // 8 * @@ -260,42 +304,41 @@ testArrays: // tests/approvals/arc4-types.algo.ts::testAddress() -> void: testAddress: - // tests/approvals/arc4-types.algo.ts:88 + // tests/approvals/arc4-types.algo.ts:112 // function testAddress() { proto 0 0 - // tests/approvals/arc4-types.algo.ts:90 + // tests/approvals/arc4-types.algo.ts:114 // const b = new Address(Txn.sender) txn Sender - // tests/approvals/arc4-types.algo.ts:89 + // tests/approvals/arc4-types.algo.ts:113 // const a = new Address() - bytec_2 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ - // tests/approvals/arc4-types.algo.ts:92 - // assert(!a.equals(b), 'Zero address should not match sender') - == - ! + bytec_3 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ + // tests/approvals/arc4-types.algo.ts:116 + // assert(a !== b, 'Zero address should not match sender') + != assert // Zero address should not match sender - // tests/approvals/arc4-types.algo.ts:89 + // tests/approvals/arc4-types.algo.ts:113 // const a = new Address() - bytec_2 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ - // tests/approvals/arc4-types.algo.ts:93 - // assert(a.equals(new Address()), 'Two zero addresses should match') + bytec_3 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ + // tests/approvals/arc4-types.algo.ts:117 + // assert(a === new Address(), 'Two zero addresses should match') dup == assert // Two zero addresses should match - // tests/approvals/arc4-types.algo.ts:94 - // assert(a[0].equals(new Byte()), 'Zero address should start with zero byte') + // tests/approvals/arc4-types.algo.ts:118 + // assert(a[0] === new Byte(), 'Zero address should start with zero byte') intc_0 // 0 intc_1 // 1 * - // tests/approvals/arc4-types.algo.ts:89 + // tests/approvals/arc4-types.algo.ts:113 // const a = new Address() - bytec_2 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ - // tests/approvals/arc4-types.algo.ts:94 - // assert(a[0].equals(new Byte()), 'Zero address should start with zero byte') + bytec_3 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ + // tests/approvals/arc4-types.algo.ts:118 + // assert(a[0] === new Byte(), 'Zero address should start with zero byte') swap intc_1 // 1 extract3 // on error: Index access is out of bounds - bytec_3 // 0x00 + bytec_2 // 0x00 == assert // Zero address should start with zero byte retsub @@ -303,31 +346,31 @@ testAddress: // tests/approvals/arc4-types.algo.ts::testTuple() -> void: testTuple: - // tests/approvals/arc4-types.algo.ts:97 + // tests/approvals/arc4-types.algo.ts:121 // function testTuple() { proto 0 0 - // tests/approvals/arc4-types.algo.ts:98 + // tests/approvals/arc4-types.algo.ts:122 // const t = new Tuple(new ARC4Uint64(34)) bytec_0 // 0x pushbytes 0x0000000000000022 concat - // tests/approvals/arc4-types.algo.ts:99 + // tests/approvals/arc4-types.algo.ts:123 // const firstItem = t.at(0) dup intc_0 // 0 intc_2 // 8 extract3 // on error: Index access is out of bounds swap - // tests/approvals/arc4-types.algo.ts:100 + // tests/approvals/arc4-types.algo.ts:124 // const firstItemIndexer = t.native[0] intc_0 // 0 intc_2 // 8 extract3 // on error: Index access is out of bounds - // tests/approvals/arc4-types.algo.ts:101 - // assert(firstItem.equals(firstItemIndexer)) + // tests/approvals/arc4-types.algo.ts:125 + // assert(firstItem === firstItemIndexer) == assert - // tests/approvals/arc4-types.algo.ts:103 + // tests/approvals/arc4-types.algo.ts:127 // assert(t1.length === 2) intc_3 // 2 dup @@ -338,27 +381,27 @@ testTuple: // tests/approvals/arc4-types.algo.ts::testDynamicBytes(someBytes: bytes) -> void: testDynamicBytes: - // tests/approvals/arc4-types.algo.ts:48 + // tests/approvals/arc4-types.algo.ts:72 // function testDynamicBytes(someBytes: bytes) { proto 1 0 - // tests/approvals/arc4-types.algo.ts:49 + // tests/approvals/arc4-types.algo.ts:73 // const db1 = new DynamicBytes() bytec_1 // 0x0000 - // tests/approvals/arc4-types.algo.ts:50 + // tests/approvals/arc4-types.algo.ts:74 // assert(db1.native === Bytes(), 'No args should give empty bytes') extract 2 0 bytec_0 // 0x == assert // No args should give empty bytes - // tests/approvals/arc4-types.algo.ts:49 + // tests/approvals/arc4-types.algo.ts:73 // const db1 = new DynamicBytes() bytec_1 // 0x0000 - // tests/approvals/arc4-types.algo.ts:51 + // tests/approvals/arc4-types.algo.ts:75 // assert(db1.bytes === new UintN<16>(0).bytes, 'bytes prop should return length header (of 0)') dup == assert // bytes prop should return length header (of 0) - // tests/approvals/arc4-types.algo.ts:52 + // tests/approvals/arc4-types.algo.ts:76 // const db2 = new DynamicBytes(someBytes) frame_dig -1 len @@ -366,16 +409,16 @@ testDynamicBytes: extract 6 2 frame_dig -1 concat - // tests/approvals/arc4-types.algo.ts:53 + // tests/approvals/arc4-types.algo.ts:77 // assert(db2.native === someBytes) extract 2 0 frame_dig -1 == assert - // tests/approvals/arc4-types.algo.ts:55 + // tests/approvals/arc4-types.algo.ts:79 // const db3 = new DynamicBytes('hello') pushbytes 0x000568656c6c6f - // tests/approvals/arc4-types.algo.ts:56 + // tests/approvals/arc4-types.algo.ts:80 // assert(db3.native === Bytes('hello')) extract 2 0 pushbytes "hello" @@ -386,7 +429,7 @@ testDynamicBytes: // tests/approvals/arc4-types.algo.ts::testStaticBytes() -> void: testStaticBytes: - // tests/approvals/arc4-types.algo.ts:59 + // tests/approvals/arc4-types.algo.ts:83 // function testStaticBytes() { proto 0 0 retsub diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir b/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir index e69d9ab9..d70d9559 100644 --- a/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir @@ -1,7 +1,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: program approval: subroutine tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.approvalProgram() -> bool: - block@0: // L111 + block@0: // L135 let reinterpret_bool%0#0: bool = (txn ApplicationID) goto reinterpret_bool%0#0 ? block@2 : block@1 block@1: // if_body_L1 @@ -10,7 +10,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: block@2: // after_if_else_L1 let x#0: bytes = 0x0000000000000000 tests/approvals/arc4-types.algo.ts::testStr() - tests/approvals/arc4-types.algo.ts::test(1u, 2b, 0x0000000000000000000000000000000000000000000000000000000000000004) + tests/approvals/arc4-types.algo.ts::testUintN(1u, 2b, 0x0000000000000000000000000000000000000000000000000000000000000004) tests/approvals/arc4-types.algo.ts::testUFixed() tests/approvals/arc4-types.algo.ts::testByte() tests/approvals/arc4-types.algo.ts::testArrays(0x0000000000000041) @@ -27,11 +27,11 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return 1u subroutine tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.constructor() -> void: - block@0: // L106 + block@0: // L130 return subroutine tests/approvals/arc4-types.algo.ts::testStr() -> void: - block@0: // L41 + block@0: // L59 let s1#0: bytes = 0x0000 let tmp%0#0: bool = (== s1#0 0x0000) (assert tmp%0#0) // Empty string should equal the uint16 length prefix @@ -39,10 +39,14 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: let tmp%1#0: bytes = ((extract 2 0) s2#0) let tmp%2#0: bool = (== tmp%1#0 "Hello") (assert tmp%2#0) + let s2_bytes#0: bytes = s2#0 + let s2_from_bytes#0: bytes = s2_bytes#0 + let tmp%3#0: bool = (== s2#0 s2_from_bytes#0) + (assert tmp%3#0) return - subroutine tests/approvals/arc4-types.algo.ts::test(n: uint64, b: biguint, c: bytes) -> void: - block@0: // L23 + subroutine tests/approvals/arc4-types.algo.ts::testUintN(n: uint64, b: biguint, c: bytes) -> void: + block@0: // L26 let x#0: bytes = 0x04 let tmp%0#0: uint64 = (len x#0) let tmp%1#0: bool = (== tmp%0#0 1u) @@ -70,10 +74,26 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: let tmp%7#0: uint64 = (len c#0) let tmp%8#0: bool = (== tmp%7#0 32u) (assert tmp%8#0) + let a_bytes#0: bytes = a#0 + let a_from_bytes#0: bytes = a_bytes#0 + let tmp%9#0: bool = (== a_from_bytes#0 a#0) + (assert tmp%9#0) + let aliased64#0: bytes = 0x000000000000000c + let tmp%10#0: uint64 = (btoi aliased64#0) + let tmp%11#0: bool = (== tmp%10#0 12u) + (assert tmp%11#0) + let aliased32#0: bytes = 0x0000c571 + let reinterpret_biguint%0#0: biguint = aliased32#0 + let tmp%12#0: bool = (b== reinterpret_biguint%0#0 50545b) + (assert tmp%12#0) + let byte#0: bytes = 0xff + let tmp%13#0: bytes = (b~ byte#0) + let tmp%14#0: bool = (== tmp%13#0 0x00) + (assert tmp%14#0) return subroutine tests/approvals/arc4-types.algo.ts::testUFixed() -> void: - block@0: // L16 + block@0: // L19 let a#0: bytes = 0x000004dc let c#0: bytes = 0x000004dc let tmp%0#0: bool = (== a#0 c#0) @@ -81,7 +101,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testByte() -> void: - block@0: // L82 + block@0: // L106 let b#0: bytes = 0x00 let b2#0: bytes = 0x00 let tmp%0#0: bool = (== b#0 b2#0) @@ -89,7 +109,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testArrays(n: bytes) -> void: - block@0: // L68 + block@0: // L92 let result%0#0: bytes = (concat 0x n#0) let result%1#0: bytes = (concat result%0#0 n#0) let result%2#0: bytes = (concat result%1#0 n#0) @@ -118,26 +138,30 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: let assigned_value%0#0: bytes = 0x0000000000000032 let updated_target%0#0: bytes = (replace3 myStatic#0 8u assigned_value%0#0) let myStatic#1: bytes = updated_target%0#0 + let result%5#0: bytes = (concat 0x n#0) + let result%6#0: bytes = (concat result%5#0 n#0) + let result%7#0: bytes = (concat result%6#0 n#0) + let array_data%2#0: bytes = (concat 0x result%7#0) + let myStatic2#0: bytes = array_data%2#0 return subroutine tests/approvals/arc4-types.algo.ts::testAddress() -> void: - block@0: // L88 + block@0: // L112 let a#0: bytes = addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ let b#0: bytes = (txn Sender) - let tmp%0#0: bool = (== a#0 b#0) - let tmp%1#0: bool = (! tmp%0#0) - (assert tmp%1#0) // Zero address should not match sender - let tmp%2#0: bool = (== a#0 addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ) - (assert tmp%2#0) // Two zero addresses should match + let tmp%0#0: bool = (!= a#0 b#0) + (assert tmp%0#0) // Zero address should not match sender + let tmp%1#0: bool = (== a#0 addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ) + (assert tmp%1#0) // Two zero addresses should match let array_head_and_tail%0#0: bytes = a#0 let item_offset%0#0: uint64 = (* 0u 1u) - let tmp%3#0: bytes = (extract3 array_head_and_tail%0#0 item_offset%0#0 1u) // on error: Index access is out of bounds - let tmp%4#0: bool = (== tmp%3#0 0x00) - (assert tmp%4#0) // Zero address should start with zero byte + let tmp%2#0: bytes = (extract3 array_head_and_tail%0#0 item_offset%0#0 1u) // on error: Index access is out of bounds + let tmp%3#0: bool = (== tmp%2#0 0x00) + (assert tmp%3#0) // Zero address should start with zero byte return subroutine tests/approvals/arc4-types.algo.ts::testTuple() -> void: - block@0: // L97 + block@0: // L121 let current_tail_offset%0#0: uint64 = 8u let encoded_tuple_buffer%0#0: bytes = 0x let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 0x0000000000000022) @@ -157,7 +181,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testDynamicBytes(someBytes: bytes) -> void: - block@0: // L48 + block@0: // L72 let db1#0: bytes = 0x0000 let tmp%0#0: bytes = ((extract 2 0) db1#0) let tmp%1#0: bool = (== tmp%0#0 0x) @@ -179,7 +203,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testStaticBytes() -> void: - block@0: // L59 + block@0: // L83 let s1#0: bytes = 0x let s2#0: bytes = 0x00000000 let s3#0: bytes = 0xaabbccddee diff --git a/tests/approvals/out/arc4-types/arc4-types.awst b/tests/approvals/out/arc4-types/arc4-types.awst index db9b3369..195b0dbc 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst +++ b/tests/approvals/out/arc4-types/arc4-types.awst @@ -4,7 +4,7 @@ subroutine testUFixed(): void c: arc4.ufixed32x4 = 1.244m assert(reinterpret_cast(a) == reinterpret_cast(c)) } -subroutine test(n: uint64, b: biguint, c: arc4.uint256): void +subroutine testUintN(n: uint64, b: biguint, c: arc4.uint256): void { x: arc4.uint8 = 4 assert(len(reinterpret_cast(x)) == 1) @@ -19,6 +19,15 @@ subroutine test(n: uint64, b: biguint, c: arc4.uint256): void a_native: biguint = ARC4_DECODE(a) assert(a_native == b) assert(len(reinterpret_cast(c)) == 32) + a_bytes: bytes = reinterpret_cast(a) + a_from_bytes: arc4.uint128 = reinterpret_cast(a_bytes) + assert(reinterpret_cast(a_from_bytes) == reinterpret_cast(a)) + aliased64: arc4.uint64 = 12 + assert(ARC4_DECODE(aliased64) == 12) + aliased32: arc4.uint32 = 50545 + assert(reinterpret_cast(reinterpret_cast(aliased32)) == 50545) + byte: arc4.byte = 255 + assert(~reinterpret_cast(byte) == 0x00) } subroutine testStr(): void { @@ -26,6 +35,9 @@ subroutine testStr(): void assert(reinterpret_cast(s1) == reinterpret_cast(0), comment=Empty string should equal the uint16 length prefix) s2: arc4.dynamic_array = "Hello" assert(ARC4_DECODE(s2) == "Hello") + s2_bytes: bytes = reinterpret_cast(s2) + s2_from_bytes: arc4.dynamic_array = reinterpret_cast>(s2_bytes) + assert(reinterpret_cast(s2) == reinterpret_cast(s2_from_bytes)) } subroutine testDynamicBytes(someBytes: bytes): void { @@ -50,6 +62,7 @@ subroutine testArrays(n: arc4.uint64): void myStatic: arc4.static_array = new arc4.static_array(n, n) assert(reinterpret_cast(myStatic[0]) == reinterpret_cast(myArray.pop())) myStatic[1]: arc4.uint64 = 50 + myStatic2: arc4.static_array = new arc4.static_array(n, n, n) } subroutine testByte(): void { @@ -61,7 +74,7 @@ subroutine testAddress(): void { a: arc4.static_array = Address("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ") b: arc4.static_array = reinterpret_cast>(txn()) - assert(!reinterpret_cast(a) == reinterpret_cast(b), comment=Zero address should not match sender) + assert(reinterpret_cast(a) != reinterpret_cast(b), comment=Zero address should not match sender) assert(reinterpret_cast(a) == reinterpret_cast(Address("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ")), comment=Two zero addresses should match) assert(reinterpret_cast(a[0]) == reinterpret_cast(0), comment=Zero address should start with zero byte) } @@ -83,7 +96,7 @@ contract Arc4TypesTestContract } x: arc4.uint64 = 0 tests/approvals/arc4-types.algo.ts::testStr() - tests/approvals/arc4-types.algo.ts::test(1, 2, 4) + tests/approvals/arc4-types.algo.ts::testUintN(1, 2, 4) tests/approvals/arc4-types.algo.ts::testUFixed() tests/approvals/arc4-types.algo.ts::testByte() tests/approvals/arc4-types.algo.ts::testArrays(65) diff --git a/tests/approvals/out/arc4-types/arc4-types.awst.json b/tests/approvals/out/arc4-types/arc4-types.awst.json index 61cb2879..088f5135 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst.json +++ b/tests/approvals/out/arc4-types/arc4-types.awst.json @@ -3,8 +3,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 16, - "end_line": 16, + "line": 19, + "end_line": 19, "column": 0, "end_column": 21 }, @@ -20,8 +20,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 16, - "end_line": 21, + "line": 19, + "end_line": 24, "column": 22, "end_column": 1 }, @@ -30,8 +30,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 17, - "end_line": 17, + "line": 20, + "end_line": 20, "column": 8, "end_column": 41 }, @@ -39,8 +39,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 17, - "end_line": 17, + "line": 20, + "end_line": 20, "column": 8, "end_column": 9 }, @@ -67,8 +67,8 @@ "_type": "DecimalConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 17, - "end_line": 17, + "line": 20, + "end_line": 20, "column": 33, "end_column": 40 }, @@ -96,8 +96,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 18, - "end_line": 18, + "line": 21, + "end_line": 21, "column": 8, "end_column": 41 }, @@ -105,8 +105,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 18, - "end_line": 18, + "line": 21, + "end_line": 21, "column": 8, "end_column": 9 }, @@ -133,8 +133,8 @@ "_type": "DecimalConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 18, - "end_line": 18, + "line": 21, + "end_line": 21, "column": 33, "end_column": 40 }, @@ -162,19 +162,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 23, + "end_line": 23, "column": 2, - "end_column": 21 + "end_column": 17 }, "expr": { "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 23, + "end_line": 23, "column": 2, - "end_column": 21 + "end_column": 17 }, "wtype": { "_type": "WType", @@ -187,10 +187,10 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 23, + "end_line": 23, "column": 9, - "end_column": 20 + "end_column": 16 }, "wtype": { "_type": "WType", @@ -203,10 +203,10 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 23, + "end_line": 23, "column": 9, - "end_column": 20 + "end_column": 16 }, "wtype": { "_type": "WType", @@ -219,8 +219,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 23, + "end_line": 23, "column": 9, "end_column": 10 }, @@ -249,10 +249,10 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 23, + "end_line": 23, "column": 9, - "end_column": 20 + "end_column": 16 }, "wtype": { "_type": "WType", @@ -265,10 +265,10 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, - "column": 18, - "end_column": 19 + "line": 23, + "end_line": 23, + "column": 15, + "end_column": 16 }, "wtype": { "_type": "ARC4UFixedNxM", @@ -311,10 +311,10 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, + "line": 26, + "end_line": 26, "column": 0, - "end_column": 51 + "end_column": 56 }, "args": [ { @@ -329,10 +329,10 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, - "column": 14, - "end_column": 23 + "line": 26, + "end_line": 26, + "column": 19, + "end_column": 28 } }, { @@ -347,10 +347,10 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, - "column": 25, - "end_column": 35 + "line": 26, + "end_line": 26, + "column": 30, + "end_column": 40 } }, { @@ -374,10 +374,10 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, - "column": 37, - "end_column": 50 + "line": 26, + "end_line": 26, + "column": 42, + "end_column": 55 } } ], @@ -392,9 +392,9 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 39, - "column": 52, + "line": 26, + "end_line": 57, + "column": 57, "end_column": 1 }, "body": [ @@ -402,8 +402,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 24, - "end_line": 24, + "line": 27, + "end_line": 27, "column": 8, "end_column": 27 }, @@ -411,8 +411,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 24, - "end_line": 24, + "line": 27, + "end_line": 27, "column": 8, "end_column": 9 }, @@ -438,8 +438,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 24, - "end_line": 24, + "line": 27, + "end_line": 27, "column": 12, "end_column": 27 }, @@ -467,8 +467,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 28, + "end_line": 28, "column": 2, "end_column": 30 }, @@ -476,8 +476,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 28, + "end_line": 28, "column": 2, "end_column": 30 }, @@ -492,8 +492,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 28, + "end_line": 28, "column": 9, "end_column": 29 }, @@ -508,8 +508,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 28, + "end_line": 28, "column": 9, "end_column": 23 }, @@ -527,8 +527,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 28, + "end_line": 28, "column": 9, "end_column": 16 }, @@ -543,8 +543,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 28, + "end_line": 28, "column": 9, "end_column": 10 }, @@ -574,8 +574,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 25, - "end_line": 25, + "line": 28, + "end_line": 28, "column": 28, "end_column": 29 }, @@ -597,8 +597,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 26, - "end_line": 26, + "line": 29, + "end_line": 29, "column": 8, "end_column": 31 }, @@ -606,8 +606,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 26, - "end_line": 26, + "line": 29, + "end_line": 29, "column": 8, "end_column": 10 }, @@ -633,8 +633,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 26, - "end_line": 26, + "line": 29, + "end_line": 29, "column": 13, "end_column": 31 }, @@ -662,8 +662,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 30, + "end_line": 30, "column": 2, "end_column": 42 }, @@ -671,8 +671,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 30, + "end_line": 30, "column": 2, "end_column": 42 }, @@ -687,8 +687,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 30, + "end_line": 30, "column": 9, "end_column": 41 }, @@ -703,8 +703,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 30, + "end_line": 30, "column": 9, "end_column": 17 }, @@ -719,8 +719,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 30, + "end_line": 30, "column": 9, "end_column": 11 }, @@ -748,8 +748,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 30, + "end_line": 30, "column": 22, "end_column": 41 }, @@ -771,8 +771,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 29, - "end_line": 29, + "line": 32, + "end_line": 32, "column": 8, "end_column": 27 }, @@ -780,8 +780,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 29, - "end_line": 29, + "line": 32, + "end_line": 32, "column": 8, "end_column": 9 }, @@ -807,8 +807,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 29, - "end_line": 29, + "line": 32, + "end_line": 32, "column": 12, "end_column": 27 }, @@ -836,8 +836,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, + "line": 33, + "end_line": 33, "column": 2, "end_column": 30 }, @@ -845,8 +845,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, + "line": 33, + "end_line": 33, "column": 2, "end_column": 30 }, @@ -861,8 +861,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, + "line": 33, + "end_line": 33, "column": 9, "end_column": 29 }, @@ -877,8 +877,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, + "line": 33, + "end_line": 33, "column": 9, "end_column": 23 }, @@ -896,8 +896,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, + "line": 33, + "end_line": 33, "column": 9, "end_column": 16 }, @@ -912,8 +912,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, + "line": 33, + "end_line": 33, "column": 9, "end_column": 10 }, @@ -943,8 +943,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, + "line": 33, + "end_line": 33, "column": 28, "end_column": 29 }, @@ -966,8 +966,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 31, - "end_line": 31, + "line": 34, + "end_line": 34, "column": 8, "end_column": 27 }, @@ -975,8 +975,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 31, - "end_line": 31, + "line": 34, + "end_line": 34, "column": 8, "end_column": 9 }, @@ -1002,8 +1002,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 31, - "end_line": 31, + "line": 34, + "end_line": 34, "column": 12, "end_column": 27 }, @@ -1027,8 +1027,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 31, - "end_line": 31, + "line": 34, + "end_line": 34, "column": 25, "end_column": 26 }, @@ -1047,8 +1047,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 35, + "end_line": 35, "column": 8, "end_column": 27 }, @@ -1056,8 +1056,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 35, + "end_line": 35, "column": 8, "end_column": 16 }, @@ -1074,8 +1074,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 35, + "end_line": 35, "column": 19, "end_column": 27 }, @@ -1090,8 +1090,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 35, + "end_line": 35, "column": 19, "end_column": 20 }, @@ -1119,8 +1119,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 36, + "end_line": 36, "column": 2, "end_column": 24 }, @@ -1128,8 +1128,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 36, + "end_line": 36, "column": 2, "end_column": 24 }, @@ -1144,8 +1144,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 36, + "end_line": 36, "column": 9, "end_column": 23 }, @@ -1160,8 +1160,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 36, + "end_line": 36, "column": 9, "end_column": 17 }, @@ -1179,8 +1179,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 36, + "end_line": 36, "column": 22, "end_column": 23 }, @@ -1201,8 +1201,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 37, + "end_line": 37, "column": 8, "end_column": 29 }, @@ -1210,8 +1210,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 37, + "end_line": 37, "column": 8, "end_column": 9 }, @@ -1237,8 +1237,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 37, + "end_line": 37, "column": 12, "end_column": 29 }, @@ -1262,8 +1262,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 37, + "end_line": 37, "column": 27, "end_column": 28 }, @@ -1282,8 +1282,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 35, - "end_line": 35, + "line": 38, + "end_line": 38, "column": 8, "end_column": 27 }, @@ -1291,8 +1291,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 35, - "end_line": 35, + "line": 38, + "end_line": 38, "column": 8, "end_column": 16 }, @@ -1309,8 +1309,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 35, - "end_line": 35, + "line": 38, + "end_line": 38, "column": 19, "end_column": 27 }, @@ -1325,8 +1325,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 35, - "end_line": 35, + "line": 38, + "end_line": 38, "column": 19, "end_column": 20 }, @@ -1354,8 +1354,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 36, - "end_line": 36, + "line": 39, + "end_line": 39, "column": 2, "end_column": 24 }, @@ -1363,8 +1363,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 36, - "end_line": 36, + "line": 39, + "end_line": 39, "column": 2, "end_column": 24 }, @@ -1379,8 +1379,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 36, - "end_line": 36, + "line": 39, + "end_line": 39, "column": 9, "end_column": 23 }, @@ -1395,8 +1395,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 36, - "end_line": 36, + "line": 39, + "end_line": 39, "column": 9, "end_column": 17 }, @@ -1414,8 +1414,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 36, - "end_line": 36, + "line": 39, + "end_line": 39, "column": 22, "end_column": 23 }, @@ -1436,8 +1436,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 38, - "end_line": 38, + "line": 41, + "end_line": 41, "column": 2, "end_column": 36 }, @@ -1445,8 +1445,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 38, - "end_line": 38, + "line": 41, + "end_line": 41, "column": 2, "end_column": 36 }, @@ -1461,8 +1461,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 38, - "end_line": 38, + "line": 41, + "end_line": 41, "column": 9, "end_column": 35 }, @@ -1477,8 +1477,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 38, - "end_line": 38, + "line": 41, + "end_line": 41, "column": 9, "end_column": 23 }, @@ -1496,8 +1496,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 38, - "end_line": 38, + "line": 41, + "end_line": 41, "column": 9, "end_column": 16 }, @@ -1512,8 +1512,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 38, - "end_line": 38, + "line": 41, + "end_line": 41, "column": 9, "end_column": 10 }, @@ -1543,8 +1543,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 38, - "end_line": 38, + "line": 41, + "end_line": 41, "column": 28, "end_column": 35 }, @@ -1561,107 +1561,1198 @@ }, "error_message": null } - } - ], - "label": null, - "comment": null - }, - "documentation": { - "_type": "MethodDocumentation", - "description": null, - "args": {}, - "returns": null - }, - "id": "tests/approvals/arc4-types.algo.ts::test", - "name": "test" - }, - { - "_type": "Subroutine", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, - "column": 0, - "end_column": 18 - }, - "args": [], - "return_type": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "body": { - "_type": "Block", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 46, - "column": 19, - "end_column": 1 - }, - "body": [ + }, { "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 42, - "end_line": 42, + "line": 43, + "end_line": 43, "column": 8, - "end_column": 22 + "end_column": 25 }, "target": { "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 42, - "end_line": 42, + "line": 43, + "end_line": 43, "column": 8, - "end_column": 10 + "end_column": 15 }, "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", + "_type": "WType", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 + "scalar_type": 1 + }, + "name": "a_bytes" + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 18, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 43, + "end_line": 43, + "column": 18, + "end_column": 19 }, - "arc4_name": "string", - "element_type": { + "wtype": { "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "arc4.uint128", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "uint64", + "name": "biguint", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "arc4_name": "byte", - "n": "8" + "arc4_name": "uint128", + "n": "128" }, - "source_location": null - }, - "name": "s1" + "name": "a" + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 44, + "end_line": 44, + "column": 8, + "end_column": 59 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 44, + "end_line": 44, + "column": 8, + "end_column": 20 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint128", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint128", + "n": "128" + }, + "name": "a_from_bytes" + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 44, + "end_line": 44, + "column": 23, + "end_column": 59 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint128", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint128", + "n": "128" + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 44, + "end_line": 44, + "column": 51, + "end_column": 58 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "a_bytes" + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 46, + "end_line": 46, + "column": 2, + "end_column": 28 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 46, + "end_line": 46, + "column": 2, + "end_column": 28 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 46, + "end_line": 46, + "column": 9, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 46, + "end_line": 46, + "column": 9, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 46, + "end_line": 46, + "column": 9, + "end_column": 21 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint128", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint128", + "n": "128" + }, + "name": "a_from_bytes" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 46, + "end_line": 46, + "column": 9, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 46, + "end_line": 46, + "column": 26, + "end_column": 27 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint128", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint128", + "n": "128" + }, + "name": "a" + } + } + }, + "error_message": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 48, + "end_line": 48, + "column": 8, + "end_column": 35 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 48, + "end_line": 48, + "column": 8, + "end_column": 17 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "name": "aliased64" + }, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 48, + "end_line": 48, + "column": 20, + "end_column": 35 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": "12", + "teal_alias": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 50, + "end_line": 50, + "column": 2, + "end_column": 33 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 50, + "end_line": 50, + "column": 2, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 50, + "end_line": 50, + "column": 9, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 50, + "end_line": 50, + "column": 9, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 50, + "end_line": 50, + "column": 9, + "end_column": 18 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "name": "aliased64" + } + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 50, + "end_line": 50, + "column": 30, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "12", + "teal_alias": null + } + }, + "error_message": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 51, + "end_line": 51, + "column": 8, + "end_column": 38 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 51, + "end_line": 51, + "column": 8, + "end_column": 17 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint32", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint32", + "n": "32" + }, + "name": "aliased32" + }, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 51, + "end_line": 51, + "column": 20, + "end_column": 38 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint32", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint32", + "n": "32" + }, + "value": "50545", + "teal_alias": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 52, + "end_line": 52, + "column": 2, + "end_column": 45 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 52, + "end_line": 52, + "column": 2, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 52, + "end_line": 52, + "column": 9, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 52, + "end_line": 52, + "column": 9, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 52, + "end_line": 52, + "column": 17, + "end_column": 32 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 52, + "end_line": 52, + "column": 17, + "end_column": 26 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint32", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint32", + "n": "32" + }, + "name": "aliased32" + } + } + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 52, + "end_line": 52, + "column": 38, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "50545", + "teal_alias": null + } + }, + "error_message": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 54, + "end_line": 54, + "column": 8, + "end_column": 28 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 54, + "end_line": 54, + "column": 8, + "end_column": 12 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "name": "byte" + }, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 54, + "end_line": 54, + "column": 15, + "end_column": 28 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "value": "255", + "teal_alias": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 2, + "end_column": 60 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 2, + "end_column": 60 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 9, + "end_column": 59 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "BytesUnaryOperation", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 9, + "end_column": 35 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op": "~", + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 9, + "end_column": 19 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 9, + "end_column": 13 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "name": "byte" + } + } + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 56, + "end_line": 56, + "column": 40, + "end_column": 59 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "00", + "encoding": "base16" + } + }, + "error_message": null + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "id": "tests/approvals/arc4-types.algo.ts::testUintN", + "name": "testUintN" + }, + { + "_type": "Subroutine", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 59, + "end_line": 59, + "column": 0, + "end_column": 18 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 59, + "end_line": 70, + "column": 19, + "end_column": 1 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 60, + "end_line": 60, + "column": 8, + "end_column": 22 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 60, + "end_line": 60, + "column": 8, + "end_column": 10 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "s1" + }, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 60, + "end_line": 60, + "column": 13, + "end_column": 22 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": "" + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 61, + "end_line": 61, + "column": 2, + "end_column": 99 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 61, + "end_line": 61, + "column": 2, + "end_column": 99 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 61, + "end_line": 61, + "column": 9, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 61, + "end_line": 61, + "column": 9, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 61, + "end_line": 61, + "column": 9, + "end_column": 11 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "s1" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 61, + "end_line": 61, + "column": 22, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 61, + "end_line": 61, + "column": 22, + "end_column": 38 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint16", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint16", + "n": "16" + }, + "value": "0", + "teal_alias": null + } + } + }, + "error_message": "Empty string should equal the uint16 length prefix" + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 62, + "end_line": 62, + "column": 8, + "end_column": 29 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 62, + "end_line": 62, + "column": 8, + "end_column": 10 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "s2" }, "value": { "_type": "StringConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 42, - "end_line": 42, + "line": 62, + "end_line": 62, "column": 13, - "end_column": 22 + "end_column": 29 }, "wtype": { "_type": "ARC4DynamicArray", @@ -1695,26 +2786,26 @@ }, "source_location": null }, - "value": "" + "value": "Hello" } }, { "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 63, + "end_line": 63, "column": 2, - "end_column": 99 + "end_column": 31 }, "expr": { "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 63, + "end_line": 63, "column": 2, - "end_column": 99 + "end_column": 31 }, "wtype": { "_type": "WType", @@ -1727,10 +2818,10 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 63, + "end_line": 63, "column": 9, - "end_column": 44 + "end_column": 30 }, "wtype": { "_type": "WType", @@ -1740,27 +2831,27 @@ "scalar_type": 2 }, "lhs": { - "_type": "ReinterpretCast", + "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 63, + "end_line": 63, "column": 9, - "end_column": 17 + "end_column": 18 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "string", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { + "value": { "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 63, + "end_line": 63, "column": 9, "end_column": 11 }, @@ -1796,76 +2887,137 @@ }, "source_location": null }, - "name": "s1" + "name": "s2" } }, "operator": "==", "rhs": { - "_type": "ReinterpretCast", + "_type": "StringConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, - "column": 22, - "end_column": 44 + "line": 63, + "end_line": 63, + "column": 23, + "end_column": 30 }, "wtype": { "_type": "WType", - "name": "bytes", + "name": "string", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "expr": { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, - "column": 22, - "end_column": 38 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint16", + "value": "Hello" + } + }, + "error_message": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 65, + "end_line": 65, + "column": 8, + "end_column": 27 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 65, + "end_line": 65, + "column": 8, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "s2_bytes" + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 65, + "end_line": 65, + "column": 19, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 65, + "end_line": 65, + "column": 19, + "end_column": 21 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint16", - "n": "16" + "scalar_type": 2 }, - "value": "0", - "teal_alias": null - } - } - }, - "error_message": "Empty string should equal the uint16 length prefix" + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "s2" + } } }, { "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 44, - "end_line": 44, + "line": 67, + "end_line": 67, "column": 8, - "end_column": 29 + "end_column": 54 }, "target": { "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 44, - "end_line": 44, + "line": 67, + "end_line": 67, "column": 8, - "end_column": 10 + "end_column": 21 }, "wtype": { "_type": "ARC4DynamicArray", @@ -1899,16 +3051,16 @@ }, "source_location": null }, - "name": "s2" + "name": "s2_from_bytes" }, "value": { - "_type": "StringConstant", + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 44, - "end_line": 44, - "column": 13, - "end_column": 29 + "line": 67, + "end_line": 67, + "column": 24, + "end_column": 54 }, "wtype": { "_type": "ARC4DynamicArray", @@ -1942,26 +3094,43 @@ }, "source_location": null }, - "value": "Hello" + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 67, + "end_line": 67, + "column": 45, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "s2_bytes" + } } }, { "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 69, + "end_line": 69, "column": 2, - "end_column": 31 + "end_column": 30 }, "expr": { "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 69, + "end_line": 69, "column": 2, - "end_column": 31 + "end_column": 30 }, "wtype": { "_type": "WType", @@ -1974,10 +3143,10 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 69, + "end_line": 69, "column": 9, - "end_column": 30 + "end_column": 29 }, "wtype": { "_type": "WType", @@ -1987,27 +3156,27 @@ "scalar_type": 2 }, "lhs": { - "_type": "ARC4Decode", + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 69, + "end_line": 69, "column": 9, - "end_column": 18 + "end_column": 29 }, "wtype": { "_type": "WType", - "name": "string", + "name": "bytes", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "value": { + "expr": { "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, + "line": 69, + "end_line": 69, "column": 9, "end_column": 11 }, @@ -2048,22 +3217,64 @@ }, "operator": "==", "rhs": { - "_type": "StringConstant", + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 45, - "end_line": 45, - "column": 23, - "end_column": 30 + "line": 69, + "end_line": 69, + "column": 9, + "end_column": 29 }, "wtype": { "_type": "WType", - "name": "string", + "name": "bytes", "immutable": true, "ephemeral": false, "scalar_type": 1 }, - "value": "Hello" + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 69, + "end_line": 69, + "column": 16, + "end_column": 29 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "name": "s2_from_bytes" + } } }, "error_message": null @@ -2086,8 +3297,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 48, - "end_line": 48, + "line": 72, + "end_line": 72, "column": 0, "end_column": 43 }, @@ -2104,8 +3315,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 48, - "end_line": 48, + "line": 72, + "end_line": 72, "column": 26, "end_column": 42 } @@ -2122,8 +3333,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 48, - "end_line": 57, + "line": 72, + "end_line": 81, "column": 44, "end_column": 1 }, @@ -2132,8 +3343,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 73, + "end_line": 73, "column": 8, "end_column": 32 }, @@ -2141,8 +3352,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 73, + "end_line": 73, "column": 8, "end_column": 11 }, @@ -2184,8 +3395,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 49, - "end_line": 49, + "line": 73, + "end_line": 73, "column": 14, "end_column": 32 }, @@ -2229,8 +3440,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 50, - "end_line": 50, + "line": 74, + "end_line": 74, "column": 2, "end_column": 67 }, @@ -2238,8 +3449,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 50, - "end_line": 50, + "line": 74, + "end_line": 74, "column": 2, "end_column": 67 }, @@ -2254,8 +3465,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 50, - "end_line": 50, + "line": 74, + "end_line": 74, "column": 9, "end_column": 31 }, @@ -2270,8 +3481,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 50, - "end_line": 50, + "line": 74, + "end_line": 74, "column": 9, "end_column": 19 }, @@ -2286,8 +3497,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 50, - "end_line": 50, + "line": 74, + "end_line": 74, "column": 9, "end_column": 12 }, @@ -2331,8 +3542,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 50, - "end_line": 50, + "line": 74, + "end_line": 74, "column": 24, "end_column": 31 }, @@ -2354,8 +3565,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 51, - "end_line": 51, + "line": 75, + "end_line": 75, "column": 2, "end_column": 95 }, @@ -2363,8 +3574,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 51, - "end_line": 51, + "line": 75, + "end_line": 75, "column": 2, "end_column": 95 }, @@ -2379,8 +3590,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 51, - "end_line": 51, + "line": 75, + "end_line": 75, "column": 9, "end_column": 45 }, @@ -2395,8 +3606,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 51, - "end_line": 51, + "line": 75, + "end_line": 75, "column": 9, "end_column": 18 }, @@ -2411,8 +3622,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 51, - "end_line": 51, + "line": 75, + "end_line": 75, "column": 9, "end_column": 12 }, @@ -2456,8 +3667,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 51, - "end_line": 51, + "line": 75, + "end_line": 75, "column": 23, "end_column": 45 }, @@ -2472,8 +3683,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 51, - "end_line": 51, + "line": 75, + "end_line": 75, "column": 23, "end_column": 39 }, @@ -2505,8 +3716,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 52, - "end_line": 52, + "line": 76, + "end_line": 76, "column": 8, "end_column": 41 }, @@ -2514,8 +3725,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 52, - "end_line": 52, + "line": 76, + "end_line": 76, "column": 8, "end_column": 11 }, @@ -2557,8 +3768,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 52, - "end_line": 52, + "line": 76, + "end_line": 76, "column": 14, "end_column": 41 }, @@ -2598,8 +3809,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 52, - "end_line": 52, + "line": 76, + "end_line": 76, "column": 31, "end_column": 40 }, @@ -2618,8 +3829,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 53, - "end_line": 53, + "line": 77, + "end_line": 77, "column": 2, "end_column": 34 }, @@ -2627,8 +3838,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 53, - "end_line": 53, + "line": 77, + "end_line": 77, "column": 2, "end_column": 34 }, @@ -2643,8 +3854,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 53, - "end_line": 53, + "line": 77, + "end_line": 77, "column": 9, "end_column": 33 }, @@ -2659,8 +3870,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 53, - "end_line": 53, + "line": 77, + "end_line": 77, "column": 9, "end_column": 19 }, @@ -2675,8 +3886,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 53, - "end_line": 53, + "line": 77, + "end_line": 77, "column": 9, "end_column": 12 }, @@ -2720,8 +3931,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 53, - "end_line": 53, + "line": 77, + "end_line": 77, "column": 24, "end_column": 33 }, @@ -2742,8 +3953,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 55, - "end_line": 55, + "line": 79, + "end_line": 79, "column": 8, "end_column": 39 }, @@ -2751,8 +3962,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 55, - "end_line": 55, + "line": 79, + "end_line": 79, "column": 8, "end_column": 11 }, @@ -2794,8 +4005,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 55, - "end_line": 55, + "line": 79, + "end_line": 79, "column": 14, "end_column": 39 }, @@ -2839,8 +4050,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 80, + "end_line": 80, "column": 2, "end_column": 39 }, @@ -2848,8 +4059,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 80, + "end_line": 80, "column": 2, "end_column": 39 }, @@ -2864,8 +4075,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 80, + "end_line": 80, "column": 9, "end_column": 38 }, @@ -2880,8 +4091,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 80, + "end_line": 80, "column": 9, "end_column": 19 }, @@ -2896,8 +4107,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 80, + "end_line": 80, "column": 9, "end_column": 12 }, @@ -2941,8 +4152,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 80, + "end_line": 80, "column": 30, "end_column": 37 }, @@ -2977,8 +4188,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 59, - "end_line": 59, + "line": 83, + "end_line": 83, "column": 0, "end_column": 26 }, @@ -2994,8 +4205,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 59, - "end_line": 63, + "line": 83, + "end_line": 87, "column": 27, "end_column": 1 }, @@ -3004,8 +4215,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 60, - "end_line": 60, + "line": 84, + "end_line": 84, "column": 8, "end_column": 30 }, @@ -3013,8 +4224,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 60, - "end_line": 60, + "line": 84, + "end_line": 84, "column": 8, "end_column": 10 }, @@ -3057,8 +4268,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 60, - "end_line": 60, + "line": 84, + "end_line": 84, "column": 13, "end_column": 30 }, @@ -3103,8 +4314,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 61, - "end_line": 61, + "line": 85, + "end_line": 85, "column": 8, "end_column": 33 }, @@ -3112,8 +4323,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 61, - "end_line": 61, + "line": 85, + "end_line": 85, "column": 8, "end_column": 10 }, @@ -3156,8 +4367,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 61, - "end_line": 61, + "line": 85, + "end_line": 85, "column": 13, "end_column": 33 }, @@ -3202,8 +4413,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 62, - "end_line": 62, + "line": 86, + "end_line": 86, "column": 8, "end_column": 60 }, @@ -3211,8 +4422,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 62, - "end_line": 62, + "line": 86, + "end_line": 86, "column": 8, "end_column": 10 }, @@ -3255,8 +4466,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 62, - "end_line": 62, + "line": 86, + "end_line": 86, "column": 13, "end_column": 60 }, @@ -3314,8 +4525,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 68, - "end_line": 68, + "line": 92, + "end_line": 92, "column": 0, "end_column": 34 }, @@ -3341,8 +4552,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 68, - "end_line": 68, + "line": 92, + "end_line": 92, "column": 20, "end_column": 33 } @@ -3359,8 +4570,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 68, - "end_line": 80, + "line": 92, + "end_line": 104, "column": 35, "end_column": 1 }, @@ -3369,8 +4580,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 69, + "line": 93, + "end_line": 93, "column": 8, "end_column": 43 }, @@ -3378,8 +4589,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 69, + "line": 93, + "end_line": 93, "column": 8, "end_column": 15 }, @@ -3415,8 +4626,8 @@ "_type": "NewArray", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 69, + "line": 93, + "end_line": 93, "column": 18, "end_column": 43 }, @@ -3446,8 +4657,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 69, + "line": 93, + "end_line": 93, "column": 18, "end_column": 43 } @@ -3457,8 +4668,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 69, + "line": 93, + "end_line": 93, "column": 35, "end_column": 36 }, @@ -3484,8 +4695,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 69, + "line": 93, + "end_line": 93, "column": 38, "end_column": 39 }, @@ -3511,8 +4722,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 69, + "line": 93, + "end_line": 93, "column": 41, "end_column": 42 }, @@ -3541,8 +4752,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 71, - "end_line": 71, + "line": 95, + "end_line": 95, "column": 2, "end_column": 17 }, @@ -3550,8 +4761,8 @@ "_type": "ArrayExtend", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 71, - "end_line": 71, + "line": 95, + "end_line": 95, "column": 2, "end_column": 17 }, @@ -3585,8 +4796,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 71, - "end_line": 71, + "line": 95, + "end_line": 95, "column": 2, "end_column": 9 }, @@ -3622,8 +4833,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 71, - "end_line": 71, + "line": 95, + "end_line": 95, "column": 2, "end_column": 17 }, @@ -3657,8 +4868,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 71, - "end_line": 71, + "line": 95, + "end_line": 95, "column": 15, "end_column": 16 }, @@ -3688,8 +4899,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 97, + "end_line": 97, "column": 8, "end_column": 40 }, @@ -3697,8 +4908,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 97, + "end_line": 97, "column": 8, "end_column": 16 }, @@ -3735,8 +4946,8 @@ "_type": "NewArray", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 97, + "end_line": 97, "column": 19, "end_column": 40 }, @@ -3772,8 +4983,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 97, + "end_line": 97, "column": 35, "end_column": 36 }, @@ -3799,8 +5010,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 97, + "end_line": 97, "column": 38, "end_column": 39 }, @@ -3829,19 +5040,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 99, + "end_line": 99, "column": 2, - "end_column": 43 + "end_column": 39 }, "expr": { "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 99, + "end_line": 99, "column": 2, - "end_column": 43 + "end_column": 39 }, "wtype": { "_type": "WType", @@ -3854,10 +5065,10 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 99, + "end_line": 99, "column": 9, - "end_column": 42 + "end_column": 38 }, "wtype": { "_type": "WType", @@ -3870,10 +5081,10 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 99, + "end_line": 99, "column": 9, - "end_column": 42 + "end_column": 38 }, "wtype": { "_type": "WType", @@ -3886,8 +5097,8 @@ "_type": "IndexExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 99, + "end_line": 99, "column": 9, "end_column": 20 }, @@ -3911,8 +5122,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 99, + "end_line": 99, "column": 9, "end_column": 17 }, @@ -3949,8 +5160,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 99, + "end_line": 99, "column": 18, "end_column": 19 }, @@ -3971,10 +5182,10 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 99, + "end_line": 99, "column": 9, - "end_column": 42 + "end_column": 38 }, "wtype": { "_type": "WType", @@ -3987,10 +5198,10 @@ "_type": "ArrayPop", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, - "column": 28, - "end_column": 41 + "line": 99, + "end_line": 99, + "column": 25, + "end_column": 38 }, "wtype": { "_type": "ARC4UIntN", @@ -4012,10 +5223,10 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, - "column": 28, - "end_column": 35 + "line": 99, + "end_line": 99, + "column": 25, + "end_column": 32 }, "wtype": { "_type": "ARC4DynamicArray", @@ -4055,8 +5266,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 77, - "end_line": 77, + "line": 101, + "end_line": 101, "column": 2, "end_column": 33 }, @@ -4064,8 +5275,8 @@ "_type": "IndexExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 77, - "end_line": 77, + "line": 101, + "end_line": 101, "column": 2, "end_column": 13 }, @@ -4089,8 +5300,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 77, - "end_line": 77, + "line": 101, + "end_line": 101, "column": 2, "end_column": 10 }, @@ -4127,8 +5338,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 77, - "end_line": 77, + "line": 101, + "end_line": 101, "column": 11, "end_column": 12 }, @@ -4147,8 +5358,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 77, - "end_line": 77, + "line": 101, + "end_line": 101, "column": 16, "end_column": 33 }, @@ -4171,6 +5382,174 @@ "value": "50", "teal_alias": null } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 103, + "end_line": 103, + "column": 8, + "end_column": 59 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 103, + "end_line": 103, + "column": 8, + "end_column": 17 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[3]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "3" + }, + "name": "myStatic2" + }, + "value": { + "_type": "NewArray", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 103, + "end_line": 103, + "column": 20, + "end_column": 59 + }, + "wtype": { + "_type": "ARC4StaticArray", + "name": "arc4.static_array", + "immutable": false, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64[3]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "source_location": null, + "array_size": "3" + }, + "values": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 103, + "end_line": 103, + "column": 51, + "end_column": 52 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "name": "n" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 103, + "end_line": 103, + "column": 54, + "end_column": 55 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "name": "n" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 103, + "end_line": 103, + "column": 57, + "end_column": 58 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "name": "n" + } + ] + } } ], "label": null, @@ -4189,8 +5568,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 82, - "end_line": 82, + "line": 106, + "end_line": 106, "column": 0, "end_column": 19 }, @@ -4206,8 +5585,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 82, - "end_line": 86, + "line": 106, + "end_line": 110, "column": 20, "end_column": 1 }, @@ -4216,8 +5595,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 83, - "end_line": 83, + "line": 107, + "end_line": 107, "column": 8, "end_column": 22 }, @@ -4225,8 +5604,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 83, - "end_line": 83, + "line": 107, + "end_line": 107, "column": 8, "end_column": 9 }, @@ -4252,8 +5631,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 83, - "end_line": 83, + "line": 107, + "end_line": 107, "column": 12, "end_column": 22 }, @@ -4281,8 +5660,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 84, - "end_line": 84, + "line": 108, + "end_line": 108, "column": 8, "end_column": 24 }, @@ -4290,8 +5669,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 84, - "end_line": 84, + "line": 108, + "end_line": 108, "column": 8, "end_column": 10 }, @@ -4317,8 +5696,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 84, - "end_line": 84, + "line": 108, + "end_line": 108, "column": 13, "end_column": 24 }, @@ -4346,19 +5725,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 85, - "end_line": 85, + "line": 109, + "end_line": 109, "column": 2, - "end_column": 22 + "end_column": 18 }, "expr": { "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 85, - "end_line": 85, + "line": 109, + "end_line": 109, "column": 2, - "end_column": 22 + "end_column": 18 }, "wtype": { "_type": "WType", @@ -4371,10 +5750,10 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 85, - "end_line": 85, + "line": 109, + "end_line": 109, "column": 9, - "end_column": 21 + "end_column": 17 }, "wtype": { "_type": "WType", @@ -4387,10 +5766,10 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 85, - "end_line": 85, + "line": 109, + "end_line": 109, "column": 9, - "end_column": 21 + "end_column": 17 }, "wtype": { "_type": "WType", @@ -4403,8 +5782,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 85, - "end_line": 85, + "line": 109, + "end_line": 109, "column": 9, "end_column": 10 }, @@ -4432,10 +5811,10 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 85, - "end_line": 85, + "line": 109, + "end_line": 109, "column": 9, - "end_column": 21 + "end_column": 17 }, "wtype": { "_type": "WType", @@ -4448,10 +5827,10 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 85, - "end_line": 85, - "column": 18, - "end_column": 20 + "line": 109, + "end_line": 109, + "column": 15, + "end_column": 17 }, "wtype": { "_type": "ARC4UIntN", @@ -4493,8 +5872,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 88, - "end_line": 88, + "line": 112, + "end_line": 112, "column": 0, "end_column": 22 }, @@ -4510,8 +5889,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 88, - "end_line": 95, + "line": 112, + "end_line": 119, "column": 23, "end_column": 1 }, @@ -4520,8 +5899,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 89, - "end_line": 89, + "line": 113, + "end_line": 113, "column": 8, "end_column": 25 }, @@ -4529,8 +5908,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 89, - "end_line": 89, + "line": 113, + "end_line": 113, "column": 8, "end_column": 9 }, @@ -4573,8 +5952,8 @@ "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 89, - "end_line": 89, + "line": 113, + "end_line": 113, "column": 12, "end_column": 25 }, @@ -4618,8 +5997,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 90, - "end_line": 90, + "line": 114, + "end_line": 114, "column": 8, "end_column": 35 }, @@ -4627,8 +6006,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 90, - "end_line": 90, + "line": 114, + "end_line": 114, "column": 8, "end_column": 9 }, @@ -4671,8 +6050,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 90, - "end_line": 90, + "line": 114, + "end_line": 114, "column": 12, "end_column": 35 }, @@ -4713,8 +6092,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 90, - "end_line": 90, + "line": 114, + "end_line": 114, "column": 24, "end_column": 34 }, @@ -4737,19 +6116,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 92, + "line": 116, + "end_line": 116, "column": 2, - "end_column": 62 + "end_column": 57 }, "expr": { "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 92, + "line": 116, + "end_line": 116, "column": 2, - "end_column": 62 + "end_column": 57 }, "wtype": { "_type": "WType", @@ -4759,13 +6138,13 @@ "scalar_type": null }, "condition": { - "_type": "Not", + "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 92, + "line": 116, + "end_line": 116, "column": 9, - "end_column": 21 + "end_column": 16 }, "wtype": { "_type": "WType", @@ -4774,144 +6153,127 @@ "ephemeral": false, "scalar_type": 2 }, - "expr": { - "_type": "BytesComparisonExpression", + "lhs": { + "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 92, - "column": 10, - "end_column": 21 + "line": 116, + "end_line": 116, + "column": 9, + "end_column": 16 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "bytes", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1 }, - "lhs": { - "_type": "ReinterpretCast", + "expr": { + "_type": "VarExpression", "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 92, - "column": 10, - "end_column": 21 + "file": "tests/approvals/arc4-types.algo.ts", + "line": 116, + "end_line": 116, + "column": 9, + "end_column": 10 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4StaticArray", + "name": "arc4.static_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 92, - "column": 10, - "end_column": 11 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4StaticArray", - "name": "arc4.static_array", + "arc4_name": "address", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "address", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null, - "array_size": "32" + "arc4_name": "byte", + "n": "8" }, - "name": "a" - } + "source_location": null, + "array_size": "32" + }, + "name": "a" + } + }, + "operator": "!=", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 116, + "end_line": 116, + "column": 9, + "end_column": 16 }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 92, - "column": 10, - "end_column": 21 + "line": 116, + "end_line": 116, + "column": 15, + "end_column": 16 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4StaticArray", + "name": "arc4.static_array", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 92, - "column": 19, - "end_column": 20 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "account", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - "wtype": { - "_type": "ARC4StaticArray", - "name": "arc4.static_array", + "arc4_name": "address", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", "immutable": true, "ephemeral": false, "scalar_type": 1, "native_type": { "_type": "WType", - "name": "account", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "address", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" + "scalar_type": 2 }, - "source_location": null, - "array_size": "32" + "arc4_name": "byte", + "n": "8" }, - "name": "b" - } + "source_location": null, + "array_size": "32" + }, + "name": "b" } } }, @@ -4922,19 +6284,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 117, + "end_line": 117, "column": 2, - "end_column": 68 + "end_column": 64 }, "expr": { "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 117, + "end_line": 117, "column": 2, - "end_column": 68 + "end_column": 64 }, "wtype": { "_type": "WType", @@ -4947,10 +6309,10 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 117, + "end_line": 117, "column": 9, - "end_column": 32 + "end_column": 28 }, "wtype": { "_type": "WType", @@ -4963,10 +6325,10 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 117, + "end_line": 117, "column": 9, - "end_column": 32 + "end_column": 28 }, "wtype": { "_type": "WType", @@ -4979,8 +6341,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 117, + "end_line": 117, "column": 9, "end_column": 10 }, @@ -5025,10 +6387,10 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 117, + "end_line": 117, "column": 9, - "end_column": 32 + "end_column": 28 }, "wtype": { "_type": "WType", @@ -5041,10 +6403,10 @@ "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, - "column": 18, - "end_column": 31 + "line": 117, + "end_line": 117, + "column": 15, + "end_column": 28 }, "wtype": { "_type": "ARC4StaticArray", @@ -5090,19 +6452,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 94, - "end_line": 94, + "line": 118, + "end_line": 118, "column": 2, - "end_column": 77 + "end_column": 73 }, "expr": { "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 94, - "end_line": 94, + "line": 118, + "end_line": 118, "column": 2, - "end_column": 77 + "end_column": 73 }, "wtype": { "_type": "WType", @@ -5115,10 +6477,10 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 94, - "end_line": 94, + "line": 118, + "end_line": 118, "column": 9, - "end_column": 32 + "end_column": 28 }, "wtype": { "_type": "WType", @@ -5131,10 +6493,10 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 94, - "end_line": 94, + "line": 118, + "end_line": 118, "column": 9, - "end_column": 32 + "end_column": 28 }, "wtype": { "_type": "WType", @@ -5147,8 +6509,8 @@ "_type": "IndexExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 94, - "end_line": 94, + "line": 118, + "end_line": 118, "column": 9, "end_column": 13 }, @@ -5172,8 +6534,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 94, - "end_line": 94, + "line": 118, + "end_line": 118, "column": 9, "end_column": 10 }, @@ -5216,8 +6578,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 94, - "end_line": 94, + "line": 118, + "end_line": 118, "column": 11, "end_column": 12 }, @@ -5238,10 +6600,10 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 94, - "end_line": 94, + "line": 118, + "end_line": 118, "column": 9, - "end_column": 32 + "end_column": 28 }, "wtype": { "_type": "WType", @@ -5254,10 +6616,10 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 94, - "end_line": 94, - "column": 21, - "end_column": 31 + "line": 118, + "end_line": 118, + "column": 18, + "end_column": 28 }, "wtype": { "_type": "ARC4UIntN", @@ -5300,8 +6662,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 97, - "end_line": 97, + "line": 121, + "end_line": 121, "column": 0, "end_column": 20 }, @@ -5317,8 +6679,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 97, - "end_line": 104, + "line": 121, + "end_line": 128, "column": 21, "end_column": 1 }, @@ -5327,8 +6689,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 98, - "end_line": 98, + "line": 122, + "end_line": 122, "column": 8, "end_column": 41 }, @@ -5336,8 +6698,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 98, - "end_line": 98, + "line": 122, + "end_line": 122, "column": 8, "end_column": 9 }, @@ -5375,8 +6737,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 98, - "end_line": 98, + "line": 122, + "end_line": 122, "column": 12, "end_column": 41 }, @@ -5408,8 +6770,8 @@ ], "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 98, - "end_line": 98, + "line": 122, + "end_line": 122, "column": 12, "end_column": 41 } @@ -5418,8 +6780,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 98, - "end_line": 98, + "line": 122, + "end_line": 122, "column": 12, "end_column": 41 }, @@ -5453,8 +6815,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 98, - "end_line": 98, + "line": 122, + "end_line": 122, "column": 22, "end_column": 40 }, @@ -5485,8 +6847,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 99, - "end_line": 99, + "line": 123, + "end_line": 123, "column": 8, "end_column": 27 }, @@ -5494,8 +6856,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 99, - "end_line": 99, + "line": 123, + "end_line": 123, "column": 8, "end_column": 17 }, @@ -5521,8 +6883,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 99, - "end_line": 99, + "line": 123, + "end_line": 123, "column": 20, "end_column": 27 }, @@ -5546,8 +6908,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 99, - "end_line": 99, + "line": 123, + "end_line": 123, "column": 20, "end_column": 21 }, @@ -5588,8 +6950,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 100, - "end_line": 100, + "line": 124, + "end_line": 124, "column": 8, "end_column": 38 }, @@ -5597,8 +6959,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 100, - "end_line": 100, + "line": 124, + "end_line": 124, "column": 8, "end_column": 24 }, @@ -5624,8 +6986,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 100, - "end_line": 100, + "line": 124, + "end_line": 124, "column": 27, "end_column": 38 }, @@ -5649,8 +7011,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 100, - "end_line": 100, + "line": 124, + "end_line": 124, "column": 27, "end_column": 35 }, @@ -5683,8 +7045,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 100, - "end_line": 100, + "line": 124, + "end_line": 124, "column": 27, "end_column": 28 }, @@ -5726,19 +7088,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 101, - "end_line": 101, + "line": 125, + "end_line": 125, "column": 2, - "end_column": 44 + "end_column": 40 }, "expr": { "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 101, - "end_line": 101, + "line": 125, + "end_line": 125, "column": 2, - "end_column": 44 + "end_column": 40 }, "wtype": { "_type": "WType", @@ -5751,10 +7113,10 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 101, - "end_line": 101, + "line": 125, + "end_line": 125, "column": 9, - "end_column": 43 + "end_column": 39 }, "wtype": { "_type": "WType", @@ -5767,10 +7129,10 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 101, - "end_line": 101, + "line": 125, + "end_line": 125, "column": 9, - "end_column": 43 + "end_column": 39 }, "wtype": { "_type": "WType", @@ -5783,8 +7145,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 101, - "end_line": 101, + "line": 125, + "end_line": 125, "column": 9, "end_column": 18 }, @@ -5812,10 +7174,10 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 101, - "end_line": 101, + "line": 125, + "end_line": 125, "column": 9, - "end_column": 43 + "end_column": 39 }, "wtype": { "_type": "WType", @@ -5828,10 +7190,10 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 101, - "end_line": 101, - "column": 26, - "end_column": 42 + "line": 125, + "end_line": 125, + "column": 23, + "end_column": 39 }, "wtype": { "_type": "ARC4UIntN", @@ -5860,8 +7222,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 102, - "end_line": 102, + "line": 126, + "end_line": 126, "column": 8, "end_column": 49 }, @@ -5869,8 +7231,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 102, - "end_line": 102, + "line": 126, + "end_line": 126, "column": 8, "end_column": 10 }, @@ -5941,8 +7303,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 102, - "end_line": 102, + "line": 126, + "end_line": 126, "column": 13, "end_column": 49 }, @@ -6007,8 +7369,8 @@ ], "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 102, - "end_line": 102, + "line": 126, + "end_line": 126, "column": 13, "end_column": 49 } @@ -6017,8 +7379,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 102, - "end_line": 102, + "line": 126, + "end_line": 126, "column": 13, "end_column": 49 }, @@ -6085,8 +7447,8 @@ "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 102, - "end_line": 102, + "line": 126, + "end_line": 126, "column": 23, "end_column": 36 }, @@ -6129,8 +7491,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 102, - "end_line": 102, + "line": 126, + "end_line": 126, "column": 38, "end_column": 48 }, @@ -6161,8 +7523,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 103, - "end_line": 103, + "line": 127, + "end_line": 127, "column": 2, "end_column": 25 }, @@ -6170,8 +7532,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 103, - "end_line": 103, + "line": 127, + "end_line": 127, "column": 2, "end_column": 25 }, @@ -6186,8 +7548,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 103, - "end_line": 103, + "line": 127, + "end_line": 127, "column": 9, "end_column": 24 }, @@ -6202,8 +7564,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 103, - "end_line": 103, + "line": 127, + "end_line": 127, "column": 9, "end_column": 18 }, @@ -6222,8 +7584,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 103, - "end_line": 103, + "line": 127, + "end_line": 127, "column": 23, "end_column": 24 }, @@ -6258,8 +7620,8 @@ "_type": "Contract", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 106, - "end_line": 106, + "line": 130, + "end_line": 130, "column": 0, "end_column": 57 }, @@ -6273,8 +7635,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 111, - "end_line": 111, + "line": 135, + "end_line": 135, "column": 2, "end_column": 35 }, @@ -6421,8 +7783,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 111, - "end_line": 126, + "line": 135, + "end_line": 150, "column": 36, "end_column": 3 }, @@ -6431,8 +7793,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 112, - "end_line": 112, + "line": 136, + "end_line": 136, "column": 10, "end_column": 30 }, @@ -6440,8 +7802,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 112, - "end_line": 112, + "line": 136, + "end_line": 136, "column": 10, "end_column": 11 }, @@ -6467,8 +7829,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 112, - "end_line": 112, + "line": 136, + "end_line": 136, "column": 14, "end_column": 30 }, @@ -6496,8 +7858,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 113, - "end_line": 113, + "line": 137, + "end_line": 137, "column": 4, "end_column": 13 }, @@ -6505,8 +7867,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 113, - "end_line": 113, + "line": 137, + "end_line": 137, "column": 4, "end_column": 13 }, @@ -6528,19 +7890,19 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 114, - "end_line": 114, + "line": 138, + "end_line": 138, "column": 4, - "end_column": 34 + "end_column": 39 }, "expr": { "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 114, - "end_line": 114, + "line": 138, + "end_line": 138, "column": 4, - "end_column": 34 + "end_column": 39 }, "wtype": { "_type": "WType", @@ -6551,7 +7913,7 @@ }, "target": { "_type": "SubroutineID", - "target": "tests/approvals/arc4-types.algo.ts::test" + "target": "tests/approvals/arc4-types.algo.ts::testUintN" }, "args": [ { @@ -6561,10 +7923,10 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 114, - "end_line": 114, - "column": 9, - "end_column": 10 + "line": 138, + "end_line": 138, + "column": 14, + "end_column": 15 }, "wtype": { "_type": "WType", @@ -6584,10 +7946,10 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 114, - "end_line": 114, - "column": 12, - "end_column": 14 + "line": 138, + "end_line": 138, + "column": 17, + "end_column": 19 }, "wtype": { "_type": "WType", @@ -6607,10 +7969,10 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 114, - "end_line": 114, - "column": 16, - "end_column": 33 + "line": 138, + "end_line": 138, + "column": 21, + "end_column": 38 }, "wtype": { "_type": "ARC4UIntN", @@ -6639,8 +8001,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 115, - "end_line": 115, + "line": 139, + "end_line": 139, "column": 4, "end_column": 16 }, @@ -6648,8 +8010,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 115, - "end_line": 115, + "line": 139, + "end_line": 139, "column": 4, "end_column": 16 }, @@ -6671,8 +8033,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 116, - "end_line": 116, + "line": 140, + "end_line": 140, "column": 4, "end_column": 14 }, @@ -6680,8 +8042,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 116, - "end_line": 116, + "line": 140, + "end_line": 140, "column": 4, "end_column": 14 }, @@ -6703,8 +8065,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 117, - "end_line": 117, + "line": 141, + "end_line": 141, "column": 4, "end_column": 33 }, @@ -6712,8 +8074,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 117, - "end_line": 117, + "line": 141, + "end_line": 141, "column": 4, "end_column": 33 }, @@ -6736,8 +8098,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 117, - "end_line": 117, + "line": 141, + "end_line": 141, "column": 15, "end_column": 32 }, @@ -6768,8 +8130,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 118, - "end_line": 118, + "line": 142, + "end_line": 142, "column": 4, "end_column": 17 }, @@ -6777,8 +8139,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 118, - "end_line": 118, + "line": 142, + "end_line": 142, "column": 4, "end_column": 17 }, @@ -6800,8 +8162,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 119, - "end_line": 119, + "line": 143, + "end_line": 143, "column": 4, "end_column": 15 }, @@ -6809,8 +8171,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 119, - "end_line": 119, + "line": 143, + "end_line": 143, "column": 4, "end_column": 15 }, @@ -6832,8 +8194,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 120, - "end_line": 120, + "line": 144, + "end_line": 144, "column": 4, "end_column": 16 }, @@ -6841,8 +8203,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 120, - "end_line": 120, + "line": 144, + "end_line": 144, "column": 4, "end_column": 16 }, @@ -6864,8 +8226,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 121, - "end_line": 121, + "line": 145, + "end_line": 145, "column": 4, "end_column": 41 }, @@ -6873,8 +8235,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 121, - "end_line": 121, + "line": 145, + "end_line": 145, "column": 4, "end_column": 41 }, @@ -6897,8 +8259,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 121, - "end_line": 121, + "line": 145, + "end_line": 145, "column": 27, "end_column": 39 }, @@ -6920,8 +8282,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 122, - "end_line": 122, + "line": 146, + "end_line": 146, "column": 4, "end_column": 21 }, @@ -6929,8 +8291,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 122, - "end_line": 122, + "line": 146, + "end_line": 146, "column": 4, "end_column": 21 }, @@ -6952,8 +8314,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 123, - "end_line": 123, + "line": 147, + "end_line": 147, "column": 10, "end_column": 58 }, @@ -6961,8 +8323,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 123, - "end_line": 123, + "line": 147, + "end_line": 147, "column": 10, "end_column": 16 }, @@ -6998,8 +8360,8 @@ "_type": "NewArray", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 123, - "end_line": 123, + "line": 147, + "end_line": 147, "column": 19, "end_column": 58 }, @@ -7029,8 +8391,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 123, - "end_line": 123, + "line": 147, + "end_line": 147, "column": 19, "end_column": 58 } @@ -7042,8 +8404,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, + "line": 148, + "end_line": 148, "column": 4, "end_column": 31 }, @@ -7051,8 +8413,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, + "line": 148, + "end_line": 148, "column": 4, "end_column": 31 }, @@ -7067,8 +8429,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, + "line": 148, + "end_line": 148, "column": 11, "end_column": 30 }, @@ -7083,8 +8445,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, + "line": 148, + "end_line": 148, "column": 11, "end_column": 24 }, @@ -7102,8 +8464,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, + "line": 148, + "end_line": 148, "column": 11, "end_column": 17 }, @@ -7139,8 +8501,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, + "line": 148, + "end_line": 148, "column": 11, "end_column": 24 }, @@ -7161,8 +8523,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, + "line": 148, + "end_line": 148, "column": 29, "end_column": 30 }, @@ -7184,8 +8546,8 @@ "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 125, - "end_line": 125, + "line": 149, + "end_line": 149, "column": 4, "end_column": 15 }, @@ -7193,8 +8555,8 @@ "_type": "BoolConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 125, - "end_line": 125, + "line": 149, + "end_line": 149, "column": 11, "end_column": 15 }, @@ -7304,8 +8666,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 107, - "end_line": 107, + "line": 131, + "end_line": 131, "column": 2, "end_column": 51 }, @@ -7388,8 +8750,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 107, - "end_line": 109, + "line": 131, + "end_line": 133, "column": 52, "end_column": 3 }, @@ -7398,8 +8760,8 @@ "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 108, - "end_line": 108, + "line": 132, + "end_line": 132, "column": 4, "end_column": 54 }, @@ -7407,8 +8769,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 108, - "end_line": 108, + "line": 132, + "end_line": 132, "column": 11, "end_column": 54 }, @@ -7491,8 +8853,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 108, - "end_line": 108, + "line": 132, + "end_line": 132, "column": 12, "end_column": 22 }, @@ -7519,8 +8881,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 108, - "end_line": 108, + "line": 132, + "end_line": 132, "column": 24, "end_column": 38 }, @@ -7547,8 +8909,8 @@ "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 108, - "end_line": 108, + "line": 132, + "end_line": 132, "column": 40, "end_column": 53 }, @@ -7608,8 +8970,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 106, - "end_line": 106, + "line": 130, + "end_line": 130, "column": 0, "end_column": 57 }, @@ -7625,8 +8987,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 106, - "end_line": 106, + "line": 130, + "end_line": 130, "column": 0, "end_column": 57 }, @@ -7635,8 +8997,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 106, - "end_line": 106, + "line": 130, + "end_line": 130, "column": 0, "end_column": 57 }, @@ -7644,8 +9006,8 @@ "_type": "VoidConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 106, - "end_line": 106, + "line": 130, + "end_line": 130, "column": 0, "end_column": 57 }, diff --git a/tests/expected-output/arc4-types.algo.ts b/tests/expected-output/arc4-types.algo.ts index ce51484a..b060a331 100644 --- a/tests/expected-output/arc4-types.algo.ts +++ b/tests/expected-output/arc4-types.algo.ts @@ -17,7 +17,7 @@ function testUFixed() { const a = new UFixedNxM<32, 4>('1.244') const c = new UFixedNxM<32, 4>('1.244') - assert(a.equals(c)) + assert(a === c) } function test(n: uint64, b: biguint, c: UintN<256>) { @@ -68,7 +68,7 @@ function testArrays(n: ARC4Uint64) { const myStatic = new StaticArray(n, n) - assert(myStatic[0].equals(myArray.pop())) + assert(myStatic[0] === myArray.pop()) myStatic[1] = new UintN<64>(50) @@ -78,23 +78,23 @@ function testArrays(n: ARC4Uint64) { function testByte() { const b = new Byte() const b2 = new Byte(0) - assert(b.equals(b2)) + assert(b === b2) } function testAddress() { const a = new Address() const b = new Address(Txn.sender) - assert(!a.equals(b), 'Zero address should not match sender') - assert(a.equals(new Address()), 'Two zero addresses should match') - assert(a[0].equals(new Byte()), 'Zero address should start with zero byte') + assert(a !== b, 'Zero address should not match sender') + assert(a === new Address(), 'Two zero addresses should match') + assert(a[0] === new Byte(), 'Zero address should start with zero byte') } function testTuple() { const t = new Tuple(new ARC4Uint64(34)) const firstItem = t.at(0) const firstItemIndexer = t.native[0] - assert(firstItem.equals(firstItemIndexer)) + assert(firstItem === firstItemIndexer) const t1 = new Tuple(new Address(), new Byte()) assert(t1.length === 2) } diff --git a/tests/onchain/arc4-types.spec.ts b/tests/onchain/arc4-types.spec.ts index 3627fdd6..2eca3f24 100644 --- a/tests/onchain/arc4-types.spec.ts +++ b/tests/onchain/arc4-types.spec.ts @@ -1,4 +1,5 @@ import { describe } from 'vitest' +import { bigIntToUint8Array, utf8ToUint8Array } from '../../src/util' import { createArc4TestFixture, createBaseTestFixture } from './util/test-fixture' describe('arc4-types', () => { @@ -26,3 +27,29 @@ describe('arc4-struct', () => { await appClientStructDemo.send.call({ method: 'implicitCastingAndSpreading', args: [v1] }) }) }) +describe('arc4-encode-decode', () => { + const test = createArc4TestFixture('tests/approvals/arc4-encode-decode.algo.ts', { Arc4EncodeDecode: {} }) + test('encoding', async ({ appClientArc4EncodeDecode, expect }) => { + await appClientArc4EncodeDecode.send.call({ + method: 'testEncoding', + args: [234234, true, 340943934n, new Uint8Array([1, 2, 3, 4, 5]), 'hello world'], + }) + }) + test('decoding', async ({ appClientArc4EncodeDecode, expect }) => { + await appClientArc4EncodeDecode.send.call({ + method: 'testDecoding', + args: [ + 234234, + bigIntToUint8Array(234234n, 8), + true, + bigIntToUint8Array(128n, 1), + 340943934n, + bigIntToUint8Array(340943934n, 8), + 'hello world', + new Uint8Array([...bigIntToUint8Array(BigInt('hello world'.length), 2), ...utf8ToUint8Array('hello world')]), + { a: 50n, b: new Uint8Array([1, 2, 3, 4, 5]) }, + new Uint8Array([...bigIntToUint8Array(50n, 8), 0, 10, 0, 5, 1, 2, 3, 4, 5]), + ], + }) + }) +}) From b2e5dac2e9c2c793d5d57fb9f37d5b3ba4ab507b Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Fri, 29 Nov 2024 17:50:20 -0800 Subject: [PATCH 24/30] chore: Update approvals --- .../Arc4EncodeDecode.approval.teal | 396 ++ .../Arc4EncodeDecode.arc32.json | 140 + .../Arc4EncodeDecode.arc56.json | 202 + .../Arc4EncodeDecode.clear.teal | 5 + .../Arc4EncodeDecode.ssa.ir | 218 + .../arc4-encode-decode.awst | 53 + .../arc4-encode-decode.awst.json | 4057 +++++++++++++++++ 7 files changed, 5071 insertions(+) create mode 100644 tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.approval.teal create mode 100644 tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.arc32.json create mode 100644 tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.arc56.json create mode 100644 tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.clear.teal create mode 100644 tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.ssa.ir create mode 100644 tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst create mode 100644 tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst.json diff --git a/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.approval.teal b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.approval.teal new file mode 100644 index 00000000..b6cdec5b --- /dev/null +++ b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.approval.teal @@ -0,0 +1,396 @@ +#pragma version 10 + +tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.approvalProgram: + intcblock 0 1 8 64 + bytecblock 0x00 0x + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.constructor() -> void: +constructor: + // tests/approvals/arc4-encode-decode.algo.ts:7 + // export class Arc4EncodeDecode extends Contract { + proto 0 0 + retsub + + +// tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/arc4-encode-decode.algo.ts:7 + // export class Arc4EncodeDecode extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@6 + txna ApplicationArgs 0 + pushbytes 0x9be85afa // method "testEncoding(uint64,bool,uint512,byte[],string)void" + pushbytes 0xa2d335ac // method "testDecoding(uint64,byte[],bool,byte[],uint512,byte[],string,byte[],(uint64,byte[]),byte[])void" + uncover 2 + match __puya_arc4_router___testEncoding_route@2 __puya_arc4_router___testDecoding_route@3 + b __puya_arc4_router___switch_case_default@4 + +__puya_arc4_router___testEncoding_route@2: + // tests/approvals/arc4-encode-decode.algo.ts:8 + // testEncoding(a: uint64, b: boolean, c: biguint, d: bytes, e: string) { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/arc4-encode-decode.algo.ts:7 + // export class Arc4EncodeDecode extends Contract { + txna ApplicationArgs 1 + btoi + txna ApplicationArgs 2 + intc_0 // 0 + getbit + txna ApplicationArgs 3 + txna ApplicationArgs 4 + extract 2 0 + txna ApplicationArgs 5 + extract 2 0 + // tests/approvals/arc4-encode-decode.algo.ts:8 + // testEncoding(a: uint64, b: boolean, c: biguint, d: bytes, e: string) { + uncover 4 + uncover 4 + uncover 4 + uncover 4 + uncover 4 + callsub testEncoding + intc_1 // 1 + retsub + +__puya_arc4_router___testDecoding_route@3: + // tests/approvals/arc4-encode-decode.algo.ts:17-28 + // testDecoding( + // a: uint64, + // a_bytes: bytes, + // b: boolean, + // b_bytes: bytes, + // c: biguint, + // c_bytes: bytes, + // d: string, + // d_bytes: bytes, + // e: TestObj, + // e_bytes: bytes, + // ) { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/arc4-encode-decode.algo.ts:7 + // export class Arc4EncodeDecode extends Contract { + txna ApplicationArgs 1 + btoi + txna ApplicationArgs 2 + extract 2 0 + txna ApplicationArgs 3 + intc_0 // 0 + getbit + txna ApplicationArgs 4 + extract 2 0 + txna ApplicationArgs 5 + txna ApplicationArgs 6 + extract 2 0 + txna ApplicationArgs 7 + extract 2 0 + txna ApplicationArgs 8 + extract 2 0 + txna ApplicationArgs 9 + dup + intc_0 // 0 + intc_2 // 8 + extract3 // on error: Index access is out of bounds + swap + dup + intc_2 // 8 + extract_uint16 + swap + dup + len + swap + uncover 2 + uncover 2 + substring3 + txna ApplicationArgs 10 + extract 2 0 + // tests/approvals/arc4-encode-decode.algo.ts:17-28 + // testDecoding( + // a: uint64, + // a_bytes: bytes, + // b: boolean, + // b_bytes: bytes, + // c: biguint, + // c_bytes: bytes, + // d: string, + // d_bytes: bytes, + // e: TestObj, + // e_bytes: bytes, + // ) { + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + uncover 10 + callsub testDecoding + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@4: + b __puya_arc4_router___after_if_else@10 + +__puya_arc4_router___bare_routing@6: + // tests/approvals/arc4-encode-decode.algo.ts:7 + // export class Arc4EncodeDecode extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@7 + b __puya_arc4_router___switch_case_default@8 + +__puya_arc4_router_____algots__.defaultCreate@7: + // tests/approvals/arc4-encode-decode.algo.ts:7 + // export class Arc4EncodeDecode extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@8: + +__puya_arc4_router___after_if_else@10: + // tests/approvals/arc4-encode-decode.algo.ts:7 + // export class Arc4EncodeDecode extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.testEncoding(a: uint64, b: uint64, c: bytes, d: bytes, e: bytes) -> void: +testEncoding: + // tests/approvals/arc4-encode-decode.algo.ts:8 + // testEncoding(a: uint64, b: boolean, c: biguint, d: bytes, e: string) { + proto 5 0 + // tests/approvals/arc4-encode-decode.algo.ts:9 + // assert(encodeArc4(a) === new UintN64(a).bytes) + frame_dig -5 + itob + frame_dig -5 + itob + == + assert + // tests/approvals/arc4-encode-decode.algo.ts:10 + // assert(encodeArc4(b) === new Bool(b).bytes) + bytec_0 // 0x00 + intc_0 // 0 + frame_dig -4 + setbit + bytec_0 // 0x00 + intc_0 // 0 + frame_dig -4 + setbit + == + assert + // tests/approvals/arc4-encode-decode.algo.ts:11 + // assert(encodeArc4(c) === new UintN<512>(c).bytes) + frame_dig -3 + len + intc_3 // 64 + <= + assert // overflow + intc_3 // 64 + bzero + frame_dig -3 + b| + frame_dig -3 + len + intc_3 // 64 + <= + assert // overflow + intc_3 // 64 + bzero + frame_dig -3 + b| + == + assert + // tests/approvals/arc4-encode-decode.algo.ts:12 + // assert(encodeArc4(d) === new DynamicBytes(d).bytes) + frame_dig -2 + len + itob + extract 6 2 + frame_dig -2 + concat + frame_dig -2 + len + itob + extract 6 2 + frame_dig -2 + concat + == + assert + // tests/approvals/arc4-encode-decode.algo.ts:13 + // assert(encodeArc4(e) === new Str(e).bytes) + frame_dig -1 + len + itob + extract 6 2 + frame_dig -1 + concat + frame_dig -1 + len + itob + extract 6 2 + frame_dig -1 + concat + == + assert + // tests/approvals/arc4-encode-decode.algo.ts:14 + // assert(encodeArc4({ a, b: d }) === new TestStruct({ a: new UintN64(a), b: new DynamicBytes(d) }).bytes) + frame_dig -5 + itob + frame_dig -2 + len + itob + extract 6 2 + frame_dig -2 + concat + swap + bytec_1 // 0x + swap + concat + pushint 10 // 10 + itob + extract 6 2 + concat + swap + concat + frame_dig -5 + itob + frame_dig -2 + len + itob + extract 6 2 + frame_dig -2 + concat + swap + bytec_1 // 0x + swap + concat + pushint 10 // 10 + itob + extract 6 2 + concat + swap + concat + == + assert + retsub + + +// tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.testDecoding(a: uint64, a_bytes: bytes, b: uint64, b_bytes: bytes, c: bytes, c_bytes: bytes, d: bytes, d_bytes: bytes, e.a: bytes, e.b: bytes, e_bytes: bytes) -> void: +testDecoding: + // tests/approvals/arc4-encode-decode.algo.ts:17-28 + // testDecoding( + // a: uint64, + // a_bytes: bytes, + // b: boolean, + // b_bytes: bytes, + // c: biguint, + // c_bytes: bytes, + // d: string, + // d_bytes: bytes, + // e: TestObj, + // e_bytes: bytes, + // ) { + proto 11 0 + // tests/approvals/arc4-encode-decode.algo.ts:29 + // assert(decodeArc4(a_bytes) === a) + frame_dig -10 + btoi + frame_dig -11 + == + assert + // tests/approvals/arc4-encode-decode.algo.ts:30 + // assert(decodeArc4(b_bytes) === b) + frame_dig -8 + intc_0 // 0 + getbit + frame_dig -9 + == + assert + // tests/approvals/arc4-encode-decode.algo.ts:31 + // assert(decodeArc4(c_bytes) === c) + frame_dig -6 + frame_dig -7 + b== + assert + // tests/approvals/arc4-encode-decode.algo.ts:32 + // assert(decodeArc4(d_bytes) === d) + frame_dig -4 + extract 2 0 + frame_dig -5 + == + assert + // tests/approvals/arc4-encode-decode.algo.ts:34 + // assertMatch(decodeArc4(e_bytes), e) + frame_dig -1 + intc_0 // 0 + intc_2 // 8 + extract3 // on error: Index access is out of bounds + frame_dig -3 + == + bz testDecoding_bool_false@3 + frame_dig -1 + intc_2 // 8 + extract_uint16 + frame_dig -1 + len + frame_dig -1 + uncover 2 + uncover 2 + substring3 + frame_dig -2 + == + bz testDecoding_bool_false@3 + intc_1 // 1 + b testDecoding_bool_merge@4 + +testDecoding_bool_false@3: + intc_0 // 0 + +testDecoding_bool_merge@4: + // tests/approvals/arc4-encode-decode.algo.ts:34 + // assertMatch(decodeArc4(e_bytes), e) + assert // assert target is match for conditions + retsub + + +// tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/arc4-encode-decode.algo.ts:7 + // export class Arc4EncodeDecode extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.arc32.json b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.arc32.json new file mode 100644 index 00000000..99c1e866 --- /dev/null +++ b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.arc32.json @@ -0,0 +1,140 @@ +{ + "hints": { + "testEncoding(uint64,bool,uint512,byte[],string)void": { + "call_config": { + "no_op": "CALL" + } + }, + "testDecoding(uint64,byte[],bool,byte[],uint512,byte[],string,byte[],(uint64,byte[]),byte[])void": { + "call_config": { + "no_op": "CALL" + }, + "structs": { + "e": { + "name": "TestObj", + "elements": [ + [ + "a", + "uint64" + ], + [ + "b", + "byte[]" + ] + ] + } + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGUtZGVjb2RlLmFsZ28udHM6OkFyYzRFbmNvZGVEZWNvZGUuYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMSA4IDY0CiAgICBieXRlY2Jsb2NrIDB4MDAgMHgKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtZW5jb2RlLWRlY29kZS5hbGdvLnRzOjpBcmM0RW5jb2RlRGVjb2RlLmNvbnN0cnVjdG9yKCkgLT4gdm9pZDoKY29uc3RydWN0b3I6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGUtZGVjb2RlLmFsZ28udHM6NwogICAgLy8gZXhwb3J0IGNsYXNzIEFyYzRFbmNvZGVEZWNvZGUgZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9hcmM0LWVuY29kZS1kZWNvZGUuYWxnby50czo6QXJjNEVuY29kZURlY29kZS5fX3B1eWFfYXJjNF9yb3V0ZXJfXygpIC0+IHVpbnQ2NDoKX19wdXlhX2FyYzRfcm91dGVyX186CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGUtZGVjb2RlLmFsZ28udHM6NwogICAgLy8g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ZGluZ19ib29sX21lcmdlQDQKCnRlc3REZWNvZGluZ19ib29sX2ZhbHNlQDM6CiAgICBpbnRjXzAgLy8gMAoKdGVzdERlY29kaW5nX2Jvb2xfbWVyZ2VANDoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hcmM0LWVuY29kZS1kZWNvZGUuYWxnby50czozNAogICAgLy8gYXNzZXJ0TWF0Y2goZGVjb2RlQXJjNDxUZXN0T2JqPihlX2J5dGVzKSwgZSkKICAgIGFzc2VydCAvLyBhc3NlcnQgdGFyZ2V0IGlzIG1hdGNoIGZvciBjb25kaXRpb25zCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGUtZGVjb2RlLmFsZ28udHM6OkFyYzRFbmNvZGVEZWNvZGUuX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlKCkgLT4gdm9pZDoKX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtZW5jb2RlLWRlY29kZS5hbGdvLnRzOjcKICAgIC8vIGV4cG9ydCBjbGFzcyBBcmM0RW5jb2RlRGVjb2RlIGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGUtZGVjb2RlLmFsZ28udHM6OkFyYzRFbmNvZGVEZWNvZGUuY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "state": { + "global": { + "num_byte_slices": 0, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": {}, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "Arc4EncodeDecode", + "methods": [ + { + "name": "testEncoding", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "bool", + "name": "b" + }, + { + "type": "uint512", + "name": "c" + }, + { + "type": "byte[]", + "name": "d" + }, + { + "type": "string", + "name": "e" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "testDecoding", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "byte[]", + "name": "a_bytes" + }, + { + "type": "bool", + "name": "b" + }, + { + "type": "byte[]", + "name": "b_bytes" + }, + { + "type": "uint512", + "name": "c" + }, + { + "type": "byte[]", + "name": "c_bytes" + }, + { + "type": "string", + "name": "d" + }, + { + "type": "byte[]", + "name": "d_bytes" + }, + { + "type": "(uint64,byte[])", + "name": "e" + }, + { + "type": "byte[]", + "name": "e_bytes" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "CREATE" + } +} \ No newline at end of file diff --git a/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.arc56.json b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.arc56.json new file mode 100644 index 00000000..b9e1162b --- /dev/null +++ b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.arc56.json @@ -0,0 +1,202 @@ +{ + "name": "Arc4EncodeDecode", + "structs": { + "TestObj": [ + { + "name": "a", + "type": "uint64" + }, + { + "name": "b", + "type": "byte[]" + } + ] + }, + "methods": [ + { + "name": "testEncoding", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "bool", + "name": "b" + }, + { + "type": "uint512", + "name": "c" + }, + { + "type": "byte[]", + "name": "d" + }, + { + "type": "string", + "name": "e" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "testDecoding", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "byte[]", + "name": "a_bytes" + }, + { + "type": "bool", + "name": "b" + }, + { + "type": "byte[]", + "name": "b_bytes" + }, + { + "type": "uint512", + "name": "c" + }, + { + "type": "byte[]", + "name": "c_bytes" + }, + { + "type": "string", + "name": "d" + }, + { + "type": "byte[]", + "name": "d_bytes" + }, + { + "type": "(uint64,byte[])", + "struct": "TestObj", + "name": "e" + }, + { + "type": "byte[]", + "name": "e_bytes" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 171, + 427 + ], + "errorMessage": "Index access is out of bounds" + }, + { + "pc": [ + 68, + 117 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 459 + ], + "errorMessage": "assert target is match for conditions" + }, + { + "pc": [ + 236 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 73, + 122 + ], + "errorMessage": "can only call when not creating" + }, + { + "pc": [ + 272, + 283 + ], + "errorMessage": "overflow" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGUtZGVjb2RlLmFsZ28udHM6OkFyYzRFbmNvZGVEZWNvZGUuYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMSA4IDY0CiAgICBieXRlY2Jsb2NrIDB4MDAgMHgKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW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dvdHNfXy5kZWZhdWx0Q3JlYXRlKCkgLT4gdm9pZDoKX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtZW5jb2RlLWRlY29kZS5hbGdvLnRzOjcKICAgIC8vIGV4cG9ydCBjbGFzcyBBcmM0RW5jb2RlRGVjb2RlIGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGUtZGVjb2RlLmFsZ28udHM6OkFyYzRFbmNvZGVEZWNvZGUuY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.clear.teal b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.clear.teal new file mode 100644 index 00000000..b7e3aa30 --- /dev/null +++ b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.ssa.ir b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.ssa.ir new file mode 100644 index 00000000..e54d4a50 --- /dev/null +++ b/tests/approvals/out/arc4-encode-decode/Arc4EncodeDecode.ssa.ir @@ -0,0 +1,218 @@ +contract tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.constructor() -> void: + block@0: // L7 + return + + subroutine tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.__puya_arc4_router__() -> bool: + block@0: // L7 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@6 + block@1: // abi_routing_L7 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "testEncoding(uint64,bool,uint512,byte[],string)void" => block@2, method "testDecoding(uint64,byte[],bool,byte[],uint512,byte[],string,byte[],(uint64,byte[]),byte[])void" => block@3, * => block@4} + block@2: // testEncoding_route_L8 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // can only call when not creating + let tmp%7#0: bytes = (txna ApplicationArgs 1) + let tmp%8#0: uint64 = (btoi tmp%7#0) + let tmp%9#0: bytes = (txna ApplicationArgs 2) + let tmp%10#0: bool = (getbit tmp%9#0 0u) + let tmp%11#0: bytes = (txna ApplicationArgs 3) + let tmp%12#0: bytes = (txna ApplicationArgs 4) + let tmp%13#0: bytes = ((extract 2 0) tmp%12#0) + let tmp%14#0: bytes = (txna ApplicationArgs 5) + let tmp%15#0: bytes = ((extract 2 0) tmp%14#0) + tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.testEncoding(tmp%8#0, tmp%10#0, tmp%11#0, tmp%13#0, tmp%15#0) + return 1u + block@3: // testDecoding_route_L17 + let tmp%16#0: uint64 = (txn OnCompletion) + let tmp%17#0: bool = (== tmp%16#0 NoOp) + (assert tmp%17#0) // OnCompletion is not NoOp + let tmp%18#0: uint64 = (txn ApplicationID) + let tmp%19#0: bool = (!= tmp%18#0 0u) + (assert tmp%19#0) // can only call when not creating + let tmp%20#0: bytes = (txna ApplicationArgs 1) + let tmp%21#0: uint64 = (btoi tmp%20#0) + let tmp%22#0: bytes = (txna ApplicationArgs 2) + let tmp%23#0: bytes = ((extract 2 0) tmp%22#0) + let tmp%24#0: bytes = (txna ApplicationArgs 3) + let tmp%25#0: bool = (getbit tmp%24#0 0u) + let tmp%26#0: bytes = (txna ApplicationArgs 4) + let tmp%27#0: bytes = ((extract 2 0) tmp%26#0) + let tmp%28#0: bytes = (txna ApplicationArgs 5) + let tmp%29#0: bytes = (txna ApplicationArgs 6) + let tmp%30#0: bytes = ((extract 2 0) tmp%29#0) + let tmp%31#0: bytes = (txna ApplicationArgs 7) + let tmp%32#0: bytes = ((extract 2 0) tmp%31#0) + let tmp%33#0: bytes = (txna ApplicationArgs 8) + let tmp%34#0: bytes = ((extract 2 0) tmp%33#0) + let tmp%35#0: bytes = (txna ApplicationArgs 9) + let item0%0#0: bytes = (extract3 tmp%35#0 0u 8u) // on error: Index access is out of bounds + let item_start_offset%0#0: uint64 = (extract_uint16 tmp%35#0 8u) + let item_end_offset%0#0: uint64 = (len tmp%35#0) + let item1%0#0: bytes = (substring3 tmp%35#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%36#0: bytes = (txna ApplicationArgs 10) + let tmp%37#0: bytes = ((extract 2 0) tmp%36#0) + tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.testDecoding(tmp%21#0, tmp%23#0, tmp%25#0, tmp%27#0, tmp%28#0, tmp%30#0, tmp%32#0, tmp%34#0, item0%0#0, item1%0#0, tmp%37#0) + return 1u + block@4: // switch_case_default_L7 + goto block@5 + block@5: // switch_case_next_L7 + goto block@10 + block@6: // bare_routing_L7 + let tmp%38#0: uint64 = (txn OnCompletion) + switch tmp%38#0 {0u => block@7, * => block@8} + block@7: // __algots__.defaultCreate_L7 + let tmp%39#0: uint64 = (txn ApplicationID) + let tmp%40#0: bool = (== tmp%39#0 0u) + (assert tmp%40#0) // can only call when creating + tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.__algots__.defaultCreate() + return 1u + block@8: // switch_case_default_L7 + goto block@9 + block@9: // switch_case_next_L7 + goto block@10 + block@10: // after_if_else_L7 + return 0u + + subroutine tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.testEncoding(a: uint64, b: bool, c: biguint, d: bytes, e: bytes) -> void: + block@0: // L8 + let val_as_bytes%0#0: bytes = (itob a#0) + let val_as_bytes%1#0: bytes = (itob a#0) + let tmp%0#0: bool = (== val_as_bytes%0#0 val_as_bytes%1#0) + (assert tmp%0#0) + let encoded_bool%0#0: bytes = (setbit 0x00 0u b#0) + let encoded_bool%1#0: bytes = (setbit 0x00 0u b#0) + let tmp%1#0: bool = (== encoded_bool%0#0 encoded_bool%1#0) + (assert tmp%1#0) + let len_%0#0: uint64 = (len c#0) + let no_overflow%0#0: bool = (<= len_%0#0 64u) + (assert no_overflow%0#0) // overflow + let b_zeros%0#0: bytes = (bzero 64u) + let tmp%2#0: bytes = (b| c#0 b_zeros%0#0) + let len_%1#0: uint64 = (len c#0) + let no_overflow%1#0: bool = (<= len_%1#0 64u) + (assert no_overflow%1#0) // overflow + let b_zeros%1#0: bytes = (bzero 64u) + let tmp%3#0: bytes = (b| c#0 b_zeros%1#0) + let tmp%4#0: bool = (== tmp%2#0 tmp%3#0) + (assert tmp%4#0) + let length%0#0: uint64 = (len d#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 d#0) + let length%1#0: uint64 = (len d#0) + let as_bytes%1#0: bytes = (itob length%1#0) + let length_uint16%1#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_value%1#0: bytes = (concat length_uint16%1#0 d#0) + let tmp%5#0: bool = (== encoded_value%0#0 encoded_value%1#0) + (assert tmp%5#0) + let length%2#0: uint64 = (len e#0) + let as_bytes%2#0: bytes = (itob length%2#0) + let length_uint16%2#0: bytes = ((extract 6 2) as_bytes%2#0) + let encoded_value%2#0: bytes = (concat length_uint16%2#0 e#0) + let length%3#0: uint64 = (len e#0) + let as_bytes%3#0: bytes = (itob length%3#0) + let length_uint16%3#0: bytes = ((extract 6 2) as_bytes%3#0) + let encoded_value%3#0: bytes = (concat length_uint16%3#0 e#0) + let tmp%6#0: bool = (== encoded_value%2#0 encoded_value%3#0) + (assert tmp%6#0) + let val_as_bytes%2#0: bytes = (itob a#0) + let length%4#0: uint64 = (len d#0) + let as_bytes%4#0: bytes = (itob length%4#0) + let length_uint16%4#0: bytes = ((extract 6 2) as_bytes%4#0) + let encoded_value%4#0: bytes = (concat length_uint16%4#0 d#0) + let current_tail_offset%0#0: uint64 = 10u + let encoded_tuple_buffer%0#0: bytes = 0x + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 val_as_bytes%2#0) + let as_bytes%5#0: bytes = (itob current_tail_offset%0#0) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%5#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 offset_as_uint16%0#0) + let data_length%0#0: uint64 = (len encoded_value%4#0) + let current_tail_offset%1#0: uint64 = (+ current_tail_offset%0#0 data_length%0#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 encoded_value%4#0) + let val_as_bytes%3#0: bytes = (itob a#0) + let length%5#0: uint64 = (len d#0) + let as_bytes%6#0: bytes = (itob length%5#0) + let length_uint16%5#0: bytes = ((extract 6 2) as_bytes%6#0) + let encoded_value%5#0: bytes = (concat length_uint16%5#0 d#0) + let val_as_bytes%4#0: bytes = (itob a#0) + let length%6#0: uint64 = (len d#0) + let as_bytes%7#0: bytes = (itob length%6#0) + let length_uint16%6#0: bytes = ((extract 6 2) as_bytes%7#0) + let encoded_value%6#0: bytes = (concat length_uint16%6#0 d#0) + let current_tail_offset%2#0: uint64 = 10u + let encoded_tuple_buffer%4#0: bytes = 0x + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 val_as_bytes%3#0) + let as_bytes%8#0: bytes = (itob current_tail_offset%2#0) + let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%8#0) + let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 offset_as_uint16%1#0) + let data_length%1#0: uint64 = (len encoded_value%6#0) + let current_tail_offset%3#0: uint64 = (+ current_tail_offset%2#0 data_length%1#0) + let encoded_tuple_buffer%7#0: bytes = (concat encoded_tuple_buffer%6#0 encoded_value%6#0) + let tmp%7#0: bool = (== encoded_tuple_buffer%3#0 encoded_tuple_buffer%7#0) + (assert tmp%7#0) + return + + subroutine tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.testDecoding(a: uint64, a_bytes: bytes, b: bool, b_bytes: bytes, c: biguint, c_bytes: bytes, d: bytes, d_bytes: bytes, e.a: bytes, e.b: bytes, e_bytes: bytes) -> void: + block@0: // L17 + let tmp%0#0: uint64 = (btoi a_bytes#0) + let tmp%1#0: bool = (== tmp%0#0 a#0) + (assert tmp%1#0) + let tmp%2#0: bool = (getbit b_bytes#0 0u) + let tmp%3#0: bool = (== tmp%2#0 b#0) + (assert tmp%3#0) + let tmp%4#0: bool = (b== c_bytes#0 c#0) + (assert tmp%4#0) + let tmp%5#0: bytes = ((extract 2 0) d_bytes#0) + let tmp%6#0: bool = (== tmp%5#0 d#0) + (assert tmp%6#0) + let item0%0#0: bytes = (extract3 e_bytes#0 0u 8u) // on error: Index access is out of bounds + let item_start_offset%0#0: uint64 = (extract_uint16 e_bytes#0 8u) + let item_end_offset%0#0: uint64 = (len e_bytes#0) + let item1%0#0: bytes = (substring3 e_bytes#0 item_start_offset%0#0 item_end_offset%0#0) + let tmp%7#0: bool = (== item0%0#0 e.a#0) + goto tmp%7#0 ? block@1 : block@3 + block@1: // and_contd_L34 + let item0%1#0: bytes = (extract3 e_bytes#0 0u 8u) // on error: Index access is out of bounds + let item_start_offset%1#0: uint64 = (extract_uint16 e_bytes#0 8u) + let item_end_offset%1#0: uint64 = (len e_bytes#0) + let item1%1#0: bytes = (substring3 e_bytes#0 item_start_offset%1#0 item_end_offset%1#0) + let tmp%8#0: bool = (== item1%1#0 e.b#0) + goto tmp%8#0 ? block@2 : block@3 + block@2: // bool_true_L34 + let and_result%0#0: bool = 1u + goto block@4 + block@3: // bool_false_L34 + let and_result%0#1: bool = 0u + goto block@4 + block@4: // bool_merge_L34 + let and_result%0#2: bool = φ(and_result%0#0 <- block@2, and_result%0#1 <- block@3) + (assert and_result%0#2) // assert target is match for conditions + return + + subroutine tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode.__algots__.defaultCreate() -> void: + block@0: // L7 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst b/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst new file mode 100644 index 00000000..d067ed0a --- /dev/null +++ b/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst @@ -0,0 +1,53 @@ +contract Arc4EncodeDecode +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + testEncoding(): void + { + assert(reinterpret_cast(ARC4_ENCODE(a, wtype=arc4.uint64)) == reinterpret_cast(ARC4_ENCODE(a, wtype=arc4.uint64))) + assert(reinterpret_cast(ARC4_ENCODE(b, wtype=arc4.bool)) == reinterpret_cast(ARC4_ENCODE(b, wtype=arc4.bool))) + assert(reinterpret_cast(ARC4_ENCODE(c, wtype=arc4.uint512)) == reinterpret_cast(ARC4_ENCODE(c, wtype=arc4.uint512))) + assert(reinterpret_cast(ARC4_ENCODE(d, wtype=arc4.dynamic_array)) == reinterpret_cast(ARC4_ENCODE(d, wtype=arc4.dynamic_array))) + assert(reinterpret_cast(ARC4_ENCODE(e, wtype=arc4.dynamic_array)) == reinterpret_cast(ARC4_ENCODE(e, wtype=arc4.dynamic_array))) + assert(reinterpret_cast(ARC4_ENCODE({ a: a, b: d }, wtype=)) == reinterpret_cast(new TestStruct(a=(#0 = { a: ARC4_ENCODE(a, wtype=arc4.uint64), b: ARC4_ENCODE(d, wtype=arc4.dynamic_array) }).a, b=#0.b))) + } + + testDecoding(): void + { + assert(ARC4_DECODE(reinterpret_cast(a_bytes)) == a) + assert(ARC4_DECODE(reinterpret_cast(b_bytes)) == b) + assert(ARC4_DECODE(reinterpret_cast(c_bytes)) == c) + assert(ARC4_DECODE(reinterpret_cast>(d_bytes)) == d) + assert(reinterpret_cast(ARC4_DECODE(reinterpret_cast(e_bytes)).a) == reinterpret_cast(e.a) and reinterpret_cast(ARC4_DECODE(reinterpret_cast(e_bytes)).b) == reinterpret_cast(e.b), comment=assert target is match for conditions) + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + + __algots__.defaultCreate(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst.json b/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst.json new file mode 100644 index 00000000..c87810f4 --- /dev/null +++ b/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst.json @@ -0,0 +1,4057 @@ +[ + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 48 + }, + "id": "tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode", + "name": "Arc4EncodeDecode", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 2, + "end_column": 70 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "a", + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 15, + "end_column": 24 + } + }, + { + "_type": "SubroutineArgument", + "name": "b", + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 26, + "end_column": 36 + } + }, + { + "_type": "SubroutineArgument", + "name": "c", + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 38, + "end_column": 48 + } + }, + { + "_type": "SubroutineArgument", + "name": "d", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 50, + "end_column": 58 + } + }, + { + "_type": "SubroutineArgument", + "name": "e", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 60, + "end_column": 69 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 8, + "end_line": 15, + "column": 71, + "end_column": 3 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 4, + "end_column": 50 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 4, + "end_column": 50 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 11, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 22, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 29, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 29, + "end_column": 43 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 9, + "end_line": 9, + "column": 41, + "end_column": 42 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + } + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 4, + "end_column": 47 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 4, + "end_column": 47 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 11, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4Type", + "name": "arc4.bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "bool" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 22, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 29, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 29, + "end_column": 40 + }, + "wtype": { + "_type": "ARC4Type", + "name": "arc4.bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "bool" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 10, + "end_line": 10, + "column": 38, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + } + } + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 4, + "end_column": 53 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 4, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 11, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint512", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint512", + "n": "512" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 22, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "c" + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 29, + "end_column": 52 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 29, + "end_column": 46 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint512", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint512", + "n": "512" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 11, + "end_line": 11, + "column": 44, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "c" + } + } + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 4, + "end_column": 55 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 4, + "end_column": 55 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 11, + "end_column": 54 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 22, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 29, + "end_column": 54 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 29, + "end_column": 48 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 12, + "end_line": 12, + "column": 46, + "end_column": 47 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + } + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 4, + "end_column": 46 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 4, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 22, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "e" + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 29, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 29, + "end_column": 39 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 13, + "end_line": 13, + "column": 37, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "e" + } + } + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 4, + "end_column": 107 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 4, + "end_column": 107 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 11, + "end_column": 106 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 11, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 11, + "end_column": 34 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,byte[]", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + }, + "source_location": null, + "frozen": false, + "desc": null + }, + "value": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 22, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 24, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 30, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + ] + } + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 39, + "end_column": 106 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 39, + "end_column": 100 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "TestStruct", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,byte[]", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 43, + "end_column": 53 + }, + "frozen": false, + "desc": null + }, + "values": { + "a": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 39, + "end_column": 100 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 54, + "end_column": 99 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 54, + "end_column": 99 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 59, + "end_column": 73 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 71, + "end_column": 72 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + }, + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 78, + "end_column": 97 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 95, + "end_column": 96 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + } + ] + }, + "id": "0" + }, + "name": "a" + }, + "b": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 39, + "end_column": 100 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 54, + "end_column": 99 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 54, + "end_column": 99 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 59, + "end_column": 73 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 71, + "end_column": 72 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + }, + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 78, + "end_column": 97 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 14, + "end_line": 14, + "column": 95, + "end_column": 96 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + } + ] + }, + "id": "0" + }, + "name": "b" + } + } + } + } + }, + "error_message": null + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode", + "member_name": "testEncoding", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 8, + "end_line": 8, + "column": 2, + "end_column": 70 + }, + "name": "testEncoding", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 17, + "end_line": 28, + "column": 2, + "end_column": 3 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "a", + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 18, + "end_line": 18, + "column": 4, + "end_column": 13 + } + }, + { + "_type": "SubroutineArgument", + "name": "a_bytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 19, + "end_line": 19, + "column": 4, + "end_column": 18 + } + }, + { + "_type": "SubroutineArgument", + "name": "b", + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 20, + "end_line": 20, + "column": 4, + "end_column": 14 + } + }, + { + "_type": "SubroutineArgument", + "name": "b_bytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 21, + "end_line": 21, + "column": 4, + "end_column": 18 + } + }, + { + "_type": "SubroutineArgument", + "name": "c", + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 22, + "end_line": 22, + "column": 4, + "end_column": 14 + } + }, + { + "_type": "SubroutineArgument", + "name": "c_bytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 23, + "end_line": 23, + "column": 4, + "end_column": 18 + } + }, + { + "_type": "SubroutineArgument", + "name": "d", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 24, + "end_line": 24, + "column": 4, + "end_column": 13 + } + }, + { + "_type": "SubroutineArgument", + "name": "d_bytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 25, + "end_line": 25, + "column": 4, + "end_column": 18 + } + }, + { + "_type": "SubroutineArgument", + "name": "e", + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc4-encode-decode.algo.ts::TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 26, + "end_line": 26, + "column": 4, + "end_column": 14 + } + }, + { + "_type": "SubroutineArgument", + "name": "e_bytes", + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 27, + "end_line": 27, + "column": 4, + "end_column": 18 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 28, + "end_line": 35, + "column": 4, + "end_column": 3 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 4, + "end_column": 45 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 4, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 11, + "end_column": 38 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 30, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "a_bytes" + } + } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 29, + "end_line": 29, + "column": 43, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 4, + "end_column": 46 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 4, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 11, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 11, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 11, + "end_column": 39 + }, + "wtype": { + "_type": "ARC4Type", + "name": "arc4.bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "bool" + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 31, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "b_bytes" + } + } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 30, + "end_line": 30, + "column": 44, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 4, + "end_column": 46 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 4, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 11, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 11, + "end_column": 39 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 11, + "end_column": 39 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint512", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint512", + "n": "512" + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 31, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "c_bytes" + } + } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 31, + "end_line": 31, + "column": 44, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "c" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 4, + "end_column": 45 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 4, + "end_column": 45 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 11, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 11, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 11, + "end_column": 38 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 30, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d_bytes" + } + } + }, + "operator": "==", + "rhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 32, + "end_line": 32, + "column": 43, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "d" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BooleanBinaryOperation", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 16, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc4-encode-decode.algo.ts::TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 16, + "end_column": 44 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,byte[]", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + }, + "source_location": null, + "frozen": false, + "desc": null + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 36, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "e_bytes" + } + } + }, + "name": "a" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 46, + "end_column": 47 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc4-encode-decode.algo.ts::TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "name": "e" + }, + "name": "a" + } + } + }, + "op": "and", + "right": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "base": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 16, + "end_column": 44 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc4-encode-decode.algo.ts::TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 16, + "end_column": 44 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,byte[]", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + }, + "source_location": null, + "frozen": false, + "desc": null + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 36, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "e_bytes" + } + } + }, + "name": "b" + } + }, + "operator": "==", + "rhs": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 4, + "end_column": 48 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 34, + "end_line": 34, + "column": 46, + "end_column": 47 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc4-encode-decode.algo.ts::TestObj", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "byte[]", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + } + ], + "names": [ + "a", + "b" + ] + }, + "name": "e" + }, + "name": "b" + } + } + } + }, + "error_message": "assert target is match for conditions" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode", + "member_name": "testDecoding", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 17, + "end_line": 28, + "column": 2, + "end_column": 3 + }, + "name": "testDecoding", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": { + "e": { + "name": "TestObj", + "elements": [ + [ + "a", + "uint64" + ], + [ + "b", + "byte[]" + ] + ] + } + } + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 48 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 48 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 48 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 48 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 48 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "Implicitly generated create method", + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-encode-decode.algo.ts::Arc4EncodeDecode", + "member_name": "__algots__.defaultCreate", + "arc4_method_config": { + "_type": "ARC4BareMethodConfig", + "source_location": { + "file": "tests/approvals/arc4-encode-decode.algo.ts", + "line": 7, + "end_line": 7, + "column": 0, + "end_column": 48 + }, + "allowed_completion_types": [ + 0 + ], + "create": 2, + "is_bare": true + } + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + } +] \ No newline at end of file From 0fda7b57c1727b27d44da8ce5e9c818f488634f2 Mon Sep 17 00:00:00 2001 From: Bobby Lat Date: Mon, 2 Dec 2024 16:27:58 +0800 Subject: [PATCH 25/30] refactor: export ARC4Encoded for stub impelmentation and fix typo for UintN type name --- packages/algo-ts/src/arc4/encoded-types.ts | 2 +- src/awst_build/ptypes/arc4-types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/algo-ts/src/arc4/encoded-types.ts b/packages/algo-ts/src/arc4/encoded-types.ts index 72a2e2c7..2701fe56 100644 --- a/packages/algo-ts/src/arc4/encoded-types.ts +++ b/packages/algo-ts/src/arc4/encoded-types.ts @@ -66,7 +66,7 @@ type CompatForArc4Int = N extends UintBitSize ? Uint64Compat const TypeProperty = Symbol('ARC4Type') -abstract class ARC4Encoded implements BytesBacked { +export abstract class ARC4Encoded implements BytesBacked { abstract [TypeProperty]?: string get bytes(): bytes { throw new NoImplementation() diff --git a/src/awst_build/ptypes/arc4-types.ts b/src/awst_build/ptypes/arc4-types.ts index e8ddacb0..a46869e4 100644 --- a/src/awst_build/ptypes/arc4-types.ts +++ b/src/awst_build/ptypes/arc4-types.ts @@ -268,7 +268,7 @@ export class UintNType extends ARC4EncodedType { super() codeInvariant(n >= 8n && n <= 512n && n % 8n === 0n, 'n must be between 8 and 512, and a multiple of 8') this.n = n - this.name = name ?? `UIntN<${n}>` + this.name = name ?? `UintN<${n}>` this.wtype = wtype ?? new wtypes.ARC4UIntN({ n: this.n }) } } From 757e8a4c3abac7620b99c03299fb2994d275d944 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Mon, 2 Dec 2024 17:51:41 -0800 Subject: [PATCH 26/30] feat: Pre-compiled contracts --- package.json | 2 +- packages/algo-ts/src/arc4/index.ts | 13 +- packages/algo-ts/src/compiled.ts | 116 + packages/algo-ts/src/index.ts | 2 + packages/algo-ts/src/mutable-array.ts | 89 + packages/algo-ts/src/template-var.ts | 4 +- packages/algo-ts/src/typescript-helpers.ts | 1 + src/awst/to-code-visitor.ts | 29 +- src/awst/txn-fields.ts | 21 +- src/awst_build/ast-visitors/base-visitor.ts | 2 +- src/awst_build/eb/arc4/util.ts | 37 +- .../eb/assert-match-function-builder.ts | 6 +- .../eb/compiled/compile-function.ts | 114 + src/awst_build/eb/contract-builder.ts | 29 +- src/awst_build/eb/index.ts | 2 +- src/awst_build/eb/logic-sig-builder.ts | 29 + .../eb/transactions/group-transactions.ts | 6 + .../transactions/inner-transaction-params.ts | 36 +- src/awst_build/eb/transactions/txn-fields.ts | 13 +- src/awst_build/eb/util/index.ts | 6 +- src/awst_build/ptypes/arc4-types.ts | 5 + src/awst_build/ptypes/base.ts | 6 +- src/awst_build/ptypes/index.ts | 30 +- src/awst_build/ptypes/register.ts | 19 +- src/awst_build/type-resolver.ts | 4 +- src/cli.ts | 4 +- src/constants.ts | 1 + src/logger/index.ts | 8 +- src/logger/sinks/console-log-sink.ts | 2 +- src/puya/index.ts | 4 +- src/puya/log-deserializer.ts | 37 + src/puya/run-puya.ts | 23 +- tests/approvals.spec.ts | 7 +- .../approvals/out/accounts/accounts.awst.json | 810 +- .../arc4-encode-decode.awst.json | 12 +- .../Arc4EncodedDecode.approval.teal | 396 - .../Arc4EncodedDecode.arc32.json | 140 - .../Arc4EncodedDecode.arc56.json | 202 - .../Arc4EncodedDecode.clear.teal | 5 - .../Arc4EncodedDecode.ssa.ir | 218 - .../arc4-encoded-decode.awst | 53 - .../arc4-encoded-decode.awst.json | 4057 -------- .../out/arc4-struct/arc4-struct.awst.json | 46 +- .../out/arc4-types/arc4-types.awst.json | 54 +- .../out/assert-match/assert-match.awst.json | 8 +- .../out/box-proxies/box-proxies.awst.json | 132 +- .../byte-expressions.awst.json | 2 +- .../out/ensure-budget/ensure-budget.awst.json | 6 +- .../out/global-state/global-state.awst.json | 14 +- .../out/itxn/ItxnDemoContract.approval.teal | 64 +- .../out/itxn/ItxnDemoContract.ssa.ir | 72 +- tests/approvals/out/itxn/itxn.awst | 8 +- tests/approvals/out/itxn/itxn.awst.json | 368 +- .../out/local-state/local-state.awst.json | 130 +- .../out/logic-sig/logic-sig.awst.json | 2 +- .../pre-approved-sale.awst.json | 4 +- .../out/precompiled-apps/Hello.approval.teal | 205 + .../out/precompiled-apps/Hello.arc32.json | 102 + .../out/precompiled-apps/Hello.arc56.json | 173 + .../out/precompiled-apps/Hello.clear.teal | 5 + .../out/precompiled-apps/Hello.ssa.ir | 112 + .../HelloTemplate.approval.teal | 204 + .../precompiled-apps/HelloTemplate.arc32.json | 97 + .../precompiled-apps/HelloTemplate.arc56.json | 172 + .../precompiled-apps/HelloTemplate.clear.teal | 5 + .../out/precompiled-apps/HelloTemplate.ssa.ir | 110 + .../HelloTemplateCustomPrefix.approval.teal | 204 + .../HelloTemplateCustomPrefix.arc32.json | 97 + .../HelloTemplateCustomPrefix.arc56.json | 172 + .../HelloTemplateCustomPrefix.clear.teal | 5 + .../HelloTemplateCustomPrefix.ssa.ir | 110 + .../LargeProgram.approval.teal | 143 + .../precompiled-apps/LargeProgram.arc32.json | 63 + .../precompiled-apps/LargeProgram.arc56.json | 113 + .../precompiled-apps/LargeProgram.clear.teal | 5 + .../out/precompiled-apps/LargeProgram.ssa.ir | 89 + .../TerribleCustodialAccount.ssa.ir | 4 + .../TerribleCustodialAccount.teal | 7 + .../precompiled-apps/precompiled-apps.awst | 222 + .../precompiled-apps.awst.json | 4382 ++++++++ .../HelloFactory.approval.teal | 803 ++ .../HelloFactory.arc32.json | 89 + .../HelloFactory.arc56.json | 153 + .../HelloFactory.clear.teal | 5 + .../precompiled-factory/HelloFactory.ssa.ir | 1225 +++ .../precompiled-factory.awst | 74 + .../precompiled-factory.awst.json | 8945 +++++++++++++++++ .../uint64-expressions.awst.json | 2 +- tests/approvals/precompiled-apps.algo.ts | 65 + tests/approvals/precompiled-factory.algo.ts | 130 + tests/onchain/precompiled.spec.ts | 20 + tests/onchain/util/test-fixture.ts | 18 +- 92 files changed, 19976 insertions(+), 5864 deletions(-) create mode 100644 packages/algo-ts/src/compiled.ts create mode 100644 packages/algo-ts/src/mutable-array.ts create mode 100644 src/awst_build/eb/compiled/compile-function.ts create mode 100644 src/awst_build/eb/logic-sig-builder.ts create mode 100644 src/puya/log-deserializer.ts delete mode 100644 tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.approval.teal delete mode 100644 tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.arc32.json delete mode 100644 tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.arc56.json delete mode 100644 tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.clear.teal delete mode 100644 tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.ssa.ir delete mode 100644 tests/approvals/out/arc4-encoded-decode/arc4-encoded-decode.awst delete mode 100644 tests/approvals/out/arc4-encoded-decode/arc4-encoded-decode.awst.json create mode 100644 tests/approvals/out/precompiled-apps/Hello.approval.teal create mode 100644 tests/approvals/out/precompiled-apps/Hello.arc32.json create mode 100644 tests/approvals/out/precompiled-apps/Hello.arc56.json create mode 100644 tests/approvals/out/precompiled-apps/Hello.clear.teal create mode 100644 tests/approvals/out/precompiled-apps/Hello.ssa.ir create mode 100644 tests/approvals/out/precompiled-apps/HelloTemplate.approval.teal create mode 100644 tests/approvals/out/precompiled-apps/HelloTemplate.arc32.json create mode 100644 tests/approvals/out/precompiled-apps/HelloTemplate.arc56.json create mode 100644 tests/approvals/out/precompiled-apps/HelloTemplate.clear.teal create mode 100644 tests/approvals/out/precompiled-apps/HelloTemplate.ssa.ir create mode 100644 tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.approval.teal create mode 100644 tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.arc32.json create mode 100644 tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.arc56.json create mode 100644 tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.clear.teal create mode 100644 tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.ssa.ir create mode 100644 tests/approvals/out/precompiled-apps/LargeProgram.approval.teal create mode 100644 tests/approvals/out/precompiled-apps/LargeProgram.arc32.json create mode 100644 tests/approvals/out/precompiled-apps/LargeProgram.arc56.json create mode 100644 tests/approvals/out/precompiled-apps/LargeProgram.clear.teal create mode 100644 tests/approvals/out/precompiled-apps/LargeProgram.ssa.ir create mode 100644 tests/approvals/out/precompiled-apps/TerribleCustodialAccount.ssa.ir create mode 100644 tests/approvals/out/precompiled-apps/TerribleCustodialAccount.teal create mode 100644 tests/approvals/out/precompiled-apps/precompiled-apps.awst create mode 100644 tests/approvals/out/precompiled-apps/precompiled-apps.awst.json create mode 100644 tests/approvals/out/precompiled-factory/HelloFactory.approval.teal create mode 100644 tests/approvals/out/precompiled-factory/HelloFactory.arc32.json create mode 100644 tests/approvals/out/precompiled-factory/HelloFactory.arc56.json create mode 100644 tests/approvals/out/precompiled-factory/HelloFactory.clear.teal create mode 100644 tests/approvals/out/precompiled-factory/HelloFactory.ssa.ir create mode 100644 tests/approvals/out/precompiled-factory/precompiled-factory.awst create mode 100644 tests/approvals/out/precompiled-factory/precompiled-factory.awst.json create mode 100644 tests/approvals/precompiled-apps.algo.ts create mode 100644 tests/approvals/precompiled-factory.algo.ts create mode 100644 tests/onchain/precompiled.spec.ts diff --git a/package.json b/package.json index a16e0aed..b1f3b6ad 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dev:examples": "tsx src/cli.ts build examples --output-awst --output-awst-json", "dev:approvals": "rimraf tests/approvals/out && tsx src/cli.ts build tests/approvals --dry-run", "dev:expected-output": "tsx src/cli.ts build tests/expected-output --dry-run", - "dev:testing": "tsx src/cli.ts build tests/approvals/arc4-encode-decode.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --log-level info --out-dir out/[name] --optimization-level=0", + "dev:testing": "tsx src/cli.ts build tests/approvals/precompiled-factory.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --out-dir out/[name] --optimization-level=0", "audit": "better-npm-audit audit", "format": "prettier --write .", "lint": "eslint \"src/**/*.ts\"", diff --git a/packages/algo-ts/src/arc4/index.ts b/packages/algo-ts/src/arc4/index.ts index 13a30b85..ca63b31f 100644 --- a/packages/algo-ts/src/arc4/index.ts +++ b/packages/algo-ts/src/arc4/index.ts @@ -1,6 +1,7 @@ import { BaseContract } from '../base-contract' import { ctxMgr } from '../execution-context' -import { Uint64 } from '../primitives' +import { NoImplementation } from '../impl/errors' +import { bytes, Uint64 } from '../primitives' import { DeliberateAny } from '../typescript-helpers' export * from './encoded-types' @@ -82,3 +83,13 @@ export function baremethod(config?: BareMethodConfig return target } } + +/** + * Returns the ARC4 method selector for a given ARC4 method signature. The method selector is the first + * 4 bytes of the SHA512/256 hash of the method signature. + * @param methodSignature An ARC4 method signature. Eg. `hello(string)string`. Must be a compile time constant. + * @returns The ARC4 method selector. Eg. `02BECE11` + */ +export function methodSelector(methodSignature: string): bytes { + throw new NoImplementation() +} diff --git a/packages/algo-ts/src/compiled.ts b/packages/algo-ts/src/compiled.ts new file mode 100644 index 00000000..8d711cbf --- /dev/null +++ b/packages/algo-ts/src/compiled.ts @@ -0,0 +1,116 @@ +import { BaseContract } from './base-contract' +import { NoImplementation } from './impl/errors' +import { LogicSig } from './logic-sig' +import { bytes, uint64 } from './primitives' +import { Account } from './reference' +import { ConstructorFor, DeliberateAny } from './typescript-helpers' + +/** + * Provides compiled programs and state allocation values for a Contract. Created by calling `compile(ExampleContractType)` + */ +export type CompiledContract = { + /** + * Approval program pages for a contract, after template variables have been replaced and compiled to AVM bytecode + */ + approvalProgram: [bytes, bytes] + /** + * Clear state program pages for a contract, after template variables have been replaced and compiled to AVM bytecode + */ + clearStateProgram: [bytes, bytes] + /** + * By default, provides extra program pages required based on approval and clear state program size, can be overridden when calling `compile(ExampleContractType, { extraProgramPages: ... })` + */ + extraProgramPages: uint64 + /** + * By default, provides global num uints based on contract state totals, can be overridden when calling `compile(ExampleContractType, { globalUints: ... })` + */ + globalUints: uint64 + /** + * By default, provides global num bytes based on contract state totals, can be overridden when calling `compile(ExampleContractType, { globalBytes: ... })` + */ + globalBytes: uint64 + /** + * By default, provides local num uints based on contract state totals, can be overridden when calling `compile(ExampleContractType, { localUints: ... })` + */ + localUints: uint64 + /** + * By default, provides local num bytes based on contract state totals, can be overridden when calling `compile(ExampleContractType, { localBytes: ... })` + */ + localBytes: uint64 +} + +/** + * Provides account for a Logic Signature. Created by calling `compile(LogicSigType)` + */ +export type CompiledLogicSig = { + /** + * Address of a logic sig program, after template variables have been replaced and compiled to AVM bytecode + */ + account: Account +} + +/** + * Options for compiling a contract + */ +type CompileContractOptions = { + /** + * Number of extra program pages, defaults to minimum required for contract + */ + extraProgramPages?: uint64 + /** + * Number of global uint64s, defaults to value defined for contract + */ + globalUints?: uint64 + /** + * Number of global bytes, defaults to value defined for contract + */ + globalBytes?: uint64 + /** + * Number of local uint64s, defaults to value defined for contract + */ + localUints?: uint64 + /** + * Number of local bytes, defaults to value defined for contract + */ + localBytes?: uint64 + /** + * Template variables to substitute into the contract, key should be without the prefix, must evaluate to a compile time constant + * and match the type of the template var declaration + */ + templateVars?: Record + /** + * Prefix to add to provided template vars, defaults to the prefix supplied on command line (which defaults to TMPL_) + */ + templateVarsPrefix?: string +} + +/** + * Options for compiling a logic signature + */ +type CompileLogicSigOptions = { + /** + * Template variables to substitute into the contract, key should be without the prefix, must evaluate to a compile time constant + * and match the type of the template var declaration + */ + templateVars?: Record + /** + * Prefix to add to provided template vars, defaults to the prefix supplied on command line (which defaults to TMPL_) + */ + templateVarsPrefix?: string +} + +/** + * Compile a contract and return the resulting byte code for approval and clear state programs. + * @param contract The contract class to compile + * @param options Options for compiling the contract + */ +export function compile(contract: ConstructorFor, options?: CompileContractOptions): CompiledContract +/** + * Compile a logic signature and return an account ready for signing transactions. + * @param logicSig The logic sig class to compile + * @param options Options for compiling the logic sig + */ +export function compile(logicSig: ConstructorFor, options?: CompileLogicSigOptions): CompiledLogicSig +export function compile(artefact: ConstructorFor | ConstructorFor): CompiledLogicSig | CompiledContract { + throw new NoImplementation() +} diff --git a/packages/algo-ts/src/index.ts b/packages/algo-ts/src/index.ts index ae64dcab..5bf124e3 100644 --- a/packages/algo-ts/src/index.ts +++ b/packages/algo-ts/src/index.ts @@ -15,3 +15,5 @@ export { TransactionType } from './transactions' export { LogicSig } from './logic-sig' export { TemplateVar } from './template-var' export { Base64, Ec, Ecdsa, VrfVerify } from './op-types' +export { compile, CompiledContract, CompiledLogicSig } from './compiled' +export { MutableArray } from './mutable-array' diff --git a/packages/algo-ts/src/mutable-array.ts b/packages/algo-ts/src/mutable-array.ts new file mode 100644 index 00000000..e51dff30 --- /dev/null +++ b/packages/algo-ts/src/mutable-array.ts @@ -0,0 +1,89 @@ +import { NoImplementation } from './impl/errors' +import { uint64, Uint64Compat } from './primitives' + +export class MutableArray { + constructor(...items: TItem[]) {} + + /** + * Returns the current length of this array + */ + get length(): uint64 { + throw new NoImplementation() + } + + /** + * Returns the item at the given index. + * Negative indexes are taken from the end. + * @param index The index of the item to retrieve + */ + at(index: Uint64Compat): TItem { + throw new NoImplementation() + } + + /** + * Create a new Dynamic array with all items from this array + */ + slice(): MutableArray + /** + * Create a new MutableArray with all items up till `end`. + * Negative indexes are taken from the end. + * @param end An index in which to stop copying items. + */ + slice(end: Uint64Compat): MutableArray + /** + * Create a new MutableArray with items from `start`, up until `end` + * Negative indexes are taken from the end. + * @param start An index in which to start copying items. + * @param end An index in which to stop copying items + */ + slice(start: Uint64Compat, end: Uint64Compat): MutableArray + slice(start?: Uint64Compat, end?: Uint64Compat): MutableArray { + throw new NoImplementation() + } + + /** + * Returns an iterator for the items in this array + */ + [Symbol.iterator](): IterableIterator { + throw new NoImplementation() + } + + /** + * Returns an iterator for a tuple of the indexes and items in this array + */ + entries(): IterableIterator { + throw new NoImplementation() + } + + /** + * Returns an iterator for the indexes in this array + */ + keys(): IterableIterator { + throw new NoImplementation() + } + + /** + * Get or set the item at the specified index. + * Negative indexes are not supported + */ + [index: uint64]: TItem + + /** + * Push a number of items into this array + * @param items The items to be added to this array + */ + push(...items: TItem[]): void { + throw new NoImplementation() + } + + /** + * Pop a single item from this array + */ + pop(): TItem { + throw new NoImplementation() + } + + copy(): MutableArray { + throw new NoImplementation() + } +} diff --git a/packages/algo-ts/src/template-var.ts b/packages/algo-ts/src/template-var.ts index 76b4eb30..71726469 100644 --- a/packages/algo-ts/src/template-var.ts +++ b/packages/algo-ts/src/template-var.ts @@ -1,3 +1,5 @@ +import { NoImplementation } from './impl/errors' + export function TemplateVar(variableName: string, prefix = 'TMPL_'): T { - throw new Error('TODO') + throw NoImplementation } diff --git a/packages/algo-ts/src/typescript-helpers.ts b/packages/algo-ts/src/typescript-helpers.ts index d0788aab..fbdb748d 100644 --- a/packages/algo-ts/src/typescript-helpers.ts +++ b/packages/algo-ts/src/typescript-helpers.ts @@ -2,3 +2,4 @@ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ export type DeliberateAny = any export type AnyFunction = (...args: DeliberateAny[]) => DeliberateAny +export type ConstructorFor = new (...args: TArgs) => T diff --git a/src/awst/to-code-visitor.ts b/src/awst/to-code-visitor.ts index 9a674bb7..953fffe8 100644 --- a/src/awst/to-code-visitor.ts +++ b/src/awst/to-code-visitor.ts @@ -58,10 +58,35 @@ export class ToCodeVisitor return `${expression.target.accept(this)}${expression.op}` } visitCompiledContract(expression: nodes.CompiledContract): string { - throw new TodoError('Method not implemented.', { sourceLocation: expression.sourceLocation }) + let overrides = Array.from(expression.allocationOverrides.entries()) + .map(([f, v]) => `${f}=${v.accept(this)}`) + .join(', ') + if (overrides) { + overrides = `, ${overrides}` + } + + let templateVars = Array.from(expression.templateVariables.entries()) + .map(([n, v]) => `${n}=${v.accept(this)}`) + .join(', ') + if (templateVars) { + templateVars = `, ${templateVars}` + } + + const prefix = expression.prefix ? `, prefix=${expression.prefix}` : '' + + return `compile(${expression.contract.id}${overrides}${prefix}${templateVars}` } visitCompiledLogicSig(expression: nodes.CompiledLogicSig): string { - throw new TodoError('Method not implemented.', { sourceLocation: expression.sourceLocation }) + let templateVars = Array.from(expression.templateVariables.entries()) + .map(([n, v]) => `${n}=${v.accept(this)}`) + .join(', ') + if (templateVars) { + templateVars = `, ${templateVars}` + } + + const prefix = expression.prefix ? `, prefix=${expression.prefix}` : '' + + return `compile(${expression.logicSig.id}${prefix}${templateVars}` } visitLoopExit(statement: nodes.LoopExit): string[] { throw new TodoError('Method not implemented.', { sourceLocation: statement.sourceLocation }) diff --git a/src/awst/txn-fields.ts b/src/awst/txn-fields.ts index 06ca6890..cb6f9da8 100644 --- a/src/awst/txn-fields.ts +++ b/src/awst/txn-fields.ts @@ -5,11 +5,16 @@ export class TxnFieldData { readonly wtype: wtypes.WType readonly numValues: number readonly isInnerParam: boolean - constructor(data: { field: TxnField; wtype: wtypes.WType; numValues?: number; isInnerParam?: boolean }) { + /** + * If field is an array, accept individual arguments and convert to an array + */ + readonly arrayPromote: boolean + constructor(data: { field: TxnField; wtype: wtypes.WType; numValues?: number; isInnerParam?: boolean; arrayPromote?: boolean }) { this.immediate = data.field this.wtype = data.wtype this.numValues = data.numValues ?? 1 this.isInnerParam = data.isInnerParam ?? true + this.arrayPromote = data.arrayPromote ?? false } } @@ -167,6 +172,16 @@ export const TxnFields: Record = { // v5 Logs: new TxnFieldData({ field: TxnField.Logs, wtype: wtypes.bytesWType, numValues: 32, isInnerParam: false }), // v7 - ApprovalProgramPages: new TxnFieldData({ field: TxnField.ApprovalProgramPages, wtype: wtypes.bytesWType, numValues: 4 }), - ClearStateProgramPages: new TxnFieldData({ field: TxnField.ClearStateProgramPages, wtype: wtypes.bytesWType, numValues: 4 }), + ApprovalProgramPages: new TxnFieldData({ + field: TxnField.ApprovalProgramPages, + wtype: wtypes.bytesWType, + numValues: 4, + arrayPromote: true, + }), + ClearStateProgramPages: new TxnFieldData({ + field: TxnField.ClearStateProgramPages, + wtype: wtypes.bytesWType, + numValues: 4, + arrayPromote: true, + }), } diff --git a/src/awst_build/ast-visitors/base-visitor.ts b/src/awst_build/ast-visitors/base-visitor.ts index b6bf064b..0c62458b 100644 --- a/src/awst_build/ast-visitors/base-visitor.ts +++ b/src/awst_build/ast-visitors/base-visitor.ts @@ -206,7 +206,7 @@ export abstract class BaseVisitor implements Visitor { return this.context.getBuilderForNode(node.name) } const property = this.textVisitor.accept(node.name) - return target.memberAccess(property, this.sourceLocation(node)) + return target.memberAccess(property, this.sourceLocation(node.name)) } visitElementAccessExpression(node: ts.ElementAccessExpression): NodeBuilder { diff --git a/src/awst_build/eb/arc4/util.ts b/src/awst_build/eb/arc4/util.ts index d8be6a28..8524e66c 100644 --- a/src/awst_build/eb/arc4/util.ts +++ b/src/awst_build/eb/arc4/util.ts @@ -2,12 +2,19 @@ import { nodeFactory } from '../../../awst/node-factory' import type { BytesConstant, Expression } from '../../../awst/nodes' import { EqualityComparison } from '../../../awst/nodes' import type { SourceLocation } from '../../../awst/source-location' +import { wtypes } from '../../../awst/wtypes' import { logger } from '../../../logger' import { codeInvariant, hexToUint8Array } from '../../../util' import { isArc4EncodableType, ptypeToArc4EncodedType } from '../../arc4-util' import type { PType } from '../../ptypes' import { bytesPType, stringPType } from '../../ptypes' -import { ARC4EncodedType, decodeArc4Function, encodeArc4Function, interpretAsArc4Function } from '../../ptypes/arc4-types' +import { + ARC4EncodedType, + decodeArc4Function, + encodeArc4Function, + interpretAsArc4Function, + methodSelectorFunction, +} from '../../ptypes/arc4-types' import { instanceEb } from '../../type-registry' import type { InstanceBuilder, NodeBuilder } from '../index' import { FunctionBuilder } from '../index' @@ -152,3 +159,31 @@ function getPrefixValue(arg: InstanceBuilder | undefined): BytesConstant | undef logger.error(arg.sourceLocation, `Expected literal string: 'none' | 'log'`) } } + +export class MethodSelectorFunctionBuilder extends FunctionBuilder { + readonly ptype = methodSelectorFunction + + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { + const { + args: [methodSignature], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: 0, + callLocation: sourceLocation, + funcName: this.typeDescription, + argSpec: (a) => [a.required(stringPType)], + }) + + const signature = requireStringConstant(methodSignature).value + + return instanceEb( + nodeFactory.methodConstant({ + value: signature, + wtype: wtypes.bytesWType, + sourceLocation, + }), + bytesPType, + ) + } +} diff --git a/src/awst_build/eb/assert-match-function-builder.ts b/src/awst_build/eb/assert-match-function-builder.ts index db76c57e..27cfd030 100644 --- a/src/awst_build/eb/assert-match-function-builder.ts +++ b/src/awst_build/eb/assert-match-function-builder.ts @@ -38,7 +38,7 @@ export class AssertMatchFunctionBuilder extends NodeBuilder { const subjectProperty = requireInstanceBuilder(subject.memberAccess(propName, sourceLocation)) const subjectType = subjectProperty.ptype const testProperty = requireInstanceBuilder(tests.memberAccess(propName, sourceLocation)) - if (subjectType.equals(propType)) { + if (testProperty.resolvableToPType(subjectType)) { return combineConditions( acc, subjectProperty.compare(testProperty, BuilderComparisonOp.eq, sourceLocation).resolve(), @@ -97,7 +97,9 @@ function getComparisonOpAndOperand(testProperty: InstanceBuilder, targetType: PT return [op, requireBuilderOfType(testProperty.memberAccess(prop, testProperty.sourceLocation), targetType)] } } - throw new CodeError('Unsupported assertMatch expression', { sourceLocation: testProperty.sourceLocation }) + throw new CodeError(`Cannot compare values of type ${testProperty.ptype} and ${targetType.name}`, { + sourceLocation: testProperty.sourceLocation, + }) } function combineConditions(left: Expression | undefined, right: Expression, sourceLocation: SourceLocation): Expression { diff --git a/src/awst_build/eb/compiled/compile-function.ts b/src/awst_build/eb/compiled/compile-function.ts new file mode 100644 index 00000000..95934d8c --- /dev/null +++ b/src/awst_build/eb/compiled/compile-function.ts @@ -0,0 +1,114 @@ +import { ContractReference, LogicSigReference } from '../../../awst/models' +import { nodeFactory } from '../../../awst/node-factory' +import type { Expression } from '../../../awst/nodes' +import type { SourceLocation } from '../../../awst/source-location' +import { TxnField } from '../../../awst/txn-fields' +import { codeInvariant, invariant } from '../../../util' +import type { PType } from '../../ptypes' +import { + compiledContractType, + compiledLogicSigType, + compileFunctionType, + ContractClassPType, + LogicSigPType, + ObjectPType, + uint64PType, +} from '../../ptypes' +import { instanceEb } from '../../type-registry' +import type { InstanceBuilder, NodeBuilder } from '../index' +import { FunctionBuilder } from '../index' +import { requireBuilderOfType, requireInstanceBuilder, requireStringConstant } from '../util' +import { parseFunctionArgs } from '../util/arg-parsing' + +export class CompileFunctionBuilder extends FunctionBuilder { + readonly ptype = compileFunctionType + + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { + const { + args: [contractOrSig, options], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: 0, + callLocation: sourceLocation, + funcName: this.typeDescription, + argSpec: (a) => [a.required(ContractClassPType, LogicSigPType), a.optional()], + }) + + const templateVarOptions = parseTemplateVars(options) + + if (contractOrSig.ptype instanceof ContractClassPType) { + return instanceEb( + nodeFactory.compiledContract({ + contract: ContractReference.fromPType(contractOrSig.ptype), + allocationOverrides: parseAllocationOverrides(options), + ...templateVarOptions, + wtype: compiledContractType.wtype, + sourceLocation, + }), + compiledContractType, + ) + } else { + invariant(contractOrSig.ptype instanceof LogicSigPType, 'ptype must be LogicSigPType') + return instanceEb( + nodeFactory.compiledLogicSig({ + logicSig: LogicSigReference.fromPType(contractOrSig.ptype), + ...templateVarOptions, + wtype: compiledLogicSigType.wtype, + sourceLocation, + }), + compiledLogicSigType, + ) + } + } +} +const optionsNames = { + prefix: 'templateVarsPrefix', + templateVars: 'templateVars', +} + +function parseTemplateVars(options: InstanceBuilder | undefined): { prefix: string | null; templateVariables: Map } { + const prefix = options?.hasProperty(optionsNames.prefix) + ? requireStringConstant(options.memberAccess(optionsNames.prefix, options.sourceLocation)).value + : null + + const templateVariables = new Map() + + if (options?.hasProperty(optionsNames.templateVars)) { + const templateVars = requireInstanceBuilder(options.memberAccess(optionsNames.templateVars, options.sourceLocation)) + codeInvariant( + templateVars.ptype instanceof ObjectPType, + `${optionsNames.templateVars} must be an object type`, + templateVars.sourceLocation, + ) + + for (const [varName] of templateVars.ptype.orderedProperties()) { + templateVariables.set(varName, requireInstanceBuilder(templateVars.memberAccess(varName, templateVars.sourceLocation)).resolve()) + } + } + + return { + prefix, + templateVariables, + } +} + +const allocationOverrides = { + extraProgramPages: [TxnField.ExtraProgramPages, uint64PType], + globalUints: [TxnField.ExtraProgramPages, uint64PType], + globalBytes: [TxnField.ExtraProgramPages, uint64PType], + localUints: [TxnField.ExtraProgramPages, uint64PType], + localBytes: [TxnField.ExtraProgramPages, uint64PType], +} as const + +function parseAllocationOverrides(options: InstanceBuilder | undefined): Map { + const overrides = new Map() + if (options) { + for (const [property, [field, fieldType]] of Object.entries(allocationOverrides)) { + if (options.hasProperty(property)) { + overrides.set(field, requireBuilderOfType(options.memberAccess(property, options.sourceLocation), fieldType).resolve()) + } + } + } + return overrides +} diff --git a/src/awst_build/eb/contract-builder.ts b/src/awst_build/eb/contract-builder.ts index 0ec6538e..9bd825bc 100644 --- a/src/awst_build/eb/contract-builder.ts +++ b/src/awst_build/eb/contract-builder.ts @@ -5,10 +5,10 @@ import type { SourceLocation } from '../../awst/source-location' import { wtypes } from '../../awst/wtypes' import { Constants } from '../../constants' import { CodeError } from '../../errors' -import { codeInvariant } from '../../util' +import { codeInvariant, invariant } from '../../util' import type { AwstBuildContext } from '../context/awst-build-context' -import type { ContractClassPType, PType } from '../ptypes' -import { arc4BaseContractType, baseContractType, StorageProxyPType } from '../ptypes' +import type { PType } from '../ptypes' +import { arc4BaseContractType, baseContractType, ContractClassPType, StorageProxyPType } from '../ptypes' import { instanceEb } from '../type-registry' @@ -87,3 +87,26 @@ export class ContractSuperBuilder extends ContractThisBuilder { return super.memberAccess(name, sourceLocation) } } + +export class ContractClassBuilder extends InstanceBuilder { + resolve(): Expression { + throw new CodeError('Contract class cannot be used as a value') + } + resolveLValue(): LValue { + throw new CodeError('Contract class cannot be used as a value') + } + readonly ptype: ContractClassPType + constructor(sourceLocation: SourceLocation, ptype: PType) { + super(sourceLocation) + invariant(ptype instanceof ContractClassPType, 'ptype must be ContractClassPType') + this.ptype = ptype + } + + newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { + throw new CodeError('Contract class cannot be constructed manually') + } + + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { + throw new CodeError('Contract class cannot be called manually') + } +} diff --git a/src/awst_build/eb/index.ts b/src/awst_build/eb/index.ts index f92404a6..fd21e86e 100644 --- a/src/awst_build/eb/index.ts +++ b/src/awst_build/eb/index.ts @@ -75,7 +75,7 @@ export abstract class NodeBuilder { } hasProperty(_name: string): boolean { - throw new NotSupported(`Has property checks on ${this.typeDescription}`) + return false } memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder { diff --git a/src/awst_build/eb/logic-sig-builder.ts b/src/awst_build/eb/logic-sig-builder.ts new file mode 100644 index 00000000..7d6a33e7 --- /dev/null +++ b/src/awst_build/eb/logic-sig-builder.ts @@ -0,0 +1,29 @@ +import type { Expression, LValue } from '../../awst/nodes' +import type { SourceLocation } from '../../awst/source-location' +import { CodeError } from '../../errors' +import { invariant } from '../../util' +import { LogicSigPType, type PType } from '../ptypes' +import { InstanceBuilder, type NodeBuilder } from './index' + +export class LogicSigClassBuilder extends InstanceBuilder { + resolve(): Expression { + throw new CodeError('LogicSig class cannot be used as a value') + } + resolveLValue(): LValue { + throw new CodeError('LogicSig class cannot be used as a value') + } + readonly ptype: LogicSigPType + constructor(sourceLocation: SourceLocation, ptype: PType) { + super(sourceLocation) + invariant(ptype instanceof LogicSigPType, 'ptype must be LogicSigPType') + this.ptype = ptype + } + + newCall(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { + throw new CodeError('LogicSig class cannot be constructed manually') + } + + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): InstanceBuilder { + throw new CodeError('LogicSig class cannot be called manually') + } +} diff --git a/src/awst_build/eb/transactions/group-transactions.ts b/src/awst_build/eb/transactions/group-transactions.ts index 38777221..b8e33c39 100644 --- a/src/awst_build/eb/transactions/group-transactions.ts +++ b/src/awst_build/eb/transactions/group-transactions.ts @@ -19,6 +19,12 @@ export class GroupTransactionExpressionBuilder extends InstanceExpressionBuilder super(expr, ptype) } + hasProperty(name: string): boolean { + const txnKind = this.ptype.kind + const fields = txnKind === undefined ? anyTxnFields : txnKindToFields[txnKind] + return name in fields + } + memberAccess(name: string, sourceLocation: SourceLocation): NodeBuilder { const txnKind = this.ptype.kind const fields = txnKind === undefined ? anyTxnFields : txnKindToFields[txnKind] diff --git a/src/awst_build/eb/transactions/inner-transaction-params.ts b/src/awst_build/eb/transactions/inner-transaction-params.ts index e2a6d40d..f535d71c 100644 --- a/src/awst_build/eb/transactions/inner-transaction-params.ts +++ b/src/awst_build/eb/transactions/inner-transaction-params.ts @@ -41,7 +41,7 @@ export class ItxnParamsFactoryFunctionBuilder extends FunctionBuilder { const mappedFields = new Map() // Set default fee to 0 (transaction will be paid for from transaction group budget, rather than from the application balance) mappedFields.set(TxnField.Fee, nodeFactory.uInt64Constant({ value: 0n, sourceLocation })) - + if (this.ptype.kind) mappedFields.set(TxnField.TypeEnum, nodeFactory.uInt64Constant({ value: BigInt(this.ptype.kind), sourceLocation })) mapTransactionFields(mappedFields, initialFields, this.ptype.kind, sourceLocation) const fieldsType = getItxnParamsType(this.ptype.kind) @@ -84,24 +84,30 @@ function mapTransactionFields( }), ) } else if (txnFieldData.numValues > 1) { - codeInvariant( - propValue instanceof ArrayLiteralExpressionBuilder || propValue instanceof TupleExpressionBuilder, - `Unsupported expression for ${prop}`, - propValue.sourceLocation, - ) - - mappedFields.set( - txnField, - nodeFactory.tupleExpression({ - items: propValue.getItemBuilders().map((i) => requireExpressionOfType(i, fieldType)), - sourceLocation: propValue.sourceLocation, - }), - ) + if (propValue instanceof ArrayLiteralExpressionBuilder || propValue instanceof TupleExpressionBuilder) { + mappedFields.set( + txnField, + nodeFactory.tupleExpression({ + items: propValue.getItemBuilders().map((i) => requireExpressionOfType(i, fieldType)), + sourceLocation: propValue.sourceLocation, + }), + ) + } else if (txnFieldData.arrayPromote) { + mappedFields.set( + txnField, + nodeFactory.tupleExpression({ + items: [requireExpressionOfType(propValue, fieldType)], + sourceLocation: propValue.sourceLocation, + }), + ) + } else { + logger.error(propValue.sourceLocation, `Unsupported expression for ${prop}`) + } } else { mappedFields.set(txnField, requireExpressionOfType(propValue, fieldType)) } } else { - logger.error(sourceLocation, `${prop} not in valid fields `) + logger.warn(sourceLocation, `Ignoring additional property: ${prop}`) } } } diff --git a/src/awst_build/eb/transactions/txn-fields.ts b/src/awst_build/eb/transactions/txn-fields.ts index ce9e065c..c3852c2b 100644 --- a/src/awst_build/eb/transactions/txn-fields.ts +++ b/src/awst_build/eb/transactions/txn-fields.ts @@ -275,12 +275,12 @@ export const applicationCallTxnFields = { /** * Approval program */ - approvalProgram: [TxnField.ApprovalProgram, bytesPType] as const, + approvalProgram: [TxnField.ApprovalProgramPages, bytesPType] as const, /** * Clear State program */ - clearStateProgram: [TxnField.ClearStateProgram, bytesPType] as const, + clearStateProgram: [TxnField.ClearStateProgramPages, bytesPType] as const, /** * Number of Assets @@ -354,14 +354,9 @@ export const applicationCallTxnFields = { apps: [TxnField.Applications, applicationPType] as const, /** - * Approval Program as an array of pages + * The id of the created application */ - approvalProgramPages: [TxnField.ApprovalProgramPages, bytesPType] as const, - - /** - * Clear State Program as an array of pages - */ - clearStateProgramPages: [TxnField.ClearStateProgramPages, bytesPType] as const, + createdApp: [TxnField.CreatedApplicationID, applicationPType] as const, } satisfies Record export const anyTxnFields = { diff --git a/src/awst_build/eb/util/index.ts b/src/awst_build/eb/util/index.ts index cf0400bd..e257d53a 100644 --- a/src/awst_build/eb/util/index.ts +++ b/src/awst_build/eb/util/index.ts @@ -75,17 +75,17 @@ export function requireExpressionsOfType( throw new CodeError(`Expected ${ptypes.length} args with types ${ptypes.join(', ')}`, { sourceLocation }) } -export function requireStringConstant(builder: InstanceBuilder): awst.StringConstant { +export function requireStringConstant(builder: NodeBuilder): awst.StringConstant { const constant = requireConstantOfType(builder, stringPType) codeInvariant(constant instanceof StringConstant, 'Expected string literal', builder.sourceLocation) return constant } -export function requireIntegerConstant(builder: InstanceBuilder): awst.IntegerConstant { +export function requireIntegerConstant(builder: NodeBuilder): awst.IntegerConstant { const constant = requestConstantOfType(builder, uint64PType) ?? requestConstantOfType(builder, biguintPType) codeInvariant(constant instanceof IntegerConstant, 'Expected integer literal') return constant } -export function requireBooleanConstant(builder: InstanceBuilder): awst.BoolConstant { +export function requireBooleanConstant(builder: NodeBuilder): awst.BoolConstant { const constant = requireConstantOfType(builder, boolPType) codeInvariant(constant instanceof BoolConstant, 'Expected boolean literal') return constant diff --git a/src/awst_build/ptypes/arc4-types.ts b/src/awst_build/ptypes/arc4-types.ts index a46869e4..32634f91 100644 --- a/src/awst_build/ptypes/arc4-types.ts +++ b/src/awst_build/ptypes/arc4-types.ts @@ -515,3 +515,8 @@ export const decodeArc4Function = new LibFunctionType({ name: 'decodeArc4', module: Constants.arc4EncodedTypesModuleName, }) + +export const methodSelectorFunction = new LibFunctionType({ + name: 'methodSelector', + module: Constants.arc4ModuleName, +}) diff --git a/src/awst_build/ptypes/base.ts b/src/awst_build/ptypes/base.ts index 840df890..ea0661c3 100644 --- a/src/awst_build/ptypes/base.ts +++ b/src/awst_build/ptypes/base.ts @@ -1,6 +1,6 @@ import type { wtypes } from '../../awst/wtypes' +import { CodeError } from '../../errors' import type { DeliberateAny } from '../../typescript-helpers' -import { codeInvariant } from '../../util' /** * Represents a public type visible to a developer of AlgoTS @@ -28,7 +28,9 @@ export abstract class PType { } get wtypeOrThrow(): wtypes.WType { - codeInvariant(this.wtype, `${this.fullName} does not have a wtype`) + if (!this.wtype) { + throw new CodeError(`${this.fullName} does not have a wtype`) + } return this.wtype } diff --git a/src/awst_build/ptypes/index.ts b/src/awst_build/ptypes/index.ts index 2998a60a..129c7951 100644 --- a/src/awst_build/ptypes/index.ts +++ b/src/awst_build/ptypes/index.ts @@ -79,7 +79,7 @@ export class LogicSigPType extends PType { readonly wtype = undefined readonly name: string readonly module: string - readonly singleton = false + readonly singleton = true readonly sourceLocation: SourceLocation readonly baseType: LogicSigPType | undefined constructor(props: { module: string; name: string; baseType?: LogicSigPType; sourceLocation: SourceLocation }) { @@ -1261,3 +1261,31 @@ export const TemplateVarFunction = new LibFunctionType({ name: 'TemplateVar', module: Constants.templateVarModuleName, }) + +export const compileFunctionType = new LibFunctionType({ + name: 'compile', + module: Constants.compiledModuleName, +}) + +export const compiledContractType = new ObjectPType({ + name: 'CompiledContract', + module: Constants.compiledModuleName, + description: 'Provides compiled programs and state allocation values for a Contract. Created by calling `compile(ExampleContractType)`', + properties: { + approvalProgram: new TuplePType({ items: [bytesPType, bytesPType] }), + clearStateProgram: new TuplePType({ items: [bytesPType, bytesPType] }), + extraProgramPages: uint64PType, + globalUints: uint64PType, + globalBytes: uint64PType, + localUints: uint64PType, + localBytes: uint64PType, + }, +}) +export const compiledLogicSigType = new ObjectPType({ + name: 'CompiledLogicSig', + module: Constants.compiledModuleName, + description: 'Provides account for a Logic Signature. Created by calling `compile(LogicSigType)``', + properties: { + account: accountPType, + }, +}) diff --git a/src/awst_build/ptypes/register.ts b/src/awst_build/ptypes/register.ts index c5d69648..ad0e4b31 100644 --- a/src/awst_build/ptypes/register.ts +++ b/src/awst_build/ptypes/register.ts @@ -17,18 +17,26 @@ import { StructClassBuilder, StructExpressionBuilder } from '../eb/arc4/struct' import { Arc4TupleClassBuilder, Arc4TupleExpressionBuilder } from '../eb/arc4/tuple' import { UFixedNxMClassBuilder, UFixedNxMExpressionBuilder } from '../eb/arc4/ufixed' import { classBuilderForUintNAlias, UintNClassBuilder, UintNExpressionBuilder } from '../eb/arc4/uintn' -import { DecodeArc4FunctionBuilder, EncodeArc4FunctionBuilder, InterpretAsArc4FunctionBuilder } from '../eb/arc4/util' +import { + DecodeArc4FunctionBuilder, + EncodeArc4FunctionBuilder, + InterpretAsArc4FunctionBuilder, + MethodSelectorFunctionBuilder, +} from '../eb/arc4/util' import { AssertFunctionBuilder, ErrFunctionBuilder } from '../eb/assert-function-builder' import { AssertMatchFunctionBuilder } from '../eb/assert-match-function-builder' import { BigUintExpressionBuilder, BigUintFunctionBuilder } from '../eb/biguint-expression-builder' import { BooleanExpressionBuilder, BooleanFunctionBuilder } from '../eb/boolean-expression-builder' import { BytesExpressionBuilder, BytesFunctionBuilder } from '../eb/bytes-expression-builder' +import { CompileFunctionBuilder } from '../eb/compiled/compile-function' +import { ContractClassBuilder } from '../eb/contract-builder' import { EnsureBudgetFunctionBuilder } from '../eb/ensure-budget' import { FreeSubroutineExpressionBuilder } from '../eb/free-subroutine-expression-builder' import { IntrinsicEnumBuilder } from '../eb/intrinsic-enum-builder' import { IterableIteratorExpressionBuilder } from '../eb/iterable-iterator-expression-builder' import { ObjectExpressionBuilder } from '../eb/literal/object-expression-builder' import { LogFunctionBuilder } from '../eb/log-function-builder' +import { LogicSigClassBuilder } from '../eb/logic-sig-builder' import { NamespaceBuilder } from '../eb/namespace-builder' import { NativeArrayExpressionBuilder } from '../eb/native-array-expression-builder' import { FreeIntrinsicOpBuilder, IntrinsicOpGroupBuilder, IntrinsicOpGroupOrFunctionTypeBuilder } from '../eb/op-module-builder' @@ -83,6 +91,7 @@ import { DynamicBytesType, encodeArc4Function, interpretAsArc4Function, + methodSelectorFunction, StaticArrayConstructor, StaticArrayGeneric, StaticArrayType, @@ -149,6 +158,8 @@ import { boxRefType, BytesFunction, bytesPType, + compileFunctionType, + ContractClassPType, ensureBudgetFunction, errFunction, FunctionPType, @@ -170,6 +181,7 @@ import { LocalStateGeneric, LocalStateType, logFunction, + LogicSigPType, NamespacePType, ObjectPType, onCompleteActionType, @@ -223,6 +235,10 @@ export function registerPTypes(typeRegistry: TypeRegistry) { typeRegistry.register({ ptype: ensureBudgetFunction, singletonEb: EnsureBudgetFunctionBuilder }) typeRegistry.register({ ptype: urangeFunction, singletonEb: UrangeFunctionBuilder }) typeRegistry.register({ ptype: TemplateVarFunction, singletonEb: TemplateVarFunctionBuilder }) + typeRegistry.register({ ptype: compileFunctionType, singletonEb: CompileFunctionBuilder }) + + typeRegistry.register({ ptype: ContractClassPType, singletonEb: ContractClassBuilder }) + typeRegistry.register({ ptype: LogicSigPType, singletonEb: LogicSigClassBuilder }) for (const enumType of [opUpFeeSourceType, onCompleteActionType, transactionTypeType]) { typeRegistry.register({ ptype: enumType, singletonEb: Uint64EnumTypeBuilder }) @@ -328,6 +344,7 @@ export function registerPTypes(typeRegistry: TypeRegistry) { typeRegistry.register({ ptype: interpretAsArc4Function, singletonEb: InterpretAsArc4FunctionBuilder }) typeRegistry.register({ ptype: encodeArc4Function, singletonEb: EncodeArc4FunctionBuilder }) typeRegistry.register({ ptype: decodeArc4Function, singletonEb: DecodeArc4FunctionBuilder }) + typeRegistry.register({ ptype: methodSelectorFunction, singletonEb: MethodSelectorFunctionBuilder }) // GTXN types typeRegistry.register({ ptype: paymentGtxnType, instanceEb: GroupTransactionExpressionBuilder }) diff --git a/src/awst_build/type-resolver.ts b/src/awst_build/type-resolver.ts index 728e910d..335509ad 100644 --- a/src/awst_build/type-resolver.ts +++ b/src/awst_build/type-resolver.ts @@ -296,8 +296,8 @@ export class TypeResolver { const ptype = this.resolve(typeDeclaration, sourceLocation) if (ptype instanceof ARC4StructType) { return ARC4StructClass.fromStructType(ptype) - } else if (ptype instanceof ContractClassPType) { - throw new CodeError('Contract classes cannot be explicitly instantiated', { sourceLocation }) + } else if (ptype instanceof ContractClassPType || ptype instanceof LogicSigPType) { + return ptype } } throw new CodeError('Unable to reflect constructor type', { sourceLocation }) diff --git a/src/cli.ts b/src/cli.ts index e3db5554..b55b7347 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -47,7 +47,7 @@ function cli() { .argument('', 'The path, or paths to search for compatible .algo.ts files') .addOption( new Option('--log-level [level]', 'The minimum log level to output') - .choices([LogLevel.Debug, LogLevel.Info, LogLevel.Warn, LogLevel.Error, LogLevel.Critical]) + .choices([LogLevel.Debug, LogLevel.Info, LogLevel.Warning, LogLevel.Error, LogLevel.Critical]) .default(LogLevel.Info), ) .addOption(new Option('--output-awst', 'Output debugging awst file per parsed file').default(false)) @@ -115,7 +115,7 @@ function cli() { .action((a, o) => { using logCtx = LoggingContext.create() - logger.configure([new ConsoleLogSink(LogLevel.Warn)]) + logger.configure([new ConsoleLogSink(LogLevel.Warning)]) try { const paths = cliArgumentsSchema.parse(a) const cliOptions = cliOptionsSchema.parse(o) diff --git a/src/constants.ts b/src/constants.ts index bf9c575f..8c4c3cff 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -17,6 +17,7 @@ export const Constants = { transactionsModuleName: `${algoTsPackage}/transactions.d.ts`, gtxnModuleName: `${algoTsPackage}/gtxn.d.ts`, itxnModuleName: `${algoTsPackage}/itxn.d.ts`, + compiledModuleName: `${algoTsPackage}/compiled.d.ts`, primitivesModuleName: `${algoTsPackage}/primitives.d.ts`, arc4EncodedTypesModuleName: `${algoTsPackage}/arc4/encoded-types.d.ts`, arc4BareDecoratorName: 'arc4.baremethod', diff --git a/src/logger/index.ts b/src/logger/index.ts index 1f434b67..cb072d4c 100644 --- a/src/logger/index.ts +++ b/src/logger/index.ts @@ -7,7 +7,7 @@ type NodeOrSourceLocation = SourceLocation | { sourceLocation: SourceLocation } export enum LogLevel { Error = 'error', Info = 'info', - Warn = 'warn', + Warning = 'warning', Debug = 'debug', Critical = 'critical', } @@ -15,7 +15,7 @@ const logLevelToInt = { [LogLevel.Critical]: 4, [LogLevel.Error]: 3, [LogLevel.Info]: 1, - [LogLevel.Warn]: 2, + [LogLevel.Warning]: 2, [LogLevel.Debug]: 0, } @@ -39,7 +39,7 @@ class PuyaLogger { this.logSinks = sinks } - private addLog(level: LogEvent['level'], source: NodeOrSourceLocation | undefined, message: string) { + addLog(level: LogEvent['level'], source: NodeOrSourceLocation | undefined, message: string) { const logEvent: LogEvent = { sourceLocation: source ? (source instanceof SourceLocation ? source : source.sourceLocation) : undefined, message, @@ -71,7 +71,7 @@ class PuyaLogger { this.addLog(LogLevel.Debug, source, message) } warn(source: NodeOrSourceLocation | undefined, message: string): void { - this.addLog(LogLevel.Warn, source, message) + this.addLog(LogLevel.Warning, source, message) } critical(source: NodeOrSourceLocation | undefined, message: string): void { this.addLog(LogLevel.Critical, source, message) diff --git a/src/logger/sinks/console-log-sink.ts b/src/logger/sinks/console-log-sink.ts index fa1cdccf..24a7b650 100644 --- a/src/logger/sinks/console-log-sink.ts +++ b/src/logger/sinks/console-log-sink.ts @@ -9,7 +9,7 @@ const levelConfig: Record { +describe('Approvals', async () => { + await rimraf('tests/approvals/out') + using logCtx = LoggingContext.create() const result = compile( buildCompileOptions({ @@ -15,7 +18,7 @@ describe('Approvals', () => { paths: ['tests/approvals'], outDir: 'out/[name]', dryRun: false, - logLevel: LogLevel.Warn, + logLevel: LogLevel.Warning, }), { ...defaultPuyaOptions, diff --git a/tests/approvals/out/accounts/accounts.awst.json b/tests/approvals/out/accounts/accounts.awst.json index 710fbd10..01704d7e 100644 --- a/tests/approvals/out/accounts/accounts.awst.json +++ b/tests/approvals/out/accounts/accounts.awst.json @@ -1013,7 +1013,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 8, "end_line": 8, - "column": 13, + "column": 21, "end_column": 26 }, "wtype": { @@ -1048,7 +1048,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -1064,7 +1064,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -1123,7 +1123,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -1139,7 +1139,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -1198,7 +1198,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 39, "end_column": 44 }, "wtype": { @@ -1214,7 +1214,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -1230,7 +1230,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -1290,7 +1290,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -1306,7 +1306,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -1365,7 +1365,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -1381,7 +1381,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -1440,7 +1440,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -1456,7 +1456,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -1515,7 +1515,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -1531,7 +1531,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -1590,7 +1590,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -1606,7 +1606,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -1665,7 +1665,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -1681,7 +1681,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -1740,7 +1740,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -1756,7 +1756,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -1815,7 +1815,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -1831,7 +1831,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -1890,7 +1890,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -1906,7 +1906,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -2002,7 +2002,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 21, "end_line": 21, - "column": 36, + "column": 43, "end_column": 63 }, "wtype": { @@ -2422,7 +2422,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 8, "end_line": 8, - "column": 13, + "column": 21, "end_column": 26 }, "wtype": { @@ -2457,7 +2457,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -2473,7 +2473,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -2532,7 +2532,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -2548,7 +2548,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -2607,7 +2607,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 39, "end_column": 44 }, "wtype": { @@ -2623,7 +2623,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -2639,7 +2639,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -2699,7 +2699,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -2715,7 +2715,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -2774,7 +2774,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -2790,7 +2790,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -2849,7 +2849,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -2865,7 +2865,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -2924,7 +2924,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -2940,7 +2940,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -2999,7 +2999,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -3015,7 +3015,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -3074,7 +3074,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -3090,7 +3090,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -3149,7 +3149,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -3165,7 +3165,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -3224,7 +3224,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -3240,7 +3240,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -3299,7 +3299,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -3315,7 +3315,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -3411,7 +3411,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 21, "end_line": 21, - "column": 36, + "column": 43, "end_column": 63 }, "wtype": { @@ -3831,7 +3831,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 8, "end_line": 8, - "column": 13, + "column": 21, "end_column": 26 }, "wtype": { @@ -3866,7 +3866,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -3882,7 +3882,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -3941,7 +3941,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -3957,7 +3957,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -4016,7 +4016,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 39, "end_column": 44 }, "wtype": { @@ -4032,7 +4032,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -4048,7 +4048,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -4108,7 +4108,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -4124,7 +4124,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -4183,7 +4183,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -4199,7 +4199,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -4258,7 +4258,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -4274,7 +4274,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -4333,7 +4333,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -4349,7 +4349,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -4408,7 +4408,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -4424,7 +4424,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -4483,7 +4483,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -4499,7 +4499,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -4558,7 +4558,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -4574,7 +4574,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -4633,7 +4633,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -4649,7 +4649,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -4708,7 +4708,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -4724,7 +4724,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -4820,7 +4820,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 21, "end_line": 21, - "column": 36, + "column": 43, "end_column": 63 }, "wtype": { @@ -5240,7 +5240,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 8, "end_line": 8, - "column": 13, + "column": 21, "end_column": 26 }, "wtype": { @@ -5275,7 +5275,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -5291,7 +5291,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -5350,7 +5350,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -5366,7 +5366,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -5425,7 +5425,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 39, "end_column": 44 }, "wtype": { @@ -5441,7 +5441,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -5457,7 +5457,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -5517,7 +5517,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -5533,7 +5533,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -5592,7 +5592,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -5608,7 +5608,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -5667,7 +5667,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -5683,7 +5683,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -5742,7 +5742,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -5758,7 +5758,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -5817,7 +5817,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -5833,7 +5833,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -5892,7 +5892,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -5908,7 +5908,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -5967,7 +5967,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -5983,7 +5983,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -6042,7 +6042,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -6058,7 +6058,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -6117,7 +6117,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -6133,7 +6133,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -6229,7 +6229,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 21, "end_line": 21, - "column": 36, + "column": 43, "end_column": 63 }, "wtype": { @@ -6649,7 +6649,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 8, "end_line": 8, - "column": 13, + "column": 21, "end_column": 26 }, "wtype": { @@ -6684,7 +6684,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -6700,7 +6700,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -6759,7 +6759,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -6775,7 +6775,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -6834,7 +6834,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 39, "end_column": 44 }, "wtype": { @@ -6850,7 +6850,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -6866,7 +6866,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -6926,7 +6926,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -6942,7 +6942,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -7001,7 +7001,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -7017,7 +7017,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -7076,7 +7076,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -7092,7 +7092,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -7151,7 +7151,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -7167,7 +7167,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -7226,7 +7226,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -7242,7 +7242,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -7301,7 +7301,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -7317,7 +7317,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -7376,7 +7376,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -7392,7 +7392,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -7451,7 +7451,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -7467,7 +7467,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -7526,7 +7526,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -7542,7 +7542,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -7638,7 +7638,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 21, "end_line": 21, - "column": 36, + "column": 43, "end_column": 63 }, "wtype": { @@ -8058,7 +8058,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 8, "end_line": 8, - "column": 13, + "column": 21, "end_column": 26 }, "wtype": { @@ -8093,7 +8093,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -8109,7 +8109,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -8168,7 +8168,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -8184,7 +8184,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -8243,7 +8243,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 39, "end_column": 44 }, "wtype": { @@ -8259,7 +8259,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -8275,7 +8275,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -8335,7 +8335,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -8351,7 +8351,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -8410,7 +8410,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -8426,7 +8426,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -8485,7 +8485,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -8501,7 +8501,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -8560,7 +8560,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -8576,7 +8576,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -8635,7 +8635,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -8651,7 +8651,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -8710,7 +8710,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -8726,7 +8726,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -8785,7 +8785,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -8801,7 +8801,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -8860,7 +8860,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -8876,7 +8876,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -8935,7 +8935,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -8951,7 +8951,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -9047,7 +9047,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 21, "end_line": 21, - "column": 36, + "column": 43, "end_column": 63 }, "wtype": { @@ -9467,7 +9467,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 8, "end_line": 8, - "column": 13, + "column": 21, "end_column": 26 }, "wtype": { @@ -9502,7 +9502,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -9518,7 +9518,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -9577,7 +9577,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -9593,7 +9593,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -9652,7 +9652,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 39, "end_column": 44 }, "wtype": { @@ -9668,7 +9668,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -9684,7 +9684,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -9744,7 +9744,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -9760,7 +9760,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -9819,7 +9819,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -9835,7 +9835,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -9894,7 +9894,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -9910,7 +9910,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -9969,7 +9969,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -9985,7 +9985,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -10044,7 +10044,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -10060,7 +10060,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -10119,7 +10119,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -10135,7 +10135,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -10194,7 +10194,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -10210,7 +10210,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -10269,7 +10269,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -10285,7 +10285,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -10344,7 +10344,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -10360,7 +10360,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -10456,7 +10456,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 21, "end_line": 21, - "column": 36, + "column": 43, "end_column": 63 }, "wtype": { @@ -10876,7 +10876,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 8, "end_line": 8, - "column": 13, + "column": 21, "end_column": 26 }, "wtype": { @@ -10911,7 +10911,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -10927,7 +10927,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -10986,7 +10986,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -11002,7 +11002,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -11061,7 +11061,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 39, "end_column": 44 }, "wtype": { @@ -11077,7 +11077,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -11093,7 +11093,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -11153,7 +11153,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -11169,7 +11169,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -11228,7 +11228,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -11244,7 +11244,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -11303,7 +11303,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -11319,7 +11319,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -11378,7 +11378,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -11394,7 +11394,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -11453,7 +11453,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -11469,7 +11469,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -11528,7 +11528,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -11544,7 +11544,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -11603,7 +11603,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -11619,7 +11619,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -11678,7 +11678,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -11694,7 +11694,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -11753,7 +11753,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -11769,7 +11769,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -11865,7 +11865,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 21, "end_line": 21, - "column": 36, + "column": 43, "end_column": 63 }, "wtype": { @@ -12285,7 +12285,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 8, "end_line": 8, - "column": 13, + "column": 21, "end_column": 26 }, "wtype": { @@ -12320,7 +12320,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -12336,7 +12336,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -12395,7 +12395,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -12411,7 +12411,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -12470,7 +12470,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 39, "end_column": 44 }, "wtype": { @@ -12486,7 +12486,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -12502,7 +12502,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -12562,7 +12562,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -12578,7 +12578,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -12637,7 +12637,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -12653,7 +12653,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -12712,7 +12712,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -12728,7 +12728,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -12787,7 +12787,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -12803,7 +12803,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -12862,7 +12862,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -12878,7 +12878,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -12937,7 +12937,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -12953,7 +12953,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -13012,7 +13012,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -13028,7 +13028,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -13087,7 +13087,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -13103,7 +13103,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -13162,7 +13162,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -13178,7 +13178,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -13274,7 +13274,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 21, "end_line": 21, - "column": 36, + "column": 43, "end_column": 63 }, "wtype": { @@ -13694,7 +13694,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 8, "end_line": 8, - "column": 13, + "column": 21, "end_column": 26 }, "wtype": { @@ -13729,7 +13729,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -13745,7 +13745,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -13804,7 +13804,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -13820,7 +13820,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -13879,7 +13879,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 39, "end_column": 44 }, "wtype": { @@ -13895,7 +13895,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -13911,7 +13911,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -13971,7 +13971,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -13987,7 +13987,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -14046,7 +14046,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -14062,7 +14062,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -14121,7 +14121,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -14137,7 +14137,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -14196,7 +14196,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -14212,7 +14212,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -14271,7 +14271,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -14287,7 +14287,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -14346,7 +14346,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -14362,7 +14362,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -14421,7 +14421,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -14437,7 +14437,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -14496,7 +14496,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -14512,7 +14512,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -14571,7 +14571,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -14587,7 +14587,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -14683,7 +14683,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 21, "end_line": 21, - "column": 36, + "column": 43, "end_column": 63 }, "wtype": { @@ -15103,7 +15103,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 8, "end_line": 8, - "column": 13, + "column": 21, "end_column": 26 }, "wtype": { @@ -15138,7 +15138,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -15154,7 +15154,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -15213,7 +15213,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -15229,7 +15229,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -15288,7 +15288,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 39, "end_column": 44 }, "wtype": { @@ -15304,7 +15304,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -15320,7 +15320,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -15380,7 +15380,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -15396,7 +15396,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -15455,7 +15455,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -15471,7 +15471,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -15530,7 +15530,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -15546,7 +15546,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -15605,7 +15605,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -15621,7 +15621,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -15680,7 +15680,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -15696,7 +15696,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -15755,7 +15755,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -15771,7 +15771,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -15830,7 +15830,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -15846,7 +15846,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -15905,7 +15905,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -15921,7 +15921,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -15980,7 +15980,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -15996,7 +15996,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -16092,7 +16092,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 21, "end_line": 21, - "column": 36, + "column": 43, "end_column": 63 }, "wtype": { @@ -16512,7 +16512,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 8, "end_line": 8, - "column": 13, + "column": 21, "end_column": 26 }, "wtype": { @@ -16547,7 +16547,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -16563,7 +16563,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -16622,7 +16622,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -16638,7 +16638,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -16697,7 +16697,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 39, "end_column": 44 }, "wtype": { @@ -16713,7 +16713,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -16729,7 +16729,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -16789,7 +16789,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -16805,7 +16805,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -16864,7 +16864,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -16880,7 +16880,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -16939,7 +16939,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -16955,7 +16955,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -17014,7 +17014,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -17030,7 +17030,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -17089,7 +17089,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -17105,7 +17105,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -17164,7 +17164,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -17180,7 +17180,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -17239,7 +17239,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -17255,7 +17255,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -17314,7 +17314,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -17330,7 +17330,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -17389,7 +17389,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -17405,7 +17405,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -17501,7 +17501,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 21, "end_line": 21, - "column": 36, + "column": 43, "end_column": 63 }, "wtype": { @@ -17921,7 +17921,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 8, "end_line": 8, - "column": 13, + "column": 21, "end_column": 26 }, "wtype": { @@ -17956,7 +17956,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -17972,7 +17972,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -18031,7 +18031,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -18047,7 +18047,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -18106,7 +18106,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 39, "end_column": 44 }, "wtype": { @@ -18122,7 +18122,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -18138,7 +18138,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -18198,7 +18198,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -18214,7 +18214,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -18273,7 +18273,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -18289,7 +18289,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -18348,7 +18348,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -18364,7 +18364,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -18423,7 +18423,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -18439,7 +18439,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -18498,7 +18498,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -18514,7 +18514,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -18573,7 +18573,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -18589,7 +18589,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -18648,7 +18648,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -18664,7 +18664,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -18723,7 +18723,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -18739,7 +18739,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -18798,7 +18798,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -18814,7 +18814,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -18910,7 +18910,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 21, "end_line": 21, - "column": 36, + "column": 43, "end_column": 63 }, "wtype": { @@ -19330,7 +19330,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 8, "end_line": 8, - "column": 13, + "column": 21, "end_column": 26 }, "wtype": { @@ -19365,7 +19365,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -19381,7 +19381,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -19440,7 +19440,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -19456,7 +19456,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -19515,7 +19515,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 39, "end_column": 44 }, "wtype": { @@ -19531,7 +19531,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -19547,7 +19547,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -19607,7 +19607,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -19623,7 +19623,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -19682,7 +19682,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -19698,7 +19698,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -19757,7 +19757,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -19773,7 +19773,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -19832,7 +19832,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -19848,7 +19848,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -19907,7 +19907,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -19923,7 +19923,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -19982,7 +19982,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -19998,7 +19998,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -20057,7 +20057,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -20073,7 +20073,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -20132,7 +20132,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -20148,7 +20148,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -20207,7 +20207,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -20223,7 +20223,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -20319,7 +20319,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 21, "end_line": 21, - "column": 36, + "column": 43, "end_column": 63 }, "wtype": { @@ -20739,7 +20739,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 8, "end_line": 8, - "column": 13, + "column": 21, "end_column": 26 }, "wtype": { @@ -20774,7 +20774,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -20790,7 +20790,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 9, "end_line": 9, - "column": 15, + "column": 23, "end_column": 30 }, "wtype": { @@ -20849,7 +20849,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -20865,7 +20865,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 10, "end_line": 10, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -20924,7 +20924,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 39, "end_column": 44 }, "wtype": { @@ -20940,7 +20940,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -20956,7 +20956,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 11, "end_line": 11, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -21016,7 +21016,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -21032,7 +21032,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 12, "end_line": 12, - "column": 20, + "column": 28, "end_column": 40 }, "wtype": { @@ -21091,7 +21091,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -21107,7 +21107,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 13, "end_line": 13, - "column": 25, + "column": 33, "end_column": 50 }, "wtype": { @@ -21166,7 +21166,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -21182,7 +21182,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 14, "end_line": 14, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -21241,7 +21241,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -21257,7 +21257,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 15, "end_line": 15, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -21316,7 +21316,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -21332,7 +21332,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 16, "end_line": 16, - "column": 24, + "column": 32, "end_column": 48 }, "wtype": { @@ -21391,7 +21391,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -21407,7 +21407,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 17, "end_line": 17, - "column": 26, + "column": 34, "end_column": 52 }, "wtype": { @@ -21466,7 +21466,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -21482,7 +21482,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 18, "end_line": 18, - "column": 19, + "column": 27, "end_column": 38 }, "wtype": { @@ -21541,7 +21541,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -21557,7 +21557,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 19, "end_line": 19, - "column": 18, + "column": 26, "end_column": 36 }, "wtype": { @@ -21616,7 +21616,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -21632,7 +21632,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 20, "end_line": 20, - "column": 21, + "column": 29, "end_column": 42 }, "wtype": { @@ -21728,7 +21728,7 @@ "file": "tests/approvals/accounts.algo.ts", "line": 21, "end_line": 21, - "column": 36, + "column": 43, "end_column": 63 }, "wtype": { diff --git a/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst.json b/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst.json index c87810f4..45e51cbc 100644 --- a/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst.json +++ b/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst.json @@ -523,7 +523,7 @@ "file": "tests/approvals/arc4-encode-decode.algo.ts", "line": 9, "end_line": 9, - "column": 29, + "column": 44, "end_column": 49 }, "wtype": { @@ -690,7 +690,7 @@ "file": "tests/approvals/arc4-encode-decode.algo.ts", "line": 10, "end_line": 10, - "column": 29, + "column": 41, "end_column": 46 }, "wtype": { @@ -857,7 +857,7 @@ "file": "tests/approvals/arc4-encode-decode.algo.ts", "line": 11, "end_line": 11, - "column": 29, + "column": 47, "end_column": 52 }, "wtype": { @@ -1041,7 +1041,7 @@ "file": "tests/approvals/arc4-encode-decode.algo.ts", "line": 12, "end_line": 12, - "column": 29, + "column": 49, "end_column": 54 }, "wtype": { @@ -1241,7 +1241,7 @@ "file": "tests/approvals/arc4-encode-decode.algo.ts", "line": 13, "end_line": 13, - "column": 29, + "column": 40, "end_column": 45 }, "wtype": { @@ -1528,7 +1528,7 @@ "file": "tests/approvals/arc4-encode-decode.algo.ts", "line": 14, "end_line": 14, - "column": 39, + "column": 101, "end_column": 106 }, "wtype": { diff --git a/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.approval.teal b/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.approval.teal deleted file mode 100644 index a9ebcac6..00000000 --- a/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.approval.teal +++ /dev/null @@ -1,396 +0,0 @@ -#pragma version 10 - -tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.approvalProgram: - intcblock 0 1 8 64 - bytecblock 0x00 0x - txn ApplicationID - bnz main_after_if_else@2 - callsub constructor - -main_after_if_else@2: - callsub __puya_arc4_router__ - return - - -// tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.constructor() -> void: -constructor: - // tests/approvals/arc4-encoded-decode.algo.ts:7 - // export class Arc4EncodedDecode extends Contract { - proto 0 0 - retsub - - -// tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.__puya_arc4_router__() -> uint64: -__puya_arc4_router__: - // tests/approvals/arc4-encoded-decode.algo.ts:7 - // export class Arc4EncodedDecode extends Contract { - proto 0 1 - txn NumAppArgs - intc_0 // 0 - != - bz __puya_arc4_router___bare_routing@6 - txna ApplicationArgs 0 - pushbytes 0x9be85afa // method "testEncoding(uint64,bool,uint512,byte[],string)void" - pushbytes 0xa2d335ac // method "testDecoding(uint64,byte[],bool,byte[],uint512,byte[],string,byte[],(uint64,byte[]),byte[])void" - uncover 2 - match __puya_arc4_router___testEncoding_route@2 __puya_arc4_router___testDecoding_route@3 - b __puya_arc4_router___switch_case_default@4 - -__puya_arc4_router___testEncoding_route@2: - // tests/approvals/arc4-encoded-decode.algo.ts:8 - // testEncoding(a: uint64, b: boolean, c: biguint, d: bytes, e: string) { - txn OnCompletion - intc_0 // NoOp - == - assert // OnCompletion is not NoOp - txn ApplicationID - intc_0 // 0 - != - assert // can only call when not creating - // tests/approvals/arc4-encoded-decode.algo.ts:7 - // export class Arc4EncodedDecode extends Contract { - txna ApplicationArgs 1 - btoi - txna ApplicationArgs 2 - intc_0 // 0 - getbit - txna ApplicationArgs 3 - txna ApplicationArgs 4 - extract 2 0 - txna ApplicationArgs 5 - extract 2 0 - // tests/approvals/arc4-encoded-decode.algo.ts:8 - // testEncoding(a: uint64, b: boolean, c: biguint, d: bytes, e: string) { - uncover 4 - uncover 4 - uncover 4 - uncover 4 - uncover 4 - callsub testEncoding - intc_1 // 1 - retsub - -__puya_arc4_router___testDecoding_route@3: - // tests/approvals/arc4-encoded-decode.algo.ts:17-28 - // testDecoding( - // a: uint64, - // a_bytes: bytes, - // b: boolean, - // b_bytes: bytes, - // c: biguint, - // c_bytes: bytes, - // d: string, - // d_bytes: bytes, - // e: TestObj, - // e_bytes: bytes, - // ) { - txn OnCompletion - intc_0 // NoOp - == - assert // OnCompletion is not NoOp - txn ApplicationID - intc_0 // 0 - != - assert // can only call when not creating - // tests/approvals/arc4-encoded-decode.algo.ts:7 - // export class Arc4EncodedDecode extends Contract { - txna ApplicationArgs 1 - btoi - txna ApplicationArgs 2 - extract 2 0 - txna ApplicationArgs 3 - intc_0 // 0 - getbit - txna ApplicationArgs 4 - extract 2 0 - txna ApplicationArgs 5 - txna ApplicationArgs 6 - extract 2 0 - txna ApplicationArgs 7 - extract 2 0 - txna ApplicationArgs 8 - extract 2 0 - txna ApplicationArgs 9 - dup - intc_0 // 0 - intc_2 // 8 - extract3 // on error: Index access is out of bounds - swap - dup - intc_2 // 8 - extract_uint16 - swap - dup - len - swap - uncover 2 - uncover 2 - substring3 - txna ApplicationArgs 10 - extract 2 0 - // tests/approvals/arc4-encoded-decode.algo.ts:17-28 - // testDecoding( - // a: uint64, - // a_bytes: bytes, - // b: boolean, - // b_bytes: bytes, - // c: biguint, - // c_bytes: bytes, - // d: string, - // d_bytes: bytes, - // e: TestObj, - // e_bytes: bytes, - // ) { - uncover 10 - uncover 10 - uncover 10 - uncover 10 - uncover 10 - uncover 10 - uncover 10 - uncover 10 - uncover 10 - uncover 10 - uncover 10 - callsub testDecoding - intc_1 // 1 - retsub - -__puya_arc4_router___switch_case_default@4: - b __puya_arc4_router___after_if_else@10 - -__puya_arc4_router___bare_routing@6: - // tests/approvals/arc4-encoded-decode.algo.ts:7 - // export class Arc4EncodedDecode extends Contract { - txn OnCompletion - intc_0 // 0 - swap - match __puya_arc4_router_____algots__.defaultCreate@7 - b __puya_arc4_router___switch_case_default@8 - -__puya_arc4_router_____algots__.defaultCreate@7: - // tests/approvals/arc4-encoded-decode.algo.ts:7 - // export class Arc4EncodedDecode extends Contract { - txn ApplicationID - intc_0 // 0 - == - assert // can only call when creating - callsub __algots__.defaultCreate - intc_1 // 1 - retsub - -__puya_arc4_router___switch_case_default@8: - -__puya_arc4_router___after_if_else@10: - // tests/approvals/arc4-encoded-decode.algo.ts:7 - // export class Arc4EncodedDecode extends Contract { - intc_0 // 0 - retsub - - -// tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.testEncoding(a: uint64, b: uint64, c: bytes, d: bytes, e: bytes) -> void: -testEncoding: - // tests/approvals/arc4-encoded-decode.algo.ts:8 - // testEncoding(a: uint64, b: boolean, c: biguint, d: bytes, e: string) { - proto 5 0 - // tests/approvals/arc4-encoded-decode.algo.ts:9 - // assert(encodeArc4(a) === new UintN64(a).bytes) - frame_dig -5 - itob - frame_dig -5 - itob - == - assert - // tests/approvals/arc4-encoded-decode.algo.ts:10 - // assert(encodeArc4(b) === new Bool(b).bytes) - bytec_0 // 0x00 - intc_0 // 0 - frame_dig -4 - setbit - bytec_0 // 0x00 - intc_0 // 0 - frame_dig -4 - setbit - == - assert - // tests/approvals/arc4-encoded-decode.algo.ts:11 - // assert(encodeArc4(c) === new UintN<512>(c).bytes) - frame_dig -3 - len - intc_3 // 64 - <= - assert // overflow - intc_3 // 64 - bzero - frame_dig -3 - b| - frame_dig -3 - len - intc_3 // 64 - <= - assert // overflow - intc_3 // 64 - bzero - frame_dig -3 - b| - == - assert - // tests/approvals/arc4-encoded-decode.algo.ts:12 - // assert(encodeArc4(d) === new DynamicBytes(d).bytes) - frame_dig -2 - len - itob - extract 6 2 - frame_dig -2 - concat - frame_dig -2 - len - itob - extract 6 2 - frame_dig -2 - concat - == - assert - // tests/approvals/arc4-encoded-decode.algo.ts:13 - // assert(encodeArc4(e) === new Str(e).bytes) - frame_dig -1 - len - itob - extract 6 2 - frame_dig -1 - concat - frame_dig -1 - len - itob - extract 6 2 - frame_dig -1 - concat - == - assert - // tests/approvals/arc4-encoded-decode.algo.ts:14 - // assert(encodeArc4({ a, b: d }) === new TestStruct({ a: new UintN64(a), b: new DynamicBytes(d) }).bytes) - frame_dig -5 - itob - frame_dig -2 - len - itob - extract 6 2 - frame_dig -2 - concat - swap - bytec_1 // 0x - swap - concat - pushint 10 // 10 - itob - extract 6 2 - concat - swap - concat - frame_dig -5 - itob - frame_dig -2 - len - itob - extract 6 2 - frame_dig -2 - concat - swap - bytec_1 // 0x - swap - concat - pushint 10 // 10 - itob - extract 6 2 - concat - swap - concat - == - assert - retsub - - -// tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.testDecoding(a: uint64, a_bytes: bytes, b: uint64, b_bytes: bytes, c: bytes, c_bytes: bytes, d: bytes, d_bytes: bytes, e.a: bytes, e.b: bytes, e_bytes: bytes) -> void: -testDecoding: - // tests/approvals/arc4-encoded-decode.algo.ts:17-28 - // testDecoding( - // a: uint64, - // a_bytes: bytes, - // b: boolean, - // b_bytes: bytes, - // c: biguint, - // c_bytes: bytes, - // d: string, - // d_bytes: bytes, - // e: TestObj, - // e_bytes: bytes, - // ) { - proto 11 0 - // tests/approvals/arc4-encoded-decode.algo.ts:29 - // assert(decodeArc4(a_bytes) === a) - frame_dig -10 - btoi - frame_dig -11 - == - assert - // tests/approvals/arc4-encoded-decode.algo.ts:30 - // assert(decodeArc4(b_bytes) === b) - frame_dig -8 - intc_0 // 0 - getbit - frame_dig -9 - == - assert - // tests/approvals/arc4-encoded-decode.algo.ts:31 - // assert(decodeArc4(c_bytes) === c) - frame_dig -6 - frame_dig -7 - b== - assert - // tests/approvals/arc4-encoded-decode.algo.ts:32 - // assert(decodeArc4(d_bytes) === d) - frame_dig -4 - extract 2 0 - frame_dig -5 - == - assert - // tests/approvals/arc4-encoded-decode.algo.ts:34 - // assertMatch(decodeArc4(e_bytes), e) - frame_dig -1 - intc_0 // 0 - intc_2 // 8 - extract3 // on error: Index access is out of bounds - frame_dig -3 - == - bz testDecoding_bool_false@3 - frame_dig -1 - intc_2 // 8 - extract_uint16 - frame_dig -1 - len - frame_dig -1 - uncover 2 - uncover 2 - substring3 - frame_dig -2 - == - bz testDecoding_bool_false@3 - intc_1 // 1 - b testDecoding_bool_merge@4 - -testDecoding_bool_false@3: - intc_0 // 0 - -testDecoding_bool_merge@4: - // tests/approvals/arc4-encoded-decode.algo.ts:34 - // assertMatch(decodeArc4(e_bytes), e) - assert // assert target is match for conditions - retsub - - -// tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.__algots__.defaultCreate() -> void: -__algots__.defaultCreate: - // tests/approvals/arc4-encoded-decode.algo.ts:7 - // export class Arc4EncodedDecode extends Contract { - proto 0 0 - retsub diff --git a/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.arc32.json b/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.arc32.json deleted file mode 100644 index 6a6b68c5..00000000 --- a/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.arc32.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "hints": { - "testEncoding(uint64,bool,uint512,byte[],string)void": { - "call_config": { - "no_op": "CALL" - } - }, - "testDecoding(uint64,byte[],bool,byte[],uint512,byte[],string,byte[],(uint64,byte[]),byte[])void": { - "call_config": { - "no_op": "CALL" - }, - "structs": { - "e": { - "name": "TestObj", - "elements": [ - [ - "a", - "uint64" - ], - [ - "b", - "byte[]" - ] - ] - } - } - } - }, - "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGVkLWRlY29kZS5hbGdvLnRzOjpBcmM0RW5jb2RlZERlY29kZS5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxIDggNjQKICAgIGJ5dGVjYmxvY2sgMHgwMCAweAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMgogICAgY2FsbHN1YiBjb25zdHJ1Y3RvcgoKbWFpbl9hZnRlcl9pZl9lbHNlQDI6CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGVkLWRlY29kZS5hbGdvLnRzOjpBcmM0RW5jb2RlZERlY29kZS5jb25zdHJ1Y3RvcigpIC0+IHZvaWQ6CmNvbnN0cnVjdG9yOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtZW5jb2RlZC1kZWNvZGUuYWxnby50czo3CiAgICAvLyBleHBvcnQgY2xhc3MgQXJjNEVuY29kZWREZWNvZGUgZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9hcmM0LWVuY29kZWQtZGVjb2RlLmFsZ28udHM6OkFyYzRFbmNvZGVkRGVjb2RlLl9fcHV5YV9hcmM0X3JvdXRlcl9fKCkgLT4gdWludDY0OgpfX3B1eWFfYXJjNF9yb3V0ZXJfXzoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9h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gYnogdGVzdERlY29kaW5nX2Jvb2xfZmFsc2VAMwogICAgaW50Y18xIC8vIDEKICAgIGIgdGVzdERlY29kaW5nX2Jvb2xfbWVyZ2VANAoKdGVzdERlY29kaW5nX2Jvb2xfZmFsc2VAMzoKICAgIGludGNfMCAvLyAwCgp0ZXN0RGVjb2RpbmdfYm9vbF9tZXJnZUA0OgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzQtZW5jb2RlZC1kZWNvZGUuYWxnby50czozNAogICAgLy8gYXNzZXJ0TWF0Y2goZGVjb2RlQXJjNDxUZXN0T2JqPihlX2J5dGVzKSwgZSkKICAgIGFzc2VydCAvLyBhc3NlcnQgdGFyZ2V0IGlzIG1hdGNoIGZvciBjb25kaXRpb25zCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGVkLWRlY29kZS5hbGdvLnRzOjpBcmM0RW5jb2RlZERlY29kZS5fX2FsZ290c19fLmRlZmF1bHRDcmVhdGUoKSAtPiB2b2lkOgpfX2FsZ290c19fLmRlZmF1bHRDcmVhdGU6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGVkLWRlY29kZS5hbGdvLnRzOjcKICAgIC8vIGV4cG9ydCBjbGFzcyBBcmM0RW5jb2RlZERlY29kZSBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", - "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGVkLWRlY29kZS5hbGdvLnRzOjpBcmM0RW5jb2RlZERlY29kZS5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" - }, - "state": { - "global": { - "num_byte_slices": 0, - "num_uints": 0 - }, - "local": { - "num_byte_slices": 0, - "num_uints": 0 - } - }, - "schema": { - "global": { - "declared": {}, - "reserved": {} - }, - "local": { - "declared": {}, - "reserved": {} - } - }, - "contract": { - "name": "Arc4EncodedDecode", - "methods": [ - { - "name": "testEncoding", - "args": [ - { - "type": "uint64", - "name": "a" - }, - { - "type": "bool", - "name": "b" - }, - { - "type": "uint512", - "name": "c" - }, - { - "type": "byte[]", - "name": "d" - }, - { - "type": "string", - "name": "e" - } - ], - "readonly": false, - "returns": { - "type": "void" - } - }, - { - "name": "testDecoding", - "args": [ - { - "type": "uint64", - "name": "a" - }, - { - "type": "byte[]", - "name": "a_bytes" - }, - { - "type": "bool", - "name": "b" - }, - { - "type": "byte[]", - "name": "b_bytes" - }, - { - "type": "uint512", - "name": "c" - }, - { - "type": "byte[]", - "name": "c_bytes" - }, - { - "type": "string", - "name": "d" - }, - { - "type": "byte[]", - "name": "d_bytes" - }, - { - "type": "(uint64,byte[])", - "name": "e" - }, - { - "type": "byte[]", - "name": "e_bytes" - } - ], - "readonly": false, - "returns": { - "type": "void" - } - } - ], - "networks": {} - }, - "bare_call_config": { - "no_op": "CREATE" - } -} \ No newline at end of file diff --git a/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.arc56.json b/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.arc56.json deleted file mode 100644 index 7f37fe59..00000000 --- a/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.arc56.json +++ /dev/null @@ -1,202 +0,0 @@ -{ - "name": "Arc4EncodedDecode", - "structs": { - "TestObj": [ - { - "name": "a", - "type": "uint64" - }, - { - "name": "b", - "type": "byte[]" - } - ] - }, - "methods": [ - { - "name": "testEncoding", - "args": [ - { - "type": "uint64", - "name": "a" - }, - { - "type": "bool", - "name": "b" - }, - { - "type": "uint512", - "name": "c" - }, - { - "type": "byte[]", - "name": "d" - }, - { - "type": "string", - "name": "e" - } - ], - "returns": { - "type": "void" - }, - "actions": { - "create": [], - "call": [ - "NoOp" - ] - }, - "readonly": false, - "events": [], - "recommendations": {} - }, - { - "name": "testDecoding", - "args": [ - { - "type": "uint64", - "name": "a" - }, - { - "type": "byte[]", - "name": "a_bytes" - }, - { - "type": "bool", - "name": "b" - }, - { - "type": "byte[]", - "name": "b_bytes" - }, - { - "type": "uint512", - "name": "c" - }, - { - "type": "byte[]", - "name": "c_bytes" - }, - { - "type": "string", - "name": "d" - }, - { - "type": "byte[]", - "name": "d_bytes" - }, - { - "type": "(uint64,byte[])", - "struct": "TestObj", - "name": "e" - }, - { - "type": "byte[]", - "name": "e_bytes" - } - ], - "returns": { - "type": "void" - }, - "actions": { - "create": [], - "call": [ - "NoOp" - ] - }, - "readonly": false, - "events": [], - "recommendations": {} - } - ], - "arcs": [ - 22, - 28 - ], - "networks": {}, - "state": { - "schema": { - "global": { - "ints": 0, - "bytes": 0 - }, - "local": { - "ints": 0, - "bytes": 0 - } - }, - "keys": { - "global": {}, - "local": {}, - "box": {} - }, - "maps": { - "global": {}, - "local": {}, - "box": {} - } - }, - "bareActions": { - "create": [ - "NoOp" - ], - "call": [] - }, - "sourceInfo": { - "approval": { - "sourceInfo": [ - { - "pc": [ - 171, - 427 - ], - "errorMessage": "Index access is out of bounds" - }, - { - "pc": [ - 68, - 117 - ], - "errorMessage": "OnCompletion is not NoOp" - }, - { - "pc": [ - 459 - ], - "errorMessage": "assert target is match for conditions" - }, - { - "pc": [ - 236 - ], - "errorMessage": "can only call when creating" - }, - { - "pc": [ - 73, - 122 - ], - "errorMessage": "can only call when not creating" - }, - { - "pc": [ - 272, - 283 - ], - "errorMessage": "overflow" - } - ], - "pcOffsetMethod": "none" - }, - "clear": { - "sourceInfo": [], - "pcOffsetMethod": "none" - } - }, - "source": { - "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGVkLWRlY29kZS5hbGdvLnRzOjpBcmM0RW5jb2RlZERlY29kZS5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxIDggNjQKICAgIGJ5dGVjYmxvY2sgMHgwMCAweAogICAgdHhuIEF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IG1hdGNoIGZvciBjb25kaXRpb25zCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGVkLWRlY29kZS5hbGdvLnRzOjpBcmM0RW5jb2RlZERlY29kZS5fX2FsZ290c19fLmRlZmF1bHRDcmVhdGUoKSAtPiB2b2lkOgpfX2FsZ290c19fLmRlZmF1bHRDcmVhdGU6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGVkLWRlY29kZS5hbGdvLnRzOjcKICAgIC8vIGV4cG9ydCBjbGFzcyBBcmM0RW5jb2RlZERlY29kZSBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", - "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjNC1lbmNvZGVkLWRlY29kZS5hbGdvLnRzOjpBcmM0RW5jb2RlZERlY29kZS5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" - }, - "events": [], - "templateVariables": {} -} \ No newline at end of file diff --git a/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.clear.teal b/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.clear.teal deleted file mode 100644 index a1e868df..00000000 --- a/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.clear.teal +++ /dev/null @@ -1,5 +0,0 @@ -#pragma version 10 - -tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.clearStateProgram: - pushint 1 // 1 - return diff --git a/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.ssa.ir b/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.ssa.ir deleted file mode 100644 index 5a77bd80..00000000 --- a/tests/approvals/out/arc4-encoded-decode/Arc4EncodedDecode.ssa.ir +++ /dev/null @@ -1,218 +0,0 @@ -contract tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode: - program approval: - subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: - block@0: // L1 - let reinterpret_bool%0#0: bool = (txn ApplicationID) - goto reinterpret_bool%0#0 ? block@2 : block@1 - block@1: // if_body_L1 - tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.constructor() - goto block@2 - block@2: // after_if_else_L1 - let tmp%0#0: bool = tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.__puya_arc4_router__() - return tmp%0#0 - - subroutine tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.constructor() -> void: - block@0: // L7 - return - - subroutine tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.__puya_arc4_router__() -> bool: - block@0: // L7 - let tmp%0#0: uint64 = (txn NumAppArgs) - let tmp%1#0: bool = (!= tmp%0#0 0u) - goto tmp%1#0 ? block@1 : block@6 - block@1: // abi_routing_L7 - let tmp%2#0: bytes = (txna ApplicationArgs 0) - switch tmp%2#0 {method "testEncoding(uint64,bool,uint512,byte[],string)void" => block@2, method "testDecoding(uint64,byte[],bool,byte[],uint512,byte[],string,byte[],(uint64,byte[]),byte[])void" => block@3, * => block@4} - block@2: // testEncoding_route_L8 - let tmp%3#0: uint64 = (txn OnCompletion) - let tmp%4#0: bool = (== tmp%3#0 NoOp) - (assert tmp%4#0) // OnCompletion is not NoOp - let tmp%5#0: uint64 = (txn ApplicationID) - let tmp%6#0: bool = (!= tmp%5#0 0u) - (assert tmp%6#0) // can only call when not creating - let tmp%7#0: bytes = (txna ApplicationArgs 1) - let tmp%8#0: uint64 = (btoi tmp%7#0) - let tmp%9#0: bytes = (txna ApplicationArgs 2) - let tmp%10#0: bool = (getbit tmp%9#0 0u) - let tmp%11#0: bytes = (txna ApplicationArgs 3) - let tmp%12#0: bytes = (txna ApplicationArgs 4) - let tmp%13#0: bytes = ((extract 2 0) tmp%12#0) - let tmp%14#0: bytes = (txna ApplicationArgs 5) - let tmp%15#0: bytes = ((extract 2 0) tmp%14#0) - tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.testEncoding(tmp%8#0, tmp%10#0, tmp%11#0, tmp%13#0, tmp%15#0) - return 1u - block@3: // testDecoding_route_L17 - let tmp%16#0: uint64 = (txn OnCompletion) - let tmp%17#0: bool = (== tmp%16#0 NoOp) - (assert tmp%17#0) // OnCompletion is not NoOp - let tmp%18#0: uint64 = (txn ApplicationID) - let tmp%19#0: bool = (!= tmp%18#0 0u) - (assert tmp%19#0) // can only call when not creating - let tmp%20#0: bytes = (txna ApplicationArgs 1) - let tmp%21#0: uint64 = (btoi tmp%20#0) - let tmp%22#0: bytes = (txna ApplicationArgs 2) - let tmp%23#0: bytes = ((extract 2 0) tmp%22#0) - let tmp%24#0: bytes = (txna ApplicationArgs 3) - let tmp%25#0: bool = (getbit tmp%24#0 0u) - let tmp%26#0: bytes = (txna ApplicationArgs 4) - let tmp%27#0: bytes = ((extract 2 0) tmp%26#0) - let tmp%28#0: bytes = (txna ApplicationArgs 5) - let tmp%29#0: bytes = (txna ApplicationArgs 6) - let tmp%30#0: bytes = ((extract 2 0) tmp%29#0) - let tmp%31#0: bytes = (txna ApplicationArgs 7) - let tmp%32#0: bytes = ((extract 2 0) tmp%31#0) - let tmp%33#0: bytes = (txna ApplicationArgs 8) - let tmp%34#0: bytes = ((extract 2 0) tmp%33#0) - let tmp%35#0: bytes = (txna ApplicationArgs 9) - let item0%0#0: bytes = (extract3 tmp%35#0 0u 8u) // on error: Index access is out of bounds - let item_start_offset%0#0: uint64 = (extract_uint16 tmp%35#0 8u) - let item_end_offset%0#0: uint64 = (len tmp%35#0) - let item1%0#0: bytes = (substring3 tmp%35#0 item_start_offset%0#0 item_end_offset%0#0) - let tmp%36#0: bytes = (txna ApplicationArgs 10) - let tmp%37#0: bytes = ((extract 2 0) tmp%36#0) - tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.testDecoding(tmp%21#0, tmp%23#0, tmp%25#0, tmp%27#0, tmp%28#0, tmp%30#0, tmp%32#0, tmp%34#0, item0%0#0, item1%0#0, tmp%37#0) - return 1u - block@4: // switch_case_default_L7 - goto block@5 - block@5: // switch_case_next_L7 - goto block@10 - block@6: // bare_routing_L7 - let tmp%38#0: uint64 = (txn OnCompletion) - switch tmp%38#0 {0u => block@7, * => block@8} - block@7: // __algots__.defaultCreate_L7 - let tmp%39#0: uint64 = (txn ApplicationID) - let tmp%40#0: bool = (== tmp%39#0 0u) - (assert tmp%40#0) // can only call when creating - tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.__algots__.defaultCreate() - return 1u - block@8: // switch_case_default_L7 - goto block@9 - block@9: // switch_case_next_L7 - goto block@10 - block@10: // after_if_else_L7 - return 0u - - subroutine tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.testEncoding(a: uint64, b: bool, c: biguint, d: bytes, e: bytes) -> void: - block@0: // L8 - let val_as_bytes%0#0: bytes = (itob a#0) - let val_as_bytes%1#0: bytes = (itob a#0) - let tmp%0#0: bool = (== val_as_bytes%0#0 val_as_bytes%1#0) - (assert tmp%0#0) - let encoded_bool%0#0: bytes = (setbit 0x00 0u b#0) - let encoded_bool%1#0: bytes = (setbit 0x00 0u b#0) - let tmp%1#0: bool = (== encoded_bool%0#0 encoded_bool%1#0) - (assert tmp%1#0) - let len_%0#0: uint64 = (len c#0) - let no_overflow%0#0: bool = (<= len_%0#0 64u) - (assert no_overflow%0#0) // overflow - let b_zeros%0#0: bytes = (bzero 64u) - let tmp%2#0: bytes = (b| c#0 b_zeros%0#0) - let len_%1#0: uint64 = (len c#0) - let no_overflow%1#0: bool = (<= len_%1#0 64u) - (assert no_overflow%1#0) // overflow - let b_zeros%1#0: bytes = (bzero 64u) - let tmp%3#0: bytes = (b| c#0 b_zeros%1#0) - let tmp%4#0: bool = (== tmp%2#0 tmp%3#0) - (assert tmp%4#0) - let length%0#0: uint64 = (len d#0) - let as_bytes%0#0: bytes = (itob length%0#0) - let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) - let encoded_value%0#0: bytes = (concat length_uint16%0#0 d#0) - let length%1#0: uint64 = (len d#0) - let as_bytes%1#0: bytes = (itob length%1#0) - let length_uint16%1#0: bytes = ((extract 6 2) as_bytes%1#0) - let encoded_value%1#0: bytes = (concat length_uint16%1#0 d#0) - let tmp%5#0: bool = (== encoded_value%0#0 encoded_value%1#0) - (assert tmp%5#0) - let length%2#0: uint64 = (len e#0) - let as_bytes%2#0: bytes = (itob length%2#0) - let length_uint16%2#0: bytes = ((extract 6 2) as_bytes%2#0) - let encoded_value%2#0: bytes = (concat length_uint16%2#0 e#0) - let length%3#0: uint64 = (len e#0) - let as_bytes%3#0: bytes = (itob length%3#0) - let length_uint16%3#0: bytes = ((extract 6 2) as_bytes%3#0) - let encoded_value%3#0: bytes = (concat length_uint16%3#0 e#0) - let tmp%6#0: bool = (== encoded_value%2#0 encoded_value%3#0) - (assert tmp%6#0) - let val_as_bytes%2#0: bytes = (itob a#0) - let length%4#0: uint64 = (len d#0) - let as_bytes%4#0: bytes = (itob length%4#0) - let length_uint16%4#0: bytes = ((extract 6 2) as_bytes%4#0) - let encoded_value%4#0: bytes = (concat length_uint16%4#0 d#0) - let current_tail_offset%0#0: uint64 = 10u - let encoded_tuple_buffer%0#0: bytes = 0x - let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 val_as_bytes%2#0) - let as_bytes%5#0: bytes = (itob current_tail_offset%0#0) - let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%5#0) - let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 offset_as_uint16%0#0) - let data_length%0#0: uint64 = (len encoded_value%4#0) - let current_tail_offset%1#0: uint64 = (+ current_tail_offset%0#0 data_length%0#0) - let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 encoded_value%4#0) - let val_as_bytes%3#0: bytes = (itob a#0) - let length%5#0: uint64 = (len d#0) - let as_bytes%6#0: bytes = (itob length%5#0) - let length_uint16%5#0: bytes = ((extract 6 2) as_bytes%6#0) - let encoded_value%5#0: bytes = (concat length_uint16%5#0 d#0) - let val_as_bytes%4#0: bytes = (itob a#0) - let length%6#0: uint64 = (len d#0) - let as_bytes%7#0: bytes = (itob length%6#0) - let length_uint16%6#0: bytes = ((extract 6 2) as_bytes%7#0) - let encoded_value%6#0: bytes = (concat length_uint16%6#0 d#0) - let current_tail_offset%2#0: uint64 = 10u - let encoded_tuple_buffer%4#0: bytes = 0x - let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 val_as_bytes%3#0) - let as_bytes%8#0: bytes = (itob current_tail_offset%2#0) - let offset_as_uint16%1#0: bytes = ((extract 6 2) as_bytes%8#0) - let encoded_tuple_buffer%6#0: bytes = (concat encoded_tuple_buffer%5#0 offset_as_uint16%1#0) - let data_length%1#0: uint64 = (len encoded_value%6#0) - let current_tail_offset%3#0: uint64 = (+ current_tail_offset%2#0 data_length%1#0) - let encoded_tuple_buffer%7#0: bytes = (concat encoded_tuple_buffer%6#0 encoded_value%6#0) - let tmp%7#0: bool = (== encoded_tuple_buffer%3#0 encoded_tuple_buffer%7#0) - (assert tmp%7#0) - return - - subroutine tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.testDecoding(a: uint64, a_bytes: bytes, b: bool, b_bytes: bytes, c: biguint, c_bytes: bytes, d: bytes, d_bytes: bytes, e.a: bytes, e.b: bytes, e_bytes: bytes) -> void: - block@0: // L17 - let tmp%0#0: uint64 = (btoi a_bytes#0) - let tmp%1#0: bool = (== tmp%0#0 a#0) - (assert tmp%1#0) - let tmp%2#0: bool = (getbit b_bytes#0 0u) - let tmp%3#0: bool = (== tmp%2#0 b#0) - (assert tmp%3#0) - let tmp%4#0: bool = (b== c_bytes#0 c#0) - (assert tmp%4#0) - let tmp%5#0: bytes = ((extract 2 0) d_bytes#0) - let tmp%6#0: bool = (== tmp%5#0 d#0) - (assert tmp%6#0) - let item0%0#0: bytes = (extract3 e_bytes#0 0u 8u) // on error: Index access is out of bounds - let item_start_offset%0#0: uint64 = (extract_uint16 e_bytes#0 8u) - let item_end_offset%0#0: uint64 = (len e_bytes#0) - let item1%0#0: bytes = (substring3 e_bytes#0 item_start_offset%0#0 item_end_offset%0#0) - let tmp%7#0: bool = (== item0%0#0 e.a#0) - goto tmp%7#0 ? block@1 : block@3 - block@1: // and_contd_L34 - let item0%1#0: bytes = (extract3 e_bytes#0 0u 8u) // on error: Index access is out of bounds - let item_start_offset%1#0: uint64 = (extract_uint16 e_bytes#0 8u) - let item_end_offset%1#0: uint64 = (len e_bytes#0) - let item1%1#0: bytes = (substring3 e_bytes#0 item_start_offset%1#0 item_end_offset%1#0) - let tmp%8#0: bool = (== item1%1#0 e.b#0) - goto tmp%8#0 ? block@2 : block@3 - block@2: // bool_true_L34 - let and_result%0#0: bool = 1u - goto block@4 - block@3: // bool_false_L34 - let and_result%0#1: bool = 0u - goto block@4 - block@4: // bool_merge_L34 - let and_result%0#2: bool = φ(and_result%0#0 <- block@2, and_result%0#1 <- block@3) - (assert and_result%0#2) // assert target is match for conditions - return - - subroutine tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode.__algots__.defaultCreate() -> void: - block@0: // L7 - return - - program clear-state: - subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: - block@0: // L1 - return 1u \ No newline at end of file diff --git a/tests/approvals/out/arc4-encoded-decode/arc4-encoded-decode.awst b/tests/approvals/out/arc4-encoded-decode/arc4-encoded-decode.awst deleted file mode 100644 index 94ac0d82..00000000 --- a/tests/approvals/out/arc4-encoded-decode/arc4-encoded-decode.awst +++ /dev/null @@ -1,53 +0,0 @@ -contract Arc4EncodedDecode -{ - approvalProgram(): bool - { - if (!Boolean(txn())) { - this.constructor() - } - return arc4Router() - } - - clearProgram(): bool - { - return True - } - - testEncoding(): void - { - assert(reinterpret_cast(ARC4_ENCODE(a, wtype=arc4.uint64)) == reinterpret_cast(ARC4_ENCODE(a, wtype=arc4.uint64))) - assert(reinterpret_cast(ARC4_ENCODE(b, wtype=arc4.bool)) == reinterpret_cast(ARC4_ENCODE(b, wtype=arc4.bool))) - assert(reinterpret_cast(ARC4_ENCODE(c, wtype=arc4.uint512)) == reinterpret_cast(ARC4_ENCODE(c, wtype=arc4.uint512))) - assert(reinterpret_cast(ARC4_ENCODE(d, wtype=arc4.dynamic_array)) == reinterpret_cast(ARC4_ENCODE(d, wtype=arc4.dynamic_array))) - assert(reinterpret_cast(ARC4_ENCODE(e, wtype=arc4.dynamic_array)) == reinterpret_cast(ARC4_ENCODE(e, wtype=arc4.dynamic_array))) - assert(reinterpret_cast(ARC4_ENCODE({ a: a, b: d }, wtype=)) == reinterpret_cast(new TestStruct(a=(#0 = { a: ARC4_ENCODE(a, wtype=arc4.uint64), b: ARC4_ENCODE(d, wtype=arc4.dynamic_array) }).a, b=#0.b))) - } - - testDecoding(): void - { - assert(ARC4_DECODE(reinterpret_cast(a_bytes)) == a) - assert(ARC4_DECODE(reinterpret_cast(b_bytes)) == b) - assert(ARC4_DECODE(reinterpret_cast(c_bytes)) == c) - assert(ARC4_DECODE(reinterpret_cast>(d_bytes)) == d) - assert(reinterpret_cast(ARC4_DECODE(reinterpret_cast(e_bytes)).a) == reinterpret_cast(e.a) and reinterpret_cast(ARC4_DECODE(reinterpret_cast(e_bytes)).b) == reinterpret_cast(e.b), comment=assert target is match for conditions) - } - - constructor(): void - { - void - } - - Contract::constructor(): void - { - } - - Contract::constructor(): void - { - this.constructor() - } - - __algots__.defaultCreate(): void - { - } - -} \ No newline at end of file diff --git a/tests/approvals/out/arc4-encoded-decode/arc4-encoded-decode.awst.json b/tests/approvals/out/arc4-encoded-decode/arc4-encoded-decode.awst.json deleted file mode 100644 index f1148724..00000000 --- a/tests/approvals/out/arc4-encoded-decode/arc4-encoded-decode.awst.json +++ /dev/null @@ -1,4057 +0,0 @@ -[ - { - "_type": "Contract", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 7, - "end_line": 7, - "column": 0, - "end_column": 49 - }, - "id": "tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode", - "name": "Arc4EncodedDecode", - "description": null, - "method_resolution_order": [ - "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", - "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" - ], - "approval_program": { - "_type": "ContractMethod", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "args": [], - "return_type": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "body": { - "_type": "Block", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "body": [ - { - "_type": "IfElse", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "condition": { - "_type": "Not", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "ReinterpretCast", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "op_code": "txn", - "immediates": [ - "ApplicationID" - ], - "stack_args": [] - } - } - }, - "if_branch": { - "_type": "Block", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], - "label": null, - "comment": null - }, - "else_branch": null - }, - { - "_type": "Block", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "body": [ - { - "_type": "ReturnStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "value": { - "_type": "ARC4Router", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - } - } - ], - "label": null, - "comment": null - } - ], - "label": null, - "comment": null - }, - "documentation": { - "_type": "MethodDocumentation", - "description": null, - "args": {}, - "returns": null - }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", - "member_name": "approvalProgram", - "arc4_method_config": null - }, - "clear_program": { - "_type": "ContractMethod", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "args": [], - "return_type": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "body": { - "_type": "Block", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "body": [ - { - "_type": "ReturnStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "value": { - "_type": "BoolConstant", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": true - } - } - ], - "label": null, - "comment": null - }, - "documentation": { - "_type": "MethodDocumentation", - "description": null, - "args": {}, - "returns": null - }, - "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", - "member_name": "clearStateProgram", - "arc4_method_config": null - }, - "methods": [ - { - "_type": "ContractMethod", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 8, - "end_line": 8, - "column": 2, - "end_column": 70 - }, - "args": [ - { - "_type": "SubroutineArgument", - "name": "a", - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 8, - "end_line": 8, - "column": 15, - "end_column": 24 - } - }, - { - "_type": "SubroutineArgument", - "name": "b", - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 8, - "end_line": 8, - "column": 26, - "end_column": 36 - } - }, - { - "_type": "SubroutineArgument", - "name": "c", - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 8, - "end_line": 8, - "column": 38, - "end_column": 48 - } - }, - { - "_type": "SubroutineArgument", - "name": "d", - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 8, - "end_line": 8, - "column": 50, - "end_column": 58 - } - }, - { - "_type": "SubroutineArgument", - "name": "e", - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 8, - "end_line": 8, - "column": 60, - "end_column": 69 - } - } - ], - "return_type": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "body": { - "_type": "Block", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 8, - "end_line": 15, - "column": 71, - "end_column": 3 - }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 9, - "end_line": 9, - "column": 4, - "end_column": 50 - }, - "expr": { - "_type": "AssertExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 9, - "end_line": 9, - "column": 4, - "end_column": 50 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "condition": { - "_type": "BytesComparisonExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 9, - "end_line": 9, - "column": 11, - "end_column": 49 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 9, - "end_line": 9, - "column": 11, - "end_column": 24 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "ARC4Encode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 9, - "end_line": 9, - "column": 11, - "end_column": 24 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 9, - "end_line": 9, - "column": 22, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - } - } - }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 9, - "end_line": 9, - "column": 29, - "end_column": 49 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "ARC4Encode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 9, - "end_line": 9, - "column": 29, - "end_column": 43 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 9, - "end_line": 9, - "column": 41, - "end_column": 42 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - } - } - } - }, - "error_message": null - } - }, - { - "_type": "ExpressionStatement", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 10, - "end_line": 10, - "column": 4, - "end_column": 47 - }, - "expr": { - "_type": "AssertExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 10, - "end_line": 10, - "column": 4, - "end_column": 47 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "condition": { - "_type": "BytesComparisonExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 10, - "end_line": 10, - "column": 11, - "end_column": 46 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 10, - "end_line": 10, - "column": 11, - "end_column": 24 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "ARC4Encode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 10, - "end_line": 10, - "column": 11, - "end_column": 24 - }, - "wtype": { - "_type": "ARC4Type", - "name": "arc4.bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "bool" - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 10, - "end_line": 10, - "column": 22, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "b" - } - } - }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 10, - "end_line": 10, - "column": 29, - "end_column": 46 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "ARC4Encode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 10, - "end_line": 10, - "column": 29, - "end_column": 40 - }, - "wtype": { - "_type": "ARC4Type", - "name": "arc4.bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "bool" - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 10, - "end_line": 10, - "column": 38, - "end_column": 39 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "b" - } - } - } - }, - "error_message": null - } - }, - { - "_type": "ExpressionStatement", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 11, - "end_line": 11, - "column": 4, - "end_column": 53 - }, - "expr": { - "_type": "AssertExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 11, - "end_line": 11, - "column": 4, - "end_column": 53 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "condition": { - "_type": "BytesComparisonExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 11, - "end_line": 11, - "column": 11, - "end_column": 52 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 11, - "end_line": 11, - "column": 11, - "end_column": 24 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "ARC4Encode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 11, - "end_line": 11, - "column": 11, - "end_column": 24 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint512", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "uint512", - "n": "512" - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 11, - "end_line": 11, - "column": 22, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "c" - } - } - }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 11, - "end_line": 11, - "column": 29, - "end_column": 52 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "ARC4Encode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 11, - "end_line": 11, - "column": 29, - "end_column": 46 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint512", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "uint512", - "n": "512" - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 11, - "end_line": 11, - "column": 44, - "end_column": 45 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "c" - } - } - } - }, - "error_message": null - } - }, - { - "_type": "ExpressionStatement", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 12, - "end_line": 12, - "column": 4, - "end_column": 55 - }, - "expr": { - "_type": "AssertExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 12, - "end_line": 12, - "column": 4, - "end_column": 55 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "condition": { - "_type": "BytesComparisonExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 12, - "end_line": 12, - "column": 11, - "end_column": 54 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 12, - "end_line": 12, - "column": 11, - "end_column": 24 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "ARC4Encode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 12, - "end_line": 12, - "column": 11, - "end_column": 24 - }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 12, - "end_line": 12, - "column": 22, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "d" - } - } - }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 12, - "end_line": 12, - "column": 29, - "end_column": 54 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "ARC4Encode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 12, - "end_line": 12, - "column": 29, - "end_column": 48 - }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 12, - "end_line": 12, - "column": 46, - "end_column": 47 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "d" - } - } - } - }, - "error_message": null - } - }, - { - "_type": "ExpressionStatement", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 13, - "end_line": 13, - "column": 4, - "end_column": 46 - }, - "expr": { - "_type": "AssertExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 13, - "end_line": 13, - "column": 4, - "end_column": 46 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "condition": { - "_type": "BytesComparisonExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 13, - "end_line": 13, - "column": 11, - "end_column": 45 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 13, - "end_line": 13, - "column": 11, - "end_column": 24 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "ARC4Encode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 13, - "end_line": 13, - "column": 11, - "end_column": 24 - }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "string", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 13, - "end_line": 13, - "column": 22, - "end_column": 23 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "e" - } - } - }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 13, - "end_line": 13, - "column": 29, - "end_column": 45 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "ARC4Encode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 13, - "end_line": 13, - "column": 29, - "end_column": 39 - }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "string", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 13, - "end_line": 13, - "column": 37, - "end_column": 38 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "e" - } - } - } - }, - "error_message": null - } - }, - { - "_type": "ExpressionStatement", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 4, - "end_column": 107 - }, - "expr": { - "_type": "AssertExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 4, - "end_column": 107 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "condition": { - "_type": "BytesComparisonExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 11, - "end_column": 106 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 11, - "end_column": 34 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "ARC4Encode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 11, - "end_column": 34 - }, - "wtype": { - "_type": "ARC4Struct", - "name": "", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64,byte[]", - "fields": { - "a": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "b": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - } - }, - "source_location": null, - "frozen": false, - "desc": null - }, - "value": { - "_type": "TupleExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 22, - "end_column": 33 - }, - "wtype": { - "_type": "WTuple", - "name": "::", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - } - ], - "names": [ - "a", - "b" - ] - }, - "items": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 24, - "end_column": 25 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - }, - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 30, - "end_column": 31 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "d" - } - ] - } - } - }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 39, - "end_column": 106 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "NewStruct", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 39, - "end_column": 100 - }, - "wtype": { - "_type": "ARC4Struct", - "name": "TestStruct", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64,byte[]", - "fields": { - "a": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "b": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - } - }, - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 43, - "end_column": 53 - }, - "frozen": false, - "desc": null - }, - "values": { - "a": { - "_type": "FieldExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 39, - "end_column": 100 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "base": { - "_type": "SingleEvaluation", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 54, - "end_column": 99 - }, - "wtype": { - "_type": "WTuple", - "name": "::", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - } - ], - "names": [ - "a", - "b" - ] - }, - "source": { - "_type": "TupleExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 54, - "end_column": 99 - }, - "wtype": { - "_type": "WTuple", - "name": "::", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - } - ], - "names": [ - "a", - "b" - ] - }, - "items": [ - { - "_type": "ARC4Encode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 59, - "end_column": 73 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 71, - "end_column": 72 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - } - }, - { - "_type": "ARC4Encode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 78, - "end_column": 97 - }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 95, - "end_column": 96 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "d" - } - } - ] - }, - "id": "0" - }, - "name": "a" - }, - "b": { - "_type": "FieldExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 39, - "end_column": 100 - }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - }, - "base": { - "_type": "SingleEvaluation", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 54, - "end_column": 99 - }, - "wtype": { - "_type": "WTuple", - "name": "::", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - } - ], - "names": [ - "a", - "b" - ] - }, - "source": { - "_type": "TupleExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 54, - "end_column": 99 - }, - "wtype": { - "_type": "WTuple", - "name": "::", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - } - ], - "names": [ - "a", - "b" - ] - }, - "items": [ - { - "_type": "ARC4Encode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 59, - "end_column": 73 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 71, - "end_column": 72 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - } - }, - { - "_type": "ARC4Encode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 78, - "end_column": 97 - }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - }, - "value": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 14, - "end_line": 14, - "column": 95, - "end_column": 96 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "d" - } - } - ] - }, - "id": "0" - }, - "name": "b" - } - } - } - } - }, - "error_message": null - } - } - ], - "label": null, - "comment": null - }, - "documentation": { - "_type": "MethodDocumentation", - "description": null, - "args": {}, - "returns": null - }, - "cref": "tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode", - "member_name": "testEncoding", - "arc4_method_config": { - "_type": "ARC4ABIMethodConfig", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 8, - "end_line": 8, - "column": 2, - "end_column": 70 - }, - "name": "testEncoding", - "is_bare": false, - "create": 3, - "readonly": false, - "allowed_completion_types": [ - 0 - ], - "default_args": {}, - "structs": {} - } - }, - { - "_type": "ContractMethod", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 17, - "end_line": 28, - "column": 2, - "end_column": 3 - }, - "args": [ - { - "_type": "SubroutineArgument", - "name": "a", - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 18, - "end_line": 18, - "column": 4, - "end_column": 13 - } - }, - { - "_type": "SubroutineArgument", - "name": "a_bytes", - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 19, - "end_line": 19, - "column": 4, - "end_column": 18 - } - }, - { - "_type": "SubroutineArgument", - "name": "b", - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 20, - "end_line": 20, - "column": 4, - "end_column": 14 - } - }, - { - "_type": "SubroutineArgument", - "name": "b_bytes", - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 21, - "end_line": 21, - "column": 4, - "end_column": 18 - } - }, - { - "_type": "SubroutineArgument", - "name": "c", - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 22, - "end_line": 22, - "column": 4, - "end_column": 14 - } - }, - { - "_type": "SubroutineArgument", - "name": "c_bytes", - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 23, - "end_line": 23, - "column": 4, - "end_column": 18 - } - }, - { - "_type": "SubroutineArgument", - "name": "d", - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 24, - "end_line": 24, - "column": 4, - "end_column": 13 - } - }, - { - "_type": "SubroutineArgument", - "name": "d_bytes", - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 25, - "end_line": 25, - "column": 4, - "end_column": 18 - } - }, - { - "_type": "SubroutineArgument", - "name": "e", - "wtype": { - "_type": "WTuple", - "name": "tests/approvals/arc4-encoded-decode.algo.ts::TestObj", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - } - ], - "names": [ - "a", - "b" - ] - }, - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 26, - "end_line": 26, - "column": 4, - "end_column": 14 - } - }, - { - "_type": "SubroutineArgument", - "name": "e_bytes", - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 27, - "end_line": 27, - "column": 4, - "end_column": 18 - } - } - ], - "return_type": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "body": { - "_type": "Block", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 28, - "end_line": 35, - "column": 4, - "end_column": 3 - }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 29, - "end_line": 29, - "column": 4, - "end_column": 45 - }, - "expr": { - "_type": "AssertExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 29, - "end_line": 29, - "column": 4, - "end_column": 45 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "condition": { - "_type": "NumericComparisonExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 29, - "end_line": 29, - "column": 11, - "end_column": 44 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "ARC4Decode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 29, - "end_line": 29, - "column": 11, - "end_column": 38 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 29, - "end_line": 29, - "column": 11, - "end_column": 38 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 29, - "end_line": 29, - "column": 30, - "end_column": 37 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "a_bytes" - } - } - }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 29, - "end_line": 29, - "column": 43, - "end_column": 44 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - } - }, - "error_message": null - } - }, - { - "_type": "ExpressionStatement", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 30, - "end_line": 30, - "column": 4, - "end_column": 46 - }, - "expr": { - "_type": "AssertExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 30, - "end_line": 30, - "column": 4, - "end_column": 46 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "condition": { - "_type": "NumericComparisonExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 30, - "end_line": 30, - "column": 11, - "end_column": 45 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "ARC4Decode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 30, - "end_line": 30, - "column": 11, - "end_column": 39 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "value": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 30, - "end_line": 30, - "column": 11, - "end_column": 39 - }, - "wtype": { - "_type": "ARC4Type", - "name": "arc4.bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "bool" - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 30, - "end_line": 30, - "column": 31, - "end_column": 38 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "b_bytes" - } - } - }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 30, - "end_line": 30, - "column": 44, - "end_column": 45 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "b" - } - }, - "error_message": null - } - }, - { - "_type": "ExpressionStatement", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 31, - "end_line": 31, - "column": 4, - "end_column": 46 - }, - "expr": { - "_type": "AssertExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 31, - "end_line": 31, - "column": 4, - "end_column": 46 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "condition": { - "_type": "NumericComparisonExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 31, - "end_line": 31, - "column": 11, - "end_column": 45 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "ARC4Decode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 31, - "end_line": 31, - "column": 11, - "end_column": 39 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 31, - "end_line": 31, - "column": 11, - "end_column": 39 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint512", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "uint512", - "n": "512" - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 31, - "end_line": 31, - "column": 31, - "end_column": 38 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "c_bytes" - } - } - }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 31, - "end_line": 31, - "column": 44, - "end_column": 45 - }, - "wtype": { - "_type": "WType", - "name": "biguint", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "c" - } - }, - "error_message": null - } - }, - { - "_type": "ExpressionStatement", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 32, - "end_line": 32, - "column": 4, - "end_column": 45 - }, - "expr": { - "_type": "AssertExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 32, - "end_line": 32, - "column": 4, - "end_column": 45 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "condition": { - "_type": "BytesComparisonExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 32, - "end_line": 32, - "column": 11, - "end_column": 44 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "ARC4Decode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 32, - "end_line": 32, - "column": 11, - "end_column": 38 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "value": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 32, - "end_line": 32, - "column": 11, - "end_column": 38 - }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "string", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 32, - "end_line": 32, - "column": 30, - "end_column": 37 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "d_bytes" - } - } - }, - "operator": "==", - "rhs": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 32, - "end_line": 32, - "column": 43, - "end_column": 44 - }, - "wtype": { - "_type": "WType", - "name": "string", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "d" - } - }, - "error_message": null - } - }, - { - "_type": "ExpressionStatement", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 4, - "end_column": 48 - }, - "expr": { - "_type": "AssertExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 4, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "condition": { - "_type": "BooleanBinaryOperation", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 4, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "left": { - "_type": "BytesComparisonExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 4, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 4, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "FieldExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 4, - "end_column": 48 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "base": { - "_type": "ARC4Decode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 16, - "end_column": 44 - }, - "wtype": { - "_type": "WTuple", - "name": "tests/approvals/arc4-encoded-decode.algo.ts::TestObj", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - } - ], - "names": [ - "a", - "b" - ] - }, - "value": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 16, - "end_column": 44 - }, - "wtype": { - "_type": "ARC4Struct", - "name": "TestObj", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64,byte[]", - "fields": { - "a": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "b": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - } - }, - "source_location": null, - "frozen": false, - "desc": null - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 36, - "end_column": 43 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "e_bytes" - } - } - }, - "name": "a" - } - }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 4, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "FieldExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 4, - "end_column": 48 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "base": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 46, - "end_column": 47 - }, - "wtype": { - "_type": "WTuple", - "name": "tests/approvals/arc4-encoded-decode.algo.ts::TestObj", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - } - ], - "names": [ - "a", - "b" - ] - }, - "name": "e" - }, - "name": "a" - } - } - }, - "op": "and", - "right": { - "_type": "BytesComparisonExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 4, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bool", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "lhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 4, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "FieldExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 4, - "end_column": 48 - }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - }, - "base": { - "_type": "ARC4Decode", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 16, - "end_column": 44 - }, - "wtype": { - "_type": "WTuple", - "name": "tests/approvals/arc4-encoded-decode.algo.ts::TestObj", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - } - ], - "names": [ - "a", - "b" - ] - }, - "value": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 16, - "end_column": 44 - }, - "wtype": { - "_type": "ARC4Struct", - "name": "TestObj", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": null, - "arc4_name": "uint64,byte[]", - "fields": { - "a": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "b": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - } - }, - "source_location": null, - "frozen": false, - "desc": null - }, - "expr": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 36, - "end_column": 43 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "name": "e_bytes" - } - } - }, - "name": "b" - } - }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 4, - "end_column": 48 - }, - "wtype": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "FieldExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 4, - "end_column": 48 - }, - "wtype": { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - }, - "base": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 34, - "end_line": 34, - "column": 46, - "end_column": 47 - }, - "wtype": { - "_type": "WTuple", - "name": "tests/approvals/arc4-encoded-decode.algo.ts::TestObj", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - { - "_type": "ARC4DynamicArray", - "name": "arc4.dynamic_array", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "bytes", - "immutable": true, - "ephemeral": false, - "scalar_type": 1 - }, - "arc4_name": "byte[]", - "element_type": { - "_type": "ARC4UIntN", - "name": "arc4.byte", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "byte", - "n": "8" - }, - "source_location": null - } - ], - "names": [ - "a", - "b" - ] - }, - "name": "e" - }, - "name": "b" - } - } - } - }, - "error_message": "assert target is match for conditions" - } - } - ], - "label": null, - "comment": null - }, - "documentation": { - "_type": "MethodDocumentation", - "description": null, - "args": {}, - "returns": null - }, - "cref": "tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode", - "member_name": "testDecoding", - "arc4_method_config": { - "_type": "ARC4ABIMethodConfig", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 17, - "end_line": 28, - "column": 2, - "end_column": 3 - }, - "name": "testDecoding", - "is_bare": false, - "create": 3, - "readonly": false, - "allowed_completion_types": [ - 0 - ], - "default_args": {}, - "structs": { - "e": { - "name": "TestObj", - "elements": [ - [ - "a", - "uint64" - ], - [ - "b", - "byte[]" - ] - ] - } - } - } - }, - { - "_type": "ContractMethod", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 7, - "end_line": 7, - "column": 0, - "end_column": 49 - }, - "args": [], - "return_type": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "body": { - "_type": "Block", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 7, - "end_line": 7, - "column": 0, - "end_column": 49 - }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 7, - "end_line": 7, - "column": 0, - "end_column": 49 - }, - "expr": { - "_type": "VoidConstant", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 7, - "end_line": 7, - "column": 0, - "end_column": 49 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - } - } - } - ], - "label": null, - "comment": null - }, - "documentation": { - "_type": "MethodDocumentation", - "description": null, - "args": {}, - "returns": null - }, - "cref": "tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode", - "member_name": "constructor", - "arc4_method_config": null - }, - { - "_type": "ContractMethod", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "args": [], - "return_type": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "body": { - "_type": "Block", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "body": [], - "label": null, - "comment": null - }, - "documentation": { - "_type": "MethodDocumentation", - "description": null, - "args": {}, - "returns": null - }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", - "member_name": "constructor", - "arc4_method_config": null - }, - { - "_type": "ContractMethod", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "args": [], - "return_type": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "body": { - "_type": "Block", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], - "label": null, - "comment": null - }, - "documentation": { - "_type": "MethodDocumentation", - "description": null, - "args": {}, - "returns": null - }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", - "member_name": "constructor", - "arc4_method_config": null - }, - { - "_type": "ContractMethod", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 7, - "end_line": 7, - "column": 0, - "end_column": 49 - }, - "args": [], - "return_type": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "body": { - "_type": "Block", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 7, - "end_line": 7, - "column": 0, - "end_column": 49 - }, - "body": [], - "label": null, - "comment": null - }, - "documentation": { - "_type": "MethodDocumentation", - "description": "Implicitly generated create method", - "args": {}, - "returns": null - }, - "cref": "tests/approvals/arc4-encoded-decode.algo.ts::Arc4EncodedDecode", - "member_name": "__algots__.defaultCreate", - "arc4_method_config": { - "_type": "ARC4BareMethodConfig", - "source_location": { - "file": "tests/approvals/arc4-encoded-decode.algo.ts", - "line": 7, - "end_line": 7, - "column": 0, - "end_column": 49 - }, - "allowed_completion_types": [ - 0 - ], - "create": 2, - "is_bare": true - } - } - ], - "app_state": [], - "state_totals": { - "globalBytes": null, - "globalUints": null, - "localBytes": null, - "localUints": null - }, - "reserved_scratch_space": [], - "avm_version": null - } -] \ No newline at end of file diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst.json b/tests/approvals/out/arc4-struct/arc4-struct.awst.json index 78be1cc2..c1610800 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst.json +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst.json @@ -902,7 +902,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 12, "end_line": 12, - "column": 8, + "column": 11, "end_column": 12 }, "wtype": { @@ -1040,7 +1040,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 13, "end_line": 13, - "column": 8, + "column": 11, "end_column": 12 }, "wtype": { @@ -3018,7 +3018,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 20, "end_line": 20, - "column": 24, + "column": 29, "end_column": 35 }, "wtype": { @@ -3034,7 +3034,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 20, "end_line": 20, - "column": 24, + "column": 27, "end_column": 28 }, "wtype": { @@ -3126,7 +3126,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 20, "end_line": 20, - "column": 38, + "column": 43, "end_column": 49 }, "wtype": { @@ -3142,7 +3142,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 20, "end_line": 20, - "column": 38, + "column": 41, "end_column": 42 }, "wtype": { @@ -3276,7 +3276,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 21, "end_line": 21, - "column": 24, + "column": 29, "end_column": 35 }, "wtype": { @@ -3292,7 +3292,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 21, "end_line": 21, - "column": 24, + "column": 27, "end_column": 28 }, "wtype": { @@ -3384,7 +3384,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 21, "end_line": 21, - "column": 38, + "column": 43, "end_column": 49 }, "wtype": { @@ -3400,7 +3400,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 21, "end_line": 21, - "column": 38, + "column": 41, "end_column": 42 }, "wtype": { @@ -3674,7 +3674,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 20, "end_line": 20, - "column": 24, + "column": 29, "end_column": 35 }, "wtype": { @@ -3690,7 +3690,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 20, "end_line": 20, - "column": 24, + "column": 27, "end_column": 28 }, "wtype": { @@ -3782,7 +3782,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 20, "end_line": 20, - "column": 38, + "column": 43, "end_column": 49 }, "wtype": { @@ -3798,7 +3798,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 20, "end_line": 20, - "column": 38, + "column": 41, "end_column": 42 }, "wtype": { @@ -3932,7 +3932,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 21, "end_line": 21, - "column": 24, + "column": 29, "end_column": 35 }, "wtype": { @@ -3948,7 +3948,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 21, "end_line": 21, - "column": 24, + "column": 27, "end_column": 28 }, "wtype": { @@ -4040,7 +4040,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 21, "end_line": 21, - "column": 38, + "column": 43, "end_column": 49 }, "wtype": { @@ -4056,7 +4056,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 21, "end_line": 21, - "column": 38, + "column": 41, "end_column": 42 }, "wtype": { @@ -5678,7 +5678,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 28, "end_line": 28, - "column": 11, + "column": 14, "end_column": 19 }, "wtype": { @@ -5759,7 +5759,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 28, "end_line": 28, - "column": 24, + "column": 27, "end_column": 32 }, "wtype": { @@ -5884,7 +5884,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 29, "end_line": 29, - "column": 11, + "column": 14, "end_column": 19 }, "wtype": { @@ -5965,7 +5965,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 29, "end_line": 29, - "column": 24, + "column": 27, "end_column": 32 }, "wtype": { @@ -6258,7 +6258,7 @@ "file": "tests/approvals/arc4-struct.algo.ts", "line": 33, "end_line": 33, - "column": 21, + "column": 24, "end_column": 29 }, "wtype": { diff --git a/tests/approvals/out/arc4-types/arc4-types.awst.json b/tests/approvals/out/arc4-types/arc4-types.awst.json index 088f5135..0a98c546 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst.json +++ b/tests/approvals/out/arc4-types/arc4-types.awst.json @@ -510,7 +510,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 28, "end_line": 28, - "column": 9, + "column": 17, "end_column": 23 }, "wtype": { @@ -529,7 +529,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 28, "end_line": 28, - "column": 9, + "column": 11, "end_column": 16 }, "wtype": { @@ -705,7 +705,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 30, "end_line": 30, - "column": 9, + "column": 12, "end_column": 17 }, "wtype": { @@ -879,7 +879,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 33, "end_line": 33, - "column": 9, + "column": 17, "end_column": 23 }, "wtype": { @@ -898,7 +898,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 33, "end_line": 33, - "column": 9, + "column": 11, "end_column": 16 }, "wtype": { @@ -1076,7 +1076,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 35, "end_line": 35, - "column": 19, + "column": 21, "end_column": 27 }, "wtype": { @@ -1311,7 +1311,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 38, "end_line": 38, - "column": 19, + "column": 21, "end_column": 27 }, "wtype": { @@ -1479,7 +1479,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 41, "end_line": 41, - "column": 9, + "column": 17, "end_column": 23 }, "wtype": { @@ -1498,7 +1498,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 41, "end_line": 41, - "column": 9, + "column": 11, "end_column": 16 }, "wtype": { @@ -1595,7 +1595,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 43, "end_line": 43, - "column": 18, + "column": 20, "end_column": 25 }, "wtype": { @@ -1961,7 +1961,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 50, "end_line": 50, - "column": 9, + "column": 19, "end_column": 25 }, "wtype": { @@ -2151,7 +2151,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 52, "end_line": 52, - "column": 17, + "column": 27, "end_column": 32 }, "wtype": { @@ -2343,7 +2343,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 56, "end_line": 56, - "column": 9, + "column": 14, "end_column": 19 }, "wtype": { @@ -2589,7 +2589,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 61, "end_line": 61, - "column": 9, + "column": 12, "end_column": 17 }, "wtype": { @@ -2650,7 +2650,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 61, "end_line": 61, - "column": 22, + "column": 39, "end_column": 44 }, "wtype": { @@ -2836,7 +2836,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 63, "end_line": 63, - "column": 9, + "column": 12, "end_column": 18 }, "wtype": { @@ -2946,7 +2946,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 65, "end_line": 65, - "column": 19, + "column": 22, "end_column": 27 }, "wtype": { @@ -3483,7 +3483,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 74, "end_line": 74, - "column": 9, + "column": 13, "end_column": 19 }, "wtype": { @@ -3608,7 +3608,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 75, "end_line": 75, - "column": 9, + "column": 13, "end_column": 18 }, "wtype": { @@ -3669,7 +3669,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 75, "end_line": 75, - "column": 23, + "column": 40, "end_column": 45 }, "wtype": { @@ -3872,7 +3872,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 77, "end_line": 77, - "column": 9, + "column": 13, "end_column": 19 }, "wtype": { @@ -4093,7 +4093,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 80, "end_line": 80, - "column": 9, + "column": 13, "end_column": 19 }, "wtype": { @@ -6094,7 +6094,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 114, "end_line": 114, - "column": 24, + "column": 28, "end_column": 34 }, "wtype": { @@ -7013,7 +7013,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 124, "end_line": 124, - "column": 27, + "column": 29, "end_column": 35 }, "wtype": { @@ -7566,7 +7566,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 127, "end_line": 127, - "column": 9, + "column": 12, "end_column": 18 }, "wtype": { @@ -8447,7 +8447,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 148, "end_line": 148, - "column": 11, + "column": 18, "end_column": 24 }, "wtype": { @@ -8503,7 +8503,7 @@ "file": "tests/approvals/arc4-types.algo.ts", "line": 148, "end_line": 148, - "column": 11, + "column": 18, "end_column": 24 }, "wtype": { diff --git a/tests/approvals/out/assert-match/assert-match.awst.json b/tests/approvals/out/assert-match/assert-match.awst.json index bdc90631..5d8214eb 100644 --- a/tests/approvals/out/assert-match/assert-match.awst.json +++ b/tests/approvals/out/assert-match/assert-match.awst.json @@ -96,7 +96,7 @@ "file": "tests/approvals/assert-match.algo.ts", "line": 5, "end_line": 5, - "column": 14, + "column": 21, "end_column": 46 }, "wtype": { @@ -523,7 +523,7 @@ "file": "tests/approvals/assert-match.algo.ts", "line": 12, "end_line": 12, - "column": 12, + "column": 16, "end_column": 22 }, "wtype": { @@ -607,7 +607,7 @@ "file": "tests/approvals/assert-match.algo.ts", "line": 13, "end_line": 13, - "column": 14, + "column": 21, "end_column": 46 }, "wtype": { @@ -691,7 +691,7 @@ "file": "tests/approvals/assert-match.algo.ts", "line": 14, "end_line": 14, - "column": 22, + "column": 29, "end_column": 40 }, "wtype": { diff --git a/tests/approvals/out/box-proxies/box-proxies.awst.json b/tests/approvals/out/box-proxies/box-proxies.awst.json index 103c104a..e5d74460 100644 --- a/tests/approvals/out/box-proxies/box-proxies.awst.json +++ b/tests/approvals/out/box-proxies/box-proxies.awst.json @@ -78,7 +78,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 6, "end_line": 6, - "column": 2, + "column": 6, "end_column": 11 }, "wtype": { @@ -142,7 +142,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 7, "end_line": 7, - "column": 2, + "column": 7, "end_column": 12 }, "wtype": { @@ -239,7 +239,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 9, "end_line": 9, - "column": 9, + "column": 13, "end_column": 18 }, "wtype": { @@ -276,7 +276,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 9, "end_line": 9, - "column": 23, + "column": 28, "end_column": 33 }, "wtype": { @@ -358,7 +358,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 11, "end_line": 11, - "column": 9, + "column": 13, "end_column": 19 }, "wtype": { @@ -374,7 +374,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 11, "end_line": 11, - "column": 9, + "column": 13, "end_column": 19 }, "wtype": { @@ -412,7 +412,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 11, "end_line": 11, - "column": 23, + "column": 28, "end_column": 34 }, "wtype": { @@ -428,7 +428,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 11, "end_line": 11, - "column": 23, + "column": 28, "end_column": 34 }, "wtype": { @@ -511,7 +511,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 13, "end_line": 13, - "column": 9, + "column": 13, "end_column": 19 }, "wtype": { @@ -527,7 +527,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 13, "end_line": 13, - "column": 9, + "column": 13, "end_column": 19 }, "wtype": { @@ -562,7 +562,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 13, "end_line": 13, - "column": 9, + "column": 13, "end_column": 19 }, "wtype": { @@ -606,7 +606,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 15, "end_line": 15, - "column": 2, + "column": 6, "end_column": 12 }, "expr": { @@ -615,7 +615,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 15, "end_line": 15, - "column": 2, + "column": 6, "end_column": 12 }, "wtype": { @@ -631,7 +631,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 15, "end_line": 15, - "column": 2, + "column": 6, "end_column": 12 }, "wtype": { @@ -669,7 +669,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 16, "end_line": 16, - "column": 2, + "column": 7, "end_column": 13 }, "expr": { @@ -678,7 +678,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 16, "end_line": 16, - "column": 2, + "column": 7, "end_column": 13 }, "wtype": { @@ -694,7 +694,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 16, "end_line": 16, - "column": 2, + "column": 7, "end_column": 13 }, "wtype": { @@ -790,7 +790,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 17, "end_line": 17, - "column": 10, + "column": 14, "end_column": 20 }, "wtype": { @@ -806,7 +806,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 17, "end_line": 17, - "column": 10, + "column": 14, "end_column": 20 }, "wtype": { @@ -861,7 +861,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 17, "end_line": 17, - "column": 25, + "column": 30, "end_column": 36 }, "wtype": { @@ -877,7 +877,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 17, "end_line": 17, - "column": 25, + "column": 30, "end_column": 36 }, "wtype": { @@ -1023,7 +1023,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 20, "end_line": 20, - "column": 9, + "column": 14, "end_column": 17 }, "wtype": { @@ -1096,7 +1096,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 20, "end_line": 20, - "column": 47, + "column": 51, "end_column": 54 }, "wtype": { @@ -1267,7 +1267,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 22, "end_line": 22, - "column": 14, + "column": 18, "end_column": 23 }, "wtype": { @@ -1377,7 +1377,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 24, "end_line": 24, - "column": 2, + "column": 6, "end_column": 11 }, "wtype": { @@ -1544,7 +1544,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 25, "end_line": 25, - "column": 11, + "column": 15, "end_column": 20 }, "wtype": { @@ -1732,7 +1732,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 32, "end_line": 32, - "column": 2, + "column": 6, "end_column": 9 }, "wtype": { @@ -1748,7 +1748,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 32, "end_line": 32, - "column": 2, + "column": 6, "end_column": 9 }, "wtype": { @@ -1785,7 +1785,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 32, "end_line": 32, - "column": 2, + "column": 6, "end_column": 9 }, "wtype": { @@ -1852,7 +1852,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 33, "end_line": 33, - "column": 2, + "column": 9, "end_column": 12 }, "wtype": { @@ -1868,7 +1868,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 33, "end_line": 33, - "column": 2, + "column": 9, "end_column": 12 }, "wtype": { @@ -1906,7 +1906,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 33, "end_line": 33, - "column": 2, + "column": 9, "end_column": 12 }, "wtype": { @@ -2056,7 +2056,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 35, "end_line": 35, - "column": 9, + "column": 13, "end_column": 19 }, "wtype": { @@ -2072,7 +2072,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 35, "end_line": 35, - "column": 9, + "column": 13, "end_column": 19 }, "wtype": { @@ -2109,7 +2109,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 35, "end_line": 35, - "column": 9, + "column": 13, "end_column": 19 }, "wtype": { @@ -2229,7 +2229,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 37, "end_line": 37, - "column": 9, + "column": 13, "end_column": 18 }, "wtype": { @@ -2245,7 +2245,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 37, "end_line": 37, - "column": 9, + "column": 13, "end_column": 18 }, "wtype": { @@ -2282,7 +2282,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 37, "end_line": 37, - "column": 9, + "column": 13, "end_column": 18 }, "wtype": { @@ -2368,7 +2368,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 39, "end_line": 39, - "column": 9, + "column": 13, "end_column": 16 }, "wtype": { @@ -2384,7 +2384,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 39, "end_line": 39, - "column": 9, + "column": 13, "end_column": 16 }, "wtype": { @@ -2421,7 +2421,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 39, "end_line": 39, - "column": 9, + "column": 13, "end_column": 16 }, "wtype": { @@ -2461,7 +2461,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 39, "end_line": 39, - "column": 26, + "column": 33, "end_column": 36 }, "wtype": { @@ -2477,7 +2477,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 39, "end_line": 39, - "column": 26, + "column": 33, "end_column": 36 }, "wtype": { @@ -2515,7 +2515,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 39, "end_line": 39, - "column": 26, + "column": 33, "end_column": 36 }, "wtype": { @@ -2583,7 +2583,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 41, "end_line": 41, - "column": 2, + "column": 6, "end_column": 12 }, "wtype": { @@ -2599,7 +2599,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 41, "end_line": 41, - "column": 2, + "column": 6, "end_column": 12 }, "wtype": { @@ -2636,7 +2636,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 41, "end_line": 41, - "column": 2, + "column": 6, "end_column": 12 }, "wtype": { @@ -2734,7 +2734,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 9, + "column": 13, "end_column": 16 }, "wtype": { @@ -2750,7 +2750,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 9, + "column": 13, "end_column": 16 }, "wtype": { @@ -2787,7 +2787,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 9, + "column": 13, "end_column": 16 }, "wtype": { @@ -2935,7 +2935,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 57, + "column": 64, "end_column": 67 }, "wtype": { @@ -2951,7 +2951,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 57, + "column": 64, "end_column": 67 }, "wtype": { @@ -2989,7 +2989,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 43, "end_line": 43, - "column": 57, + "column": 64, "end_column": 67 }, "wtype": { @@ -3226,7 +3226,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 49, "end_line": 49, - "column": 7, + "column": 14, "end_column": 20 }, "wtype": { @@ -3242,7 +3242,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 49, "end_line": 49, - "column": 7, + "column": 14, "end_column": 20 }, "wtype": { @@ -3277,7 +3277,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 49, "end_line": 49, - "column": 7, + "column": 14, "end_column": 20 }, "wtype": { @@ -3367,7 +3367,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 50, "end_line": 50, - "column": 4, + "column": 11, "end_column": 17 }, "wtype": { @@ -3469,7 +3469,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 51, "end_line": 51, - "column": 13, + "column": 20, "end_column": 26 }, "wtype": { @@ -3485,7 +3485,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 51, "end_line": 51, - "column": 13, + "column": 20, "end_column": 26 }, "wtype": { @@ -3520,7 +3520,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 51, "end_line": 51, - "column": 13, + "column": 20, "end_column": 26 }, "wtype": { @@ -3629,7 +3629,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 52, "end_line": 52, - "column": 4, + "column": 11, "end_column": 17 }, "wtype": { @@ -3777,7 +3777,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 55, "end_line": 55, - "column": 2, + "column": 6, "end_column": 9 }, "wtype": { @@ -3862,7 +3862,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 56, "end_line": 56, - "column": 2, + "column": 9, "end_column": 12 }, "wtype": { @@ -3948,7 +3948,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 57, "end_line": 57, - "column": 2, + "column": 6, "end_column": 12 }, "wtype": { @@ -4072,7 +4072,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 58, "end_line": 58, - "column": 2, + "column": 9, "end_column": 15 }, "wtype": { @@ -4210,7 +4210,7 @@ "file": "tests/approvals/box-proxies.algo.ts", "line": 59, "end_line": 59, - "column": 9, + "column": 13, "end_column": 18 }, "wtype": { diff --git a/tests/approvals/out/byte-expressions/byte-expressions.awst.json b/tests/approvals/out/byte-expressions/byte-expressions.awst.json index c3751544..1877120d 100644 --- a/tests/approvals/out/byte-expressions/byte-expressions.awst.json +++ b/tests/approvals/out/byte-expressions/byte-expressions.awst.json @@ -128,7 +128,7 @@ "file": "tests/approvals/byte-expressions.algo.ts", "line": 5, "end_line": 5, - "column": 9, + "column": 17, "end_column": 23 }, "wtype": { diff --git a/tests/approvals/out/ensure-budget/ensure-budget.awst.json b/tests/approvals/out/ensure-budget/ensure-budget.awst.json index 451baee0..9c33c6d8 100644 --- a/tests/approvals/out/ensure-budget/ensure-budget.awst.json +++ b/tests/approvals/out/ensure-budget/ensure-budget.awst.json @@ -307,7 +307,7 @@ "file": "tests/approvals/ensure-budget.algo.ts", "line": 6, "end_line": 6, - "column": 22, + "column": 36, "end_column": 47 }, "wtype": { @@ -383,7 +383,7 @@ "file": "tests/approvals/ensure-budget.algo.ts", "line": 7, "end_line": 7, - "column": 22, + "column": 36, "end_column": 46 }, "wtype": { @@ -459,7 +459,7 @@ "file": "tests/approvals/ensure-budget.algo.ts", "line": 8, "end_line": 8, - "column": 22, + "column": 36, "end_column": 39 }, "wtype": { diff --git a/tests/approvals/out/global-state/global-state.awst.json b/tests/approvals/out/global-state/global-state.awst.json index 8848037c..16fa83c4 100644 --- a/tests/approvals/out/global-state/global-state.awst.json +++ b/tests/approvals/out/global-state/global-state.awst.json @@ -204,7 +204,7 @@ "file": "tests/approvals/global-state.algo.ts", "line": 22, "end_line": 22, - "column": 11, + "column": 26, "end_column": 34 }, "wtype": { @@ -220,7 +220,7 @@ "file": "tests/approvals/global-state.algo.ts", "line": 22, "end_line": 22, - "column": 11, + "column": 26, "end_column": 34 }, "wtype": { @@ -302,7 +302,7 @@ "file": "tests/approvals/global-state.algo.ts", "line": 23, "end_line": 23, - "column": 11, + "column": 26, "end_column": 31 }, "wtype": { @@ -372,7 +372,7 @@ "file": "tests/approvals/global-state.algo.ts", "line": 25, "end_line": 25, - "column": 4, + "column": 19, "end_column": 24 }, "wtype": { @@ -886,7 +886,7 @@ "file": "tests/approvals/global-state.algo.ts", "line": 17, "end_line": 17, - "column": 11, + "column": 30, "end_column": 35 }, "wtype": { @@ -955,7 +955,7 @@ "file": "tests/approvals/global-state.algo.ts", "line": 18, "end_line": 18, - "column": 4, + "column": 22, "end_column": 27 }, "wtype": { @@ -1027,7 +1027,7 @@ "file": "tests/approvals/global-state.algo.ts", "line": 18, "end_line": 18, - "column": 42, + "column": 57, "end_column": 62 }, "wtype": { diff --git a/tests/approvals/out/itxn/ItxnDemoContract.approval.teal b/tests/approvals/out/itxn/ItxnDemoContract.approval.teal index 64511b28..619c0109 100644 --- a/tests/approvals/out/itxn/ItxnDemoContract.approval.teal +++ b/tests/approvals/out/itxn/ItxnDemoContract.approval.teal @@ -1,7 +1,7 @@ #pragma version 10 tests/approvals/itxn.algo.ts::ItxnDemoContract.approvalProgram: - intcblock 0 1 3 1000 + intcblock 0 3 1 1000 bytecblock "name" "unit" 0x098101 "AST1" "AST2" "AST3" "3rd" "with args param set" "\t\xc2\x81\x01" txn ApplicationID bnz main_after_if_else@2 @@ -79,7 +79,7 @@ main_block@14: main_after_if_else@15: // tests/approvals/itxn.algo.ts:24 // return true - intc_1 // 1 + intc_2 // 1 return @@ -143,7 +143,7 @@ test1: itxn_field ConfigAssetManager // tests/approvals/itxn.algo.ts:34 // decimals: 3, - intc_2 // 3 + intc_1 // 3 itxn_field ConfigAssetDecimals // tests/approvals/itxn.algo.ts:33 // unitName: 'unit', @@ -163,6 +163,8 @@ test1: // manager: Global.currentApplicationAddress, // reserve: Global.currentApplicationAddress, // }) + intc_1 // 3 + itxn_field TypeEnum intc_0 // 0 itxn_field Fee // tests/approvals/itxn.algo.ts:40 @@ -190,7 +192,7 @@ test1: itxn_field ConfigAssetManager // tests/approvals/itxn.algo.ts:34 // decimals: 3, - intc_2 // 3 + intc_1 // 3 itxn_field ConfigAssetDecimals // tests/approvals/itxn.algo.ts:33 // unitName: 'unit', @@ -210,6 +212,8 @@ test1: // manager: Global.currentApplicationAddress, // reserve: Global.currentApplicationAddress, // }) + intc_1 // 3 + itxn_field TypeEnum intc_0 // 0 itxn_field Fee // tests/approvals/itxn.algo.ts:44 @@ -250,11 +254,19 @@ test1: // tests/approvals/itxn.algo.ts:53 // clearStateProgram: Bytes.fromHex('098101'), bytec_2 // 0x098101 - itxn_field ClearStateProgram + itxn_field ClearStateProgramPages // tests/approvals/itxn.algo.ts:52 // approvalProgram: Bytes.fromHex('098101'), bytec_2 // 0x098101 - itxn_field ApprovalProgram + itxn_field ApprovalProgramPages + // tests/approvals/itxn.algo.ts:51-55 + // const appCreateParams = itxn.applicationCall({ + // approvalProgram: Bytes.fromHex('098101'), + // clearStateProgram: Bytes.fromHex('098101'), + // fee: 0, + // }) + pushint 6 // 6 + itxn_field TypeEnum // tests/approvals/itxn.algo.ts:54 // fee: 0, intc_0 // 0 @@ -268,7 +280,7 @@ test1: itxn_field ConfigAssetManager // tests/approvals/itxn.algo.ts:34 // decimals: 3, - intc_2 // 3 + intc_1 // 3 itxn_field ConfigAssetDecimals // tests/approvals/itxn.algo.ts:33 // unitName: 'unit', @@ -291,6 +303,8 @@ test1: // manager: Global.currentApplicationAddress, // reserve: Global.currentApplicationAddress, // }) + intc_1 // 3 + itxn_field TypeEnum intc_0 // 0 itxn_field Fee // tests/approvals/itxn.algo.ts:61 @@ -312,7 +326,7 @@ test1: itxn_begin // tests/approvals/itxn.algo.ts:67 // note: '3rd', - intc_1 // 1 + intc_2 // 1 dup >= // tests/approvals/itxn.algo.ts:72 @@ -327,11 +341,19 @@ test1_next_field@6: // tests/approvals/itxn.algo.ts:53 // clearStateProgram: Bytes.fromHex('098101'), bytec_2 // 0x098101 - itxn_field ClearStateProgram + itxn_field ClearStateProgramPages // tests/approvals/itxn.algo.ts:52 // approvalProgram: Bytes.fromHex('098101'), bytec_2 // 0x098101 - itxn_field ApprovalProgram + itxn_field ApprovalProgramPages + // tests/approvals/itxn.algo.ts:51-55 + // const appCreateParams = itxn.applicationCall({ + // approvalProgram: Bytes.fromHex('098101'), + // clearStateProgram: Bytes.fromHex('098101'), + // fee: 0, + // }) + pushint 6 // 6 + itxn_field TypeEnum // tests/approvals/itxn.algo.ts:54 // fee: 0, intc_0 // 0 @@ -341,7 +363,7 @@ test1_next_field@6: itxn_next // tests/approvals/itxn.algo.ts:70 // note: '3rd', - intc_1 // 1 + intc_2 // 1 dup >= // tests/approvals/itxn.algo.ts:72 @@ -359,7 +381,7 @@ test1_next_field@9: itxn_field ConfigAssetManager // tests/approvals/itxn.algo.ts:34 // decimals: 3, - intc_2 // 3 + intc_1 // 3 itxn_field ConfigAssetDecimals // tests/approvals/itxn.algo.ts:33 // unitName: 'unit', @@ -382,6 +404,8 @@ test1_next_field@9: // manager: Global.currentApplicationAddress, // reserve: Global.currentApplicationAddress, // }) + intc_1 // 3 + itxn_field TypeEnum intc_0 // 0 itxn_field Fee // tests/approvals/itxn.algo.ts:72 @@ -417,7 +441,7 @@ test2: // onCompletion: OnCompleteAction.NoOp, intc_0 // 0 frame_bury 5 - intc_1 // 1 + intc_2 // 1 frame_bury 4 // tests/approvals/itxn.algo.ts:84 // note: 'with args param set', @@ -433,7 +457,7 @@ test2_else_body@2: frame_bury 1 pushbytes "5" frame_bury 2 - intc_2 // 3 + intc_1 // 3 frame_bury 3 // tests/approvals/itxn.algo.ts:91 // note: 'no args param set', @@ -449,7 +473,7 @@ test2_after_if_else@3: itxn_begin itxn_field Note frame_dig 4 - intc_1 // 1 + intc_2 // 1 >= bz test2_next_field@5 frame_dig 5 @@ -461,7 +485,7 @@ test2_next_field@5: frame_dig 1 itxn_field ApplicationArgs frame_dig 3 - intc_2 // 3 + intc_1 // 3 >= // tests/approvals/itxn.algo.ts:94 // const createAppTxn = createAppParams.submit() @@ -473,9 +497,9 @@ test2_next_field@7: // tests/approvals/itxn.algo.ts:5 // const APPROVE = Bytes('\x09\x81\x01') bytec 8 // "\t\xc2\x81\x01" - itxn_field ClearStateProgram + itxn_field ClearStateProgramPages bytec 8 // "\t\xc2\x81\x01" - itxn_field ApprovalProgram + itxn_field ApprovalProgramPages // tests/approvals/itxn.algo.ts:79-85 // createAppParams = itxn.applicationCall({ // approvalProgram: APPROVE, @@ -484,6 +508,8 @@ test2_next_field@7: // onCompletion: OnCompleteAction.NoOp, // note: 'with args param set', // }) + pushint 6 // 6 + itxn_field TypeEnum intc_0 // 0 itxn_field Fee // tests/approvals/itxn.algo.ts:94 @@ -499,7 +525,7 @@ test2_next_field@7: assert // correct args used 1 // tests/approvals/itxn.algo.ts:96 // assert(createAppTxn.appArgs(1) === Bytes('2'), 'correct args used 2') - intc_1 // 1 + intc_2 // 1 itxnas ApplicationArgs pushbytes "2" == diff --git a/tests/approvals/out/itxn/ItxnDemoContract.ssa.ir b/tests/approvals/out/itxn/ItxnDemoContract.ssa.ir index bc09e847..07e7e820 100644 --- a/tests/approvals/out/itxn/ItxnDemoContract.ssa.ir +++ b/tests/approvals/out/itxn/ItxnDemoContract.ssa.ir @@ -51,6 +51,8 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let assetParams#0: itxn_field_set = itxn_field_set(0) let assetParams%%param_Fee_idx_0#0: uint64 = 0u let assetParams%%Fee_length#0: uint64 = 1u + let assetParams%%param_TypeEnum_idx_0#0: uint64 = 3u + let assetParams%%TypeEnum_length#0: uint64 = 1u let assetParams%%param_ConfigAssetTotal_idx_0#0: uint64 = 1000u let assetParams%%ConfigAssetTotal_length#0: uint64 = 1u let (maybe_value%0#0: bytes, maybe_exists%0#0: bool) = (app_global_get_ex 0u "name") @@ -76,7 +78,6 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let assetParams%%VoteLast_length#0: uint64 = 0u let assetParams%%VoteKeyDilution_length#0: uint64 = 0u let assetParams%%Type_length#0: uint64 = 0u - let assetParams%%TypeEnum_length#0: uint64 = 0u let assetParams%%XferAsset_length#0: uint64 = 0u let assetParams%%AssetAmount_length#0: uint64 = 0u let assetParams%%AssetSender_length#0: uint64 = 0u @@ -117,6 +118,7 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: ((itxn_field ConfigAssetUnitName) assetParams%%param_ConfigAssetUnitName_idx_0#0) ((itxn_field ConfigAssetName) assetParams%%param_ConfigAssetName_idx_0#0) ((itxn_field ConfigAssetTotal) assetParams%%param_ConfigAssetTotal_idx_0#0) + ((itxn_field TypeEnum) assetParams%%param_TypeEnum_idx_0#0) ((itxn_field Fee) assetParams%%param_Fee_idx_0#0) goto block@1 block@1: // next_txn_L40 @@ -196,6 +198,7 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: ((itxn_field ConfigAssetUnitName) assetParams%%param_ConfigAssetUnitName_idx_0#0) ((itxn_field ConfigAssetName) assetParams%%param_ConfigAssetName_idx_0#1) ((itxn_field ConfigAssetTotal) assetParams%%param_ConfigAssetTotal_idx_0#0) + ((itxn_field TypeEnum) assetParams%%param_TypeEnum_idx_0#0) ((itxn_field Fee) assetParams%%param_Fee_idx_0#0) goto block@2 block@2: // next_txn_L44 @@ -278,10 +281,12 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let appCreateParams#0: itxn_field_set = itxn_field_set(2) let appCreateParams%%param_Fee_idx_0#0: uint64 = 0u let appCreateParams%%Fee_length#0: uint64 = 1u - let appCreateParams%%param_ApprovalProgram_idx_0#0: bytes = 0x098101 - let appCreateParams%%ApprovalProgram_length#0: uint64 = 1u - let appCreateParams%%param_ClearStateProgram_idx_0#0: bytes = 0x098101 - let appCreateParams%%ClearStateProgram_length#0: uint64 = 1u + let appCreateParams%%param_TypeEnum_idx_0#0: uint64 = 6u + let appCreateParams%%TypeEnum_length#0: uint64 = 1u + let appCreateParams%%param_ApprovalProgramPages_idx_0#0: bytes = 0x098101 + let appCreateParams%%ApprovalProgramPages_length#0: uint64 = 1u + let appCreateParams%%param_ClearStateProgramPages_idx_0#0: bytes = 0x098101 + let appCreateParams%%ClearStateProgramPages_length#0: uint64 = 1u let appCreateParams%%Sender_length#0: uint64 = 0u let appCreateParams%%Note_length#0: uint64 = 0u let appCreateParams%%Receiver_length#0: uint64 = 0u @@ -293,7 +298,6 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let appCreateParams%%VoteLast_length#0: uint64 = 0u let appCreateParams%%VoteKeyDilution_length#0: uint64 = 0u let appCreateParams%%Type_length#0: uint64 = 0u - let appCreateParams%%TypeEnum_length#0: uint64 = 0u let appCreateParams%%XferAsset_length#0: uint64 = 0u let appCreateParams%%AssetAmount_length#0: uint64 = 0u let appCreateParams%%AssetSender_length#0: uint64 = 0u @@ -301,6 +305,8 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let appCreateParams%%AssetCloseTo_length#0: uint64 = 0u let appCreateParams%%ApplicationID_length#0: uint64 = 0u let appCreateParams%%OnCompletion_length#0: uint64 = 0u + let appCreateParams%%ApprovalProgram_length#0: uint64 = 0u + let appCreateParams%%ClearStateProgram_length#0: uint64 = 0u let appCreateParams%%RekeyTo_length#0: uint64 = 0u let appCreateParams%%ConfigAsset_length#0: uint64 = 0u let appCreateParams%%ConfigAssetTotal_length#0: uint64 = 0u @@ -328,14 +334,13 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let appCreateParams%%Accounts_length#0: uint64 = 0u let appCreateParams%%Assets_length#0: uint64 = 0u let appCreateParams%%Applications_length#0: uint64 = 0u - let appCreateParams%%ApprovalProgramPages_length#0: uint64 = 0u - let appCreateParams%%ClearStateProgramPages_length#0: uint64 = 0u let assetParams#2: itxn_field_set = itxn_field_set(3) let assetParams%%param_ConfigAssetName_idx_0#2: bytes = "AST3" let assetParams%%ConfigAssetName_length#2: uint64 = 1u itxn_begin - ((itxn_field ClearStateProgram) appCreateParams%%param_ClearStateProgram_idx_0#0) - ((itxn_field ApprovalProgram) appCreateParams%%param_ApprovalProgram_idx_0#0) + ((itxn_field ClearStateProgramPages) appCreateParams%%param_ClearStateProgramPages_idx_0#0) + ((itxn_field ApprovalProgramPages) appCreateParams%%param_ApprovalProgramPages_idx_0#0) + ((itxn_field TypeEnum) appCreateParams%%param_TypeEnum_idx_0#0) ((itxn_field Fee) appCreateParams%%param_Fee_idx_0#0) goto block@3 block@3: // next_txn_L61 @@ -346,6 +351,7 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: ((itxn_field ConfigAssetUnitName) assetParams%%param_ConfigAssetUnitName_idx_0#0) ((itxn_field ConfigAssetName) assetParams%%param_ConfigAssetName_idx_0#2) ((itxn_field ConfigAssetTotal) assetParams%%param_ConfigAssetTotal_idx_0#0) + ((itxn_field TypeEnum) assetParams%%param_TypeEnum_idx_0#0) ((itxn_field Fee) assetParams%%param_Fee_idx_0#0) goto block@4 block@4: // next_txn_L61 @@ -493,8 +499,9 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: ((itxn_field Note) appCreateParams%%param_Note_idx_0#0) goto block@6 block@6: // next_field_L72 - ((itxn_field ClearStateProgram) appCreateParams%%param_ClearStateProgram_idx_0#0) - ((itxn_field ApprovalProgram) appCreateParams%%param_ApprovalProgram_idx_0#0) + ((itxn_field ClearStateProgramPages) appCreateParams%%param_ClearStateProgramPages_idx_0#0) + ((itxn_field ApprovalProgramPages) appCreateParams%%param_ApprovalProgramPages_idx_0#0) + ((itxn_field TypeEnum) appCreateParams%%param_TypeEnum_idx_0#0) ((itxn_field Fee) appCreateParams%%param_Fee_idx_0#0) goto block@7 block@7: // next_txn_L72 @@ -511,6 +518,7 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: ((itxn_field ConfigAssetUnitName) assetParams%%param_ConfigAssetUnitName_idx_0#0) ((itxn_field ConfigAssetName) assetParams%%param_ConfigAssetName_idx_0#2) ((itxn_field ConfigAssetTotal) assetParams%%param_ConfigAssetTotal_idx_0#0) + ((itxn_field TypeEnum) assetParams%%param_TypeEnum_idx_0#0) ((itxn_field Fee) assetParams%%param_Fee_idx_0#0) goto block@10 block@10: // next_txn_L72 @@ -528,10 +536,12 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let createAppParams#0: itxn_field_set = itxn_field_set(0) let createAppParams%%param_Fee_idx_0#0: uint64 = 0u let createAppParams%%Fee_length#0: uint64 = 1u - let createAppParams%%param_ApprovalProgram_idx_0#0: bytes = "\t\xc2\x81\x01" - let createAppParams%%ApprovalProgram_length#0: uint64 = 1u - let createAppParams%%param_ClearStateProgram_idx_0#0: bytes = "\t\xc2\x81\x01" - let createAppParams%%ClearStateProgram_length#0: uint64 = 1u + let createAppParams%%param_TypeEnum_idx_0#0: uint64 = 6u + let createAppParams%%TypeEnum_length#0: uint64 = 1u + let createAppParams%%param_ApprovalProgramPages_idx_0#0: bytes = "\t\xc2\x81\x01" + let createAppParams%%ApprovalProgramPages_length#0: uint64 = 1u + let createAppParams%%param_ClearStateProgramPages_idx_0#0: bytes = "\t\xc2\x81\x01" + let createAppParams%%ClearStateProgramPages_length#0: uint64 = 1u let createAppParams%%param_ApplicationArgs_idx_0#0: bytes = args.0#0 let createAppParams%%param_ApplicationArgs_idx_1#0: bytes = args.1#0 let createAppParams%%ApplicationArgs_length#0: uint64 = 2u @@ -549,13 +559,14 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let createAppParams%%VoteLast_length#0: uint64 = 0u let createAppParams%%VoteKeyDilution_length#0: uint64 = 0u let createAppParams%%Type_length#0: uint64 = 0u - let createAppParams%%TypeEnum_length#0: uint64 = 0u let createAppParams%%XferAsset_length#0: uint64 = 0u let createAppParams%%AssetAmount_length#0: uint64 = 0u let createAppParams%%AssetSender_length#0: uint64 = 0u let createAppParams%%AssetReceiver_length#0: uint64 = 0u let createAppParams%%AssetCloseTo_length#0: uint64 = 0u let createAppParams%%ApplicationID_length#0: uint64 = 0u + let createAppParams%%ApprovalProgram_length#0: uint64 = 0u + let createAppParams%%ClearStateProgram_length#0: uint64 = 0u let createAppParams%%RekeyTo_length#0: uint64 = 0u let createAppParams%%ConfigAsset_length#0: uint64 = 0u let createAppParams%%ConfigAssetTotal_length#0: uint64 = 0u @@ -582,17 +593,17 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let createAppParams%%Accounts_length#0: uint64 = 0u let createAppParams%%Assets_length#0: uint64 = 0u let createAppParams%%Applications_length#0: uint64 = 0u - let createAppParams%%ApprovalProgramPages_length#0: uint64 = 0u - let createAppParams%%ClearStateProgramPages_length#0: uint64 = 0u goto block@3 block@2: // else_body_L86 let createAppParams#1: itxn_field_set = itxn_field_set(1) let createAppParams%%param_Fee_idx_0#1: uint64 = 0u let createAppParams%%Fee_length#1: uint64 = 1u - let createAppParams%%param_ApprovalProgram_idx_0#1: bytes = "\t\xc2\x81\x01" - let createAppParams%%ApprovalProgram_length#1: uint64 = 1u - let createAppParams%%param_ClearStateProgram_idx_0#1: bytes = "\t\xc2\x81\x01" - let createAppParams%%ClearStateProgram_length#1: uint64 = 1u + let createAppParams%%param_TypeEnum_idx_0#1: uint64 = 6u + let createAppParams%%TypeEnum_length#1: uint64 = 1u + let createAppParams%%param_ApprovalProgramPages_idx_0#1: bytes = "\t\xc2\x81\x01" + let createAppParams%%ApprovalProgramPages_length#1: uint64 = 1u + let createAppParams%%param_ClearStateProgramPages_idx_0#1: bytes = "\t\xc2\x81\x01" + let createAppParams%%ClearStateProgramPages_length#1: uint64 = 1u let createAppParams%%param_ApplicationArgs_idx_0#1: bytes = "3" let createAppParams%%param_ApplicationArgs_idx_1#1: bytes = "4" let createAppParams%%param_ApplicationArgs_idx_2#0: bytes = "5" @@ -609,7 +620,6 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let createAppParams%%VoteLast_length#1: uint64 = 0u let createAppParams%%VoteKeyDilution_length#1: uint64 = 0u let createAppParams%%Type_length#1: uint64 = 0u - let createAppParams%%TypeEnum_length#1: uint64 = 0u let createAppParams%%XferAsset_length#1: uint64 = 0u let createAppParams%%AssetAmount_length#1: uint64 = 0u let createAppParams%%AssetSender_length#1: uint64 = 0u @@ -617,6 +627,8 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let createAppParams%%AssetCloseTo_length#1: uint64 = 0u let createAppParams%%ApplicationID_length#1: uint64 = 0u let createAppParams%%OnCompletion_length#1: uint64 = 0u + let createAppParams%%ApprovalProgram_length#1: uint64 = 0u + let createAppParams%%ClearStateProgram_length#1: uint64 = 0u let createAppParams%%RekeyTo_length#1: uint64 = 0u let createAppParams%%ConfigAsset_length#1: uint64 = 0u let createAppParams%%ConfigAssetTotal_length#1: uint64 = 0u @@ -643,8 +655,6 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let createAppParams%%Accounts_length#1: uint64 = 0u let createAppParams%%Assets_length#1: uint64 = 0u let createAppParams%%Applications_length#1: uint64 = 0u - let createAppParams%%ApprovalProgramPages_length#1: uint64 = 0u - let createAppParams%%ClearStateProgramPages_length#1: uint64 = 0u goto block@3 block@3: // after_if_else_L77 let createAppParams%%param_Note_idx_0#2: bytes = φ(createAppParams%%param_Note_idx_0#0 <- block@1, createAppParams%%param_Note_idx_0#1 <- block@2) @@ -654,8 +664,9 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: let createAppParams%%param_ApplicationArgs_idx_1#3: bytes = φ(createAppParams%%param_ApplicationArgs_idx_1#0 <- block@1, createAppParams%%param_ApplicationArgs_idx_1#1 <- block@2) let createAppParams%%ApplicationArgs_length#3: uint64 = φ(createAppParams%%ApplicationArgs_length#0 <- block@1, createAppParams%%ApplicationArgs_length#1 <- block@2) let createAppParams%%param_ApplicationArgs_idx_2#2: bytes = φ(createAppParams%%param_ApplicationArgs_idx_2#3 <- block@1, createAppParams%%param_ApplicationArgs_idx_2#0 <- block@2) - let createAppParams%%param_ClearStateProgram_idx_0#4: bytes = φ(createAppParams%%param_ClearStateProgram_idx_0#0 <- block@1, createAppParams%%param_ClearStateProgram_idx_0#1 <- block@2) - let createAppParams%%param_ApprovalProgram_idx_0#4: bytes = φ(createAppParams%%param_ApprovalProgram_idx_0#0 <- block@1, createAppParams%%param_ApprovalProgram_idx_0#1 <- block@2) + let createAppParams%%param_ClearStateProgramPages_idx_0#4: bytes = φ(createAppParams%%param_ClearStateProgramPages_idx_0#0 <- block@1, createAppParams%%param_ClearStateProgramPages_idx_0#1 <- block@2) + let createAppParams%%param_ApprovalProgramPages_idx_0#4: bytes = φ(createAppParams%%param_ApprovalProgramPages_idx_0#0 <- block@1, createAppParams%%param_ApprovalProgramPages_idx_0#1 <- block@2) + let createAppParams%%param_TypeEnum_idx_0#4: uint64 = φ(createAppParams%%param_TypeEnum_idx_0#0 <- block@1, createAppParams%%param_TypeEnum_idx_0#1 <- block@2) let createAppParams%%param_Fee_idx_0#4: uint64 = φ(createAppParams%%param_Fee_idx_0#0 <- block@1, createAppParams%%param_Fee_idx_0#1 <- block@2) itxn_begin ((itxn_field Note) createAppParams%%param_Note_idx_0#2) @@ -673,8 +684,9 @@ contract tests/approvals/itxn.algo.ts::ItxnDemoContract: ((itxn_field ApplicationArgs) createAppParams%%param_ApplicationArgs_idx_2#2) goto block@7 block@7: // next_field_L94 - ((itxn_field ClearStateProgram) createAppParams%%param_ClearStateProgram_idx_0#4) - ((itxn_field ApprovalProgram) createAppParams%%param_ApprovalProgram_idx_0#4) + ((itxn_field ClearStateProgramPages) createAppParams%%param_ClearStateProgramPages_idx_0#4) + ((itxn_field ApprovalProgramPages) createAppParams%%param_ApprovalProgramPages_idx_0#4) + ((itxn_field TypeEnum) createAppParams%%param_TypeEnum_idx_0#4) ((itxn_field Fee) createAppParams%%param_Fee_idx_0#4) goto block@8 block@8: // next_txn_L94 diff --git a/tests/approvals/out/itxn/itxn.awst b/tests/approvals/out/itxn/itxn.awst index d9bc8455..9254319d 100644 --- a/tests/approvals/out/itxn/itxn.awst +++ b/tests/approvals/out/itxn/itxn.awst @@ -38,7 +38,7 @@ contract ItxnDemoContract test1(): void { GlobalState["name"]: bytes = "AST1" - assetParams: inner_transaction_fields_acfg = create_inner_transaction(Fee=0, ConfigAssetTotal=1000, ConfigAssetName=GlobalState["name"], ConfigAssetUnitName="unit", ConfigAssetDecimals=3, ConfigAssetManager=global(), ConfigAssetReserve=global()) + assetParams: inner_transaction_fields_acfg = create_inner_transaction(Fee=0, TypeEnum=3, ConfigAssetTotal=1000, ConfigAssetName=GlobalState["name"], ConfigAssetUnitName="unit", ConfigAssetDecimals=3, ConfigAssetManager=global(), ConfigAssetReserve=global()) GlobalState["name"]: bytes = "AST2" asset1_txn: inner_transaction_acfg = submit_txn(assetParams) update_inner_transaction(assetParams, ConfigAssetName=GlobalState["name"]) @@ -47,7 +47,7 @@ contract ItxnDemoContract assert(asset2_txn.ConfigAssetName == "AST2", comment=asset2_txn is correct) assert(checked_maybe(asset_params_get(asset1_txn.CreatedAssetID), comment=asset exists) == "AST1", comment=created asset 1 is correct) assert(checked_maybe(asset_params_get(asset2_txn.CreatedAssetID), comment=asset exists) == "AST2", comment=created asset 2 is correct) - appCreateParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, ApprovalProgram=0x098101, ClearStateProgram=0x098101) + appCreateParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, TypeEnum=6, ApprovalProgramPages=[0x098101], ClearStateProgramPages=[0x098101]) update_inner_transaction(assetParams, ConfigAssetName="AST3") [appCreateTxn, asset3_txn]: readonlytuple[inner_transaction_appl, inner_transaction_acfg] = submit_txn(appCreateParams, assetParams) assert(Boolean(appCreateTxn.ApplicationID), comment=app is created) @@ -61,9 +61,9 @@ contract ItxnDemoContract { if (Boolean(txn())) { args: readonlytuple[bytes, bytes] = ["1", "2"] - createAppParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, ApprovalProgram=" ", ClearStateProgram=" ", ApplicationArgs=[args.0, args.1], OnCompletion=0, Note="with args param set") + createAppParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, TypeEnum=6, ApprovalProgramPages=[" "], ClearStateProgramPages=[" "], ApplicationArgs=[args.0, args.1], OnCompletion=0, Note="with args param set") } else { - createAppParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, ApprovalProgram=" ", ClearStateProgram=" ", ApplicationArgs=["3", "4", "5"], Note="no args param set") + createAppParams: inner_transaction_fields_appl = create_inner_transaction(Fee=0, TypeEnum=6, ApprovalProgramPages=[" "], ClearStateProgramPages=[" "], ApplicationArgs=["3", "4", "5"], Note="no args param set") } createAppTxn: inner_transaction_appl = submit_txn(createAppParams) assert(createAppTxn.ApplicationArgs[0] == "1", comment=correct args used 1) diff --git a/tests/approvals/out/itxn/itxn.awst.json b/tests/approvals/out/itxn/itxn.awst.json index b497f14e..512b0e9a 100644 --- a/tests/approvals/out/itxn/itxn.awst.json +++ b/tests/approvals/out/itxn/itxn.awst.json @@ -203,7 +203,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 11, "end_line": 11, - "column": 8, + "column": 12, "end_column": 22 }, "wtype": { @@ -794,7 +794,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 28, "end_line": 28, - "column": 4, + "column": 14, "end_column": 19 }, "wtype": { @@ -910,6 +910,25 @@ "value": "0", "teal_alias": null }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 30, + "end_line": 37, + "column": 24, + "end_column": 6 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "3", + "teal_alias": null + }, "ConfigAssetTotal": { "_type": "IntegerConstant", "source_location": { @@ -935,7 +954,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 32, "end_line": 32, - "column": 17, + "column": 27, "end_column": 32 }, "wtype": { @@ -1010,7 +1029,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 35, "end_line": 35, - "column": 15, + "column": 22, "end_column": 47 }, "wtype": { @@ -1032,7 +1051,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 36, "end_line": 36, - "column": 15, + "column": 22, "end_column": 47 }, "wtype": { @@ -1066,7 +1085,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 39, "end_line": 39, - "column": 4, + "column": 14, "end_column": 19 }, "wtype": { @@ -1237,7 +1256,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 42, "end_line": 42, - "column": 17, + "column": 27, "end_column": 32 }, "wtype": { @@ -1386,7 +1405,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 46, "end_line": 46, - "column": 11, + "column": 22, "end_column": 31 }, "wtype": { @@ -1489,7 +1508,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 47, "end_line": 47, - "column": 11, + "column": 22, "end_column": 31 }, "wtype": { @@ -1592,7 +1611,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 48, "end_line": 48, - "column": 11, + "column": 35, "end_column": 39 }, "wtype": { @@ -1608,7 +1627,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 48, "end_line": 48, - "column": 11, + "column": 35, "end_column": 39 }, "wtype": { @@ -1645,7 +1664,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 48, "end_line": 48, - "column": 11, + "column": 22, "end_column": 34 }, "wtype": { @@ -1752,7 +1771,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 49, "end_line": 49, - "column": 11, + "column": 35, "end_column": 39 }, "wtype": { @@ -1768,7 +1787,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 49, "end_line": 49, - "column": 11, + "column": 35, "end_column": 39 }, "wtype": { @@ -1805,7 +1824,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 49, "end_line": 49, - "column": 11, + "column": 22, "end_column": 34 }, "wtype": { @@ -1930,8 +1949,27 @@ "value": "0", "teal_alias": null }, - "ApprovalProgram": { - "_type": "BytesConstant", + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 51, + "end_line": 55, + "column": 28, + "end_column": 6 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApprovalProgramPages": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 52, @@ -1940,17 +1978,45 @@ "end_column": 46 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] }, - "value": "34s9", - "encoding": "base16" + "items": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 52, + "end_line": 52, + "column": 23, + "end_column": 46 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "34s9", + "encoding": "base16" + } + ] }, - "ClearStateProgram": { - "_type": "BytesConstant", + "ClearStateProgramPages": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 53, @@ -1959,14 +2025,42 @@ "end_column": 48 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] }, - "value": "34s9", - "encoding": "base16" + "items": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 53, + "end_line": 53, + "column": 25, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "34s9", + "encoding": "base16" + } + ] } } } @@ -2246,7 +2340,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 63, "end_line": 63, - "column": 11, + "column": 24, "end_column": 29 }, "wtype": { @@ -2329,7 +2423,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 64, "end_line": 64, - "column": 11, + "column": 22, "end_column": 31 }, "wtype": { @@ -2678,7 +2772,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 77, "end_line": 77, - "column": 8, + "column": 12, "end_column": 22 }, "wtype": { @@ -2897,8 +2991,27 @@ "value": "0", "teal_alias": null }, - "ApprovalProgram": { - "_type": "BytesConstant", + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 79, + "end_line": 85, + "column": 24, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApprovalProgramPages": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 5, @@ -2907,17 +3020,45 @@ "end_column": 36 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] }, - "value": "3BrK^", - "encoding": "utf8" + "items": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 5, + "end_line": 5, + "column": 22, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "3BrK^", + "encoding": "utf8" + } + ] }, - "ClearStateProgram": { - "_type": "BytesConstant", + "ClearStateProgramPages": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 5, @@ -2926,14 +3067,42 @@ "end_column": 36 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] }, - "value": "3BrK^", - "encoding": "utf8" + "items": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 5, + "end_line": 5, + "column": 22, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "3BrK^", + "encoding": "utf8" + } + ] }, "ApplicationArgs": { "_type": "TupleExpression", @@ -3080,7 +3249,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 83, "end_line": 83, - "column": 22, + "column": 39, "end_column": 43 }, "wtype": { @@ -3208,8 +3377,27 @@ "value": "0", "teal_alias": null }, - "ApprovalProgram": { - "_type": "BytesConstant", + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 87, + "end_line": 92, + "column": 24, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApprovalProgramPages": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 5, @@ -3218,17 +3406,45 @@ "end_column": 36 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] }, - "value": "3BrK^", - "encoding": "utf8" + "items": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 5, + "end_line": 5, + "column": 22, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "3BrK^", + "encoding": "utf8" + } + ] }, - "ClearStateProgram": { - "_type": "BytesConstant", + "ClearStateProgramPages": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/itxn.algo.ts", "line": 5, @@ -3237,14 +3453,42 @@ "end_column": 36 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "WTuple", + "name": "tuple", "immutable": true, "ephemeral": false, - "scalar_type": 1 + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] }, - "value": "3BrK^", - "encoding": "utf8" + "items": [ + { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/itxn.algo.ts", + "line": 5, + "end_line": 5, + "column": 22, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "3BrK^", + "encoding": "utf8" + } + ] }, "ApplicationArgs": { "_type": "TupleExpression", @@ -3733,7 +3977,7 @@ "file": "tests/approvals/itxn.algo.ts", "line": 97, "end_line": 97, - "column": 11, + "column": 24, "end_column": 28 }, "wtype": { diff --git a/tests/approvals/out/local-state/local-state.awst.json b/tests/approvals/out/local-state/local-state.awst.json index 39668674..0109ab48 100644 --- a/tests/approvals/out/local-state/local-state.awst.json +++ b/tests/approvals/out/local-state/local-state.awst.json @@ -562,7 +562,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 15, "end_line": 15, - "column": 4, + "column": 31, "end_column": 36 }, "wtype": { @@ -598,7 +598,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 15, "end_line": 15, - "column": 19, + "column": 23, "end_column": 29 }, "wtype": { @@ -649,7 +649,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 16, "end_line": 16, - "column": 4, + "column": 32, "end_column": 37 }, "wtype": { @@ -685,7 +685,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 16, "end_line": 16, - "column": 20, + "column": 24, "end_column": 30 }, "wtype": { @@ -736,7 +736,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 17, "end_line": 17, - "column": 4, + "column": 32, "end_column": 37 }, "wtype": { @@ -772,7 +772,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 17, "end_line": 17, - "column": 20, + "column": 24, "end_column": 30 }, "wtype": { @@ -823,7 +823,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 18, "end_line": 18, - "column": 4, + "column": 33, "end_column": 38 }, "wtype": { @@ -859,7 +859,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 18, "end_line": 18, - "column": 21, + "column": 25, "end_column": 31 }, "wtype": { @@ -910,7 +910,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 19, "end_line": 19, - "column": 4, + "column": 34, "end_column": 39 }, "wtype": { @@ -966,7 +966,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 19, "end_line": 19, - "column": 22, + "column": 26, "end_column": 32 }, "wtype": { @@ -1473,7 +1473,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 24, "end_line": 24, - "column": 17, + "column": 44, "end_column": 49 }, "wtype": { @@ -1509,7 +1509,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 24, "end_line": 24, - "column": 32, + "column": 36, "end_column": 42 }, "wtype": { @@ -1532,7 +1532,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 25, "end_line": 25, - "column": 18, + "column": 46, "end_column": 51 }, "wtype": { @@ -1568,7 +1568,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 25, "end_line": 25, - "column": 34, + "column": 38, "end_column": 44 }, "wtype": { @@ -1591,7 +1591,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 26, "end_line": 26, - "column": 18, + "column": 46, "end_column": 51 }, "wtype": { @@ -1627,7 +1627,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 26, "end_line": 26, - "column": 34, + "column": 38, "end_column": 44 }, "wtype": { @@ -1650,7 +1650,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 27, "end_line": 27, - "column": 19, + "column": 48, "end_column": 53 }, "wtype": { @@ -1686,7 +1686,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 27, "end_line": 27, - "column": 36, + "column": 40, "end_column": 46 }, "wtype": { @@ -1745,7 +1745,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 28, "end_line": 28, - "column": 20, + "column": 50, "end_column": 55 }, "wtype": { @@ -1801,7 +1801,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 28, "end_line": 28, - "column": 38, + "column": 42, "end_column": 48 }, "wtype": { @@ -2008,7 +2008,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 24, "end_line": 24, - "column": 17, + "column": 44, "end_column": 49 }, "wtype": { @@ -2044,7 +2044,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 24, "end_line": 24, - "column": 32, + "column": 36, "end_column": 42 }, "wtype": { @@ -2067,7 +2067,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 25, "end_line": 25, - "column": 18, + "column": 46, "end_column": 51 }, "wtype": { @@ -2103,7 +2103,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 25, "end_line": 25, - "column": 34, + "column": 38, "end_column": 44 }, "wtype": { @@ -2126,7 +2126,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 26, "end_line": 26, - "column": 18, + "column": 46, "end_column": 51 }, "wtype": { @@ -2162,7 +2162,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 26, "end_line": 26, - "column": 34, + "column": 38, "end_column": 44 }, "wtype": { @@ -2185,7 +2185,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 27, "end_line": 27, - "column": 19, + "column": 48, "end_column": 53 }, "wtype": { @@ -2221,7 +2221,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 27, "end_line": 27, - "column": 36, + "column": 40, "end_column": 46 }, "wtype": { @@ -2280,7 +2280,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 28, "end_line": 28, - "column": 20, + "column": 50, "end_column": 55 }, "wtype": { @@ -2336,7 +2336,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 28, "end_line": 28, - "column": 38, + "column": 42, "end_column": 48 }, "wtype": { @@ -2543,7 +2543,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 24, "end_line": 24, - "column": 17, + "column": 44, "end_column": 49 }, "wtype": { @@ -2579,7 +2579,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 24, "end_line": 24, - "column": 32, + "column": 36, "end_column": 42 }, "wtype": { @@ -2602,7 +2602,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 25, "end_line": 25, - "column": 18, + "column": 46, "end_column": 51 }, "wtype": { @@ -2638,7 +2638,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 25, "end_line": 25, - "column": 34, + "column": 38, "end_column": 44 }, "wtype": { @@ -2661,7 +2661,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 26, "end_line": 26, - "column": 18, + "column": 46, "end_column": 51 }, "wtype": { @@ -2697,7 +2697,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 26, "end_line": 26, - "column": 34, + "column": 38, "end_column": 44 }, "wtype": { @@ -2720,7 +2720,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 27, "end_line": 27, - "column": 19, + "column": 48, "end_column": 53 }, "wtype": { @@ -2756,7 +2756,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 27, "end_line": 27, - "column": 36, + "column": 40, "end_column": 46 }, "wtype": { @@ -2815,7 +2815,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 28, "end_line": 28, - "column": 20, + "column": 50, "end_column": 55 }, "wtype": { @@ -2871,7 +2871,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 28, "end_line": 28, - "column": 38, + "column": 42, "end_column": 48 }, "wtype": { @@ -3078,7 +3078,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 24, "end_line": 24, - "column": 17, + "column": 44, "end_column": 49 }, "wtype": { @@ -3114,7 +3114,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 24, "end_line": 24, - "column": 32, + "column": 36, "end_column": 42 }, "wtype": { @@ -3137,7 +3137,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 25, "end_line": 25, - "column": 18, + "column": 46, "end_column": 51 }, "wtype": { @@ -3173,7 +3173,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 25, "end_line": 25, - "column": 34, + "column": 38, "end_column": 44 }, "wtype": { @@ -3196,7 +3196,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 26, "end_line": 26, - "column": 18, + "column": 46, "end_column": 51 }, "wtype": { @@ -3232,7 +3232,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 26, "end_line": 26, - "column": 34, + "column": 38, "end_column": 44 }, "wtype": { @@ -3255,7 +3255,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 27, "end_line": 27, - "column": 19, + "column": 48, "end_column": 53 }, "wtype": { @@ -3291,7 +3291,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 27, "end_line": 27, - "column": 36, + "column": 40, "end_column": 46 }, "wtype": { @@ -3350,7 +3350,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 28, "end_line": 28, - "column": 20, + "column": 50, "end_column": 55 }, "wtype": { @@ -3406,7 +3406,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 28, "end_line": 28, - "column": 38, + "column": 42, "end_column": 48 }, "wtype": { @@ -3633,7 +3633,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 24, "end_line": 24, - "column": 17, + "column": 44, "end_column": 49 }, "wtype": { @@ -3669,7 +3669,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 24, "end_line": 24, - "column": 32, + "column": 36, "end_column": 42 }, "wtype": { @@ -3692,7 +3692,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 25, "end_line": 25, - "column": 18, + "column": 46, "end_column": 51 }, "wtype": { @@ -3728,7 +3728,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 25, "end_line": 25, - "column": 34, + "column": 38, "end_column": 44 }, "wtype": { @@ -3751,7 +3751,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 26, "end_line": 26, - "column": 18, + "column": 46, "end_column": 51 }, "wtype": { @@ -3787,7 +3787,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 26, "end_line": 26, - "column": 34, + "column": 38, "end_column": 44 }, "wtype": { @@ -3810,7 +3810,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 27, "end_line": 27, - "column": 19, + "column": 48, "end_column": 53 }, "wtype": { @@ -3846,7 +3846,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 27, "end_line": 27, - "column": 36, + "column": 40, "end_column": 46 }, "wtype": { @@ -3905,7 +3905,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 28, "end_line": 28, - "column": 20, + "column": 50, "end_column": 55 }, "wtype": { @@ -3961,7 +3961,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 28, "end_line": 28, - "column": 38, + "column": 42, "end_column": 48 }, "wtype": { @@ -4140,7 +4140,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 33, "end_line": 33, - "column": 19, + "column": 23, "end_column": 29 }, "wtype": { @@ -4226,7 +4226,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 34, "end_line": 34, - "column": 20, + "column": 24, "end_column": 30 }, "wtype": { @@ -4312,7 +4312,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 35, "end_line": 35, - "column": 20, + "column": 24, "end_column": 30 }, "wtype": { @@ -4398,7 +4398,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 36, "end_line": 36, - "column": 21, + "column": 25, "end_column": 31 }, "wtype": { @@ -4504,7 +4504,7 @@ "file": "tests/approvals/local-state.algo.ts", "line": 37, "end_line": 37, - "column": 22, + "column": 26, "end_column": 32 }, "wtype": { diff --git a/tests/approvals/out/logic-sig/logic-sig.awst.json b/tests/approvals/out/logic-sig/logic-sig.awst.json index 4c61163b..b54078fa 100644 --- a/tests/approvals/out/logic-sig/logic-sig.awst.json +++ b/tests/approvals/out/logic-sig/logic-sig.awst.json @@ -155,7 +155,7 @@ "file": "tests/approvals/logic-sig.algo.ts", "line": 10, "end_line": 10, - "column": 9, + "column": 13, "end_column": 16 }, "wtype": { diff --git a/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst.json b/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst.json index 1254d48d..06a0b4d5 100644 --- a/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst.json +++ b/tests/approvals/out/pre-approved-sale/pre-approved-sale.awst.json @@ -903,7 +903,7 @@ "file": "tests/approvals/pre-approved-sale.algo.ts", "line": 27, "end_line": 27, - "column": 20, + "column": 27, "end_column": 38 }, "wtype": { @@ -987,7 +987,7 @@ "file": "tests/approvals/pre-approved-sale.algo.ts", "line": 28, "end_line": 28, - "column": 15, + "column": 22, "end_column": 33 }, "wtype": { diff --git a/tests/approvals/out/precompiled-apps/Hello.approval.teal b/tests/approvals/out/precompiled-apps/Hello.approval.teal new file mode 100644 index 00000000..1557f688 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/Hello.approval.teal @@ -0,0 +1,205 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::Hello.approvalProgram: + intcblock 0 1 + bytecblock "greeting" "" + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/precompiled-apps.algo.ts::Hello.constructor() -> void: +constructor: + // tests/approvals/precompiled-apps.algo.ts:17 + // export class Hello extends HelloBase { + proto 0 0 + callsub tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() -> void: +tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor: + // tests/approvals/precompiled-apps.algo.ts:3 + // abstract class HelloBase extends Contract { + proto 0 0 + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + bytec_1 // "" + app_global_put + retsub + + +// tests/approvals/precompiled-apps.algo.ts::Hello.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/precompiled-apps.algo.ts:17 + // export class Hello extends HelloBase { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@8 + txna ApplicationArgs 0 + pushbytes 0x20df3a54 // method "create(string)void" + pushbytes 0x24378d3c // method "delete()void" + pushbytes 0xa0e81872 // method "update()void" + pushbytes 0xd0a28200 // method "greet(string)string" + uncover 4 + match __puya_arc4_router___create_route@2 __puya_arc4_router___delete_route@3 __puya_arc4_router___update_route@4 __puya_arc4_router___greet_route@5 + b __puya_arc4_router___switch_case_default@6 + +__puya_arc4_router___create_route@2: + // tests/approvals/precompiled-apps.algo.ts:18 + // @abimethod({ onCreate: 'require' }) + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + // tests/approvals/precompiled-apps.algo.ts:17 + // export class Hello extends HelloBase { + txna ApplicationArgs 1 + extract 2 0 + // tests/approvals/precompiled-apps.algo.ts:18 + // @abimethod({ onCreate: 'require' }) + callsub create + intc_1 // 1 + retsub + +__puya_arc4_router___delete_route@3: + // tests/approvals/precompiled-apps.algo.ts:6 + // @abimethod({ allowActions: 'DeleteApplication' }) + txn OnCompletion + pushint 5 // DeleteApplication + == + assert // OnCompletion is not DeleteApplication + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub delete + intc_1 // 1 + retsub + +__puya_arc4_router___update_route@4: + // tests/approvals/precompiled-apps.algo.ts:9 + // @abimethod({ allowActions: 'UpdateApplication' }) + txn OnCompletion + pushint 4 // UpdateApplication + == + assert // OnCompletion is not UpdateApplication + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub update + intc_1 // 1 + retsub + +__puya_arc4_router___greet_route@5: + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/precompiled-apps.algo.ts:17 + // export class Hello extends HelloBase { + txna ApplicationArgs 1 + extract 2 0 + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + callsub greet + dup + len + itob + extract 6 2 + swap + concat + pushbytes 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@6: + b __puya_arc4_router___after_if_else@9 + +__puya_arc4_router___bare_routing@8: + +__puya_arc4_router___after_if_else@9: + // tests/approvals/precompiled-apps.algo.ts:17 + // export class Hello extends HelloBase { + intc_0 // 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::Hello.create(greeting: bytes) -> void: +create: + // tests/approvals/precompiled-apps.algo.ts:18-19 + // @abimethod({ onCreate: 'require' }) + // create(greeting: string) { + proto 1 0 + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + // tests/approvals/precompiled-apps.algo.ts:20 + // this.greeting.value = greeting + frame_dig -1 + app_global_put + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() -> void: +delete: + // tests/approvals/precompiled-apps.algo.ts:6-7 + // @abimethod({ allowActions: 'DeleteApplication' }) + // delete() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.update() -> void: +update: + // tests/approvals/precompiled-apps.algo.ts:9-10 + // @abimethod({ allowActions: 'UpdateApplication' }) + // update() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(name: bytes) -> bytes: +greet: + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + proto 1 1 + // tests/approvals/precompiled-apps.algo.ts:13 + // return `${this.greeting.value} ${name}` + intc_0 // 0 + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + // tests/approvals/precompiled-apps.algo.ts:13 + // return `${this.greeting.value} ${name}` + app_global_get_ex + assert // check GlobalState exists + bytec_1 // "" + swap + concat + pushbytes " " + concat + frame_dig -1 + concat + retsub diff --git a/tests/approvals/out/precompiled-apps/Hello.arc32.json b/tests/approvals/out/precompiled-apps/Hello.arc32.json new file mode 100644 index 00000000..faf5ac86 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/Hello.arc32.json @@ -0,0 +1,102 @@ +{ + "hints": { + "create(string)void": { + "call_config": { + "no_op": "CREATE" + } + }, + "delete()void": { + "call_config": { + "delete_application": "CALL" + } + }, + "update()void": { + "call_config": { + "update_application": "CALL" + } + }, + "greet(string)string": { + "call_config": { + "no_op": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsby5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBieXRlY2Jsb2NrICJncmVldGluZyIgIiIKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICBibnogbWFpbl9hZnRlcl9pZl9lbHNlQDIKICAgIGNhbGxzdWIgY29uc3RydWN0b3IKCm1haW5fYWZ0ZXJfaWZfZWxzZUAyOgogICAgY2FsbHN1YiBfX3B1eWFfYXJjNF9yb3V0ZXJfXwogICAgcmV0dXJuCgoKLy8gdGVzdHMvYXBwcm92YWxzL3ByZWNvbXBpbGVkLWFwcHMuYWxnby50czo6SGVsbG8uY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6MTcKICAgIC8vIGV4cG9ydCBjbGFzcyBIZWxsbyBleHRlbmRzIEhlbGxvQmFzZSB7CiAgICBwcm90byAwIDAKICAgIGNhbGxzdWIgdGVzdHMvYXBwcm92YWxzL3ByZWNvbXBpbGVkLWFwcHMuYWxnby50czo6SGVsbG9CYXNlLmNvbnN0cnVjdG9yCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb0Jhc2UuY29uc3RydWN0b3IoKSAtPiB2b2lkOgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb0Jhc2UuY29uc3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Z3JlZXRpbmcudmFsdWV9ICR7bmFtZX1gCiAgICBhcHBfZ2xvYmFsX2dldF9leAogICAgYXNzZXJ0IC8vIGNoZWNrIEdsb2JhbFN0YXRlIGV4aXN0cwogICAgYnl0ZWNfMSAvLyAiIgogICAgc3dhcAogICAgY29uY2F0CiAgICBwdXNoYnl0ZXMgIiAiCiAgICBjb25jYXQKICAgIGZyYW1lX2RpZyAtMQogICAgY29uY2F0CiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsby5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "state": { + "global": { + "num_byte_slices": 1, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": { + "greeting": { + "type": "bytes", + "key": "greeting" + } + }, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "Hello", + "methods": [ + { + "name": "create", + "args": [ + { + "type": "string", + "name": "greeting" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "delete", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "update", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "readonly": false, + "returns": { + "type": "string" + } + } + ], + "networks": {} + }, + "bare_call_config": {} +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/Hello.arc56.json b/tests/approvals/out/precompiled-apps/Hello.arc56.json new file mode 100644 index 00000000..8f350531 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/Hello.arc56.json @@ -0,0 +1,173 @@ +{ + "name": "Hello", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [ + { + "type": "string", + "name": "greeting" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "delete", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "DeleteApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "update", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "UpdateApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 1 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "greeting": { + "keyType": "AVMString", + "valueType": "AVMString", + "key": "Z3JlZXRpbmc=" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 121 + ], + "errorMessage": "OnCompletion is not DeleteApplication" + }, + { + "pc": [ + 99, + 152 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 137 + ], + "errorMessage": "OnCompletion is not UpdateApplication" + }, + { + "pc": [ + 104 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 126, + 142, + 157 + ], + "errorMessage": "can only call when not creating" + }, + { + "pc": [ + 213 + ], + "errorMessage": "check GlobalState exists" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsby5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ICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsby5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/Hello.clear.teal b/tests/approvals/out/precompiled-apps/Hello.clear.teal new file mode 100644 index 00000000..a33c7923 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/Hello.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::Hello.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/precompiled-apps/Hello.ssa.ir b/tests/approvals/out/precompiled-apps/Hello.ssa.ir new file mode 100644 index 00000000..6d7216ab --- /dev/null +++ b/tests/approvals/out/precompiled-apps/Hello.ssa.ir @@ -0,0 +1,112 @@ +contract tests/approvals/precompiled-apps.algo.ts::Hello: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/precompiled-apps.algo.ts::Hello.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/precompiled-apps.algo.ts::Hello.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/precompiled-apps.algo.ts::Hello.constructor() -> void: + block@0: // L17 + tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() -> void: + block@0: // L3 + (app_global_put "greeting" "") + return + + subroutine tests/approvals/precompiled-apps.algo.ts::Hello.__puya_arc4_router__() -> bool: + block@0: // L17 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@8 + block@1: // abi_routing_L17 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create(string)void" => block@2, method "delete()void" => block@3, method "update()void" => block@4, method "greet(string)string" => block@5, * => block@6} + block@2: // create_route_L18 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (== tmp%5#0 0u) + (assert tmp%6#0) // can only call when creating + let tmp%7#0: bytes = (txna ApplicationArgs 1) + let tmp%8#0: bytes = ((extract 2 0) tmp%7#0) + tests/approvals/precompiled-apps.algo.ts::Hello.create(tmp%8#0) + return 1u + block@3: // delete_route_L6 + let tmp%9#0: uint64 = (txn OnCompletion) + let tmp%10#0: bool = (== tmp%9#0 DeleteApplication) + (assert tmp%10#0) // OnCompletion is not DeleteApplication + let tmp%11#0: uint64 = (txn ApplicationID) + let tmp%12#0: bool = (!= tmp%11#0 0u) + (assert tmp%12#0) // can only call when not creating + tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() + return 1u + block@4: // update_route_L9 + let tmp%13#0: uint64 = (txn OnCompletion) + let tmp%14#0: bool = (== tmp%13#0 UpdateApplication) + (assert tmp%14#0) // OnCompletion is not UpdateApplication + let tmp%15#0: uint64 = (txn ApplicationID) + let tmp%16#0: bool = (!= tmp%15#0 0u) + (assert tmp%16#0) // can only call when not creating + tests/approvals/precompiled-apps.algo.ts::HelloBase.update() + return 1u + block@5: // greet_route_L12 + let tmp%17#0: uint64 = (txn OnCompletion) + let tmp%18#0: bool = (== tmp%17#0 NoOp) + (assert tmp%18#0) // OnCompletion is not NoOp + let tmp%19#0: uint64 = (txn ApplicationID) + let tmp%20#0: bool = (!= tmp%19#0 0u) + (assert tmp%20#0) // can only call when not creating + let tmp%21#0: bytes = (txna ApplicationArgs 1) + let tmp%22#0: bytes = ((extract 2 0) tmp%21#0) + let to_encode%0#0: bytes = tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(tmp%22#0) + let length%0#0: uint64 = (len to_encode%0#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 to_encode%0#0) + let tmp%23#0: bytes = (concat 0x151f7c75 encoded_value%0#0) + (log tmp%23#0) + return 1u + block@6: // switch_case_default_L17 + goto block@7 + block@7: // switch_case_next_L17 + goto block@9 + block@8: // bare_routing_L17 + goto block@9 + block@9: // after_if_else_L17 + return 0u + + subroutine tests/approvals/precompiled-apps.algo.ts::Hello.create(greeting: bytes) -> void: + block@0: // L18 + (app_global_put "greeting" greeting#0) + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() -> void: + block@0: // L6 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.update() -> void: + block@0: // L9 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(name: bytes) -> bytes: + block@0: // L12 + let (maybe_value%0#0: bytes, maybe_exists%0#0: bool) = (app_global_get_ex 0u "greeting") + (assert maybe_exists%0#0) // check GlobalState exists + let tmp%0#0: bytes = (concat "" maybe_value%0#0) + let tmp%1#0: bytes = (concat tmp%0#0 " ") + let tmp%2#0: bytes = (concat tmp%1#0 name#0) + return tmp%2#0 + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/HelloTemplate.approval.teal b/tests/approvals/out/precompiled-apps/HelloTemplate.approval.teal new file mode 100644 index 00000000..bd1b4182 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplate.approval.teal @@ -0,0 +1,204 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::HelloTemplate.approvalProgram: + intcblock 0 1 + bytecblock "greeting" "" TMPL_GREETING + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/precompiled-apps.algo.ts::HelloTemplate.constructor() -> void: +constructor: + // tests/approvals/precompiled-apps.algo.ts:25-28 + // constructor() { + // super() + // this.greeting.value = TemplateVar('GREETING') + // } + proto 0 0 + // tests/approvals/precompiled-apps.algo.ts:26 + // super() + callsub tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + // tests/approvals/precompiled-apps.algo.ts:27 + // this.greeting.value = TemplateVar('GREETING') + bytec_2 // TMPL_GREETING + app_global_put + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() -> void: +tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor: + // tests/approvals/precompiled-apps.algo.ts:3 + // abstract class HelloBase extends Contract { + proto 0 0 + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + bytec_1 // "" + app_global_put + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloTemplate.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/precompiled-apps.algo.ts:24 + // export class HelloTemplate extends HelloBase { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@8 + txna ApplicationArgs 0 + pushbytes 0x4c5c61ba // method "create()void" + pushbytes 0x24378d3c // method "delete()void" + pushbytes 0xa0e81872 // method "update()void" + pushbytes 0xd0a28200 // method "greet(string)string" + uncover 4 + match __puya_arc4_router___create_route@2 __puya_arc4_router___delete_route@3 __puya_arc4_router___update_route@4 __puya_arc4_router___greet_route@5 + b __puya_arc4_router___switch_case_default@6 + +__puya_arc4_router___create_route@2: + // tests/approvals/precompiled-apps.algo.ts:30 + // @abimethod({ onCreate: 'require' }) + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub create + intc_1 // 1 + retsub + +__puya_arc4_router___delete_route@3: + // tests/approvals/precompiled-apps.algo.ts:6 + // @abimethod({ allowActions: 'DeleteApplication' }) + txn OnCompletion + pushint 5 // DeleteApplication + == + assert // OnCompletion is not DeleteApplication + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub delete + intc_1 // 1 + retsub + +__puya_arc4_router___update_route@4: + // tests/approvals/precompiled-apps.algo.ts:9 + // @abimethod({ allowActions: 'UpdateApplication' }) + txn OnCompletion + pushint 4 // UpdateApplication + == + assert // OnCompletion is not UpdateApplication + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub update + intc_1 // 1 + retsub + +__puya_arc4_router___greet_route@5: + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/precompiled-apps.algo.ts:24 + // export class HelloTemplate extends HelloBase { + txna ApplicationArgs 1 + extract 2 0 + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + callsub greet + dup + len + itob + extract 6 2 + swap + concat + pushbytes 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@6: + b __puya_arc4_router___after_if_else@9 + +__puya_arc4_router___bare_routing@8: + +__puya_arc4_router___after_if_else@9: + // tests/approvals/precompiled-apps.algo.ts:24 + // export class HelloTemplate extends HelloBase { + intc_0 // 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloTemplate.create() -> void: +create: + // tests/approvals/precompiled-apps.algo.ts:30-31 + // @abimethod({ onCreate: 'require' }) + // create() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() -> void: +delete: + // tests/approvals/precompiled-apps.algo.ts:6-7 + // @abimethod({ allowActions: 'DeleteApplication' }) + // delete() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.update() -> void: +update: + // tests/approvals/precompiled-apps.algo.ts:9-10 + // @abimethod({ allowActions: 'UpdateApplication' }) + // update() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(name: bytes) -> bytes: +greet: + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + proto 1 1 + // tests/approvals/precompiled-apps.algo.ts:13 + // return `${this.greeting.value} ${name}` + intc_0 // 0 + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + // tests/approvals/precompiled-apps.algo.ts:13 + // return `${this.greeting.value} ${name}` + app_global_get_ex + assert // check GlobalState exists + bytec_1 // "" + swap + concat + pushbytes " " + concat + frame_dig -1 + concat + retsub diff --git a/tests/approvals/out/precompiled-apps/HelloTemplate.arc32.json b/tests/approvals/out/precompiled-apps/HelloTemplate.arc32.json new file mode 100644 index 00000000..cefc6382 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplate.arc32.json @@ -0,0 +1,97 @@ +{ + "hints": { + "create()void": { + "call_config": { + "no_op": "CREATE" + } + }, + "delete()void": { + "call_config": { + "delete_application": "CALL" + } + }, + "update()void": { + "call_config": { + "update_application": "CALL" + } + }, + "greet(string)string": { + "call_config": { + "no_op": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb1RlbXBsYXRlLmFwcHJvdmFsUHJvZ3JhbToKICAgIGludGNibG9jayAwIDEKICAgIGJ5dGVjYmxvY2sgImdyZWV0aW5nIiAiIiBUTVBMX0dSRUVUSU5HCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fYWZ0ZXJfa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IDEKICAgIHJldHVybgo=" + }, + "state": { + "global": { + "num_byte_slices": 1, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": { + "greeting": { + "type": "bytes", + "key": "greeting" + } + }, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "HelloTemplate", + "methods": [ + { + "name": "create", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "delete", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "update", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "readonly": false, + "returns": { + "type": "string" + } + } + ], + "networks": {} + }, + "bare_call_config": {} +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/HelloTemplate.arc56.json b/tests/approvals/out/precompiled-apps/HelloTemplate.arc56.json new file mode 100644 index 00000000..891e5eee --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplate.arc56.json @@ -0,0 +1,172 @@ +{ + "name": "HelloTemplate", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "delete", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "DeleteApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "update", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "UpdateApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 1 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "greeting": { + "keyType": "AVMString", + "valueType": "AVMString", + "key": "Z3JlZXRpbmc=" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 101 + ], + "errorMessage": "OnCompletion is not DeleteApplication" + }, + { + "pc": [ + 85, + 132 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 117 + ], + "errorMessage": "OnCompletion is not UpdateApplication" + }, + { + "pc": [ + 90 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 106, + 122, + 137 + ], + "errorMessage": "can only call when not creating" + }, + { + "pc": [ + 189 + ], + "errorMessage": "check GlobalState exists" + } + ], + "pcOffsetMethod": "cblocks" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb1RlbXBsYXRlLmFwcHJvdmFsUHJvZ3JhbToKICAgIGludGNibG9jayAwIDEKICAgIGJ5dGVjYmxvY2sgImdyZWV0aW5nIiAiIiBUTVBMX0dSRUVUSU5HCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fYWZ0ZXJfaWZfZWxzZUAyCiAgICBjYWxsc3ViIGNvbnN0cnVjdG9yCgptYWluX2FmdGVyX2lmX2Vsc2VAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6OkhlbGxvVGVtcGxhdGUuY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3R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AgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6MTMKICAgIC8vIHJldHVybiBgJHt0aGlzLmdyZWV0aW5nLnZhbHVlfSAke25hbWV9YAogICAgaW50Y18wIC8vIDAKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6NAogICAgLy8gZ3JlZXRpbmcgPSBHbG9iYWxTdGF0ZSh7IGluaXRpYWxWYWx1ZTogJycgfSkKICAgIGJ5dGVjXzAgLy8gImdyZWV0aW5nIgogICAgLy8gdGVzdHMvYXBwcm92YWxzL3ByZWNvbXBpbGVkLWFwcHMuYWxnby50czoxMwogICAgLy8gcmV0dXJuIGAke3RoaXMuZ3JlZXRpbmcudmFsdWV9ICR7bmFtZX1gCiAgICBhcHBfZ2xvYmFsX2dldF9leAogICAgYXNzZXJ0IC8vIGNoZWNrIEdsb2JhbFN0YXRlIGV4aXN0cwogICAgYnl0ZWNfMSAvLyAiIgogICAgc3dhcAogICAgY29uY2F0CiAgICBwdXNoYnl0ZXMgIiAiCiAgICBjb25jYXQKICAgIGZyYW1lX2RpZyAtMQogICAgY29uY2F0CiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb1RlbXBsYXRlLmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "events": [], + "templateVariables": { + "GREETING": { + "type": "AVMString" + } + } +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/HelloTemplate.clear.teal b/tests/approvals/out/precompiled-apps/HelloTemplate.clear.teal new file mode 100644 index 00000000..13971dea --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplate.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::HelloTemplate.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/precompiled-apps/HelloTemplate.ssa.ir b/tests/approvals/out/precompiled-apps/HelloTemplate.ssa.ir new file mode 100644 index 00000000..e7d9b922 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplate.ssa.ir @@ -0,0 +1,110 @@ +contract tests/approvals/precompiled-apps.algo.ts::HelloTemplate: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/precompiled-apps.algo.ts::HelloTemplate.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/precompiled-apps.algo.ts::HelloTemplate.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloTemplate.constructor() -> void: + block@0: // L25 + tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() + (app_global_put "greeting" TemplateVar[bytes](TMPL_GREETING)) + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() -> void: + block@0: // L3 + (app_global_put "greeting" "") + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloTemplate.__puya_arc4_router__() -> bool: + block@0: // L24 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@8 + block@1: // abi_routing_L24 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "delete()void" => block@3, method "update()void" => block@4, method "greet(string)string" => block@5, * => block@6} + block@2: // create_route_L30 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (== tmp%5#0 0u) + (assert tmp%6#0) // can only call when creating + tests/approvals/precompiled-apps.algo.ts::HelloTemplate.create() + return 1u + block@3: // delete_route_L6 + let tmp%7#0: uint64 = (txn OnCompletion) + let tmp%8#0: bool = (== tmp%7#0 DeleteApplication) + (assert tmp%8#0) // OnCompletion is not DeleteApplication + let tmp%9#0: uint64 = (txn ApplicationID) + let tmp%10#0: bool = (!= tmp%9#0 0u) + (assert tmp%10#0) // can only call when not creating + tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() + return 1u + block@4: // update_route_L9 + let tmp%11#0: uint64 = (txn OnCompletion) + let tmp%12#0: bool = (== tmp%11#0 UpdateApplication) + (assert tmp%12#0) // OnCompletion is not UpdateApplication + let tmp%13#0: uint64 = (txn ApplicationID) + let tmp%14#0: bool = (!= tmp%13#0 0u) + (assert tmp%14#0) // can only call when not creating + tests/approvals/precompiled-apps.algo.ts::HelloBase.update() + return 1u + block@5: // greet_route_L12 + let tmp%15#0: uint64 = (txn OnCompletion) + let tmp%16#0: bool = (== tmp%15#0 NoOp) + (assert tmp%16#0) // OnCompletion is not NoOp + let tmp%17#0: uint64 = (txn ApplicationID) + let tmp%18#0: bool = (!= tmp%17#0 0u) + (assert tmp%18#0) // can only call when not creating + let tmp%19#0: bytes = (txna ApplicationArgs 1) + let tmp%20#0: bytes = ((extract 2 0) tmp%19#0) + let to_encode%0#0: bytes = tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(tmp%20#0) + let length%0#0: uint64 = (len to_encode%0#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 to_encode%0#0) + let tmp%21#0: bytes = (concat 0x151f7c75 encoded_value%0#0) + (log tmp%21#0) + return 1u + block@6: // switch_case_default_L24 + goto block@7 + block@7: // switch_case_next_L24 + goto block@9 + block@8: // bare_routing_L24 + goto block@9 + block@9: // after_if_else_L24 + return 0u + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloTemplate.create() -> void: + block@0: // L30 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() -> void: + block@0: // L6 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.update() -> void: + block@0: // L9 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(name: bytes) -> bytes: + block@0: // L12 + let (maybe_value%0#0: bytes, maybe_exists%0#0: bool) = (app_global_get_ex 0u "greeting") + (assert maybe_exists%0#0) // check GlobalState exists + let tmp%0#0: bytes = (concat "" maybe_value%0#0) + let tmp%1#0: bytes = (concat tmp%0#0 " ") + let tmp%2#0: bytes = (concat tmp%1#0 name#0) + return tmp%2#0 + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.approval.teal b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.approval.teal new file mode 100644 index 00000000..86914a38 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.approval.teal @@ -0,0 +1,204 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.approvalProgram: + intcblock 0 1 + bytecblock "greeting" "" PRFX_GREETING + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.constructor() -> void: +constructor: + // tests/approvals/precompiled-apps.algo.ts:35-38 + // constructor() { + // super() + // this.greeting.value = TemplateVar('GREETING', 'PRFX_') + // } + proto 0 0 + // tests/approvals/precompiled-apps.algo.ts:36 + // super() + callsub tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + // tests/approvals/precompiled-apps.algo.ts:37 + // this.greeting.value = TemplateVar('GREETING', 'PRFX_') + bytec_2 // PRFX_GREETING + app_global_put + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() -> void: +tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor: + // tests/approvals/precompiled-apps.algo.ts:3 + // abstract class HelloBase extends Contract { + proto 0 0 + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + bytec_1 // "" + app_global_put + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/precompiled-apps.algo.ts:34 + // export class HelloTemplateCustomPrefix extends HelloBase { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@8 + txna ApplicationArgs 0 + pushbytes 0x4c5c61ba // method "create()void" + pushbytes 0x24378d3c // method "delete()void" + pushbytes 0xa0e81872 // method "update()void" + pushbytes 0xd0a28200 // method "greet(string)string" + uncover 4 + match __puya_arc4_router___create_route@2 __puya_arc4_router___delete_route@3 __puya_arc4_router___update_route@4 __puya_arc4_router___greet_route@5 + b __puya_arc4_router___switch_case_default@6 + +__puya_arc4_router___create_route@2: + // tests/approvals/precompiled-apps.algo.ts:40 + // @abimethod({ onCreate: 'require' }) + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub create + intc_1 // 1 + retsub + +__puya_arc4_router___delete_route@3: + // tests/approvals/precompiled-apps.algo.ts:6 + // @abimethod({ allowActions: 'DeleteApplication' }) + txn OnCompletion + pushint 5 // DeleteApplication + == + assert // OnCompletion is not DeleteApplication + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub delete + intc_1 // 1 + retsub + +__puya_arc4_router___update_route@4: + // tests/approvals/precompiled-apps.algo.ts:9 + // @abimethod({ allowActions: 'UpdateApplication' }) + txn OnCompletion + pushint 4 // UpdateApplication + == + assert // OnCompletion is not UpdateApplication + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub update + intc_1 // 1 + retsub + +__puya_arc4_router___greet_route@5: + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/precompiled-apps.algo.ts:34 + // export class HelloTemplateCustomPrefix extends HelloBase { + txna ApplicationArgs 1 + extract 2 0 + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + callsub greet + dup + len + itob + extract 6 2 + swap + concat + pushbytes 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@6: + b __puya_arc4_router___after_if_else@9 + +__puya_arc4_router___bare_routing@8: + +__puya_arc4_router___after_if_else@9: + // tests/approvals/precompiled-apps.algo.ts:34 + // export class HelloTemplateCustomPrefix extends HelloBase { + intc_0 // 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.create() -> void: +create: + // tests/approvals/precompiled-apps.algo.ts:40-41 + // @abimethod({ onCreate: 'require' }) + // create() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() -> void: +delete: + // tests/approvals/precompiled-apps.algo.ts:6-7 + // @abimethod({ allowActions: 'DeleteApplication' }) + // delete() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.update() -> void: +update: + // tests/approvals/precompiled-apps.algo.ts:9-10 + // @abimethod({ allowActions: 'UpdateApplication' }) + // update() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(name: bytes) -> bytes: +greet: + // tests/approvals/precompiled-apps.algo.ts:12 + // greet(name: string): string { + proto 1 1 + // tests/approvals/precompiled-apps.algo.ts:13 + // return `${this.greeting.value} ${name}` + intc_0 // 0 + // tests/approvals/precompiled-apps.algo.ts:4 + // greeting = GlobalState({ initialValue: '' }) + bytec_0 // "greeting" + // tests/approvals/precompiled-apps.algo.ts:13 + // return `${this.greeting.value} ${name}` + app_global_get_ex + assert // check GlobalState exists + bytec_1 // "" + swap + concat + pushbytes " " + concat + frame_dig -1 + concat + retsub diff --git a/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.arc32.json b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.arc32.json new file mode 100644 index 00000000..33927c0f --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.arc32.json @@ -0,0 +1,97 @@ +{ + "hints": { + "create()void": { + "call_config": { + "no_op": "CREATE" + } + }, + "delete()void": { + "call_config": { + "delete_application": "CALL" + } + }, + "update()void": { + "call_config": { + "update_application": "CALL" + } + }, + "greet(string)string": { + "call_config": { + "no_op": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb1RlbXBsYXRlQ3VzdG9tUHJlZml4LmFwcHJvdmFsUHJvZ3JhbToKICAgIGludGNibG9jayAwIDEKICAgIGJ5dGVjYmxvY2sgImdyZWV0aW5nIiAiIiBQUkZYX0dSRUVUSU5HCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fYWZ0ZXJfaWZfZWxzZUAyCiAgICBjYWxsc3ViIGNvbnN0cnVjdG9yCgptYWluX2FmdGVyX2lmX2Vsc2VAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6OkhlbGxvVGVtcGxhdGVDdXN0b21QcmVmaXguY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3Rvcj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21waWxlZC1hcHBzLmFsZ28udHM6MTIKICAgIC8vIGdyZWV0KG5hbWU6IHN0cmluZyk6IHN0cmluZyB7CiAgICBwcm90byAxIDEKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6MTMKICAgIC8vIHJldHVybiBgJHt0aGlzLmdyZWV0aW5nLnZhbHVlfSAke25hbWV9YAogICAgaW50Y18wIC8vIDAKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6NAogICAgLy8gZ3JlZXRpbmcgPSBHbG9iYWxTdGF0ZSh7IGluaXRpYWxWYWx1ZTogJycgfSkKICAgIGJ5dGVjXzAgLy8gImdyZWV0aW5nIgogICAgLy8gdGVzdHMvYXBwcm92YWxzL3ByZWNvbXBpbGVkLWFwcHMuYWxnby50czoxMwogICAgLy8gcmV0dXJuIGAke3RoaXMuZ3JlZXRpbmcudmFsdWV9ICR7bmFtZX1gCiAgICBhcHBfZ2xvYmFsX2dldF9leAogICAgYXNzZXJ0IC8vIGNoZWNrIEdsb2JhbFN0YXRlIGV4aXN0cwogICAgYnl0ZWNfMSAvLyAiIgogICAgc3dhcAogICAgY29uY2F0CiAgICBwdXNoYnl0ZXMgIiAiCiAgICBjb25jYXQKICAgIGZyYW1lX2RpZyAtMQogICAgY29uY2F0CiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb1RlbXBsYXRlQ3VzdG9tUHJlZml4LmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "state": { + "global": { + "num_byte_slices": 1, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": { + "greeting": { + "type": "bytes", + "key": "greeting" + } + }, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "HelloTemplateCustomPrefix", + "methods": [ + { + "name": "create", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "delete", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "update", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "readonly": false, + "returns": { + "type": "string" + } + } + ], + "networks": {} + }, + "bare_call_config": {} +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.arc56.json b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.arc56.json new file mode 100644 index 00000000..f5bcf0a4 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.arc56.json @@ -0,0 +1,172 @@ +{ + "name": "HelloTemplateCustomPrefix", + "structs": {}, + "methods": [ + { + "name": "create", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "delete", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "DeleteApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "update", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "UpdateApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "greet", + "args": [ + { + "type": "string", + "name": "name" + } + ], + "returns": { + "type": "string" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 1 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": { + "greeting": { + "keyType": "AVMString", + "valueType": "AVMString", + "key": "Z3JlZXRpbmc=" + } + }, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 101 + ], + "errorMessage": "OnCompletion is not DeleteApplication" + }, + { + "pc": [ + 85, + 132 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 117 + ], + "errorMessage": "OnCompletion is not UpdateApplication" + }, + { + "pc": [ + 90 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 106, + 122, + 137 + ], + "errorMessage": "can only call when not creating" + }, + { + "pc": [ + 189 + ], + "errorMessage": "check GlobalState exists" + } + ], + "pcOffsetMethod": "cblocks" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb1RlbXBsYXRlQ3VzdG9tUHJlZml4LmFwcHJvdmFsUHJvZ3JhbToKICAgIGludGNibG9jayAwIDEKICAgIGJ5dGVjYmxvY2sgImdyZWV0aW5nIiAiIiBQUkZYX0dSRUVUSU5HCiAgICB0eG4gQXBwbGljYXRpb25JRAogICAgYm56IG1haW5fYWZ0ZXJfaWZfZWxzZUAyCiAgICBjYWxsc3ViIGNvbnN0cnVjdG9yCgptYWluX2FmdGVyX2lmX2Vsc2VAMjoKICAgIGNhbGxzdWIgX19wdXlhX2FyYzRfcm91dGVyX18KICAgIHJldHVybgoKCi8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6OkhlbGxvVGVtcGxhdGVDdXN0b21QcmVmaXguY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6MzUt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0cmluZyB7CiAgICBwcm90byAxIDEKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6MTMKICAgIC8vIHJldHVybiBgJHt0aGlzLmdyZWV0aW5nLnZhbHVlfSAke25hbWV9YAogICAgaW50Y18wIC8vIDAKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6NAogICAgLy8gZ3JlZXRpbmcgPSBHbG9iYWxTdGF0ZSh7IGluaXRpYWxWYWx1ZTogJycgfSkKICAgIGJ5dGVjXzAgLy8gImdyZWV0aW5nIgogICAgLy8gdGVzdHMvYXBwcm92YWxzL3ByZWNvbXBpbGVkLWFwcHMuYWxnby50czoxMwogICAgLy8gcmV0dXJuIGAke3RoaXMuZ3JlZXRpbmcudmFsdWV9ICR7bmFtZX1gCiAgICBhcHBfZ2xvYmFsX2dldF9leAogICAgYXNzZXJ0IC8vIGNoZWNrIEdsb2JhbFN0YXRlIGV4aXN0cwogICAgYnl0ZWNfMSAvLyAiIgogICAgc3dhcAogICAgY29uY2F0CiAgICBwdXNoYnl0ZXMgIiAiCiAgICBjb25jYXQKICAgIGZyYW1lX2RpZyAtMQogICAgY29uY2F0CiAgICByZXRzdWIK", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpIZWxsb1RlbXBsYXRlQ3VzdG9tUHJlZml4LmNsZWFyU3RhdGVQcm9ncmFtOgogICAgcHVzaGludCAxIC8vIDEKICAgIHJldHVybgo=" + }, + "events": [], + "templateVariables": { + "PRFX_GREETING": { + "type": "AVMString" + } + } +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.clear.teal b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.clear.teal new file mode 100644 index 00000000..345b124b --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.ssa.ir b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.ssa.ir new file mode 100644 index 00000000..720f9017 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/HelloTemplateCustomPrefix.ssa.ir @@ -0,0 +1,110 @@ +contract tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.constructor() -> void: + block@0: // L35 + tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() + (app_global_put "greeting" TemplateVar[bytes](PRFX_GREETING)) + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.constructor() -> void: + block@0: // L3 + (app_global_put "greeting" "") + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.__puya_arc4_router__() -> bool: + block@0: // L34 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@8 + block@1: // abi_routing_L34 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "create()void" => block@2, method "delete()void" => block@3, method "update()void" => block@4, method "greet(string)string" => block@5, * => block@6} + block@2: // create_route_L40 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (== tmp%5#0 0u) + (assert tmp%6#0) // can only call when creating + tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.create() + return 1u + block@3: // delete_route_L6 + let tmp%7#0: uint64 = (txn OnCompletion) + let tmp%8#0: bool = (== tmp%7#0 DeleteApplication) + (assert tmp%8#0) // OnCompletion is not DeleteApplication + let tmp%9#0: uint64 = (txn ApplicationID) + let tmp%10#0: bool = (!= tmp%9#0 0u) + (assert tmp%10#0) // can only call when not creating + tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() + return 1u + block@4: // update_route_L9 + let tmp%11#0: uint64 = (txn OnCompletion) + let tmp%12#0: bool = (== tmp%11#0 UpdateApplication) + (assert tmp%12#0) // OnCompletion is not UpdateApplication + let tmp%13#0: uint64 = (txn ApplicationID) + let tmp%14#0: bool = (!= tmp%13#0 0u) + (assert tmp%14#0) // can only call when not creating + tests/approvals/precompiled-apps.algo.ts::HelloBase.update() + return 1u + block@5: // greet_route_L12 + let tmp%15#0: uint64 = (txn OnCompletion) + let tmp%16#0: bool = (== tmp%15#0 NoOp) + (assert tmp%16#0) // OnCompletion is not NoOp + let tmp%17#0: uint64 = (txn ApplicationID) + let tmp%18#0: bool = (!= tmp%17#0 0u) + (assert tmp%18#0) // can only call when not creating + let tmp%19#0: bytes = (txna ApplicationArgs 1) + let tmp%20#0: bytes = ((extract 2 0) tmp%19#0) + let to_encode%0#0: bytes = tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(tmp%20#0) + let length%0#0: uint64 = (len to_encode%0#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 to_encode%0#0) + let tmp%21#0: bytes = (concat 0x151f7c75 encoded_value%0#0) + (log tmp%21#0) + return 1u + block@6: // switch_case_default_L34 + goto block@7 + block@7: // switch_case_next_L34 + goto block@9 + block@8: // bare_routing_L34 + goto block@9 + block@9: // after_if_else_L34 + return 0u + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix.create() -> void: + block@0: // L40 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.delete() -> void: + block@0: // L6 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.update() -> void: + block@0: // L9 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::HelloBase.greet(name: bytes) -> bytes: + block@0: // L12 + let (maybe_value%0#0: bytes, maybe_exists%0#0: bool) = (app_global_get_ex 0u "greeting") + (assert maybe_exists%0#0) // check GlobalState exists + let tmp%0#0: bytes = (concat "" maybe_value%0#0) + let tmp%1#0: bytes = (concat tmp%0#0 " ") + let tmp%2#0: bytes = (concat tmp%1#0 name#0) + return tmp%2#0 + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/LargeProgram.approval.teal b/tests/approvals/out/precompiled-apps/LargeProgram.approval.teal new file mode 100644 index 00000000..cb5b4258 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/LargeProgram.approval.teal @@ -0,0 +1,143 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::LargeProgram.approvalProgram: + intcblock 0 1 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/precompiled-apps.algo.ts::LargeProgram.constructor() -> void: +constructor: + // tests/approvals/precompiled-apps.algo.ts:48 + // export class LargeProgram extends Contract { + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::LargeProgram.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/precompiled-apps.algo.ts:48 + // export class LargeProgram extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@6 + txna ApplicationArgs 0 + pushbytes 0x02bf30cf // method "getBigBytesLength()uint64" + pushbytes 0x24378d3c // method "delete()void" + uncover 2 + match __puya_arc4_router___getBigBytesLength_route@2 __puya_arc4_router___delete_route@3 + b __puya_arc4_router___switch_case_default@4 + +__puya_arc4_router___getBigBytesLength_route@2: + // tests/approvals/precompiled-apps.algo.ts:49 + // getBigBytesLength() { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub getBigBytesLength + itob + pushbytes 0x151f7c75 + swap + concat + log + intc_1 // 1 + retsub + +__puya_arc4_router___delete_route@3: + // tests/approvals/precompiled-apps.algo.ts:53 + // @abimethod({ allowActions: 'DeleteApplication' }) + txn OnCompletion + pushint 5 // DeleteApplication + == + assert // OnCompletion is not DeleteApplication + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub delete + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@4: + b __puya_arc4_router___after_if_else@10 + +__puya_arc4_router___bare_routing@6: + // tests/approvals/precompiled-apps.algo.ts:48 + // export class LargeProgram extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@7 + b __puya_arc4_router___switch_case_default@8 + +__puya_arc4_router_____algots__.defaultCreate@7: + // tests/approvals/precompiled-apps.algo.ts:48 + // export class LargeProgram extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@8: + +__puya_arc4_router___after_if_else@10: + // tests/approvals/precompiled-apps.algo.ts:48 + // export class LargeProgram extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::LargeProgram.getBigBytesLength() -> uint64: +getBigBytesLength: + // tests/approvals/precompiled-apps.algo.ts:49 + // getBigBytesLength() { + proto 0 1 + // tests/approvals/precompiled-apps.algo.ts:50 + // return getBigBytes().length + callsub getBigBytes + len + retsub + + +// tests/approvals/precompiled-apps.algo.ts::getBigBytes() -> bytes: +getBigBytes: + // tests/approvals/precompiled-apps.algo.ts:44 + // function getBigBytes() { + proto 0 1 + // tests/approvals/precompiled-apps.algo.ts:45 + // return op.bzero(4096) + pushint 4096 // 4096 + bzero + retsub + + +// tests/approvals/precompiled-apps.algo.ts::LargeProgram.delete() -> void: +delete: + // tests/approvals/precompiled-apps.algo.ts:53-54 + // @abimethod({ allowActions: 'DeleteApplication' }) + // delete() {} + proto 0 0 + retsub + + +// tests/approvals/precompiled-apps.algo.ts::LargeProgram.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/precompiled-apps.algo.ts:48 + // export class LargeProgram extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/precompiled-apps/LargeProgram.arc32.json b/tests/approvals/out/precompiled-apps/LargeProgram.arc32.json new file mode 100644 index 00000000..dec6a332 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/LargeProgram.arc32.json @@ -0,0 +1,63 @@ +{ + "hints": { + "getBigBytesLength()uint64": { + "call_config": { + "no_op": "CALL" + } + }, + "delete()void": { + "call_config": { + "delete_application": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpMYXJnZVByb2dyYW0uYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMQogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMgogICAgY2FsbHN1YiBjb25zdHJ1Y3RvcgoKbWFpbl9hZnRlcl9pZl9lbHNlQDI6CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZ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FsZ28udHM6OkxhcmdlUHJvZ3JhbS5kZWxldGUoKSAtPiB2b2lkOgpkZWxldGU6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjUzLTU0CiAgICAvLyBAYWJpbWV0aG9kKHsgYWxsb3dBY3Rpb25zOiAnRGVsZXRlQXBwbGljYXRpb24nIH0pCiAgICAvLyBkZWxldGUoKSB7fQogICAgcHJvdG8gMCAwCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpMYXJnZVByb2dyYW0uX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlKCkgLT4gdm9pZDoKX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL3ByZWNvbXBpbGVkLWFwcHMuYWxnby50czo0OAogICAgLy8gZXhwb3J0IGNsYXNzIExhcmdlUHJvZ3JhbSBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpMYXJnZVByb2dyYW0uY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "state": { + "global": { + "num_byte_slices": 0, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": {}, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "LargeProgram", + "methods": [ + { + "name": "getBigBytesLength", + "args": [], + "readonly": false, + "returns": { + "type": "uint64" + } + }, + { + "name": "delete", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "CREATE" + } +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/LargeProgram.arc56.json b/tests/approvals/out/precompiled-apps/LargeProgram.arc56.json new file mode 100644 index 00000000..07ab80a4 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/LargeProgram.arc56.json @@ -0,0 +1,113 @@ +{ + "name": "LargeProgram", + "structs": {}, + "methods": [ + { + "name": "getBigBytesLength", + "args": [], + "returns": { + "type": "uint64" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "delete", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "DeleteApplication" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 87 + ], + "errorMessage": "OnCompletion is not DeleteApplication" + }, + { + "pc": [ + 61 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 116 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 66, + 92 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpMYXJnZVByb2dyYW0uYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgMQogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VA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vKDQwOTYpCiAgICBwdXNoaW50IDQwOTYgLy8gNDA5NgogICAgYnplcm8KICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1hcHBzLmFsZ28udHM6OkxhcmdlUHJvZ3JhbS5kZWxldGUoKSAtPiB2b2lkOgpkZWxldGU6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjUzLTU0CiAgICAvLyBAYWJpbWV0aG9kKHsgYWxsb3dBY3Rpb25zOiAnRGVsZXRlQXBwbGljYXRpb24nIH0pCiAgICAvLyBkZWxldGUoKSB7fQogICAgcHJvdG8gMCAwCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpMYXJnZVByb2dyYW0uX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlKCkgLT4gdm9pZDoKX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL3ByZWNvbXBpbGVkLWFwcHMuYWxnby50czo0OAogICAgLy8gZXhwb3J0IGNsYXNzIExhcmdlUHJvZ3JhbSBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtYXBwcy5hbGdvLnRzOjpMYXJnZVByb2dyYW0uY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/LargeProgram.clear.teal b/tests/approvals/out/precompiled-apps/LargeProgram.clear.teal new file mode 100644 index 00000000..7b795785 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/LargeProgram.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::LargeProgram.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/precompiled-apps/LargeProgram.ssa.ir b/tests/approvals/out/precompiled-apps/LargeProgram.ssa.ir new file mode 100644 index 00000000..a9d2b71a --- /dev/null +++ b/tests/approvals/out/precompiled-apps/LargeProgram.ssa.ir @@ -0,0 +1,89 @@ +contract tests/approvals/precompiled-apps.algo.ts::LargeProgram: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/precompiled-apps.algo.ts::LargeProgram.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/precompiled-apps.algo.ts::LargeProgram.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/precompiled-apps.algo.ts::LargeProgram.constructor() -> void: + block@0: // L48 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::LargeProgram.__puya_arc4_router__() -> bool: + block@0: // L48 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@6 + block@1: // abi_routing_L48 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "getBigBytesLength()uint64" => block@2, method "delete()void" => block@3, * => block@4} + block@2: // getBigBytesLength_route_L49 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // can only call when not creating + let to_encode%0#0: uint64 = tests/approvals/precompiled-apps.algo.ts::LargeProgram.getBigBytesLength() + let val_as_bytes%0#0: bytes = (itob to_encode%0#0) + let tmp%7#0: bytes = (concat 0x151f7c75 val_as_bytes%0#0) + (log tmp%7#0) + return 1u + block@3: // delete_route_L53 + let tmp%8#0: uint64 = (txn OnCompletion) + let tmp%9#0: bool = (== tmp%8#0 DeleteApplication) + (assert tmp%9#0) // OnCompletion is not DeleteApplication + let tmp%10#0: uint64 = (txn ApplicationID) + let tmp%11#0: bool = (!= tmp%10#0 0u) + (assert tmp%11#0) // can only call when not creating + tests/approvals/precompiled-apps.algo.ts::LargeProgram.delete() + return 1u + block@4: // switch_case_default_L48 + goto block@5 + block@5: // switch_case_next_L48 + goto block@10 + block@6: // bare_routing_L48 + let tmp%12#0: uint64 = (txn OnCompletion) + switch tmp%12#0 {0u => block@7, * => block@8} + block@7: // __algots__.defaultCreate_L48 + let tmp%13#0: uint64 = (txn ApplicationID) + let tmp%14#0: bool = (== tmp%13#0 0u) + (assert tmp%14#0) // can only call when creating + tests/approvals/precompiled-apps.algo.ts::LargeProgram.__algots__.defaultCreate() + return 1u + block@8: // switch_case_default_L48 + goto block@9 + block@9: // switch_case_next_L48 + goto block@10 + block@10: // after_if_else_L48 + return 0u + + subroutine tests/approvals/precompiled-apps.algo.ts::LargeProgram.getBigBytesLength() -> uint64: + block@0: // L49 + let tmp%0#0: bytes = tests/approvals/precompiled-apps.algo.ts::getBigBytes() + let tmp%1#0: uint64 = (len tmp%0#0) + return tmp%1#0 + + subroutine tests/approvals/precompiled-apps.algo.ts::getBigBytes() -> bytes: + block@0: // L44 + let tmp%0#0: bytes = (bzero 4096u) + return tmp%0#0 + + subroutine tests/approvals/precompiled-apps.algo.ts::LargeProgram.delete() -> void: + block@0: // L53 + return + + subroutine tests/approvals/precompiled-apps.algo.ts::LargeProgram.__algots__.defaultCreate() -> void: + block@0: // L48 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/TerribleCustodialAccount.ssa.ir b/tests/approvals/out/precompiled-apps/TerribleCustodialAccount.ssa.ir new file mode 100644 index 00000000..548fd240 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/TerribleCustodialAccount.ssa.ir @@ -0,0 +1,4 @@ +program logicsig tests/approvals/precompiled-apps.algo.ts::TerribleCustodialAccount: + subroutine tests/approvals/precompiled-apps.algo.ts::program() -> bool: + block@0: // L62 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/TerribleCustodialAccount.teal b/tests/approvals/out/precompiled-apps/TerribleCustodialAccount.teal new file mode 100644 index 00000000..a225946a --- /dev/null +++ b/tests/approvals/out/precompiled-apps/TerribleCustodialAccount.teal @@ -0,0 +1,7 @@ +#pragma version 10 + +tests/approvals/precompiled-apps.algo.ts::TerribleCustodialAccount: + // tests/approvals/precompiled-apps.algo.ts:63 + // return true + pushint 1 // 1 + return diff --git a/tests/approvals/out/precompiled-apps/precompiled-apps.awst b/tests/approvals/out/precompiled-apps/precompiled-apps.awst new file mode 100644 index 00000000..061b851f --- /dev/null +++ b/tests/approvals/out/precompiled-apps/precompiled-apps.awst @@ -0,0 +1,222 @@ +contract Hello +{ + globals { + ["greeting"]: string + } + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + create(): void + { + GlobalState["greeting"]: string = greeting + } + + constructor(): void + { + super.constructor() + } + + HelloBase::delete(): void + { + } + + HelloBase::update(): void + { + } + + HelloBase::greet(): string + { + return "" + GlobalState["greeting"] + " " + name + } + + HelloBase::constructor(): void + { + void + GlobalState["greeting"]: string = "" + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + +} +contract HelloTemplate +{ + globals { + ["greeting"]: string + } + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + create(): void + { + } + + constructor(): void + { + super.constructor() + GlobalState["greeting"]: string = TemplateVar[string](TMPL_GREETING) + } + + HelloBase::delete(): void + { + } + + HelloBase::update(): void + { + } + + HelloBase::greet(): string + { + return "" + GlobalState["greeting"] + " " + name + } + + HelloBase::constructor(): void + { + void + GlobalState["greeting"]: string = "" + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + +} +contract HelloTemplateCustomPrefix +{ + globals { + ["greeting"]: string + } + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + create(): void + { + } + + constructor(): void + { + super.constructor() + GlobalState["greeting"]: string = TemplateVar[string](PRFX_GREETING) + } + + HelloBase::delete(): void + { + } + + HelloBase::update(): void + { + } + + HelloBase::greet(): string + { + return "" + GlobalState["greeting"] + " " + name + } + + HelloBase::constructor(): void + { + void + GlobalState["greeting"]: string = "" + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + +} +subroutine getBigBytes(): bytes +{ + return bzero(4096) +} +contract LargeProgram +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + getBigBytesLength(): uint64 + { + return len(tests/approvals/precompiled-apps.algo.ts::getBigBytes()) + } + + delete(): void + { + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + + __algots__.defaultCreate(): void + { + } + +} + +logicsig tests/approvals/precompiled-apps.algo.ts::TerribleCustodialAccount { + return True +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-apps/precompiled-apps.awst.json b/tests/approvals/out/precompiled-apps/precompiled-apps.awst.json new file mode 100644 index 00000000..32ec5e90 --- /dev/null +++ b/tests/approvals/out/precompiled-apps/precompiled-apps.awst.json @@ -0,0 +1,4382 @@ +[ + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 17, + "end_line": 17, + "column": 0, + "end_column": 38 + }, + "id": "tests/approvals/precompiled-apps.algo.ts::Hello", + "name": "Hello", + "description": null, + "method_resolution_order": [ + "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 18, + "end_line": 19, + "column": 2, + "end_column": 26 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "greeting", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 19, + "end_line": 19, + "column": 9, + "end_column": 25 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 19, + "end_line": 21, + "column": 27, + "end_column": 3 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 20, + "end_line": 20, + "column": 4, + "end_column": 34 + }, + "target": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": "check GlobalState exists" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 20, + "end_line": 20, + "column": 26, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "greeting" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::Hello", + "member_name": "create", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 18, + "end_line": 18, + "column": 3, + "end_column": 37 + }, + "name": "create", + "is_bare": false, + "create": 2, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 17, + "end_line": 17, + "column": 0, + "end_column": 38 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 17, + "end_line": 17, + "column": 0, + "end_column": 38 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 17, + "end_line": 17, + "column": 0, + "end_column": 38 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 17, + "end_line": 17, + "column": 0, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceSuperMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::Hello", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 6, + "end_line": 7, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 7, + "end_line": 7, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "delete", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 6, + "end_line": 6, + "column": 3, + "end_column": 51 + }, + "name": "delete", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 5 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 9, + "end_line": 10, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 10, + "end_line": 10, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "update", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 9, + "end_line": 9, + "column": 3, + "end_column": 51 + }, + "name": "update", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 4 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 29 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "name", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 8, + "end_column": 20 + } + } + ], + "return_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 14, + "column": 30, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 4, + "end_column": 43 + }, + "value": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "" + }, + "op": "+", + "right": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 28, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": "check GlobalState exists" + } + }, + "op": "+", + "right": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": " " + } + }, + "op": "+", + "right": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 37, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "name" + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "greet", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 29 + }, + "name": "greet", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 46 + }, + "target": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": null + }, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 41, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + } + ], + "app_state": [ + { + "_type": "AppStorageDefinition", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "member_name": "greeting", + "kind": 1, + "storage_wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key_wtype": null, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "description": null + } + ], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + }, + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 24, + "end_line": 24, + "column": 0, + "end_column": 46 + }, + "id": "tests/approvals/precompiled-apps.algo.ts::HelloTemplate", + "name": "HelloTemplate", + "description": null, + "method_resolution_order": [ + "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 30, + "end_line": 31, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 31, + "end_line": 31, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloTemplate", + "member_name": "create", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 30, + "end_line": 30, + "column": 3, + "end_column": 37 + }, + "name": "create", + "is_bare": false, + "create": 2, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 25, + "end_line": 28, + "column": 2, + "end_column": 3 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 25, + "end_line": 28, + "column": 16, + "end_column": 3 + }, + "body": [ + { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 26, + "end_line": 26, + "column": 4, + "end_column": 11 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 26, + "end_line": 26, + "column": 4, + "end_column": 11 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 26, + "end_line": 26, + "column": 4, + "end_column": 11 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceSuperMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 27, + "end_line": 27, + "column": 4, + "end_column": 57 + }, + "target": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 27, + "end_line": 27, + "column": 18, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": "check GlobalState exists" + }, + "value": { + "_type": "TemplateVar", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 27, + "end_line": 27, + "column": 26, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "TMPL_GREETING" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloTemplate", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 6, + "end_line": 7, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 7, + "end_line": 7, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "delete", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 6, + "end_line": 6, + "column": 3, + "end_column": 51 + }, + "name": "delete", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 5 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 9, + "end_line": 10, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 10, + "end_line": 10, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "update", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 9, + "end_line": 9, + "column": 3, + "end_column": 51 + }, + "name": "update", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 4 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 29 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "name", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 8, + "end_column": 20 + } + } + ], + "return_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 14, + "column": 30, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 4, + "end_column": 43 + }, + "value": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "" + }, + "op": "+", + "right": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 28, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": "check GlobalState exists" + } + }, + "op": "+", + "right": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": " " + } + }, + "op": "+", + "right": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 37, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "name" + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "greet", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 29 + }, + "name": "greet", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 46 + }, + "target": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": null + }, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 41, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + } + ], + "app_state": [ + { + "_type": "AppStorageDefinition", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "member_name": "greeting", + "kind": 1, + "storage_wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key_wtype": null, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "description": null + } + ], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + }, + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 34, + "end_line": 34, + "column": 0, + "end_column": 58 + }, + "id": "tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix", + "name": "HelloTemplateCustomPrefix", + "description": null, + "method_resolution_order": [ + "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 40, + "end_line": 41, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 41, + "end_line": 41, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix", + "member_name": "create", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 40, + "end_line": 40, + "column": 3, + "end_column": 37 + }, + "name": "create", + "is_bare": false, + "create": 2, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 35, + "end_line": 38, + "column": 2, + "end_column": 3 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 35, + "end_line": 38, + "column": 16, + "end_column": 3 + }, + "body": [ + { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 36, + "end_line": 36, + "column": 4, + "end_column": 11 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 36, + "end_line": 36, + "column": 4, + "end_column": 11 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 36, + "end_line": 36, + "column": 4, + "end_column": 11 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceSuperMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 37, + "end_line": 37, + "column": 4, + "end_column": 66 + }, + "target": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 37, + "end_line": 37, + "column": 18, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": "check GlobalState exists" + }, + "value": { + "_type": "TemplateVar", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 37, + "end_line": 37, + "column": 26, + "end_column": 66 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "PRFX_GREETING" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 6, + "end_line": 7, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 7, + "end_line": 7, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "delete", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 6, + "end_line": 6, + "column": 3, + "end_column": 51 + }, + "name": "delete", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 5 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 9, + "end_line": 10, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 10, + "end_line": 10, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "update", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 9, + "end_line": 9, + "column": 3, + "end_column": 51 + }, + "name": "update", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 4 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 29 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "name", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 8, + "end_column": 20 + } + } + ], + "return_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 14, + "column": 30, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 4, + "end_column": 43 + }, + "value": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "BytesBinaryOperation", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "left": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "" + }, + "op": "+", + "right": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 28, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": "check GlobalState exists" + } + }, + "op": "+", + "right": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 11, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": " " + } + }, + "op": "+", + "right": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 13, + "end_line": 13, + "column": 37, + "end_column": 41 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "name" + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "greet", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 12, + "end_line": 12, + "column": 2, + "end_column": 29 + }, + "name": "greet", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 3, + "end_line": 3, + "column": 0, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 46 + }, + "target": { + "_type": "AppStateExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "exists_assertion_message": null + }, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 41, + "end_column": 43 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "" + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::HelloBase", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + } + ], + "app_state": [ + { + "_type": "AppStorageDefinition", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "member_name": "greeting", + "kind": 1, + "storage_wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "key_wtype": null, + "key": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 4, + "end_line": 4, + "column": 2, + "end_column": 10 + }, + "wtype": { + "_type": "WType", + "name": "state_key", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "XL4m_bZKs9", + "encoding": "utf8" + }, + "description": null + } + ], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + }, + { + "_type": "Subroutine", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 44, + "end_line": 44, + "column": 0, + "end_column": 22 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 44, + "end_line": 46, + "column": 23, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 45, + "end_line": 45, + "column": 2, + "end_column": 23 + }, + "value": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 45, + "end_line": 45, + "column": 9, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "bzero", + "immediates": [], + "stack_args": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 45, + "end_line": 45, + "column": 18, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "4096", + "teal_alias": null + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "id": "tests/approvals/precompiled-apps.algo.ts::getBigBytes", + "name": "getBigBytes" + }, + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 44 + }, + "id": "tests/approvals/precompiled-apps.algo.ts::LargeProgram", + "name": "LargeProgram", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 49, + "end_line": 49, + "column": 2, + "end_column": 21 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 49, + "end_line": 51, + "column": 22, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 50, + "end_line": 50, + "column": 4, + "end_column": 31 + }, + "value": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 50, + "end_line": 50, + "column": 25, + "end_column": 31 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "len", + "immediates": [], + "stack_args": [ + { + "_type": "SubroutineCallExpression", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 50, + "end_line": 50, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "target": { + "_type": "SubroutineID", + "target": "tests/approvals/precompiled-apps.algo.ts::getBigBytes" + }, + "args": [] + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::LargeProgram", + "member_name": "getBigBytesLength", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 49, + "end_line": 49, + "column": 2, + "end_column": 21 + }, + "name": "getBigBytesLength", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 53, + "end_line": 54, + "column": 2, + "end_column": 10 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 54, + "end_line": 54, + "column": 11, + "end_column": 13 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::LargeProgram", + "member_name": "delete", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 53, + "end_line": 53, + "column": 3, + "end_column": 51 + }, + "name": "delete", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 5 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 44 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 44 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 44 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::LargeProgram", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 44 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 44 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "Implicitly generated create method", + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-apps.algo.ts::LargeProgram", + "member_name": "__algots__.defaultCreate", + "arc4_method_config": { + "_type": "ARC4BareMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 48, + "end_line": 48, + "column": 0, + "end_column": 44 + }, + "allowed_completion_types": [ + 0 + ], + "create": 2, + "is_bare": true + } + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + }, + { + "_type": "LogicSignature", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 61, + "end_line": 61, + "column": 0, + "end_column": 56 + }, + "id": "tests/approvals/precompiled-apps.algo.ts::TerribleCustodialAccount", + "short_name": "TerribleCustodialAccount", + "program": { + "_type": "Subroutine", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 62, + "end_line": 62, + "column": 2, + "end_column": 11 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 62, + "end_line": 64, + "column": 12, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 63, + "end_line": 63, + "column": 4, + "end_column": 15 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "file": "tests/approvals/precompiled-apps.algo.ts", + "line": 63, + "end_line": 63, + "column": 11, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "id": "tests/approvals/precompiled-apps.algo.ts::program", + "name": "program" + }, + "docstring": "", + "avm_version": null + } +] \ No newline at end of file diff --git a/tests/approvals/out/precompiled-factory/HelloFactory.approval.teal b/tests/approvals/out/precompiled-factory/HelloFactory.approval.teal new file mode 100644 index 00000000..45406ca0 --- /dev/null +++ b/tests/approvals/out/precompiled-factory/HelloFactory.approval.teal @@ -0,0 +1,803 @@ +#pragma version 10 + +tests/approvals/precompiled-factory.algo.ts::HelloFactory.approvalProgram: + intcblock 0 6 1 5 + bytecblock 0x "world" base64(CoEBQw==) 0x151f7c75 0x24378d3c 0xd0a28200 "hello" 0x4c5c61ba + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/precompiled-factory.algo.ts::HelloFactory.constructor() -> void: +constructor: + // tests/approvals/precompiled-factory.algo.ts:6 + // class HelloFactory extends Contract { + proto 0 0 + retsub + + +// tests/approvals/precompiled-factory.algo.ts::HelloFactory.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/precompiled-factory.algo.ts:6 + // class HelloFactory extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@8 + txna ApplicationArgs 0 + pushbytes 0x2a17995c // method "test_compile_contract()void" + pushbytes 0xe3254bc9 // method "test_compile_contract_with_template()void" + pushbytes 0xe2b7c692 // method "test_compile_contract_with_template_and_custom_prefix()void" + pushbytes 0x02947ca2 // method "test_compile_contract_large()void" + uncover 4 + match __puya_arc4_router___test_compile_contract_route@2 __puya_arc4_router___test_compile_contract_with_template_route@3 __puya_arc4_router___test_compile_contract_with_template_and_custom_prefix_route@4 __puya_arc4_router___test_compile_contract_large_route@5 + b __puya_arc4_router___switch_case_default@6 + +__puya_arc4_router___test_compile_contract_route@2: + // tests/approvals/precompiled-factory.algo.ts:7 + // test_compile_contract() { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub test_compile_contract + intc_2 // 1 + retsub + +__puya_arc4_router___test_compile_contract_with_template_route@3: + // tests/approvals/precompiled-factory.algo.ts:38 + // test_compile_contract_with_template() { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub test_compile_contract_with_template + intc_2 // 1 + retsub + +__puya_arc4_router___test_compile_contract_with_template_and_custom_prefix_route@4: + // tests/approvals/precompiled-factory.algo.ts:69 + // test_compile_contract_with_template_and_custom_prefix() { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub test_compile_contract_with_template_and_custom_prefix + intc_2 // 1 + retsub + +__puya_arc4_router___test_compile_contract_large_route@5: + // tests/approvals/precompiled-factory.algo.ts:100 + // test_compile_contract_large() { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + callsub test_compile_contract_large + intc_2 // 1 + retsub + +__puya_arc4_router___switch_case_default@6: + b __puya_arc4_router___after_if_else@12 + +__puya_arc4_router___bare_routing@8: + // tests/approvals/precompiled-factory.algo.ts:6 + // class HelloFactory extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@9 + b __puya_arc4_router___switch_case_default@10 + +__puya_arc4_router_____algots__.defaultCreate@9: + // tests/approvals/precompiled-factory.algo.ts:6 + // class HelloFactory extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_2 // 1 + retsub + +__puya_arc4_router___switch_case_default@10: + +__puya_arc4_router___after_if_else@12: + // tests/approvals/precompiled-factory.algo.ts:6 + // class HelloFactory extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract() -> void: +test_compile_contract: + // tests/approvals/precompiled-factory.algo.ts:7 + // test_compile_contract() { + proto 0 0 + // tests/approvals/precompiled-factory.algo.ts:10-17 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create(string)void'), encodeArc4('hello')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:12 + // appArgs: [methodSelector('create(string)void'), encodeArc4('hello')], + bytec 6 // "hello" + len + itob + extract 6 2 + bytec 6 // "hello" + concat + // tests/approvals/precompiled-factory.algo.ts:15 + // globalNumBytes: 1, + intc_2 // 1 + itxn_field GlobalNumByteSlice + // tests/approvals/precompiled-factory.algo.ts:8 + // const compiled = compile(Hello) + bytec_2 // base64(CoEBQw==) + itxn_field ClearStateProgramPages + bytec_0 // 0x + itxn_field ClearStateProgramPages + pushbytes base64(CiACAAEmAghncmVldGluZwAxGEAAA4gABIgAD0OKAACIAAGJigAAKClniYoAATEbIhNBAIg2GgCABCDfOlSABCQ3jTyABKDoGHKABNCiggBPBI4EAAMAGAAoADhCAFsxGSISRDEYIhJENhoBVwIAiABNI4kxGYEFEkQxGCITRIgARSOJMRmBBBJEMRgiE0SIADkjiTEZIhJEMRgiE0Q2GgFXAgCIAChJFRZXBgJMUIAEFR98dUxQsCOJQgAAIomKAQAoi/9niYoAAImKAACJigEBIihlRClMUIABIFCL/1CJ) + itxn_field ApprovalProgramPages + bytec_0 // 0x + itxn_field ApprovalProgramPages + // tests/approvals/precompiled-factory.algo.ts:12 + // appArgs: [methodSelector('create(string)void'), encodeArc4('hello')], + pushbytes 0x20df3a54 // method "create(string)void" + itxn_field ApplicationArgs + itxn_field ApplicationArgs + // tests/approvals/precompiled-factory.algo.ts:10-16 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create(string)void'), encodeArc4('hello')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:10-17 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create(string)void'), encodeArc4('hello')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + itxn_submit + // tests/approvals/precompiled-factory.algo.ts:17 + // .submit().createdApp + itxn CreatedApplicationID + // tests/approvals/precompiled-factory.algo.ts:10-17 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create(string)void'), encodeArc4('hello')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + dup + // tests/approvals/precompiled-factory.algo.ts:19-24 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + // .submit() + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:21 + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + bytec_1 // "world" + len + itob + extract 6 2 + bytec_1 // "world" + concat + // tests/approvals/precompiled-factory.algo.ts:22 + // appId: helloApp, + swap + itxn_field ApplicationID + // tests/approvals/precompiled-factory.algo.ts:21 + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + bytec 5 // method "greet(string)string" + itxn_field ApplicationArgs + itxn_field ApplicationArgs + // tests/approvals/precompiled-factory.algo.ts:19-23 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:19-24 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + // .submit() + itxn_submit + itxn LastLog + // tests/approvals/precompiled-factory.algo.ts:25 + // const result = decodeArc4(txn.lastLog, 'log') + dup + extract 4 0 + swap + extract 0 4 + bytec_3 // 0x151f7c75 + == + assert // Bytes has valid prefix + extract 2 0 + // tests/approvals/precompiled-factory.algo.ts:27 + // assert(result === 'hello world') + pushbytes "hello world" + == + assert + // tests/approvals/precompiled-factory.algo.ts:29-35 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + // .submit() + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:33 + // onCompletion: OnCompleteAction.DeleteApplication, + intc_3 // 5 + itxn_field OnCompletion + // tests/approvals/precompiled-factory.algo.ts:32 + // appArgs: [methodSelector('delete()void')], + bytec 4 // method "delete()void" + itxn_field ApplicationArgs + itxn_field ApplicationID + // tests/approvals/precompiled-factory.algo.ts:29-34 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:29-35 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + // .submit() + itxn_submit + retsub + + +// tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_with_template() -> void: +test_compile_contract_with_template: + // tests/approvals/precompiled-factory.algo.ts:38 + // test_compile_contract_with_template() { + proto 0 0 + // tests/approvals/precompiled-factory.algo.ts:41-48 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create()void')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:46 + // globalNumBytes: 1, + intc_2 // 1 + itxn_field GlobalNumByteSlice + // tests/approvals/precompiled-factory.algo.ts:39 + // const compiled = compile(HelloTemplate, { templateVars: { GREETING: 'hey' } }) + bytec_2 // base64(CoEBQw==) + itxn_field ClearStateProgramPages + bytec_0 // 0x + itxn_field ClearStateProgramPages + pushbytes base64(CiACAAEmAwhncmVldGluZwADaGV5MRhAAAOIAASIABJDigAAiAAEKCpniYoAACgpZ4mKAAExGyITQQCCNhoAgARMXGG6gAQkN408gASg6BhygATQooIATwSOBAADABIAIgAyQgBVMRkiEkQxGCISRIgATSOJMRmBBRJEMRgiE0SIAEEjiTEZgQQSRDEYIhNEiAA1I4kxGSISRDEYIhNENhoBVwIAiAAkSRUWVwYCTFCABBUffHVMULAjiUIAACKJigAAiYoAAImKAACJigEBIihlRClMUIABIFCL/1CJ) + itxn_field ApprovalProgramPages + bytec_0 // 0x + itxn_field ApprovalProgramPages + // tests/approvals/precompiled-factory.algo.ts:43 + // appArgs: [methodSelector('create()void')], + bytec 7 // method "create()void" + itxn_field ApplicationArgs + // tests/approvals/precompiled-factory.algo.ts:41-47 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create()void')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:41-48 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create()void')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + itxn_submit + // tests/approvals/precompiled-factory.algo.ts:48 + // .submit().createdApp + itxn CreatedApplicationID + // tests/approvals/precompiled-factory.algo.ts:41-48 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create()void')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + dup + // tests/approvals/precompiled-factory.algo.ts:50-55 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + // .submit() + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:52 + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + bytec_1 // "world" + len + itob + extract 6 2 + bytec_1 // "world" + concat + // tests/approvals/precompiled-factory.algo.ts:53 + // appId: helloApp, + swap + itxn_field ApplicationID + // tests/approvals/precompiled-factory.algo.ts:52 + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + bytec 5 // method "greet(string)string" + itxn_field ApplicationArgs + itxn_field ApplicationArgs + // tests/approvals/precompiled-factory.algo.ts:50-54 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:50-55 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + // .submit() + itxn_submit + itxn LastLog + // tests/approvals/precompiled-factory.algo.ts:56 + // const result = decodeArc4(txn.lastLog, 'log') + dup + extract 4 0 + swap + extract 0 4 + bytec_3 // 0x151f7c75 + == + assert // Bytes has valid prefix + extract 2 0 + // tests/approvals/precompiled-factory.algo.ts:58 + // assert(result === 'hey world') + pushbytes "hey world" + == + assert + // tests/approvals/precompiled-factory.algo.ts:60-66 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + // .submit() + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:64 + // onCompletion: OnCompleteAction.DeleteApplication, + intc_3 // 5 + itxn_field OnCompletion + // tests/approvals/precompiled-factory.algo.ts:63 + // appArgs: [methodSelector('delete()void')], + bytec 4 // method "delete()void" + itxn_field ApplicationArgs + itxn_field ApplicationID + // tests/approvals/precompiled-factory.algo.ts:60-65 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:60-66 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + // .submit() + itxn_submit + retsub + + +// tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_with_template_and_custom_prefix() -> void: +test_compile_contract_with_template_and_custom_prefix: + // tests/approvals/precompiled-factory.algo.ts:69 + // test_compile_contract_with_template_and_custom_prefix() { + proto 0 0 + // tests/approvals/precompiled-factory.algo.ts:72-79 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create()void')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:77 + // globalNumBytes: 1, + intc_2 // 1 + itxn_field GlobalNumByteSlice + // tests/approvals/precompiled-factory.algo.ts:70 + // const compiled = compile(HelloTemplateCustomPrefix, { templateVars: { GREETING: 'bonjour' }, templateVarsPrefix: 'PRFX_' }) + bytec_2 // base64(CoEBQw==) + itxn_field ClearStateProgramPages + bytec_0 // 0x + itxn_field ClearStateProgramPages + pushbytes base64(CiACAAEmAwhncmVldGluZwAHYm9uam91cjEYQAADiAAEiAASQ4oAAIgABCgqZ4mKAAAoKWeJigABMRsiE0EAgjYaAIAETFxhuoAEJDeNPIAEoOgYcoAE0KKCAE8EjgQAAwASACIAMkIAVTEZIhJEMRgiEkSIAE0jiTEZgQUSRDEYIhNEiABBI4kxGYEEEkQxGCITRIgANSOJMRkiEkQxGCITRDYaAVcCAIgAJEkVFlcGAkxQgAQVH3x1TFCwI4lCAAAiiYoAAImKAACJigAAiYoBASIoZUQpTFCAASBQi/9QiQ==) + itxn_field ApprovalProgramPages + bytec_0 // 0x + itxn_field ApprovalProgramPages + // tests/approvals/precompiled-factory.algo.ts:74 + // appArgs: [methodSelector('create()void')], + bytec 7 // method "create()void" + itxn_field ApplicationArgs + // tests/approvals/precompiled-factory.algo.ts:72-78 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create()void')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:72-79 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create()void')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + itxn_submit + // tests/approvals/precompiled-factory.algo.ts:79 + // .submit().createdApp + itxn CreatedApplicationID + // tests/approvals/precompiled-factory.algo.ts:72-79 + // const helloApp = itxn + // .applicationCall({ + // appArgs: [methodSelector('create()void')], + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // globalNumBytes: 1, + // }) + // .submit().createdApp + dup + // tests/approvals/precompiled-factory.algo.ts:81-86 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + // .submit() + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:83 + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + bytec_1 // "world" + len + itob + extract 6 2 + bytec_1 // "world" + concat + // tests/approvals/precompiled-factory.algo.ts:84 + // appId: helloApp, + swap + itxn_field ApplicationID + // tests/approvals/precompiled-factory.algo.ts:83 + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + bytec 5 // method "greet(string)string" + itxn_field ApplicationArgs + itxn_field ApplicationArgs + // tests/approvals/precompiled-factory.algo.ts:81-85 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:81-86 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + // appId: helloApp, + // }) + // .submit() + itxn_submit + itxn LastLog + // tests/approvals/precompiled-factory.algo.ts:87 + // const result = decodeArc4(txn.lastLog, 'log') + dup + extract 4 0 + swap + extract 0 4 + bytec_3 // 0x151f7c75 + == + assert // Bytes has valid prefix + extract 2 0 + // tests/approvals/precompiled-factory.algo.ts:89 + // assert(result === 'bonjour world') + pushbytes "bonjour world" + == + assert + // tests/approvals/precompiled-factory.algo.ts:91-97 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + // .submit() + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:95 + // onCompletion: OnCompleteAction.DeleteApplication, + intc_3 // 5 + itxn_field OnCompletion + // tests/approvals/precompiled-factory.algo.ts:94 + // appArgs: [methodSelector('delete()void')], + bytec 4 // method "delete()void" + itxn_field ApplicationArgs + itxn_field ApplicationID + // tests/approvals/precompiled-factory.algo.ts:91-96 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:91-97 + // itxn + // .applicationCall({ + // appId: helloApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + // .submit() + itxn_submit + retsub + + +// tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_large() -> void: +test_compile_contract_large: + // tests/approvals/precompiled-factory.algo.ts:100 + // test_compile_contract_large() { + proto 0 0 + // tests/approvals/precompiled-factory.algo.ts:103-110 + // const largeApp = itxn + // .applicationCall({ + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // extraProgramPages: compiled.extraProgramPages, + // globalNumBytes: compiled.globalBytes, + // }) + // .submit().createdApp + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:101 + // const compiled = compile(LargeProgram) + intc_0 // 0 + itxn_field GlobalNumByteSlice + intc_0 // 0 + itxn_field ExtraProgramPages + bytec_2 // base64(CoEBQw==) + itxn_field ClearStateProgramPages + bytec_0 // 0x + itxn_field ClearStateProgramPages + pushbytes base64(CiACAAExGEAAA4gABIgABUOKAACJigABMRsiE0EARjYaAIAEAr8wz4AEJDeNPE8CjgIAAwAcQgApMRkiEkQxGCITRIgANhaABBUffHVMULAjiTEZgQUSRDEYIhNEiAAsI4lCABUxGSJMjgEAA0IACjEYIhJEiAAYI4kiiYoAAYgAAhWJigABgYAgr4mKAACJigAAiQ==) + itxn_field ApprovalProgramPages + bytec_0 // 0x + itxn_field ApprovalProgramPages + // tests/approvals/precompiled-factory.algo.ts:103-109 + // const largeApp = itxn + // .applicationCall({ + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // extraProgramPages: compiled.extraProgramPages, + // globalNumBytes: compiled.globalBytes, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:103-110 + // const largeApp = itxn + // .applicationCall({ + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // extraProgramPages: compiled.extraProgramPages, + // globalNumBytes: compiled.globalBytes, + // }) + // .submit().createdApp + itxn_submit + // tests/approvals/precompiled-factory.algo.ts:110 + // .submit().createdApp + itxn CreatedApplicationID + // tests/approvals/precompiled-factory.algo.ts:103-110 + // const largeApp = itxn + // .applicationCall({ + // approvalProgram: compiled.approvalProgram, + // clearStateProgram: compiled.clearStateProgram, + // extraProgramPages: compiled.extraProgramPages, + // globalNumBytes: compiled.globalBytes, + // }) + // .submit().createdApp + dup + // tests/approvals/precompiled-factory.algo.ts:112-117 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('getBigBytesLength()uint64')], + // appId: largeApp, + // }) + // .submit() + itxn_begin + itxn_field ApplicationID + // tests/approvals/precompiled-factory.algo.ts:114 + // appArgs: [methodSelector('getBigBytesLength()uint64')], + pushbytes 0x02bf30cf // method "getBigBytesLength()uint64" + itxn_field ApplicationArgs + // tests/approvals/precompiled-factory.algo.ts:112-116 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('getBigBytesLength()uint64')], + // appId: largeApp, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:112-117 + // const txn = itxn + // .applicationCall({ + // appArgs: [methodSelector('getBigBytesLength()uint64')], + // appId: largeApp, + // }) + // .submit() + itxn_submit + itxn LastLog + // tests/approvals/precompiled-factory.algo.ts:118 + // const result = decodeArc4(txn.lastLog, 'log') + dup + extract 4 0 + swap + extract 0 4 + bytec_3 // 0x151f7c75 + == + assert // Bytes has valid prefix + btoi + // tests/approvals/precompiled-factory.algo.ts:120 + // assert(result === 4096) + pushint 4096 // 4096 + == + assert + // tests/approvals/precompiled-factory.algo.ts:122-128 + // itxn + // .applicationCall({ + // appId: largeApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + // .submit() + itxn_begin + // tests/approvals/precompiled-factory.algo.ts:126 + // onCompletion: OnCompleteAction.DeleteApplication, + intc_3 // 5 + itxn_field OnCompletion + // tests/approvals/precompiled-factory.algo.ts:125 + // appArgs: [methodSelector('delete()void')], + bytec 4 // method "delete()void" + itxn_field ApplicationArgs + itxn_field ApplicationID + // tests/approvals/precompiled-factory.algo.ts:122-127 + // itxn + // .applicationCall({ + // appId: largeApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + intc_1 // 6 + itxn_field TypeEnum + intc_0 // 0 + itxn_field Fee + // tests/approvals/precompiled-factory.algo.ts:122-128 + // itxn + // .applicationCall({ + // appId: largeApp, + // appArgs: [methodSelector('delete()void')], + // onCompletion: OnCompleteAction.DeleteApplication, + // }) + // .submit() + itxn_submit + retsub + + +// tests/approvals/precompiled-factory.algo.ts::HelloFactory.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/precompiled-factory.algo.ts:6 + // class HelloFactory extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/precompiled-factory/HelloFactory.arc32.json b/tests/approvals/out/precompiled-factory/HelloFactory.arc32.json new file mode 100644 index 00000000..da7d1586 --- /dev/null +++ b/tests/approvals/out/precompiled-factory/HelloFactory.arc32.json @@ -0,0 +1,89 @@ +{ + "hints": { + "test_compile_contract()void": { + "call_config": { + "no_op": "CALL" + } + }, + "test_compile_contract_with_template()void": { + "call_config": { + "no_op": "CALL" + } + }, + "test_compile_contract_with_template_and_custom_prefix()void": { + "call_config": { + "no_op": "CALL" + } + }, + "test_compile_contract_large()void": { + "call_config": { + "no_op": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtZmFjdG9yeS5hbGdvLnRzOjpIZWxsb0ZhY3RvcnkuYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgNiAxIDUKICAgIGJ5dGVjYmxvY2sgMHggIndvcmxkIiBiYXNlNjQoQ29FQlF3PT0pIDB4MTUxZjdjNzUgMHgyNDM3OGQzYyAweGQwYTI4MjAwICJoZWxsbyIgMHg0YzVjNjFiYQogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMgogICAgY2FsbHN1YiBjb25zdHJ1Y3RvcgoKbWFpbl9hZnRlcl9pZl9lbHNlQDI6CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtZmFjdG9yeS5hbGdvLnRzOjpIZWxsb0ZhY3RvcnkuY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1mYWN0b3J5LmFsZ28udHM6NgogICAgLy8gY2xhc3MgSGVsbG9GYWN0b3J5IGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIKCgovLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY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W50Y18xIC8vIDYKICAgIGl0eG5fZmllbGQgVHlwZUVudW0KICAgIGludGNfMCAvLyAwCiAgICBpdHhuX2ZpZWxkIEZlZQogICAgLy8gdGVzdHMvYXBwcm92YWxzL3ByZWNvbXBpbGVkLWZhY3RvcnkuYWxnby50czoxMjItMTI4CiAgICAvLyBpdHhuCiAgICAvLyAgIC5hcHBsaWNhdGlvbkNhbGwoewogICAgLy8gICAgIGFwcElkOiBsYXJnZUFwcCwKICAgIC8vICAgICBhcHBBcmdzOiBbbWV0aG9kU2VsZWN0b3IoJ2RlbGV0ZSgpdm9pZCcpXSwKICAgIC8vICAgICBvbkNvbXBsZXRpb246IE9uQ29tcGxldGVBY3Rpb24uRGVsZXRlQXBwbGljYXRpb24sCiAgICAvLyAgIH0pCiAgICAvLyAgIC5zdWJtaXQoKQogICAgaXR4bl9zdWJtaXQKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1mYWN0b3J5LmFsZ28udHM6OkhlbGxvRmFjdG9yeS5fX2FsZ290c19fLmRlZmF1bHRDcmVhdGUoKSAtPiB2b2lkOgpfX2FsZ290c19fLmRlZmF1bHRDcmVhdGU6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtZmFjdG9yeS5hbGdvLnRzOjYKICAgIC8vIGNsYXNzIEhlbGxvRmFjdG9yeSBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtZmFjdG9yeS5hbGdvLnRzOjpIZWxsb0ZhY3RvcnkuY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "state": { + "global": { + "num_byte_slices": 0, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": {}, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "HelloFactory", + "methods": [ + { + "name": "test_compile_contract", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "test_compile_contract_with_template", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "test_compile_contract_with_template_and_custom_prefix", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "test_compile_contract_large", + "args": [], + "readonly": false, + "returns": { + "type": "void" + } + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "CREATE" + } +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-factory/HelloFactory.arc56.json b/tests/approvals/out/precompiled-factory/HelloFactory.arc56.json new file mode 100644 index 00000000..3b3eaee7 --- /dev/null +++ b/tests/approvals/out/precompiled-factory/HelloFactory.arc56.json @@ -0,0 +1,153 @@ +{ + "name": "HelloFactory", + "structs": {}, + "methods": [ + { + "name": "test_compile_contract", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_compile_contract_with_template", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_compile_contract_with_template_and_custom_prefix", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + }, + { + "name": "test_compile_contract_large", + "args": [], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 514, + 845, + 1178, + 1429 + ], + "errorMessage": "Bytes has valid prefix" + }, + { + "pc": [ + 119, + 134, + 149, + 164 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 193 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 124, + 139, + 154, + 169 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtZmFjdG9yeS5hbGdvLnRzOjpIZWxsb0ZhY3RvcnkuYXBwcm92YWxQcm9ncmFtOgogICAgaW50Y2Jsb2NrIDAgNiAxIDUKICAgIGJ5dGVjYmxvY2sgMHggIndvcmxkIiBiYXNlNjQoQ29FQlF3PT0pIDB4MTUxZjdjNzUgMHgyNDM3OGQzYyAweGQwYTI4MjAwICJoZWxsbyIgMHg0YzVjNjFiYQogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGJueiBtYWluX2FmdGVyX2lmX2Vsc2VAMgogICAgY2FsbHN1YiBjb25zdHJ1Y3RvcgoKbWFpbl9hZnRlcl9pZl9lbHNlQDI6CiAgICBjYWxsc3ViIF9fcHV5YV9hcmM0X3JvdXRlcl9fCiAgICByZXR1cm4KCgovLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtZmFjdG9yeS5hbGdvLnRzOjpIZWxsb0ZhY3RvcnkuY29uc3RydWN0b3IoKSAtPiB2b2lkOgpjb25zdHJ1Y3RvcjoKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1mYWN0b3J5LmFsZ28udHM6NgogICAgLy8gY2xhc3MgSGVs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IC8vICAgICBhcHBBcmdzOiBbbWV0aG9kU2VsZWN0b3IoJ2RlbGV0ZSgpdm9pZCcpXSwKICAgIC8vICAgICBvbkNvbXBsZXRpb246IE9uQ29tcGxldGVBY3Rpb24uRGVsZXRlQXBwbGljYXRpb24sCiAgICAvLyAgIH0pCiAgICAvLyAgIC5zdWJtaXQoKQogICAgaXR4bl9zdWJtaXQKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9wcmVjb21waWxlZC1mYWN0b3J5LmFsZ28udHM6OkhlbGxvRmFjdG9yeS5fX2FsZ290c19fLmRlZmF1bHRDcmVhdGUoKSAtPiB2b2lkOgpfX2FsZ290c19fLmRlZmF1bHRDcmVhdGU6CiAgICAvLyB0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtZmFjdG9yeS5hbGdvLnRzOjYKICAgIC8vIGNsYXNzIEhlbGxvRmFjdG9yeSBleHRlbmRzIENvbnRyYWN0IHsKICAgIHByb3RvIDAgMAogICAgcmV0c3ViCg==", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvcHJlY29tcGlsZWQtZmFjdG9yeS5hbGdvLnRzOjpIZWxsb0ZhY3RvcnkuY2xlYXJTdGF0ZVByb2dyYW06CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg==" + }, + "events": [], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-factory/HelloFactory.clear.teal b/tests/approvals/out/precompiled-factory/HelloFactory.clear.teal new file mode 100644 index 00000000..2093729d --- /dev/null +++ b/tests/approvals/out/precompiled-factory/HelloFactory.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/precompiled-factory.algo.ts::HelloFactory.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/precompiled-factory/HelloFactory.ssa.ir b/tests/approvals/out/precompiled-factory/HelloFactory.ssa.ir new file mode 100644 index 00000000..52d4e0ea --- /dev/null +++ b/tests/approvals/out/precompiled-factory/HelloFactory.ssa.ir @@ -0,0 +1,1225 @@ +contract tests/approvals/precompiled-factory.algo.ts::HelloFactory: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/precompiled-factory.algo.ts::HelloFactory.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/precompiled-factory.algo.ts::HelloFactory.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/precompiled-factory.algo.ts::HelloFactory.constructor() -> void: + block@0: // L6 + return + + subroutine tests/approvals/precompiled-factory.algo.ts::HelloFactory.__puya_arc4_router__() -> bool: + block@0: // L6 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@8 + block@1: // abi_routing_L6 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "test_compile_contract()void" => block@2, method "test_compile_contract_with_template()void" => block@3, method "test_compile_contract_with_template_and_custom_prefix()void" => block@4, method "test_compile_contract_large()void" => block@5, * => block@6} + block@2: // test_compile_contract_route_L7 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // can only call when not creating + tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract() + return 1u + block@3: // test_compile_contract_with_template_route_L38 + let tmp%7#0: uint64 = (txn OnCompletion) + let tmp%8#0: bool = (== tmp%7#0 NoOp) + (assert tmp%8#0) // OnCompletion is not NoOp + let tmp%9#0: uint64 = (txn ApplicationID) + let tmp%10#0: bool = (!= tmp%9#0 0u) + (assert tmp%10#0) // can only call when not creating + tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_with_template() + return 1u + block@4: // test_compile_contract_with_template_and_custom_prefix_route_L69 + let tmp%11#0: uint64 = (txn OnCompletion) + let tmp%12#0: bool = (== tmp%11#0 NoOp) + (assert tmp%12#0) // OnCompletion is not NoOp + let tmp%13#0: uint64 = (txn ApplicationID) + let tmp%14#0: bool = (!= tmp%13#0 0u) + (assert tmp%14#0) // can only call when not creating + tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_with_template_and_custom_prefix() + return 1u + block@5: // test_compile_contract_large_route_L100 + let tmp%15#0: uint64 = (txn OnCompletion) + let tmp%16#0: bool = (== tmp%15#0 NoOp) + (assert tmp%16#0) // OnCompletion is not NoOp + let tmp%17#0: uint64 = (txn ApplicationID) + let tmp%18#0: bool = (!= tmp%17#0 0u) + (assert tmp%18#0) // can only call when not creating + tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_large() + return 1u + block@6: // switch_case_default_L6 + goto block@7 + block@7: // switch_case_next_L6 + goto block@12 + block@8: // bare_routing_L6 + let tmp%19#0: uint64 = (txn OnCompletion) + switch tmp%19#0 {0u => block@9, * => block@10} + block@9: // __algots__.defaultCreate_L6 + let tmp%20#0: uint64 = (txn ApplicationID) + let tmp%21#0: bool = (== tmp%20#0 0u) + (assert tmp%21#0) // can only call when creating + tests/approvals/precompiled-factory.algo.ts::HelloFactory.__algots__.defaultCreate() + return 1u + block@10: // switch_case_default_L6 + goto block@11 + block@11: // switch_case_next_L6 + goto block@12 + block@12: // after_if_else_L6 + return 0u + + subroutine tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract() -> void: + block@0: // L7 + let (compiled.approvalProgram.0#0: bytes, compiled.approvalProgram.1#0: bytes, compiled.clearStateProgram.0#0: bytes, compiled.clearStateProgram.1#0: bytes, compiled.extraProgramPages#0: uint64, compiled.globalUints#0: uint64, compiled.globalBytes#0: uint64, compiled.localUints#0: uint64, compiled.localBytes#0: uint64) = (compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=ApprovalProgramPages, program_page=0), compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=ApprovalProgramPages, program_page=1), compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=ClearStateProgramPages, program_page=0), compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=ClearStateProgramPages, program_page=1), compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=ExtraProgramPages, program_page=None), compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=GlobalNumUint, program_page=None), compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=GlobalNumByteSlice, program_page=None), compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=LocalNumUint, program_page=None), compiled_contract('tests/approvals/precompiled-apps.algo.ts::Hello', field=LocalNumByteSlice, program_page=None)) + itxn_begin + let inner_txn_params%0#0: itxn_field_set = itxn_field_set(0) + let inner_txn_params%0%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%0%%Fee_length#0: uint64 = 1u + let inner_txn_params%0%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%0%%TypeEnum_length#0: uint64 = 1u + let length%0#0: uint64 = (len "hello") + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 "hello") + let inner_txn_params%0%%param_ApplicationArgs_idx_0#0: bytes = method "create(string)void" + let inner_txn_params%0%%param_ApplicationArgs_idx_1#0: bytes = encoded_value%0#0 + let inner_txn_params%0%%ApplicationArgs_length#0: uint64 = 2u + let inner_txn_params%0%%param_ApprovalProgramPages_idx_0#0: bytes = compiled.approvalProgram.0#0 + let inner_txn_params%0%%param_ApprovalProgramPages_idx_1#0: bytes = compiled.approvalProgram.1#0 + let inner_txn_params%0%%ApprovalProgramPages_length#0: uint64 = 2u + let inner_txn_params%0%%param_ClearStateProgramPages_idx_0#0: bytes = compiled.clearStateProgram.0#0 + let inner_txn_params%0%%param_ClearStateProgramPages_idx_1#0: bytes = compiled.clearStateProgram.1#0 + let inner_txn_params%0%%ClearStateProgramPages_length#0: uint64 = 2u + let inner_txn_params%0%%param_GlobalNumByteSlice_idx_0#0: uint64 = 1u + let inner_txn_params%0%%GlobalNumByteSlice_length#0: uint64 = 1u + let inner_txn_params%0%%Sender_length#0: uint64 = 0u + let inner_txn_params%0%%Note_length#0: uint64 = 0u + let inner_txn_params%0%%Receiver_length#0: uint64 = 0u + let inner_txn_params%0%%Amount_length#0: uint64 = 0u + let inner_txn_params%0%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%0%%VotePK_length#0: uint64 = 0u + let inner_txn_params%0%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%0%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%0%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%0%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%0%%Type_length#0: uint64 = 0u + let inner_txn_params%0%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%0%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%0%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%0%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%0%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%0%%ApplicationID_length#0: uint64 = 0u + let inner_txn_params%0%%OnCompletion_length#0: uint64 = 0u + let inner_txn_params%0%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%0%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%0%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%0%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%0%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%0%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%0%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%0%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%0%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%0%%Accounts_length#0: uint64 = 0u + let inner_txn_params%0%%Assets_length#0: uint64 = 0u + let inner_txn_params%0%%Applications_length#0: uint64 = 0u + ((itxn_field GlobalNumByteSlice) inner_txn_params%0%%param_GlobalNumByteSlice_idx_0#0) + ((itxn_field ClearStateProgramPages) inner_txn_params%0%%param_ClearStateProgramPages_idx_0#0) + ((itxn_field ClearStateProgramPages) inner_txn_params%0%%param_ClearStateProgramPages_idx_1#0) + ((itxn_field ApprovalProgramPages) inner_txn_params%0%%param_ApprovalProgramPages_idx_0#0) + ((itxn_field ApprovalProgramPages) inner_txn_params%0%%param_ApprovalProgramPages_idx_1#0) + ((itxn_field ApplicationArgs) inner_txn_params%0%%param_ApplicationArgs_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%0%%param_ApplicationArgs_idx_1#0) + ((itxn_field TypeEnum) inner_txn_params%0%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%0%%param_Fee_idx_0#0) + goto block@1 + block@1: // next_txn_L10 + itxn_submit + let helloApp#0: uint64 = itxn[itxn_group_idx(0)].CreatedApplicationID + itxn_begin + let inner_txn_params%1#0: itxn_field_set = itxn_field_set(1) + let inner_txn_params%1%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%1%%Fee_length#0: uint64 = 1u + let inner_txn_params%1%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%1%%TypeEnum_length#0: uint64 = 1u + let length%1#0: uint64 = (len "world") + let as_bytes%1#0: bytes = (itob length%1#0) + let length_uint16%1#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_value%1#0: bytes = (concat length_uint16%1#0 "world") + let inner_txn_params%1%%param_ApplicationArgs_idx_0#0: bytes = method "greet(string)string" + let inner_txn_params%1%%param_ApplicationArgs_idx_1#0: bytes = encoded_value%1#0 + let inner_txn_params%1%%ApplicationArgs_length#0: uint64 = 2u + let inner_txn_params%1%%param_ApplicationID_idx_0#0: uint64 = helloApp#0 + let inner_txn_params%1%%ApplicationID_length#0: uint64 = 1u + let inner_txn_params%1%%Sender_length#0: uint64 = 0u + let inner_txn_params%1%%Note_length#0: uint64 = 0u + let inner_txn_params%1%%Receiver_length#0: uint64 = 0u + let inner_txn_params%1%%Amount_length#0: uint64 = 0u + let inner_txn_params%1%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%1%%VotePK_length#0: uint64 = 0u + let inner_txn_params%1%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%1%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%1%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%1%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%1%%Type_length#0: uint64 = 0u + let inner_txn_params%1%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%1%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%1%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%1%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%1%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%1%%OnCompletion_length#0: uint64 = 0u + let inner_txn_params%1%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%1%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%1%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%1%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%1%%GlobalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%1%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%1%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%1%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%1%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%1%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%1%%Accounts_length#0: uint64 = 0u + let inner_txn_params%1%%Assets_length#0: uint64 = 0u + let inner_txn_params%1%%Applications_length#0: uint64 = 0u + let inner_txn_params%1%%ApprovalProgramPages_length#0: uint64 = 0u + let inner_txn_params%1%%ClearStateProgramPages_length#0: uint64 = 0u + ((itxn_field ApplicationID) inner_txn_params%1%%param_ApplicationID_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%1%%param_ApplicationArgs_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%1%%param_ApplicationArgs_idx_1#0) + ((itxn_field TypeEnum) inner_txn_params%1%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%1%%param_Fee_idx_0#0) + goto block@2 + block@2: // next_txn_L19 + itxn_submit + let txn#0: itxn_group_idx = itxn_group_idx(0) + let txn._is_last#0: bool = 1u + let txn.Sender#0: bytes = itxn[txn#0].Sender + let txn.Fee#0: uint64 = itxn[txn#0].Fee + let txn.FirstValid#0: uint64 = itxn[txn#0].FirstValid + let txn.FirstValidTime#0: uint64 = itxn[txn#0].FirstValidTime + let txn.LastValid#0: uint64 = itxn[txn#0].LastValid + let txn.Note#0: bytes = itxn[txn#0].Note + let txn.Lease#0: bytes = itxn[txn#0].Lease + let txn.Receiver#0: bytes = itxn[txn#0].Receiver + let txn.Amount#0: uint64 = itxn[txn#0].Amount + let txn.CloseRemainderTo#0: bytes = itxn[txn#0].CloseRemainderTo + let txn.VotePK#0: bytes = itxn[txn#0].VotePK + let txn.SelectionPK#0: bytes = itxn[txn#0].SelectionPK + let txn.VoteFirst#0: uint64 = itxn[txn#0].VoteFirst + let txn.VoteLast#0: uint64 = itxn[txn#0].VoteLast + let txn.VoteKeyDilution#0: uint64 = itxn[txn#0].VoteKeyDilution + let txn.Type#0: bytes = itxn[txn#0].Type + let txn.TypeEnum#0: uint64 = itxn[txn#0].TypeEnum + let txn.XferAsset#0: uint64 = itxn[txn#0].XferAsset + let txn.AssetAmount#0: uint64 = itxn[txn#0].AssetAmount + let txn.AssetSender#0: bytes = itxn[txn#0].AssetSender + let txn.AssetReceiver#0: bytes = itxn[txn#0].AssetReceiver + let txn.AssetCloseTo#0: bytes = itxn[txn#0].AssetCloseTo + let txn.GroupIndex#0: uint64 = itxn[txn#0].GroupIndex + let txn.TxID#0: bytes = itxn[txn#0].TxID + let txn.ApplicationID#0: uint64 = itxn[txn#0].ApplicationID + let txn.OnCompletion#0: uint64 = itxn[txn#0].OnCompletion + let txn.NumAppArgs#0: uint64 = itxn[txn#0].NumAppArgs + let txn.NumAccounts#0: uint64 = itxn[txn#0].NumAccounts + let txn.ApprovalProgram#0: bytes = itxn[txn#0].ApprovalProgram + let txn.ClearStateProgram#0: bytes = itxn[txn#0].ClearStateProgram + let txn.RekeyTo#0: bytes = itxn[txn#0].RekeyTo + let txn.ConfigAsset#0: uint64 = itxn[txn#0].ConfigAsset + let txn.ConfigAssetTotal#0: uint64 = itxn[txn#0].ConfigAssetTotal + let txn.ConfigAssetDecimals#0: uint64 = itxn[txn#0].ConfigAssetDecimals + let txn.ConfigAssetDefaultFrozen#0: bool = itxn[txn#0].ConfigAssetDefaultFrozen + let txn.ConfigAssetUnitName#0: bytes = itxn[txn#0].ConfigAssetUnitName + let txn.ConfigAssetName#0: bytes = itxn[txn#0].ConfigAssetName + let txn.ConfigAssetURL#0: bytes = itxn[txn#0].ConfigAssetURL + let txn.ConfigAssetMetadataHash#0: bytes = itxn[txn#0].ConfigAssetMetadataHash + let txn.ConfigAssetManager#0: bytes = itxn[txn#0].ConfigAssetManager + let txn.ConfigAssetReserve#0: bytes = itxn[txn#0].ConfigAssetReserve + let txn.ConfigAssetFreeze#0: bytes = itxn[txn#0].ConfigAssetFreeze + let txn.ConfigAssetClawback#0: bytes = itxn[txn#0].ConfigAssetClawback + let txn.FreezeAsset#0: uint64 = itxn[txn#0].FreezeAsset + let txn.FreezeAssetAccount#0: bytes = itxn[txn#0].FreezeAssetAccount + let txn.FreezeAssetFrozen#0: bool = itxn[txn#0].FreezeAssetFrozen + let txn.NumAssets#0: uint64 = itxn[txn#0].NumAssets + let txn.NumApplications#0: uint64 = itxn[txn#0].NumApplications + let txn.GlobalNumUint#0: uint64 = itxn[txn#0].GlobalNumUint + let txn.GlobalNumByteSlice#0: uint64 = itxn[txn#0].GlobalNumByteSlice + let txn.LocalNumUint#0: uint64 = itxn[txn#0].LocalNumUint + let txn.LocalNumByteSlice#0: uint64 = itxn[txn#0].LocalNumByteSlice + let txn.ExtraProgramPages#0: uint64 = itxn[txn#0].ExtraProgramPages + let txn.Nonparticipation#0: bool = itxn[txn#0].Nonparticipation + let txn.NumLogs#0: uint64 = itxn[txn#0].NumLogs + let txn.CreatedAssetID#0: uint64 = itxn[txn#0].CreatedAssetID + let txn.CreatedApplicationID#0: uint64 = itxn[txn#0].CreatedApplicationID + let txn.LastLog#0: bytes = itxn[txn#0].LastLog + let txn.StateProofPK#0: bytes = itxn[txn#0].StateProofPK + let txn.NumApprovalProgramPages#0: uint64 = itxn[txn#0].NumApprovalProgramPages + let txn.NumClearStateProgramPages#0: uint64 = itxn[txn#0].NumClearStateProgramPages + let tmp%0#0: bytes = ((extract 4 0) txn.LastLog#0) + let tmp%1#0: bytes = ((extract 0 4) txn.LastLog#0) + let tmp%2#0: bool = (== tmp%1#0 0x151f7c75) + (assert tmp%2#0) // Bytes has valid prefix + let result#0: bytes = ((extract 2 0) tmp%0#0) + let tmp%3#0: bool = (== result#0 "hello world") + (assert tmp%3#0) + itxn_begin + let inner_txn_params%2#0: itxn_field_set = itxn_field_set(2) + let inner_txn_params%2%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%2%%Fee_length#0: uint64 = 1u + let inner_txn_params%2%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%2%%TypeEnum_length#0: uint64 = 1u + let inner_txn_params%2%%param_ApplicationID_idx_0#0: uint64 = helloApp#0 + let inner_txn_params%2%%ApplicationID_length#0: uint64 = 1u + let inner_txn_params%2%%param_ApplicationArgs_idx_0#0: bytes = method "delete()void" + let inner_txn_params%2%%ApplicationArgs_length#0: uint64 = 1u + let inner_txn_params%2%%param_OnCompletion_idx_0#0: uint64 = 5u + let inner_txn_params%2%%OnCompletion_length#0: uint64 = 1u + let inner_txn_params%2%%Sender_length#0: uint64 = 0u + let inner_txn_params%2%%Note_length#0: uint64 = 0u + let inner_txn_params%2%%Receiver_length#0: uint64 = 0u + let inner_txn_params%2%%Amount_length#0: uint64 = 0u + let inner_txn_params%2%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%2%%VotePK_length#0: uint64 = 0u + let inner_txn_params%2%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%2%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%2%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%2%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%2%%Type_length#0: uint64 = 0u + let inner_txn_params%2%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%2%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%2%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%2%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%2%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%2%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%2%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%2%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%2%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%2%%GlobalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%2%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%2%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%2%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%2%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%2%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%2%%Accounts_length#0: uint64 = 0u + let inner_txn_params%2%%Assets_length#0: uint64 = 0u + let inner_txn_params%2%%Applications_length#0: uint64 = 0u + let inner_txn_params%2%%ApprovalProgramPages_length#0: uint64 = 0u + let inner_txn_params%2%%ClearStateProgramPages_length#0: uint64 = 0u + ((itxn_field OnCompletion) inner_txn_params%2%%param_OnCompletion_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%2%%param_ApplicationArgs_idx_0#0) + ((itxn_field ApplicationID) inner_txn_params%2%%param_ApplicationID_idx_0#0) + ((itxn_field TypeEnum) inner_txn_params%2%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%2%%param_Fee_idx_0#0) + goto block@3 + block@3: // next_txn_L29 + itxn_submit + return + + subroutine tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_with_template() -> void: + block@0: // L38 + let (compiled.approvalProgram.0#0: bytes, compiled.approvalProgram.1#0: bytes, compiled.clearStateProgram.0#0: bytes, compiled.clearStateProgram.1#0: bytes, compiled.extraProgramPages#0: uint64, compiled.globalUints#0: uint64, compiled.globalBytes#0: uint64, compiled.localUints#0: uint64, compiled.localBytes#0: uint64) = (compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=ApprovalProgramPages, program_page=0, TMPL_GREETING="hey"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=ApprovalProgramPages, program_page=1, TMPL_GREETING="hey"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=ClearStateProgramPages, program_page=0, TMPL_GREETING="hey"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=ClearStateProgramPages, program_page=1, TMPL_GREETING="hey"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=ExtraProgramPages, program_page=None, TMPL_GREETING="hey"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=GlobalNumUint, program_page=None, TMPL_GREETING="hey"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=GlobalNumByteSlice, program_page=None, TMPL_GREETING="hey"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=LocalNumUint, program_page=None, TMPL_GREETING="hey"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplate', field=LocalNumByteSlice, program_page=None, TMPL_GREETING="hey")) + itxn_begin + let inner_txn_params%0#0: itxn_field_set = itxn_field_set(0) + let inner_txn_params%0%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%0%%Fee_length#0: uint64 = 1u + let inner_txn_params%0%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%0%%TypeEnum_length#0: uint64 = 1u + let inner_txn_params%0%%param_ApplicationArgs_idx_0#0: bytes = method "create()void" + let inner_txn_params%0%%ApplicationArgs_length#0: uint64 = 1u + let inner_txn_params%0%%param_ApprovalProgramPages_idx_0#0: bytes = compiled.approvalProgram.0#0 + let inner_txn_params%0%%param_ApprovalProgramPages_idx_1#0: bytes = compiled.approvalProgram.1#0 + let inner_txn_params%0%%ApprovalProgramPages_length#0: uint64 = 2u + let inner_txn_params%0%%param_ClearStateProgramPages_idx_0#0: bytes = compiled.clearStateProgram.0#0 + let inner_txn_params%0%%param_ClearStateProgramPages_idx_1#0: bytes = compiled.clearStateProgram.1#0 + let inner_txn_params%0%%ClearStateProgramPages_length#0: uint64 = 2u + let inner_txn_params%0%%param_GlobalNumByteSlice_idx_0#0: uint64 = 1u + let inner_txn_params%0%%GlobalNumByteSlice_length#0: uint64 = 1u + let inner_txn_params%0%%Sender_length#0: uint64 = 0u + let inner_txn_params%0%%Note_length#0: uint64 = 0u + let inner_txn_params%0%%Receiver_length#0: uint64 = 0u + let inner_txn_params%0%%Amount_length#0: uint64 = 0u + let inner_txn_params%0%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%0%%VotePK_length#0: uint64 = 0u + let inner_txn_params%0%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%0%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%0%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%0%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%0%%Type_length#0: uint64 = 0u + let inner_txn_params%0%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%0%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%0%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%0%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%0%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%0%%ApplicationID_length#0: uint64 = 0u + let inner_txn_params%0%%OnCompletion_length#0: uint64 = 0u + let inner_txn_params%0%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%0%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%0%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%0%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%0%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%0%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%0%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%0%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%0%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%0%%Accounts_length#0: uint64 = 0u + let inner_txn_params%0%%Assets_length#0: uint64 = 0u + let inner_txn_params%0%%Applications_length#0: uint64 = 0u + ((itxn_field GlobalNumByteSlice) inner_txn_params%0%%param_GlobalNumByteSlice_idx_0#0) + ((itxn_field ClearStateProgramPages) inner_txn_params%0%%param_ClearStateProgramPages_idx_0#0) + ((itxn_field ClearStateProgramPages) inner_txn_params%0%%param_ClearStateProgramPages_idx_1#0) + ((itxn_field ApprovalProgramPages) inner_txn_params%0%%param_ApprovalProgramPages_idx_0#0) + ((itxn_field ApprovalProgramPages) inner_txn_params%0%%param_ApprovalProgramPages_idx_1#0) + ((itxn_field ApplicationArgs) inner_txn_params%0%%param_ApplicationArgs_idx_0#0) + ((itxn_field TypeEnum) inner_txn_params%0%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%0%%param_Fee_idx_0#0) + goto block@1 + block@1: // next_txn_L41 + itxn_submit + let helloApp#0: uint64 = itxn[itxn_group_idx(0)].CreatedApplicationID + itxn_begin + let inner_txn_params%1#0: itxn_field_set = itxn_field_set(1) + let inner_txn_params%1%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%1%%Fee_length#0: uint64 = 1u + let inner_txn_params%1%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%1%%TypeEnum_length#0: uint64 = 1u + let length%0#0: uint64 = (len "world") + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 "world") + let inner_txn_params%1%%param_ApplicationArgs_idx_0#0: bytes = method "greet(string)string" + let inner_txn_params%1%%param_ApplicationArgs_idx_1#0: bytes = encoded_value%0#0 + let inner_txn_params%1%%ApplicationArgs_length#0: uint64 = 2u + let inner_txn_params%1%%param_ApplicationID_idx_0#0: uint64 = helloApp#0 + let inner_txn_params%1%%ApplicationID_length#0: uint64 = 1u + let inner_txn_params%1%%Sender_length#0: uint64 = 0u + let inner_txn_params%1%%Note_length#0: uint64 = 0u + let inner_txn_params%1%%Receiver_length#0: uint64 = 0u + let inner_txn_params%1%%Amount_length#0: uint64 = 0u + let inner_txn_params%1%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%1%%VotePK_length#0: uint64 = 0u + let inner_txn_params%1%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%1%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%1%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%1%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%1%%Type_length#0: uint64 = 0u + let inner_txn_params%1%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%1%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%1%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%1%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%1%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%1%%OnCompletion_length#0: uint64 = 0u + let inner_txn_params%1%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%1%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%1%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%1%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%1%%GlobalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%1%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%1%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%1%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%1%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%1%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%1%%Accounts_length#0: uint64 = 0u + let inner_txn_params%1%%Assets_length#0: uint64 = 0u + let inner_txn_params%1%%Applications_length#0: uint64 = 0u + let inner_txn_params%1%%ApprovalProgramPages_length#0: uint64 = 0u + let inner_txn_params%1%%ClearStateProgramPages_length#0: uint64 = 0u + ((itxn_field ApplicationID) inner_txn_params%1%%param_ApplicationID_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%1%%param_ApplicationArgs_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%1%%param_ApplicationArgs_idx_1#0) + ((itxn_field TypeEnum) inner_txn_params%1%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%1%%param_Fee_idx_0#0) + goto block@2 + block@2: // next_txn_L50 + itxn_submit + let txn#0: itxn_group_idx = itxn_group_idx(0) + let txn._is_last#0: bool = 1u + let txn.Sender#0: bytes = itxn[txn#0].Sender + let txn.Fee#0: uint64 = itxn[txn#0].Fee + let txn.FirstValid#0: uint64 = itxn[txn#0].FirstValid + let txn.FirstValidTime#0: uint64 = itxn[txn#0].FirstValidTime + let txn.LastValid#0: uint64 = itxn[txn#0].LastValid + let txn.Note#0: bytes = itxn[txn#0].Note + let txn.Lease#0: bytes = itxn[txn#0].Lease + let txn.Receiver#0: bytes = itxn[txn#0].Receiver + let txn.Amount#0: uint64 = itxn[txn#0].Amount + let txn.CloseRemainderTo#0: bytes = itxn[txn#0].CloseRemainderTo + let txn.VotePK#0: bytes = itxn[txn#0].VotePK + let txn.SelectionPK#0: bytes = itxn[txn#0].SelectionPK + let txn.VoteFirst#0: uint64 = itxn[txn#0].VoteFirst + let txn.VoteLast#0: uint64 = itxn[txn#0].VoteLast + let txn.VoteKeyDilution#0: uint64 = itxn[txn#0].VoteKeyDilution + let txn.Type#0: bytes = itxn[txn#0].Type + let txn.TypeEnum#0: uint64 = itxn[txn#0].TypeEnum + let txn.XferAsset#0: uint64 = itxn[txn#0].XferAsset + let txn.AssetAmount#0: uint64 = itxn[txn#0].AssetAmount + let txn.AssetSender#0: bytes = itxn[txn#0].AssetSender + let txn.AssetReceiver#0: bytes = itxn[txn#0].AssetReceiver + let txn.AssetCloseTo#0: bytes = itxn[txn#0].AssetCloseTo + let txn.GroupIndex#0: uint64 = itxn[txn#0].GroupIndex + let txn.TxID#0: bytes = itxn[txn#0].TxID + let txn.ApplicationID#0: uint64 = itxn[txn#0].ApplicationID + let txn.OnCompletion#0: uint64 = itxn[txn#0].OnCompletion + let txn.NumAppArgs#0: uint64 = itxn[txn#0].NumAppArgs + let txn.NumAccounts#0: uint64 = itxn[txn#0].NumAccounts + let txn.ApprovalProgram#0: bytes = itxn[txn#0].ApprovalProgram + let txn.ClearStateProgram#0: bytes = itxn[txn#0].ClearStateProgram + let txn.RekeyTo#0: bytes = itxn[txn#0].RekeyTo + let txn.ConfigAsset#0: uint64 = itxn[txn#0].ConfigAsset + let txn.ConfigAssetTotal#0: uint64 = itxn[txn#0].ConfigAssetTotal + let txn.ConfigAssetDecimals#0: uint64 = itxn[txn#0].ConfigAssetDecimals + let txn.ConfigAssetDefaultFrozen#0: bool = itxn[txn#0].ConfigAssetDefaultFrozen + let txn.ConfigAssetUnitName#0: bytes = itxn[txn#0].ConfigAssetUnitName + let txn.ConfigAssetName#0: bytes = itxn[txn#0].ConfigAssetName + let txn.ConfigAssetURL#0: bytes = itxn[txn#0].ConfigAssetURL + let txn.ConfigAssetMetadataHash#0: bytes = itxn[txn#0].ConfigAssetMetadataHash + let txn.ConfigAssetManager#0: bytes = itxn[txn#0].ConfigAssetManager + let txn.ConfigAssetReserve#0: bytes = itxn[txn#0].ConfigAssetReserve + let txn.ConfigAssetFreeze#0: bytes = itxn[txn#0].ConfigAssetFreeze + let txn.ConfigAssetClawback#0: bytes = itxn[txn#0].ConfigAssetClawback + let txn.FreezeAsset#0: uint64 = itxn[txn#0].FreezeAsset + let txn.FreezeAssetAccount#0: bytes = itxn[txn#0].FreezeAssetAccount + let txn.FreezeAssetFrozen#0: bool = itxn[txn#0].FreezeAssetFrozen + let txn.NumAssets#0: uint64 = itxn[txn#0].NumAssets + let txn.NumApplications#0: uint64 = itxn[txn#0].NumApplications + let txn.GlobalNumUint#0: uint64 = itxn[txn#0].GlobalNumUint + let txn.GlobalNumByteSlice#0: uint64 = itxn[txn#0].GlobalNumByteSlice + let txn.LocalNumUint#0: uint64 = itxn[txn#0].LocalNumUint + let txn.LocalNumByteSlice#0: uint64 = itxn[txn#0].LocalNumByteSlice + let txn.ExtraProgramPages#0: uint64 = itxn[txn#0].ExtraProgramPages + let txn.Nonparticipation#0: bool = itxn[txn#0].Nonparticipation + let txn.NumLogs#0: uint64 = itxn[txn#0].NumLogs + let txn.CreatedAssetID#0: uint64 = itxn[txn#0].CreatedAssetID + let txn.CreatedApplicationID#0: uint64 = itxn[txn#0].CreatedApplicationID + let txn.LastLog#0: bytes = itxn[txn#0].LastLog + let txn.StateProofPK#0: bytes = itxn[txn#0].StateProofPK + let txn.NumApprovalProgramPages#0: uint64 = itxn[txn#0].NumApprovalProgramPages + let txn.NumClearStateProgramPages#0: uint64 = itxn[txn#0].NumClearStateProgramPages + let tmp%0#0: bytes = ((extract 4 0) txn.LastLog#0) + let tmp%1#0: bytes = ((extract 0 4) txn.LastLog#0) + let tmp%2#0: bool = (== tmp%1#0 0x151f7c75) + (assert tmp%2#0) // Bytes has valid prefix + let result#0: bytes = ((extract 2 0) tmp%0#0) + let tmp%3#0: bool = (== result#0 "hey world") + (assert tmp%3#0) + itxn_begin + let inner_txn_params%2#0: itxn_field_set = itxn_field_set(2) + let inner_txn_params%2%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%2%%Fee_length#0: uint64 = 1u + let inner_txn_params%2%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%2%%TypeEnum_length#0: uint64 = 1u + let inner_txn_params%2%%param_ApplicationID_idx_0#0: uint64 = helloApp#0 + let inner_txn_params%2%%ApplicationID_length#0: uint64 = 1u + let inner_txn_params%2%%param_ApplicationArgs_idx_0#0: bytes = method "delete()void" + let inner_txn_params%2%%ApplicationArgs_length#0: uint64 = 1u + let inner_txn_params%2%%param_OnCompletion_idx_0#0: uint64 = 5u + let inner_txn_params%2%%OnCompletion_length#0: uint64 = 1u + let inner_txn_params%2%%Sender_length#0: uint64 = 0u + let inner_txn_params%2%%Note_length#0: uint64 = 0u + let inner_txn_params%2%%Receiver_length#0: uint64 = 0u + let inner_txn_params%2%%Amount_length#0: uint64 = 0u + let inner_txn_params%2%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%2%%VotePK_length#0: uint64 = 0u + let inner_txn_params%2%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%2%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%2%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%2%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%2%%Type_length#0: uint64 = 0u + let inner_txn_params%2%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%2%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%2%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%2%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%2%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%2%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%2%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%2%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%2%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%2%%GlobalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%2%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%2%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%2%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%2%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%2%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%2%%Accounts_length#0: uint64 = 0u + let inner_txn_params%2%%Assets_length#0: uint64 = 0u + let inner_txn_params%2%%Applications_length#0: uint64 = 0u + let inner_txn_params%2%%ApprovalProgramPages_length#0: uint64 = 0u + let inner_txn_params%2%%ClearStateProgramPages_length#0: uint64 = 0u + ((itxn_field OnCompletion) inner_txn_params%2%%param_OnCompletion_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%2%%param_ApplicationArgs_idx_0#0) + ((itxn_field ApplicationID) inner_txn_params%2%%param_ApplicationID_idx_0#0) + ((itxn_field TypeEnum) inner_txn_params%2%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%2%%param_Fee_idx_0#0) + goto block@3 + block@3: // next_txn_L60 + itxn_submit + return + + subroutine tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_with_template_and_custom_prefix() -> void: + block@0: // L69 + let (compiled.approvalProgram.0#0: bytes, compiled.approvalProgram.1#0: bytes, compiled.clearStateProgram.0#0: bytes, compiled.clearStateProgram.1#0: bytes, compiled.extraProgramPages#0: uint64, compiled.globalUints#0: uint64, compiled.globalBytes#0: uint64, compiled.localUints#0: uint64, compiled.localBytes#0: uint64) = (compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=ApprovalProgramPages, program_page=0, PRFX_GREETING="bonjour"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=ApprovalProgramPages, program_page=1, PRFX_GREETING="bonjour"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=ClearStateProgramPages, program_page=0, PRFX_GREETING="bonjour"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=ClearStateProgramPages, program_page=1, PRFX_GREETING="bonjour"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=ExtraProgramPages, program_page=None, PRFX_GREETING="bonjour"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=GlobalNumUint, program_page=None, PRFX_GREETING="bonjour"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=GlobalNumByteSlice, program_page=None, PRFX_GREETING="bonjour"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=LocalNumUint, program_page=None, PRFX_GREETING="bonjour"), compiled_contract('tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix', field=LocalNumByteSlice, program_page=None, PRFX_GREETING="bonjour")) + itxn_begin + let inner_txn_params%0#0: itxn_field_set = itxn_field_set(0) + let inner_txn_params%0%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%0%%Fee_length#0: uint64 = 1u + let inner_txn_params%0%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%0%%TypeEnum_length#0: uint64 = 1u + let inner_txn_params%0%%param_ApplicationArgs_idx_0#0: bytes = method "create()void" + let inner_txn_params%0%%ApplicationArgs_length#0: uint64 = 1u + let inner_txn_params%0%%param_ApprovalProgramPages_idx_0#0: bytes = compiled.approvalProgram.0#0 + let inner_txn_params%0%%param_ApprovalProgramPages_idx_1#0: bytes = compiled.approvalProgram.1#0 + let inner_txn_params%0%%ApprovalProgramPages_length#0: uint64 = 2u + let inner_txn_params%0%%param_ClearStateProgramPages_idx_0#0: bytes = compiled.clearStateProgram.0#0 + let inner_txn_params%0%%param_ClearStateProgramPages_idx_1#0: bytes = compiled.clearStateProgram.1#0 + let inner_txn_params%0%%ClearStateProgramPages_length#0: uint64 = 2u + let inner_txn_params%0%%param_GlobalNumByteSlice_idx_0#0: uint64 = 1u + let inner_txn_params%0%%GlobalNumByteSlice_length#0: uint64 = 1u + let inner_txn_params%0%%Sender_length#0: uint64 = 0u + let inner_txn_params%0%%Note_length#0: uint64 = 0u + let inner_txn_params%0%%Receiver_length#0: uint64 = 0u + let inner_txn_params%0%%Amount_length#0: uint64 = 0u + let inner_txn_params%0%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%0%%VotePK_length#0: uint64 = 0u + let inner_txn_params%0%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%0%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%0%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%0%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%0%%Type_length#0: uint64 = 0u + let inner_txn_params%0%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%0%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%0%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%0%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%0%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%0%%ApplicationID_length#0: uint64 = 0u + let inner_txn_params%0%%OnCompletion_length#0: uint64 = 0u + let inner_txn_params%0%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%0%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%0%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%0%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%0%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%0%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%0%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%0%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%0%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%0%%Accounts_length#0: uint64 = 0u + let inner_txn_params%0%%Assets_length#0: uint64 = 0u + let inner_txn_params%0%%Applications_length#0: uint64 = 0u + ((itxn_field GlobalNumByteSlice) inner_txn_params%0%%param_GlobalNumByteSlice_idx_0#0) + ((itxn_field ClearStateProgramPages) inner_txn_params%0%%param_ClearStateProgramPages_idx_0#0) + ((itxn_field ClearStateProgramPages) inner_txn_params%0%%param_ClearStateProgramPages_idx_1#0) + ((itxn_field ApprovalProgramPages) inner_txn_params%0%%param_ApprovalProgramPages_idx_0#0) + ((itxn_field ApprovalProgramPages) inner_txn_params%0%%param_ApprovalProgramPages_idx_1#0) + ((itxn_field ApplicationArgs) inner_txn_params%0%%param_ApplicationArgs_idx_0#0) + ((itxn_field TypeEnum) inner_txn_params%0%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%0%%param_Fee_idx_0#0) + goto block@1 + block@1: // next_txn_L72 + itxn_submit + let helloApp#0: uint64 = itxn[itxn_group_idx(0)].CreatedApplicationID + itxn_begin + let inner_txn_params%1#0: itxn_field_set = itxn_field_set(1) + let inner_txn_params%1%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%1%%Fee_length#0: uint64 = 1u + let inner_txn_params%1%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%1%%TypeEnum_length#0: uint64 = 1u + let length%0#0: uint64 = (len "world") + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 "world") + let inner_txn_params%1%%param_ApplicationArgs_idx_0#0: bytes = method "greet(string)string" + let inner_txn_params%1%%param_ApplicationArgs_idx_1#0: bytes = encoded_value%0#0 + let inner_txn_params%1%%ApplicationArgs_length#0: uint64 = 2u + let inner_txn_params%1%%param_ApplicationID_idx_0#0: uint64 = helloApp#0 + let inner_txn_params%1%%ApplicationID_length#0: uint64 = 1u + let inner_txn_params%1%%Sender_length#0: uint64 = 0u + let inner_txn_params%1%%Note_length#0: uint64 = 0u + let inner_txn_params%1%%Receiver_length#0: uint64 = 0u + let inner_txn_params%1%%Amount_length#0: uint64 = 0u + let inner_txn_params%1%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%1%%VotePK_length#0: uint64 = 0u + let inner_txn_params%1%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%1%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%1%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%1%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%1%%Type_length#0: uint64 = 0u + let inner_txn_params%1%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%1%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%1%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%1%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%1%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%1%%OnCompletion_length#0: uint64 = 0u + let inner_txn_params%1%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%1%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%1%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%1%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%1%%GlobalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%1%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%1%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%1%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%1%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%1%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%1%%Accounts_length#0: uint64 = 0u + let inner_txn_params%1%%Assets_length#0: uint64 = 0u + let inner_txn_params%1%%Applications_length#0: uint64 = 0u + let inner_txn_params%1%%ApprovalProgramPages_length#0: uint64 = 0u + let inner_txn_params%1%%ClearStateProgramPages_length#0: uint64 = 0u + ((itxn_field ApplicationID) inner_txn_params%1%%param_ApplicationID_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%1%%param_ApplicationArgs_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%1%%param_ApplicationArgs_idx_1#0) + ((itxn_field TypeEnum) inner_txn_params%1%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%1%%param_Fee_idx_0#0) + goto block@2 + block@2: // next_txn_L81 + itxn_submit + let txn#0: itxn_group_idx = itxn_group_idx(0) + let txn._is_last#0: bool = 1u + let txn.Sender#0: bytes = itxn[txn#0].Sender + let txn.Fee#0: uint64 = itxn[txn#0].Fee + let txn.FirstValid#0: uint64 = itxn[txn#0].FirstValid + let txn.FirstValidTime#0: uint64 = itxn[txn#0].FirstValidTime + let txn.LastValid#0: uint64 = itxn[txn#0].LastValid + let txn.Note#0: bytes = itxn[txn#0].Note + let txn.Lease#0: bytes = itxn[txn#0].Lease + let txn.Receiver#0: bytes = itxn[txn#0].Receiver + let txn.Amount#0: uint64 = itxn[txn#0].Amount + let txn.CloseRemainderTo#0: bytes = itxn[txn#0].CloseRemainderTo + let txn.VotePK#0: bytes = itxn[txn#0].VotePK + let txn.SelectionPK#0: bytes = itxn[txn#0].SelectionPK + let txn.VoteFirst#0: uint64 = itxn[txn#0].VoteFirst + let txn.VoteLast#0: uint64 = itxn[txn#0].VoteLast + let txn.VoteKeyDilution#0: uint64 = itxn[txn#0].VoteKeyDilution + let txn.Type#0: bytes = itxn[txn#0].Type + let txn.TypeEnum#0: uint64 = itxn[txn#0].TypeEnum + let txn.XferAsset#0: uint64 = itxn[txn#0].XferAsset + let txn.AssetAmount#0: uint64 = itxn[txn#0].AssetAmount + let txn.AssetSender#0: bytes = itxn[txn#0].AssetSender + let txn.AssetReceiver#0: bytes = itxn[txn#0].AssetReceiver + let txn.AssetCloseTo#0: bytes = itxn[txn#0].AssetCloseTo + let txn.GroupIndex#0: uint64 = itxn[txn#0].GroupIndex + let txn.TxID#0: bytes = itxn[txn#0].TxID + let txn.ApplicationID#0: uint64 = itxn[txn#0].ApplicationID + let txn.OnCompletion#0: uint64 = itxn[txn#0].OnCompletion + let txn.NumAppArgs#0: uint64 = itxn[txn#0].NumAppArgs + let txn.NumAccounts#0: uint64 = itxn[txn#0].NumAccounts + let txn.ApprovalProgram#0: bytes = itxn[txn#0].ApprovalProgram + let txn.ClearStateProgram#0: bytes = itxn[txn#0].ClearStateProgram + let txn.RekeyTo#0: bytes = itxn[txn#0].RekeyTo + let txn.ConfigAsset#0: uint64 = itxn[txn#0].ConfigAsset + let txn.ConfigAssetTotal#0: uint64 = itxn[txn#0].ConfigAssetTotal + let txn.ConfigAssetDecimals#0: uint64 = itxn[txn#0].ConfigAssetDecimals + let txn.ConfigAssetDefaultFrozen#0: bool = itxn[txn#0].ConfigAssetDefaultFrozen + let txn.ConfigAssetUnitName#0: bytes = itxn[txn#0].ConfigAssetUnitName + let txn.ConfigAssetName#0: bytes = itxn[txn#0].ConfigAssetName + let txn.ConfigAssetURL#0: bytes = itxn[txn#0].ConfigAssetURL + let txn.ConfigAssetMetadataHash#0: bytes = itxn[txn#0].ConfigAssetMetadataHash + let txn.ConfigAssetManager#0: bytes = itxn[txn#0].ConfigAssetManager + let txn.ConfigAssetReserve#0: bytes = itxn[txn#0].ConfigAssetReserve + let txn.ConfigAssetFreeze#0: bytes = itxn[txn#0].ConfigAssetFreeze + let txn.ConfigAssetClawback#0: bytes = itxn[txn#0].ConfigAssetClawback + let txn.FreezeAsset#0: uint64 = itxn[txn#0].FreezeAsset + let txn.FreezeAssetAccount#0: bytes = itxn[txn#0].FreezeAssetAccount + let txn.FreezeAssetFrozen#0: bool = itxn[txn#0].FreezeAssetFrozen + let txn.NumAssets#0: uint64 = itxn[txn#0].NumAssets + let txn.NumApplications#0: uint64 = itxn[txn#0].NumApplications + let txn.GlobalNumUint#0: uint64 = itxn[txn#0].GlobalNumUint + let txn.GlobalNumByteSlice#0: uint64 = itxn[txn#0].GlobalNumByteSlice + let txn.LocalNumUint#0: uint64 = itxn[txn#0].LocalNumUint + let txn.LocalNumByteSlice#0: uint64 = itxn[txn#0].LocalNumByteSlice + let txn.ExtraProgramPages#0: uint64 = itxn[txn#0].ExtraProgramPages + let txn.Nonparticipation#0: bool = itxn[txn#0].Nonparticipation + let txn.NumLogs#0: uint64 = itxn[txn#0].NumLogs + let txn.CreatedAssetID#0: uint64 = itxn[txn#0].CreatedAssetID + let txn.CreatedApplicationID#0: uint64 = itxn[txn#0].CreatedApplicationID + let txn.LastLog#0: bytes = itxn[txn#0].LastLog + let txn.StateProofPK#0: bytes = itxn[txn#0].StateProofPK + let txn.NumApprovalProgramPages#0: uint64 = itxn[txn#0].NumApprovalProgramPages + let txn.NumClearStateProgramPages#0: uint64 = itxn[txn#0].NumClearStateProgramPages + let tmp%0#0: bytes = ((extract 4 0) txn.LastLog#0) + let tmp%1#0: bytes = ((extract 0 4) txn.LastLog#0) + let tmp%2#0: bool = (== tmp%1#0 0x151f7c75) + (assert tmp%2#0) // Bytes has valid prefix + let result#0: bytes = ((extract 2 0) tmp%0#0) + let tmp%3#0: bool = (== result#0 "bonjour world") + (assert tmp%3#0) + itxn_begin + let inner_txn_params%2#0: itxn_field_set = itxn_field_set(2) + let inner_txn_params%2%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%2%%Fee_length#0: uint64 = 1u + let inner_txn_params%2%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%2%%TypeEnum_length#0: uint64 = 1u + let inner_txn_params%2%%param_ApplicationID_idx_0#0: uint64 = helloApp#0 + let inner_txn_params%2%%ApplicationID_length#0: uint64 = 1u + let inner_txn_params%2%%param_ApplicationArgs_idx_0#0: bytes = method "delete()void" + let inner_txn_params%2%%ApplicationArgs_length#0: uint64 = 1u + let inner_txn_params%2%%param_OnCompletion_idx_0#0: uint64 = 5u + let inner_txn_params%2%%OnCompletion_length#0: uint64 = 1u + let inner_txn_params%2%%Sender_length#0: uint64 = 0u + let inner_txn_params%2%%Note_length#0: uint64 = 0u + let inner_txn_params%2%%Receiver_length#0: uint64 = 0u + let inner_txn_params%2%%Amount_length#0: uint64 = 0u + let inner_txn_params%2%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%2%%VotePK_length#0: uint64 = 0u + let inner_txn_params%2%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%2%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%2%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%2%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%2%%Type_length#0: uint64 = 0u + let inner_txn_params%2%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%2%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%2%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%2%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%2%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%2%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%2%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%2%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%2%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%2%%GlobalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%2%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%2%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%2%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%2%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%2%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%2%%Accounts_length#0: uint64 = 0u + let inner_txn_params%2%%Assets_length#0: uint64 = 0u + let inner_txn_params%2%%Applications_length#0: uint64 = 0u + let inner_txn_params%2%%ApprovalProgramPages_length#0: uint64 = 0u + let inner_txn_params%2%%ClearStateProgramPages_length#0: uint64 = 0u + ((itxn_field OnCompletion) inner_txn_params%2%%param_OnCompletion_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%2%%param_ApplicationArgs_idx_0#0) + ((itxn_field ApplicationID) inner_txn_params%2%%param_ApplicationID_idx_0#0) + ((itxn_field TypeEnum) inner_txn_params%2%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%2%%param_Fee_idx_0#0) + goto block@3 + block@3: // next_txn_L91 + itxn_submit + return + + subroutine tests/approvals/precompiled-factory.algo.ts::HelloFactory.test_compile_contract_large() -> void: + block@0: // L100 + let (compiled.approvalProgram.0#0: bytes, compiled.approvalProgram.1#0: bytes, compiled.clearStateProgram.0#0: bytes, compiled.clearStateProgram.1#0: bytes, compiled.extraProgramPages#0: uint64, compiled.globalUints#0: uint64, compiled.globalBytes#0: uint64, compiled.localUints#0: uint64, compiled.localBytes#0: uint64) = (compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=ApprovalProgramPages, program_page=0), compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=ApprovalProgramPages, program_page=1), compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=ClearStateProgramPages, program_page=0), compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=ClearStateProgramPages, program_page=1), compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=ExtraProgramPages, program_page=None), compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=GlobalNumUint, program_page=None), compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=GlobalNumByteSlice, program_page=None), compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=LocalNumUint, program_page=None), compiled_contract('tests/approvals/precompiled-apps.algo.ts::LargeProgram', field=LocalNumByteSlice, program_page=None)) + itxn_begin + let inner_txn_params%0#0: itxn_field_set = itxn_field_set(0) + let inner_txn_params%0%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%0%%Fee_length#0: uint64 = 1u + let inner_txn_params%0%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%0%%TypeEnum_length#0: uint64 = 1u + let inner_txn_params%0%%param_ApprovalProgramPages_idx_0#0: bytes = compiled.approvalProgram.0#0 + let inner_txn_params%0%%param_ApprovalProgramPages_idx_1#0: bytes = compiled.approvalProgram.1#0 + let inner_txn_params%0%%ApprovalProgramPages_length#0: uint64 = 2u + let inner_txn_params%0%%param_ClearStateProgramPages_idx_0#0: bytes = compiled.clearStateProgram.0#0 + let inner_txn_params%0%%param_ClearStateProgramPages_idx_1#0: bytes = compiled.clearStateProgram.1#0 + let inner_txn_params%0%%ClearStateProgramPages_length#0: uint64 = 2u + let inner_txn_params%0%%param_ExtraProgramPages_idx_0#0: uint64 = compiled.extraProgramPages#0 + let inner_txn_params%0%%ExtraProgramPages_length#0: uint64 = 1u + let inner_txn_params%0%%param_GlobalNumByteSlice_idx_0#0: uint64 = compiled.globalBytes#0 + let inner_txn_params%0%%GlobalNumByteSlice_length#0: uint64 = 1u + let inner_txn_params%0%%Sender_length#0: uint64 = 0u + let inner_txn_params%0%%Note_length#0: uint64 = 0u + let inner_txn_params%0%%Receiver_length#0: uint64 = 0u + let inner_txn_params%0%%Amount_length#0: uint64 = 0u + let inner_txn_params%0%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%0%%VotePK_length#0: uint64 = 0u + let inner_txn_params%0%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%0%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%0%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%0%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%0%%Type_length#0: uint64 = 0u + let inner_txn_params%0%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%0%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%0%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%0%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%0%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%0%%ApplicationID_length#0: uint64 = 0u + let inner_txn_params%0%%OnCompletion_length#0: uint64 = 0u + let inner_txn_params%0%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%0%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%0%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%0%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%0%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%0%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%0%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%0%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%0%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%0%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%0%%ApplicationArgs_length#0: uint64 = 0u + let inner_txn_params%0%%Accounts_length#0: uint64 = 0u + let inner_txn_params%0%%Assets_length#0: uint64 = 0u + let inner_txn_params%0%%Applications_length#0: uint64 = 0u + ((itxn_field GlobalNumByteSlice) inner_txn_params%0%%param_GlobalNumByteSlice_idx_0#0) + ((itxn_field ExtraProgramPages) inner_txn_params%0%%param_ExtraProgramPages_idx_0#0) + ((itxn_field ClearStateProgramPages) inner_txn_params%0%%param_ClearStateProgramPages_idx_0#0) + ((itxn_field ClearStateProgramPages) inner_txn_params%0%%param_ClearStateProgramPages_idx_1#0) + ((itxn_field ApprovalProgramPages) inner_txn_params%0%%param_ApprovalProgramPages_idx_0#0) + ((itxn_field ApprovalProgramPages) inner_txn_params%0%%param_ApprovalProgramPages_idx_1#0) + ((itxn_field TypeEnum) inner_txn_params%0%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%0%%param_Fee_idx_0#0) + goto block@1 + block@1: // next_txn_L103 + itxn_submit + let largeApp#0: uint64 = itxn[itxn_group_idx(0)].CreatedApplicationID + itxn_begin + let inner_txn_params%1#0: itxn_field_set = itxn_field_set(1) + let inner_txn_params%1%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%1%%Fee_length#0: uint64 = 1u + let inner_txn_params%1%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%1%%TypeEnum_length#0: uint64 = 1u + let inner_txn_params%1%%param_ApplicationArgs_idx_0#0: bytes = method "getBigBytesLength()uint64" + let inner_txn_params%1%%ApplicationArgs_length#0: uint64 = 1u + let inner_txn_params%1%%param_ApplicationID_idx_0#0: uint64 = largeApp#0 + let inner_txn_params%1%%ApplicationID_length#0: uint64 = 1u + let inner_txn_params%1%%Sender_length#0: uint64 = 0u + let inner_txn_params%1%%Note_length#0: uint64 = 0u + let inner_txn_params%1%%Receiver_length#0: uint64 = 0u + let inner_txn_params%1%%Amount_length#0: uint64 = 0u + let inner_txn_params%1%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%1%%VotePK_length#0: uint64 = 0u + let inner_txn_params%1%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%1%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%1%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%1%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%1%%Type_length#0: uint64 = 0u + let inner_txn_params%1%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%1%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%1%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%1%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%1%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%1%%OnCompletion_length#0: uint64 = 0u + let inner_txn_params%1%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%1%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%1%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%1%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%1%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%1%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%1%%GlobalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%1%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%1%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%1%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%1%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%1%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%1%%Accounts_length#0: uint64 = 0u + let inner_txn_params%1%%Assets_length#0: uint64 = 0u + let inner_txn_params%1%%Applications_length#0: uint64 = 0u + let inner_txn_params%1%%ApprovalProgramPages_length#0: uint64 = 0u + let inner_txn_params%1%%ClearStateProgramPages_length#0: uint64 = 0u + ((itxn_field ApplicationID) inner_txn_params%1%%param_ApplicationID_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%1%%param_ApplicationArgs_idx_0#0) + ((itxn_field TypeEnum) inner_txn_params%1%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%1%%param_Fee_idx_0#0) + goto block@2 + block@2: // next_txn_L112 + itxn_submit + let txn#0: itxn_group_idx = itxn_group_idx(0) + let txn._is_last#0: bool = 1u + let txn.Sender#0: bytes = itxn[txn#0].Sender + let txn.Fee#0: uint64 = itxn[txn#0].Fee + let txn.FirstValid#0: uint64 = itxn[txn#0].FirstValid + let txn.FirstValidTime#0: uint64 = itxn[txn#0].FirstValidTime + let txn.LastValid#0: uint64 = itxn[txn#0].LastValid + let txn.Note#0: bytes = itxn[txn#0].Note + let txn.Lease#0: bytes = itxn[txn#0].Lease + let txn.Receiver#0: bytes = itxn[txn#0].Receiver + let txn.Amount#0: uint64 = itxn[txn#0].Amount + let txn.CloseRemainderTo#0: bytes = itxn[txn#0].CloseRemainderTo + let txn.VotePK#0: bytes = itxn[txn#0].VotePK + let txn.SelectionPK#0: bytes = itxn[txn#0].SelectionPK + let txn.VoteFirst#0: uint64 = itxn[txn#0].VoteFirst + let txn.VoteLast#0: uint64 = itxn[txn#0].VoteLast + let txn.VoteKeyDilution#0: uint64 = itxn[txn#0].VoteKeyDilution + let txn.Type#0: bytes = itxn[txn#0].Type + let txn.TypeEnum#0: uint64 = itxn[txn#0].TypeEnum + let txn.XferAsset#0: uint64 = itxn[txn#0].XferAsset + let txn.AssetAmount#0: uint64 = itxn[txn#0].AssetAmount + let txn.AssetSender#0: bytes = itxn[txn#0].AssetSender + let txn.AssetReceiver#0: bytes = itxn[txn#0].AssetReceiver + let txn.AssetCloseTo#0: bytes = itxn[txn#0].AssetCloseTo + let txn.GroupIndex#0: uint64 = itxn[txn#0].GroupIndex + let txn.TxID#0: bytes = itxn[txn#0].TxID + let txn.ApplicationID#0: uint64 = itxn[txn#0].ApplicationID + let txn.OnCompletion#0: uint64 = itxn[txn#0].OnCompletion + let txn.NumAppArgs#0: uint64 = itxn[txn#0].NumAppArgs + let txn.NumAccounts#0: uint64 = itxn[txn#0].NumAccounts + let txn.ApprovalProgram#0: bytes = itxn[txn#0].ApprovalProgram + let txn.ClearStateProgram#0: bytes = itxn[txn#0].ClearStateProgram + let txn.RekeyTo#0: bytes = itxn[txn#0].RekeyTo + let txn.ConfigAsset#0: uint64 = itxn[txn#0].ConfigAsset + let txn.ConfigAssetTotal#0: uint64 = itxn[txn#0].ConfigAssetTotal + let txn.ConfigAssetDecimals#0: uint64 = itxn[txn#0].ConfigAssetDecimals + let txn.ConfigAssetDefaultFrozen#0: bool = itxn[txn#0].ConfigAssetDefaultFrozen + let txn.ConfigAssetUnitName#0: bytes = itxn[txn#0].ConfigAssetUnitName + let txn.ConfigAssetName#0: bytes = itxn[txn#0].ConfigAssetName + let txn.ConfigAssetURL#0: bytes = itxn[txn#0].ConfigAssetURL + let txn.ConfigAssetMetadataHash#0: bytes = itxn[txn#0].ConfigAssetMetadataHash + let txn.ConfigAssetManager#0: bytes = itxn[txn#0].ConfigAssetManager + let txn.ConfigAssetReserve#0: bytes = itxn[txn#0].ConfigAssetReserve + let txn.ConfigAssetFreeze#0: bytes = itxn[txn#0].ConfigAssetFreeze + let txn.ConfigAssetClawback#0: bytes = itxn[txn#0].ConfigAssetClawback + let txn.FreezeAsset#0: uint64 = itxn[txn#0].FreezeAsset + let txn.FreezeAssetAccount#0: bytes = itxn[txn#0].FreezeAssetAccount + let txn.FreezeAssetFrozen#0: bool = itxn[txn#0].FreezeAssetFrozen + let txn.NumAssets#0: uint64 = itxn[txn#0].NumAssets + let txn.NumApplications#0: uint64 = itxn[txn#0].NumApplications + let txn.GlobalNumUint#0: uint64 = itxn[txn#0].GlobalNumUint + let txn.GlobalNumByteSlice#0: uint64 = itxn[txn#0].GlobalNumByteSlice + let txn.LocalNumUint#0: uint64 = itxn[txn#0].LocalNumUint + let txn.LocalNumByteSlice#0: uint64 = itxn[txn#0].LocalNumByteSlice + let txn.ExtraProgramPages#0: uint64 = itxn[txn#0].ExtraProgramPages + let txn.Nonparticipation#0: bool = itxn[txn#0].Nonparticipation + let txn.NumLogs#0: uint64 = itxn[txn#0].NumLogs + let txn.CreatedAssetID#0: uint64 = itxn[txn#0].CreatedAssetID + let txn.CreatedApplicationID#0: uint64 = itxn[txn#0].CreatedApplicationID + let txn.LastLog#0: bytes = itxn[txn#0].LastLog + let txn.StateProofPK#0: bytes = itxn[txn#0].StateProofPK + let txn.NumApprovalProgramPages#0: uint64 = itxn[txn#0].NumApprovalProgramPages + let txn.NumClearStateProgramPages#0: uint64 = itxn[txn#0].NumClearStateProgramPages + let tmp%0#0: bytes = ((extract 4 0) txn.LastLog#0) + let tmp%1#0: bytes = ((extract 0 4) txn.LastLog#0) + let tmp%2#0: bool = (== tmp%1#0 0x151f7c75) + (assert tmp%2#0) // Bytes has valid prefix + let result#0: uint64 = (btoi tmp%0#0) + let tmp%3#0: bool = (== result#0 4096u) + (assert tmp%3#0) + itxn_begin + let inner_txn_params%2#0: itxn_field_set = itxn_field_set(2) + let inner_txn_params%2%%param_Fee_idx_0#0: uint64 = 0u + let inner_txn_params%2%%Fee_length#0: uint64 = 1u + let inner_txn_params%2%%param_TypeEnum_idx_0#0: uint64 = 6u + let inner_txn_params%2%%TypeEnum_length#0: uint64 = 1u + let inner_txn_params%2%%param_ApplicationID_idx_0#0: uint64 = largeApp#0 + let inner_txn_params%2%%ApplicationID_length#0: uint64 = 1u + let inner_txn_params%2%%param_ApplicationArgs_idx_0#0: bytes = method "delete()void" + let inner_txn_params%2%%ApplicationArgs_length#0: uint64 = 1u + let inner_txn_params%2%%param_OnCompletion_idx_0#0: uint64 = 5u + let inner_txn_params%2%%OnCompletion_length#0: uint64 = 1u + let inner_txn_params%2%%Sender_length#0: uint64 = 0u + let inner_txn_params%2%%Note_length#0: uint64 = 0u + let inner_txn_params%2%%Receiver_length#0: uint64 = 0u + let inner_txn_params%2%%Amount_length#0: uint64 = 0u + let inner_txn_params%2%%CloseRemainderTo_length#0: uint64 = 0u + let inner_txn_params%2%%VotePK_length#0: uint64 = 0u + let inner_txn_params%2%%SelectionPK_length#0: uint64 = 0u + let inner_txn_params%2%%VoteFirst_length#0: uint64 = 0u + let inner_txn_params%2%%VoteLast_length#0: uint64 = 0u + let inner_txn_params%2%%VoteKeyDilution_length#0: uint64 = 0u + let inner_txn_params%2%%Type_length#0: uint64 = 0u + let inner_txn_params%2%%XferAsset_length#0: uint64 = 0u + let inner_txn_params%2%%AssetAmount_length#0: uint64 = 0u + let inner_txn_params%2%%AssetSender_length#0: uint64 = 0u + let inner_txn_params%2%%AssetReceiver_length#0: uint64 = 0u + let inner_txn_params%2%%AssetCloseTo_length#0: uint64 = 0u + let inner_txn_params%2%%ApprovalProgram_length#0: uint64 = 0u + let inner_txn_params%2%%ClearStateProgram_length#0: uint64 = 0u + let inner_txn_params%2%%RekeyTo_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAsset_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetTotal_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetDecimals_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetDefaultFrozen_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetUnitName_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetName_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetURL_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetMetadataHash_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetManager_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetReserve_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetFreeze_length#0: uint64 = 0u + let inner_txn_params%2%%ConfigAssetClawback_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAsset_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAssetAccount_length#0: uint64 = 0u + let inner_txn_params%2%%FreezeAssetFrozen_length#0: uint64 = 0u + let inner_txn_params%2%%GlobalNumUint_length#0: uint64 = 0u + let inner_txn_params%2%%GlobalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%2%%LocalNumUint_length#0: uint64 = 0u + let inner_txn_params%2%%LocalNumByteSlice_length#0: uint64 = 0u + let inner_txn_params%2%%ExtraProgramPages_length#0: uint64 = 0u + let inner_txn_params%2%%Nonparticipation_length#0: uint64 = 0u + let inner_txn_params%2%%StateProofPK_length#0: uint64 = 0u + let inner_txn_params%2%%Accounts_length#0: uint64 = 0u + let inner_txn_params%2%%Assets_length#0: uint64 = 0u + let inner_txn_params%2%%Applications_length#0: uint64 = 0u + let inner_txn_params%2%%ApprovalProgramPages_length#0: uint64 = 0u + let inner_txn_params%2%%ClearStateProgramPages_length#0: uint64 = 0u + ((itxn_field OnCompletion) inner_txn_params%2%%param_OnCompletion_idx_0#0) + ((itxn_field ApplicationArgs) inner_txn_params%2%%param_ApplicationArgs_idx_0#0) + ((itxn_field ApplicationID) inner_txn_params%2%%param_ApplicationID_idx_0#0) + ((itxn_field TypeEnum) inner_txn_params%2%%param_TypeEnum_idx_0#0) + ((itxn_field Fee) inner_txn_params%2%%param_Fee_idx_0#0) + goto block@3 + block@3: // next_txn_L122 + itxn_submit + return + + subroutine tests/approvals/precompiled-factory.algo.ts::HelloFactory.__algots__.defaultCreate() -> void: + block@0: // L6 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/precompiled-factory/precompiled-factory.awst b/tests/approvals/out/precompiled-factory/precompiled-factory.awst new file mode 100644 index 00000000..01ff4dc1 --- /dev/null +++ b/tests/approvals/out/precompiled-factory/precompiled-factory.awst @@ -0,0 +1,74 @@ +contract HelloFactory +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + test_compile_contract(): void + { + compiled: CompiledContract{ approvalProgram: readonlytuple[bytes, bytes], clearStateProgram: readonlytuple[bytes, bytes], extraProgramPages: uint64, globalUints: uint64, globalBytes: uint64, localUints: uint64, localBytes: uint64 } = compile(tests/approvals/precompiled-apps.algo.ts::Hello + helloApp: application = submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationArgs=[Method("create(string)void"), reinterpret_cast(ARC4_ENCODE("hello", wtype=arc4.dynamic_array))], ApprovalProgramPages=[compiled.approvalProgram.0, compiled.approvalProgram.1], ClearStateProgramPages=[compiled.clearStateProgram.0, compiled.clearStateProgram.1], GlobalNumByteSlice=1)).CreatedApplicationID + txn: inner_transaction_appl = submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationArgs=[Method("greet(string)string"), reinterpret_cast(ARC4_ENCODE("world", wtype=arc4.dynamic_array))], ApplicationID=helloApp)) + result: string = ARC4_DECODE(reinterpret_cast>(checked_maybe([extract<4, 0>((#0 = txn.LastLog)), extract<0, 4>(#0) == 0x151f7c75], comment=Bytes has valid prefix))) + assert(result == "hello world") + submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationID=helloApp, ApplicationArgs=[Method("delete()void")], OnCompletion=5)) + } + + test_compile_contract_with_template(): void + { + compiled: CompiledContract{ approvalProgram: readonlytuple[bytes, bytes], clearStateProgram: readonlytuple[bytes, bytes], extraProgramPages: uint64, globalUints: uint64, globalBytes: uint64, localUints: uint64, localBytes: uint64 } = compile(tests/approvals/precompiled-apps.algo.ts::HelloTemplate, GREETING="hey" + helloApp: application = submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationArgs=[Method("create()void")], ApprovalProgramPages=[compiled.approvalProgram.0, compiled.approvalProgram.1], ClearStateProgramPages=[compiled.clearStateProgram.0, compiled.clearStateProgram.1], GlobalNumByteSlice=1)).CreatedApplicationID + txn: inner_transaction_appl = submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationArgs=[Method("greet(string)string"), reinterpret_cast(ARC4_ENCODE("world", wtype=arc4.dynamic_array))], ApplicationID=helloApp)) + result: string = ARC4_DECODE(reinterpret_cast>(checked_maybe([extract<4, 0>((#1 = txn.LastLog)), extract<0, 4>(#1) == 0x151f7c75], comment=Bytes has valid prefix))) + assert(result == "hey world") + submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationID=helloApp, ApplicationArgs=[Method("delete()void")], OnCompletion=5)) + } + + test_compile_contract_with_template_and_custom_prefix(): void + { + compiled: CompiledContract{ approvalProgram: readonlytuple[bytes, bytes], clearStateProgram: readonlytuple[bytes, bytes], extraProgramPages: uint64, globalUints: uint64, globalBytes: uint64, localUints: uint64, localBytes: uint64 } = compile(tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix, prefix=PRFX_, GREETING="bonjour" + helloApp: application = submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationArgs=[Method("create()void")], ApprovalProgramPages=[compiled.approvalProgram.0, compiled.approvalProgram.1], ClearStateProgramPages=[compiled.clearStateProgram.0, compiled.clearStateProgram.1], GlobalNumByteSlice=1)).CreatedApplicationID + txn: inner_transaction_appl = submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationArgs=[Method("greet(string)string"), reinterpret_cast(ARC4_ENCODE("world", wtype=arc4.dynamic_array))], ApplicationID=helloApp)) + result: string = ARC4_DECODE(reinterpret_cast>(checked_maybe([extract<4, 0>((#2 = txn.LastLog)), extract<0, 4>(#2) == 0x151f7c75], comment=Bytes has valid prefix))) + assert(result == "bonjour world") + submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationID=helloApp, ApplicationArgs=[Method("delete()void")], OnCompletion=5)) + } + + test_compile_contract_large(): void + { + compiled: CompiledContract{ approvalProgram: readonlytuple[bytes, bytes], clearStateProgram: readonlytuple[bytes, bytes], extraProgramPages: uint64, globalUints: uint64, globalBytes: uint64, localUints: uint64, localBytes: uint64 } = compile(tests/approvals/precompiled-apps.algo.ts::LargeProgram + largeApp: application = submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApprovalProgramPages=[compiled.approvalProgram.0, compiled.approvalProgram.1], ClearStateProgramPages=[compiled.clearStateProgram.0, compiled.clearStateProgram.1], ExtraProgramPages=compiled.extraProgramPages, GlobalNumByteSlice=compiled.globalBytes)).CreatedApplicationID + txn: inner_transaction_appl = submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationArgs=[Method("getBigBytesLength()uint64")], ApplicationID=largeApp)) + result: uint64 = ARC4_DECODE(reinterpret_cast(checked_maybe([extract<4, 0>((#3 = txn.LastLog)), extract<0, 4>(#3) == 0x151f7c75], comment=Bytes has valid prefix))) + assert(result == 4096) + submit_txn(create_inner_transaction(Fee=0, TypeEnum=6, ApplicationID=largeApp, ApplicationArgs=[Method("delete()void")], OnCompletion=5)) + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + } + + Contract::constructor(): void + { + this.constructor() + } + + __algots__.defaultCreate(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/precompiled-factory/precompiled-factory.awst.json b/tests/approvals/out/precompiled-factory/precompiled-factory.awst.json new file mode 100644 index 00000000..a548a39d --- /dev/null +++ b/tests/approvals/out/precompiled-factory/precompiled-factory.awst.json @@ -0,0 +1,8945 @@ +[ + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 6, + "end_line": 6, + "column": 0, + "end_column": 37 + }, + "id": "tests/approvals/precompiled-factory.algo.ts::HelloFactory", + "name": "HelloFactory", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 7, + "end_line": 7, + "column": 2, + "end_column": 25 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 7, + "end_line": 36, + "column": 26, + "end_column": 3 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 8, + "end_line": 8, + "column": 10, + "end_column": 35 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 8, + "end_line": 8, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "value": { + "_type": "CompiledContract", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 8, + "end_line": 8, + "column": 21, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "contract": "tests/approvals/precompiled-apps.algo.ts::Hello", + "allocation_overrides": {}, + "prefix": null, + "template_variables": {} + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 10, + "end_line": 17, + "column": 10, + "end_column": 26 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 10, + "end_line": 10, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + }, + "value": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 17, + "end_line": 17, + "column": 16, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "itxn": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 10, + "end_line": 17, + "column": 21, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 10, + "end_line": 16, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 10, + "end_line": 16, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 10, + "end_line": 16, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 12, + "end_line": 12, + "column": 17, + "end_column": 76 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 12, + "end_line": 12, + "column": 18, + "end_column": 54 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "create(string)void" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 12, + "end_line": 12, + "column": 56, + "end_column": 75 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 12, + "end_line": 12, + "column": 56, + "end_column": 75 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 12, + "end_line": 12, + "column": 67, + "end_column": 74 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "hello" + } + } + } + ] + }, + "ApprovalProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 13, + "end_line": 13, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 13, + "end_line": 13, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 13, + "end_line": 13, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "approvalProgram" + }, + "index": "0" + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 13, + "end_line": 13, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 13, + "end_line": 13, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "approvalProgram" + }, + "index": "1" + } + ] + }, + "ClearStateProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 14, + "end_line": 14, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 14, + "end_line": 14, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 14, + "end_line": 14, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 14, + "end_line": 14, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "clearStateProgram" + }, + "index": "0" + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 14, + "end_line": 14, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 14, + "end_line": 14, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 14, + "end_line": 14, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "clearStateProgram" + }, + "index": "1" + } + ] + }, + "GlobalNumByteSlice": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 15, + "end_line": 15, + "column": 24, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null + } + } + } + ] + }, + "field": "CreatedApplicationID", + "array_index": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 19, + "end_line": 24, + "column": 10, + "end_column": 15 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 19, + "end_line": 19, + "column": 10, + "end_column": 13 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "value": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 19, + "end_line": 24, + "column": 16, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 19, + "end_line": 23, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 19, + "end_line": 23, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 19, + "end_line": 23, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 21, + "end_line": 21, + "column": 17, + "end_column": 77 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 21, + "end_line": 21, + "column": 18, + "end_column": 55 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "greet(string)string" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 21, + "end_line": 21, + "column": 57, + "end_column": 76 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 21, + "end_line": 21, + "column": 57, + "end_column": 76 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 21, + "end_line": 21, + "column": 68, + "end_column": 75 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "world" + } + } + } + ] + }, + "ApplicationID": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 22, + "end_line": 22, + "column": 15, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + } + } + } + ] + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 10, + "end_column": 57 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 10, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "result" + }, + "value": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "items": [ + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "extract", + "immediates": [ + 4, + 0 + ], + "stack_args": [ + { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "itxn": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 38, + "end_column": 41 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "field": "LastLog", + "array_index": null + }, + "id": "0" + } + ] + }, + { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "extract", + "immediates": [ + 0, + 4 + ], + "stack_args": [ + { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "itxn": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 38, + "end_column": 41 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "field": "LastLog", + "array_index": null + }, + "id": "0" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 25, + "end_line": 25, + "column": 51, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "6(4+c", + "encoding": "unknown" + } + } + ] + }, + "comment": "Bytes has valid prefix" + } + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 27, + "end_line": 27, + "column": 4, + "end_column": 36 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 27, + "end_line": 27, + "column": 4, + "end_column": 36 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 27, + "end_line": 27, + "column": 11, + "end_column": 35 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 27, + "end_line": 27, + "column": 11, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "result" + }, + "operator": "==", + "rhs": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 27, + "end_line": 27, + "column": 22, + "end_column": 35 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "hello world" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 29, + "end_line": 35, + "column": 4, + "end_column": 15 + }, + "expr": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 29, + "end_line": 35, + "column": 4, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 29, + "end_line": 34, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 29, + "end_line": 34, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 29, + "end_line": 34, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationID": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 31, + "end_line": 31, + "column": 15, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 32, + "end_line": 32, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 32, + "end_line": 32, + "column": 18, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "delete()void" + } + ] + }, + "OnCompletion": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 33, + "end_line": 33, + "column": 39, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "5", + "teal_alias": null + } + } + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-factory.algo.ts::HelloFactory", + "member_name": "test_compile_contract", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 7, + "end_line": 7, + "column": 2, + "end_column": 25 + }, + "name": "test_compile_contract", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 38, + "end_line": 38, + "column": 2, + "end_column": 39 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 38, + "end_line": 67, + "column": 40, + "end_column": 3 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 39, + "end_line": 39, + "column": 10, + "end_column": 82 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 39, + "end_line": 39, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "value": { + "_type": "CompiledContract", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 39, + "end_line": 39, + "column": 21, + "end_column": 82 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "contract": "tests/approvals/precompiled-apps.algo.ts::HelloTemplate", + "allocation_overrides": {}, + "prefix": null, + "template_variables": { + "GREETING": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 39, + "end_line": 39, + "column": 72, + "end_column": 77 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "hey" + } + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 41, + "end_line": 48, + "column": 10, + "end_column": 26 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 41, + "end_line": 41, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + }, + "value": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 48, + "end_line": 48, + "column": 16, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "itxn": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 41, + "end_line": 48, + "column": 21, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 41, + "end_line": 47, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 41, + "end_line": 47, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 41, + "end_line": 47, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 43, + "end_line": 43, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 43, + "end_line": 43, + "column": 18, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "create()void" + } + ] + }, + "ApprovalProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 44, + "end_line": 44, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 44, + "end_line": 44, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 44, + "end_line": 44, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 44, + "end_line": 44, + "column": 25, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "approvalProgram" + }, + "index": "0" + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 44, + "end_line": 44, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 44, + "end_line": 44, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 44, + "end_line": 44, + "column": 25, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "approvalProgram" + }, + "index": "1" + } + ] + }, + "ClearStateProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 45, + "end_line": 45, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 45, + "end_line": 45, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 45, + "end_line": 45, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 45, + "end_line": 45, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "clearStateProgram" + }, + "index": "0" + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 45, + "end_line": 45, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 45, + "end_line": 45, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 45, + "end_line": 45, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "clearStateProgram" + }, + "index": "1" + } + ] + }, + "GlobalNumByteSlice": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 46, + "end_line": 46, + "column": 24, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null + } + } + } + ] + }, + "field": "CreatedApplicationID", + "array_index": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 50, + "end_line": 55, + "column": 10, + "end_column": 15 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 50, + "end_line": 50, + "column": 10, + "end_column": 13 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "value": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 50, + "end_line": 55, + "column": 16, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 50, + "end_line": 54, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 50, + "end_line": 54, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 50, + "end_line": 54, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 52, + "end_line": 52, + "column": 17, + "end_column": 77 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 52, + "end_line": 52, + "column": 18, + "end_column": 55 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "greet(string)string" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 52, + "end_line": 52, + "column": 57, + "end_column": 76 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 52, + "end_line": 52, + "column": 57, + "end_column": 76 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 52, + "end_line": 52, + "column": 68, + "end_column": 75 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "world" + } + } + } + ] + }, + "ApplicationID": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 53, + "end_line": 53, + "column": 15, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + } + } + } + ] + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 10, + "end_column": 57 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 10, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "result" + }, + "value": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "items": [ + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "extract", + "immediates": [ + 4, + 0 + ], + "stack_args": [ + { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "itxn": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 38, + "end_column": 41 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "field": "LastLog", + "array_index": null + }, + "id": "1" + } + ] + }, + { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "extract", + "immediates": [ + 0, + 4 + ], + "stack_args": [ + { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "itxn": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 38, + "end_column": 41 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "field": "LastLog", + "array_index": null + }, + "id": "1" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 56, + "end_line": 56, + "column": 51, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "6(4+c", + "encoding": "unknown" + } + } + ] + }, + "comment": "Bytes has valid prefix" + } + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 58, + "end_line": 58, + "column": 4, + "end_column": 34 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 58, + "end_line": 58, + "column": 4, + "end_column": 34 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 58, + "end_line": 58, + "column": 11, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 58, + "end_line": 58, + "column": 11, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "result" + }, + "operator": "==", + "rhs": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 58, + "end_line": 58, + "column": 22, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "hey world" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 60, + "end_line": 66, + "column": 4, + "end_column": 15 + }, + "expr": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 60, + "end_line": 66, + "column": 4, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 60, + "end_line": 65, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 60, + "end_line": 65, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 60, + "end_line": 65, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationID": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 62, + "end_line": 62, + "column": 15, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 63, + "end_line": 63, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 63, + "end_line": 63, + "column": 18, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "delete()void" + } + ] + }, + "OnCompletion": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 64, + "end_line": 64, + "column": 39, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "5", + "teal_alias": null + } + } + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-factory.algo.ts::HelloFactory", + "member_name": "test_compile_contract_with_template", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 38, + "end_line": 38, + "column": 2, + "end_column": 39 + }, + "name": "test_compile_contract_with_template", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 69, + "end_line": 69, + "column": 2, + "end_column": 57 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 69, + "end_line": 98, + "column": 58, + "end_column": 3 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 70, + "end_line": 70, + "column": 10, + "end_column": 127 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 70, + "end_line": 70, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "value": { + "_type": "CompiledContract", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 70, + "end_line": 70, + "column": 21, + "end_column": 127 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "contract": "tests/approvals/precompiled-apps.algo.ts::HelloTemplateCustomPrefix", + "allocation_overrides": {}, + "prefix": "PRFX_", + "template_variables": { + "GREETING": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 70, + "end_line": 70, + "column": 84, + "end_column": 93 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "bonjour" + } + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 72, + "end_line": 79, + "column": 10, + "end_column": 26 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 72, + "end_line": 72, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + }, + "value": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 79, + "end_line": 79, + "column": 16, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "itxn": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 72, + "end_line": 79, + "column": 21, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 72, + "end_line": 78, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 72, + "end_line": 78, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 72, + "end_line": 78, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 74, + "end_line": 74, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 74, + "end_line": 74, + "column": 18, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "create()void" + } + ] + }, + "ApprovalProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 75, + "end_line": 75, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 75, + "end_line": 75, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 75, + "end_line": 75, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 75, + "end_line": 75, + "column": 25, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "approvalProgram" + }, + "index": "0" + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 75, + "end_line": 75, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 75, + "end_line": 75, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 75, + "end_line": 75, + "column": 25, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "approvalProgram" + }, + "index": "1" + } + ] + }, + "ClearStateProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 76, + "end_line": 76, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 76, + "end_line": 76, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 76, + "end_line": 76, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 76, + "end_line": 76, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "clearStateProgram" + }, + "index": "0" + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 76, + "end_line": 76, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 76, + "end_line": 76, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 76, + "end_line": 76, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "clearStateProgram" + }, + "index": "1" + } + ] + }, + "GlobalNumByteSlice": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 77, + "end_line": 77, + "column": 24, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "1", + "teal_alias": null + } + } + } + ] + }, + "field": "CreatedApplicationID", + "array_index": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 81, + "end_line": 86, + "column": 10, + "end_column": 15 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 81, + "end_line": 81, + "column": 10, + "end_column": 13 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "value": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 81, + "end_line": 86, + "column": 16, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 81, + "end_line": 85, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 81, + "end_line": 85, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 81, + "end_line": 85, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 83, + "end_line": 83, + "column": 17, + "end_column": 77 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 83, + "end_line": 83, + "column": 18, + "end_column": 55 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "greet(string)string" + }, + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 83, + "end_line": 83, + "column": 57, + "end_column": 76 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 83, + "end_line": 83, + "column": 57, + "end_column": 76 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 83, + "end_line": 83, + "column": 68, + "end_column": 75 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "world" + } + } + } + ] + }, + "ApplicationID": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 84, + "end_line": 84, + "column": 15, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + } + } + } + ] + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 10, + "end_column": 57 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 10, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "result" + }, + "value": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "items": [ + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "extract", + "immediates": [ + 4, + 0 + ], + "stack_args": [ + { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "itxn": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 38, + "end_column": 41 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "field": "LastLog", + "array_index": null + }, + "id": "2" + } + ] + }, + { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "extract", + "immediates": [ + 0, + 4 + ], + "stack_args": [ + { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "itxn": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 38, + "end_column": 41 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "field": "LastLog", + "array_index": null + }, + "id": "2" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 87, + "end_line": 87, + "column": 51, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "6(4+c", + "encoding": "unknown" + } + } + ] + }, + "comment": "Bytes has valid prefix" + } + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 89, + "end_line": 89, + "column": 4, + "end_column": 38 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 89, + "end_line": 89, + "column": 4, + "end_column": 38 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 89, + "end_line": 89, + "column": 11, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 89, + "end_line": 89, + "column": 11, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "result" + }, + "operator": "==", + "rhs": { + "_type": "StringConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 89, + "end_line": 89, + "column": 22, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "bonjour world" + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 91, + "end_line": 97, + "column": 4, + "end_column": 15 + }, + "expr": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 91, + "end_line": 97, + "column": 4, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 91, + "end_line": 96, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 91, + "end_line": 96, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 91, + "end_line": 96, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationID": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 93, + "end_line": 93, + "column": 15, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "helloApp" + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 94, + "end_line": 94, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 94, + "end_line": 94, + "column": 18, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "delete()void" + } + ] + }, + "OnCompletion": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 95, + "end_line": 95, + "column": 39, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "5", + "teal_alias": null + } + } + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-factory.algo.ts::HelloFactory", + "member_name": "test_compile_contract_with_template_and_custom_prefix", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 69, + "end_line": 69, + "column": 2, + "end_column": 57 + }, + "name": "test_compile_contract_with_template_and_custom_prefix", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 100, + "end_line": 100, + "column": 2, + "end_column": 31 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 100, + "end_line": 129, + "column": 32, + "end_column": 3 + }, + "body": [ + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 101, + "end_line": 101, + "column": 10, + "end_column": 42 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 101, + "end_line": 101, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "value": { + "_type": "CompiledContract", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 101, + "end_line": 101, + "column": 21, + "end_column": 42 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "contract": "tests/approvals/precompiled-apps.algo.ts::LargeProgram", + "allocation_overrides": {}, + "prefix": null, + "template_variables": {} + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 103, + "end_line": 110, + "column": 10, + "end_column": 26 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 103, + "end_line": 103, + "column": 10, + "end_column": 18 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "largeApp" + }, + "value": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 110, + "end_line": 110, + "column": 16, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "itxn": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 103, + "end_line": 110, + "column": 21, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 103, + "end_line": 109, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 103, + "end_line": 109, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 103, + "end_line": 109, + "column": 21, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApprovalProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 105, + "end_line": 105, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 105, + "end_line": 105, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 105, + "end_line": 105, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 105, + "end_line": 105, + "column": 25, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "approvalProgram" + }, + "index": "0" + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 105, + "end_line": 105, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 105, + "end_line": 105, + "column": 34, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 105, + "end_line": 105, + "column": 25, + "end_column": 33 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "approvalProgram" + }, + "index": "1" + } + ] + }, + "ClearStateProgramPages": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 106, + "end_line": 106, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 106, + "end_line": 106, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 106, + "end_line": 106, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 106, + "end_line": 106, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "clearStateProgram" + }, + "index": "0" + }, + { + "_type": "TupleItemExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 106, + "end_line": 106, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "base": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 106, + "end_line": 106, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 106, + "end_line": 106, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "clearStateProgram" + }, + "index": "1" + } + ] + }, + "ExtraProgramPages": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 107, + "end_line": 107, + "column": 36, + "end_column": 53 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 107, + "end_line": 107, + "column": 27, + "end_column": 35 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "extraProgramPages" + }, + "GlobalNumByteSlice": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 108, + "end_line": 108, + "column": 33, + "end_column": 44 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 108, + "end_line": 108, + "column": 24, + "end_column": 32 + }, + "wtype": { + "_type": "WTuple", + "name": "@algorandfoundation/algorand-typescript/compiled.d.ts::CompiledContract", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "approvalProgram", + "clearStateProgram", + "extraProgramPages", + "globalUints", + "globalBytes", + "localUints", + "localBytes" + ] + }, + "name": "compiled" + }, + "name": "globalBytes" + } + } + } + ] + }, + "field": "CreatedApplicationID", + "array_index": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 112, + "end_line": 117, + "column": 10, + "end_column": 15 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 112, + "end_line": 112, + "column": 10, + "end_column": 13 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "value": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 112, + "end_line": 117, + "column": 16, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 112, + "end_line": 116, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 112, + "end_line": 116, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 112, + "end_line": 116, + "column": 16, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 114, + "end_line": 114, + "column": 17, + "end_column": 62 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 114, + "end_line": 114, + "column": 18, + "end_column": 61 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "getBigBytesLength()uint64" + } + ] + }, + "ApplicationID": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 115, + "end_line": 115, + "column": 15, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "largeApp" + } + } + } + ] + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 10, + "end_column": 57 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 10, + "end_column": 16 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "result" + }, + "value": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "expr": { + "_type": "CheckedMaybe", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ] + }, + "items": [ + { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "extract", + "immediates": [ + 4, + 0 + ], + "stack_args": [ + { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "itxn": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 38, + "end_column": 41 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "field": "LastLog", + "array_index": null + }, + "id": "3" + } + ] + }, + { + "_type": "BytesComparisonExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 19, + "end_column": 57 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "op_code": "extract", + "immediates": [ + 0, + 4 + ], + "stack_args": [ + { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source": { + "_type": "InnerTransactionField", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 42, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "itxn": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 38, + "end_column": 41 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "name": "txn" + }, + "field": "LastLog", + "array_index": null + }, + "id": "3" + } + ] + }, + "operator": "==", + "rhs": { + "_type": "BytesConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 118, + "end_line": 118, + "column": 51, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "6(4+c", + "encoding": "unknown" + } + } + ] + }, + "comment": "Bytes has valid prefix" + } + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 120, + "end_line": 120, + "column": 4, + "end_column": 27 + }, + "expr": { + "_type": "AssertExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 120, + "end_line": 120, + "column": 4, + "end_column": 27 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "condition": { + "_type": "NumericComparisonExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 120, + "end_line": 120, + "column": 11, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "lhs": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 120, + "end_line": 120, + "column": 11, + "end_column": 17 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "result" + }, + "operator": "==", + "rhs": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 120, + "end_line": 120, + "column": 22, + "end_column": 26 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "4096", + "teal_alias": null + } + }, + "error_message": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 122, + "end_line": 128, + "column": 4, + "end_column": 15 + }, + "expr": { + "_type": "SubmitInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 122, + "end_line": 128, + "column": 4, + "end_column": 15 + }, + "wtype": { + "_type": "WInnerTransaction", + "name": "inner_transaction_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "itxns": [ + { + "_type": "CreateInnerTransaction", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 122, + "end_line": 127, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WInnerTransactionFields", + "name": "inner_transaction_fields_appl", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "transaction_type": 6 + }, + "fields": { + "Fee": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 122, + "end_line": 127, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "0", + "teal_alias": null + }, + "TypeEnum": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 122, + "end_line": 127, + "column": 4, + "end_column": 8 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "6", + "teal_alias": null + }, + "ApplicationID": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 124, + "end_line": 124, + "column": 15, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "application", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "largeApp" + }, + "ApplicationArgs": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 125, + "end_line": 125, + "column": 17, + "end_column": 49 + }, + "wtype": { + "_type": "WTuple", + "name": "tuple", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + } + ] + }, + "items": [ + { + "_type": "MethodConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 125, + "end_line": 125, + "column": 18, + "end_column": 48 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "value": "delete()void" + } + ] + }, + "OnCompletion": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 126, + "end_line": 126, + "column": 39, + "end_column": 56 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": "5", + "teal_alias": null + } + } + } + ] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-factory.algo.ts::HelloFactory", + "member_name": "test_compile_contract_large", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 100, + "end_line": 100, + "column": 2, + "end_column": 31 + }, + "name": "test_compile_contract_large", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 6, + "end_line": 6, + "column": 0, + "end_column": 37 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 6, + "end_line": 6, + "column": 0, + "end_column": 37 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 6, + "end_line": 6, + "column": 0, + "end_column": 37 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 6, + "end_line": 6, + "column": 0, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-factory.algo.ts::HelloFactory", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 6, + "end_line": 6, + "column": 0, + "end_column": 37 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 6, + "end_line": 6, + "column": 0, + "end_column": 37 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "Implicitly generated create method", + "args": {}, + "returns": null + }, + "cref": "tests/approvals/precompiled-factory.algo.ts::HelloFactory", + "member_name": "__algots__.defaultCreate", + "arc4_method_config": { + "_type": "ARC4BareMethodConfig", + "source_location": { + "file": "tests/approvals/precompiled-factory.algo.ts", + "line": 6, + "end_line": 6, + "column": 0, + "end_column": 37 + }, + "allowed_completion_types": [ + 0 + ], + "create": 2, + "is_bare": true + } + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + } +] \ No newline at end of file diff --git a/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json b/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json index f0afc366..2f731988 100644 --- a/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json +++ b/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json @@ -425,7 +425,7 @@ "file": "tests/approvals/uint64-expressions.algo.ts", "line": 10, "end_line": 10, - "column": 11, + "column": 18, "end_column": 24 }, "wtype": { diff --git a/tests/approvals/precompiled-apps.algo.ts b/tests/approvals/precompiled-apps.algo.ts new file mode 100644 index 00000000..bdec103e --- /dev/null +++ b/tests/approvals/precompiled-apps.algo.ts @@ -0,0 +1,65 @@ +import { abimethod, Contract, GlobalState, LogicSig, op, TemplateVar } from '@algorandfoundation/algorand-typescript' + +abstract class HelloBase extends Contract { + greeting = GlobalState({ initialValue: '' }) + + @abimethod({ allowActions: 'DeleteApplication' }) + delete() {} + + @abimethod({ allowActions: 'UpdateApplication' }) + update() {} + + greet(name: string): string { + return `${this.greeting.value} ${name}` + } +} + +export class Hello extends HelloBase { + @abimethod({ onCreate: 'require' }) + create(greeting: string) { + this.greeting.value = greeting + } +} + +export class HelloTemplate extends HelloBase { + constructor() { + super() + this.greeting.value = TemplateVar('GREETING') + } + + @abimethod({ onCreate: 'require' }) + create() {} +} + +export class HelloTemplateCustomPrefix extends HelloBase { + constructor() { + super() + this.greeting.value = TemplateVar('GREETING', 'PRFX_') + } + + @abimethod({ onCreate: 'require' }) + create() {} +} + +function getBigBytes() { + return op.bzero(4096) +} + +export class LargeProgram extends Contract { + getBigBytesLength() { + return getBigBytes().length + } + + @abimethod({ allowActions: 'DeleteApplication' }) + delete() {} +} + +/** + * This logic sig can be used to create a custodial account that will allow any transaction to transfer its + * funds/assets. + */ +export class TerribleCustodialAccount extends LogicSig { + program() { + return true + } +} diff --git a/tests/approvals/precompiled-factory.algo.ts b/tests/approvals/precompiled-factory.algo.ts new file mode 100644 index 00000000..b43a9359 --- /dev/null +++ b/tests/approvals/precompiled-factory.algo.ts @@ -0,0 +1,130 @@ +import type { uint64 } from '@algorandfoundation/algorand-typescript' +import { assert, compile, Contract, itxn } from '@algorandfoundation/algorand-typescript' +import { decodeArc4, encodeArc4, methodSelector, OnCompleteAction } from '@algorandfoundation/algorand-typescript/arc4' +import { Hello, HelloTemplate, HelloTemplateCustomPrefix, LargeProgram } from './precompiled-apps.algo' + +class HelloFactory extends Contract { + test_compile_contract() { + const compiled = compile(Hello) + + const helloApp = itxn + .applicationCall({ + appArgs: [methodSelector('create(string)void'), encodeArc4('hello')], + approvalProgram: compiled.approvalProgram, + clearStateProgram: compiled.clearStateProgram, + globalNumBytes: 1, + }) + .submit().createdApp + + const txn = itxn + .applicationCall({ + appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + appId: helloApp, + }) + .submit() + const result = decodeArc4(txn.lastLog, 'log') + + assert(result === 'hello world') + + itxn + .applicationCall({ + appId: helloApp, + appArgs: [methodSelector('delete()void')], + onCompletion: OnCompleteAction.DeleteApplication, + }) + .submit() + } + + test_compile_contract_with_template() { + const compiled = compile(HelloTemplate, { templateVars: { GREETING: 'hey' } }) + + const helloApp = itxn + .applicationCall({ + appArgs: [methodSelector('create()void')], + approvalProgram: compiled.approvalProgram, + clearStateProgram: compiled.clearStateProgram, + globalNumBytes: 1, + }) + .submit().createdApp + + const txn = itxn + .applicationCall({ + appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + appId: helloApp, + }) + .submit() + const result = decodeArc4(txn.lastLog, 'log') + + assert(result === 'hey world') + + itxn + .applicationCall({ + appId: helloApp, + appArgs: [methodSelector('delete()void')], + onCompletion: OnCompleteAction.DeleteApplication, + }) + .submit() + } + + test_compile_contract_with_template_and_custom_prefix() { + const compiled = compile(HelloTemplateCustomPrefix, { templateVars: { GREETING: 'bonjour' }, templateVarsPrefix: 'PRFX_' }) + + const helloApp = itxn + .applicationCall({ + appArgs: [methodSelector('create()void')], + approvalProgram: compiled.approvalProgram, + clearStateProgram: compiled.clearStateProgram, + globalNumBytes: 1, + }) + .submit().createdApp + + const txn = itxn + .applicationCall({ + appArgs: [methodSelector('greet(string)string'), encodeArc4('world')], + appId: helloApp, + }) + .submit() + const result = decodeArc4(txn.lastLog, 'log') + + assert(result === 'bonjour world') + + itxn + .applicationCall({ + appId: helloApp, + appArgs: [methodSelector('delete()void')], + onCompletion: OnCompleteAction.DeleteApplication, + }) + .submit() + } + + test_compile_contract_large() { + const compiled = compile(LargeProgram) + + const largeApp = itxn + .applicationCall({ + approvalProgram: compiled.approvalProgram, + clearStateProgram: compiled.clearStateProgram, + extraProgramPages: compiled.extraProgramPages, + globalNumBytes: compiled.globalBytes, + }) + .submit().createdApp + + const txn = itxn + .applicationCall({ + appArgs: [methodSelector('getBigBytesLength()uint64')], + appId: largeApp, + }) + .submit() + const result = decodeArc4(txn.lastLog, 'log') + + assert(result === 4096) + + itxn + .applicationCall({ + appId: largeApp, + appArgs: [methodSelector('delete()void')], + onCompletion: OnCompleteAction.DeleteApplication, + }) + .submit() + } +} diff --git a/tests/onchain/precompiled.spec.ts b/tests/onchain/precompiled.spec.ts new file mode 100644 index 00000000..3c647899 --- /dev/null +++ b/tests/onchain/precompiled.spec.ts @@ -0,0 +1,20 @@ +import { algo } from '@algorandfoundation/algokit-utils' +import { describe } from 'vitest' +import { createArc4TestFixture } from './util/test-fixture' + +describe('precompiled', () => { + const test = createArc4TestFixture('tests/approvals/precompiled-factory.algo.ts', { HelloFactory: {} }) + + test('Hello contract can be deployed', async ({ appClientHelloFactory }) => { + await appClientHelloFactory.send.call({ method: 'test_compile_contract', extraFee: algo(1) }) + }) + test('HelloTemplate contract can be deployed', async ({ appClientHelloFactory }) => { + await appClientHelloFactory.send.call({ method: 'test_compile_contract_with_template', extraFee: algo(1) }) + }) + test('HelloTemplateCustomPrefix contract can be deployed', async ({ appClientHelloFactory }) => { + await appClientHelloFactory.send.call({ method: 'test_compile_contract_with_template_and_custom_prefix', extraFee: algo(1) }) + }) + test('LargeProgram contract can be deployed', async ({ appClientHelloFactory }) => { + await appClientHelloFactory.send.call({ method: 'test_compile_contract_large', extraFee: algo(1) }) + }) +}) diff --git a/tests/onchain/util/test-fixture.ts b/tests/onchain/util/test-fixture.ts index b94ae56a..28c9a035 100644 --- a/tests/onchain/util/test-fixture.ts +++ b/tests/onchain/util/test-fixture.ts @@ -1,3 +1,4 @@ +import type { AlgorandClient } from '@algorandfoundation/algokit-utils' import { Config, microAlgos } from '@algorandfoundation/algokit-utils' import { algorandFixture } from '@algorandfoundation/algokit-utils/testing' import type { SendAppTransactionResult } from '@algorandfoundation/algokit-utils/types/app' @@ -23,6 +24,7 @@ import { generateTempDir } from '../../../src/util/generate-temp-file' const algorandTestFixture = (localnetFixture: AlgorandFixture) => test.extend<{ localnet: AlgorandFixture + algorand: AlgorandClient testAccount: AlgorandFixture['context']['testAccount'] assetFactory: (assetCreateParams: AssetCreateParams) => Promise }>({ @@ -33,6 +35,9 @@ const algorandTestFixture = (localnetFixture: AlgorandFixture) => testAccount: async ({ localnet }, use) => { await use(localnet.context.testAccount) }, + algorand: async ({ localnet }, use) => { + await use(localnet.context.algorand) + }, assetFactory: async ({ localnet }, use) => { use(async (assetCreateParams: AssetCreateParams) => { const { assetId } = await localnet.algorand.send.assetCreate(assetCreateParams) @@ -41,11 +46,11 @@ const algorandTestFixture = (localnetFixture: AlgorandFixture) => }, }) -function createLazyCompiler(path: string) { +function createLazyCompiler(path: string, options: { outputBytecode: boolean; outputArc32: boolean }) { let result: CompilationArtifacts | undefined = undefined return { getCompileResult(expect: ExpectStatic) { - if (!result) result = compilePath(path, expect) + if (!result) result = compilePath(path, expect, options) return result }, } @@ -71,7 +76,7 @@ type BaseFixtureContextFor = { [key in T as `${key}Invoker`]: ProgramInvoker } export function createBaseTestFixture(path: string, contracts: TContracts[]) { - const lazyCompile = createLazyCompiler(path) + const lazyCompile = createLazyCompiler(path, { outputArc32: false, outputBytecode: true }) const localnet = algorandFixture({ testAccountFunding: microAlgos(100_000_000_000), }) @@ -122,7 +127,7 @@ type ContractConfig = { } export function createArc4TestFixture(path: string, contracts: Record) { - const lazyCompile = createLazyCompiler(path) + const lazyCompile = createLazyCompiler(path, { outputArc32: true, outputBytecode: false }) const localnet = algorandFixture({ testAccountFunding: microAlgos(100_000_000_000), }) @@ -173,7 +178,7 @@ type CompilationArtifacts = { clearStateBinaries: Record } -function compilePath(path: string, expect: ExpectStatic): CompilationArtifacts { +function compilePath(path: string, expect: ExpectStatic, options: { outputBytecode: boolean; outputArc32: boolean }): CompilationArtifacts { using tempDir = generateTempDir() using logCtx = LoggingContext.create() @@ -189,8 +194,7 @@ function compilePath(path: string, expect: ExpectStatic): CompilationArtifacts { { ...defaultPuyaOptions, outputTeal: false, - outputArc32: true, - outputBytecode: true, + ...options, optimizationLevel: 0, }, ) From e0cce03e4b15fe35ab9d6725b03dbab7c8514614 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Wed, 4 Dec 2024 13:17:36 -0800 Subject: [PATCH 27/30] chore: Update algokit-utils dependency --- package-lock.json | 31 +++++++++++++++---------------- package.json | 2 +- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 707d9c9f..b57751e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "zod": "^3.23.8" }, "devDependencies": { - "@algorandfoundation/algokit-utils": "^7.0.0-beta.7", + "@algorandfoundation/algokit-utils": "^8.0.0", "@algorandfoundation/algorand-typescript": "file:packages/algo-ts/dist", "@commitlint/cli": "^19.6.0", "@commitlint/config-conventional": "^19.6.0", @@ -75,19 +75,19 @@ } }, "node_modules/@algorandfoundation/algokit-utils": { - "version": "7.0.0-beta.7", - "resolved": "https://registry.npmjs.org/@algorandfoundation/algokit-utils/-/algokit-utils-7.0.0-beta.7.tgz", - "integrity": "sha512-xueS9bYnboF3x4Zp/7mCgkLZQR91b5NOuM6aZawv5ySZ+GrRqqZnThJYcGVSNG5GSlGp1ypkEi3oXeApmwdGCA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@algorandfoundation/algokit-utils/-/algokit-utils-8.0.0.tgz", + "integrity": "sha512-SIrQpWFJaAbqwN6dMvvEPYxggUjtq2OCpfRLvmBWksJ/Psi2CLdsS3R84vmilszRaLX5C1aRTv0c1rBxYEe3+w==", "dev": true, "license": "MIT", "dependencies": { "buffer": "^6.0.3" }, "engines": { - "node": ">=18.0" + "node": ">=20.0" }, "peerDependencies": { - "algosdk": "^2.7.0" + "algosdk": "^3.0.0" } }, "node_modules/@algorandfoundation/algorand-typescript": { @@ -3005,27 +3005,26 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/algo-msgpack-with-bigint": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/algo-msgpack-with-bigint/-/algo-msgpack-with-bigint-2.1.1.tgz", - "integrity": "sha512-F1tGh056XczEaEAqu7s+hlZUDWwOBT70Eq0lfMpBP2YguSQVyxRbprLq5rELXKQOyOaixTWYhMeMQMzP0U5FoQ==", + "node_modules/algorand-msgpack": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/algorand-msgpack/-/algorand-msgpack-1.1.0.tgz", + "integrity": "sha512-08k7pBQnkaUB5p+jL7f1TRaUIlTSDE0cesFu1mD7llLao+1cAhtvvZmGE3OnisTd0xOn118QMw74SRqddqaYvw==", "dev": true, "license": "ISC", "peer": true, "engines": { - "node": ">= 10" + "node": ">= 14" } }, "node_modules/algosdk": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/algosdk/-/algosdk-2.9.0.tgz", - "integrity": "sha512-o0n0nLMbTX6SFQdMUk2/2sy50jmEmZk5OTPYSh2aAeP8DUPxrhjMPfwGsYNvaO+qk75MixC2eWpfA9vygCQ/Mg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/algosdk/-/algosdk-3.0.0.tgz", + "integrity": "sha512-PIKZ/YvbBpCudduug4KSH1CY/pTotI7/ccbUIbXKtcI9Onevl+57E+K5X4ow4gsCdysZ8zVvSLdxuCcXvsmPOw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "algo-msgpack-with-bigint": "^2.1.1", - "buffer": "^6.0.3", + "algorand-msgpack": "^1.1.0", "hi-base32": "^0.5.1", "js-sha256": "^0.9.0", "js-sha3": "^0.8.0", diff --git a/package.json b/package.json index b1f3b6ad..d6b8177a 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "author": "Algorand foundation", "license": "MIT", "devDependencies": { - "@algorandfoundation/algokit-utils": "^7.0.0-beta.7", + "@algorandfoundation/algokit-utils": "^8.0.0", "@algorandfoundation/algorand-typescript": "file:packages/algo-ts/dist", "@commitlint/cli": "^19.6.0", "@commitlint/config-conventional": "^19.6.0", From d0bfed701c0be1c63814e2dda60419f30103b903 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Wed, 4 Dec 2024 17:06:49 -0800 Subject: [PATCH 28/30] feat: ARC28 emit function --- package.json | 2 +- packages/algo-ts/src/arc-28.ts | 39 + packages/algo-ts/src/index.ts | 1 + src/awst/to-code-visitor.ts | 2 +- src/awst/wtypes.ts | 9 +- src/awst_build/arc4-util.ts | 8 + .../eb/arc28/arc-28-emit-function-builder.ts | 109 + src/awst_build/lib/index.ts | 30 +- src/awst_build/ptypes/arc4-types.ts | 4 + src/awst_build/ptypes/index.ts | 5 + src/awst_build/ptypes/register.ts | 3 + src/constants.ts | 1 + tests/approvals/arc28-events.algo.ts | 31 + .../arc28-events/EventEmitter.approval.teal | 258 ++ .../out/arc28-events/EventEmitter.arc32.json | 81 + .../out/arc28-events/EventEmitter.arc56.json | 259 ++ .../out/arc28-events/EventEmitter.clear.teal | 5 + .../out/arc28-events/EventEmitter.ssa.ir | 147 + .../out/arc28-events/arc28-events.awst | 50 + .../out/arc28-events/arc28-events.awst.json | 2606 +++++++++++++++++ tests/expected-output/abi-decorators.algo.ts | 2 +- tests/expected-output/arc28-events.algo.ts | 19 + tests/onchain/accounts.spec.ts | 6 +- 23 files changed, 3656 insertions(+), 21 deletions(-) create mode 100644 packages/algo-ts/src/arc-28.ts create mode 100644 src/awst_build/eb/arc28/arc-28-emit-function-builder.ts create mode 100644 tests/approvals/arc28-events.algo.ts create mode 100644 tests/approvals/out/arc28-events/EventEmitter.approval.teal create mode 100644 tests/approvals/out/arc28-events/EventEmitter.arc32.json create mode 100644 tests/approvals/out/arc28-events/EventEmitter.arc56.json create mode 100644 tests/approvals/out/arc28-events/EventEmitter.clear.teal create mode 100644 tests/approvals/out/arc28-events/EventEmitter.ssa.ir create mode 100644 tests/approvals/out/arc28-events/arc28-events.awst create mode 100644 tests/approvals/out/arc28-events/arc28-events.awst.json create mode 100644 tests/expected-output/arc28-events.algo.ts diff --git a/package.json b/package.json index d6b8177a..19d22cbf 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dev:examples": "tsx src/cli.ts build examples --output-awst --output-awst-json", "dev:approvals": "rimraf tests/approvals/out && tsx src/cli.ts build tests/approvals --dry-run", "dev:expected-output": "tsx src/cli.ts build tests/expected-output --dry-run", - "dev:testing": "tsx src/cli.ts build tests/approvals/precompiled-factory.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --out-dir out/[name] --optimization-level=0", + "dev:testing": "tsx src/cli.ts build tests/approvals/arc28-events.algo.ts --output-awst --output-awst-json --output-ssa-ir --log-level=info --out-dir out/[name] --optimization-level=0", "audit": "better-npm-audit audit", "format": "prettier --write .", "lint": "eslint \"src/**/*.ts\"", diff --git a/packages/algo-ts/src/arc-28.ts b/packages/algo-ts/src/arc-28.ts new file mode 100644 index 00000000..62f5ce74 --- /dev/null +++ b/packages/algo-ts/src/arc-28.ts @@ -0,0 +1,39 @@ +import { NoImplementation } from './impl/errors' +import { DeliberateAny } from './typescript-helpers' + +/** + * Emit an arc28 event log using either an ARC4Struct type or a named object type. + * Object types must have an ARC4 equivalent type. + * + * Anonymous types cannot be used as the type name is used to determine the event prefix + * @param event An ARC4Struct instance, or a plain object with a named type + * + * @example + * class Demo extends Struct<{ a: UintN64 }> {} + * emit(new Demo({ a: new UintN64(123) })) + * + * @example + * type Demo = { a: uint64 } + * emit({a: 123}) + * // or + * const d: Demo = { a: 123 } + * emit(d) + */ +export function emit>(event: TEvent): void +/** + * Emit an arc28 event log using an explicit name and inferred property/field types. + * Property types must be ARC4 or have an ARC4 equivalent type. + * @param eventName The name of the event (must be a compile time constant) + * @param eventProps A set of event properties (order is significant) + * + * @example + * emit("Demo", new UintN64(123)) + * + * @example + * const a: uint64 = 123 + * emit("Demo", a) + */ +export function emit(eventName: string, ...eventProps: TProps): void +export function emit(event: T | string, ...eventProps: unknown[]): void { + throw new NoImplementation() +} diff --git a/packages/algo-ts/src/index.ts b/packages/algo-ts/src/index.ts index 5bf124e3..5d78b7d4 100644 --- a/packages/algo-ts/src/index.ts +++ b/packages/algo-ts/src/index.ts @@ -17,3 +17,4 @@ export { TemplateVar } from './template-var' export { Base64, Ec, Ecdsa, VrfVerify } from './op-types' export { compile, CompiledContract, CompiledLogicSig } from './compiled' export { MutableArray } from './mutable-array' +export { emit } from './arc-28' diff --git a/src/awst/to-code-visitor.ts b/src/awst/to-code-visitor.ts index 953fffe8..c882e557 100644 --- a/src/awst/to-code-visitor.ts +++ b/src/awst/to-code-visitor.ts @@ -354,7 +354,7 @@ export class ToCodeVisitor ] } visitEmit(expression: Emit): string { - throw new TodoError('Method not implemented.', { sourceLocation: expression.sourceLocation }) + return `emit("${expression.signature}", ${expression.value.accept(this)})` } visitContractMethod(statement: nodes.ContractMethod): string[] { diff --git a/src/awst/wtypes.ts b/src/awst/wtypes.ts index c8b4484f..025820a6 100644 --- a/src/awst/wtypes.ts +++ b/src/awst/wtypes.ts @@ -267,9 +267,9 @@ export namespace wtypes { sourceLocation?: SourceLocation }) { super({ - arc4Name: Object.values(fields) + arc4Name: `(${Object.values(fields) .map((f) => f.arc4Name) - .join(','), + .join(',')})`, name, nativeType: null, }) @@ -278,6 +278,11 @@ export namespace wtypes { this.frozen = frozen this.desc = desc } + + toString(): string { + if (!this.name) return this.arc4Name + return super.toString() + } } export class ARC4Tuple extends ARC4Type { readonly types: ARC4Type[] diff --git a/src/awst_build/arc4-util.ts b/src/awst_build/arc4-util.ts index 76fdb594..ac65f967 100644 --- a/src/awst_build/arc4-util.ts +++ b/src/awst_build/arc4-util.ts @@ -11,6 +11,8 @@ import { boolPType, bytesPType, GroupTransactionPType, + NativeNumericType, + numberPType, ObjectPType, stringPType, TuplePType, @@ -51,6 +53,9 @@ export function isArc4EncodableType(ptype: PType): boolean { return false } +export function ptypeToArc4EncodedType(ptype: TuplePType, sourceLocation: SourceLocation): ARC4TupleType +export function ptypeToArc4EncodedType(ptype: ObjectPType, sourceLocation: SourceLocation): ARC4StructType +export function ptypeToArc4EncodedType(ptype: PType, sourceLocation: SourceLocation): ARC4EncodedType export function ptypeToArc4EncodedType(ptype: PType, sourceLocation: SourceLocation): ARC4EncodedType { if (ptype instanceof ARC4EncodedType) return ptype if (ptype.equals(boolPType)) return ARC4BooleanType @@ -58,6 +63,9 @@ export function ptypeToArc4EncodedType(ptype: PType, sourceLocation: SourceLocat if (ptype.equals(biguintPType)) return new UintNType({ n: 512n }) if (ptype.equals(bytesPType)) return DynamicBytesType if (ptype.equals(stringPType)) return ARC4StringType + if (ptype instanceof NativeNumericType) { + throw new CodeError(numberPType.expressionMessage, { sourceLocation }) + } if (ptype instanceof TuplePType) return new ARC4TupleType({ types: ptype.items.map((i) => ptypeToArc4EncodedType(i, sourceLocation)) }) if (ptype instanceof ObjectPType) return new ARC4StructType({ diff --git a/src/awst_build/eb/arc28/arc-28-emit-function-builder.ts b/src/awst_build/eb/arc28/arc-28-emit-function-builder.ts new file mode 100644 index 00000000..de0475b1 --- /dev/null +++ b/src/awst_build/eb/arc28/arc-28-emit-function-builder.ts @@ -0,0 +1,109 @@ +import { nodeFactory } from '../../../awst/node-factory' +import type { Expression } from '../../../awst/nodes' +import type { SourceLocation } from '../../../awst/source-location' +import { InternalError } from '../../../errors' +import { logger } from '../../../logger' +import { codeInvariant } from '../../../util' +import { ptypeToArc4EncodedType } from '../../arc4-util' +import type { PType } from '../../ptypes' +import { arc28EmitFunction, ObjectPType, stringPType, voidPType } from '../../ptypes' +import { ARC4EncodedType, ARC4StructType } from '../../ptypes/arc4-types' +import { instanceEb } from '../../type-registry' +import type { NodeBuilder } from '../index' +import { FunctionBuilder } from '../index' +import { requireStringConstant } from '../util' +import { parseFunctionArgs } from '../util/arg-parsing' + +export class Arc28EmitFunctionBuilder extends FunctionBuilder { + readonly ptype = arc28EmitFunction + + call(args: ReadonlyArray, typeArgs: ReadonlyArray, sourceLocation: SourceLocation): NodeBuilder { + const { + args: [nameOrObj, ...props], + ptypes: [genericArg], + } = parseFunctionArgs({ + args, + typeArgs, + genericTypeArgs: 1, + callLocation: sourceLocation, + funcName: this.typeDescription, + argSpec: (a) => [a.required(), ...args.slice(1).map(() => a.required())], + }) + + if (nameOrObj.ptype.equals(stringPType)) { + const name = requireStringConstant(nameOrObj).value + const thisModule = nameOrObj.sourceLocation.file ?? '' + + const fields: Record = {} + const values = new Map() + + for (const [index, prop] of Object.entries(props)) { + const arc4Type = ptypeToArc4EncodedType(prop.ptype, prop.sourceLocation) + fields[index] = arc4Type + values.set( + index, + prop.ptype instanceof ARC4EncodedType + ? prop.resolve() + : nodeFactory.aRC4Encode({ + value: prop.resolve(), + wtype: arc4Type.wtype, + sourceLocation: prop.sourceLocation, + }), + ) + } + + const structType = new ARC4StructType({ + name, + module: thisModule, + fields, + description: undefined, + sourceLocation, + }) + const structExpression = nodeFactory.newStruct({ + wtype: structType.wtype, + values, + sourceLocation, + }) + + return emitStruct(structType, structExpression, sourceLocation) + } + codeInvariant(props.length === 0, 'Unexpected args', props[0]?.sourceLocation) + + const eventBuilder = nameOrObj.resolveToPType(genericArg) + + const eventType = eventBuilder.ptype + if (eventType instanceof ARC4StructType) { + return emitStruct(eventType, nameOrObj.resolve(), sourceLocation) + } else if (eventType instanceof ObjectPType) { + if (eventType.isAnonymous) { + logger.error( + eventBuilder.sourceLocation, + 'Event cannot be an anonymous type. If a named type exists, try specifying it explicitly via the generic parameter. Eg. `emit({...})`', + ) + } + const arc4Equivalent = ptypeToArc4EncodedType(eventType, sourceLocation) + return emitStruct( + arc4Equivalent, + nodeFactory.aRC4Encode({ + wtype: arc4Equivalent.wtype, + sourceLocation: nameOrObj.sourceLocation, + value: nameOrObj.resolve(), + }), + sourceLocation, + ) + } + throw new InternalError('Unexpected type for arg 0 of emit', { sourceLocation }) + } +} + +function emitStruct(ptype: ARC4StructType, expression: Expression, sourceLocation: SourceLocation) { + return instanceEb( + nodeFactory.emit({ + signature: ptype.signature, + value: expression, + wtype: voidPType.wtype, + sourceLocation, + }), + voidPType, + ) +} diff --git a/src/awst_build/lib/index.ts b/src/awst_build/lib/index.ts index bade467e..471e8442 100644 --- a/src/awst_build/lib/index.ts +++ b/src/awst_build/lib/index.ts @@ -17,23 +17,11 @@ export function buildLibAwst(context: AwstBuildContext) { propertyInitialization: [], ctor: nodeFactory.contractMethod({ memberName: Constants.constructorMethodName, - cref: contractCref, + cref: baseContractCref, args: [], sourceLocation: SourceLocation.None, documentation: nodeFactory.methodDocumentation(), - body: nodeFactory.block( - { sourceLocation: SourceLocation.None }, - nodeFactory.expressionStatement({ - expr: nodeFactory.subroutineCallExpression({ - args: [], - wtype: wtypes.voidWType, - target: nodeFactory.instanceMethodTarget({ - memberName: Constants.constructorMethodName, - }), - sourceLocation: SourceLocation.None, - }), - }), - ), + body: nodeFactory.block({ sourceLocation: SourceLocation.None }), returnType: wtypes.voidWType, arc4MethodConfig: null, }), @@ -75,7 +63,19 @@ export function buildLibAwst(context: AwstBuildContext) { args: [], sourceLocation: SourceLocation.None, documentation: nodeFactory.methodDocumentation(), - body: nodeFactory.block({ sourceLocation: SourceLocation.None }), + body: nodeFactory.block( + { sourceLocation: SourceLocation.None }, + nodeFactory.expressionStatement({ + expr: nodeFactory.subroutineCallExpression({ + args: [], + wtype: wtypes.voidWType, + target: nodeFactory.instanceMethodTarget({ + memberName: Constants.constructorMethodName, + }), + sourceLocation: SourceLocation.None, + }), + }), + ), returnType: wtypes.voidWType, arc4MethodConfig: null, }), diff --git a/src/awst_build/ptypes/arc4-types.ts b/src/awst_build/ptypes/arc4-types.ts index 32634f91..e4396ae1 100644 --- a/src/awst_build/ptypes/arc4-types.ts +++ b/src/awst_build/ptypes/arc4-types.ts @@ -166,6 +166,10 @@ export class ARC4StructType extends ARC4EncodedType { }) } + get signature(): string { + return `${this.name}${this.wtype.arc4Name}` + } + equals(other: PType): boolean { if (!(other instanceof ARC4StructType)) return false const thisProps = Object.entries(this.fields) diff --git a/src/awst_build/ptypes/index.ts b/src/awst_build/ptypes/index.ts index 129c7951..0c89ca09 100644 --- a/src/awst_build/ptypes/index.ts +++ b/src/awst_build/ptypes/index.ts @@ -1289,3 +1289,8 @@ export const compiledLogicSigType = new ObjectPType({ account: accountPType, }, }) + +export const arc28EmitFunction = new LibFunctionType({ + name: 'emit', + module: Constants.arc28ModuleName, +}) diff --git a/src/awst_build/ptypes/register.ts b/src/awst_build/ptypes/register.ts index ad0e4b31..ab207bfb 100644 --- a/src/awst_build/ptypes/register.ts +++ b/src/awst_build/ptypes/register.ts @@ -1,3 +1,4 @@ +import { Arc28EmitFunctionBuilder } from '../eb/arc28/arc-28-emit-function-builder' import { Arc4AbiMethodDecoratorBuilder, Arc4BareMethodDecoratorBuilder } from '../eb/arc4-bare-method-decorator-builder' import { AddressClassBuilder, @@ -122,6 +123,7 @@ import { applicationItxnType, applicationPType, ApplicationTxnFunction, + arc28EmitFunction, arc4AbiMethodDecorator, arc4BareMethodDecorator, ArrayPType, @@ -236,6 +238,7 @@ export function registerPTypes(typeRegistry: TypeRegistry) { typeRegistry.register({ ptype: urangeFunction, singletonEb: UrangeFunctionBuilder }) typeRegistry.register({ ptype: TemplateVarFunction, singletonEb: TemplateVarFunctionBuilder }) typeRegistry.register({ ptype: compileFunctionType, singletonEb: CompileFunctionBuilder }) + typeRegistry.register({ ptype: arc28EmitFunction, singletonEb: Arc28EmitFunctionBuilder }) typeRegistry.register({ ptype: ContractClassPType, singletonEb: ContractClassBuilder }) typeRegistry.register({ ptype: LogicSigPType, singletonEb: LogicSigClassBuilder }) diff --git a/src/constants.ts b/src/constants.ts index 8c4c3cff..70cebd49 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -18,6 +18,7 @@ export const Constants = { gtxnModuleName: `${algoTsPackage}/gtxn.d.ts`, itxnModuleName: `${algoTsPackage}/itxn.d.ts`, compiledModuleName: `${algoTsPackage}/compiled.d.ts`, + arc28ModuleName: `${algoTsPackage}/arc-28.d.ts`, primitivesModuleName: `${algoTsPackage}/primitives.d.ts`, arc4EncodedTypesModuleName: `${algoTsPackage}/arc4/encoded-types.d.ts`, arc4BareDecoratorName: 'arc4.baremethod', diff --git a/tests/approvals/arc28-events.algo.ts b/tests/approvals/arc28-events.algo.ts new file mode 100644 index 00000000..45c423a3 --- /dev/null +++ b/tests/approvals/arc28-events.algo.ts @@ -0,0 +1,31 @@ +import type { uint64 } from '@algorandfoundation/algorand-typescript' +import { Contract, emit } from '@algorandfoundation/algorand-typescript' +import { Struct, UintN64 } from '@algorandfoundation/algorand-typescript/arc4' + +type Swapped = { + a: uint64 + b: uint64 +} + +class SwappedArc4 extends Struct<{ a: UintN64; b: UintN64 }> {} + +class EventEmitter extends Contract { + emitSwapped(a: uint64, b: uint64) { + emit({ a: b, b: a }) + + const x: Swapped = { a: b, b: a } + emit(x) + + const y = new SwappedArc4({ + a: new UintN64(b), + b: new UintN64(a), + }) + emit(y) + + emit('Swapped', b, a) + } + + emitCustom(arg0: string, arg1: boolean) { + emit('Custom', arg0, arg1) + } +} diff --git a/tests/approvals/out/arc28-events/EventEmitter.approval.teal b/tests/approvals/out/arc28-events/EventEmitter.approval.teal new file mode 100644 index 00000000..6523f956 --- /dev/null +++ b/tests/approvals/out/arc28-events/EventEmitter.approval.teal @@ -0,0 +1,258 @@ +#pragma version 10 + +tests/approvals/arc28-events.algo.ts::EventEmitter.approvalProgram: + intcblock 0 1 + bytecblock 0x 0x1ccbd925 + txn ApplicationID + bnz main_after_if_else@2 + callsub constructor + +main_after_if_else@2: + callsub __puya_arc4_router__ + return + + +// tests/approvals/arc28-events.algo.ts::EventEmitter.constructor() -> void: +constructor: + // tests/approvals/arc28-events.algo.ts:12 + // class EventEmitter extends Contract { + proto 0 0 + retsub + + +// tests/approvals/arc28-events.algo.ts::EventEmitter.__puya_arc4_router__() -> uint64: +__puya_arc4_router__: + // tests/approvals/arc28-events.algo.ts:12 + // class EventEmitter extends Contract { + proto 0 1 + txn NumAppArgs + intc_0 // 0 + != + bz __puya_arc4_router___bare_routing@6 + txna ApplicationArgs 0 + pushbytes 0xd43cee5d // method "emitSwapped(uint64,uint64)void" + pushbytes 0xf14889d7 // method "emitCustom(string,bool)void" + uncover 2 + match __puya_arc4_router___emitSwapped_route@2 __puya_arc4_router___emitCustom_route@3 + b __puya_arc4_router___switch_case_default@4 + +__puya_arc4_router___emitSwapped_route@2: + // tests/approvals/arc28-events.algo.ts:13 + // emitSwapped(a: uint64, b: uint64) { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/arc28-events.algo.ts:12 + // class EventEmitter extends Contract { + txna ApplicationArgs 1 + btoi + txna ApplicationArgs 2 + btoi + // tests/approvals/arc28-events.algo.ts:13 + // emitSwapped(a: uint64, b: uint64) { + callsub emitSwapped + intc_1 // 1 + retsub + +__puya_arc4_router___emitCustom_route@3: + // tests/approvals/arc28-events.algo.ts:29 + // emitCustom(arg0: string, arg1: boolean) { + txn OnCompletion + intc_0 // NoOp + == + assert // OnCompletion is not NoOp + txn ApplicationID + intc_0 // 0 + != + assert // can only call when not creating + // tests/approvals/arc28-events.algo.ts:12 + // class EventEmitter extends Contract { + txna ApplicationArgs 1 + extract 2 0 + txna ApplicationArgs 2 + intc_0 // 0 + getbit + // tests/approvals/arc28-events.algo.ts:29 + // emitCustom(arg0: string, arg1: boolean) { + callsub emitCustom + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@4: + b __puya_arc4_router___after_if_else@10 + +__puya_arc4_router___bare_routing@6: + // tests/approvals/arc28-events.algo.ts:12 + // class EventEmitter extends Contract { + txn OnCompletion + intc_0 // 0 + swap + match __puya_arc4_router_____algots__.defaultCreate@7 + b __puya_arc4_router___switch_case_default@8 + +__puya_arc4_router_____algots__.defaultCreate@7: + // tests/approvals/arc28-events.algo.ts:12 + // class EventEmitter extends Contract { + txn ApplicationID + intc_0 // 0 + == + assert // can only call when creating + callsub __algots__.defaultCreate + intc_1 // 1 + retsub + +__puya_arc4_router___switch_case_default@8: + +__puya_arc4_router___after_if_else@10: + // tests/approvals/arc28-events.algo.ts:12 + // class EventEmitter extends Contract { + intc_0 // 0 + retsub + + +// tests/approvals/arc28-events.algo.ts::EventEmitter.emitSwapped(a: uint64, b: uint64) -> void: +emitSwapped: + // tests/approvals/arc28-events.algo.ts:13 + // emitSwapped(a: uint64, b: uint64) { + proto 2 0 + // tests/approvals/arc28-events.algo.ts:14 + // emit({ a: b, b: a }) + frame_dig -1 + itob + frame_dig -2 + itob + swap + bytec_0 // 0x + swap + concat + swap + concat + bytec_1 // method "Swapped(uint64,uint64)" + swap + concat + log + // tests/approvals/arc28-events.algo.ts:15 + // emit({ a: b, b: a }) + frame_dig -1 + itob + frame_dig -2 + itob + swap + bytec_0 // 0x + swap + concat + swap + concat + pushbytes 0x1a0cbd2a // method "(uint64,uint64)" + swap + concat + log + // tests/approvals/arc28-events.algo.ts:17 + // const x: Swapped = { a: b, b: a } + frame_dig -1 + frame_dig -2 + swap + itob + swap + itob + swap + // tests/approvals/arc28-events.algo.ts:18 + // emit(x) + bytec_0 // 0x + swap + concat + swap + concat + bytec_1 // method "Swapped(uint64,uint64)" + swap + concat + log + // tests/approvals/arc28-events.algo.ts:21 + // a: new UintN64(b), + frame_dig -1 + itob + // tests/approvals/arc28-events.algo.ts:22 + // b: new UintN64(a), + frame_dig -2 + itob + swap + // tests/approvals/arc28-events.algo.ts:20-23 + // const y = new SwappedArc4({ + // a: new UintN64(b), + // b: new UintN64(a), + // }) + bytec_0 // 0x + swap + concat + swap + concat + // tests/approvals/arc28-events.algo.ts:24 + // emit(y) + pushbytes 0xbbab7378 // method "SwappedArc4(uint64,uint64)" + swap + concat + log + // tests/approvals/arc28-events.algo.ts:26 + // emit('Swapped', b, a) + frame_dig -1 + itob + frame_dig -2 + itob + swap + bytec_0 // 0x + swap + concat + swap + concat + bytec_1 // method "Swapped(uint64,uint64)" + swap + concat + log + retsub + + +// tests/approvals/arc28-events.algo.ts::EventEmitter.emitCustom(arg0: bytes, arg1: uint64) -> void: +emitCustom: + // tests/approvals/arc28-events.algo.ts:29 + // emitCustom(arg0: string, arg1: boolean) { + proto 2 0 + // tests/approvals/arc28-events.algo.ts:30 + // emit('Custom', arg0, arg1) + frame_dig -2 + len + itob + extract 6 2 + frame_dig -2 + concat + pushbytes 0x00 + intc_0 // 0 + frame_dig -1 + setbit + pushint 3 // 3 + itob + extract 6 2 + bytec_0 // 0x + swap + concat + swap + concat + swap + concat + pushbytes 0xa313c066 // method "Custom(string,bool)" + swap + concat + log + retsub + + +// tests/approvals/arc28-events.algo.ts::EventEmitter.__algots__.defaultCreate() -> void: +__algots__.defaultCreate: + // tests/approvals/arc28-events.algo.ts:12 + // class EventEmitter extends Contract { + proto 0 0 + retsub diff --git a/tests/approvals/out/arc28-events/EventEmitter.arc32.json b/tests/approvals/out/arc28-events/EventEmitter.arc32.json new file mode 100644 index 00000000..76252628 --- /dev/null +++ b/tests/approvals/out/arc28-events/EventEmitter.arc32.json @@ -0,0 +1,81 @@ +{ + "hints": { + "emitSwapped(uint64,uint64)void": { + "call_config": { + "no_op": "CALL" + } + }, + "emitCustom(string,bool)void": { + "call_config": { + "no_op": "CALL" + } + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjMjgtZXZlbnRzLmFsZ28udHM6OkV2ZW50RW1pdHRlci5hcHByb3ZhbFByb2dyYW06CiAgICBpbnRjYmxvY2sgMCAxCiAgICBieXRlY2Jsb2NrIDB4IDB4MWNjYmQ5MjUKICAgIHR4biBBcHBsaWNhdGl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ZW50cy5hbGdvLnRzOjpFdmVudEVtaXR0ZXIuX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlKCkgLT4gdm9pZDoKX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzI4LWV2ZW50cy5hbGdvLnRzOjEyCiAgICAvLyBjbGFzcyBFdmVudEVtaXR0ZXIgZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjMjgtZXZlbnRzLmFsZ28udHM6OkV2ZW50RW1pdHRlci5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "state": { + "global": { + "num_byte_slices": 0, + "num_uints": 0 + }, + "local": { + "num_byte_slices": 0, + "num_uints": 0 + } + }, + "schema": { + "global": { + "declared": {}, + "reserved": {} + }, + "local": { + "declared": {}, + "reserved": {} + } + }, + "contract": { + "name": "EventEmitter", + "methods": [ + { + "name": "emitSwapped", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + }, + { + "name": "emitCustom", + "args": [ + { + "type": "string", + "name": "arg0" + }, + { + "type": "bool", + "name": "arg1" + } + ], + "readonly": false, + "returns": { + "type": "void" + } + } + ], + "networks": {} + }, + "bare_call_config": { + "no_op": "CREATE" + } +} \ No newline at end of file diff --git a/tests/approvals/out/arc28-events/EventEmitter.arc56.json b/tests/approvals/out/arc28-events/EventEmitter.arc56.json new file mode 100644 index 00000000..a2666a00 --- /dev/null +++ b/tests/approvals/out/arc28-events/EventEmitter.arc56.json @@ -0,0 +1,259 @@ +{ + "name": "EventEmitter", + "structs": {}, + "methods": [ + { + "name": "emitSwapped", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [ + { + "name": "Swapped", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ] + }, + { + "name": "", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ] + }, + { + "name": "SwappedArc4", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ] + }, + { + "name": "Swapped", + "args": [ + { + "type": "uint64", + "name": "0" + }, + { + "type": "uint64", + "name": "1" + } + ] + } + ], + "recommendations": {} + }, + { + "name": "emitCustom", + "args": [ + { + "type": "string", + "name": "arg0" + }, + { + "type": "bool", + "name": "arg1" + } + ], + "returns": { + "type": "void" + }, + "actions": { + "create": [], + "call": [ + "NoOp" + ] + }, + "readonly": false, + "events": [ + { + "name": "Custom", + "args": [ + { + "type": "string", + "name": "0" + }, + { + "type": "bool", + "name": "1" + } + ] + } + ], + "recommendations": {} + } + ], + "arcs": [ + 22, + 28 + ], + "networks": {}, + "state": { + "schema": { + "global": { + "ints": 0, + "bytes": 0 + }, + "local": { + "ints": 0, + "bytes": 0 + } + }, + "keys": { + "global": {}, + "local": {}, + "box": {} + }, + "maps": { + "global": {}, + "local": {}, + "box": {} + } + }, + "bareActions": { + "create": [ + "NoOp" + ], + "call": [] + }, + "sourceInfo": { + "approval": { + "sourceInfo": [ + { + "pc": [ + 69, + 92 + ], + "errorMessage": "OnCompletion is not NoOp" + }, + { + "pc": [ + 132 + ], + "errorMessage": "can only call when creating" + }, + { + "pc": [ + 74, + 97 + ], + "errorMessage": "can only call when not creating" + } + ], + "pcOffsetMethod": "none" + }, + "clear": { + "sourceInfo": [], + "pcOffsetMethod": "none" + } + }, + "source": { + "approval": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjMjgtZXZlbnRzLmFsZ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iAvLyBtZXRob2QgIkN1c3RvbShzdHJpbmcsYm9vbCkiCiAgICBzd2FwCiAgICBjb25jYXQKICAgIGxvZwogICAgcmV0c3ViCgoKLy8gdGVzdHMvYXBwcm92YWxzL2FyYzI4LWV2ZW50cy5hbGdvLnRzOjpFdmVudEVtaXR0ZXIuX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlKCkgLT4gdm9pZDoKX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlOgogICAgLy8gdGVzdHMvYXBwcm92YWxzL2FyYzI4LWV2ZW50cy5hbGdvLnRzOjEyCiAgICAvLyBjbGFzcyBFdmVudEVtaXR0ZXIgZXh0ZW5kcyBDb250cmFjdCB7CiAgICBwcm90byAwIDAKICAgIHJldHN1Ygo=", + "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjMjgtZXZlbnRzLmFsZ28udHM6OkV2ZW50RW1pdHRlci5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" + }, + "events": [ + { + "name": "Swapped", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ] + }, + { + "name": "", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ] + }, + { + "name": "SwappedArc4", + "args": [ + { + "type": "uint64", + "name": "a" + }, + { + "type": "uint64", + "name": "b" + } + ] + }, + { + "name": "Swapped", + "args": [ + { + "type": "uint64", + "name": "0" + }, + { + "type": "uint64", + "name": "1" + } + ] + }, + { + "name": "Custom", + "args": [ + { + "type": "string", + "name": "0" + }, + { + "type": "bool", + "name": "1" + } + ] + } + ], + "templateVariables": {} +} \ No newline at end of file diff --git a/tests/approvals/out/arc28-events/EventEmitter.clear.teal b/tests/approvals/out/arc28-events/EventEmitter.clear.teal new file mode 100644 index 00000000..a157afbe --- /dev/null +++ b/tests/approvals/out/arc28-events/EventEmitter.clear.teal @@ -0,0 +1,5 @@ +#pragma version 10 + +tests/approvals/arc28-events.algo.ts::EventEmitter.clearStateProgram: + pushint 1 // 1 + return diff --git a/tests/approvals/out/arc28-events/EventEmitter.ssa.ir b/tests/approvals/out/arc28-events/EventEmitter.ssa.ir new file mode 100644 index 00000000..43dd9e71 --- /dev/null +++ b/tests/approvals/out/arc28-events/EventEmitter.ssa.ir @@ -0,0 +1,147 @@ +contract tests/approvals/arc28-events.algo.ts::EventEmitter: + program approval: + subroutine @algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract.approvalProgram() -> bool: + block@0: // L1 + let reinterpret_bool%0#0: bool = (txn ApplicationID) + goto reinterpret_bool%0#0 ? block@2 : block@1 + block@1: // if_body_L1 + tests/approvals/arc28-events.algo.ts::EventEmitter.constructor() + goto block@2 + block@2: // after_if_else_L1 + let tmp%0#0: bool = tests/approvals/arc28-events.algo.ts::EventEmitter.__puya_arc4_router__() + return tmp%0#0 + + subroutine tests/approvals/arc28-events.algo.ts::EventEmitter.constructor() -> void: + block@0: // L12 + return + + subroutine tests/approvals/arc28-events.algo.ts::EventEmitter.__puya_arc4_router__() -> bool: + block@0: // L12 + let tmp%0#0: uint64 = (txn NumAppArgs) + let tmp%1#0: bool = (!= tmp%0#0 0u) + goto tmp%1#0 ? block@1 : block@6 + block@1: // abi_routing_L12 + let tmp%2#0: bytes = (txna ApplicationArgs 0) + switch tmp%2#0 {method "emitSwapped(uint64,uint64)void" => block@2, method "emitCustom(string,bool)void" => block@3, * => block@4} + block@2: // emitSwapped_route_L13 + let tmp%3#0: uint64 = (txn OnCompletion) + let tmp%4#0: bool = (== tmp%3#0 NoOp) + (assert tmp%4#0) // OnCompletion is not NoOp + let tmp%5#0: uint64 = (txn ApplicationID) + let tmp%6#0: bool = (!= tmp%5#0 0u) + (assert tmp%6#0) // can only call when not creating + let tmp%7#0: bytes = (txna ApplicationArgs 1) + let tmp%8#0: uint64 = (btoi tmp%7#0) + let tmp%9#0: bytes = (txna ApplicationArgs 2) + let tmp%10#0: uint64 = (btoi tmp%9#0) + tests/approvals/arc28-events.algo.ts::EventEmitter.emitSwapped(tmp%8#0, tmp%10#0) + return 1u + block@3: // emitCustom_route_L29 + let tmp%11#0: uint64 = (txn OnCompletion) + let tmp%12#0: bool = (== tmp%11#0 NoOp) + (assert tmp%12#0) // OnCompletion is not NoOp + let tmp%13#0: uint64 = (txn ApplicationID) + let tmp%14#0: bool = (!= tmp%13#0 0u) + (assert tmp%14#0) // can only call when not creating + let tmp%15#0: bytes = (txna ApplicationArgs 1) + let tmp%16#0: bytes = ((extract 2 0) tmp%15#0) + let tmp%17#0: bytes = (txna ApplicationArgs 2) + let tmp%18#0: bool = (getbit tmp%17#0 0u) + tests/approvals/arc28-events.algo.ts::EventEmitter.emitCustom(tmp%16#0, tmp%18#0) + return 1u + block@4: // switch_case_default_L12 + goto block@5 + block@5: // switch_case_next_L12 + goto block@10 + block@6: // bare_routing_L12 + let tmp%19#0: uint64 = (txn OnCompletion) + switch tmp%19#0 {0u => block@7, * => block@8} + block@7: // __algots__.defaultCreate_L12 + let tmp%20#0: uint64 = (txn ApplicationID) + let tmp%21#0: bool = (== tmp%20#0 0u) + (assert tmp%21#0) // can only call when creating + tests/approvals/arc28-events.algo.ts::EventEmitter.__algots__.defaultCreate() + return 1u + block@8: // switch_case_default_L12 + goto block@9 + block@9: // switch_case_next_L12 + goto block@10 + block@10: // after_if_else_L12 + return 0u + + subroutine tests/approvals/arc28-events.algo.ts::EventEmitter.emitSwapped(a: uint64, b: uint64) -> void: + block@0: // L13 + let val_as_bytes%0#0: bytes = (itob b#0) + let val_as_bytes%1#0: bytes = (itob a#0) + let current_tail_offset%0#0: uint64 = 16u + let encoded_tuple_buffer%0#0: bytes = 0x + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 val_as_bytes%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 val_as_bytes%1#0) + let event%0#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) + (log event%0#0) + let val_as_bytes%2#0: bytes = (itob b#0) + let val_as_bytes%3#0: bytes = (itob a#0) + let current_tail_offset%1#0: uint64 = 16u + let encoded_tuple_buffer%3#0: bytes = 0x + let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 val_as_bytes%2#0) + let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 val_as_bytes%3#0) + let event%1#0: bytes = (concat method "(uint64,uint64)" encoded_tuple_buffer%5#0) + (log event%1#0) + let (x.a#0: uint64, x.b#0: uint64) = (b#0, a#0) + let val_as_bytes%4#0: bytes = (itob x.a#0) + let val_as_bytes%5#0: bytes = (itob x.b#0) + let current_tail_offset%2#0: uint64 = 16u + let encoded_tuple_buffer%6#0: bytes = 0x + let encoded_tuple_buffer%7#0: bytes = (concat encoded_tuple_buffer%6#0 val_as_bytes%4#0) + let encoded_tuple_buffer%8#0: bytes = (concat encoded_tuple_buffer%7#0 val_as_bytes%5#0) + let event%2#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%8#0) + (log event%2#0) + let val_as_bytes%6#0: bytes = (itob b#0) + let val_as_bytes%7#0: bytes = (itob a#0) + let val_as_bytes%8#0: bytes = (itob b#0) + let val_as_bytes%9#0: bytes = (itob a#0) + let current_tail_offset%3#0: uint64 = 16u + let encoded_tuple_buffer%9#0: bytes = 0x + let encoded_tuple_buffer%10#0: bytes = (concat encoded_tuple_buffer%9#0 val_as_bytes%6#0) + let encoded_tuple_buffer%11#0: bytes = (concat encoded_tuple_buffer%10#0 val_as_bytes%9#0) + let y#0: bytes = encoded_tuple_buffer%11#0 + let event%3#0: bytes = (concat method "SwappedArc4(uint64,uint64)" y#0) + (log event%3#0) + let val_as_bytes%10#0: bytes = (itob b#0) + let val_as_bytes%11#0: bytes = (itob a#0) + let current_tail_offset%4#0: uint64 = 16u + let encoded_tuple_buffer%12#0: bytes = 0x + let encoded_tuple_buffer%13#0: bytes = (concat encoded_tuple_buffer%12#0 val_as_bytes%10#0) + let encoded_tuple_buffer%14#0: bytes = (concat encoded_tuple_buffer%13#0 val_as_bytes%11#0) + let event%4#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%14#0) + (log event%4#0) + return + + subroutine tests/approvals/arc28-events.algo.ts::EventEmitter.emitCustom(arg0: bytes, arg1: bool) -> void: + block@0: // L29 + let length%0#0: uint64 = (len arg0#0) + let as_bytes%0#0: bytes = (itob length%0#0) + let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) + let encoded_value%0#0: bytes = (concat length_uint16%0#0 arg0#0) + let encoded_bool%0#0: bytes = (setbit 0x00 0u arg1#0) + let current_tail_offset%0#0: uint64 = 3u + let encoded_tuple_buffer%0#0: bytes = 0x + let as_bytes%1#0: bytes = (itob current_tail_offset%0#0) + let offset_as_uint16%0#0: bytes = ((extract 6 2) as_bytes%1#0) + let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 offset_as_uint16%0#0) + let data_length%0#0: uint64 = (len encoded_value%0#0) + let current_tail_offset%1#0: uint64 = (+ current_tail_offset%0#0 data_length%0#0) + let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 encoded_bool%0#0) + let encoded_tuple_buffer%3#0: bytes = (concat encoded_tuple_buffer%2#0 encoded_value%0#0) + let event%0#0: bytes = (concat method "Custom(string,bool)" encoded_tuple_buffer%3#0) + (log event%0#0) + return + + subroutine tests/approvals/arc28-events.algo.ts::EventEmitter.__algots__.defaultCreate() -> void: + block@0: // L12 + return + + program clear-state: + subroutine @algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract.clearStateProgram() -> bool: + block@0: // L1 + return 1u \ No newline at end of file diff --git a/tests/approvals/out/arc28-events/arc28-events.awst b/tests/approvals/out/arc28-events/arc28-events.awst new file mode 100644 index 00000000..187c3d4c --- /dev/null +++ b/tests/approvals/out/arc28-events/arc28-events.awst @@ -0,0 +1,50 @@ +contract EventEmitter +{ + approvalProgram(): bool + { + if (!Boolean(txn())) { + this.constructor() + } + return arc4Router() + } + + clearProgram(): bool + { + return True + } + + emitSwapped(): void + { + emit("Swapped(uint64,uint64)", ARC4_ENCODE({ a: b, b: a }, wtype=Swapped)) + emit("(uint64,uint64)", ARC4_ENCODE({ a: b, b: a }, wtype=(uint64,uint64))) + x: Swapped{ a: uint64, b: uint64 } = { a: (#0 = { a: b, b: a }).a, b: #0.b } + emit("Swapped(uint64,uint64)", ARC4_ENCODE(x, wtype=Swapped)) + y: SwappedArc4 = new SwappedArc4(a=(#1 = { a: ARC4_ENCODE(b, wtype=arc4.uint64), b: ARC4_ENCODE(a, wtype=arc4.uint64) }).a, b=#1.b) + emit("SwappedArc4(uint64,uint64)", y) + emit("Swapped(uint64,uint64)", new Swapped(0=ARC4_ENCODE(b, wtype=arc4.uint64), 1=ARC4_ENCODE(a, wtype=arc4.uint64))) + } + + emitCustom(): void + { + emit("Custom(string,bool)", new Custom(0=ARC4_ENCODE(arg0, wtype=arc4.dynamic_array), 1=ARC4_ENCODE(arg1, wtype=arc4.bool))) + } + + constructor(): void + { + void + } + + Contract::constructor(): void + { + this.constructor() + } + + BaseContract::constructor(): void + { + } + + __algots__.defaultCreate(): void + { + } + +} \ No newline at end of file diff --git a/tests/approvals/out/arc28-events/arc28-events.awst.json b/tests/approvals/out/arc28-events/arc28-events.awst.json new file mode 100644 index 00000000..2de0b340 --- /dev/null +++ b/tests/approvals/out/arc28-events/arc28-events.awst.json @@ -0,0 +1,2606 @@ +[ + { + "_type": "Contract", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 12, + "end_line": 12, + "column": 0, + "end_column": 37 + }, + "id": "tests/approvals/arc28-events.algo.ts::EventEmitter", + "name": "EventEmitter", + "description": null, + "method_resolution_order": [ + "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract" + ], + "approval_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "IfElse", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "condition": { + "_type": "Not", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "ReinterpretCast", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [] + } + } + }, + "if_branch": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "else_branch": null + }, + { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + } + } + ], + "label": null, + "comment": null + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "approvalProgram", + "arc4_method_config": null + }, + "clear_program": { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "value": { + "_type": "BoolConstant", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "value": true + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "clearStateProgram", + "arc4_method_config": null + }, + "methods": [ + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 13, + "end_line": 13, + "column": 2, + "end_column": 35 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "a", + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 13, + "end_line": 13, + "column": 14, + "end_column": 23 + } + }, + { + "_type": "SubroutineArgument", + "name": "b", + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 13, + "end_line": 13, + "column": 25, + "end_column": 34 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 13, + "end_line": 27, + "column": 36, + "end_column": 3 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 14, + "end_line": 14, + "column": 4, + "end_column": 33 + }, + "expr": { + "_type": "Emit", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 14, + "end_line": 14, + "column": 4, + "end_column": 33 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "signature": "Swapped(uint64,uint64)", + "value": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 14, + "end_line": 14, + "column": 18, + "end_column": 32 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Swapped", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": null, + "frozen": false, + "desc": null + }, + "value": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 14, + "end_line": 14, + "column": 18, + "end_column": 32 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 14, + "end_line": 14, + "column": 23, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 14, + "end_line": 14, + "column": 29, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + ] + } + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 15, + "end_line": 15, + "column": 4, + "end_column": 24 + }, + "expr": { + "_type": "Emit", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 15, + "end_line": 15, + "column": 4, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "signature": "(uint64,uint64)", + "value": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 15, + "end_line": 15, + "column": 9, + "end_column": 23 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": null, + "frozen": false, + "desc": null + }, + "value": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 15, + "end_line": 15, + "column": 9, + "end_column": 23 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 15, + "end_line": 15, + "column": 14, + "end_column": 15 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 15, + "end_line": 15, + "column": 20, + "end_column": 21 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + ] + } + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 10, + "end_column": 37 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 10, + "end_column": 11 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc28-events.algo.ts::Swapped", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "name": "x" + }, + "value": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 23, + "end_column": 37 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc28-events.algo.ts::Swapped", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 23, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 23, + "end_column": 37 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 23, + "end_column": 37 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 28, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 35 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + ] + }, + "id": "0" + }, + "name": "a" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 23, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 23, + "end_column": 37 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 23, + "end_column": 37 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 28, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + }, + { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 17, + "end_line": 17, + "column": 34, + "end_column": 35 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + ] + }, + "id": "0" + }, + "name": "b" + } + ] + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 18, + "end_line": 18, + "column": 4, + "end_column": 11 + }, + "expr": { + "_type": "Emit", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 18, + "end_line": 18, + "column": 4, + "end_column": 11 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "signature": "Swapped(uint64,uint64)", + "value": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 18, + "end_line": 18, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Swapped", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": null, + "frozen": false, + "desc": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 18, + "end_line": 18, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "WTuple", + "name": "tests/approvals/arc28-events.algo.ts::Swapped", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + } + ], + "names": [ + "a", + "b" + ] + }, + "name": "x" + } + } + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 20, + "end_line": 23, + "column": 10, + "end_column": 6 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 20, + "end_line": 20, + "column": 10, + "end_column": 11 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "SwappedArc4", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 20, + "end_line": 20, + "column": 10, + "end_column": 11 + }, + "frozen": false, + "desc": null + }, + "name": "y" + }, + "value": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 20, + "end_line": 23, + "column": 14, + "end_column": 6 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "SwappedArc4", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 20, + "end_line": 20, + "column": 18, + "end_column": 29 + }, + "frozen": false, + "desc": null + }, + "values": { + "a": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 20, + "end_line": 23, + "column": 14, + "end_column": 6 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 20, + "end_line": 23, + "column": 30, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "a", + "b" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 20, + "end_line": 23, + "column": 30, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 21, + "end_line": 21, + "column": 9, + "end_column": 23 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 21, + "end_line": 21, + "column": 21, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + } + }, + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 22, + "end_line": 22, + "column": 9, + "end_column": 23 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 22, + "end_line": 22, + "column": 21, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + } + ] + }, + "id": "1" + }, + "name": "a" + }, + "b": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 20, + "end_line": 23, + "column": 14, + "end_column": 6 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 20, + "end_line": 23, + "column": 30, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "a", + "b" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 20, + "end_line": 23, + "column": 30, + "end_column": 5 + }, + "wtype": { + "_type": "WTuple", + "name": "::", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "a", + "b" + ] + }, + "items": [ + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 21, + "end_line": 21, + "column": 9, + "end_column": 23 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 21, + "end_line": 21, + "column": 21, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + } + }, + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 22, + "end_line": 22, + "column": 9, + "end_column": 23 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 22, + "end_line": 22, + "column": 21, + "end_column": 22 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + } + ] + }, + "id": "1" + }, + "name": "b" + } + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 24, + "end_line": 24, + "column": 4, + "end_column": 11 + }, + "expr": { + "_type": "Emit", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 24, + "end_line": 24, + "column": 4, + "end_column": 11 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "signature": "SwappedArc4(uint64,uint64)", + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 24, + "end_line": 24, + "column": 9, + "end_column": 10 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "SwappedArc4", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "a": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "b": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 24, + "end_line": 24, + "column": 9, + "end_column": 10 + }, + "frozen": false, + "desc": null + }, + "name": "y" + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 26, + "end_line": 26, + "column": 4, + "end_column": 25 + }, + "expr": { + "_type": "Emit", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 26, + "end_line": 26, + "column": 4, + "end_column": 25 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "signature": "Swapped(uint64,uint64)", + "value": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 26, + "end_line": 26, + "column": 4, + "end_column": 25 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Swapped", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(uint64,uint64)", + "fields": { + "0": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "1": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 26, + "end_line": 26, + "column": 4, + "end_column": 25 + }, + "frozen": false, + "desc": null + }, + "values": { + "0": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 26, + "end_line": 26, + "column": 20, + "end_column": 21 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 26, + "end_line": 26, + "column": 20, + "end_column": 21 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "b" + } + }, + "1": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 26, + "end_line": 26, + "column": 23, + "end_column": 24 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 26, + "end_line": 26, + "column": 23, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "a" + } + } + } + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc28-events.algo.ts::EventEmitter", + "member_name": "emitSwapped", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 13, + "end_line": 13, + "column": 2, + "end_column": 35 + }, + "name": "emitSwapped", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 29, + "end_line": 29, + "column": 2, + "end_column": 41 + }, + "args": [ + { + "_type": "SubroutineArgument", + "name": "arg0", + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 29, + "end_line": 29, + "column": 13, + "end_column": 25 + } + }, + { + "_type": "SubroutineArgument", + "name": "arg1", + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 29, + "end_line": 29, + "column": 27, + "end_column": 40 + } + } + ], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 29, + "end_line": 31, + "column": 42, + "end_column": 3 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 30, + "end_line": 30, + "column": 4, + "end_column": 30 + }, + "expr": { + "_type": "Emit", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 30, + "end_line": 30, + "column": 4, + "end_column": 30 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "signature": "Custom(string,bool)", + "value": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 30, + "end_line": 30, + "column": 4, + "end_column": 30 + }, + "wtype": { + "_type": "ARC4Struct", + "name": "Custom", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": null, + "arc4_name": "(string,bool)", + "fields": { + "0": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "1": { + "_type": "ARC4Type", + "name": "arc4.bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "bool" + } + }, + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 30, + "end_line": 30, + "column": 4, + "end_column": 30 + }, + "frozen": false, + "desc": null + }, + "values": { + "0": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 30, + "end_line": 30, + "column": 19, + "end_column": 23 + }, + "wtype": { + "_type": "ARC4DynamicArray", + "name": "arc4.dynamic_array", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "string", + "element_type": { + "_type": "ARC4UIntN", + "name": "arc4.byte", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "byte", + "n": "8" + }, + "source_location": null + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 30, + "end_line": 30, + "column": 19, + "end_column": 23 + }, + "wtype": { + "_type": "WType", + "name": "string", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "name": "arg0" + } + }, + "1": { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 30, + "end_line": 30, + "column": 25, + "end_column": 29 + }, + "wtype": { + "_type": "ARC4Type", + "name": "arc4.bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "bool" + }, + "value": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 30, + "end_line": 30, + "column": 25, + "end_column": 29 + }, + "wtype": { + "_type": "WType", + "name": "bool", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "name": "arg1" + } + } + } + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc28-events.algo.ts::EventEmitter", + "member_name": "emitCustom", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 29, + "end_line": 29, + "column": 2, + "end_column": 41 + }, + "name": "emitCustom", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 12, + "end_line": 12, + "column": 0, + "end_column": 37 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 12, + "end_line": 12, + "column": 0, + "end_column": 37 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 12, + "end_line": 12, + "column": 0, + "end_column": 37 + }, + "expr": { + "_type": "VoidConstant", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 12, + "end_line": 12, + "column": 0, + "end_column": 37 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc28-events.algo.ts::EventEmitter", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", + "member_name": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 12, + "end_line": 12, + "column": 0, + "end_column": 37 + }, + "args": [], + "return_type": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 12, + "end_line": 12, + "column": 0, + "end_column": 37 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "Implicitly generated create method", + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc28-events.algo.ts::EventEmitter", + "member_name": "__algots__.defaultCreate", + "arc4_method_config": { + "_type": "ARC4BareMethodConfig", + "source_location": { + "file": "tests/approvals/arc28-events.algo.ts", + "line": 12, + "end_line": 12, + "column": 0, + "end_column": 37 + }, + "allowed_completion_types": [ + 0 + ], + "create": 2, + "is_bare": true + } + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null + }, + "reserved_scratch_space": [], + "avm_version": null + } +] \ No newline at end of file diff --git a/tests/expected-output/abi-decorators.algo.ts b/tests/expected-output/abi-decorators.algo.ts index 8c7bbc79..6491d38a 100644 --- a/tests/expected-output/abi-decorators.algo.ts +++ b/tests/expected-output/abi-decorators.algo.ts @@ -2,7 +2,7 @@ import type { bytes } from '@algorandfoundation/algorand-typescript' import { abimethod, Contract, GlobalState, Uint64 } from '@algorandfoundation/algorand-typescript' export default class AbiDecorators extends Contract { - // @expect-warn Duplicate on completion actions + // @expect-warning Duplicate on completion actions @abimethod({ allowActions: ['NoOp', 'NoOp'] }) public justNoop(): void {} // @expect-error Private or protected methods cannot be exposed as an abi method diff --git a/tests/expected-output/arc28-events.algo.ts b/tests/expected-output/arc28-events.algo.ts new file mode 100644 index 00000000..dd5f7c2c --- /dev/null +++ b/tests/expected-output/arc28-events.algo.ts @@ -0,0 +1,19 @@ +import type { uint64 } from '@algorandfoundation/algorand-typescript' +import { Asset, Contract, emit } from '@algorandfoundation/algorand-typescript' + +type Named = { a: uint64; b: Asset } + +class EventEmitter extends Contract { + emitSwapped(a: uint64, b: uint64) { + // @expect-error Event cannot be an anonymous type... + emit({ a: b, b: a }) + + // @expect-error Asset cannot be encoded to an ARC4 type + emit({ a: b, b: Asset(a) }) + } + + emitCustom(arg0: string, arg1: boolean) { + // @expect-error Expression of type `number` must be explicitly converted to an algo-ts type... + emit('Custom2', 1) + } +} diff --git a/tests/onchain/accounts.spec.ts b/tests/onchain/accounts.spec.ts index 1abfb68f..acff41dd 100644 --- a/tests/onchain/accounts.spec.ts +++ b/tests/onchain/accounts.spec.ts @@ -8,7 +8,11 @@ describe('accounts', () => { test('returns account data', async ({ appClientAccountsContract: appClient, expect, assetFactory, testAccount }) => { const asset = await assetFactory({ assetName: 'Asset 1', sender: testAccount.addr, total: 1n }) - const result = await appClient.send.call({ method: 'getAccountInfo', args: [testAccount.addr, asset], extraFee: microAlgo(2000) }) + const result = await appClient.send.call({ + method: 'getAccountInfo', + args: [testAccount.addr.publicKey, asset], + extraFee: microAlgo(2000), + }) const returnValue = result.return as { bytes: number[] From 677255ef83832d34109c17cfc52b6d758a7c81a1 Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Wed, 4 Dec 2024 17:48:28 -0800 Subject: [PATCH 29/30] chore: Use tsconfig paths for local package + regenerate approvals --- .../out/abi-decorators/abi-decorators.awst | 4 +- .../abi-decorators/abi-decorators.awst.json | 76 +-- tests/approvals/out/accounts/accounts.awst | 4 +- .../approvals/out/accounts/accounts.awst.json | 76 +-- .../arc28-events/EventEmitter.approval.teal | 38 +- .../out/arc28-events/EventEmitter.arc32.json | 2 +- .../out/arc28-events/EventEmitter.arc56.json | 28 +- .../out/arc28-events/EventEmitter.ssa.ir | 38 +- .../out/arc28-events/arc28-events.awst | 1 - .../out/arc28-events/arc28-events.awst.json | 405 +++++----------- .../arc4-encode-decode.awst | 6 +- .../arc4-encode-decode.awst.json | 84 ++-- .../out/arc4-struct/arc4-struct.awst | 4 +- .../out/arc4-struct/arc4-struct.awst.json | 154 +++--- .../approvals/out/arc4-types/arc4-types.awst | 3 +- .../out/arc4-types/arc4-types.awst.json | 39 +- .../out/assert-match/assert-match.awst | 3 +- .../out/assert-match/assert-match.awst.json | 39 +- .../biguint-expressions.awst | 3 +- .../biguint-expressions.awst.json | 39 +- .../byte-expressions/byte-expressions.awst | 3 +- .../byte-expressions.awst.json | 39 +- .../call-expressions/call-expressions.awst | 3 +- .../call-expressions.awst.json | 39 +- .../out/ensure-budget/ensure-budget.awst | 3 +- .../out/ensure-budget/ensure-budget.awst.json | 39 +- .../out/global-state/global-state.awst | 3 +- .../out/global-state/global-state.awst.json | 39 +- .../out/implicit-create/implicit-create.awst | 24 +- .../implicit-create/implicit-create.awst.json | 456 +++++++++--------- .../out/inheritance-b/inheritance-b.awst | 7 +- .../out/inheritance-b/inheritance-b.awst.json | 115 ++--- tests/approvals/out/itxn/itxn.awst | 3 +- tests/approvals/out/itxn/itxn.awst.json | 39 +- tests/approvals/out/jsdoc/jsdoc.awst | 4 +- tests/approvals/out/jsdoc/jsdoc.awst.json | 80 +-- .../out/local-state/local-state.awst | 4 +- .../out/local-state/local-state.awst.json | 76 +-- .../out/named-types/named-types.awst | 4 +- .../out/named-types/named-types.awst.json | 76 +-- tests/approvals/out/non-arc4/non-arc4.awst | 3 +- .../approvals/out/non-arc4/non-arc4.awst.json | 39 +- .../precompiled-apps/precompiled-apps.awst | 16 +- .../precompiled-apps.awst.json | 304 ++++++------ .../precompiled-factory.awst | 4 +- .../precompiled-factory.awst.json | 76 +-- .../property-ordering/property-ordering.awst | 3 +- .../property-ordering.awst.json | 39 +- .../shadowed-variables.awst | 3 +- .../shadowed-variables.awst.json | 39 +- tests/approvals/out/strings/strings.awst | 4 +- tests/approvals/out/strings/strings.awst.json | 76 +-- .../uint64-expressions.awst | 3 +- .../uint64-expressions.awst.json | 39 +- tsconfig.json | 9 +- 55 files changed, 1043 insertions(+), 1716 deletions(-) diff --git a/tests/approvals/out/abi-decorators/abi-decorators.awst b/tests/approvals/out/abi-decorators/abi-decorators.awst index e42f0290..79c33284 100644 --- a/tests/approvals/out/abi-decorators/abi-decorators.awst +++ b/tests/approvals/out/abi-decorators/abi-decorators.awst @@ -46,11 +46,11 @@ contract AbiDecorators Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/abi-decorators/abi-decorators.awst.json b/tests/approvals/out/abi-decorators/abi-decorators.awst.json index 6a049fed..216895b3 100644 --- a/tests/approvals/out/abi-decorators/abi-decorators.awst.json +++ b/tests/approvals/out/abi-decorators/abi-decorators.awst.json @@ -941,7 +941,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -983,42 +1018,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1028,7 +1028,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } diff --git a/tests/approvals/out/accounts/accounts.awst b/tests/approvals/out/accounts/accounts.awst index db633ac2..d3510519 100644 --- a/tests/approvals/out/accounts/accounts.awst +++ b/tests/approvals/out/accounts/accounts.awst @@ -26,11 +26,11 @@ contract AccountsContract Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void diff --git a/tests/approvals/out/accounts/accounts.awst.json b/tests/approvals/out/accounts/accounts.awst.json index 01704d7e..ffd9d5f2 100644 --- a/tests/approvals/out/accounts/accounts.awst.json +++ b/tests/approvals/out/accounts/accounts.awst.json @@ -22042,7 +22042,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -22084,42 +22119,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -22129,7 +22129,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, diff --git a/tests/approvals/out/arc28-events/EventEmitter.approval.teal b/tests/approvals/out/arc28-events/EventEmitter.approval.teal index 6523f956..c35a01a1 100644 --- a/tests/approvals/out/arc28-events/EventEmitter.approval.teal +++ b/tests/approvals/out/arc28-events/EventEmitter.approval.teal @@ -60,7 +60,7 @@ __puya_arc4_router___emitSwapped_route@2: retsub __puya_arc4_router___emitCustom_route@3: - // tests/approvals/arc28-events.algo.ts:29 + // tests/approvals/arc28-events.algo.ts:28 // emitCustom(arg0: string, arg1: boolean) { txn OnCompletion intc_0 // NoOp @@ -77,7 +77,7 @@ __puya_arc4_router___emitCustom_route@3: txna ApplicationArgs 2 intc_0 // 0 getbit - // tests/approvals/arc28-events.algo.ts:29 + // tests/approvals/arc28-events.algo.ts:28 // emitCustom(arg0: string, arg1: boolean) { callsub emitCustom intc_1 // 1 @@ -136,23 +136,7 @@ emitSwapped: swap concat log - // tests/approvals/arc28-events.algo.ts:15 - // emit({ a: b, b: a }) - frame_dig -1 - itob - frame_dig -2 - itob - swap - bytec_0 // 0x - swap - concat - swap - concat - pushbytes 0x1a0cbd2a // method "(uint64,uint64)" - swap - concat - log - // tests/approvals/arc28-events.algo.ts:17 + // tests/approvals/arc28-events.algo.ts:16 // const x: Swapped = { a: b, b: a } frame_dig -1 frame_dig -2 @@ -161,7 +145,7 @@ emitSwapped: swap itob swap - // tests/approvals/arc28-events.algo.ts:18 + // tests/approvals/arc28-events.algo.ts:17 // emit(x) bytec_0 // 0x swap @@ -172,16 +156,16 @@ emitSwapped: swap concat log - // tests/approvals/arc28-events.algo.ts:21 + // tests/approvals/arc28-events.algo.ts:20 // a: new UintN64(b), frame_dig -1 itob - // tests/approvals/arc28-events.algo.ts:22 + // tests/approvals/arc28-events.algo.ts:21 // b: new UintN64(a), frame_dig -2 itob swap - // tests/approvals/arc28-events.algo.ts:20-23 + // tests/approvals/arc28-events.algo.ts:19-22 // const y = new SwappedArc4({ // a: new UintN64(b), // b: new UintN64(a), @@ -191,13 +175,13 @@ emitSwapped: concat swap concat - // tests/approvals/arc28-events.algo.ts:24 + // tests/approvals/arc28-events.algo.ts:23 // emit(y) pushbytes 0xbbab7378 // method "SwappedArc4(uint64,uint64)" swap concat log - // tests/approvals/arc28-events.algo.ts:26 + // tests/approvals/arc28-events.algo.ts:25 // emit('Swapped', b, a) frame_dig -1 itob @@ -218,10 +202,10 @@ emitSwapped: // tests/approvals/arc28-events.algo.ts::EventEmitter.emitCustom(arg0: bytes, arg1: uint64) -> void: emitCustom: - // tests/approvals/arc28-events.algo.ts:29 + // tests/approvals/arc28-events.algo.ts:28 // emitCustom(arg0: string, arg1: boolean) { proto 2 0 - // tests/approvals/arc28-events.algo.ts:30 + // tests/approvals/arc28-events.algo.ts:29 // emit('Custom', arg0, arg1) frame_dig -2 len diff --git a/tests/approvals/out/arc28-events/EventEmitter.arc32.json b/tests/approvals/out/arc28-events/EventEmitter.arc32.json index 76252628..15a8a438 100644 --- a/tests/approvals/out/arc28-events/EventEmitter.arc32.json +++ b/tests/approvals/out/arc28-events/EventEmitter.arc32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AgIHB1c2hieXRlcyAweDAwCiAgICBpbnRjXzAgLy8gMAogICAgZnJhbWVfZGlnIC0xCiAgICBzZXRiaXQKICAgIHB1c2hpbnQgMyAvLyAzCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgYnl0ZWNfMCAvLyAweAogICAgc3dhcAogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIHN3YXAKICAgIGNvbmNhdAogICAgcHVzaGJ5dGVzIDB4YTMxM2MwNjYgLy8gbWV0aG9kICJDdXN0b20oc3RyaW5nLGJvb2wpIgogICAgc3dhcAogICAgY29uY2F0CiAgICBsb2cKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9hcmMyOC1ldmVudHMuYWxnby50czo6RXZlbnRFbWl0dGVyLl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZSgpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hcmMyOC1ldmVudHMuYWxnby50czoxMgogICAgLy8gY2xhc3MgRXZlbnRFbWl0dGVyIGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIK", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjMjgtZXZlbnRzLmFsZ28udHM6OkV2ZW50RW1pdHRlci5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "state": { diff --git a/tests/approvals/out/arc28-events/EventEmitter.arc56.json b/tests/approvals/out/arc28-events/EventEmitter.arc56.json index a2666a00..2a92d0a7 100644 --- a/tests/approvals/out/arc28-events/EventEmitter.arc56.json +++ b/tests/approvals/out/arc28-events/EventEmitter.arc56.json @@ -38,19 +38,6 @@ } ] }, - { - "name": "", - "args": [ - { - "type": "uint64", - "name": "a" - }, - { - "type": "uint64", - "name": "b" - } - ]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IC0yCiAgICBjb25jYXQKICAgIHB1c2hieXRlcyAweDAwCiAgICBpbnRjXzAgLy8gMAogICAgZnJhbWVfZGlnIC0xCiAgICBzZXRiaXQKICAgIHB1c2hpbnQgMyAvLyAzCiAgICBpdG9iCiAgICBleHRyYWN0IDYgMgogICAgYnl0ZWNfMCAvLyAweAogICAgc3dhcAogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIHN3YXAKICAgIGNvbmNhdAogICAgcHVzaGJ5dGVzIDB4YTMxM2MwNjYgLy8gbWV0aG9kICJDdXN0b20oc3RyaW5nLGJvb2wpIgogICAgc3dhcAogICAgY29uY2F0CiAgICBsb2cKICAgIHJldHN1YgoKCi8vIHRlc3RzL2FwcHJvdmFscy9hcmMyOC1ldmVudHMuYWxnby50czo6RXZlbnRFbWl0dGVyLl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZSgpIC0+IHZvaWQ6Cl9fYWxnb3RzX18uZGVmYXVsdENyZWF0ZToKICAgIC8vIHRlc3RzL2FwcHJvdmFscy9hcmMyOC1ldmVudHMuYWxnby50czoxMgogICAgLy8gY2xhc3MgRXZlbnRFbWl0dGVyIGV4dGVuZHMgQ29udHJhY3QgewogICAgcHJvdG8gMCAwCiAgICByZXRzdWIK", "clear": "I3ByYWdtYSB2ZXJzaW9uIDEwCgp0ZXN0cy9hcHByb3ZhbHMvYXJjMjgtZXZlbnRzLmFsZ28udHM6OkV2ZW50RW1pdHRlci5jbGVhclN0YXRlUHJvZ3JhbToKICAgIHB1c2hpbnQgMSAvLyAxCiAgICByZXR1cm4K" }, "events": [ @@ -202,19 +189,6 @@ } ] }, - { - "name": "", - "args": [ - { - "type": "uint64", - "name": "a" - }, - { - "type": "uint64", - "name": "b" - } - ] - }, { "name": "SwappedArc4", "args": [ diff --git a/tests/approvals/out/arc28-events/EventEmitter.ssa.ir b/tests/approvals/out/arc28-events/EventEmitter.ssa.ir index 43dd9e71..04fe20a8 100644 --- a/tests/approvals/out/arc28-events/EventEmitter.ssa.ir +++ b/tests/approvals/out/arc28-events/EventEmitter.ssa.ir @@ -36,7 +36,7 @@ contract tests/approvals/arc28-events.algo.ts::EventEmitter: let tmp%10#0: uint64 = (btoi tmp%9#0) tests/approvals/arc28-events.algo.ts::EventEmitter.emitSwapped(tmp%8#0, tmp%10#0) return 1u - block@3: // emitCustom_route_L29 + block@3: // emitCustom_route_L28 let tmp%11#0: uint64 = (txn OnCompletion) let tmp%12#0: bool = (== tmp%11#0 NoOp) (assert tmp%12#0) // OnCompletion is not NoOp @@ -79,46 +79,38 @@ contract tests/approvals/arc28-events.algo.ts::EventEmitter: let encoded_tuple_buffer%2#0: bytes = (concat encoded_tuple_buffer%1#0 val_as_bytes%1#0) let event%0#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%2#0) (log event%0#0) - let val_as_bytes%2#0: bytes = (itob b#0) - let val_as_bytes%3#0: bytes = (itob a#0) + let (x.a#0: uint64, x.b#0: uint64) = (b#0, a#0) + let val_as_bytes%2#0: bytes = (itob x.a#0) + let val_as_bytes%3#0: bytes = (itob x.b#0) let current_tail_offset%1#0: uint64 = 16u let encoded_tuple_buffer%3#0: bytes = 0x let encoded_tuple_buffer%4#0: bytes = (concat encoded_tuple_buffer%3#0 val_as_bytes%2#0) let encoded_tuple_buffer%5#0: bytes = (concat encoded_tuple_buffer%4#0 val_as_bytes%3#0) - let event%1#0: bytes = (concat method "(uint64,uint64)" encoded_tuple_buffer%5#0) + let event%1#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%5#0) (log event%1#0) - let (x.a#0: uint64, x.b#0: uint64) = (b#0, a#0) - let val_as_bytes%4#0: bytes = (itob x.a#0) - let val_as_bytes%5#0: bytes = (itob x.b#0) + let val_as_bytes%4#0: bytes = (itob b#0) + let val_as_bytes%5#0: bytes = (itob a#0) + let val_as_bytes%6#0: bytes = (itob b#0) + let val_as_bytes%7#0: bytes = (itob a#0) let current_tail_offset%2#0: uint64 = 16u let encoded_tuple_buffer%6#0: bytes = 0x let encoded_tuple_buffer%7#0: bytes = (concat encoded_tuple_buffer%6#0 val_as_bytes%4#0) - let encoded_tuple_buffer%8#0: bytes = (concat encoded_tuple_buffer%7#0 val_as_bytes%5#0) - let event%2#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%8#0) + let encoded_tuple_buffer%8#0: bytes = (concat encoded_tuple_buffer%7#0 val_as_bytes%7#0) + let y#0: bytes = encoded_tuple_buffer%8#0 + let event%2#0: bytes = (concat method "SwappedArc4(uint64,uint64)" y#0) (log event%2#0) - let val_as_bytes%6#0: bytes = (itob b#0) - let val_as_bytes%7#0: bytes = (itob a#0) let val_as_bytes%8#0: bytes = (itob b#0) let val_as_bytes%9#0: bytes = (itob a#0) let current_tail_offset%3#0: uint64 = 16u let encoded_tuple_buffer%9#0: bytes = 0x - let encoded_tuple_buffer%10#0: bytes = (concat encoded_tuple_buffer%9#0 val_as_bytes%6#0) + let encoded_tuple_buffer%10#0: bytes = (concat encoded_tuple_buffer%9#0 val_as_bytes%8#0) let encoded_tuple_buffer%11#0: bytes = (concat encoded_tuple_buffer%10#0 val_as_bytes%9#0) - let y#0: bytes = encoded_tuple_buffer%11#0 - let event%3#0: bytes = (concat method "SwappedArc4(uint64,uint64)" y#0) + let event%3#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%11#0) (log event%3#0) - let val_as_bytes%10#0: bytes = (itob b#0) - let val_as_bytes%11#0: bytes = (itob a#0) - let current_tail_offset%4#0: uint64 = 16u - let encoded_tuple_buffer%12#0: bytes = 0x - let encoded_tuple_buffer%13#0: bytes = (concat encoded_tuple_buffer%12#0 val_as_bytes%10#0) - let encoded_tuple_buffer%14#0: bytes = (concat encoded_tuple_buffer%13#0 val_as_bytes%11#0) - let event%4#0: bytes = (concat method "Swapped(uint64,uint64)" encoded_tuple_buffer%14#0) - (log event%4#0) return subroutine tests/approvals/arc28-events.algo.ts::EventEmitter.emitCustom(arg0: bytes, arg1: bool) -> void: - block@0: // L29 + block@0: // L28 let length%0#0: uint64 = (len arg0#0) let as_bytes%0#0: bytes = (itob length%0#0) let length_uint16%0#0: bytes = ((extract 6 2) as_bytes%0#0) diff --git a/tests/approvals/out/arc28-events/arc28-events.awst b/tests/approvals/out/arc28-events/arc28-events.awst index 187c3d4c..bd22607e 100644 --- a/tests/approvals/out/arc28-events/arc28-events.awst +++ b/tests/approvals/out/arc28-events/arc28-events.awst @@ -16,7 +16,6 @@ contract EventEmitter emitSwapped(): void { emit("Swapped(uint64,uint64)", ARC4_ENCODE({ a: b, b: a }, wtype=Swapped)) - emit("(uint64,uint64)", ARC4_ENCODE({ a: b, b: a }, wtype=(uint64,uint64))) x: Swapped{ a: uint64, b: uint64 } = { a: (#0 = { a: b, b: a }).a, b: #0.b } emit("Swapped(uint64,uint64)", ARC4_ENCODE(x, wtype=Swapped)) y: SwappedArc4 = new SwappedArc4(a=(#1 = { a: ARC4_ENCODE(b, wtype=arc4.uint64), b: ARC4_ENCODE(a, wtype=arc4.uint64) }).a, b=#1.b) diff --git a/tests/approvals/out/arc28-events/arc28-events.awst.json b/tests/approvals/out/arc28-events/arc28-events.awst.json index 2de0b340..1b6e3ca3 100644 --- a/tests/approvals/out/arc28-events/arc28-events.awst.json +++ b/tests/approvals/out/arc28-events/arc28-events.awst.json @@ -355,7 +355,7 @@ "source_location": { "file": "tests/approvals/arc28-events.algo.ts", "line": 13, - "end_line": 27, + "end_line": 26, "column": 36, "end_column": 3 }, @@ -519,171 +519,12 @@ } } }, - { - "_type": "ExpressionStatement", - "source_location": { - "file": "tests/approvals/arc28-events.algo.ts", - "line": 15, - "end_line": 15, - "column": 4, - "end_column": 24 - }, - "expr": { - "_type": "Emit", - "source_location": { - "file": "tests/approvals/arc28-events.algo.ts", - "line": 15, - "end_line": 15, - "column": 4, - "end_column": 24 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "signature": "(uint64,uint64)", - "value": { - "_type": "ARC4Encode", - "source_location": { - "file": "tests/approvals/arc28-events.algo.ts", - "line": 15, - "end_line": 15, - "column": 9, - "end_column": 23 - }, - "wtype": { - "_type": "ARC4Struct", - "name": "", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": null, - "arc4_name": "(uint64,uint64)", - "fields": { - "a": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - }, - "b": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - } - }, - "source_location": null, - "frozen": false, - "desc": null - }, - "value": { - "_type": "TupleExpression", - "source_location": { - "file": "tests/approvals/arc28-events.algo.ts", - "line": 15, - "end_line": 15, - "column": 9, - "end_column": 23 - }, - "wtype": { - "_type": "WTuple", - "name": "::", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - } - ], - "names": [ - "a", - "b" - ] - }, - "items": [ - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc28-events.algo.ts", - "line": 15, - "end_line": 15, - "column": 14, - "end_column": 15 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "b" - }, - { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc28-events.algo.ts", - "line": 15, - "end_line": 15, - "column": 20, - "end_column": 21 - }, - "wtype": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "name": "a" - } - ] - } - } - } - }, { "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 17, - "end_line": 17, + "line": 16, + "end_line": 16, "column": 10, "end_column": 37 }, @@ -691,8 +532,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 17, - "end_line": 17, + "line": 16, + "end_line": 16, "column": 10, "end_column": 11 }, @@ -729,8 +570,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 17, - "end_line": 17, + "line": 16, + "end_line": 16, "column": 23, "end_column": 37 }, @@ -766,8 +607,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 17, - "end_line": 17, + "line": 16, + "end_line": 16, "column": 23, "end_column": 37 }, @@ -782,8 +623,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 17, - "end_line": 17, + "line": 16, + "end_line": 16, "column": 23, "end_column": 37 }, @@ -818,8 +659,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 17, - "end_line": 17, + "line": 16, + "end_line": 16, "column": 23, "end_column": 37 }, @@ -855,8 +696,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 17, - "end_line": 17, + "line": 16, + "end_line": 16, "column": 28, "end_column": 29 }, @@ -873,8 +714,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 17, - "end_line": 17, + "line": 16, + "end_line": 16, "column": 34, "end_column": 35 }, @@ -897,8 +738,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 17, - "end_line": 17, + "line": 16, + "end_line": 16, "column": 23, "end_column": 37 }, @@ -913,8 +754,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 17, - "end_line": 17, + "line": 16, + "end_line": 16, "column": 23, "end_column": 37 }, @@ -949,8 +790,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 17, - "end_line": 17, + "line": 16, + "end_line": 16, "column": 23, "end_column": 37 }, @@ -986,8 +827,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 17, - "end_line": 17, + "line": 16, + "end_line": 16, "column": 28, "end_column": 29 }, @@ -1004,8 +845,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 17, - "end_line": 17, + "line": 16, + "end_line": 16, "column": 34, "end_column": 35 }, @@ -1031,8 +872,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 18, - "end_line": 18, + "line": 17, + "end_line": 17, "column": 4, "end_column": 11 }, @@ -1040,8 +881,8 @@ "_type": "Emit", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 18, - "end_line": 18, + "line": 17, + "end_line": 17, "column": 4, "end_column": 11 }, @@ -1057,8 +898,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 18, - "end_line": 18, + "line": 17, + "end_line": 17, "column": 9, "end_column": 10 }, @@ -1112,8 +953,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 18, - "end_line": 18, + "line": 17, + "end_line": 17, "column": 9, "end_column": 10 }, @@ -1153,8 +994,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 20, - "end_line": 23, + "line": 19, + "end_line": 22, "column": 10, "end_column": 6 }, @@ -1162,8 +1003,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 20, - "end_line": 20, + "line": 19, + "end_line": 19, "column": 10, "end_column": 11 }, @@ -1211,8 +1052,8 @@ }, "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 20, - "end_line": 20, + "line": 19, + "end_line": 19, "column": 10, "end_column": 11 }, @@ -1225,8 +1066,8 @@ "_type": "NewStruct", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 20, - "end_line": 23, + "line": 19, + "end_line": 22, "column": 14, "end_column": 6 }, @@ -1274,8 +1115,8 @@ }, "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 20, - "end_line": 20, + "line": 19, + "end_line": 19, "column": 18, "end_column": 29 }, @@ -1287,8 +1128,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 20, - "end_line": 23, + "line": 19, + "end_line": 22, "column": 14, "end_column": 6 }, @@ -1312,8 +1153,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 20, - "end_line": 23, + "line": 19, + "end_line": 22, "column": 30, "end_column": 5 }, @@ -1366,8 +1207,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 20, - "end_line": 23, + "line": 19, + "end_line": 22, "column": 30, "end_column": 5 }, @@ -1421,8 +1262,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 21, - "end_line": 21, + "line": 20, + "end_line": 20, "column": 9, "end_column": 23 }, @@ -1446,8 +1287,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 21, - "end_line": 21, + "line": 20, + "end_line": 20, "column": 21, "end_column": 22 }, @@ -1465,8 +1306,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 22, - "end_line": 22, + "line": 21, + "end_line": 21, "column": 9, "end_column": 23 }, @@ -1490,8 +1331,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 22, - "end_line": 22, + "line": 21, + "end_line": 21, "column": 21, "end_column": 22 }, @@ -1515,8 +1356,8 @@ "_type": "FieldExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 20, - "end_line": 23, + "line": 19, + "end_line": 22, "column": 14, "end_column": 6 }, @@ -1540,8 +1381,8 @@ "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 20, - "end_line": 23, + "line": 19, + "end_line": 22, "column": 30, "end_column": 5 }, @@ -1594,8 +1435,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 20, - "end_line": 23, + "line": 19, + "end_line": 22, "column": 30, "end_column": 5 }, @@ -1649,8 +1490,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 21, - "end_line": 21, + "line": 20, + "end_line": 20, "column": 9, "end_column": 23 }, @@ -1674,8 +1515,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 21, - "end_line": 21, + "line": 20, + "end_line": 20, "column": 21, "end_column": 22 }, @@ -1693,8 +1534,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 22, - "end_line": 22, + "line": 21, + "end_line": 21, "column": 9, "end_column": 23 }, @@ -1718,8 +1559,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 22, - "end_line": 22, + "line": 21, + "end_line": 21, "column": 21, "end_column": 22 }, @@ -1746,8 +1587,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 24, - "end_line": 24, + "line": 23, + "end_line": 23, "column": 4, "end_column": 11 }, @@ -1755,8 +1596,8 @@ "_type": "Emit", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 24, - "end_line": 24, + "line": 23, + "end_line": 23, "column": 4, "end_column": 11 }, @@ -1772,8 +1613,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 24, - "end_line": 24, + "line": 23, + "end_line": 23, "column": 9, "end_column": 10 }, @@ -1821,8 +1662,8 @@ }, "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 24, - "end_line": 24, + "line": 23, + "end_line": 23, "column": 9, "end_column": 10 }, @@ -1837,8 +1678,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 26, - "end_line": 26, + "line": 25, + "end_line": 25, "column": 4, "end_column": 25 }, @@ -1846,8 +1687,8 @@ "_type": "Emit", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 26, - "end_line": 26, + "line": 25, + "end_line": 25, "column": 4, "end_column": 25 }, @@ -1863,8 +1704,8 @@ "_type": "NewStruct", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 26, - "end_line": 26, + "line": 25, + "end_line": 25, "column": 4, "end_column": 25 }, @@ -1912,8 +1753,8 @@ }, "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 26, - "end_line": 26, + "line": 25, + "end_line": 25, "column": 4, "end_column": 25 }, @@ -1925,8 +1766,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 26, - "end_line": 26, + "line": 25, + "end_line": 25, "column": 20, "end_column": 21 }, @@ -1950,8 +1791,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 26, - "end_line": 26, + "line": 25, + "end_line": 25, "column": 20, "end_column": 21 }, @@ -1969,8 +1810,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 26, - "end_line": 26, + "line": 25, + "end_line": 25, "column": 23, "end_column": 24 }, @@ -1994,8 +1835,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 26, - "end_line": 26, + "line": 25, + "end_line": 25, "column": 23, "end_column": 24 }, @@ -2049,8 +1890,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 29, - "end_line": 29, + "line": 28, + "end_line": 28, "column": 2, "end_column": 41 }, @@ -2067,8 +1908,8 @@ }, "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 29, - "end_line": 29, + "line": 28, + "end_line": 28, "column": 13, "end_column": 25 } @@ -2085,8 +1926,8 @@ }, "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 29, - "end_line": 29, + "line": 28, + "end_line": 28, "column": 27, "end_column": 40 } @@ -2103,8 +1944,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 29, - "end_line": 31, + "line": 28, + "end_line": 30, "column": 42, "end_column": 3 }, @@ -2113,8 +1954,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 30, - "end_line": 30, + "line": 29, + "end_line": 29, "column": 4, "end_column": 30 }, @@ -2122,8 +1963,8 @@ "_type": "Emit", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 30, - "end_line": 30, + "line": 29, + "end_line": 29, "column": 4, "end_column": 30 }, @@ -2139,8 +1980,8 @@ "_type": "NewStruct", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 30, - "end_line": 30, + "line": 29, + "end_line": 29, "column": 4, "end_column": 30 }, @@ -2203,8 +2044,8 @@ }, "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 30, - "end_line": 30, + "line": 29, + "end_line": 29, "column": 4, "end_column": 30 }, @@ -2216,8 +2057,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 30, - "end_line": 30, + "line": 29, + "end_line": 29, "column": 19, "end_column": 23 }, @@ -2257,8 +2098,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 30, - "end_line": 30, + "line": 29, + "end_line": 29, "column": 19, "end_column": 23 }, @@ -2276,8 +2117,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 30, - "end_line": 30, + "line": 29, + "end_line": 29, "column": 25, "end_column": 29 }, @@ -2300,8 +2141,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 30, - "end_line": 30, + "line": 29, + "end_line": 29, "column": 25, "end_column": 29 }, @@ -2335,8 +2176,8 @@ "_type": "ARC4ABIMethodConfig", "source_location": { "file": "tests/approvals/arc28-events.algo.ts", - "line": 29, - "end_line": 29, + "line": 28, + "end_line": 28, "column": 2, "end_column": 41 }, diff --git a/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst b/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst index d067ed0a..e763ca6c 100644 --- a/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst +++ b/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst @@ -20,7 +20,7 @@ contract Arc4EncodeDecode assert(reinterpret_cast(ARC4_ENCODE(c, wtype=arc4.uint512)) == reinterpret_cast(ARC4_ENCODE(c, wtype=arc4.uint512))) assert(reinterpret_cast(ARC4_ENCODE(d, wtype=arc4.dynamic_array)) == reinterpret_cast(ARC4_ENCODE(d, wtype=arc4.dynamic_array))) assert(reinterpret_cast(ARC4_ENCODE(e, wtype=arc4.dynamic_array)) == reinterpret_cast(ARC4_ENCODE(e, wtype=arc4.dynamic_array))) - assert(reinterpret_cast(ARC4_ENCODE({ a: a, b: d }, wtype=)) == reinterpret_cast(new TestStruct(a=(#0 = { a: ARC4_ENCODE(a, wtype=arc4.uint64), b: ARC4_ENCODE(d, wtype=arc4.dynamic_array) }).a, b=#0.b))) + assert(reinterpret_cast(ARC4_ENCODE({ a: a, b: d }, wtype=(uint64,byte[]))) == reinterpret_cast(new TestStruct(a=(#0 = { a: ARC4_ENCODE(a, wtype=arc4.uint64), b: ARC4_ENCODE(d, wtype=arc4.dynamic_array) }).a, b=#0.b))) } testDecoding(): void @@ -39,11 +39,11 @@ contract Arc4EncodeDecode Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void diff --git a/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst.json b/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst.json index 45e51cbc..6f5b98e2 100644 --- a/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst.json +++ b/tests/approvals/out/arc4-encode-decode/arc4-encode-decode.awst.json @@ -1389,7 +1389,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,byte[]", + "arc4_name": "(uint64,byte[])", "fields": { "a": { "_type": "ARC4UIntN", @@ -1554,7 +1554,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,byte[]", + "arc4_name": "(uint64,byte[])", "fields": { "a": { "_type": "ARC4UIntN", @@ -3184,7 +3184,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,byte[]", + "arc4_name": "(uint64,byte[])", "fields": { "a": { "_type": "ARC4UIntN", @@ -3540,7 +3540,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,byte[]", + "arc4_name": "(uint64,byte[])", "fields": { "a": { "_type": "ARC4UIntN", @@ -3898,7 +3898,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -3940,42 +3975,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -3985,7 +3985,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst b/tests/approvals/out/arc4-struct/arc4-struct.awst index 43c89f9c..5f966ab1 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst @@ -48,11 +48,11 @@ contract StructDemo Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst.json b/tests/approvals/out/arc4-struct/arc4-struct.awst.json index c1610800..956b3458 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst.json +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst.json @@ -348,7 +348,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -411,7 +411,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -937,7 +937,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -1075,7 +1075,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -1153,7 +1153,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -1216,7 +1216,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -2402,7 +2402,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -2483,7 +2483,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -2587,7 +2587,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -2650,7 +2650,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -2711,7 +2711,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -2791,7 +2791,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -3069,7 +3069,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -3177,7 +3177,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -3327,7 +3327,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -3435,7 +3435,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -3725,7 +3725,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -3833,7 +3833,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -3983,7 +3983,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -4091,7 +4091,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -4244,7 +4244,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -4340,7 +4340,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -4403,7 +4403,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -4598,7 +4598,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -4799,7 +4799,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -4879,7 +4879,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -4942,7 +4942,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -5163,7 +5163,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -5253,7 +5253,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -5483,7 +5483,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -5573,7 +5573,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -5704,7 +5704,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -5785,7 +5785,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -5910,7 +5910,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -5991,7 +5991,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -6109,7 +6109,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -6170,7 +6170,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -6284,7 +6284,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -6358,7 +6358,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64,uint64", + "arc4_name": "(uint64,uint64)", "fields": { "x": { "_type": "ARC4UIntN", @@ -6578,7 +6578,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -6620,42 +6655,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -6665,7 +6665,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, diff --git a/tests/approvals/out/arc4-types/arc4-types.awst b/tests/approvals/out/arc4-types/arc4-types.awst index 195b0dbc..abc4da3b 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst +++ b/tests/approvals/out/arc4-types/arc4-types.awst @@ -125,9 +125,8 @@ contract Arc4TypesTestContract void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/arc4-types/arc4-types.awst.json b/tests/approvals/out/arc4-types/arc4-types.awst.json index 0a98c546..70901f4e 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst.json +++ b/tests/approvals/out/arc4-types/arc4-types.awst.json @@ -9062,42 +9062,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -9107,7 +9072,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } diff --git a/tests/approvals/out/assert-match/assert-match.awst b/tests/approvals/out/assert-match/assert-match.awst index 8e66f0f2..1587d9ed 100644 --- a/tests/approvals/out/assert-match/assert-match.awst +++ b/tests/approvals/out/assert-match/assert-match.awst @@ -28,9 +28,8 @@ contract AssertMatchContract void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/assert-match/assert-match.awst.json b/tests/approvals/out/assert-match/assert-match.awst.json index 5d8214eb..f8da9c6b 100644 --- a/tests/approvals/out/assert-match/assert-match.awst.json +++ b/tests/approvals/out/assert-match/assert-match.awst.json @@ -1398,42 +1398,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1443,7 +1408,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } diff --git a/tests/approvals/out/biguint-expressions/biguint-expressions.awst b/tests/approvals/out/biguint-expressions/biguint-expressions.awst index 203b0da4..cb78a98b 100644 --- a/tests/approvals/out/biguint-expressions/biguint-expressions.awst +++ b/tests/approvals/out/biguint-expressions/biguint-expressions.awst @@ -45,9 +45,8 @@ contract DemoContract void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json b/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json index 8056bac5..a5bdd2a6 100644 --- a/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json +++ b/tests/approvals/out/biguint-expressions/biguint-expressions.awst.json @@ -1962,42 +1962,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -2007,7 +1972,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } diff --git a/tests/approvals/out/byte-expressions/byte-expressions.awst b/tests/approvals/out/byte-expressions/byte-expressions.awst index 57411677..3613d791 100644 --- a/tests/approvals/out/byte-expressions/byte-expressions.awst +++ b/tests/approvals/out/byte-expressions/byte-expressions.awst @@ -30,9 +30,8 @@ contract DemoContract void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/byte-expressions/byte-expressions.awst.json b/tests/approvals/out/byte-expressions/byte-expressions.awst.json index 1877120d..e8c96646 100644 --- a/tests/approvals/out/byte-expressions/byte-expressions.awst.json +++ b/tests/approvals/out/byte-expressions/byte-expressions.awst.json @@ -1398,42 +1398,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1443,7 +1408,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } diff --git a/tests/approvals/out/call-expressions/call-expressions.awst b/tests/approvals/out/call-expressions/call-expressions.awst index 9548b1fc..1c693373 100644 --- a/tests/approvals/out/call-expressions/call-expressions.awst +++ b/tests/approvals/out/call-expressions/call-expressions.awst @@ -38,9 +38,8 @@ contract Example void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } diff --git a/tests/approvals/out/call-expressions/call-expressions.awst.json b/tests/approvals/out/call-expressions/call-expressions.awst.json index 204ef14b..afcb0e18 100644 --- a/tests/approvals/out/call-expressions/call-expressions.awst.json +++ b/tests/approvals/out/call-expressions/call-expressions.awst.json @@ -796,42 +796,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -841,7 +806,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } diff --git a/tests/approvals/out/ensure-budget/ensure-budget.awst b/tests/approvals/out/ensure-budget/ensure-budget.awst index b1282051..8cb7384f 100644 --- a/tests/approvals/out/ensure-budget/ensure-budget.awst +++ b/tests/approvals/out/ensure-budget/ensure-budget.awst @@ -22,9 +22,8 @@ contract EnsureBudgetContract void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/ensure-budget/ensure-budget.awst.json b/tests/approvals/out/ensure-budget/ensure-budget.awst.json index 9c33c6d8..7a3b7092 100644 --- a/tests/approvals/out/ensure-budget/ensure-budget.awst.json +++ b/tests/approvals/out/ensure-budget/ensure-budget.awst.json @@ -692,42 +692,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -737,7 +702,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } diff --git a/tests/approvals/out/global-state/global-state.awst b/tests/approvals/out/global-state/global-state.awst index 95b77a57..a98fae4d 100644 --- a/tests/approvals/out/global-state/global-state.awst +++ b/tests/approvals/out/global-state/global-state.awst @@ -39,9 +39,8 @@ contract TestContract GlobalState["baseTestState"]: string = "testing 123" } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/global-state/global-state.awst.json b/tests/approvals/out/global-state/global-state.awst.json index 16fa83c4..9c2a2e4d 100644 --- a/tests/approvals/out/global-state/global-state.awst.json +++ b/tests/approvals/out/global-state/global-state.awst.json @@ -1235,42 +1235,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1280,7 +1245,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } diff --git a/tests/approvals/out/implicit-create/implicit-create.awst b/tests/approvals/out/implicit-create/implicit-create.awst index 3df60dc5..a2d50400 100644 --- a/tests/approvals/out/implicit-create/implicit-create.awst +++ b/tests/approvals/out/implicit-create/implicit-create.awst @@ -24,11 +24,11 @@ contract NoBare Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void @@ -62,11 +62,11 @@ contract NoNoOp Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void @@ -100,11 +100,11 @@ contract BaseWithBareCreate Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } @@ -134,11 +134,11 @@ contract BaseWithAbiCreate Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } @@ -173,11 +173,11 @@ contract ExplicitBareCreateFromBase Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } @@ -212,11 +212,11 @@ contract ExplicitAbiCreateFromBase Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/implicit-create/implicit-create.awst.json b/tests/approvals/out/implicit-create/implicit-create.awst.json index 1c873d21..48586113 100644 --- a/tests/approvals/out/implicit-create/implicit-create.awst.json +++ b/tests/approvals/out/implicit-create/implicit-create.awst.json @@ -450,7 +450,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -492,42 +527,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -537,7 +537,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, @@ -1053,7 +1053,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -1095,42 +1130,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1140,7 +1140,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, @@ -1656,7 +1656,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -1698,42 +1733,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1743,7 +1743,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -2209,7 +2209,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -2251,42 +2286,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -2296,7 +2296,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -2832,7 +2832,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -2874,42 +2909,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -2919,7 +2919,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -3459,7 +3459,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -3501,42 +3536,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -3546,7 +3546,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } diff --git a/tests/approvals/out/inheritance-b/inheritance-b.awst b/tests/approvals/out/inheritance-b/inheritance-b.awst index c049896e..ccd033f3 100644 --- a/tests/approvals/out/inheritance-b/inheritance-b.awst +++ b/tests/approvals/out/inheritance-b/inheritance-b.awst @@ -34,9 +34,8 @@ contract ConcreteSimpleContract void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } @@ -85,11 +84,11 @@ contract ConcreteArc4Contract Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void diff --git a/tests/approvals/out/inheritance-b/inheritance-b.awst.json b/tests/approvals/out/inheritance-b/inheritance-b.awst.json index c0a7a591..5607391c 100644 --- a/tests/approvals/out/inheritance-b/inheritance-b.awst.json +++ b/tests/approvals/out/inheritance-b/inheritance-b.awst.json @@ -906,42 +906,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -951,7 +916,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -1863,7 +1828,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -1905,42 +1905,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1950,7 +1915,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, diff --git a/tests/approvals/out/itxn/itxn.awst b/tests/approvals/out/itxn/itxn.awst index 9254319d..9c7d307c 100644 --- a/tests/approvals/out/itxn/itxn.awst +++ b/tests/approvals/out/itxn/itxn.awst @@ -77,9 +77,8 @@ contract ItxnDemoContract GlobalState["name"]: bytes = 0x } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/itxn/itxn.awst.json b/tests/approvals/out/itxn/itxn.awst.json index 512b0e9a..8856e25b 100644 --- a/tests/approvals/out/itxn/itxn.awst.json +++ b/tests/approvals/out/itxn/itxn.awst.json @@ -4209,42 +4209,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -4254,7 +4219,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } diff --git a/tests/approvals/out/jsdoc/jsdoc.awst b/tests/approvals/out/jsdoc/jsdoc.awst index 130a1fb1..93bc1dc0 100644 --- a/tests/approvals/out/jsdoc/jsdoc.awst +++ b/tests/approvals/out/jsdoc/jsdoc.awst @@ -34,11 +34,11 @@ contract JSDocDemo Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void diff --git a/tests/approvals/out/jsdoc/jsdoc.awst.json b/tests/approvals/out/jsdoc/jsdoc.awst.json index 2e56509d..b21d3902 100644 --- a/tests/approvals/out/jsdoc/jsdoc.awst.json +++ b/tests/approvals/out/jsdoc/jsdoc.awst.json @@ -350,7 +350,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64", + "arc4_name": "(uint64)", "fields": { "a": { "_type": "ARC4UIntN", @@ -414,7 +414,7 @@ "ephemeral": false, "scalar_type": 1, "native_type": null, - "arc4_name": "uint64", + "arc4_name": "(uint64)", "fields": { "a": { "_type": "ARC4UIntN", @@ -978,7 +978,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -1020,42 +1055,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1065,7 +1065,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, diff --git a/tests/approvals/out/local-state/local-state.awst b/tests/approvals/out/local-state/local-state.awst index 972b5ffd..e9e7c4d1 100644 --- a/tests/approvals/out/local-state/local-state.awst +++ b/tests/approvals/out/local-state/local-state.awst @@ -51,11 +51,11 @@ contract LocalStateDemo Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void diff --git a/tests/approvals/out/local-state/local-state.awst.json b/tests/approvals/out/local-state/local-state.awst.json index 0109ab48..9aebb516 100644 --- a/tests/approvals/out/local-state/local-state.awst.json +++ b/tests/approvals/out/local-state/local-state.awst.json @@ -4651,7 +4651,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -4693,42 +4728,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -4738,7 +4738,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, diff --git a/tests/approvals/out/named-types/named-types.awst b/tests/approvals/out/named-types/named-types.awst index 9fb688a4..dcaf9256 100644 --- a/tests/approvals/out/named-types/named-types.awst +++ b/tests/approvals/out/named-types/named-types.awst @@ -48,11 +48,11 @@ contract MyContract Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void diff --git a/tests/approvals/out/named-types/named-types.awst.json b/tests/approvals/out/named-types/named-types.awst.json index d96d1552..604d3bb2 100644 --- a/tests/approvals/out/named-types/named-types.awst.json +++ b/tests/approvals/out/named-types/named-types.awst.json @@ -2916,7 +2916,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -2958,42 +2993,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -3003,7 +3003,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, diff --git a/tests/approvals/out/non-arc4/non-arc4.awst b/tests/approvals/out/non-arc4/non-arc4.awst index f5fe9150..7bdf1c6c 100644 --- a/tests/approvals/out/non-arc4/non-arc4.awst +++ b/tests/approvals/out/non-arc4/non-arc4.awst @@ -25,9 +25,8 @@ contract HelloWorldContract void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/non-arc4/non-arc4.awst.json b/tests/approvals/out/non-arc4/non-arc4.awst.json index e30e0726..b15026a1 100644 --- a/tests/approvals/out/non-arc4/non-arc4.awst.json +++ b/tests/approvals/out/non-arc4/non-arc4.awst.json @@ -646,42 +646,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -691,7 +656,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } diff --git a/tests/approvals/out/precompiled-apps/precompiled-apps.awst b/tests/approvals/out/precompiled-apps/precompiled-apps.awst index 061b851f..a2f2e674 100644 --- a/tests/approvals/out/precompiled-apps/precompiled-apps.awst +++ b/tests/approvals/out/precompiled-apps/precompiled-apps.awst @@ -47,11 +47,11 @@ contract Hello Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } @@ -104,11 +104,11 @@ contract HelloTemplate Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } @@ -161,11 +161,11 @@ contract HelloTemplateCustomPrefix Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } @@ -204,11 +204,11 @@ contract LargeProgram Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void diff --git a/tests/approvals/out/precompiled-apps/precompiled-apps.awst.json b/tests/approvals/out/precompiled-apps/precompiled-apps.awst.json index 32ec5e90..823d9a69 100644 --- a/tests/approvals/out/precompiled-apps/precompiled-apps.awst.json +++ b/tests/approvals/out/precompiled-apps/precompiled-apps.awst.json @@ -1023,7 +1023,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -1065,42 +1100,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1110,7 +1110,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -2184,7 +2184,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -2226,42 +2261,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -2271,7 +2271,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -3345,7 +3345,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -3387,42 +3422,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -3432,7 +3432,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } @@ -4141,7 +4141,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -4183,42 +4218,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -4228,7 +4228,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, diff --git a/tests/approvals/out/precompiled-factory/precompiled-factory.awst b/tests/approvals/out/precompiled-factory/precompiled-factory.awst index 01ff4dc1..35c2c95d 100644 --- a/tests/approvals/out/precompiled-factory/precompiled-factory.awst +++ b/tests/approvals/out/precompiled-factory/precompiled-factory.awst @@ -60,11 +60,11 @@ contract HelloFactory Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void diff --git a/tests/approvals/out/precompiled-factory/precompiled-factory.awst.json b/tests/approvals/out/precompiled-factory/precompiled-factory.awst.json index a548a39d..97a8350f 100644 --- a/tests/approvals/out/precompiled-factory/precompiled-factory.awst.json +++ b/tests/approvals/out/precompiled-factory/precompiled-factory.awst.json @@ -8786,7 +8786,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -8828,42 +8863,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -8873,7 +8873,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, diff --git a/tests/approvals/out/property-ordering/property-ordering.awst b/tests/approvals/out/property-ordering/property-ordering.awst index cbbc3c74..e10b73d1 100644 --- a/tests/approvals/out/property-ordering/property-ordering.awst +++ b/tests/approvals/out/property-ordering/property-ordering.awst @@ -28,9 +28,8 @@ contract Demo void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/property-ordering/property-ordering.awst.json b/tests/approvals/out/property-ordering/property-ordering.awst.json index 2346d0d1..eee2cc02 100644 --- a/tests/approvals/out/property-ordering/property-ordering.awst.json +++ b/tests/approvals/out/property-ordering/property-ordering.awst.json @@ -1616,42 +1616,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1661,7 +1626,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } diff --git a/tests/approvals/out/shadowed-variables/shadowed-variables.awst b/tests/approvals/out/shadowed-variables/shadowed-variables.awst index e9d9f4e4..3682f781 100644 --- a/tests/approvals/out/shadowed-variables/shadowed-variables.awst +++ b/tests/approvals/out/shadowed-variables/shadowed-variables.awst @@ -34,9 +34,8 @@ contract ShadowedVariablesAlgo void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/shadowed-variables/shadowed-variables.awst.json b/tests/approvals/out/shadowed-variables/shadowed-variables.awst.json index c3b4e421..01f94e99 100644 --- a/tests/approvals/out/shadowed-variables/shadowed-variables.awst.json +++ b/tests/approvals/out/shadowed-variables/shadowed-variables.awst.json @@ -1396,42 +1396,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -1441,7 +1406,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } diff --git a/tests/approvals/out/strings/strings.awst b/tests/approvals/out/strings/strings.awst index 618677ac..2f546bfe 100644 --- a/tests/approvals/out/strings/strings.awst +++ b/tests/approvals/out/strings/strings.awst @@ -30,11 +30,11 @@ contract StringContract Contract::constructor(): void { + this.constructor() } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } __algots__.defaultCreate(): void diff --git a/tests/approvals/out/strings/strings.awst.json b/tests/approvals/out/strings/strings.awst.json index 3839f298..94b193d6 100644 --- a/tests/approvals/out/strings/strings.awst.json +++ b/tests/approvals/out/strings/strings.awst.json @@ -697,7 +697,42 @@ "column": 0, "end_column": 1 }, - "body": [], + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "expr": { + "_type": "SubroutineCallExpression", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] + } + } + ], "label": null, "comment": null }, @@ -739,42 +774,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -784,7 +784,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null }, diff --git a/tests/approvals/out/uint64-expressions/uint64-expressions.awst b/tests/approvals/out/uint64-expressions/uint64-expressions.awst index bd50f7d7..b4a2eac7 100644 --- a/tests/approvals/out/uint64-expressions/uint64-expressions.awst +++ b/tests/approvals/out/uint64-expressions/uint64-expressions.awst @@ -22,9 +22,8 @@ contract DemoContract void } - Contract::constructor(): void + BaseContract::constructor(): void { - this.constructor() } } \ No newline at end of file diff --git a/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json b/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json index 2f731988..025edeca 100644 --- a/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json +++ b/tests/approvals/out/uint64-expressions/uint64-expressions.awst.json @@ -627,42 +627,7 @@ "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "ExpressionStatement", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "expr": { - "_type": "SubroutineCallExpression", - "source_location": { - "_type": "SourceLocation", - "file": null, - "line": 1, - "end_line": 1, - "column": 0, - "end_column": 1 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "target": { - "_type": "InstanceMethodTarget", - "member_name": "constructor" - }, - "args": [] - } - } - ], + "body": [], "label": null, "comment": null }, @@ -672,7 +637,7 @@ "args": {}, "returns": null }, - "cref": "@algorandfoundation/algorand-typescript/arc4/index.d.ts::Contract", + "cref": "@algorandfoundation/algorand-typescript/base-contract.d.ts::BaseContract", "member_name": "constructor", "arc4_method_config": null } diff --git a/tsconfig.json b/tsconfig.json index 07d17774..b710e536 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,11 @@ "module": "ESNext", "moduleResolution": "Bundler", "resolveJsonModule": true, - "esModuleInterop": true + "esModuleInterop": true, + "paths": { + "@algorandfoundation/algorand-typescript": ["./packages/algo-ts/src"], + "@algorandfoundation/algorand-typescript/*": ["./packages/algo-ts/src/*"] + } }, "include": [ "src/**/*.ts", @@ -18,5 +22,6 @@ "vitest.config.mts", "eslint.config.mjs" ], - "exclude": ["packages/**/*.ts"] + "exclude": ["packages/**/*.ts"], + } From 674d6b2200259db07876e88c2be3b3feeae08bbc Mon Sep 17 00:00:00 2001 From: Tristan Menzel Date: Thu, 5 Dec 2024 11:46:50 -0800 Subject: [PATCH 30/30] fix: Bug when creating UintN<128> instance with a literal larger than 64bits --- src/awst_build/eb/arc4/uintn.ts | 9 +- src/awst_build/ptypes/arc4-types.ts | 3 +- tests/approvals/arc4-types.algo.ts | 3 + .../Arc4TypesTestContract.approval.teal | 162 +- .../arc4-types/Arc4TypesTestContract.ssa.ir | 23 +- .../approvals/out/arc4-types/arc4-types.awst | 1 + .../out/arc4-types/arc4-types.awst.json | 1625 +++++++++-------- tests/onchain/util/test-fixture.ts | 3 + 8 files changed, 952 insertions(+), 877 deletions(-) diff --git a/src/awst_build/eb/arc4/uintn.ts b/src/awst_build/eb/arc4/uintn.ts index 8553b69c..eb1b639b 100644 --- a/src/awst_build/eb/arc4/uintn.ts +++ b/src/awst_build/eb/arc4/uintn.ts @@ -3,7 +3,7 @@ import type { Expression } from '../../../awst/nodes' import { IntegerConstant } from '../../../awst/nodes' import type { SourceLocation } from '../../../awst/source-location' import { CodeError } from '../../../errors' -import { bigIntToUint8Array, codeInvariant, invariant } from '../../../util' +import { codeInvariant, invariant } from '../../../util' import type { LibClassType, PType } from '../../ptypes' import { biguintPType, NumericLiteralPType, uint64PType } from '../../ptypes' import { UintNClass, UintNType } from '../../ptypes/arc4-types' @@ -71,7 +71,7 @@ function newUintN(initialValueBuilder: InstanceBuilder | undefined, ptype: UintN ptype, ) } - if (initialValueBuilder.resolvableToPType(uint64PType)) { + if (ptype.n <= 64 && initialValueBuilder.resolvableToPType(uint64PType)) { const initialValue = initialValueBuilder.resolveToPType(uint64PType).resolve() if (initialValue instanceof IntegerConstant) { codeInvariant(isValidLiteralForPType(initialValue.value, ptype), `${initialValue.value} cannot be converted to ${ptype}`) @@ -101,10 +101,11 @@ function newUintN(initialValueBuilder: InstanceBuilder | undefined, ptype: UintN if (initialValue instanceof IntegerConstant) { codeInvariant(isValidLiteralForPType(initialValue.value, ptype), `${initialValue.value} cannot be converted to ${ptype}`) return new UintNExpressionBuilder( - nodeFactory.bytesConstant({ - value: bigIntToUint8Array(initialValue.value), + nodeFactory.integerConstant({ + value: initialValue.value, wtype: ptype.wtypeOrThrow, sourceLocation: sourceLocation, + tealAlias: null, }), ptype, ) diff --git a/src/awst_build/ptypes/arc4-types.ts b/src/awst_build/ptypes/arc4-types.ts index e4396ae1..c7b03d07 100644 --- a/src/awst_build/ptypes/arc4-types.ts +++ b/src/awst_build/ptypes/arc4-types.ts @@ -369,7 +369,8 @@ export class DynamicArrayType extends ARC4EncodedType { super() this.immutable = immutable ?? false this.elementType = elementType - ;(this.nativeType = nativeType), (this.name = name ?? `DynamicArray<${elementType}>`) + this.nativeType = nativeType + this.name = name ?? `DynamicArray<${elementType}>` this.sourceLocation = sourceLocation this.wtype = new wtypes.ARC4DynamicArray({ elementType: this.elementType.wtype, diff --git a/tests/approvals/arc4-types.algo.ts b/tests/approvals/arc4-types.algo.ts index ad1ecb14..886edc12 100644 --- a/tests/approvals/arc4-types.algo.ts +++ b/tests/approvals/arc4-types.algo.ts @@ -12,6 +12,7 @@ import { Tuple, UFixedNxM, UintN, + UintN128, UintN32, UintN64, } from '@algorandfoundation/algorand-typescript/arc4' @@ -34,6 +35,8 @@ function testUintN(n: uint64, b: biguint, c: UintN<256>) { const z = new UintN<8>(n) const z_native = z.native assert(z_native === n) + const big128 = new UintN128(2n ** 100n) + const a = new UintN<128>(b) const a_native = a.native assert(a_native === b) diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal b/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal index 6f94f04c..f21ef48a 100644 --- a/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.approval.teal @@ -8,54 +8,54 @@ tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.approvalProgram: callsub constructor main_after_if_else@2: - // tests/approvals/arc4-types.algo.ts:137 + // tests/approvals/arc4-types.algo.ts:140 // testStr() callsub testStr - // tests/approvals/arc4-types.algo.ts:138 + // tests/approvals/arc4-types.algo.ts:141 // testUintN(1, 2n, new UintN<256>(4)) intc_1 // 1 pushbytes 0x02 pushbytes 0x0000000000000000000000000000000000000000000000000000000000000004 callsub testUintN - // tests/approvals/arc4-types.algo.ts:139 + // tests/approvals/arc4-types.algo.ts:142 // testUFixed() callsub testUFixed - // tests/approvals/arc4-types.algo.ts:140 + // tests/approvals/arc4-types.algo.ts:143 // testByte() callsub testByte - // tests/approvals/arc4-types.algo.ts:141 + // tests/approvals/arc4-types.algo.ts:144 // testArrays(new UintN<64>(65)) pushbytes 0x0000000000000041 callsub testArrays - // tests/approvals/arc4-types.algo.ts:142 + // tests/approvals/arc4-types.algo.ts:145 // testAddress() callsub testAddress - // tests/approvals/arc4-types.algo.ts:143 + // tests/approvals/arc4-types.algo.ts:146 // testTuple() callsub testTuple - // tests/approvals/arc4-types.algo.ts:144 + // tests/approvals/arc4-types.algo.ts:147 // testUFixed() callsub testUFixed - // tests/approvals/arc4-types.algo.ts:145 + // tests/approvals/arc4-types.algo.ts:148 // testDynamicBytes(Bytes('hmmmmmmmmm')) pushbytes "hmmmmmmmmm" callsub testDynamicBytes - // tests/approvals/arc4-types.algo.ts:146 + // tests/approvals/arc4-types.algo.ts:149 // testStaticBytes() callsub testStaticBytes - // tests/approvals/arc4-types.algo.ts:147 + // tests/approvals/arc4-types.algo.ts:150 // const result = new arc4.DynamicArray>() bytec_1 // 0x0000 bytec_0 // 0x concat - // tests/approvals/arc4-types.algo.ts:148 + // tests/approvals/arc4-types.algo.ts:151 // assert(result.length === 0) intc_0 // 0 extract_uint16 intc_0 // 0 == assert - // tests/approvals/arc4-types.algo.ts:149 + // tests/approvals/arc4-types.algo.ts:152 // return true intc_1 // 1 return @@ -63,7 +63,7 @@ main_after_if_else@2: // tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.constructor() -> void: constructor: - // tests/approvals/arc4-types.algo.ts:130 + // tests/approvals/arc4-types.algo.ts:133 // export class Arc4TypesTestContract extends BaseContract { proto 0 0 retsub @@ -71,31 +71,31 @@ constructor: // tests/approvals/arc4-types.algo.ts::testStr() -> void: testStr: - // tests/approvals/arc4-types.algo.ts:59 + // tests/approvals/arc4-types.algo.ts:62 // function testStr() { proto 0 0 - // tests/approvals/arc4-types.algo.ts:60 + // tests/approvals/arc4-types.algo.ts:63 // const s1 = new Str() bytec_1 // 0x0000 - // tests/approvals/arc4-types.algo.ts:61 + // tests/approvals/arc4-types.algo.ts:64 // assert(s1.bytes === new UintN<16>(0).bytes, 'Empty string should equal the uint16 length prefix') dup == assert // Empty string should equal the uint16 length prefix - // tests/approvals/arc4-types.algo.ts:62 + // tests/approvals/arc4-types.algo.ts:65 // const s2 = new Str('Hello') bytec 4 // 0x000548656c6c6f - // tests/approvals/arc4-types.algo.ts:63 + // tests/approvals/arc4-types.algo.ts:66 // assert(s2.native === 'Hello') extract 2 0 pushbytes "Hello" == assert - // tests/approvals/arc4-types.algo.ts:62 + // tests/approvals/arc4-types.algo.ts:65 // const s2 = new Str('Hello') bytec 4 // 0x000548656c6c6f dup - // tests/approvals/arc4-types.algo.ts:69 + // tests/approvals/arc4-types.algo.ts:72 // assert(s2 === s2_from_bytes) == assert @@ -104,49 +104,49 @@ testStr: // tests/approvals/arc4-types.algo.ts::testUintN(n: uint64, b: bytes, c: bytes) -> void: testUintN: - // tests/approvals/arc4-types.algo.ts:26 + // tests/approvals/arc4-types.algo.ts:27 // function testUintN(n: uint64, b: biguint, c: UintN<256>) { proto 3 0 - // tests/approvals/arc4-types.algo.ts:27 + // tests/approvals/arc4-types.algo.ts:28 // const x = new UintN<8>(4) pushbytes 0x04 - // tests/approvals/arc4-types.algo.ts:28 + // tests/approvals/arc4-types.algo.ts:29 // assert(x.bytes.length === 1) len intc_1 // 1 == assert - // tests/approvals/arc4-types.algo.ts:29 + // tests/approvals/arc4-types.algo.ts:30 // const x2 = new UintN<8>(255n) pushbytes 0xff - // tests/approvals/arc4-types.algo.ts:30 + // tests/approvals/arc4-types.algo.ts:31 // assert(x2.bytes === Bytes.fromHex('ff')) dup == assert - // tests/approvals/arc4-types.algo.ts:32 + // tests/approvals/arc4-types.algo.ts:33 // const y = new UintN<16>() bytec_1 // 0x0000 - // tests/approvals/arc4-types.algo.ts:33 + // tests/approvals/arc4-types.algo.ts:34 // assert(y.bytes.length === 2) len intc_3 // 2 == assert - // tests/approvals/arc4-types.algo.ts:34 + // tests/approvals/arc4-types.algo.ts:35 // const z = new UintN<8>(n) frame_dig -3 itob extract 7 1 - // tests/approvals/arc4-types.algo.ts:35 + // tests/approvals/arc4-types.algo.ts:36 // const z_native = z.native btoi - // tests/approvals/arc4-types.algo.ts:36 + // tests/approvals/arc4-types.algo.ts:37 // assert(z_native === n) frame_dig -3 == assert - // tests/approvals/arc4-types.algo.ts:37 + // tests/approvals/arc4-types.algo.ts:40 // const a = new UintN<128>(b) frame_dig -2 len @@ -157,49 +157,49 @@ testUintN: bzero frame_dig -2 b| - // tests/approvals/arc4-types.algo.ts:38 + // tests/approvals/arc4-types.algo.ts:41 // const a_native = a.native dup - // tests/approvals/arc4-types.algo.ts:39 + // tests/approvals/arc4-types.algo.ts:42 // assert(a_native === b) frame_dig -2 b== assert - // tests/approvals/arc4-types.algo.ts:41 + // tests/approvals/arc4-types.algo.ts:44 // assert(c.bytes.length === 256 / 8) frame_dig -1 len pushint 32 // 32 == assert - // tests/approvals/arc4-types.algo.ts:43 + // tests/approvals/arc4-types.algo.ts:46 // const a_bytes = a.bytes dup - // tests/approvals/arc4-types.algo.ts:46 + // tests/approvals/arc4-types.algo.ts:49 // assert(a_from_bytes === a) == assert - // tests/approvals/arc4-types.algo.ts:48 + // tests/approvals/arc4-types.algo.ts:51 // const aliased64 = new UintN64(12) pushbytes 0x000000000000000c - // tests/approvals/arc4-types.algo.ts:50 + // tests/approvals/arc4-types.algo.ts:53 // assert(aliased64.native === 12) btoi pushint 12 // 12 == assert - // tests/approvals/arc4-types.algo.ts:51 + // tests/approvals/arc4-types.algo.ts:54 // const aliased32 = new UintN32(50545) pushbytes 0x0000c571 - // tests/approvals/arc4-types.algo.ts:52 + // tests/approvals/arc4-types.algo.ts:55 // assert(BigUint(aliased32.bytes) === 50545n) pushbytes 0xc571 b== assert - // tests/approvals/arc4-types.algo.ts:54 + // tests/approvals/arc4-types.algo.ts:57 // const byte = new Byte(255) pushbytes 0xff - // tests/approvals/arc4-types.algo.ts:56 + // tests/approvals/arc4-types.algo.ts:59 // assert(byte.bytes.bitwiseInvert() === Bytes.fromHex('00')) b~ bytec_2 // 0x00 @@ -210,16 +210,16 @@ testUintN: // tests/approvals/arc4-types.algo.ts::testUFixed() -> void: testUFixed: - // tests/approvals/arc4-types.algo.ts:19 + // tests/approvals/arc4-types.algo.ts:20 // function testUFixed() { proto 0 0 - // tests/approvals/arc4-types.algo.ts:20 + // tests/approvals/arc4-types.algo.ts:21 // const a = new UFixedNxM<32, 4>('1.244') pushbytes 0x000004dc - // tests/approvals/arc4-types.algo.ts:21 + // tests/approvals/arc4-types.algo.ts:22 // const c = new UFixedNxM<32, 4>('1.244') dup - // tests/approvals/arc4-types.algo.ts:23 + // tests/approvals/arc4-types.algo.ts:24 // assert(a === c) == assert @@ -228,16 +228,16 @@ testUFixed: // tests/approvals/arc4-types.algo.ts::testByte() -> void: testByte: - // tests/approvals/arc4-types.algo.ts:106 + // tests/approvals/arc4-types.algo.ts:109 // function testByte() { proto 0 0 - // tests/approvals/arc4-types.algo.ts:107 + // tests/approvals/arc4-types.algo.ts:110 // const b = new Byte() bytec_2 // 0x00 - // tests/approvals/arc4-types.algo.ts:108 + // tests/approvals/arc4-types.algo.ts:111 // const b2 = new Byte(0) dup - // tests/approvals/arc4-types.algo.ts:109 + // tests/approvals/arc4-types.algo.ts:112 // assert(b === b2) == assert @@ -246,10 +246,10 @@ testByte: // tests/approvals/arc4-types.algo.ts::testArrays(n: bytes) -> void: testArrays: - // tests/approvals/arc4-types.algo.ts:92 + // tests/approvals/arc4-types.algo.ts:95 // function testArrays(n: ARC4Uint64) { proto 1 0 - // tests/approvals/arc4-types.algo.ts:93 + // tests/approvals/arc4-types.algo.ts:96 // const myArray = new DynamicArray(n, n, n) bytec_0 // 0x frame_dig -1 @@ -261,7 +261,7 @@ testArrays: pushbytes 0x0003 swap concat - // tests/approvals/arc4-types.algo.ts:95 + // tests/approvals/arc4-types.algo.ts:98 // myArray.push(n) extract 2 0 bytec_0 // 0x @@ -276,7 +276,7 @@ testArrays: extract 6 2 swap concat - // tests/approvals/arc4-types.algo.ts:97 + // tests/approvals/arc4-types.algo.ts:100 // const myStatic = new StaticArray(n, n) bytec_0 // 0x frame_dig -1 @@ -286,7 +286,7 @@ testArrays: bytec_0 // 0x swap concat - // tests/approvals/arc4-types.algo.ts:99 + // tests/approvals/arc4-types.algo.ts:102 // assert(myStatic[0] === myArray.pop()) intc_0 // 0 intc_2 // 8 @@ -304,36 +304,36 @@ testArrays: // tests/approvals/arc4-types.algo.ts::testAddress() -> void: testAddress: - // tests/approvals/arc4-types.algo.ts:112 + // tests/approvals/arc4-types.algo.ts:115 // function testAddress() { proto 0 0 - // tests/approvals/arc4-types.algo.ts:114 + // tests/approvals/arc4-types.algo.ts:117 // const b = new Address(Txn.sender) txn Sender - // tests/approvals/arc4-types.algo.ts:113 + // tests/approvals/arc4-types.algo.ts:116 // const a = new Address() bytec_3 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ - // tests/approvals/arc4-types.algo.ts:116 + // tests/approvals/arc4-types.algo.ts:119 // assert(a !== b, 'Zero address should not match sender') != assert // Zero address should not match sender - // tests/approvals/arc4-types.algo.ts:113 + // tests/approvals/arc4-types.algo.ts:116 // const a = new Address() bytec_3 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ - // tests/approvals/arc4-types.algo.ts:117 + // tests/approvals/arc4-types.algo.ts:120 // assert(a === new Address(), 'Two zero addresses should match') dup == assert // Two zero addresses should match - // tests/approvals/arc4-types.algo.ts:118 + // tests/approvals/arc4-types.algo.ts:121 // assert(a[0] === new Byte(), 'Zero address should start with zero byte') intc_0 // 0 intc_1 // 1 * - // tests/approvals/arc4-types.algo.ts:113 + // tests/approvals/arc4-types.algo.ts:116 // const a = new Address() bytec_3 // addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ - // tests/approvals/arc4-types.algo.ts:118 + // tests/approvals/arc4-types.algo.ts:121 // assert(a[0] === new Byte(), 'Zero address should start with zero byte') swap intc_1 // 1 @@ -346,31 +346,31 @@ testAddress: // tests/approvals/arc4-types.algo.ts::testTuple() -> void: testTuple: - // tests/approvals/arc4-types.algo.ts:121 + // tests/approvals/arc4-types.algo.ts:124 // function testTuple() { proto 0 0 - // tests/approvals/arc4-types.algo.ts:122 + // tests/approvals/arc4-types.algo.ts:125 // const t = new Tuple(new ARC4Uint64(34)) bytec_0 // 0x pushbytes 0x0000000000000022 concat - // tests/approvals/arc4-types.algo.ts:123 + // tests/approvals/arc4-types.algo.ts:126 // const firstItem = t.at(0) dup intc_0 // 0 intc_2 // 8 extract3 // on error: Index access is out of bounds swap - // tests/approvals/arc4-types.algo.ts:124 + // tests/approvals/arc4-types.algo.ts:127 // const firstItemIndexer = t.native[0] intc_0 // 0 intc_2 // 8 extract3 // on error: Index access is out of bounds - // tests/approvals/arc4-types.algo.ts:125 + // tests/approvals/arc4-types.algo.ts:128 // assert(firstItem === firstItemIndexer) == assert - // tests/approvals/arc4-types.algo.ts:127 + // tests/approvals/arc4-types.algo.ts:130 // assert(t1.length === 2) intc_3 // 2 dup @@ -381,27 +381,27 @@ testTuple: // tests/approvals/arc4-types.algo.ts::testDynamicBytes(someBytes: bytes) -> void: testDynamicBytes: - // tests/approvals/arc4-types.algo.ts:72 + // tests/approvals/arc4-types.algo.ts:75 // function testDynamicBytes(someBytes: bytes) { proto 1 0 - // tests/approvals/arc4-types.algo.ts:73 + // tests/approvals/arc4-types.algo.ts:76 // const db1 = new DynamicBytes() bytec_1 // 0x0000 - // tests/approvals/arc4-types.algo.ts:74 + // tests/approvals/arc4-types.algo.ts:77 // assert(db1.native === Bytes(), 'No args should give empty bytes') extract 2 0 bytec_0 // 0x == assert // No args should give empty bytes - // tests/approvals/arc4-types.algo.ts:73 + // tests/approvals/arc4-types.algo.ts:76 // const db1 = new DynamicBytes() bytec_1 // 0x0000 - // tests/approvals/arc4-types.algo.ts:75 + // tests/approvals/arc4-types.algo.ts:78 // assert(db1.bytes === new UintN<16>(0).bytes, 'bytes prop should return length header (of 0)') dup == assert // bytes prop should return length header (of 0) - // tests/approvals/arc4-types.algo.ts:76 + // tests/approvals/arc4-types.algo.ts:79 // const db2 = new DynamicBytes(someBytes) frame_dig -1 len @@ -409,16 +409,16 @@ testDynamicBytes: extract 6 2 frame_dig -1 concat - // tests/approvals/arc4-types.algo.ts:77 + // tests/approvals/arc4-types.algo.ts:80 // assert(db2.native === someBytes) extract 2 0 frame_dig -1 == assert - // tests/approvals/arc4-types.algo.ts:79 + // tests/approvals/arc4-types.algo.ts:82 // const db3 = new DynamicBytes('hello') pushbytes 0x000568656c6c6f - // tests/approvals/arc4-types.algo.ts:80 + // tests/approvals/arc4-types.algo.ts:83 // assert(db3.native === Bytes('hello')) extract 2 0 pushbytes "hello" @@ -429,7 +429,7 @@ testDynamicBytes: // tests/approvals/arc4-types.algo.ts::testStaticBytes() -> void: testStaticBytes: - // tests/approvals/arc4-types.algo.ts:83 + // tests/approvals/arc4-types.algo.ts:86 // function testStaticBytes() { proto 0 0 retsub diff --git a/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir b/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir index d70d9559..35dda988 100644 --- a/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir +++ b/tests/approvals/out/arc4-types/Arc4TypesTestContract.ssa.ir @@ -1,7 +1,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: program approval: subroutine tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.approvalProgram() -> bool: - block@0: // L135 + block@0: // L138 let reinterpret_bool%0#0: bool = (txn ApplicationID) goto reinterpret_bool%0#0 ? block@2 : block@1 block@1: // if_body_L1 @@ -27,11 +27,11 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return 1u subroutine tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract.constructor() -> void: - block@0: // L130 + block@0: // L133 return subroutine tests/approvals/arc4-types.algo.ts::testStr() -> void: - block@0: // L59 + block@0: // L62 let s1#0: bytes = 0x0000 let tmp%0#0: bool = (== s1#0 0x0000) (assert tmp%0#0) // Empty string should equal the uint16 length prefix @@ -46,7 +46,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testUintN(n: uint64, b: biguint, c: bytes) -> void: - block@0: // L26 + block@0: // L27 let x#0: bytes = 0x04 let tmp%0#0: uint64 = (len x#0) let tmp%1#0: bool = (== tmp%0#0 1u) @@ -63,6 +63,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: let z_native#0: uint64 = (btoi z#0) let tmp%5#0: bool = (== z_native#0 n#0) (assert tmp%5#0) + let big128#0: bytes = 0x00000010000000000000000000000000 let len_%0#0: uint64 = (len b#0) let no_overflow%0#0: bool = (<= len_%0#0 16u) (assert no_overflow%0#0) // overflow @@ -93,7 +94,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testUFixed() -> void: - block@0: // L19 + block@0: // L20 let a#0: bytes = 0x000004dc let c#0: bytes = 0x000004dc let tmp%0#0: bool = (== a#0 c#0) @@ -101,7 +102,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testByte() -> void: - block@0: // L106 + block@0: // L109 let b#0: bytes = 0x00 let b2#0: bytes = 0x00 let tmp%0#0: bool = (== b#0 b2#0) @@ -109,7 +110,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testArrays(n: bytes) -> void: - block@0: // L92 + block@0: // L95 let result%0#0: bytes = (concat 0x n#0) let result%1#0: bytes = (concat result%0#0 n#0) let result%2#0: bytes = (concat result%1#0 n#0) @@ -146,7 +147,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testAddress() -> void: - block@0: // L112 + block@0: // L115 let a#0: bytes = addr AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ let b#0: bytes = (txn Sender) let tmp%0#0: bool = (!= a#0 b#0) @@ -161,7 +162,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testTuple() -> void: - block@0: // L121 + block@0: // L124 let current_tail_offset%0#0: uint64 = 8u let encoded_tuple_buffer%0#0: bytes = 0x let encoded_tuple_buffer%1#0: bytes = (concat encoded_tuple_buffer%0#0 0x0000000000000022) @@ -181,7 +182,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testDynamicBytes(someBytes: bytes) -> void: - block@0: // L72 + block@0: // L75 let db1#0: bytes = 0x0000 let tmp%0#0: bytes = ((extract 2 0) db1#0) let tmp%1#0: bool = (== tmp%0#0 0x) @@ -203,7 +204,7 @@ contract tests/approvals/arc4-types.algo.ts::Arc4TypesTestContract: return subroutine tests/approvals/arc4-types.algo.ts::testStaticBytes() -> void: - block@0: // L83 + block@0: // L86 let s1#0: bytes = 0x let s2#0: bytes = 0x00000000 let s3#0: bytes = 0xaabbccddee diff --git a/tests/approvals/out/arc4-types/arc4-types.awst b/tests/approvals/out/arc4-types/arc4-types.awst index abc4da3b..a7111212 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst +++ b/tests/approvals/out/arc4-types/arc4-types.awst @@ -15,6 +15,7 @@ subroutine testUintN(n: uint64, b: biguint, c: arc4.uint256): void z: arc4.uint8 = ARC4_ENCODE(n, wtype=arc4.uint8) z_native: uint64 = ARC4_DECODE(z) assert(z_native == n) + big128: arc4.uint128 = 1267650600228229401496703205376 a: arc4.uint128 = ARC4_ENCODE(b, wtype=arc4.uint128) a_native: biguint = ARC4_DECODE(a) assert(a_native == b) diff --git a/tests/approvals/out/arc4-types/arc4-types.awst.json b/tests/approvals/out/arc4-types/arc4-types.awst.json index 70901f4e..8f3df182 100644 --- a/tests/approvals/out/arc4-types/arc4-types.awst.json +++ b/tests/approvals/out/arc4-types/arc4-types.awst.json @@ -3,8 +3,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 19, - "end_line": 19, + "line": 20, + "end_line": 20, "column": 0, "end_column": 21 }, @@ -20,8 +20,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 19, - "end_line": 24, + "line": 20, + "end_line": 25, "column": 22, "end_column": 1 }, @@ -30,8 +30,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 8, "end_column": 41 }, @@ -39,8 +39,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 8, "end_column": 9 }, @@ -67,8 +67,8 @@ "_type": "DecimalConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 20, - "end_line": 20, + "line": 21, + "end_line": 21, "column": 33, "end_column": 40 }, @@ -96,8 +96,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 8, "end_column": 41 }, @@ -105,8 +105,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 8, "end_column": 9 }, @@ -133,8 +133,8 @@ "_type": "DecimalConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 21, - "end_line": 21, + "line": 22, + "end_line": 22, "column": 33, "end_column": 40 }, @@ -162,8 +162,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, + "line": 24, + "end_line": 24, "column": 2, "end_column": 17 }, @@ -171,8 +171,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, + "line": 24, + "end_line": 24, "column": 2, "end_column": 17 }, @@ -187,8 +187,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, + "line": 24, + "end_line": 24, "column": 9, "end_column": 16 }, @@ -203,8 +203,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, + "line": 24, + "end_line": 24, "column": 9, "end_column": 16 }, @@ -219,8 +219,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, + "line": 24, + "end_line": 24, "column": 9, "end_column": 10 }, @@ -249,8 +249,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, + "line": 24, + "end_line": 24, "column": 9, "end_column": 16 }, @@ -265,8 +265,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 23, - "end_line": 23, + "line": 24, + "end_line": 24, "column": 15, "end_column": 16 }, @@ -311,8 +311,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 26, - "end_line": 26, + "line": 27, + "end_line": 27, "column": 0, "end_column": 56 }, @@ -329,8 +329,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 26, - "end_line": 26, + "line": 27, + "end_line": 27, "column": 19, "end_column": 28 } @@ -347,8 +347,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 26, - "end_line": 26, + "line": 27, + "end_line": 27, "column": 30, "end_column": 40 } @@ -374,8 +374,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 26, - "end_line": 26, + "line": 27, + "end_line": 27, "column": 42, "end_column": 55 } @@ -392,8 +392,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 26, - "end_line": 57, + "line": 27, + "end_line": 60, "column": 57, "end_column": 1 }, @@ -402,8 +402,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 28, + "end_line": 28, "column": 8, "end_column": 27 }, @@ -411,8 +411,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 28, + "end_line": 28, "column": 8, "end_column": 9 }, @@ -438,8 +438,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 27, - "end_line": 27, + "line": 28, + "end_line": 28, "column": 12, "end_column": 27 }, @@ -467,8 +467,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 28, - "end_line": 28, + "line": 29, + "end_line": 29, "column": 2, "end_column": 30 }, @@ -476,8 +476,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 28, - "end_line": 28, + "line": 29, + "end_line": 29, "column": 2, "end_column": 30 }, @@ -492,8 +492,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 28, - "end_line": 28, + "line": 29, + "end_line": 29, "column": 9, "end_column": 29 }, @@ -508,8 +508,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 28, - "end_line": 28, + "line": 29, + "end_line": 29, "column": 17, "end_column": 23 }, @@ -527,8 +527,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 28, - "end_line": 28, + "line": 29, + "end_line": 29, "column": 11, "end_column": 16 }, @@ -543,8 +543,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 28, - "end_line": 28, + "line": 29, + "end_line": 29, "column": 9, "end_column": 10 }, @@ -574,8 +574,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 28, - "end_line": 28, + "line": 29, + "end_line": 29, "column": 28, "end_column": 29 }, @@ -597,8 +597,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 29, - "end_line": 29, + "line": 30, + "end_line": 30, "column": 8, "end_column": 31 }, @@ -606,8 +606,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 29, - "end_line": 29, + "line": 30, + "end_line": 30, "column": 8, "end_column": 10 }, @@ -633,8 +633,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 29, - "end_line": 29, + "line": 30, + "end_line": 30, "column": 13, "end_column": 31 }, @@ -662,8 +662,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, + "line": 31, + "end_line": 31, "column": 2, "end_column": 42 }, @@ -671,8 +671,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, + "line": 31, + "end_line": 31, "column": 2, "end_column": 42 }, @@ -687,8 +687,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, + "line": 31, + "end_line": 31, "column": 9, "end_column": 41 }, @@ -703,8 +703,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, + "line": 31, + "end_line": 31, "column": 12, "end_column": 17 }, @@ -719,8 +719,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, + "line": 31, + "end_line": 31, "column": 9, "end_column": 11 }, @@ -748,8 +748,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 30, - "end_line": 30, + "line": 31, + "end_line": 31, "column": 22, "end_column": 41 }, @@ -771,8 +771,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 33, + "end_line": 33, "column": 8, "end_column": 27 }, @@ -780,8 +780,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 33, + "end_line": 33, "column": 8, "end_column": 9 }, @@ -807,8 +807,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 32, - "end_line": 32, + "line": 33, + "end_line": 33, "column": 12, "end_column": 27 }, @@ -836,8 +836,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 34, + "end_line": 34, "column": 2, "end_column": 30 }, @@ -845,8 +845,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 34, + "end_line": 34, "column": 2, "end_column": 30 }, @@ -861,8 +861,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 34, + "end_line": 34, "column": 9, "end_column": 29 }, @@ -877,8 +877,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 34, + "end_line": 34, "column": 17, "end_column": 23 }, @@ -896,8 +896,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 34, + "end_line": 34, "column": 11, "end_column": 16 }, @@ -912,8 +912,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 34, + "end_line": 34, "column": 9, "end_column": 10 }, @@ -943,8 +943,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 33, - "end_line": 33, + "line": 34, + "end_line": 34, "column": 28, "end_column": 29 }, @@ -966,8 +966,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 35, + "end_line": 35, "column": 8, "end_column": 27 }, @@ -975,8 +975,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 35, + "end_line": 35, "column": 8, "end_column": 9 }, @@ -1002,8 +1002,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 35, + "end_line": 35, "column": 12, "end_column": 27 }, @@ -1027,8 +1027,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 34, - "end_line": 34, + "line": 35, + "end_line": 35, "column": 25, "end_column": 26 }, @@ -1047,8 +1047,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 35, - "end_line": 35, + "line": 36, + "end_line": 36, "column": 8, "end_column": 27 }, @@ -1056,8 +1056,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 35, - "end_line": 35, + "line": 36, + "end_line": 36, "column": 8, "end_column": 16 }, @@ -1074,8 +1074,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 35, - "end_line": 35, + "line": 36, + "end_line": 36, "column": 21, "end_column": 27 }, @@ -1090,8 +1090,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 35, - "end_line": 35, + "line": 36, + "end_line": 36, "column": 19, "end_column": 20 }, @@ -1119,8 +1119,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 36, - "end_line": 36, + "line": 37, + "end_line": 37, "column": 2, "end_column": 24 }, @@ -1128,8 +1128,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 36, - "end_line": 36, + "line": 37, + "end_line": 37, "column": 2, "end_column": 24 }, @@ -1144,8 +1144,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 36, - "end_line": 36, + "line": 37, + "end_line": 37, "column": 9, "end_column": 23 }, @@ -1160,8 +1160,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 36, - "end_line": 36, + "line": 37, + "end_line": 37, "column": 9, "end_column": 17 }, @@ -1179,8 +1179,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 36, - "end_line": 36, + "line": 37, + "end_line": 37, "column": 22, "end_column": 23 }, @@ -1201,8 +1201,73 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 37, - "end_line": 37, + "line": 38, + "end_line": 38, + "column": 8, + "end_column": 41 + }, + "target": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 38, + "end_line": 38, + "column": 8, + "end_column": 14 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint128", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint128", + "n": "128" + }, + "name": "big128" + }, + "value": { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 38, + "end_line": 38, + "column": 17, + "end_column": 41 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint128", + "immutable": true, + "ephemeral": false, + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "biguint", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "arc4_name": "uint128", + "n": "128" + }, + "value": "1267650600228229401496703205376", + "teal_alias": null + } + }, + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-types.algo.ts", + "line": 40, + "end_line": 40, "column": 8, "end_column": 29 }, @@ -1210,8 +1275,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 37, - "end_line": 37, + "line": 40, + "end_line": 40, "column": 8, "end_column": 9 }, @@ -1237,8 +1302,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 37, - "end_line": 37, + "line": 40, + "end_line": 40, "column": 12, "end_column": 29 }, @@ -1262,8 +1327,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 37, - "end_line": 37, + "line": 40, + "end_line": 40, "column": 27, "end_column": 28 }, @@ -1282,8 +1347,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 38, - "end_line": 38, + "line": 41, + "end_line": 41, "column": 8, "end_column": 27 }, @@ -1291,8 +1356,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 38, - "end_line": 38, + "line": 41, + "end_line": 41, "column": 8, "end_column": 16 }, @@ -1309,8 +1374,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 38, - "end_line": 38, + "line": 41, + "end_line": 41, "column": 21, "end_column": 27 }, @@ -1325,8 +1390,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 38, - "end_line": 38, + "line": 41, + "end_line": 41, "column": 19, "end_column": 20 }, @@ -1354,8 +1419,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 39, - "end_line": 39, + "line": 42, + "end_line": 42, "column": 2, "end_column": 24 }, @@ -1363,8 +1428,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 39, - "end_line": 39, + "line": 42, + "end_line": 42, "column": 2, "end_column": 24 }, @@ -1379,8 +1444,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 39, - "end_line": 39, + "line": 42, + "end_line": 42, "column": 9, "end_column": 23 }, @@ -1395,8 +1460,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 39, - "end_line": 39, + "line": 42, + "end_line": 42, "column": 9, "end_column": 17 }, @@ -1414,8 +1479,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 39, - "end_line": 39, + "line": 42, + "end_line": 42, "column": 22, "end_column": 23 }, @@ -1436,8 +1501,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 44, + "end_line": 44, "column": 2, "end_column": 36 }, @@ -1445,8 +1510,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 44, + "end_line": 44, "column": 2, "end_column": 36 }, @@ -1461,8 +1526,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 44, + "end_line": 44, "column": 9, "end_column": 35 }, @@ -1477,8 +1542,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 44, + "end_line": 44, "column": 17, "end_column": 23 }, @@ -1496,8 +1561,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 44, + "end_line": 44, "column": 11, "end_column": 16 }, @@ -1512,8 +1577,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 44, + "end_line": 44, "column": 9, "end_column": 10 }, @@ -1543,8 +1608,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 41, - "end_line": 41, + "line": 44, + "end_line": 44, "column": 28, "end_column": 35 }, @@ -1566,8 +1631,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 46, + "end_line": 46, "column": 8, "end_column": 25 }, @@ -1575,8 +1640,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 46, + "end_line": 46, "column": 8, "end_column": 15 }, @@ -1593,8 +1658,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 46, + "end_line": 46, "column": 20, "end_column": 25 }, @@ -1609,8 +1674,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 43, - "end_line": 43, + "line": 46, + "end_line": 46, "column": 18, "end_column": 19 }, @@ -1638,8 +1703,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 44, - "end_line": 44, + "line": 47, + "end_line": 47, "column": 8, "end_column": 59 }, @@ -1647,8 +1712,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 44, - "end_line": 44, + "line": 47, + "end_line": 47, "column": 8, "end_column": 20 }, @@ -1674,8 +1739,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 44, - "end_line": 44, + "line": 47, + "end_line": 47, "column": 23, "end_column": 59 }, @@ -1699,8 +1764,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 44, - "end_line": 44, + "line": 47, + "end_line": 47, "column": 51, "end_column": 58 }, @@ -1719,8 +1784,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 46, - "end_line": 46, + "line": 49, + "end_line": 49, "column": 2, "end_column": 28 }, @@ -1728,8 +1793,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 46, - "end_line": 46, + "line": 49, + "end_line": 49, "column": 2, "end_column": 28 }, @@ -1744,8 +1809,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 46, - "end_line": 46, + "line": 49, + "end_line": 49, "column": 9, "end_column": 27 }, @@ -1760,8 +1825,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 46, - "end_line": 46, + "line": 49, + "end_line": 49, "column": 9, "end_column": 27 }, @@ -1776,8 +1841,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 46, - "end_line": 46, + "line": 49, + "end_line": 49, "column": 9, "end_column": 21 }, @@ -1805,8 +1870,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 46, - "end_line": 46, + "line": 49, + "end_line": 49, "column": 9, "end_column": 27 }, @@ -1821,8 +1886,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 46, - "end_line": 46, + "line": 49, + "end_line": 49, "column": 26, "end_column": 27 }, @@ -1853,8 +1918,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 48, - "end_line": 48, + "line": 51, + "end_line": 51, "column": 8, "end_column": 35 }, @@ -1862,8 +1927,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 48, - "end_line": 48, + "line": 51, + "end_line": 51, "column": 8, "end_column": 17 }, @@ -1889,8 +1954,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 48, - "end_line": 48, + "line": 51, + "end_line": 51, "column": 20, "end_column": 35 }, @@ -1918,8 +1983,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 50, - "end_line": 50, + "line": 53, + "end_line": 53, "column": 2, "end_column": 33 }, @@ -1927,8 +1992,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 50, - "end_line": 50, + "line": 53, + "end_line": 53, "column": 2, "end_column": 33 }, @@ -1943,8 +2008,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 50, - "end_line": 50, + "line": 53, + "end_line": 53, "column": 9, "end_column": 32 }, @@ -1959,8 +2024,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 50, - "end_line": 50, + "line": 53, + "end_line": 53, "column": 19, "end_column": 25 }, @@ -1975,8 +2040,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 50, - "end_line": 50, + "line": 53, + "end_line": 53, "column": 9, "end_column": 18 }, @@ -2004,8 +2069,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 50, - "end_line": 50, + "line": 53, + "end_line": 53, "column": 30, "end_column": 32 }, @@ -2027,8 +2092,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 51, - "end_line": 51, + "line": 54, + "end_line": 54, "column": 8, "end_column": 38 }, @@ -2036,8 +2101,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 51, - "end_line": 51, + "line": 54, + "end_line": 54, "column": 8, "end_column": 17 }, @@ -2063,8 +2128,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 51, - "end_line": 51, + "line": 54, + "end_line": 54, "column": 20, "end_column": 38 }, @@ -2092,8 +2157,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 52, - "end_line": 52, + "line": 55, + "end_line": 55, "column": 2, "end_column": 45 }, @@ -2101,8 +2166,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 52, - "end_line": 52, + "line": 55, + "end_line": 55, "column": 2, "end_column": 45 }, @@ -2117,8 +2182,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 52, - "end_line": 52, + "line": 55, + "end_line": 55, "column": 9, "end_column": 44 }, @@ -2133,8 +2198,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 52, - "end_line": 52, + "line": 55, + "end_line": 55, "column": 9, "end_column": 33 }, @@ -2149,8 +2214,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 52, - "end_line": 52, + "line": 55, + "end_line": 55, "column": 27, "end_column": 32 }, @@ -2165,8 +2230,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 52, - "end_line": 52, + "line": 55, + "end_line": 55, "column": 17, "end_column": 26 }, @@ -2195,8 +2260,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 52, - "end_line": 52, + "line": 55, + "end_line": 55, "column": 38, "end_column": 44 }, @@ -2218,8 +2283,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 54, - "end_line": 54, + "line": 57, + "end_line": 57, "column": 8, "end_column": 28 }, @@ -2227,8 +2292,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 54, - "end_line": 54, + "line": 57, + "end_line": 57, "column": 8, "end_column": 12 }, @@ -2254,8 +2319,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 54, - "end_line": 54, + "line": 57, + "end_line": 57, "column": 15, "end_column": 28 }, @@ -2283,8 +2348,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 59, + "end_line": 59, "column": 2, "end_column": 60 }, @@ -2292,8 +2357,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 59, + "end_line": 59, "column": 2, "end_column": 60 }, @@ -2308,8 +2373,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 59, + "end_line": 59, "column": 9, "end_column": 59 }, @@ -2324,8 +2389,8 @@ "_type": "BytesUnaryOperation", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 59, + "end_line": 59, "column": 9, "end_column": 35 }, @@ -2341,8 +2406,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 59, + "end_line": 59, "column": 14, "end_column": 19 }, @@ -2357,8 +2422,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 59, + "end_line": 59, "column": 9, "end_column": 13 }, @@ -2387,8 +2452,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 56, - "end_line": 56, + "line": 59, + "end_line": 59, "column": 40, "end_column": 59 }, @@ -2423,8 +2488,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 59, - "end_line": 59, + "line": 62, + "end_line": 62, "column": 0, "end_column": 18 }, @@ -2440,8 +2505,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 59, - "end_line": 70, + "line": 62, + "end_line": 73, "column": 19, "end_column": 1 }, @@ -2450,8 +2515,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 60, - "end_line": 60, + "line": 63, + "end_line": 63, "column": 8, "end_column": 22 }, @@ -2459,8 +2524,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 60, - "end_line": 60, + "line": 63, + "end_line": 63, "column": 8, "end_column": 10 }, @@ -2502,8 +2567,8 @@ "_type": "StringConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 60, - "end_line": 60, + "line": 63, + "end_line": 63, "column": 13, "end_column": 22 }, @@ -2546,8 +2611,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 61, - "end_line": 61, + "line": 64, + "end_line": 64, "column": 2, "end_column": 99 }, @@ -2555,8 +2620,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 61, - "end_line": 61, + "line": 64, + "end_line": 64, "column": 2, "end_column": 99 }, @@ -2571,8 +2636,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 61, - "end_line": 61, + "line": 64, + "end_line": 64, "column": 9, "end_column": 44 }, @@ -2587,8 +2652,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 61, - "end_line": 61, + "line": 64, + "end_line": 64, "column": 12, "end_column": 17 }, @@ -2603,8 +2668,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 61, - "end_line": 61, + "line": 64, + "end_line": 64, "column": 9, "end_column": 11 }, @@ -2648,8 +2713,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 61, - "end_line": 61, + "line": 64, + "end_line": 64, "column": 39, "end_column": 44 }, @@ -2664,8 +2729,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 61, - "end_line": 61, + "line": 64, + "end_line": 64, "column": 22, "end_column": 38 }, @@ -2697,8 +2762,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 62, - "end_line": 62, + "line": 65, + "end_line": 65, "column": 8, "end_column": 29 }, @@ -2706,8 +2771,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 62, - "end_line": 62, + "line": 65, + "end_line": 65, "column": 8, "end_column": 10 }, @@ -2749,8 +2814,8 @@ "_type": "StringConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 62, - "end_line": 62, + "line": 65, + "end_line": 65, "column": 13, "end_column": 29 }, @@ -2793,8 +2858,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 63, - "end_line": 63, + "line": 66, + "end_line": 66, "column": 2, "end_column": 31 }, @@ -2802,8 +2867,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 63, - "end_line": 63, + "line": 66, + "end_line": 66, "column": 2, "end_column": 31 }, @@ -2818,8 +2883,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 63, - "end_line": 63, + "line": 66, + "end_line": 66, "column": 9, "end_column": 30 }, @@ -2834,8 +2899,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 63, - "end_line": 63, + "line": 66, + "end_line": 66, "column": 12, "end_column": 18 }, @@ -2850,8 +2915,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 63, - "end_line": 63, + "line": 66, + "end_line": 66, "column": 9, "end_column": 11 }, @@ -2895,8 +2960,8 @@ "_type": "StringConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 63, - "end_line": 63, + "line": 66, + "end_line": 66, "column": 23, "end_column": 30 }, @@ -2917,8 +2982,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, + "line": 68, + "end_line": 68, "column": 8, "end_column": 27 }, @@ -2926,8 +2991,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, + "line": 68, + "end_line": 68, "column": 8, "end_column": 16 }, @@ -2944,8 +3009,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, + "line": 68, + "end_line": 68, "column": 22, "end_column": 27 }, @@ -2960,8 +3025,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 65, - "end_line": 65, + "line": 68, + "end_line": 68, "column": 19, "end_column": 21 }, @@ -3005,8 +3070,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 67, - "end_line": 67, + "line": 70, + "end_line": 70, "column": 8, "end_column": 54 }, @@ -3014,8 +3079,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 67, - "end_line": 67, + "line": 70, + "end_line": 70, "column": 8, "end_column": 21 }, @@ -3057,8 +3122,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 67, - "end_line": 67, + "line": 70, + "end_line": 70, "column": 24, "end_column": 54 }, @@ -3098,8 +3163,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 67, - "end_line": 67, + "line": 70, + "end_line": 70, "column": 45, "end_column": 53 }, @@ -3118,8 +3183,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 69, + "line": 72, + "end_line": 72, "column": 2, "end_column": 30 }, @@ -3127,8 +3192,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 69, + "line": 72, + "end_line": 72, "column": 2, "end_column": 30 }, @@ -3143,8 +3208,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 69, + "line": 72, + "end_line": 72, "column": 9, "end_column": 29 }, @@ -3159,8 +3224,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 69, + "line": 72, + "end_line": 72, "column": 9, "end_column": 29 }, @@ -3175,8 +3240,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 69, + "line": 72, + "end_line": 72, "column": 9, "end_column": 11 }, @@ -3220,8 +3285,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 69, + "line": 72, + "end_line": 72, "column": 9, "end_column": 29 }, @@ -3236,8 +3301,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 69, - "end_line": 69, + "line": 72, + "end_line": 72, "column": 16, "end_column": 29 }, @@ -3297,8 +3362,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 72, - "end_line": 72, + "line": 75, + "end_line": 75, "column": 0, "end_column": 43 }, @@ -3315,8 +3380,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 72, - "end_line": 72, + "line": 75, + "end_line": 75, "column": 26, "end_column": 42 } @@ -3333,8 +3398,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 72, - "end_line": 81, + "line": 75, + "end_line": 84, "column": 44, "end_column": 1 }, @@ -3343,8 +3408,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 76, + "end_line": 76, "column": 8, "end_column": 32 }, @@ -3352,8 +3417,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 76, + "end_line": 76, "column": 8, "end_column": 11 }, @@ -3395,8 +3460,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 73, - "end_line": 73, + "line": 76, + "end_line": 76, "column": 14, "end_column": 32 }, @@ -3440,8 +3505,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 77, + "end_line": 77, "column": 2, "end_column": 67 }, @@ -3449,8 +3514,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 77, + "end_line": 77, "column": 2, "end_column": 67 }, @@ -3465,8 +3530,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 77, + "end_line": 77, "column": 9, "end_column": 31 }, @@ -3481,8 +3546,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 77, + "end_line": 77, "column": 13, "end_column": 19 }, @@ -3497,8 +3562,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 77, + "end_line": 77, "column": 9, "end_column": 12 }, @@ -3542,8 +3607,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 74, - "end_line": 74, + "line": 77, + "end_line": 77, "column": 24, "end_column": 31 }, @@ -3565,8 +3630,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 78, + "end_line": 78, "column": 2, "end_column": 95 }, @@ -3574,8 +3639,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 78, + "end_line": 78, "column": 2, "end_column": 95 }, @@ -3590,8 +3655,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 78, + "end_line": 78, "column": 9, "end_column": 45 }, @@ -3606,8 +3671,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 78, + "end_line": 78, "column": 13, "end_column": 18 }, @@ -3622,8 +3687,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 78, + "end_line": 78, "column": 9, "end_column": 12 }, @@ -3667,8 +3732,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 78, + "end_line": 78, "column": 40, "end_column": 45 }, @@ -3683,8 +3748,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 75, - "end_line": 75, + "line": 78, + "end_line": 78, "column": 23, "end_column": 39 }, @@ -3716,8 +3781,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 76, - "end_line": 76, + "line": 79, + "end_line": 79, "column": 8, "end_column": 41 }, @@ -3725,8 +3790,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 76, - "end_line": 76, + "line": 79, + "end_line": 79, "column": 8, "end_column": 11 }, @@ -3768,8 +3833,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 76, - "end_line": 76, + "line": 79, + "end_line": 79, "column": 14, "end_column": 41 }, @@ -3809,8 +3874,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 76, - "end_line": 76, + "line": 79, + "end_line": 79, "column": 31, "end_column": 40 }, @@ -3829,8 +3894,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 77, - "end_line": 77, + "line": 80, + "end_line": 80, "column": 2, "end_column": 34 }, @@ -3838,8 +3903,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 77, - "end_line": 77, + "line": 80, + "end_line": 80, "column": 2, "end_column": 34 }, @@ -3854,8 +3919,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 77, - "end_line": 77, + "line": 80, + "end_line": 80, "column": 9, "end_column": 33 }, @@ -3870,8 +3935,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 77, - "end_line": 77, + "line": 80, + "end_line": 80, "column": 13, "end_column": 19 }, @@ -3886,8 +3951,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 77, - "end_line": 77, + "line": 80, + "end_line": 80, "column": 9, "end_column": 12 }, @@ -3931,8 +3996,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 77, - "end_line": 77, + "line": 80, + "end_line": 80, "column": 24, "end_column": 33 }, @@ -3953,8 +4018,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 79, - "end_line": 79, + "line": 82, + "end_line": 82, "column": 8, "end_column": 39 }, @@ -3962,8 +4027,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 79, - "end_line": 79, + "line": 82, + "end_line": 82, "column": 8, "end_column": 11 }, @@ -4005,8 +4070,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 79, - "end_line": 79, + "line": 82, + "end_line": 82, "column": 14, "end_column": 39 }, @@ -4050,8 +4115,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 80, - "end_line": 80, + "line": 83, + "end_line": 83, "column": 2, "end_column": 39 }, @@ -4059,8 +4124,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 80, - "end_line": 80, + "line": 83, + "end_line": 83, "column": 2, "end_column": 39 }, @@ -4075,8 +4140,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 80, - "end_line": 80, + "line": 83, + "end_line": 83, "column": 9, "end_column": 38 }, @@ -4091,8 +4156,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 80, - "end_line": 80, + "line": 83, + "end_line": 83, "column": 13, "end_column": 19 }, @@ -4107,8 +4172,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 80, - "end_line": 80, + "line": 83, + "end_line": 83, "column": 9, "end_column": 12 }, @@ -4152,8 +4217,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 80, - "end_line": 80, + "line": 83, + "end_line": 83, "column": 30, "end_column": 37 }, @@ -4188,8 +4253,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 83, - "end_line": 83, + "line": 86, + "end_line": 86, "column": 0, "end_column": 26 }, @@ -4205,8 +4270,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 83, - "end_line": 87, + "line": 86, + "end_line": 90, "column": 27, "end_column": 1 }, @@ -4215,8 +4280,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 84, - "end_line": 84, + "line": 87, + "end_line": 87, "column": 8, "end_column": 30 }, @@ -4224,8 +4289,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 84, - "end_line": 84, + "line": 87, + "end_line": 87, "column": 8, "end_column": 10 }, @@ -4268,8 +4333,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 84, - "end_line": 84, + "line": 87, + "end_line": 87, "column": 13, "end_column": 30 }, @@ -4314,8 +4379,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 85, - "end_line": 85, + "line": 88, + "end_line": 88, "column": 8, "end_column": 33 }, @@ -4323,8 +4388,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 85, - "end_line": 85, + "line": 88, + "end_line": 88, "column": 8, "end_column": 10 }, @@ -4367,8 +4432,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 85, - "end_line": 85, + "line": 88, + "end_line": 88, "column": 13, "end_column": 33 }, @@ -4413,8 +4478,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 86, - "end_line": 86, + "line": 89, + "end_line": 89, "column": 8, "end_column": 60 }, @@ -4422,8 +4487,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 86, - "end_line": 86, + "line": 89, + "end_line": 89, "column": 8, "end_column": 10 }, @@ -4466,8 +4531,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 86, - "end_line": 86, + "line": 89, + "end_line": 89, "column": 13, "end_column": 60 }, @@ -4525,8 +4590,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 92, + "line": 95, + "end_line": 95, "column": 0, "end_column": 34 }, @@ -4552,8 +4617,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 92, + "line": 95, + "end_line": 95, "column": 20, "end_column": 33 } @@ -4570,8 +4635,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 92, - "end_line": 104, + "line": 95, + "end_line": 107, "column": 35, "end_column": 1 }, @@ -4580,8 +4645,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 96, + "end_line": 96, "column": 8, "end_column": 43 }, @@ -4589,8 +4654,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 96, + "end_line": 96, "column": 8, "end_column": 15 }, @@ -4626,8 +4691,8 @@ "_type": "NewArray", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 96, + "end_line": 96, "column": 18, "end_column": 43 }, @@ -4657,8 +4722,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 96, + "end_line": 96, "column": 18, "end_column": 43 } @@ -4668,8 +4733,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 96, + "end_line": 96, "column": 35, "end_column": 36 }, @@ -4695,8 +4760,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 96, + "end_line": 96, "column": 38, "end_column": 39 }, @@ -4722,8 +4787,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 93, - "end_line": 93, + "line": 96, + "end_line": 96, "column": 41, "end_column": 42 }, @@ -4752,8 +4817,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 95, - "end_line": 95, + "line": 98, + "end_line": 98, "column": 2, "end_column": 17 }, @@ -4761,8 +4826,8 @@ "_type": "ArrayExtend", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 95, - "end_line": 95, + "line": 98, + "end_line": 98, "column": 2, "end_column": 17 }, @@ -4796,8 +4861,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 95, - "end_line": 95, + "line": 98, + "end_line": 98, "column": 2, "end_column": 9 }, @@ -4833,8 +4898,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 95, - "end_line": 95, + "line": 98, + "end_line": 98, "column": 2, "end_column": 17 }, @@ -4868,8 +4933,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 95, - "end_line": 95, + "line": 98, + "end_line": 98, "column": 15, "end_column": 16 }, @@ -4899,8 +4964,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 97, - "end_line": 97, + "line": 100, + "end_line": 100, "column": 8, "end_column": 40 }, @@ -4908,8 +4973,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 97, - "end_line": 97, + "line": 100, + "end_line": 100, "column": 8, "end_column": 16 }, @@ -4946,8 +5011,8 @@ "_type": "NewArray", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 97, - "end_line": 97, + "line": 100, + "end_line": 100, "column": 19, "end_column": 40 }, @@ -4983,8 +5048,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 97, - "end_line": 97, + "line": 100, + "end_line": 100, "column": 35, "end_column": 36 }, @@ -5010,8 +5075,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 97, - "end_line": 97, + "line": 100, + "end_line": 100, "column": 38, "end_column": 39 }, @@ -5040,8 +5105,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 99, - "end_line": 99, + "line": 102, + "end_line": 102, "column": 2, "end_column": 39 }, @@ -5049,8 +5114,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 99, - "end_line": 99, + "line": 102, + "end_line": 102, "column": 2, "end_column": 39 }, @@ -5065,8 +5130,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 99, - "end_line": 99, + "line": 102, + "end_line": 102, "column": 9, "end_column": 38 }, @@ -5081,8 +5146,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 99, - "end_line": 99, + "line": 102, + "end_line": 102, "column": 9, "end_column": 38 }, @@ -5097,8 +5162,8 @@ "_type": "IndexExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 99, - "end_line": 99, + "line": 102, + "end_line": 102, "column": 9, "end_column": 20 }, @@ -5122,8 +5187,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 99, - "end_line": 99, + "line": 102, + "end_line": 102, "column": 9, "end_column": 17 }, @@ -5160,8 +5225,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 99, - "end_line": 99, + "line": 102, + "end_line": 102, "column": 18, "end_column": 19 }, @@ -5182,8 +5247,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 99, - "end_line": 99, + "line": 102, + "end_line": 102, "column": 9, "end_column": 38 }, @@ -5198,8 +5263,8 @@ "_type": "ArrayPop", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 99, - "end_line": 99, + "line": 102, + "end_line": 102, "column": 25, "end_column": 38 }, @@ -5223,8 +5288,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 99, - "end_line": 99, + "line": 102, + "end_line": 102, "column": 25, "end_column": 32 }, @@ -5266,8 +5331,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 101, - "end_line": 101, + "line": 104, + "end_line": 104, "column": 2, "end_column": 33 }, @@ -5275,8 +5340,8 @@ "_type": "IndexExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 101, - "end_line": 101, + "line": 104, + "end_line": 104, "column": 2, "end_column": 13 }, @@ -5300,8 +5365,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 101, - "end_line": 101, + "line": 104, + "end_line": 104, "column": 2, "end_column": 10 }, @@ -5338,8 +5403,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 101, - "end_line": 101, + "line": 104, + "end_line": 104, "column": 11, "end_column": 12 }, @@ -5358,8 +5423,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 101, - "end_line": 101, + "line": 104, + "end_line": 104, "column": 16, "end_column": 33 }, @@ -5387,8 +5452,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 103, - "end_line": 103, + "line": 106, + "end_line": 106, "column": 8, "end_column": 59 }, @@ -5396,8 +5461,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 103, - "end_line": 103, + "line": 106, + "end_line": 106, "column": 8, "end_column": 17 }, @@ -5434,8 +5499,8 @@ "_type": "NewArray", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 103, - "end_line": 103, + "line": 106, + "end_line": 106, "column": 20, "end_column": 59 }, @@ -5471,8 +5536,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 103, - "end_line": 103, + "line": 106, + "end_line": 106, "column": 51, "end_column": 52 }, @@ -5498,8 +5563,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 103, - "end_line": 103, + "line": 106, + "end_line": 106, "column": 54, "end_column": 55 }, @@ -5525,8 +5590,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 103, - "end_line": 103, + "line": 106, + "end_line": 106, "column": 57, "end_column": 58 }, @@ -5568,8 +5633,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 106, - "end_line": 106, + "line": 109, + "end_line": 109, "column": 0, "end_column": 19 }, @@ -5585,8 +5650,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 106, - "end_line": 110, + "line": 109, + "end_line": 113, "column": 20, "end_column": 1 }, @@ -5595,8 +5660,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 107, - "end_line": 107, + "line": 110, + "end_line": 110, "column": 8, "end_column": 22 }, @@ -5604,8 +5669,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 107, - "end_line": 107, + "line": 110, + "end_line": 110, "column": 8, "end_column": 9 }, @@ -5631,8 +5696,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 107, - "end_line": 107, + "line": 110, + "end_line": 110, "column": 12, "end_column": 22 }, @@ -5660,8 +5725,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 108, - "end_line": 108, + "line": 111, + "end_line": 111, "column": 8, "end_column": 24 }, @@ -5669,8 +5734,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 108, - "end_line": 108, + "line": 111, + "end_line": 111, "column": 8, "end_column": 10 }, @@ -5696,8 +5761,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 108, - "end_line": 108, + "line": 111, + "end_line": 111, "column": 13, "end_column": 24 }, @@ -5725,8 +5790,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 109, - "end_line": 109, + "line": 112, + "end_line": 112, "column": 2, "end_column": 18 }, @@ -5734,8 +5799,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 109, - "end_line": 109, + "line": 112, + "end_line": 112, "column": 2, "end_column": 18 }, @@ -5750,8 +5815,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 109, - "end_line": 109, + "line": 112, + "end_line": 112, "column": 9, "end_column": 17 }, @@ -5766,8 +5831,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 109, - "end_line": 109, + "line": 112, + "end_line": 112, "column": 9, "end_column": 17 }, @@ -5782,8 +5847,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 109, - "end_line": 109, + "line": 112, + "end_line": 112, "column": 9, "end_column": 10 }, @@ -5811,8 +5876,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 109, - "end_line": 109, + "line": 112, + "end_line": 112, "column": 9, "end_column": 17 }, @@ -5827,8 +5892,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 109, - "end_line": 109, + "line": 112, + "end_line": 112, "column": 15, "end_column": 17 }, @@ -5872,8 +5937,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 112, - "end_line": 112, + "line": 115, + "end_line": 115, "column": 0, "end_column": 22 }, @@ -5889,8 +5954,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 112, - "end_line": 119, + "line": 115, + "end_line": 122, "column": 23, "end_column": 1 }, @@ -5899,8 +5964,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 113, - "end_line": 113, + "line": 116, + "end_line": 116, "column": 8, "end_column": 25 }, @@ -5908,8 +5973,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 113, - "end_line": 113, + "line": 116, + "end_line": 116, "column": 8, "end_column": 9 }, @@ -5952,8 +6017,8 @@ "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 113, - "end_line": 113, + "line": 116, + "end_line": 116, "column": 12, "end_column": 25 }, @@ -5997,8 +6062,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 114, - "end_line": 114, + "line": 117, + "end_line": 117, "column": 8, "end_column": 35 }, @@ -6006,8 +6071,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 114, - "end_line": 114, + "line": 117, + "end_line": 117, "column": 8, "end_column": 9 }, @@ -6050,8 +6115,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 114, - "end_line": 114, + "line": 117, + "end_line": 117, "column": 12, "end_column": 35 }, @@ -6092,8 +6157,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 114, - "end_line": 114, + "line": 117, + "end_line": 117, "column": 28, "end_column": 34 }, @@ -6116,8 +6181,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 116, - "end_line": 116, + "line": 119, + "end_line": 119, "column": 2, "end_column": 57 }, @@ -6125,8 +6190,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 116, - "end_line": 116, + "line": 119, + "end_line": 119, "column": 2, "end_column": 57 }, @@ -6141,8 +6206,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 116, - "end_line": 116, + "line": 119, + "end_line": 119, "column": 9, "end_column": 16 }, @@ -6157,8 +6222,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 116, - "end_line": 116, + "line": 119, + "end_line": 119, "column": 9, "end_column": 16 }, @@ -6173,8 +6238,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 116, - "end_line": 116, + "line": 119, + "end_line": 119, "column": 9, "end_column": 10 }, @@ -6219,8 +6284,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 116, - "end_line": 116, + "line": 119, + "end_line": 119, "column": 9, "end_column": 16 }, @@ -6235,8 +6300,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 116, - "end_line": 116, + "line": 119, + "end_line": 119, "column": 15, "end_column": 16 }, @@ -6284,8 +6349,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 117, - "end_line": 117, + "line": 120, + "end_line": 120, "column": 2, "end_column": 64 }, @@ -6293,8 +6358,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 117, - "end_line": 117, + "line": 120, + "end_line": 120, "column": 2, "end_column": 64 }, @@ -6309,8 +6374,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 117, - "end_line": 117, + "line": 120, + "end_line": 120, "column": 9, "end_column": 28 }, @@ -6325,8 +6390,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 117, - "end_line": 117, + "line": 120, + "end_line": 120, "column": 9, "end_column": 28 }, @@ -6341,8 +6406,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 117, - "end_line": 117, + "line": 120, + "end_line": 120, "column": 9, "end_column": 10 }, @@ -6387,8 +6452,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 117, - "end_line": 117, + "line": 120, + "end_line": 120, "column": 9, "end_column": 28 }, @@ -6403,8 +6468,8 @@ "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 117, - "end_line": 117, + "line": 120, + "end_line": 120, "column": 15, "end_column": 28 }, @@ -6452,8 +6517,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 118, - "end_line": 118, + "line": 121, + "end_line": 121, "column": 2, "end_column": 73 }, @@ -6461,8 +6526,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 118, - "end_line": 118, + "line": 121, + "end_line": 121, "column": 2, "end_column": 73 }, @@ -6477,8 +6542,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 118, - "end_line": 118, + "line": 121, + "end_line": 121, "column": 9, "end_column": 28 }, @@ -6493,8 +6558,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 118, - "end_line": 118, + "line": 121, + "end_line": 121, "column": 9, "end_column": 28 }, @@ -6509,8 +6574,8 @@ "_type": "IndexExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 118, - "end_line": 118, + "line": 121, + "end_line": 121, "column": 9, "end_column": 13 }, @@ -6534,8 +6599,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 118, - "end_line": 118, + "line": 121, + "end_line": 121, "column": 9, "end_column": 10 }, @@ -6578,8 +6643,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 118, - "end_line": 118, + "line": 121, + "end_line": 121, "column": 11, "end_column": 12 }, @@ -6600,8 +6665,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 118, - "end_line": 118, + "line": 121, + "end_line": 121, "column": 9, "end_column": 28 }, @@ -6616,8 +6681,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 118, - "end_line": 118, + "line": 121, + "end_line": 121, "column": 18, "end_column": 28 }, @@ -6662,8 +6727,8 @@ "_type": "Subroutine", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 121, - "end_line": 121, + "line": 124, + "end_line": 124, "column": 0, "end_column": 20 }, @@ -6679,8 +6744,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 121, - "end_line": 128, + "line": 124, + "end_line": 131, "column": 21, "end_column": 1 }, @@ -6689,8 +6754,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 122, - "end_line": 122, + "line": 125, + "end_line": 125, "column": 8, "end_column": 41 }, @@ -6698,8 +6763,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 122, - "end_line": 122, + "line": 125, + "end_line": 125, "column": 8, "end_column": 9 }, @@ -6737,8 +6802,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 122, - "end_line": 122, + "line": 125, + "end_line": 125, "column": 12, "end_column": 41 }, @@ -6770,8 +6835,8 @@ ], "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 122, - "end_line": 122, + "line": 125, + "end_line": 125, "column": 12, "end_column": 41 } @@ -6780,8 +6845,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 122, - "end_line": 122, + "line": 125, + "end_line": 125, "column": 12, "end_column": 41 }, @@ -6815,8 +6880,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 122, - "end_line": 122, + "line": 125, + "end_line": 125, "column": 22, "end_column": 40 }, @@ -6847,8 +6912,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 123, - "end_line": 123, + "line": 126, + "end_line": 126, "column": 8, "end_column": 27 }, @@ -6856,8 +6921,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 123, - "end_line": 123, + "line": 126, + "end_line": 126, "column": 8, "end_column": 17 }, @@ -6883,8 +6948,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 123, - "end_line": 123, + "line": 126, + "end_line": 126, "column": 20, "end_column": 27 }, @@ -6908,8 +6973,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 123, - "end_line": 123, + "line": 126, + "end_line": 126, "column": 20, "end_column": 21 }, @@ -6950,8 +7015,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, + "line": 127, + "end_line": 127, "column": 8, "end_column": 38 }, @@ -6959,8 +7024,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, + "line": 127, + "end_line": 127, "column": 8, "end_column": 24 }, @@ -6986,8 +7051,8 @@ "_type": "TupleItemExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, + "line": 127, + "end_line": 127, "column": 27, "end_column": 38 }, @@ -7011,8 +7076,8 @@ "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, + "line": 127, + "end_line": 127, "column": 29, "end_column": 35 }, @@ -7045,8 +7110,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 124, - "end_line": 124, + "line": 127, + "end_line": 127, "column": 27, "end_column": 28 }, @@ -7088,8 +7153,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 125, - "end_line": 125, + "line": 128, + "end_line": 128, "column": 2, "end_column": 40 }, @@ -7097,8 +7162,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 125, - "end_line": 125, + "line": 128, + "end_line": 128, "column": 2, "end_column": 40 }, @@ -7113,8 +7178,8 @@ "_type": "BytesComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 125, - "end_line": 125, + "line": 128, + "end_line": 128, "column": 9, "end_column": 39 }, @@ -7129,8 +7194,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 125, - "end_line": 125, + "line": 128, + "end_line": 128, "column": 9, "end_column": 39 }, @@ -7145,8 +7210,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 125, - "end_line": 125, + "line": 128, + "end_line": 128, "column": 9, "end_column": 18 }, @@ -7174,8 +7239,8 @@ "_type": "ReinterpretCast", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 125, - "end_line": 125, + "line": 128, + "end_line": 128, "column": 9, "end_column": 39 }, @@ -7190,8 +7255,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 125, - "end_line": 125, + "line": 128, + "end_line": 128, "column": 23, "end_column": 39 }, @@ -7222,8 +7287,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 126, - "end_line": 126, + "line": 129, + "end_line": 129, "column": 8, "end_column": 49 }, @@ -7231,8 +7296,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 126, - "end_line": 126, + "line": 129, + "end_line": 129, "column": 8, "end_column": 10 }, @@ -7303,8 +7368,8 @@ "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 126, - "end_line": 126, + "line": 129, + "end_line": 129, "column": 13, "end_column": 49 }, @@ -7369,8 +7434,8 @@ ], "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 126, - "end_line": 126, + "line": 129, + "end_line": 129, "column": 13, "end_column": 49 } @@ -7379,8 +7444,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 126, - "end_line": 126, + "line": 129, + "end_line": 129, "column": 13, "end_column": 49 }, @@ -7447,8 +7512,8 @@ "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 126, - "end_line": 126, + "line": 129, + "end_line": 129, "column": 23, "end_column": 36 }, @@ -7491,8 +7556,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 126, - "end_line": 126, + "line": 129, + "end_line": 129, "column": 38, "end_column": 48 }, @@ -7523,8 +7588,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 127, - "end_line": 127, + "line": 130, + "end_line": 130, "column": 2, "end_column": 25 }, @@ -7532,8 +7597,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 127, - "end_line": 127, + "line": 130, + "end_line": 130, "column": 2, "end_column": 25 }, @@ -7548,8 +7613,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 127, - "end_line": 127, + "line": 130, + "end_line": 130, "column": 9, "end_column": 24 }, @@ -7564,8 +7629,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 127, - "end_line": 127, + "line": 130, + "end_line": 130, "column": 12, "end_column": 18 }, @@ -7584,8 +7649,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 127, - "end_line": 127, + "line": 130, + "end_line": 130, "column": 23, "end_column": 24 }, @@ -7620,8 +7685,8 @@ "_type": "Contract", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 130, - "end_line": 130, + "line": 133, + "end_line": 133, "column": 0, "end_column": 57 }, @@ -7635,8 +7700,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 135, - "end_line": 135, + "line": 138, + "end_line": 138, "column": 2, "end_column": 35 }, @@ -7783,8 +7848,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 135, - "end_line": 150, + "line": 138, + "end_line": 153, "column": 36, "end_column": 3 }, @@ -7793,8 +7858,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 136, - "end_line": 136, + "line": 139, + "end_line": 139, "column": 10, "end_column": 30 }, @@ -7802,8 +7867,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 136, - "end_line": 136, + "line": 139, + "end_line": 139, "column": 10, "end_column": 11 }, @@ -7829,8 +7894,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 136, - "end_line": 136, + "line": 139, + "end_line": 139, "column": 14, "end_column": 30 }, @@ -7858,8 +7923,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 137, - "end_line": 137, + "line": 140, + "end_line": 140, "column": 4, "end_column": 13 }, @@ -7867,8 +7932,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 137, - "end_line": 137, + "line": 140, + "end_line": 140, "column": 4, "end_column": 13 }, @@ -7890,8 +7955,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 138, - "end_line": 138, + "line": 141, + "end_line": 141, "column": 4, "end_column": 39 }, @@ -7899,8 +7964,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 138, - "end_line": 138, + "line": 141, + "end_line": 141, "column": 4, "end_column": 39 }, @@ -7923,8 +7988,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 138, - "end_line": 138, + "line": 141, + "end_line": 141, "column": 14, "end_column": 15 }, @@ -7946,8 +8011,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 138, - "end_line": 138, + "line": 141, + "end_line": 141, "column": 17, "end_column": 19 }, @@ -7969,8 +8034,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 138, - "end_line": 138, + "line": 141, + "end_line": 141, "column": 21, "end_column": 38 }, @@ -8001,8 +8066,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 139, - "end_line": 139, + "line": 142, + "end_line": 142, "column": 4, "end_column": 16 }, @@ -8010,8 +8075,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 139, - "end_line": 139, + "line": 142, + "end_line": 142, "column": 4, "end_column": 16 }, @@ -8033,8 +8098,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 140, - "end_line": 140, + "line": 143, + "end_line": 143, "column": 4, "end_column": 14 }, @@ -8042,8 +8107,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 140, - "end_line": 140, + "line": 143, + "end_line": 143, "column": 4, "end_column": 14 }, @@ -8065,8 +8130,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 141, - "end_line": 141, + "line": 144, + "end_line": 144, "column": 4, "end_column": 33 }, @@ -8074,8 +8139,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 141, - "end_line": 141, + "line": 144, + "end_line": 144, "column": 4, "end_column": 33 }, @@ -8098,8 +8163,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 141, - "end_line": 141, + "line": 144, + "end_line": 144, "column": 15, "end_column": 32 }, @@ -8130,8 +8195,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 142, - "end_line": 142, + "line": 145, + "end_line": 145, "column": 4, "end_column": 17 }, @@ -8139,8 +8204,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 142, - "end_line": 142, + "line": 145, + "end_line": 145, "column": 4, "end_column": 17 }, @@ -8162,8 +8227,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 143, - "end_line": 143, + "line": 146, + "end_line": 146, "column": 4, "end_column": 15 }, @@ -8171,8 +8236,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 143, - "end_line": 143, + "line": 146, + "end_line": 146, "column": 4, "end_column": 15 }, @@ -8194,8 +8259,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 144, - "end_line": 144, + "line": 147, + "end_line": 147, "column": 4, "end_column": 16 }, @@ -8203,8 +8268,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 144, - "end_line": 144, + "line": 147, + "end_line": 147, "column": 4, "end_column": 16 }, @@ -8226,8 +8291,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 145, - "end_line": 145, + "line": 148, + "end_line": 148, "column": 4, "end_column": 41 }, @@ -8235,8 +8300,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 145, - "end_line": 145, + "line": 148, + "end_line": 148, "column": 4, "end_column": 41 }, @@ -8259,8 +8324,8 @@ "_type": "BytesConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 145, - "end_line": 145, + "line": 148, + "end_line": 148, "column": 27, "end_column": 39 }, @@ -8282,8 +8347,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 146, - "end_line": 146, + "line": 149, + "end_line": 149, "column": 4, "end_column": 21 }, @@ -8291,8 +8356,8 @@ "_type": "SubroutineCallExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 146, - "end_line": 146, + "line": 149, + "end_line": 149, "column": 4, "end_column": 21 }, @@ -8314,8 +8379,8 @@ "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 147, - "end_line": 147, + "line": 150, + "end_line": 150, "column": 10, "end_column": 58 }, @@ -8323,8 +8388,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 147, - "end_line": 147, + "line": 150, + "end_line": 150, "column": 10, "end_column": 16 }, @@ -8360,8 +8425,8 @@ "_type": "NewArray", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 147, - "end_line": 147, + "line": 150, + "end_line": 150, "column": 19, "end_column": 58 }, @@ -8391,8 +8456,8 @@ }, "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 147, - "end_line": 147, + "line": 150, + "end_line": 150, "column": 19, "end_column": 58 } @@ -8404,8 +8469,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 148, - "end_line": 148, + "line": 151, + "end_line": 151, "column": 4, "end_column": 31 }, @@ -8413,8 +8478,8 @@ "_type": "AssertExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 148, - "end_line": 148, + "line": 151, + "end_line": 151, "column": 4, "end_column": 31 }, @@ -8429,8 +8494,8 @@ "_type": "NumericComparisonExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 148, - "end_line": 148, + "line": 151, + "end_line": 151, "column": 11, "end_column": 30 }, @@ -8445,8 +8510,8 @@ "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 148, - "end_line": 148, + "line": 151, + "end_line": 151, "column": 18, "end_column": 24 }, @@ -8464,8 +8529,8 @@ "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 148, - "end_line": 148, + "line": 151, + "end_line": 151, "column": 11, "end_column": 17 }, @@ -8501,8 +8566,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 148, - "end_line": 148, + "line": 151, + "end_line": 151, "column": 18, "end_column": 24 }, @@ -8523,8 +8588,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 148, - "end_line": 148, + "line": 151, + "end_line": 151, "column": 29, "end_column": 30 }, @@ -8546,8 +8611,8 @@ "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 149, - "end_line": 149, + "line": 152, + "end_line": 152, "column": 4, "end_column": 15 }, @@ -8555,8 +8620,8 @@ "_type": "BoolConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 149, - "end_line": 149, + "line": 152, + "end_line": 152, "column": 11, "end_column": 15 }, @@ -8666,8 +8731,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 131, - "end_line": 131, + "line": 134, + "end_line": 134, "column": 2, "end_column": 51 }, @@ -8750,8 +8815,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 131, - "end_line": 133, + "line": 134, + "end_line": 136, "column": 52, "end_column": 3 }, @@ -8760,8 +8825,8 @@ "_type": "ReturnStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 132, - "end_line": 132, + "line": 135, + "end_line": 135, "column": 4, "end_column": 54 }, @@ -8769,8 +8834,8 @@ "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 132, - "end_line": 132, + "line": 135, + "end_line": 135, "column": 11, "end_column": 54 }, @@ -8853,8 +8918,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 132, - "end_line": 132, + "line": 135, + "end_line": 135, "column": 12, "end_column": 22 }, @@ -8881,8 +8946,8 @@ "_type": "IntegerConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 132, - "end_line": 132, + "line": 135, + "end_line": 135, "column": 24, "end_column": 38 }, @@ -8909,8 +8974,8 @@ "_type": "AddressConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 132, - "end_line": 132, + "line": 135, + "end_line": 135, "column": 40, "end_column": 53 }, @@ -8970,8 +9035,8 @@ "_type": "ContractMethod", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 130, - "end_line": 130, + "line": 133, + "end_line": 133, "column": 0, "end_column": 57 }, @@ -8987,8 +9052,8 @@ "_type": "Block", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 130, - "end_line": 130, + "line": 133, + "end_line": 133, "column": 0, "end_column": 57 }, @@ -8997,8 +9062,8 @@ "_type": "ExpressionStatement", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 130, - "end_line": 130, + "line": 133, + "end_line": 133, "column": 0, "end_column": 57 }, @@ -9006,8 +9071,8 @@ "_type": "VoidConstant", "source_location": { "file": "tests/approvals/arc4-types.algo.ts", - "line": 130, - "end_line": 130, + "line": 133, + "end_line": 133, "column": 0, "end_column": 57 }, diff --git a/tests/onchain/util/test-fixture.ts b/tests/onchain/util/test-fixture.ts index 28c9a035..a9a46a2c 100644 --- a/tests/onchain/util/test-fixture.ts +++ b/tests/onchain/util/test-fixture.ts @@ -1,6 +1,7 @@ import type { AlgorandClient } from '@algorandfoundation/algokit-utils' import { Config, microAlgos } from '@algorandfoundation/algokit-utils' import { algorandFixture } from '@algorandfoundation/algokit-utils/testing' +import type { AlgoAmount } from '@algorandfoundation/algokit-utils/types/amount' import type { SendAppTransactionResult } from '@algorandfoundation/algokit-utils/types/app' import type { AppClient } from '@algorandfoundation/algokit-utils/types/app-client' import type { AppFactory, AppFactoryDeployParams } from '@algorandfoundation/algokit-utils/types/app-factory' @@ -66,6 +67,7 @@ type ProgramInvokeOptions = { | OnApplicationComplete.DeleteApplicationOC senderAddr?: string args?: Uint8Array[] + extraFee?: AlgoAmount } type ProgramInvoker = { @@ -107,6 +109,7 @@ export function createBaseTestFixture(path: stri clearStateProgram, sender: options?.senderAddr ?? localnet.context.testAccount.addr, args: options?.args ?? [], + extraFee: options?.extraFee, } return localnet.algorand.send.appCall(common as DeliberateAny) },