diff --git a/packages/algo-ts/package-lock.json b/packages/algo-ts/package-lock.json index b1535807..2279f273 100644 --- a/packages/algo-ts/package-lock.json +++ b/packages/algo-ts/package-lock.json @@ -1,12 +1,12 @@ { "name": "@algorandfoundation/algorand-typescript", - "version": "0.0.1-alpha.6", + "version": "0.0.1-alpha.16", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@algorandfoundation/algorand-typescript", - "version": "0.0.1-alpha.6", + "version": "0.0.1-alpha.16", "devDependencies": { "@eslint/eslintrc": "^3.1.0", "@eslint/js": "^9.11.1", diff --git a/src/awst/nodes.ts b/src/awst/nodes.ts index 212c5e8c..08c02cca 100644 --- a/src/awst/nodes.ts +++ b/src/awst/nodes.ts @@ -1190,11 +1190,13 @@ export class LogicSignature extends RootNode { this.shortName = props.shortName this.program = props.program this.docstring = props.docstring + this.avmVersion = props.avmVersion } id: LogicSigReference shortName: string program: Subroutine docstring: string | null + avmVersion: bigint | null accept(visitor: RootNodeVisitor): T { return visitor.visitLogicSignature(this) } @@ -1263,6 +1265,7 @@ export class Contract extends RootNode { this.appState = props.appState this.stateTotals = props.stateTotals this.reservedScratchSpace = props.reservedScratchSpace + this.avmVersion = props.avmVersion } id: ContractReference name: string @@ -1274,6 +1277,7 @@ export class Contract extends RootNode { appState: Array stateTotals: StateTotals | null reservedScratchSpace: Set + avmVersion: bigint | null accept(visitor: RootNodeVisitor): T { return visitor.visitContract(this) } diff --git a/src/awst/wtypes.ts b/src/awst/wtypes.ts index de4c15cf..86dad2ea 100644 --- a/src/awst/wtypes.ts +++ b/src/awst/wtypes.ts @@ -117,6 +117,7 @@ export namespace wtypes { export class WStructType extends WType { fields: Record + readonly frozen = true constructor({ fields, name }: { fields: Record; name: string }) { super({ @@ -248,8 +249,19 @@ export namespace wtypes { export class ARC4Struct extends ARC4Type { fields: Record sourceLocation: SourceLocation | null + frozen: boolean - constructor({ fields, sourceLocation, name }: { name: string; fields: Record; sourceLocation?: SourceLocation }) { + constructor({ + fields, + sourceLocation, + name, + frozen, + }: { + frozen: boolean + name: string + fields: Record + sourceLocation?: SourceLocation + }) { super({ arc4Name: Object.values(fields) .map((f) => f.arc4Name) @@ -259,6 +271,7 @@ export namespace wtypes { }) this.sourceLocation = sourceLocation ?? null this.fields = fields + this.frozen = frozen } } export class ARC4Tuple extends ARC4Type { diff --git a/src/awst_build/context/awst-build-context.ts b/src/awst_build/context/awst-build-context.ts index dc56eb2f..f5eff158 100644 --- a/src/awst_build/context/awst-build-context.ts +++ b/src/awst_build/context/awst-build-context.ts @@ -9,7 +9,7 @@ import { invariant } from '../../util' import { ConstantStore } from '../constant-store' import type { NodeBuilder } from '../eb' import type { AppStorageDeclaration } from '../models/app-storage-declaration' -import type { ContractClassModel, LogicSig } from '../models/contract-class-model' +import type { ContractClassModel } from '../models/contract-class-model' import { CompilationSet } from '../models/contract-class-model' import type { ContractClassPType, PType } from '../ptypes' import { typeRegistry } from '../type-registry' @@ -17,6 +17,7 @@ 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 { /** @@ -91,7 +92,7 @@ export interface AwstBuildContext { getStorageDefinitionsForContract(contractType: ContractClassPType): AppStorageDefinition[] addToCompilationSet(compilationTarget: ContractReference, contract: ContractClassModel): void - addToCompilationSet(compilationTarget: LogicSigReference, logicSig: LogicSig): void + addToCompilationSet(compilationTarget: LogicSigReference, logicSig: LogicSigClassModel): void get compilationSet(): CompilationSet } @@ -238,8 +239,8 @@ class AwstBuildContextImpl implements AwstBuildContext { } addToCompilationSet(compilationTarget: ContractReference, contract: ContractClassModel): void - addToCompilationSet(compilationTarget: LogicSigReference, logicSig: LogicSig): void - addToCompilationSet(compilationTarget: ContractReference | LogicSigReference, contractOrSig: ContractClassModel | LogicSig) { + addToCompilationSet(compilationTarget: LogicSigReference, logicSig: LogicSigClassModel): void + addToCompilationSet(compilationTarget: ContractReference | LogicSigReference, contractOrSig: ContractClassModel | LogicSigClassModel) { if (this.#compilationSet.has(compilationTarget)) { logger.debug(undefined, `${compilationTarget.id} already exists in compilation set`) return diff --git a/src/awst_build/models/contract-class-model.ts b/src/awst_build/models/contract-class-model.ts index 43d44ed9..1b35fa5b 100644 --- a/src/awst_build/models/contract-class-model.ts +++ b/src/awst_build/models/contract-class-model.ts @@ -102,6 +102,7 @@ export class ContractClassModel { stateTotals: this.stateTotals, // TODO: Tally reservedScratchSpace: this.reservedScratchSpace, sourceLocation: this.sourceLocation, + avmVersion: null, // TODO: Allow this to be set with class decorator }) } diff --git a/src/awst_build/models/logic-sig-class-model.ts b/src/awst_build/models/logic-sig-class-model.ts index e5fb7a57..90158a3d 100644 --- a/src/awst_build/models/logic-sig-class-model.ts +++ b/src/awst_build/models/logic-sig-class-model.ts @@ -33,6 +33,7 @@ export class LogicSigClassModel { program: this.program, sourceLocation: this.sourceLocation, docstring: this.description, + avmVersion: null, // TODO: Allow this to be set from class decorator }) } } diff --git a/src/awst_build/ptypes/arc4-types.ts b/src/awst_build/ptypes/arc4-types.ts index 54bf1a22..e6c20e84 100644 --- a/src/awst_build/ptypes/arc4-types.ts +++ b/src/awst_build/ptypes/arc4-types.ts @@ -122,6 +122,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, + frozen: false, }) } diff --git a/tests/approvals/out/arc4-struct/arc4-struct.awst b/tests/approvals/out/arc4-struct/arc4-struct.awst index 8a5e1a32..567b92e5 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst @@ -1,8 +1,48 @@ -subroutine test(): void +contract StructDemo { - 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)) + 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 a72f77d0..acf7b3f7 100644 --- a/tests/approvals/out/arc4-struct/arc4-struct.awst.json +++ b/tests/approvals/out/arc4-struct/arc4-struct.awst.json @@ -1,399 +1,910 @@ [ { - "_type": "Subroutine", + "_type": "Contract", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", "line": 9, "end_line": 9, "column": 0, - "end_column": 15 + "end_column": 35 }, - "args": [], - "return_type": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "body": { - "_type": "Block", + "id": "tests/approvals/arc4-struct.algo.ts::StructDemo", + "name": "StructDemo", + "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": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 9, - "end_line": 15, - "column": 16, + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, "end_column": 1 }, - "body": [ - { - "_type": "AssignmentStatement", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 10, - "end_line": 10, - "column": 8, - "end_column": 71 - }, - "target": { - "_type": "VarExpression", + "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": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 10, - "end_line": 10, - "column": 8, - "end_column": 10 + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 }, - "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" + "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 }, - "y": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "wtype": { + "_type": "WType", + "name": "bool", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { + "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 }, - "arc4_name": "uint64", - "n": "64" + "op_code": "txn", + "immediates": [ + "ApplicationID" + ], + "stack_args": [], + "comment": null } - }, - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 10, - "end_line": 10, - "column": 8, - "end_column": 10 } }, - "name": "v1" + "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 }, - "value": { - "_type": "NewStruct", + { + "_type": "Block", "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 10, - "end_line": 10, - "column": 13, - "end_column": 71 + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 }, - "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" + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 }, - "y": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { + "value": { + "_type": "ARC4Router", + "source_location": { + "_type": "SourceLocation", + "file": null, + "line": 1, + "end_line": 1, + "column": 0, + "end_column": 1 + }, + "wtype": { "_type": "WType", - "name": "uint64", + "name": "bool", "immutable": true, "ephemeral": false, "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" + } } + } + ], + "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-struct.algo.ts", + "line": 10, + "end_line": 10, + "column": 2, + "end_column": 40 + }, + "args": [], + "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": 10, + "end_line": 16, + "column": 41, + "end_column": 3 + }, + "body": [ + { + "_type": "AssignmentStatement", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 10, - "end_line": 10, - "column": 17, - "end_column": 23 - } - }, - "values": { - "x": { - "_type": "FieldExpression", + "line": 11, + "end_line": 11, + "column": 10, + "end_column": 73 + }, + "target": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 10, - "end_line": 10, - "column": 13, - "end_column": 71 + "line": 11, + "end_line": 11, + "column": 10, + "end_column": 12 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "_type": "ARC4Struct", + "name": "Vector", "immutable": true, "ephemeral": false, "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "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" + } }, - "arc4_name": "uint64", - "n": "64" - }, - "base": { - "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 10, - "end_line": 10, - "column": 24, - "end_column": 70 + "line": 11, + "end_line": 11, + "column": 10, + "end_column": 12 }, - "wtype": { - "_type": "WTuple", - "name": "", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "frozen": false + }, + "name": "v1" + }, + "value": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 11, + "end_line": 11, + "column": 15, + "end_column": 73 + }, + "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": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" + "scalar_type": 2 }, - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "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": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - } - ], - "names": [ - "x", - "y" - ] + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 11, + "end_line": 11, + "column": 19, + "end_column": 25 }, - "source": { - "_type": "TupleExpression", + "frozen": false + }, + "values": { + "x": { + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 10, - "end_line": 10, - "column": 24, - "end_column": 70 + "line": 11, + "end_line": 11, + "column": 15, + "end_column": 73 }, "wtype": { - "_type": "WTuple", - "name": "", + "_type": "ARC4UIntN", + "name": "arc4.uint64", "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", + "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": 11, + "end_line": 11, + "column": 26, + "end_column": 72 + }, + "wtype": { + "_type": "WTuple", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "arc4_name": "uint64", - "n": "64" - }, - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - } - ], - "names": [ - "x", - "y" - ] - }, - "items": [ - { - "_type": "IntegerConstant", + "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": 10, - "end_line": 10, - "column": 29, - "end_column": 46 + "line": 11, + "end_line": 11, + "column": 26, + "end_column": 72 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "_type": "WTuple", + "name": "", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + "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": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 11, + "end_line": 11, + "column": 31, + "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" + }, + "value": "0", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 11, + "end_line": 11, + "column": 53, + "end_column": 70 + }, + "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": "0", + "teal_alias": null + } + ] + }, + "id": "0" + }, + "name": "x" + }, + "y": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 11, + "end_line": 11, + "column": 15, + "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" + }, + "base": { + "_type": "SingleEvaluation", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 11, + "end_line": 11, + "column": 26, + "end_column": 72 + }, + "wtype": { + "_type": "WTuple", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "arc4_name": "uint64", - "n": "64" - }, - "value": "0", - "teal_alias": null + { + "_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" + ] }, - { - "_type": "IntegerConstant", + "source": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 10, - "end_line": 10, - "column": 51, - "end_column": 68 + "line": 11, + "end_line": 11, + "column": 26, + "end_column": 72 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "_type": "WTuple", + "name": "", "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": 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": "0", - "teal_alias": null - } - ] - }, - "id": "14" - }, - "name": "x" + "items": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 11, + "end_line": 11, + "column": 31, + "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" + }, + "value": "0", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 11, + "end_line": 11, + "column": 53, + "end_column": 70 + }, + "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": "0", + "teal_alias": null + } + ] + }, + "id": "0" + }, + "name": "y" + } + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 12, + "end_line": 12, + "column": 4, + "end_column": 13 }, - "y": { - "_type": "FieldExpression", + "expr": { + "_type": "IntrinsicCall", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 10, - "end_line": 10, - "column": 13, - "end_column": 71 + "line": 12, + "end_line": 12, + "column": 4, + "end_column": 13 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "_type": "WType", + "name": "void", "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": null }, - "base": { - "_type": "SingleEvaluation", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 10, - "end_line": 10, - "column": 24, - "end_column": 70 - }, - "wtype": { - "_type": "WTuple", - "name": "", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { + "op_code": "log", + "immediates": [], + "stack_args": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 12, + "end_line": 12, + "column": 4, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 12, + "end_line": 12, + "column": 8, + "end_column": 12 + }, + "wtype": { "_type": "ARC4UIntN", "name": "arc4.uint64", "immutable": true, @@ -409,7 +920,129 @@ "arc4_name": "uint64", "n": "64" }, - { + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 12, + "end_line": 12, + "column": 8, + "end_column": 10 + }, + "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": 12, + "end_line": 12, + "column": 8, + "end_column": 10 + }, + "frozen": false + }, + "name": "v1" + }, + "name": "x" + } + } + ], + "comment": null + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 13, + "end_line": 13, + "column": 4, + "end_column": 13 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 13, + "end_line": 13, + "column": 4, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null + }, + "op_code": "log", + "immediates": [], + "stack_args": [ + { + "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 13, + "end_line": 13, + "column": 4, + "end_column": 13 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 + }, + "expr": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 13, + "end_line": 13, + "column": 8, + "end_column": 12 + }, + "wtype": { "_type": "ARC4UIntN", "name": "arc4.uint64", "immutable": true, @@ -424,1079 +1057,1600 @@ }, "arc4_name": "uint64", "n": "64" - } - ], - "names": [ - "x", - "y" - ] - }, - "source": { - "_type": "TupleExpression", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 10, - "end_line": 10, - "column": 24, - "end_column": 70 - }, - "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": "IntegerConstant", + }, + "base": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 10, - "end_line": 10, - "column": 29, - "end_column": 46 + "line": 13, + "end_line": 13, + "column": 8, + "end_column": 10 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "_type": "ARC4Struct", + "name": "Vector", "immutable": true, "ephemeral": false, "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "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": 13, + "end_line": 13, + "column": 8, + "end_column": 10 }, - "arc4_name": "uint64", - "n": "64" + "frozen": false }, - "value": "0", - "teal_alias": null + "name": "v1" }, - { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 10, - "end_line": 10, - "column": 51, - "end_column": 68 - }, - "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": "0", - "teal_alias": null - } - ] - }, - "id": "14" - }, - "name": "y" + "name": "y" + } + } + ], + "comment": null } - } - } - }, - { - "_type": "ExpressionStatement", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 11, - "end_line": 11, - "column": 2, - "end_column": 11 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 11, - "end_line": 11, - "column": 2, - "end_column": 11 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null }, - "op_code": "log", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + { + "_type": "AssignmentStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 10, + "end_column": 73 + }, + "target": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 11, - "end_line": 11, - "column": 2, - "end_column": 11 + "line": 14, + "end_line": 14, + "column": 10, + "end_column": 12 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4Struct", + "name": "Vector", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "FieldExpression", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 11, - "end_line": 11, - "column": 6, - "end_column": 10 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_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-struct.algo.ts", - "line": 11, - "end_line": 11, - "column": 6, - "end_column": 8 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "wtype": { - "_type": "ARC4Struct", - "name": "Vector", + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "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" - } + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 }, - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 11, - "end_line": 11, - "column": 6, - "end_column": 8 - } - }, - "name": "v1" + "arc4_name": "uint64", + "n": "64" + } }, - "name": "x" - } - } - ], - "comment": null - } - }, - { - "_type": "ExpressionStatement", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 12, - "end_line": 12, - "column": 2, - "end_column": 11 - }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 12, - "end_line": 12, - "column": 2, - "end_column": 11 - }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null - }, - "op_code": "log", - "immediates": [], - "stack_args": [ - { - "_type": "ReinterpretCast", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 10, + "end_column": 12 + }, + "frozen": false + }, + "name": "v2" + }, + "value": { + "_type": "NewStruct", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 12, - "end_line": 12, - "column": 2, - "end_column": 11 + "line": 14, + "end_line": 14, + "column": 15, + "end_column": 73 }, "wtype": { - "_type": "WType", - "name": "bytes", + "_type": "ARC4Struct", + "name": "Vector", "immutable": true, "ephemeral": false, - "scalar_type": 1 - }, - "expr": { - "_type": "FieldExpression", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 12, - "end_line": 12, - "column": 6, - "end_column": 10 - }, - "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + "scalar_type": 1, + "native_type": null, + "arc4_name": "uint64,uint64", + "fields": { + "x": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "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" + } }, - "base": { - "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 19, + "end_column": 25 + }, + "frozen": false + }, + "values": { + "x": { + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 12, - "end_line": 12, - "column": 6, - "end_column": 8 + "line": 14, + "end_line": 14, + "column": 15, + "end_column": 73 }, "wtype": { - "_type": "ARC4Struct", - "name": "Vector", + "_type": "ARC4UIntN", + "name": "arc4.uint64", "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", + "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": 14, + "end_line": 14, + "column": 26, + "end_column": 72 + }, + "wtype": { + "_type": "WTuple", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "arc4_name": "uint64", - "n": "64" - }, - "y": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - } + "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_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 12, - "end_line": 12, - "column": 6, - "end_column": 8 - } - }, - "name": "v1" - }, - "name": "y" - } - } - ], - "comment": null - } - }, - { - "_type": "AssignmentStatement", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 8, - "end_column": 71 - }, - "target": { - "_type": "VarExpression", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 8, - "end_column": 10 - }, - "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": 13, - "end_line": 13, - "column": 8, - "end_column": 10 - } - }, - "name": "v2" - }, - "value": { - "_type": "NewStruct", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 13, - "end_column": 71 - }, - "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": 13, - "end_line": 13, - "column": 17, - "end_column": 23 - } - }, - "values": { - "x": { - "_type": "FieldExpression", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 13, - "end_column": 71 - }, - "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": 13, - "end_line": 13, - "column": 24, - "end_column": 70 - }, - "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 + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 72 }, - "arc4_name": "uint64", - "n": "64" - }, - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + "wtype": { + "_type": "WTuple", + "name": "", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "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" + ] }, - "arc4_name": "uint64", - "n": "64" - } - ], - "names": [ - "x", - "y" - ] + "items": [ + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 72 + }, + "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": 14, + "end_line": 14, + "column": 26, + "end_column": 72 + }, + "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": [ + "y", + "x" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 72 + }, + "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": [ + "y", + "x" + ] + }, + "items": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 31, + "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" + }, + "value": "0", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 53, + "end_column": 70 + }, + "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": "0", + "teal_alias": null + } + ] + }, + "id": "1" + }, + "name": "x" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 72 + }, + "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": 14, + "end_line": 14, + "column": 26, + "end_column": 72 + }, + "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": [ + "y", + "x" + ] + }, + "source": { + "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 72 + }, + "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": [ + "y", + "x" + ] + }, + "items": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 31, + "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" + }, + "value": "0", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 53, + "end_column": 70 + }, + "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": "0", + "teal_alias": null + } + ] + }, + "id": "1" + }, + "name": "y" + } + ] + }, + "id": "2" + }, + "name": "x" }, - "source": { - "_type": "TupleExpression", + "y": { + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 24, - "end_column": 70 + "line": 14, + "end_line": 14, + "column": 15, + "end_column": 73 }, "wtype": { - "_type": "WTuple", - "name": "", + "_type": "ARC4UIntN", + "name": "arc4.uint64", "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", + "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": 14, + "end_line": 14, + "column": 26, + "end_column": 72 + }, + "wtype": { + "_type": "WTuple", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "arc4_name": "uint64", - "n": "64" - }, - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - } - ], - "names": [ - "x", - "y" - ] - }, - "items": [ - { - "_type": "FieldExpression", + "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": 13, - "end_line": 13, - "column": 24, - "end_column": 70 + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 72 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "_type": "WTuple", + "name": "", "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": 13, - "end_line": 13, - "column": 24, - "end_column": 70 - }, - "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" + "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 }, - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "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": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - } - ], - "names": [ - "y", - "x" - ] - }, - "source": { - "_type": "TupleExpression", + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "x", + "y" + ] + }, + "items": [ + { + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 24, - "end_column": 70 + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 72 }, "wtype": { - "_type": "WTuple", - "name": "", + "_type": "ARC4UIntN", + "name": "arc4.uint64", "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", + "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": 14, + "end_line": 14, + "column": 26, + "end_column": 72 + }, + "wtype": { + "_type": "WTuple", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "arc4_name": "uint64", - "n": "64" - }, - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - } - ], - "names": [ - "y", - "x" - ] - }, - "items": [ - { - "_type": "IntegerConstant", + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + ], + "names": [ + "y", + "x" + ] + }, + "source": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 29, - "end_column": 46 + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 72 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "_type": "WTuple", + "name": "", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + "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": [ + "y", + "x" + ] + }, + "items": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 31, + "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" + }, + "value": "0", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 53, + "end_column": 70 + }, + "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": "0", + "teal_alias": null + } + ] + }, + "id": "1" + }, + "name": "x" + }, + { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 72 + }, + "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": 14, + "end_line": 14, + "column": 26, + "end_column": 72 + }, + "wtype": { + "_type": "WTuple", + "name": "", + "immutable": true, + "ephemeral": false, + "scalar_type": null, + "types": [ + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "arc4_name": "uint64", - "n": "64" - }, - "value": "0", - "teal_alias": null + { + "_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": [ + "y", + "x" + ] }, - { - "_type": "IntegerConstant", + "source": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 51, - "end_column": 68 + "line": 14, + "end_line": 14, + "column": 26, + "end_column": 72 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "_type": "WTuple", + "name": "", "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": 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": [ + "y", + "x" + ] }, - "value": "0", - "teal_alias": null - } - ] - }, - "id": "15" - }, - "name": "x" + "items": [ + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 31, + "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" + }, + "value": "0", + "teal_alias": null + }, + { + "_type": "IntegerConstant", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 14, + "end_line": 14, + "column": 53, + "end_column": 70 + }, + "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": "0", + "teal_alias": null + } + ] + }, + "id": "1" + }, + "name": "y" + } + ] + }, + "id": "2" + }, + "name": "y" + } + } + } + }, + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 15, + "end_line": 15, + "column": 4, + "end_column": 25 + }, + "expr": { + "_type": "IntrinsicCall", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 15, + "end_line": 15, + "column": 4, + "end_column": 25 + }, + "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": 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, + "end_line": 15, + "column": 11, + "end_column": 24 + }, + "wtype": { + "_type": "WType", + "name": "bytes", + "immutable": true, + "ephemeral": false, + "scalar_type": 1 }, - { - "_type": "FieldExpression", + "expr": { + "_type": "VarExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 24, - "end_column": 70 + "line": 15, + "end_line": 15, + "column": 11, + "end_column": 13 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "_type": "ARC4Struct", + "name": "Vector", "immutable": true, "ephemeral": false, "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 + "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" + } }, - "arc4_name": "uint64", - "n": "64" - }, - "base": { - "_type": "SingleEvaluation", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 24, - "end_column": 70 + "line": 15, + "end_line": 15, + "column": 11, + "end_column": 13 }, - "wtype": { - "_type": "WTuple", - "name": "", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "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 + }, + "expr": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 15, + "end_line": 15, + "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": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" + "scalar_type": 2 }, - { - "_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": [ - "y", - "x" - ] - }, - "source": { - "_type": "TupleExpression", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 24, - "end_column": 70 + "arc4_name": "uint64", + "n": "64" }, - "wtype": { - "_type": "WTuple", - "name": "", + "y": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "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": [ - "y", - "x" - ] - }, - "items": [ - { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 29, - "end_column": 46 - }, - "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": "0", - "teal_alias": null + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 }, - { - "_type": "IntegerConstant", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 51, - "end_column": 68 - }, - "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": "0", - "teal_alias": null - } - ] + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 15, + "end_line": 15, + "column": 21, + "end_column": 23 }, - "id": "15" + "frozen": false }, - "name": "y" + "name": "v2" } - ] + } + } + ], + "comment": null + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-struct.algo.ts::StructDemo", + "member_name": "testVectorCreationAndEquality", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 10, + "end_line": 10, + "column": 2, + "end_column": 40 + }, + "name": "testVectorCreationAndEquality", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": {} + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 18, + "end_line": 18, + "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 }, - "id": "16" + "arc4_name": "uint64", + "n": "64" }, - "name": "x" + "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" + } }, - "y": { - "_type": "FieldExpression", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 13, - "end_column": 71 - }, - "wtype": { + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 18, + "end_line": 18, + "column": 24, + "end_column": 30 + }, + "frozen": false + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 18, + "end_line": 18, + "column": 20, + "end_column": 30 + } + }, + { + "_type": "SubroutineArgument", + "name": "v2", + "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, @@ -1512,733 +2666,1800 @@ "arc4_name": "uint64", "n": "64" }, - "base": { - "_type": "SingleEvaluation", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 24, - "end_column": 70 - }, - "wtype": { - "_type": "WTuple", - "name": "", + "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": null, - "types": [ - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 18, + "end_line": 18, + "column": 36, + "end_column": 42 + }, + "frozen": false + }, + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 18, + "end_line": 18, + "column": 32, + "end_column": 42 + } + } + ], + "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": 18, + "end_line": 18, + "column": 2, + "end_column": 43 + }, + "frozen": false + }, + "body": { + "_type": "Block", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 18, + "end_line": 23, + "column": 44, + "end_column": 3 + }, + "body": [ + { + "_type": "ReturnStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 19, + "end_line": 22, + "column": 4, + "end_column": 6 + }, + "value": { + "_type": "NewStruct", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 19, + "end_line": 22, + "column": 11, + "end_column": 6 + }, + "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": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" + "scalar_type": 2 }, - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "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": 1, - "native_type": { - "_type": "WType", - "name": "uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - } - ], - "names": [ - "x", - "y" - ] + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" + } }, - "source": { - "_type": "TupleExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 19, + "end_line": 19, + "column": 15, + "end_column": 21 + }, + "frozen": false + }, + "values": { + "x": { + "_type": "FieldExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 24, - "end_column": 70 + "line": 19, + "end_line": 22, + "column": 11, + "end_column": 6 }, "wtype": { - "_type": "WTuple", - "name": "", + "_type": "ARC4UIntN", + "name": "arc4.uint64", "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", + "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": 19, + "end_line": 22, + "column": 22, + "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": 2 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "arc4_name": "uint64", - "n": "64" - }, - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 - }, - "arc4_name": "uint64", - "n": "64" - } - ], - "names": [ - "x", - "y" - ] - }, - "items": [ - { - "_type": "FieldExpression", + "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": 13, - "end_line": 13, - "column": 24, - "end_column": 70 + "line": 19, + "end_line": 22, + "column": 22, + "end_column": 5 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "_type": "WTuple", + "name": "", "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": 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" + ] }, - "base": { - "_type": "SingleEvaluation", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 24, - "end_column": 70 - }, - "wtype": { - "_type": "WTuple", - "name": "", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "items": [ + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 20, + "end_line": 20, + "column": 9, + "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" + }, + "value": { + "_type": "UInt64BinaryOperation", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 20, + "end_line": 20, + "column": 24, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { + "scalar_type": 2 + }, + "left": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 20, + "end_line": 20, + "column": 24, + "end_column": 35 + }, + "wtype": { "_type": "WType", "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "arc4_name": "uint64", - "n": "64" + "value": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 20, + "end_line": 20, + "column": 24, + "end_column": 28 + }, + "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": 20, + "end_line": 20, + "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": 20, + "end_line": 20, + "column": 24, + "end_column": 26 + }, + "frozen": false + }, + "name": "v1" + }, + "name": "x" + } }, - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { + "op": "+", + "right": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 20, + "end_line": 20, + "column": 38, + "end_column": 49 + }, + "wtype": { "_type": "WType", "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "arc4_name": "uint64", - "n": "64" + "value": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 20, + "end_line": 20, + "column": 38, + "end_column": 42 + }, + "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": 20, + "end_line": 20, + "column": 38, + "end_column": 40 + }, + "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": 20, + "end_line": 20, + "column": 38, + "end_column": 40 + }, + "frozen": false + }, + "name": "v2" + }, + "name": "x" + } } - ], - "names": [ - "y", - "x" - ] + } }, - "source": { - "_type": "TupleExpression", + { + "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 24, - "end_column": 70 + "line": 21, + "end_line": 21, + "column": 9, + "end_column": 50 }, "wtype": { - "_type": "WTuple", - "name": "", + "_type": "ARC4UIntN", + "name": "arc4.uint64", "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": [ - "y", - "x" - ] + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "items": [ - { - "_type": "IntegerConstant", + "value": { + "_type": "UInt64BinaryOperation", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 21, + "end_line": 21, + "column": 24, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { + "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 29, - "end_column": 46 + "line": 21, + "end_line": 21, + "column": 24, + "end_column": 35 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + "scalar_type": 2 + }, + "value": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 21, + "end_line": 21, + "column": 24, + "end_column": 28 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "arc4_name": "uint64", - "n": "64" - }, - "value": "0", - "teal_alias": null + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 21, + "end_line": 21, + "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": 21, + "end_line": 21, + "column": 24, + "end_column": 26 + }, + "frozen": false + }, + "name": "v1" + }, + "name": "y" + } }, - { - "_type": "IntegerConstant", + "op": "+", + "right": { + "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 51, - "end_column": 68 + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 49 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + "scalar_type": 2 + }, + "value": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 42 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "arc4_name": "uint64", - "n": "64" - }, - "value": "0", - "teal_alias": null + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 40 + }, + "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": 21, + "end_line": 21, + "column": 38, + "end_column": 40 + }, + "frozen": false + }, + "name": "v2" + }, + "name": "y" + } } - ] + } + } + ] + }, + "id": "3" + }, + "name": "x" + }, + "y": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 19, + "end_line": 22, + "column": 11, + "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/arc4-struct.algo.ts", + "line": 19, + "end_line": 22, + "column": 22, + "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" }, - "id": "15" - }, - "name": "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" + } + ], + "names": [ + "x", + "y" + ] }, - { - "_type": "FieldExpression", + "source": { + "_type": "TupleExpression", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 24, - "end_column": 70 + "line": 19, + "end_line": 22, + "column": 22, + "end_column": 5 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "_type": "WTuple", + "name": "", "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": 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" + ] }, - "base": { - "_type": "SingleEvaluation", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 24, - "end_column": 70 - }, - "wtype": { - "_type": "WTuple", - "name": "", - "immutable": true, - "ephemeral": false, - "scalar_type": null, - "types": [ - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "items": [ + { + "_type": "ARC4Encode", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 20, + "end_line": 20, + "column": 9, + "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" + }, + "value": { + "_type": "UInt64BinaryOperation", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 20, + "end_line": 20, + "column": 24, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { + "scalar_type": 2 + }, + "left": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 20, + "end_line": 20, + "column": 24, + "end_column": 35 + }, + "wtype": { "_type": "WType", "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "arc4_name": "uint64", - "n": "64" + "value": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 20, + "end_line": 20, + "column": 24, + "end_column": 28 + }, + "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": 20, + "end_line": 20, + "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": 20, + "end_line": 20, + "column": 24, + "end_column": 26 + }, + "frozen": false + }, + "name": "v1" + }, + "name": "x" + } }, - { - "_type": "ARC4UIntN", - "name": "arc4.uint64", - "immutable": true, - "ephemeral": false, - "scalar_type": 1, - "native_type": { + "op": "+", + "right": { + "_type": "ARC4Decode", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 20, + "end_line": 20, + "column": 38, + "end_column": 49 + }, + "wtype": { "_type": "WType", "name": "uint64", "immutable": true, "ephemeral": false, "scalar_type": 2 }, - "arc4_name": "uint64", - "n": "64" + "value": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 20, + "end_line": 20, + "column": 38, + "end_column": 42 + }, + "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": 20, + "end_line": 20, + "column": 38, + "end_column": 40 + }, + "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": 20, + "end_line": 20, + "column": 38, + "end_column": 40 + }, + "frozen": false + }, + "name": "v2" + }, + "name": "x" + } } - ], - "names": [ - "y", - "x" - ] + } }, - "source": { - "_type": "TupleExpression", + { + "_type": "ARC4Encode", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 24, - "end_column": 70 + "line": 21, + "end_line": 21, + "column": 9, + "end_column": 50 }, "wtype": { - "_type": "WTuple", - "name": "", + "_type": "ARC4UIntN", + "name": "arc4.uint64", "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": [ - "y", - "x" - ] + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "items": [ - { - "_type": "IntegerConstant", + "value": { + "_type": "UInt64BinaryOperation", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 21, + "end_line": 21, + "column": 24, + "end_column": 49 + }, + "wtype": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "left": { + "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 29, - "end_column": 46 + "line": 21, + "end_line": 21, + "column": 24, + "end_column": 35 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + "scalar_type": 2 + }, + "value": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 21, + "end_line": 21, + "column": 24, + "end_column": 28 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "arc4_name": "uint64", - "n": "64" - }, - "value": "0", - "teal_alias": null + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 21, + "end_line": 21, + "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": 21, + "end_line": 21, + "column": 24, + "end_column": 26 + }, + "frozen": false + }, + "name": "v1" + }, + "name": "y" + } }, - { - "_type": "IntegerConstant", + "op": "+", + "right": { + "_type": "ARC4Decode", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 13, - "end_line": 13, - "column": 51, - "end_column": 68 + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 49 }, "wtype": { - "_type": "ARC4UIntN", - "name": "arc4.uint64", + "_type": "WType", + "name": "uint64", "immutable": true, "ephemeral": false, - "scalar_type": 1, - "native_type": { - "_type": "WType", - "name": "uint64", + "scalar_type": 2 + }, + "value": { + "_type": "FieldExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 42 + }, + "wtype": { + "_type": "ARC4UIntN", + "name": "arc4.uint64", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": 1, + "native_type": { + "_type": "WType", + "name": "uint64", + "immutable": true, + "ephemeral": false, + "scalar_type": 2 + }, + "arc4_name": "uint64", + "n": "64" }, - "arc4_name": "uint64", - "n": "64" - }, - "value": "0", - "teal_alias": null + "base": { + "_type": "VarExpression", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 21, + "end_line": 21, + "column": 38, + "end_column": 40 + }, + "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": 21, + "end_line": 21, + "column": 38, + "end_column": 40 + }, + "frozen": false + }, + "name": "v2" + }, + "name": "y" + } } - ] - }, - "id": "15" - }, - "name": "y" - } - ] - }, - "id": "16" - }, - "name": "y" + } + } + ] + }, + "id": "3" + }, + "name": "y" + } + } } } - } + ], + "label": null, + "comment": null }, - { - "_type": "ExpressionStatement", + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-struct.algo.ts::StructDemo", + "member_name": "addVectors", + "arc4_method_config": { + "_type": "ARC4ABIMethodConfig", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 14, - "end_line": 14, + "line": 18, + "end_line": 18, "column": 2, - "end_column": 23 + "end_column": 43 }, - "expr": { - "_type": "IntrinsicCall", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 14, - "end_line": 14, - "column": 2, - "end_column": 23 + "name": "addVectors", + "is_bare": false, + "create": 3, + "readonly": false, + "allowed_completion_types": [ + 0 + ], + "default_args": {}, + "structs": { + "v1": { + "name": "Vector", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] }, - "wtype": { - "_type": "WType", - "name": "void", - "immutable": true, - "ephemeral": false, - "scalar_type": null + "v2": { + "name": "Vector", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] }, - "op_code": "assert", - "immediates": [], - "stack_args": [ - { - "_type": "BytesComparisonExpression", + "output": { + "name": "Vector", + "elements": [ + [ + "x", + "uint64" + ], + [ + "y", + "uint64" + ] + ] + } + } + } + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 9, + "end_line": 9, + "column": 0, + "end_column": 35 + }, + "args": [], + "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": 9, + "end_line": 9, + "column": 0, + "end_column": 35 + }, + "body": [ + { + "_type": "ExpressionStatement", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 9, + "end_line": 9, + "column": 0, + "end_column": 35 + }, + "expr": { + "_type": "VoidConstant", "source_location": { "file": "tests/approvals/arc4-struct.algo.ts", - "line": 14, - "end_line": 14, - "column": 9, - "end_column": 22 + "line": 9, + "end_line": 9, + "column": 0, + "end_column": 35 }, "wtype": { "_type": "WType", - "name": "bool", + "name": "void", "immutable": true, "ephemeral": false, - "scalar_type": 2 + "scalar_type": null + } + } + } + ], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": null, + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-struct.algo.ts::StructDemo", + "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 }, - "lhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 14, - "end_line": 14, - "column": 9, - "end_column": 22 - }, - "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": 14, - "end_line": 14, - "column": 9, - "end_column": 11 - }, - "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": 14, - "end_line": 14, - "column": 9, - "end_column": 11 - } - }, - "name": "v1" - } + "wtype": { + "_type": "WType", + "name": "void", + "immutable": true, + "ephemeral": false, + "scalar_type": null }, - "operator": "==", - "rhs": { - "_type": "ReinterpretCast", - "source_location": { - "file": "tests/approvals/arc4-struct.algo.ts", - "line": 14, - "end_line": 14, - "column": 9, - "end_column": 22 - }, - "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": 14, - "end_line": 14, - "column": 19, - "end_column": 21 - }, - "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": 14, - "end_line": 14, - "column": 19, - "end_column": 21 - } - }, - "name": "v2" - } - } + "target": { + "_type": "InstanceMethodTarget", + "member_name": "constructor" + }, + "args": [] } - ], - "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": "constructor", + "arc4_method_config": null + }, + { + "_type": "ContractMethod", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 9, + "end_line": 9, + "column": 0, + "end_column": 35 + }, + "args": [], + "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": 9, + "end_line": 9, + "column": 0, + "end_column": 35 + }, + "body": [], + "label": null, + "comment": null + }, + "documentation": { + "_type": "MethodDocumentation", + "description": "Implicitly generated create method", + "args": {}, + "returns": null + }, + "cref": "tests/approvals/arc4-struct.algo.ts::StructDemo", + "member_name": "__algots__.defaultCreate", + "arc4_method_config": { + "_type": "ARC4BareMethodConfig", + "source_location": { + "file": "tests/approvals/arc4-struct.algo.ts", + "line": 9, + "end_line": 9, + "column": 0, + "end_column": 35 + }, + "allowed_completion_types": [ + 0 + ], + "create": 2, + "is_bare": true } - ], - "label": null, - "comment": null - }, - "documentation": { - "_type": "MethodDocumentation", - "description": null, - "args": {}, - "returns": null + } + ], + "app_state": [], + "state_totals": { + "globalBytes": null, + "globalUints": null, + "localBytes": null, + "localUints": null }, - "id": "tests/approvals/arc4-struct.algo.ts::test", - "name": "test" + "reserved_scratch_space": [] } ] \ No newline at end of file